Skip to content

Commit 6b3ae9f

Browse files
mschwrdtnrMax Schwerdtner
andauthored
docs: fix nax style issues (#756)
Co-authored-by: Max Schwerdtner <max.schwerdtner@t-systems.com>
1 parent 2344da7 commit 6b3ae9f

File tree

1 file changed

+151
-75
lines changed

1 file changed

+151
-75
lines changed

docs/_layouts/default.html

Lines changed: 151 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,170 @@
1+
---
2+
layout: table_wrappers
3+
---
4+
15
<!DOCTYPE html>
26

3-
<html lang="{{ site.lang | default: "en-US" }}">
4-
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
7+
<html lang="{{ site.lang | default: 'en-US' }}">
58
{% include head.html %}
69
<body>
10+
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11+
<symbol id="svg-link" viewBox="0 0 24 24">
12+
<title>Link</title>
13+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
14+
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
15+
</svg>
16+
</symbol>
17+
<symbol id="svg-search" viewBox="0 0 24 24">
18+
<title>Search</title>
19+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
20+
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
21+
</svg>
22+
</symbol>
23+
<symbol id="svg-menu" viewBox="0 0 24 24">
24+
<title>Menu</title>
25+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
26+
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
27+
</svg>
28+
</symbol>
29+
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
30+
<title>Expand</title>
31+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
32+
<polyline points="9 18 15 12 9 6"></polyline>
33+
</svg>
34+
</symbol>
35+
<symbol id="svg-doc" viewBox="0 0 24 24">
36+
<title>Document</title>
37+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
38+
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
39+
</svg>
40+
</symbol>
41+
</svg>
742

8-
<div class="page-wrap">
9-
<div class="side-bar">
10-
<div class="site-header">
11-
<a href="{{ site.url }}{{ site.baseurl }}" class="site-title lh-tight">{% include title.html %}</a>
12-
<button class="menu-button fs-3 js-main-nav-trigger" data-text-toggle="Hide" type="button">Menu</button>
13-
</div>
14-
15-
<div class="navigation main-nav js-main-nav">
16-
{% include nav.html %}
17-
</div>
18-
<footer class="site-footer">
19-
<h3>Found a mistake? Edit on <a target="_blank" href="https://github.com/T-Systems-MMS/phonebook/blob/master/docs/{{page.dir}}{{page.name}}">Github <i class="fa fa-github"></i></a></i></h3>
20-
<p class="text-small text-grey-dk-000 mb-4">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
21-
</footer>
43+
<div class="side-bar">
44+
<div class="site-header">
45+
<a href="{{ '/' | absolute_url }}" class="site-title lh-tight">{% include title.html %}</a>
46+
<a href="#" id="menu-button" class="site-button">
47+
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
48+
</a>
2249
</div>
23-
<div class="main-content-wrap js-main-content" tabindex="0">
24-
<div class="main-content">
25-
<div class="page-header js-page-header">
26-
{% if site.search_enabled != false %}
27-
<div class="search">
28-
<div class="search-input-wrap">
29-
<input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
30-
<svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
31-
</div>
32-
<div class="js-search-results search-results-wrap"></div>
50+
<nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
51+
{% include nav.html %}
52+
</nav>
53+
<footer class="site-footer">
54+
<h3>Found a mistake? Edit on <a target="_blank" href="https://github.com/T-Systems-MMS/phonebook/blob/master/docs/{{page.dir}}{{page.name}}">Github <i class="fa fa-github"></i></a></i></h3>
55+
This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
56+
</footer>
57+
</div>
58+
<div class="main" id="top">
59+
<div id="main-header" class="main-header">
60+
{% if site.search_enabled != false %}
61+
<div class="search">
62+
<div class="search-input-wrap">
63+
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
64+
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
3365
</div>
34-
{% endif %}
35-
{% if site.aux_links != nil %}
36-
<ul class="list-style-none text-small aux-nav">
37-
{% for link in site.aux_links %}
38-
<li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li>
39-
{% endfor %}
40-
</ul>
41-
{% endif %}
66+
<div id="search-results" class="search-results"></div>
4267
</div>
43-
<div class="page">
44-
{% unless page.url == "/" %}
45-
{% if page.parent %}
46-
<nav class="breadcrumb-nav">
47-
<ol class="breadcrumb-nav-list">
48-
{% if page.grand_parent %}
49-
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
50-
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
51-
{% else %}
52-
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
68+
{% endif %}
69+
{% if site.aux_links %}
70+
<nav aria-label="Auxiliary" class="aux-nav">
71+
<ul class="aux-nav-list">
72+
{% for link in site.aux_links %}
73+
<li class="aux-nav-list-item">
74+
<a href="{{ link.last }}" class="site-button"
75+
{% if site.aux_links_new_tab %}
76+
target="_blank" rel="noopener noreferrer"
5377
{% endif %}
54-
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
55-
</ol>
56-
</nav>
78+
>
79+
{{ link.first }}
80+
</a>
81+
</li>
82+
{% endfor %}
83+
</ul>
84+
</nav>
85+
{% endif %}
86+
</div>
87+
<div id="main-content-wrap" class="main-content-wrap">
88+
{% unless page.url == "/" %}
89+
{% if page.parent %}
90+
<nav aria-label="Breadcrumb" class="breadcrumb-nav">
91+
<ol class="breadcrumb-nav-list">
92+
{% if page.grand_parent %}
93+
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.grand_parent }}</a></li>
94+
<li class="breadcrumb-nav-list-item"><a href="{{ second_level_url }}">{{ page.parent }}</a></li>
95+
{% else %}
96+
<li class="breadcrumb-nav-list-item"><a href="{{ first_level_url }}">{{ page.parent }}</a></li>
97+
{% endif %}
98+
<li class="breadcrumb-nav-list-item"><span>{{ page.title }}</span></li>
99+
</ol>
100+
</nav>
101+
{% endif %}
102+
{% endunless %}
103+
<div id="main-content" class="main-content" role="main">
104+
{% if site.heading_anchors != false %}
105+
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" %}
106+
{% else %}
107+
{{ content }}
108+
{% endif %}
109+
110+
{% if page.has_children == true and page.has_toc != false %}
111+
<hr>
112+
<h2 class="text-delta">Table of contents</h2>
113+
<ul>
114+
{%- assign children_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
115+
{% for child in children_list %}
116+
<li>
117+
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
118+
</li>
119+
{% endfor %}
120+
</ul>
121+
{% endif %}
122+
123+
{% if site.footer_content != nil or site.last_edit_timestamp or site.gh_edit_link %}
124+
<hr>
125+
<footer>
126+
{% if site.back_to_top %}
127+
<p><a href="#top" id="back-to-top">{{ site.back_to_top_text }}</a></p>
57128
{% endif %}
58-
{% endunless %}
59-
<div id="main-content" class="page-content" role="main">
60-
{% if site.heading_anchors != false %}
61-
{% include vendor/anchor_headings.html html=content beforeHeading = "true" anchorBody="<svg class=\"d-inline-block v-align-middle\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"18\" height=\"18\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>" anchorClass="anchor-heading" %}
62-
{% else %}
63-
{{ content }}
129+
{% if site.footer_content != nil %}
130+
<p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p>
64131
{% endif %}
65132

66-
{% if page.has_children == true and page.has_toc != false %}
67-
<hr>
68-
<h2 class="text-delta">Table of contents</h2>
69-
{% assign children_list = site.pages | sort:"nav_order" %}
70-
<ul>
71-
{% for child in children_list %}
72-
{% if child.parent == page.title and child.title != page.title %}
73-
<li>
74-
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>
75-
</li>
133+
{% if site.last_edit_timestamp or site.gh_edit_link %}
134+
<div class="d-flex mt-2">
135+
{% if site.last_edit_timestamp and site.last_edit_time_format and page.last_modified_date %}
136+
<p class="text-small text-grey-dk-000 mb-0 mr-2">
137+
Page last modified: <span class="d-inline-block">{{ page.last_modified_date | date: site.last_edit_time_format }}</span>.
138+
</p>
76139
{% endif %}
77-
{% endfor %}
78-
</ul>
79-
{% endif %}
80-
81-
{% if site.footer_content != nil %}
82-
<hr>
83-
<footer role="contentinfo">
84-
<p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p>
85-
</footer>
86-
{% endif %}
140+
{% if
141+
site.gh_edit_link and
142+
site.gh_edit_link_text and
143+
site.gh_edit_repository and
144+
site.gh_edit_branch and
145+
site.gh_edit_view_mode
146+
%}
147+
<p class="text-small text-grey-dk-000 mb-0">
148+
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
149+
</p>
150+
{% endif %}
151+
</div>
152+
{% endif %}
153+
</footer>
154+
{% endif %}
87155

88-
</div>
89156
</div>
90157
</div>
158+
159+
{% if site.search_enabled != false %}
160+
{% if site.search.button %}
161+
<a href="#" id="search-button" class="search-button">
162+
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-search"></use></svg>
163+
</a>
164+
{% endif %}
165+
166+
<div class="search-overlay"></div>
167+
{% endif %}
91168
</div>
92169
<script src="/phonebook/assets/js/mermaid.8.5.0.js"></script>
93170
<script>
@@ -102,6 +179,5 @@ <h2 class="text-delta">Table of contents</h2>
102179
mermaid.initialize(config);
103180
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
104181
</script>
105-
106182
</body>
107183
</html>

0 commit comments

Comments
 (0)