Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

Commit

Permalink
#740 Render categories examples at the top menu (#743)
Browse files Browse the repository at this point in the history
* #740  Draft for previews on navigation menu

* #740  Navigation menu with examples

* #740  Improve markup

* #740  Expand subtask on mobile version
  • Loading branch information
duker33 authored Jul 11, 2019
1 parent 0ecc237 commit 3b30baa
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 21 deletions.
33 changes: 27 additions & 6 deletions front/scss/common/components/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,38 @@
display: block;
}

&-item {
& a {
color: $c-nav-subnav-link;
}

& a:hover {
color: $c-nav-subnav-link-hover;
}

&-block {
&:not(:last-child) {
margin-bottom: 10px;
margin-bottom: 7px;
padding-bottom: 7px;
border-bottom: 1px solid $c-border-grey;
}

&-link {
color: $c-nav-subnav-link;
& .label {
width: 30%;
display: inline-block;
vertical-align: top;

& a {
text-decoration: underline;
}
}

&-link:hover {
color: $c-nav-subnav-link-hover;
& .examples {
width: 65%;
display: inline-block;

& .example {
margin: 0 0 8px 0;
}
}

&-remove {
Expand Down
1 change: 1 addition & 0 deletions front/scss/utilities/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ $w-container-lg: 1200px;
$c-black: #000;
$c-banner-01: #e0a03c;
$c-banner-02: #df6a27;
$c-border-grey: #ddd;
$c-error-text: #ed0b00;
$c-icon-remove: #9b9b9b;
$c-link: #47a1d2;
Expand Down
35 changes: 20 additions & 15 deletions templates/components/navigation_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,29 @@
<a class="nav-link" href="{% custom_url 'gbi' %}">Каталог</a>

{% comment %}
@todo #736:60m Show example catalog items at the menu header.
Show some catalog items to clarify catalog terms with UX.
We had been shown such examples already.
See comments of the parent task.
@todo #740:60m Show example Series and Sections in top menu. Mobile too.
As categories already shown.
Then show all the examples stuff at the mobile version.
See pr#737 with removed mobile version template code.
{% endcomment %}
<ul class="nav-subnav js-nav-subnav">
<li class="nav-subnav-item">
<a class="nav-subnav-item-link" href="{% custom_url 'gbi' %}">Категории</a>
</li>
<div class="nav-subnav js-nav-subnav">
<div class="nav-subnav-block">
<div class="label"><a href="{% custom_url 'gbi' %}">Категории</a></div>
<ul class="examples">
{% for item in categories %}
<li class="example"><a href="{{ item.url }}">{{ item.name }}</a></li>
{% endfor %}
</ul>
</div>

<li class="nav-subnav-item">
<a class="nav-subnav-item-link" href="{% custom_url 'series' %}">Серии</a>
</li>
<div class="nav-subnav-block">
<div class="label"><a href="{% custom_url 'series' %}">Серии</a></div>
</div>

<li class="nav-subnav-item">
<a class="nav-subnav-item-link" href="{% custom_url 'sections' %}">Типы изделий</a>
</li>
</ul>
<div class="nav-subnav-block">
<div class="label"><a href="{% custom_url 'sections' %}">Типы изделий</a></div>
</div>
</div>
</li>

<li class="nav-item">
Expand Down

2 comments on commit 3b30baa

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 3b30baa Jul 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 736-3fd74c60 disappeared from templates/components/navigation_menu.html, that's why I closed #740. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 3b30baa Jul 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 740-543c3432 discovered in templates/components/navigation_menu.html and submitted as #749. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.