This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dropdowns for different versions selection (#99)
* Add versioning to docs 📚 * pass argument to haddock script * extract standalone-haddock! * Add dropdowns for different versions selection * Adjust dropdown arrow y position * Adjust button link-like similarity * Adjust nav links rhythm * Set back parameter on linuwial fixing Co-authored-by: Flavio Corpa <flavio.corpa@47deg.com>
- Loading branch information
Showing
11 changed files
with
202 additions
and
17 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: Version | ||
links: | ||
stable: https://higherkindness.io/mu-haskell/ | ||
next: https://higherkindness.io/mu-haskell/wip | ||
|
||
- name: API Docs | ||
links: | ||
stable: https://higherkindness.io/mu-haskell/haddock | ||
next: https://higherkindness.io/mu-haskell/wip/haddock |
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div id="{{ include.item.name | downcase | replace: ' ', '-' }}-dropdown" class="link-item"> | ||
|
||
<button class="button link-like strong" onclick="openDropdown(event)" title="{{ include.item.name }}"> | ||
{% if include.item.icon != "" %} | ||
<i class="nav-item-icon fa fa-lg {{ include.item.icon }}" aria-hidden="true"></i> | ||
<span class="nav-item-text">{{ include.item.name }}</span> | ||
{% else %} | ||
<span class="nav-item-text">{{ include.item.name }}</span> | ||
{% endif %} | ||
</button> | ||
|
||
<ul class="dropdown dropdown-content"> | ||
{% for link in include.item.links %} | ||
<li class="dropdown-item"> | ||
<a class="dropdown-item-link" title="{{ link[0] | capitalize }}" href="{{ link[1] }}" target="_blank" rel="noopener noreferrer"> | ||
<span> | ||
{{ link[0] | capitalize }} | ||
</span> | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
</div> |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
div[id$='-dropdown'] { | ||
position: relative; | ||
|
||
.dropdown { | ||
display: block; | ||
outline: 0; | ||
width: 100%; | ||
|
||
a { | ||
&:hover { | ||
background: lighten($gray-primary, 10%); | ||
} | ||
} | ||
} | ||
|
||
.link-like::after { | ||
content: ""; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
height: 150%; | ||
width: 100%; | ||
background-image: url("../img/arrow-down.svg"); | ||
background-repeat: no-repeat; | ||
background-position-x: 100%; | ||
background-position-y: 25%; | ||
background-size: 0.8em; | ||
transition: background-position 0.1s ease; | ||
|
||
&:hover, | ||
&:active, | ||
&:focus { | ||
&::after { | ||
background-position-y: 60%; | ||
} | ||
} | ||
} | ||
|
||
ul { | ||
list-style: none; | ||
padding-left: 0; | ||
} | ||
|
||
/* Documentation Dropdown Content (Hidden by Default) */ | ||
.dropdown-content { | ||
font-size: 0.8rem; | ||
position: absolute; | ||
overflow: auto; | ||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2); | ||
z-index: 1; | ||
background: lighten($gray-primary, 5%); | ||
opacity: 0.5; | ||
transform: rotate3d(1, 0, 0, 90deg); | ||
transition: transform ease 250ms, opacity ease 100ms; | ||
transform-origin: top; | ||
margin-top: 6px; | ||
text-align: center; | ||
|
||
.dropdown-item { | ||
width: 100%; | ||
|
||
.dropdown-item-link { | ||
padding: 12px 9px; | ||
text-decoration: none; | ||
display: block; | ||
border-radius: 0; | ||
color: $white; | ||
} | ||
} | ||
} | ||
|
||
/* Show the documentation dropdown menu (use JS to add this class | ||
to the .dropdown-content container when the user clicks on | ||
the dropdown button) */ | ||
.show { | ||
transform: rotate3d(1, 0, 0, 0); | ||
opacity: 1; | ||
} | ||
} |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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