diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-01 00:44:44 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-01 00:44:44 +0200 |
| commit | 881ad16da91e0b999f0f354b10bc84b9fcfb5e42 (patch) | |
| tree | 9f6272b39e621bdb28ae42109b79f2b0091d006f | |
| parent | 461fb1258a2ba96d99d9cdb4e1956492f4c9fe7f (diff) | |
red text
| -rwxr-xr-x | StoneIsland/www/css/products.css | 10 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 9 |
2 files changed, 16 insertions, 3 deletions
diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css index 1f858898..532beb69 100755 --- a/StoneIsland/www/css/products.css +++ b/StoneIsland/www/css/products.css @@ -232,9 +232,9 @@ } #collection .content { -position:relative; -padding-top:45px; -padding-bottom:45px; + position:relative; + padding-top:45px; + padding-bottom:45px; } #collection h1 { @@ -252,3 +252,7 @@ padding-bottom:45px; z-index:9 } +.red { + color: red; +} + diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 214819cf..97654a3f 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -183,6 +183,15 @@ var ProductView = ScrollableView.extend({ console.log( data['DefaultCode10'] ) + if (title.indexOf('<br>') !== -1) { + var title_lines = title.split('<br>').map(function(s){ + if (s.indexOf("LIMITED EDITION")) { + return "<span class='red'>" + s + "</span>" + } + return s + }) + title = title_lines.join('<br><br>') + } this.$title.html(title) this.$type.html(type) this.$price.html(price) |
