Commit 7f0587f97c6c98ea19df328e6aba6c86186eae15
1 parent
c004860f
Exists in
master
add style of track section and link style
Showing
2 changed files
with
213 additions
and
3 deletions
Show diff stats
_homeblocks.sass
1 | .action-profile-index #content | 1 | .action-profile-index #content |
2 | .box-1 | 2 | .box-1 |
3 | + .main-block | ||
4 | + display: none | ||
3 | .article-block | 5 | .article-block |
4 | border-bottom: 1px dotted #575959 | 6 | border-bottom: 1px dotted #575959 |
5 | h3.block-title | 7 | h3.block-title |
@@ -19,6 +21,9 @@ | @@ -19,6 +21,9 @@ | ||
19 | .short-post | 21 | .short-post |
20 | font-family: 'Ubuntu' | 22 | font-family: 'Ubuntu' |
21 | font-size: 13px | 23 | font-size: 13px |
24 | + a | ||
25 | + color: #3B9AAD | ||
26 | + text-decoration: none | ||
22 | .read-more | 27 | .read-more |
23 | a | 28 | a |
24 | background: url('icons/more.png') no-repeat left center | 29 | background: url('icons/more.png') no-repeat left center |
@@ -33,5 +38,179 @@ | @@ -33,5 +38,179 @@ | ||
33 | margin: 25px 0 | 38 | margin: 25px 0 |
34 | padding-left: 30px | 39 | padding-left: 30px |
35 | text-decoration: none | 40 | text-decoration: none |
36 | - .main-block | ||
37 | - display: none | 41 | + |
42 | +.action-profile-index #content | ||
43 | + .box-1 | ||
44 | + .community-track-plugin_track-list-block | ||
45 | + h3.block-title | ||
46 | + background: url('icons/icon-attend.png') no-repeat left center | ||
47 | + background-size: 35px 35px | ||
48 | + border: none | ||
49 | + color: #196F87 | ||
50 | + display: inline-block | ||
51 | + font-family: 'Ubuntu' | ||
52 | + font-size: 22px | ||
53 | + font-variant: normal | ||
54 | + font-weight: normal | ||
55 | + height: 35px | ||
56 | + line-height: 35px | ||
57 | + padding-left: 45px | ||
58 | + .item | ||
59 | + border: none | ||
60 | + margin: 40px 0 20px 0 | ||
61 | + .track_content | ||
62 | + height: auto | ||
63 | + .lead | ||
64 | + border: 1px solid #999 | ||
65 | + border-radius: 5px | ||
66 | + display: inline-table | ||
67 | + float: none | ||
68 | + margin-top: 20px | ||
69 | + width: 210px | ||
70 | + .track_enum | ||
71 | + background: #FFF | ||
72 | + border-radius: 15px 5px 5px 15px | ||
73 | + color: #575757 | ||
74 | + font-family: 'Ubuntu Mediun' | ||
75 | + font-size: 16px | ||
76 | + margin: 30px 40px 30px 15px | ||
77 | + span | ||
78 | + display: inline-block | ||
79 | + line-height: 30px | ||
80 | + span.counter | ||
81 | + background: #6A6A6A | ||
82 | + border-radius: 30px | ||
83 | + color: #FFF | ||
84 | + height: 30px | ||
85 | + text-align: center | ||
86 | + width: 30px | ||
87 | + span.track_label | ||
88 | + padding: 0 65px 0 5px | ||
89 | + h3 | ||
90 | + background: #F3F4F6 | ||
91 | + border-top: 1px solid #999 | ||
92 | + margin: 0 | ||
93 | + padding: 20px 10px 10px 10px | ||
94 | + a | ||
95 | + color: #575757 | ||
96 | + font-family: 'Ubuntu Mediun' | ||
97 | + font-size: 14px | ||
98 | + font-weight: normal | ||
99 | + text-decoration: none | ||
100 | + .content | ||
101 | + background: #F3F4F6 | ||
102 | + font-family: 'Ubuntu' | ||
103 | + font-size: 12px | ||
104 | + height: 28px | ||
105 | + overflow: hidden | ||
106 | + padding: 0 10px | ||
107 | + p | ||
108 | + margin: 0 | ||
109 | + .read_more | ||
110 | + background: #F3F4F6 | ||
111 | + padding: 10px 10px 20px 10px | ||
112 | + a | ||
113 | + color: #575757 | ||
114 | + font-family: 'Ubuntu' | ||
115 | + font-size: 12px | ||
116 | + text-decoration: none | ||
117 | + text-transform: lowercase | ||
118 | + .stats | ||
119 | + background: #575757 | ||
120 | + border-radius: 0 0 3px 3px | ||
121 | + display: block | ||
122 | + height: 48px | ||
123 | + margin: 2px | ||
124 | + .comments_count, .hits_count | ||
125 | + background: transparent url('icons/balao_claro.png') no-repeat left center | ||
126 | + float: left | ||
127 | + height: 18px | ||
128 | + margin: 15px 0px 15px 10px | ||
129 | + width: auto | ||
130 | + span | ||
131 | + color: #FFF | ||
132 | + font-family: 'Ubuntu' | ||
133 | + font-size: 12px | ||
134 | + line-height: 16px | ||
135 | + padding-left: 25px | ||
136 | + .hits_count | ||
137 | + background: transparent url('icons/visualizacao_claro.png') no-repeat left center | ||
138 | + .steps | ||
139 | + display: inline-table | ||
140 | + float: none | ||
141 | + margin-left: 20px | ||
142 | + vertical-align: top | ||
143 | + h3 | ||
144 | + color: #575757 | ||
145 | + font-family: 'Ubuntu' | ||
146 | + font-size: 14px | ||
147 | + margin: 0 | ||
148 | + .step | ||
149 | + background: #F3F3F3 | ||
150 | + border-radius: 10px | ||
151 | + height: 50px | ||
152 | + width: 440px | ||
153 | + padding: 15px | ||
154 | + .position | ||
155 | + background: #FFF | ||
156 | + border: 1px solid #E5E5E5 | ||
157 | + border-radius: 5px | ||
158 | + color: #E5E5E5 | ||
159 | + font-family: 'Ubuntu' | ||
160 | + font-size: 16px | ||
161 | + height: 50px | ||
162 | + line-height: 50px | ||
163 | + padding: 0px | ||
164 | + text-align: center | ||
165 | + width: 50px | ||
166 | + .tool_icon | ||
167 | + display: none | ||
168 | + .name | ||
169 | + color: #E5E5E5 | ||
170 | + float: left | ||
171 | + font-family: 'Ubuntu Mediun' | ||
172 | + font-size: 15px | ||
173 | + font-weight: normal | ||
174 | + height: 50px | ||
175 | + line-height: 50px | ||
176 | + margin: 0 0 0 10px | ||
177 | + padding: 0 | ||
178 | + .step_active | ||
179 | + background: #88D1F7 | ||
180 | + .position | ||
181 | + border-color: #159BBE | ||
182 | + color: #196F87 | ||
183 | + .name | ||
184 | + color: #196F87 | ||
185 | + .item:first-child | ||
186 | + .track_content | ||
187 | + .lead | ||
188 | + border: 1px solid #308DC6 | ||
189 | + .track_enum | ||
190 | + background: #159BBE | ||
191 | + color: #FFF | ||
192 | + span.counter | ||
193 | + background: url('icons/icon-attend.png') no-repeat left center | ||
194 | + background-size: 30px 30px | ||
195 | + color: transparent | ||
196 | + h3 | ||
197 | + background: #F3F4F6 | ||
198 | + border-top: 1px solid #308DC6 | ||
199 | + a | ||
200 | + color: #196F87 | ||
201 | + .content | ||
202 | + background: #F3F4F6 | ||
203 | + .read_more | ||
204 | + background: #F3F4F6 | ||
205 | + a | ||
206 | + color: #196F87 | ||
207 | + .stats | ||
208 | + background: #88D1F7 | ||
209 | + .comments_count, .hits_count | ||
210 | + background: transparent url('icons/balao.png') no-repeat left center | ||
211 | + span | ||
212 | + color: #196F87 | ||
213 | + .hits_count | ||
214 | + background: transparent url('icons/visualizacao.png') no-repeat left center | ||
215 | + .steps h3 | ||
216 | + color: #159BBE |
footer.html.erb
1 | <script> | 1 | <script> |
2 | -$('.members-block .block-footer-content').prepend('<span class="members-counter"><%= profile.members.count %> participantes</span>'); | 2 | + $('.members-block .block-footer-content').prepend('<span class="members-counter"><%= profile.members.count %> participantes</span>'); |
3 | </script> | 3 | </script> |
4 | + | ||
5 | +<% if params[:controller] == 'profile' and params[:action] == 'index' %> | ||
6 | +<% blocks = profile.blocks | ||
7 | + blocks.keep_if{|b| b.type == 'CommunityTrackPlugin::TrackListBlock'} | ||
8 | + tracks = Block.find(blocks[0].id).tracks | ||
9 | + stats = {'tracks' => {'comments' => Array.new,'hits' => Array.new}} | ||
10 | + tracks.each do |t| | ||
11 | + stats['tracks']['comments'].unshift t.comments_count | ||
12 | + stats['tracks']['hits'].unshift t.hits | ||
13 | + end | ||
14 | +%> | ||
15 | +<script> | ||
16 | + var tracks = $('div.track_content .lead'); | ||
17 | + var comments = <%= stats["tracks"]["comments"]%>; | ||
18 | + var hits = <%= stats["tracks"]["hits"]%>; | ||
19 | + var i = 0; | ||
20 | + tracks.each(function(i){ | ||
21 | + var link = $(this).find('h3 a').attr('href'); | ||
22 | + var readMore = $('<div class="read_more"><a><span>Leia mais</span></a></div>'); | ||
23 | + var track = $('<div class="track_enum"><span class="counter">'+(i+1)+'</span><span class="track_label">Trilha '+(i+1)+'</span></div>'); | ||
24 | + var status = $('<div class="stats"><div class="comments_count"><span></span></div><div class="hits_count"><span></span></div></div>'); | ||
25 | + $(status).find('div.comments_count span').text(comments.pop()); | ||
26 | + $(status).find('div.hits_count span').text(hits.pop()+' acesso(s)'); | ||
27 | + $(readMore).children().attr('href', link); | ||
28 | + $(this).prepend(track); | ||
29 | + $(this).append(readMore); | ||
30 | + $(this).append(status); | ||
31 | + i++; | ||
32 | + }); | ||
33 | +</script> | ||
34 | +<% end %> |