Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix menu language popover & search according to design #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/header-fixed.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="header_components">
<div class="header_components-desktop">
{% if show_language_menu_popover %}
<div class="js-menu-language">
<div class="js-menu-language menu-language">
<div class="js-toggle-menu-language menu-language-toggle js-prevent-sideclick p-rel" tabindex=0>
<button class="menu-language-btn ico-flags ico-flag-{{ page.language_code }} js-menu-language-popover-btn" data-lang-code="{{ page.language_locale }}" {{ edy_intro_add_lang }}>
<span>{{ current_language_title }}</span><span class="mar_l-4">{% include 'ico-chevron-down' %}</span>
Expand Down
4 changes: 2 additions & 2 deletions components/menu-language-popover.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{%- for language in site.languages -%}
{%- if language.code == page.language_code -%}
<li class="menu-item">
<a class="ico-flags ico-flag-{{ language.code }}{%- if language.selected? -%} selected{%- endif -%}" href="{{ language.url }}" data-lang-code="{{ language.locale }}">
<a class="ico-flags ico-flag-{{ language.code }}{% if language.selected? %} selected{%- endif -%}" href="{{ language.url }}" data-lang-code="{{ language.locale }}">
<span class="menu-language-popover-name">{{ language.title }}</span>
</a>
</li>
Expand All @@ -15,7 +15,7 @@
{%- for language in site.languages -%}
{%- unless language.code == page.language_code -%}
<li class="menu-item">
<a class="ico-flags ico-flag-{{ language.code }}{%- if language.selected? -%} selected{%- endif -%}" href="{{ language.url }}" data-lang-code="{{ language.locale }}">
<a class="ico-flags ico-flag-{{ language.code }}{% if language.selected? %} selected{%- endif -%}" href="{{ language.url }}" data-lang-code="{{ language.locale }}">
<span class="menu-language-popover-name">{{ language.title }}</span>
</a>
</li>
Expand Down
17 changes: 5 additions & 12 deletions components/site-search.tpl
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{%- if site.search.enabled %}
<div class="search js-search js-prevent-sideclick">
<div class="search-middle">
<div class="search-inner js-search-inner">
<form id="search" class="search-form js-search-form" method="get" action="#">
<input id="onpage_search" class="search-input js-search-input" type="text" placeholder="{{ "search_this_site" | lc }}">
</form>
<div class="voog-search-modal js-voog-search-modal"></div>
</div>
<button class="search-btn search-close-btn js-search-reset-btn">
<span class="menu-stripe"></span>
<span class="menu-stripe"></span>
</button>
</div>
<form id="search" class="search-form js-search-form" method="get" action="#">
<input id="onpage_search" class="search-input js-search-input" type="text" placeholder="{{ "search_this_site" | lc }}">
</form>
<div class="voog-search-modal js-voog-search-modal"></div>
<button class="search-btn search-close-btn js-search-reset-btn bg_img-contain"></button>
</div>
{%- endif %}
2 changes: 2 additions & 0 deletions javascripts/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,8 @@ MMCQ = (function() {
$('.header_components-tablet').append($('.js-menu-language'));
}
}

$('.menu-language').show();
};

var handleDocument = function() {
Expand Down
2 changes: 1 addition & 1 deletion javascripts/global.min.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
{
"content_type": "component",
"component": true,
"file": "components/template-cs-style-rules.tpl",
"layout_name": "template-cs-style-rules",
"title": "template-cs-style-rules"
"file": "components/site-search.tpl",
"layout_name": "site-search",
"title": "site-search"
},
{
"content_type": "component",
Expand Down Expand Up @@ -365,16 +365,16 @@
{
"content_type": "component",
"component": true,
"file": "components/site-search.tpl",
"layout_name": "site-search",
"title": "site-search"
"file": "components/template-cs-content.tpl",
"layout_name": "template-cs-content",
"title": "template-cs-content"
},
{
"content_type": "component",
"component": true,
"file": "components/template-cs-content.tpl",
"layout_name": "template-cs-content",
"title": "template-cs-content"
"file": "components/template-cs-style-rules.tpl",
"layout_name": "template-cs-style-rules",
"title": "template-cs-style-rules"
},
{
"content_type": "component",
Expand Down
2 changes: 2 additions & 0 deletions sources/javascripts/concat/global/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@
$('.header_components-tablet').append($('.js-menu-language'));
}
}

$('.menu-language').show();
};

var handleDocument = function() {
Expand Down
5 changes: 2 additions & 3 deletions sources/stylesheets/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,16 @@
}
}

@mixin transition($prop) {
@mixin transition($prop, $timing: $bezier-fast) {
transition: $prop;
transition-timing-function: $bezier-fast;
transition-timing-function: $timing;
perspective: 1000;
backface-visibility: hidden;
}


@mixin language-flag-icon-position($x-medium, $y-medium, $x-medium-up, $y-medium-up) {
&::after {
content: '';
background-position: $x-medium $y-medium;
}
}
2 changes: 2 additions & 0 deletions sources/stylesheets/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ h5 {

a {
color: var(--primary-color);
@include transition(all 300ms, ease-in);

&:hover {
color: var(--secondary-color);
@include transition(all 300ms, ease-in);
}
}

Expand Down
2 changes: 1 addition & 1 deletion sources/stylesheets/components/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
&_separator {
width: 100%;
opacity: 0.2;
border: 1px solid var(--secondary-color);
border-top: 1px solid var(--secondary-color);
margin-bottom: 48px;

@include query($tablet-1) {
Expand Down
Loading