@trimble-oss/modus-docs-hugo-theme 1.0.0-alpha12 → 1.0.0-alpha13
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/css/_article.scss +10 -4
- package/assets/css/_navbar.scss +17 -6
- package/assets/css/modus-docs.scss +1 -1
- package/layouts/partials/col-sidebar-menu.html +21 -5
- package/layouts/partials/col-sidebar.html +3 -3
- package/layouts/partials/header.html +11 -0
- package/layouts/partials/navbar-dropdown.html +2 -2
- package/layouts/partials/navbar.html +2 -2
- package/package.json +3 -3
package/assets/css/_article.scss
CHANGED
@@ -60,6 +60,10 @@ article h3:target::before {
|
|
60
60
|
visibility: hidden;
|
61
61
|
}
|
62
62
|
|
63
|
+
#main {
|
64
|
+
max-width: 1090px;
|
65
|
+
}
|
66
|
+
|
63
67
|
#main::before {
|
64
68
|
content: " ";
|
65
69
|
display: block;
|
@@ -81,10 +85,6 @@ a.header-link::after {
|
|
81
85
|
min-width: 20px;
|
82
86
|
}
|
83
87
|
|
84
|
-
#main {
|
85
|
-
max-width: 1090px;
|
86
|
-
}
|
87
|
-
|
88
88
|
.docs-callout {
|
89
89
|
border-left-width: 0.25rem !important;
|
90
90
|
border-radius: 0.25rem;
|
@@ -121,3 +121,9 @@ article .nav-tabs .nav-link::after {
|
|
121
121
|
article table {
|
122
122
|
width: 100%;
|
123
123
|
}
|
124
|
+
|
125
|
+
#sidebar.show + div {
|
126
|
+
max-width: calc(100vw - 321px - var(--scrollbar-width)) !important;
|
127
|
+
min-width: calc(100vw - 330px);
|
128
|
+
width: calc(100vw - 314px - var(--scrollbar-width));
|
129
|
+
}
|
package/assets/css/_navbar.scss
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
html[data-bs-theme="dark"] {
|
2
|
-
.dropdown-menu img {
|
2
|
+
nav.navbar-blue .dropdown-menu img {
|
3
3
|
filter: invert(1);
|
4
4
|
}
|
5
5
|
}
|
@@ -8,9 +8,20 @@ html[data-bs-theme="dark"] {
|
|
8
8
|
margin-top: 12px;
|
9
9
|
}
|
10
10
|
|
11
|
-
nav.navbar
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
nav.navbar-blue {
|
12
|
+
label.btn,
|
13
|
+
button.btn {
|
14
|
+
border-color: transparent !important;
|
15
|
+
|
16
|
+
&:hover {
|
17
|
+
background-color: #217cbb !important;
|
18
|
+
border: 1px solid #019aeb !important;
|
19
|
+
border-color: #019aeb;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
nav.navbar-blue .dropdown-menu {
|
25
|
+
min-width: 250px;
|
26
|
+
z-index: 1030;
|
16
27
|
}
|
@@ -11,9 +11,22 @@
|
|
11
11
|
div.classList.add('show');
|
12
12
|
}
|
13
13
|
</script>
|
14
|
+
{{ if site.Params.expandAllAccordions }}
|
15
|
+
<style>
|
16
|
+
.accordion-button {
|
17
|
+
pointer-events: none !important;
|
18
|
+
}
|
19
|
+
.accordion-button::after {
|
20
|
+
opacity: 0;
|
21
|
+
}
|
22
|
+
.accordion-button:hover {
|
23
|
+
background-color: transparent !important;
|
24
|
+
}
|
25
|
+
</style>
|
26
|
+
{{ end }}
|
14
27
|
|
15
28
|
<!-- https://github.com/twbs/bootstrap/blob/v5.3.2/site/layouts/partials/docs-sidebar.html -->
|
16
|
-
<div
|
29
|
+
<div>
|
17
30
|
{{- $url := split .Permalink "/" -}}
|
18
31
|
{{- $page_slug := index $url (sub (len $url) 2) -}}
|
19
32
|
|
@@ -33,9 +46,12 @@
|
|
33
46
|
{{- if $group.pages }}
|
34
47
|
<div class="accordion-item">
|
35
48
|
<h6 class="accordion-header">
|
36
|
-
<button class="accordion-button collapsed fs-5 ps-3 py-1 opacity-75" type="button"
|
37
|
-
|
38
|
-
|
49
|
+
<button class="accordion-button {{ if $is_active_group }}{{ else }}collapsed{{ end }} fs-5 ps-3 py-1 opacity-75" type="button"
|
50
|
+
{{ if not site.Params.expandAllAccordions }}
|
51
|
+
data-bs-toggle="collapse"
|
52
|
+
data-bs-target="#flush-collapse-{{- $group.title | urlize -}}"
|
53
|
+
aria-expanded="{{- if $is_active_group -}}true{{- else -}}false{{- end -}}"
|
54
|
+
aria-controls="flush-collapse-{{- $group.title | urlize -}}"{{end }}>
|
39
55
|
{{- if $group.icon }}
|
40
56
|
{{- end }}
|
41
57
|
{{ $group.title }}
|
@@ -43,7 +59,7 @@
|
|
43
59
|
</h6>
|
44
60
|
|
45
61
|
<div id="flush-collapse-{{- $group.title | urlize -}}"
|
46
|
-
class="accordion-collapse collapse {{ if $is_active_group }}
|
62
|
+
class="accordion-collapse collapse {{ if $is_active_group }}show{{ end }} {{ if site.Params.expandAllAccordions }}show{{- end -}}">
|
47
63
|
<div class="accordion-body py-1 bg-secondary bg-opacity-10">
|
48
64
|
<ul class="list-unstyled">
|
49
65
|
{{- range $doc := $group.pages -}}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div
|
2
2
|
class="list-group d-block border-0 text-center sticky-top sticky-offset d-flex flex-column align-items-start justify-content-between">
|
3
3
|
|
4
|
-
<div class="
|
5
|
-
|
4
|
+
<div class="mx-auto w-100">
|
5
|
+
<!--<button class="btn btn-lg btn-outline-secondary bg-transparent list-group-item border-0 mt-1 p-1 pt-0" type="button"
|
6
6
|
data-bs-target="#sidebar" data-bs-toggle="collapse" aria-label="Expand Menu">
|
7
7
|
<div class="text-body text-center">
|
8
8
|
{{ partial "icons/modus-solid/user-guide.svg" (dict "class" "" "width" "24" "height" "24") }}
|
9
9
|
</div>
|
10
|
-
</button
|
10
|
+
</button>-->
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div>
|
@@ -1,3 +1,14 @@
|
|
1
|
+
<script>
|
2
|
+
function _calculateScrollbarWidth() {
|
3
|
+
document.documentElement.style.setProperty('--scrollbar-width', (window.innerWidth - document.documentElement.clientWidth) + "px");
|
4
|
+
}
|
5
|
+
// recalculate on resize
|
6
|
+
window.addEventListener('resize', _calculateScrollbarWidth, false);
|
7
|
+
// recalculate on dom load
|
8
|
+
document.addEventListener('DOMContentLoaded', _calculateScrollbarWidth, false);
|
9
|
+
// recalculate on load (assets loaded as well)
|
10
|
+
window.addEventListener('load', _calculateScrollbarWidth);
|
11
|
+
</script>
|
1
12
|
<header class="pt-5 bg-secondary-subtle bg-opacity-10 border-bottom" {{- if (or (.Params.blog) (.Params.image)) -}}
|
2
13
|
style="background-image: url({{- .Params.Image | relURL -}});{{- with .Params.headerBgColor -}}background-color:{{- . -}} !important;{{- end -}};"
|
3
14
|
{{ end }}>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<ul class="dropdown-menu dropdown-menu-end mt-2 pb-0"
|
1
|
+
<ul class="dropdown-menu dropdown-menu-end mt-2 pb-0">
|
2
2
|
{{ with .Site.Data.navbar_apps }}
|
3
3
|
{{ range . }}
|
4
4
|
<li class="border-bottom">
|
@@ -20,4 +20,4 @@
|
|
20
20
|
</li>
|
21
21
|
{{ end }}
|
22
22
|
{{ end }}
|
23
|
-
</ul>
|
23
|
+
</ul>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<nav class="navbar shadow-sm navbar-blue sticky-top" aria-label="Main Navigation">
|
2
2
|
<div class="container-fluid">
|
3
3
|
<div>
|
4
|
-
<button class="btn btn-lg btn-primary btn-icon-only bg-transparent d-inline-block
|
4
|
+
<button class="btn btn-lg btn-primary btn-icon-only bg-transparent d-inline-block" type="button"
|
5
5
|
aria-label="Menu" data-bs-target="#sidebar" data-bs-toggle="collapse">
|
6
6
|
{{ partial "icons/modus-solid/menu.svg" (dict "class" "menu-btn text-white" "width" "24" "height" "24") }}
|
7
7
|
</button>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
{{ partial "navbar-search" . }}
|
23
23
|
|
24
24
|
<div class="dropdown">
|
25
|
-
<button type="button" class="btn btn-lg btn-primary bg-transparent btn-icon-only
|
25
|
+
<button type="button" class="btn btn-lg btn-primary bg-transparent btn-icon-only"
|
26
26
|
data-bs-toggle="dropdown" aria-expanded="false" aria-label="Menu">
|
27
27
|
<i class="modus-icons notranslate mt-2 text-white" aria-hidden="true">apps</i>
|
28
28
|
</button>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trimble-oss/modus-docs-hugo-theme",
|
3
|
-
"version": "1.0.0-
|
3
|
+
"version": "1.0.0-alpha13",
|
4
4
|
"description": "A Documentation theme for Hugo built by Trimble",
|
5
5
|
"homepage": "https://github.com/trimble-oss/modus-docs-hugo-theme",
|
6
6
|
"bugs": {
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"test": "npm run lint-css && npm run lint-html && npm run lint-js"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@trimble-oss/modus-bootstrap": "2.0.0-
|
29
|
+
"@trimble-oss/modus-bootstrap": "2.0.0-alpha12",
|
30
30
|
"@trimble-oss/modus-icons": "1.7.0"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"eslint": "8.53.0",
|
35
35
|
"eslint-config-prettier": "9.0.0",
|
36
36
|
"htmlhint": "1.1.4",
|
37
|
-
"hugo-bin": "0.
|
37
|
+
"hugo-bin": "0.116.4",
|
38
38
|
"postcss": "8.4.31",
|
39
39
|
"postcss-cli": "10.1.0",
|
40
40
|
"prettier": "3.0.3",
|