Skip to content

Commit a134fec

Browse files
authored
style: prepare for theming (#426)
1 parent ee9d985 commit a134fec

File tree

9 files changed

+22
-16
lines changed

9 files changed

+22
-16
lines changed

assets/hb/modules/docs/scss/_content.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@
1414
h6 {
1515
margin-top: 0.5rem;
1616
}
17+
18+
:last-child {
19+
margin-bottom: 0;
20+
}
1721
}

layouts/docs/list.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{{- define "main" }}
22
<div class="hb-docs">
3-
<div class="hb-docs-sidebar hb-module" tabindex="-1" data-bs-hide="focusout">
3+
<div class="hb-docs-sidebar" tabindex="-1" data-bs-hide="focusout">
44
{{ partial "hb/modules/docs/nav" . }}
55
</div>
66
<div class="hb-docs-main col-12 col-xxl-10">
77
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-main-begin") }}
8-
<div class="hb-module">
9-
{{ partial "hb/modules/docs/section" . }}
10-
</div>
8+
{{ partial "hb/modules/docs/section" . }}
119
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-main-end") }}
1210
</div>
1311
</div>

layouts/docs/single.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{{- define "main" }}
22
<div class="hb-docs">
3-
<div class="hb-docs-sidebar hb-module" tabindex="-1" data-bs-hide="focusout">
3+
<div class="hb-docs-sidebar" tabindex="-1" data-bs-hide="focusout">
44
{{ partial "hb/modules/docs/nav" . }}
55
</div>
66
<div class="hb-docs-main">
77
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-main-begin") }}
8-
<div class="hb-docs-doc hb-module">
9-
<div class="hb-docs-doc-intro">
8+
<div class="hb-docs-doc">
9+
<div class="hb-docs-doc-intro hb-module">
1010
<h1 class="mb-3">{{ .Title }}</h1>
1111
<div class="hb-blog-post-meta hb-docs-doc-meta mb-3">
1212
{{- partial "hb/modules/docs/doc/meta" . }}

layouts/partials/hb/modules/docs/doc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-content-begin") }}
22
{{- $attributes := partial "hugopress/functions/render-attributes" (dict "Page" . "Name" "hb-docs-doc-content") }}
3-
<div class="hb-docs-doc-content mb-5"{{ with $attributes }} {{ . | safeHTMLAttr }}{{ end }}>
3+
<div class="hb-docs-doc-content hb-module"{{ with $attributes }} {{ . | safeHTMLAttr }}{{ end }}>
44
{{ .Content }}
55
</div>
66
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-content-end") }}

layouts/partials/hb/modules/docs/doc/comments.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- if default true .Params.comments }}
22
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-comments-begin") }}
3-
<div id="content-comments" class="hb-docs-doc-comments">
3+
<div id="content-comments" class="hb-docs-doc-comments hb-module">
44
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-comments") }}
55
</div>
66
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-comments-end") }}

layouts/partials/hb/modules/docs/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h5 class="offcanvas-title" id="hb-docs-nav-label">
1414
data-bs-target=".hb-docs-nav"></button>
1515
</div>
1616
<div class="offcanvas-body flex-column text-body-secondary">
17-
<ul class="hb-docs-nav-links list-unstyled">
17+
<ul class="hb-docs-nav-links list-unstyled hb-module">
1818
{{ template "walk-docs-tree" (dict "Tree" $tree "Page" .) }}
1919
</ul>
2020
</div>

layouts/partials/hb/modules/docs/section.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
<h1 class="hb-docs-doc-title mb-3">{{ .Title }}</h1>
2-
{{- with .Description }}
3-
<p class="lead">{{ . }}</p>
4-
{{- end }}
1+
<div class="hb-docs-doc-intro hb-module">
2+
<h1 class="hb-docs-doc-title mb-0">{{ .Title }}</h1>
3+
{{- with .Description }}
4+
<p class="lead mt-3">{{ . }}</p>
5+
{{- end }}
6+
</div>
57
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-content-begin") }}
6-
<div class="hb-docs-doc-content mb-5">
8+
<div class="hb-docs-doc-content hb-module">
79
{{ .Content }}
810
{{- if .Pages }}
911
<h2 class="mb-3">{{ i18n "in_this_section" }}</h2>

layouts/partials/hb/modules/docs/toc.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-toc-begin") }}
22
{{- if partial "base/functions/has-toc" . }}
3+
<div class="hb-module pb-1">
34
<div class="h6 d-none d-md-block">{{ i18n "on_this_page" }}</div>
45
<hr class="d-none d-md-block" />
56
<div class="d-grid d-block d-md-none mb-2">
@@ -17,5 +18,6 @@
1718
<div class="px-2 px-md-0">
1819
<div id="collapse-toc" class="collapse hb-docs-doc-toc-collapse">{{ .TableOfContents }}</div>
1920
</div>
21+
</div>
2022
{{- end }}
2123
{{ partial "hugopress/functions/render-hooks" (dict "Page" . "Name" "hb-docs-doc-toc-end") }}

modules/doc-nav/layouts/partials/hb/modules/docs-doc-nav/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{{- $justify = "justify-content-end" }}
2323
{{- end }}
2424
{{- $size := "1.5em" }}
25-
<ul class="hb-docs-doc-nav nav mb-3 {{ $justify }}">
25+
<ul class="hb-docs-doc-nav nav hb-module {{ $justify }}">
2626
{{ with $prev }}
2727
<li class="nav-item my-1">
2828
<a

0 commit comments

Comments
 (0)