Commit 9a59ab2b270cca29202dff686f8245e031f93dc3
1 parent
cb185988
Exists in
master
and in
4 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,6 +55,15 @@ | ||
| 55 | color: #FFF | 55 | color: #FFF |
| 56 | display: inline-block | 56 | display: inline-block |
| 57 | font-size: 14px | 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 | &.category_cultura | 67 | &.category_cultura |
| 59 | background: #FAF9EE | 68 | background: #FAF9EE |
| 60 | border-color: #F4DFBE | 69 | border-color: #F4DFBE |
| @@ -65,6 +74,8 @@ | @@ -65,6 +74,8 @@ | ||
| 65 | color: #AF6EAF | 74 | color: #AF6EAF |
| 66 | .track_stats | 75 | .track_stats |
| 67 | background: #FA9E00 | 76 | background: #FA9E00 |
| 77 | + .read_more a | ||
| 78 | + background: transparent url('images/home/read-more-cult.png') no-repeat center center | ||
| 68 | &.category_energia | 79 | &.category_energia |
| 69 | background: #F7FAE7 | 80 | background: #F7FAE7 |
| 70 | border-color: #DDE5BF | 81 | border-color: #DDE5BF |
| @@ -75,6 +86,8 @@ | @@ -75,6 +86,8 @@ | ||
| 75 | color: #64BCCA | 86 | color: #64BCCA |
| 76 | .track_stats | 87 | .track_stats |
| 77 | background: #9DB329 | 88 | background: #9DB329 |
| 89 | + .read_more a | ||
| 90 | + background: transparent url('images/home/read-more-env.png') no-repeat center center | ||
| 78 | &.category_ciencia | 91 | &.category_ciencia |
| 79 | background: #F4FBFB | 92 | background: #F4FBFB |
| 80 | border-color: #0D3E6A | 93 | border-color: #0D3E6A |
| @@ -85,6 +98,8 @@ | @@ -85,6 +98,8 @@ | ||
| 85 | color: #E4CAA7 | 98 | color: #E4CAA7 |
| 86 | .track_stats | 99 | .track_stats |
| 87 | background: #123D6E | 100 | background: #123D6E |
| 101 | + .read_more a | ||
| 102 | + background: transparent url('images/home/read-more-tec.png') no-repeat center center | ||
| 88 | 103 | ||
| 89 | .community-track-plugin_track-card-list-block | 104 | .community-track-plugin_track-card-list-block |
| 90 | .block-footer-content | 105 | .block-footer-content |
455 Bytes
465 Bytes
468 Bytes
theme.js
| @@ -12,7 +12,18 @@ function addSubtitles(){ | @@ -12,7 +12,18 @@ function addSubtitles(){ | ||
| 12 | $($('div.block-header')[2]).children('.block-title').append('<span class="subtitle">Faça parte</span>') | 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 | $(document).ready(function(){ | 25 | $(document).ready(function(){ |
| 16 | shortAdminButtonLabels(); | 26 | shortAdminButtonLabels(); |
| 17 | addSubtitles(); | 27 | addSubtitles(); |
| 28 | + addReadMoreOnTrackCards(); | ||
| 18 | })(jQuery); | 29 | })(jQuery); |