-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Refactor docs page into base layout; new nav
(WIP #54)
- Loading branch information
1 parent
72c5aaf
commit 6022bb2
Showing
7 changed files
with
402 additions
and
413 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 |
---|---|---|
@@ -1,61 +0,0 @@ | ||
{% assign nav = page.navigation | default: layout.navigation %} | ||
{% assign num_nav_sections = nav.sections | size %} | ||
|
||
{% for item in nav.items %} | ||
{% assign topmost_item = item %} | ||
|
||
{% if page.url == item.path %} | ||
{% assign selected_item = item %} | ||
{% assign selected_section = item %} | ||
{% endif %} | ||
|
||
{% if item.items %} | ||
{% for item in item.items %} | ||
{% if page.url == item.path %} | ||
{% assign selected_item = item %} | ||
{% assign selected_section = topmost_item %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
<section class="documentation {{ page.html-class }}"> | ||
<nav class="docs-nav"> | ||
<header class="sidebar-header"> | ||
<h3 class="title"> | ||
<a href="javascript: void 0;"> | ||
{{ include.header_main }}{% if selected_section %}: {{ selected_section.title }}{% endif %} | ||
</a> | ||
</h3> | ||
|
||
{% if include.header_side %} | ||
<span class="section-title"> | ||
→ {{ include.header_side|replace: " ", " " }} | ||
</span> | ||
{% endif %} | ||
</header> | ||
|
||
<ul class="nav-items"> | ||
{% for item in nav.items %} | ||
{% include _nav-item.html selected_item=selected_item item=item %} | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
|
||
<article> | ||
<header> | ||
<div class="title"> | ||
<h1 class="text">{{ page.article_header_title | default: page.title }}</h1> | ||
</div> | ||
|
||
<div> | ||
<h3 class="lead">{{ page.description }}</h3> | ||
</div> | ||
</header> | ||
|
||
<div class="body"> | ||
{{ content }} | ||
</div> | ||
|
||
</article> | ||
</section> | ||
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,74 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
{% assign nav = page.navigation | default: layout.navigation %} | ||
{% assign num_nav_sections = nav.sections | size %} | ||
|
||
{% for item in nav.items %} | ||
{% assign topmost_item = item %} | ||
|
||
{% if page.url == item.path %} | ||
{% assign selected_item = item %} | ||
{% assign selected_section = item %} | ||
{% endif %} | ||
|
||
{% if item.items %} | ||
{% for item in item.items %} | ||
{% if page.url == item.path %} | ||
{% assign selected_item = item %} | ||
{% assign selected_section = topmost_item %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
|
||
<header class="documentation-header"> | ||
{% if page.title %} | ||
<span class="section-title"> | ||
{{ page.title|replace: " ", " " }} | ||
</span> | ||
{% endif %} | ||
|
||
<div class="nav-header"> | ||
<h3 class="title"> | ||
<a href="javascript: void 0;"> | ||
{{ layout.docs_title }}{% if selected_section %}: {{ selected_section.title }}{% endif %} | ||
</a> | ||
</h3> | ||
|
||
<span class="nav-toggle-icon"> | ||
<i class="open far fa-ellipsis-v"></i> | ||
<i class="close far fa-times"></i> | ||
</span> | ||
</div> | ||
</header> | ||
|
||
|
||
<section class="documentation {{ page.html-class }}"> | ||
<nav class="docs-nav"> | ||
<ul class="nav-items"> | ||
{% for item in nav.items %} | ||
{% include _nav-item.html selected_item=selected_item item=item %} | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
|
||
<article> | ||
<header> | ||
<div class="title"> | ||
<h1 class="text">{{ page.article_header_title | default: page.title }}</h1> | ||
</div> | ||
|
||
<div> | ||
<h3 class="lead">{{ page.description }}</h3> | ||
</div> | ||
</header> | ||
|
||
<div class="body"> | ||
{{ content }} | ||
</div> | ||
|
||
</article> | ||
</section> |
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
Oops, something went wrong.