@trimble-oss/modus-docs-hugo-theme 1.0.0-alpha2 → 1.0.0-alpha4

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.
@@ -14,6 +14,11 @@ h5:hover .header-link {
14
14
  transition: 0.3s all;
15
15
  }
16
16
 
17
+ .header-link:focus-visible {
18
+ opacity: 1;
19
+ pointer-events: visible;
20
+ }
21
+
17
22
  // title of article shouldn't have margin-top
18
23
  main article h2.h1:first-of-type {
19
24
  margin-top: 0 !important;
@@ -7,6 +7,7 @@
7
7
 
8
8
  <body data-url="{{ .RelPermalink }}" class="overflow-x-hidden {{ with .Page.Params.body_class -}}{{ . -}}{{- end -}}"
9
9
  {{ if not .Params.disableScrollSpy }}{{- end -}}>
10
+ {{ partial "skippy" . }}
10
11
  {{ if not .Params.NavbarFalse }}{{ partial "navbar" . }}{{ end }}
11
12
  {{ block "body" . }}{{ block "main" . }}
12
13
  {{- end -}}
@@ -36,6 +37,8 @@
36
37
  const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
37
38
  const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
38
39
  </script>
40
+
41
+ {{- if not .IsHome -}}
39
42
  <script>
40
43
  // Disable all links with #
41
44
  var links = document.querySelectorAll('a[href="#"]');
@@ -47,7 +50,6 @@
47
50
  });
48
51
  });
49
52
  </script>
50
- {{- if not .IsHome -}}
51
53
  <script>
52
54
  // Change Submit buttons within docs examples to type=button
53
55
  var article = document.querySelector('article');
@@ -62,4 +64,4 @@
62
64
  {{- end -}}
63
65
  </body>
64
66
 
65
- </html>
67
+ </html>
@@ -1,9 +1,12 @@
1
1
  {{- if not .Site.IsServer -}}
2
2
 
3
- <!--
4
- <script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
3
+ {{ template "_internal/google_analytics.html" . }}
4
+
5
+ {{- with .Site.Params.PlausibleAnalyticsDomain -}}
6
+ <script defer data-domain="{{- . -}}" src="https://plausible.io/js/script.outbound-links.js"></script>
5
7
  <script>
6
8
  window.plausible = window.plausible || function () { (window.plausible.q = window.plausible.q || []).push(arguments) }
7
9
  </script>
8
- -->
10
+ {{- end -}}
11
+
9
12
  {{- end -}}
@@ -1,5 +1,6 @@
1
- <button class="btn btn-lg btn-icon-only theme-toggle pt-0 border-0 mx-1" id="theme-toggle" title="Toggles light & dark"
2
- aria-label="auto" aria-live="polite" type="button" data-bs-toggle="tooltip" data-bs-placement="right">
1
+ <button class="btn btn-lg btn-icon-only btn-outline-secondary bg-transparent theme-toggle pt-0 border-0 mx-1"
2
+ id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button"
3
+ data-bs-toggle="tooltip" data-bs-placement="right">
3
4
  <svg class="sun-and-moon" aria-hidden="true" width="22" height="22" viewBox="0 0 24 24">
4
5
  <mask class="moon" id="moon-mask">
5
6
  <rect x="0" y="0" width="100%" height="100%" fill="#fff" />
@@ -2,19 +2,22 @@
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
  style="height: calc(100dvh - 66px)">
4
4
 
5
- <button class="list-group-item border-0 mt-2" type="button" data-bs-target="#sidebar" data-bs-toggle="collapse"
6
- aria-label="Expand Menu">
7
- <div class="ms-1 text-body">
8
- <svg width="24" height="24" fill="currentColor">
9
- <use xlink:href="/modus-icons.svg#user-guide" />
10
- </svg>
11
- </div>
12
- </button>
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;">
9
+ <div class="text-body text-center">
10
+ <svg width="24" height="24" fill="currentColor">
11
+ <use xlink:href="/modus-icons.svg#user-guide" />
12
+ </svg>
13
+ </div>
14
+ </button>
15
+ </div>
13
16
 
14
17
  <div>
15
18
  {{- with .Site.Params.GitHubRepo -}}
16
- <a href="{{- . -}}" class="btn btn-lg btn-icon-only border-0 mx-1" target="_blank" rel="noopener"
17
- data-bs-toggle="tooltip" title="GitHub">
19
+ <a href="{{- . -}}" class="btn btn-lg btn-outline-secondary bg-transparent btn-icon-only border-0 mx-1"
20
+ target="_blank" rel="noopener" data-bs-toggle="tooltip" title="GitHub">
18
21
  {{ partial "icons/brands/github.svg" (dict "class" "mt-2" "width" "22" "height" "22") }}
19
22
  </a>
20
23
  {{ end }}
@@ -22,4 +25,4 @@
22
25
  {{ partial "btn-theme-toggle" . }}
23
26
  </div>
24
27
 
25
- </div>
28
+ </div>
@@ -14,8 +14,8 @@
14
14
  <link rel="stylesheet" href="{{ $styles.RelPermalink }}?v{{ hugo.Version }}">
15
15
 
16
16
  <!-- Load jQuery from CDN with fallback -->
17
- <script src="https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>
18
- <script>window.jQuery || document.write('<script src="https://code.jquery.com/jquery-3.7.0.min.js"><\/script>');</script>
17
+ <script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
18
+ <script>window.jQuery || document.write('<script src="https://code.jquery.com/jquery-3.7.1.min.js"><\/script>');</script>
19
19
  <link rel="stylesheet" href="{{- .Site.BaseURL -}}fonts/modus-icons.css">
20
20
 
21
21
  <!-- Loads Dark Mode Toggle JS -->
@@ -78,4 +78,6 @@
78
78
  <!-- Loads Bootstrap 5 JS from CDN -->
79
79
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js"></script>
80
80
 
81
- {{ partial "custom-header" . }}
81
+ {{ partial "analytics" . }}
82
+
83
+ {{ partial "custom-header" . }}
@@ -1,8 +1,8 @@
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-icon-only d-inline-block border-0" type="button" aria-label="Menu"
5
- data-bs-target="#sidebar" data-bs-toggle="collapse">
4
+ <button class="btn btn-lg btn-primary btn-icon-only bg-transparent d-inline-block border-0" type="button"
5
+ aria-label="Menu" data-bs-target="#sidebar" data-bs-toggle="collapse">
6
6
  <i class="modus-icons menu-btn notranslate mt-1 text-white" aria-hidden="true">menu</i>
7
7
  </button>
8
8
  <a class="navbar-brand text-primary" href="/">
@@ -10,6 +10,11 @@
10
10
  class="img-fluid d-none d-sm-inline-block" alt="home" />
11
11
  <img src="https://modus-bootstrap.trimble.com/img/trimble-icon-rev.svg"
12
12
  class="d-inline-block d-sm-none px-1 mt-1" height="25" width="25" alt="home" />
13
+ {{- if .Site.Params.Title -}}
14
+ <div class="float-end text-white h2 d-none d-md-inline-block" style="margin-top: 12px;">
15
+ {{- .Site.Title -}}
16
+ </div>
17
+ {{- end -}}
13
18
  </a>
14
19
  </div>
15
20
 
@@ -18,8 +23,8 @@
18
23
  {{ partial "navbar-search" . }}
19
24
 
20
25
  <div class="dropdown">
21
- <button type="button" class="btn btn-lg btn-icon-only border-0" data-bs-toggle="dropdown" aria-expanded="false"
22
- aria-label="Menu">
26
+ <button type="button" class="btn btn-lg btn-primary bg-transparent btn-icon-only border-0"
27
+ data-bs-toggle="dropdown" aria-expanded="false" aria-label="Menu">
23
28
  <i class="modus-icons notranslate mt-2 text-white" aria-hidden="true">apps</i>
24
29
  </button>
25
30
 
@@ -28,4 +33,4 @@
28
33
  </div>
29
34
  </div>
30
35
  </div>
31
- </nav>
36
+ </nav>
@@ -1,11 +1,11 @@
1
- <div class="skippy overflow-hidden">
2
- <div class="text-center w-100" >
3
- <a class="sr-only sr-only-focusable btn btn-primary rounded p-1 m-2" href="#main">Skip to
1
+ <div class="skippy visually-hidden-focusable overflow-hidden">
2
+ <div class="text-center w-100">
3
+ <a class="sr-only btn btn-primary rounded p-1 m-2" href="#main">Skip to
4
4
  main content</a>
5
5
 
6
6
  {{ if (eq .Page.Layout "docs") }}
7
- <a class="sr-only sr-only-focusable d-none d-md-inline-flex p-1 mb-1" href="#bd-docs-nav">Skip to docs
7
+ <a class="sr-only d-none d-md-inline-flex p-1 mb-1" href="#bd-docs-nav">Skip to docs
8
8
  navigation</a>
9
9
  {{- end }}
10
10
  </div>
11
- </div>
11
+ </div>
@@ -1,10 +1,12 @@
1
1
  <div class="d-none small p-2 feedback mt-2">
2
2
  <div class="mt-2 mb-1">Was this page helpful?</div>
3
- <button type="button" class="btn btn-light btn-outline btn-feedback btn-feedback-helpful border rounded p-1 me-2"
3
+ <button type="button"
4
+ class="btn btn-light btn-outline-secondary btn-feedback btn-feedback-helpful border rounded p-1 me-2"
4
5
  aria-label="Helpful">
5
6
  {{- partial "icons/modus-outlined/thumbs-up.svg" (dict "width" "22" "height" "22" "class" "mx-2 mx-auto text-primary") -}}
6
7
  </button>
7
- <button type="button" class="btn btn-light btn-outline btn-feedback btn-feedback-not-helpful border rounded p-1"
8
+ <button type="button"
9
+ class="btn btn-light btn-outline-secondary btn-feedback btn-feedback-not-helpful border rounded p-1"
8
10
  aria-label="Not Helpful">
9
11
  {{- partial "icons/modus-outlined/thumbs-down.svg" (dict "width" "22" "height" "22" "class" "mx-2 mx-auto text-primary") -}}
10
12
  </button>
@@ -16,4 +18,4 @@
16
18
 
17
19
  <div class="small ml-2 d-none feedback-not-helpful">
18
20
  <a href="" rel="nofollow" target="_blank">Please, provide feedback about how we can improve the page</a>. Thank you!
19
- </div>
21
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trimble-oss/modus-docs-hugo-theme",
3
- "version": "1.0.0-alpha2",
3
+ "version": "1.0.0-alpha4",
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": {
@@ -29,15 +29,15 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "autoprefixer": "10.4.15",
32
- "eslint": "^8.47.0",
32
+ "eslint": "^8.48.0",
33
33
  "eslint-config-prettier": "^9.0.0",
34
34
  "htmlhint": "1.1.4",
35
- "hugo-bin": "0.113.0",
36
- "postcss": "8.4.28",
35
+ "hugo-bin": "0.114.2",
36
+ "postcss": "8.4.29",
37
37
  "postcss-cli": "10.1.0",
38
- "prettier": "3.0.2",
38
+ "prettier": "3.0.3",
39
39
  "stylelint": "15.10.3",
40
- "stylelint-config-standard-scss": "10.0.0"
40
+ "stylelint-config-standard-scss": "11.0.0"
41
41
  },
42
42
  "hugo-bin": {
43
43
  "buildTags": "extended"