@trimble-oss/modus-docs-hugo-theme 1.0.0-alpha11 → 1.0.0-alpha13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
+ }
@@ -1,3 +1,27 @@
1
1
  .col-sidebar {
2
2
  width: 64px !important;
3
3
  }
4
+
5
+ .col-sidebar .list-group {
6
+ height: calc(100dvh - 66px);
7
+ }
8
+
9
+ [data-bs-theme="light"] {
10
+ .col-sidebar a.btn:hover,
11
+ .col-sidebar button:hover {
12
+ background-color: #e0e1e9 !important;
13
+ }
14
+ }
15
+
16
+ [data-bs-theme="dark"] {
17
+ .col-sidebar a.btn:hover,
18
+ .col-sidebar button:hover {
19
+ background-color: #424649 !important;
20
+ }
21
+ }
22
+
23
+ .col-sidebar button.list-group-item {
24
+ height: 48px;
25
+ margin-left: 6px;
26
+ width: 48px;
27
+ }
@@ -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
  }
@@ -7,3 +7,21 @@ html[data-bs-theme="dark"] {
7
7
  .navbar-site-title {
8
8
  margin-top: 12px;
9
9
  }
10
+
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;
27
+ }
@@ -40,7 +40,7 @@ h6 {
40
40
  }
41
41
 
42
42
  // underline links
43
- main a {
43
+ main a:not([class], li.breadcrumb-item a) {
44
44
  text-decoration: underline;
45
45
  }
46
46
 
@@ -62,5 +62,5 @@ code {
62
62
  }
63
63
 
64
64
  main {
65
- min-height: calc(100vh - 418px);
65
+ min-height: calc(100vh - 340px);
66
66
  }
@@ -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 class="">
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" data-bs-toggle="collapse"
37
- data-bs-target="#flush-collapse-{{- $group.title | urlize -}}" aria-expanded="false"
38
- aria-controls="flush-collapse-{{- $group.title | urlize -}}">
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 }} show{{ end }} {{ if site.Params.expandAllAccordions }}show{{- end -}}">
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,22 +1,21 @@
1
1
  <div
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
- style="height: calc(100dvh - 66px)">
2
+ class="list-group d-block border-0 text-center sticky-top sticky-offset d-flex flex-column align-items-start justify-content-between">
4
3
 
5
- <div class="text-center mx-auto w-100">
6
- <button class="btn btn-lg btn-outline-secondary bg-transparent list-group-item border-0 mt-1" type="button"
7
- data-bs-target="#sidebar" data-bs-toggle="collapse" aria-label="Expand Menu"
8
- style="width:48px; margin-left: 6px;">
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
+ data-bs-target="#sidebar" data-bs-toggle="collapse" aria-label="Expand Menu">
9
7
  <div class="text-body text-center">
10
8
  {{ partial "icons/modus-solid/user-guide.svg" (dict "class" "" "width" "24" "height" "24") }}
11
9
  </div>
12
- </button>
10
+ </button>-->
13
11
  </div>
14
12
 
15
13
  <div>
16
14
  {{- with .Site.Params.GitHubRepo -}}
17
- <a href="{{- . -}}" class="btn btn-lg btn-outline-secondary text-body bg-transparent btn-icon-only border-0 mx-1"
18
- target="_blank" rel="noopener" data-bs-toggle="tooltip" title="GitHub">
19
- {{ partial "icons/brands/github.svg" (dict "class" "mt-2" "width" "22" "height" "22") }}
15
+ <a href="{{- . -}}"
16
+ class="btn btn-lg btn-outline-secondary text-body bg-transparent btn-icon-only border-0 mx-1 p-1" target="_blank"
17
+ rel="noopener" data-bs-toggle="tooltip" title="GitHub">
18
+ {{ partial "icons/brands/github.svg" (dict "class" "mt-2" "width" "24" "height" "24") }}
20
19
  </a>
21
20
  {{ end }}
22
21
 
@@ -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" style="min-width:250px;z-index: 1030;">
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
  <search class="search-container d-inline-block position-relative" role="search">
2
2
  <input class="form-control form-control-search position-absolute" aria-label="Search" id="search-by" type="search"
3
3
  name="q" placeholder="Search..." autocomplete="off" title="" required>
4
- <label class="btn btn-lg btn-icon-only border-0 btn-search position-absolute px-1" for="search-by">
4
+ <label class="btn btn-lg btn-icon-only border-transparent btn-search position-absolute px-1" for="search-by">
5
5
  <i class="modus-icons notranslate text-white" aria-hidden="true">search</i>
6
6
  </label>
7
7
  </search>
@@ -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 border-0" type="button"
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 border-0"
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-alpha11",
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,20 +26,20 @@
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-alpha9",
29
+ "@trimble-oss/modus-bootstrap": "2.0.0-alpha12",
30
30
  "@trimble-oss/modus-icons": "1.7.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "autoprefixer": "10.4.16",
34
- "eslint": "8.52.0",
34
+ "eslint": "8.53.0",
35
35
  "eslint-config-prettier": "9.0.0",
36
36
  "htmlhint": "1.1.4",
37
- "hugo-bin": "0.115.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",
41
41
  "stylelint": "15.11.0",
42
- "stylelint-config-standard-scss": "11.0.0",
42
+ "stylelint-config-standard-scss": "11.1.0",
43
43
  "stylelint-order": "6.0.3"
44
44
  },
45
45
  "hugo-bin": {