Commit 9a59ab2b270cca29202dff686f8245e031f93dc3
1 parent
cb185988
Exists in
master
and in
5 other branches
Add read more links on track cards
Showing
5 changed files
with
26 additions
and
0 deletions
Show diff stats
_tracks.sass
| ... | ... | @@ -55,6 +55,15 @@ |
| 55 | 55 | color: #FFF |
| 56 | 56 | display: inline-block |
| 57 | 57 | font-size: 14px |
| 58 | + .read_more | |
| 59 | + float: right | |
| 60 | + padding: 6px 15px | |
| 61 | + a | |
| 62 | + display: block | |
| 63 | + height: 28px | |
| 64 | + width: 28px | |
| 65 | + span | |
| 66 | + display: none | |
| 58 | 67 | &.category_cultura |
| 59 | 68 | background: #FAF9EE |
| 60 | 69 | border-color: #F4DFBE |
| ... | ... | @@ -65,6 +74,8 @@ |
| 65 | 74 | color: #AF6EAF |
| 66 | 75 | .track_stats |
| 67 | 76 | background: #FA9E00 |
| 77 | + .read_more a | |
| 78 | + background: transparent url('images/home/read-more-cult.png') no-repeat center center | |
| 68 | 79 | &.category_energia |
| 69 | 80 | background: #F7FAE7 |
| 70 | 81 | border-color: #DDE5BF |
| ... | ... | @@ -75,6 +86,8 @@ |
| 75 | 86 | color: #64BCCA |
| 76 | 87 | .track_stats |
| 77 | 88 | background: #9DB329 |
| 89 | + .read_more a | |
| 90 | + background: transparent url('images/home/read-more-env.png') no-repeat center center | |
| 78 | 91 | &.category_ciencia |
| 79 | 92 | background: #F4FBFB |
| 80 | 93 | border-color: #0D3E6A |
| ... | ... | @@ -85,6 +98,8 @@ |
| 85 | 98 | color: #E4CAA7 |
| 86 | 99 | .track_stats |
| 87 | 100 | background: #123D6E |
| 101 | + .read_more a | |
| 102 | + background: transparent url('images/home/read-more-tec.png') no-repeat center center | |
| 88 | 103 | |
| 89 | 104 | .community-track-plugin_track-card-list-block |
| 90 | 105 | .block-footer-content | ... | ... |
455 Bytes
465 Bytes
468 Bytes
theme.js
| ... | ... | @@ -12,7 +12,18 @@ function addSubtitles(){ |
| 12 | 12 | $($('div.block-header')[2]).children('.block-title').append('<span class="subtitle">Faça parte</span>') |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | +function addReadMoreOnTrackCards(){ | |
| 16 | + var cards = $('div.item_card'); | |
| 17 | + cards.each(function(){ | |
| 18 | + var link = $(this).children().attr('href'); | |
| 19 | + var readMore = $('<div class="read_more"><a><span>Leia mais</span></a></div>'); | |
| 20 | + $(readMore).children().attr('href', link); | |
| 21 | + $($(this).find('.track_stats')).append(readMore); | |
| 22 | + }); | |
| 23 | +} | |
| 24 | + | |
| 15 | 25 | $(document).ready(function(){ |
| 16 | 26 | shortAdminButtonLabels(); |
| 17 | 27 | addSubtitles(); |
| 28 | + addReadMoreOnTrackCards(); | |
| 18 | 29 | })(jQuery); | ... | ... |