This repository has been archived by the owner on Feb 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from gskema/refactor
[*] FO: Refacto blockcurrencies to fit Bootstrap nav
- Loading branch information
Showing
2 changed files
with
38 additions
and
108 deletions.
There are no files selected for viewing
67 changes: 38 additions & 29 deletions
67
themes/community-theme-16/modules/blockcurrencies/blockcurrencies.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,39 @@ | ||
<!-- Block currencies module --> | ||
{if count($currencies) > 1} | ||
<div id="currencies-block-top"> | ||
<form id="setCurrency" action="{$request_uri}" method="post"> | ||
<div class="current"> | ||
<input type="hidden" name="id_currency" id="id_currency" value=""/> | ||
<input type="hidden" name="SubmitCurrency" value="" /> | ||
<span class="cur-label">{l s='Currency' mod='blockcurrencies'} :</span> | ||
{foreach from=$currencies key=k item=f_currency} | ||
{if $cookie->id_currency == $f_currency.id_currency}<strong>{$f_currency.iso_code}</strong>{/if} | ||
{/foreach} | ||
</div> | ||
<ul id="first-currencies" class="currencies_ul toogle_content"> | ||
{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} | ||
<li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}> | ||
<a href="javascript:setCurrency({$f_currency.id_currency});" rel="nofollow" title="{$currency_name}"> | ||
{$currency_name} | ||
</a> | ||
</li> | ||
{/foreach} | ||
</ul> | ||
</form> | ||
</div> | ||
{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} | ||
|
||
<li id="blockcurrencies" class="dropdown"> | ||
|
||
{* Backwards compatibility *} | ||
<div id="setCurrency" class="hidden" style="display: none"> | ||
<input type="hidden" name="id_currency" id="id_currency" value=""/> | ||
<input type="hidden" name="SubmitCurrency" value="" /> | ||
</div> | ||
|
||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> | ||
{l s='Currency: %s' sprintf=[$current_iso] mod='blockcurrencies'} <span class="caret"></span> | ||
</a> | ||
|
||
<ul class="dropdown-menu"> | ||
{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} | ||
<li{if $cookie->id_currency == $f_currency.id_currency} class="active"{/if}> | ||
<a href="javascript:setCurrency({$f_currency.id_currency});" rel="nofollow" title="{$currency_name}"> | ||
{$currency_name} | ||
</a> | ||
</li> | ||
{/foreach} | ||
</ul> | ||
|
||
</li> | ||
|
||
{/if} | ||
<!-- /Block currencies module --> |
79 changes: 0 additions & 79 deletions
79
themes/community-theme-16/sass/modules/blockcurrencies/blockcurrencies.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} | ||
} | ||