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

Documentation: add submenu for training #2364

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 9 additions & 3 deletions arrow-site/docs/_data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ nav:
- title: Media
url: https://media.arrow-kt.io

- title: Training
url: https://www.47deg.com/trainings/

- title: Support
url: https://www.47deg.com/services/

- title: Training
submenu:

- title: 47 Degrees
url: https://www.47deg.com/trainings/

- title: Instil
url: https://instil.co/courses/functional-programming-in-kotlin-with-arrow/

- title: Github
url: https://github.com/arrow-kt/arrow

Expand Down
11 changes: 10 additions & 1 deletion arrow-site/docs/_includes/_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@
{% for item in site.data.menu.nav%}
{% if item.title != 'Github' %}
<li class="nav-menu-item">
<a class="menu-links" href="{{ item.url }}" title="{{ item.title }}">{{ item.title }}</a>
<a class="menu-links {% if item.submenu %}no-hover{% endif %}" {% if item.url %}href="{{ item.url }}"{% endif %} title="{{ item.title }}">{{ item.title }}</a>
{% if item.submenu %}
<ul class="nav-submenu">
{% for submenu-item in item.submenu %}
<li class="nav-submenu-item">
<a class="menu-links" href="{{ submenu-item.url }}" title="{{ submenu-item.title }}">{{ submenu-item.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
Expand Down
37 changes: 37 additions & 0 deletions arrow-site/docs/_sass/components/home/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@
margin-right: ($base-point-grid * 5);
}

.nav-submenu {
display: none;
position: absolute;

&-item {
padding-top: $base-point-grid;

&::before {
content: "-";
}
}
}

.menu-links {
padding-bottom: 4px;
text-transform: uppercase;
Expand All @@ -105,6 +118,16 @@
}
}
}

.no-hover {
pointer-events: none;
}

&:hover {
.nav-submenu {
display: block;
}
}
}
}
}
Expand Down Expand Up @@ -164,6 +187,20 @@
&:not(:last-child) {
margin-right: 0;
}

.nav-submenu {
position: relative;
display: block;

&-item {
padding-top: ($base-point-grid * 2);
padding-left: ($base-point-grid * 2);

&::before {
content: "-";
}
}
}
}

.nav-stars {
Expand Down