From 43714b4a4045fba2eb285ec67b6e7b8c44a1dd03 Mon Sep 17 00:00:00 2001 From: gskema Date: Sun, 24 Jan 2016 16:47:25 +0200 Subject: [PATCH 1/2] [*] HTML: Refactor blockcurrencies template to fit Bootstrap nav --- .../blockcurrencies/blockcurrencies.tpl | 67 +++++++++++-------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/themes/community-theme-16/modules/blockcurrencies/blockcurrencies.tpl b/themes/community-theme-16/modules/blockcurrencies/blockcurrencies.tpl index 071b87bc..001a0c6f 100644 --- a/themes/community-theme-16/modules/blockcurrencies/blockcurrencies.tpl +++ b/themes/community-theme-16/modules/blockcurrencies/blockcurrencies.tpl @@ -1,30 +1,39 @@ - -{if count($currencies) > 1} -
-
-
- - - {l s='Currency' mod='blockcurrencies'} : - {foreach from=$currencies key=k item=f_currency} - {if $cookie->id_currency == $f_currency.id_currency}{$f_currency.iso_code}{/if} - {/foreach} -
-
    - {foreach from=$currencies key=k item=f_currency} - {if strpos($f_currency.name, '('|cat:$f_currency.iso_code:')') === false} - {assign var="currency_name" value={l s='%s (%s)' sprintf=[$f_currency.name, $f_currency.iso_code]}} - {else} - {assign var="currency_name" value=$f_currency.name} - {/if} -
  • id_currency == $f_currency.id_currency}class="selected"{/if}> - - {$currency_name} - -
  • - {/foreach} -
-
-
+{if !empty($currencies)} + + {foreach from=$currencies key=k item=f_currency} + {if $cookie->id_currency == $f_currency.id_currency} + {$current_iso = $f_currency.iso_code} + {break} + {/if} + {/foreach} + + + {/if} - From 71d035191e7a796f5db86902175c03fbf3018301 Mon Sep 17 00:00:00 2001 From: gskema Date: Sun, 24 Jan 2016 16:47:44 +0200 Subject: [PATCH 2/2] [*] CSS: Remove blockcurrencies styles --- .../blockcurrencies/blockcurrencies.scss | 79 ------------------- 1 file changed, 79 deletions(-) diff --git a/themes/community-theme-16/sass/modules/blockcurrencies/blockcurrencies.scss b/themes/community-theme-16/sass/modules/blockcurrencies/blockcurrencies.scss index 9cdfbc2f..e69de29b 100644 --- a/themes/community-theme-16/sass/modules/blockcurrencies/blockcurrencies.scss +++ b/themes/community-theme-16/sass/modules/blockcurrencies/blockcurrencies.scss @@ -1,79 +0,0 @@ -@import "compass"; -@import "./../../theme_variables"; -@import "./../../vendor_variables"; - -#currencies-block-top { - float: right; - border-left: 1px solid #515151; - position: relative; - // max 479px - @media (max-width: $screen-xs - 1) { - width: 25%; - } - span.firstWord { - display: none; - } - div.current { - font-weight: bold; - padding: 8px 10px 10px 10px; - color: #fff; - cursor: pointer; - line-height:18px; - @media (max-width: $screen-xs - 1) { - text-align: center; - padding: 9px 5px 10px; - font-size: 11px; - } - strong { - color: #777777; - } - &:hover, &.active { - background: #2b2b2b; - } - &:after { - content: "\f0d7"; - font-family: $font-icon; - font-size: 18px; - line-height: 18px; - color: #686666; - vertical-align: -2px; - padding-left: 12px; - // max 479px - @media (max-width: $screen-xs - 1) { - padding-left: 2px; - font-size: 13px; - line-height: 13px; - vertical-align: 0; - } - } - .cur-label { - // max 479px - @media (max-width: $screen-xs - 1) { - display: none; - } - } - } - ul { - display: none; - position: absolute; - top: 37px; - left: 0; - width: 157px; - background: #333; - z-index: 2; - li { - color: #fff; - line-height: 35px; - font-size: 13px; - a, - > span { - padding: 0 10px 0 12px; - display: block; - color: #fff; - } - &.selected, &:hover a { - background: #484848; - } - } - } -}