Skip to content

Commit 561b0ab

Browse files
Include toolbar and sidebar in the main layout
1 parent fbb0605 commit 561b0ab

File tree

7 files changed

+211
-236
lines changed

7 files changed

+211
-236
lines changed

doc-tool/resources/_layouts/api-page.html

Lines changed: 158 additions & 166 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
11
---
22
layout: main
3-
extraCSS:
4-
- css/toolbar.css
5-
- css/sidebar.css
63
---
4+
<main>
5+
<div id="post-title">
6+
<h3 id="post-date">
7+
{{ page.date | date: '%B %d, %Y' }}
8+
</h3>
9+
<h1 id="main-title">{{ page.title }}</h1>
10+
{% if page.subTitle %}
11+
<h2 id="sub-title">{{ page.subTitle }}</h2>
12+
{% endif %}
13+
</div>
714

8-
{% include "toolbar" %}
9-
{% include "sidebar" %}
10-
11-
<div id="content-wrapper">
12-
<div id="content-body" class="doc-page-body">
13-
<div id="post-title">
14-
<h3 id="post-date">
15-
{{ page.date | date: '%B %d, %Y' }}
16-
</h3>
17-
<h1 id="main-title">{{ page.title }}</h1>
18-
{% if page.subTitle %}
19-
<h2 id="sub-title">{{ page.subTitle }}</h2>
20-
{% endif %}
21-
</div>
22-
23-
<div id="blog-post-container">
24-
{{ content }}
25-
</div>
15+
<div id="blog-post-container">
16+
{{ content }}
17+
</div>
2618

27-
{% if page.author %}
28-
<div id="post-footer">
29-
{% if page.authorImg %}
30-
<img id="author-image" src="{{ site.baseurl }}/{{ page.authorImg }}">
31-
{% endif %}
32-
<span id="post-author">
33-
{% if page.authorImg == null %}- {% endif %}{{ page.author }}
34-
</span>
35-
</div>
19+
{% if page.author %}
20+
<div id="post-footer">
21+
{% if page.authorImg %}
22+
<img id="author-image" src="{{ site.baseurl }}/{{ page.authorImg }}">
3623
{% endif %}
24+
<span id="post-author">
25+
{% if page.authorImg == null %}- {% endif %}{{ page.author }}
26+
</span>
27+
</div>
28+
{% endif %}
3729

38-
</div><!-- end content-body -->
39-
</div><!-- end content-wrapper -->
30+
</main>
Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
---
22
layout: main
33
extraCSS:
4-
- css/sidebar.css
5-
- css/toolbar.css
64
- css/api-page.css
75
---
8-
9-
{% include "toolbar" %}
10-
{% include "sidebar" %}
11-
12-
<div id="content-wrapper">
13-
<div id="content-body" class="doc-page-body">
14-
<h1 id="doc-page-title">{{ page.title }}</h1>
15-
<a id="edit-on-github" href="{{ site.projectUrl }}/edit/master/{{ site.root }}/{{ page.url }}">
16-
Edit this page on GitHub
17-
</a>
18-
<hr/>
19-
<div id="doc-page-container">
20-
{{ content }}
21-
</div>
22-
</div><!-- end content-body -->
23-
</div><!-- end content-wrapper -->
6+
<main>
7+
<h1 id="doc-page-title">{{ page.title }}</h1>
8+
<a id="edit-on-github" href="{{ site.projectUrl }}/edit/master/{{ site.root }}/{{ page.url }}">
9+
Edit this page on GitHub
10+
</a>
11+
<hr/>
12+
<div id="doc-page-container">
13+
{{ content }}
14+
</div>
15+
</main>

doc-tool/resources/_layouts/main.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
href="{{ site.baseurl }}/css/dottydoc.css"
2626
>
2727

28+
<link
29+
rel="stylesheet"
30+
href="{{ site.baseurl }}/css/toolbar.css"
31+
>
32+
33+
<link
34+
rel="stylesheet"
35+
href="{{ site.baseurl }}/css/sidebar.css"
36+
>
37+
2838
<link
2939
rel="stylesheet"
3040
href="{{ site.baseurl }}/css/color-brewer.css"
@@ -40,13 +50,16 @@
4050
<script src="{{ site.baseurl }}/js/jquery.min.js"></script>
4151
</head>
4252
<body>
43-
44-
{{ content }}
53+
{% include "toolbar" %}
54+
{% include "sidebar" %}
55+
<div id="content-wrapper">
56+
{{ content }}
57+
</div>
4558

4659
<script src="{{ site.baseurl }}/js/highlight.pack.js"></script>
4760
<script src="{{ site.baseurl }}/js/bootstrap.min.js"></script>
4861
{% for js in page.extraJS %}
49-
<script src="{{ site.baseurl }}/{{ js }}"></script>
62+
<script src="{{ site.baseurl }}/{{ js }}"></script>
5063
{% endfor %}
5164
<script src="{{ site.baseurl }}/js/dottydoc.js"></script>
5265
<script>

doc-tool/resources/_layouts/search.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
layout: main
33
title: Search
44
extraCSS:
5-
- css/toolbar.css
65
- css/search.css
76
---
8-
9-
{% include "toolbar" %}
10-
117
<div id="back-container">
128
<span>
139
<a id="back-anchor" href="">Back</a>

doc-tool/resources/css/sidebar.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@
126126
.sidebar.toggled {
127127
margin-left: -320px;
128128
}
129-
div#content-body {
129+
#content-wrapper {
130130
margin-left: 320px !important;
131131
transition: margin .25s ease-out;
132132
}
133-
.sidebar.toggled ~ div div#content-body {
133+
.sidebar.toggled ~ #content-wrapper {
134134
margin-left: 0 !important;
135135
}
136136
}

docs/blog/index.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
---
22
layout: main
3-
extraCSS:
4-
- css/toolbar.css
5-
- css/sidebar.css
63
title: Blog
74
---
8-
9-
{% include "toolbar" %}
10-
11-
<div id="content-wrapper">
12-
{% assign sidebarTop = "75px" %}
13-
{% include "sidebar" %}
14-
5+
<main>
156
<div id="content-body" class="doc-page-body">
167
<div id="post-title">
178
<h1 id="main-title">{{ page.title }}</h1>
@@ -50,4 +41,4 @@ <h2 id="sub-title">{{ page.subTitle }}</h2>
5041
{% endif %}
5142

5243
</div><!-- end content-body -->
53-
</div><!-- end content-wrapper -->
44+
</main>

0 commit comments

Comments
 (0)