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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/README.md +5 -1
  2. package/assets/{styles → css}/_article.scss +21 -11
  3. package/assets/css/_col-sidebar.scss +27 -0
  4. package/assets/{styles → css}/_mobile.scss +3 -3
  5. package/assets/css/_navbar-search.scss +54 -0
  6. package/assets/css/_navbar.scss +27 -0
  7. package/assets/{styles → css}/_sidebar.scss +2 -2
  8. package/assets/{styles → css}/_skippy.scss +2 -2
  9. package/assets/css/_tables.scss +34 -0
  10. package/assets/{styles → css}/_was-this-page-helpful.scss +3 -3
  11. package/assets/{styles/styles.scss → css/modus-docs.scss} +4 -3
  12. package/assets/js/auto-complete.min.js +1 -1
  13. package/assets/js/search.min.js +1 -1
  14. package/assets/js/was-this-page-helpful.js +10 -3
  15. package/data/navbar_apps.yml +8 -4
  16. package/layouts/_default/_markup/render-heading.html +2 -2
  17. package/layouts/_default/_markup/render-link.html +3 -3
  18. package/layouts/_default/baseof.html +10 -4
  19. package/layouts/_default/home.html +13 -1
  20. package/layouts/_default/redirect.html +1 -1
  21. package/layouts/_default/single.html +4 -4
  22. package/layouts/index.json +1 -1
  23. package/layouts/partials/analytics.html +7 -4
  24. package/layouts/partials/blog-brief.html +4 -4
  25. package/layouts/partials/blog-share.html +6 -6
  26. package/layouts/partials/btn-theme-toggle.html +3 -2
  27. package/layouts/partials/col-sidebar-menu.html +22 -6
  28. package/layouts/partials/col-sidebar.html +15 -13
  29. package/layouts/partials/header.html +14 -3
  30. package/layouts/partials/icons/brands/codepen.svg +1 -1
  31. package/layouts/partials/icons/brands/facebook-square.svg +1 -1
  32. package/layouts/partials/icons/brands/github-alt.svg +1 -1
  33. package/layouts/partials/icons/brands/github.svg +1 -1
  34. package/layouts/partials/icons/brands/linkedin.svg +1 -1
  35. package/layouts/partials/icons/brands/vimeo-square.svg +1 -1
  36. package/layouts/partials/icons/modus-outlined/accessibility-circle.svg +1 -1
  37. package/layouts/partials/icons/modus-outlined/arrow-up.svg +1 -1
  38. package/layouts/partials/icons/modus-outlined/bar-graph-square.svg +1 -1
  39. package/layouts/partials/icons/modus-outlined/code.svg +3 -0
  40. package/layouts/partials/icons/modus-outlined/launch.svg +1 -1
  41. package/layouts/partials/icons/modus-outlined/menu.svg +1 -1
  42. package/layouts/partials/icons/modus-outlined/more-vertical.svg +1 -1
  43. package/layouts/partials/icons/modus-outlined/person-account.svg +1 -1
  44. package/layouts/partials/icons/modus-outlined/search.svg +1 -1
  45. package/layouts/partials/icons/modus-outlined/sync.svg +1 -1
  46. package/layouts/partials/icons/modus-outlined/thumbs-down.svg +1 -1
  47. package/layouts/partials/icons/modus-outlined/thumbs-up.svg +1 -1
  48. package/layouts/partials/icons/modus-outlined/web.svg +1 -1
  49. package/layouts/partials/icons/modus-solid/code.svg +3 -0
  50. package/layouts/partials/icons/modus-solid/email.svg +1 -1
  51. package/layouts/partials/icons/modus-solid/menu.svg +3 -0
  52. package/layouts/partials/icons/modus-solid/palette.svg +1 -1
  53. package/layouts/partials/icons/modus-solid/thumbs-down.svg +3 -0
  54. package/layouts/partials/icons/modus-solid/thumbs-up.svg +3 -0
  55. package/layouts/partials/icons/modus-solid/trimble-logo.svg +3 -0
  56. package/layouts/partials/icons/modus-solid/user-guide.svg +3 -0
  57. package/layouts/partials/icons/transportation/truck.svg +1 -1
  58. package/layouts/partials/logos/trimble.svg +1 -1
  59. package/layouts/partials/meta.html +30 -18
  60. package/layouts/partials/navbar-dropdown.html +2 -2
  61. package/layouts/partials/navbar-search.html +4 -4
  62. package/layouts/partials/navbar.html +18 -10
  63. package/layouts/partials/skippy.html +4 -4
  64. package/layouts/partials/was-this-page-helpful.html +8 -4
  65. package/layouts/shortcodes/example.html +2 -2
  66. package/package.json +17 -14
  67. package/static/img/icons/check-circle-outlined.svg +1 -0
  68. package/static/img/icons/code.svg +1 -0
  69. package/static/img/icons/github.svg +1 -0
  70. package/static/img/icons/trimble.svg +1 -0
  71. package/static/img/icons/web-components.svg +1 -0
  72. package/assets/js/scroll-to-top.js +0 -33
  73. package/assets/styles/_col-sidebar.scss +0 -3
  74. package/assets/styles/_navbar-search.scss +0 -53
  75. package/assets/styles/_navbar.scss +0 -5
  76. package/assets/styles/_tables.scss +0 -5
  77. package/layouts/index.rss.xml +0 -49
  78. package/layouts/partials/icons/trimble-logo.svg +0 -1
  79. package/static/js/theme-toggle.js +0 -41
  80. package/assets/{styles → css}/_autocomplete.scss +11 -11
  81. package/assets/{styles → css}/_cards.scss +3 -3
  82. package/assets/{styles → css}/_codefences-dark.scss +0 -0
  83. package/assets/{styles → css}/_codefences.scss +0 -0
  84. package/assets/{styles → css}/_font-open-sans.scss +0 -0
  85. package/assets/{styles → css}/_footer.scss +0 -0
  86. package/assets/{styles → css}/_javascript-disabled.scss +3 -3
  87. package/assets/{styles → css}/_list-js.scss +6 -6
  88. package/assets/{styles → css}/_menu-right.scss +5 -5
  89. package/assets/{styles → css}/_news.scss +1 -1
  90. package/assets/{styles → css}/_onetrust-cookie-banner.scss +9 -9
  91. package/assets/{styles → css}/_posts.scss +2 -2
  92. package/assets/{styles → css}/_print.scss +0 -0
  93. package/assets/{styles → css}/_scroll-to-top-btn.scss +5 -5
  94. package/assets/{styles → css}/_theme-dark.scss +0 -0
  95. package/assets/{styles → css}/_theme-light.scss +0 -0
  96. package/assets/{styles → css}/_theme-toggle.scss +3 -3
  97. /package/assets/{styles → css}/_utilities.scss +0 -0
  98. /package/assets/{styles → css}/_xxl.scss +0 -0
package/README.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Modus Docs Hugo Theme (Experimental)
2
2
 
3
+ [![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/trimble-oss/modus-docs-hugo-theme/main/LICENSE)
4
+ [![GitHub Super-Linter](https://github.com/trimble-oss/modus-docs-hugo-theme/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
5
+ [![npm Version](https://img.shields.io/npm/v/@trimble-oss/modus-docs-hugo-theme)](https://www.npmjs.com/package/@trimble-oss/modus-docs-hugo-theme)
6
+
3
7
  A documentation theme for Hugo.
4
8
 
5
- Status: Alpha. This theme is currently under development and is not yet ready for production use.
9
+ **Status: Alpha. This theme is currently under development.**
6
10
 
7
11
  ## Installation
8
12
 
@@ -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;
@@ -28,17 +33,17 @@ header {
28
33
  // external links have an icon
29
34
  .menu-right a[href^="http"]::after,
30
35
  article a:not(.stretched-link)[href^="https"]::after {
31
- content: "";
32
- width: 12px;
33
- height: 12px;
34
- margin-left: 4px;
35
- margin-bottom: -1px;
36
36
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.78 19.78H4.22V4.22h6.67c.61 0 1.11-.5 1.11-1.11C12 2.5 11.5 2 10.89 2H3c-.55 0-1 .45-1 1v18c0 .55.45 1 1 1h18c.55 0 1-.45 1-1v-7.89c0-.61-.5-1.11-1.11-1.11-.61 0-1.11.5-1.11 1.11v6.67ZM14.22 3.11c0 .61.5 1.11 1.11 1.11h2.88L8.07 14.36c-.43.43-.43 1.13 0 1.57.43.43 1.13.43 1.57 0L19.78 5.79v2.88c0 .61.5 1.11 1.11 1.11.61 0 1.11-.5 1.11-1.11V3c0-.55-.45-1-1-1h-5.67c-.61 0-1.11.5-1.11 1.11Z'/%3E%3C/svg%3E");
37
37
  background-position: bottom;
38
38
  background-repeat: no-repeat;
39
39
  background-size: contain;
40
+ content: "";
40
41
  display: inline-block;
42
+ height: 12px;
43
+ margin-bottom: -1px;
44
+ margin-left: 4px;
41
45
  opacity: 0.7;
46
+ width: 12px;
42
47
  }
43
48
 
44
49
  main .sticky-offset {
@@ -48,20 +53,24 @@ main .sticky-offset {
48
53
  // offsets the anchors to adjust for the fixed navbar
49
54
  article h2:target::before,
50
55
  article h3:target::before {
51
- display: block;
52
56
  content: " ";
57
+ display: block;
53
58
  height: 80px;
54
59
  margin-top: -80px;
55
60
  visibility: hidden;
56
61
  }
57
62
 
63
+ #main {
64
+ max-width: 1090px;
65
+ }
66
+
58
67
  #main::before {
59
- display: block;
60
68
  content: " ";
69
+ display: block;
61
70
  height: 80px;
62
71
  margin-top: -80px;
63
- visibility: hidden;
64
72
  top: 80px;
73
+ visibility: hidden;
65
74
  }
66
75
 
67
76
  // anchors # for deep links within docs
@@ -72,15 +81,15 @@ a.header-link {
72
81
 
73
82
  a.header-link::after {
74
83
  content: "#";
75
- min-width: 20px;
76
84
  display: inline-block;
85
+ min-width: 20px;
77
86
  }
78
87
 
79
88
  .docs-callout {
80
- margin-top: 1.25rem;
81
- margin-bottom: 1.25rem;
82
89
  border-left-width: 0.25rem !important;
83
90
  border-radius: 0.25rem;
91
+ margin-bottom: 1.25rem;
92
+ margin-top: 1.25rem;
84
93
  }
85
94
 
86
95
  .docs-callout-danger {
@@ -112,3 +121,4 @@ article .nav-tabs .nav-link::after {
112
121
  article table {
113
122
  width: 100%;
114
123
  }
124
+
@@ -0,0 +1,27 @@
1
+ .col-sidebar {
2
+ width: 64px !important;
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
+ }
@@ -29,8 +29,8 @@
29
29
  /* SM */
30
30
  @media (max-width: 767px) {
31
31
  #sidebar.show {
32
- width: calc(100% - 68px) !important;
33
32
  min-width: calc(100% - 68px) !important;
33
+ width: calc(100% - 68px) !important;
34
34
  }
35
35
 
36
36
  #sidebar.show + div {
@@ -38,7 +38,7 @@
38
38
  width: 0;
39
39
  }
40
40
 
41
- .collapsing {
41
+ #sidebar.collapsing {
42
42
  transition: none !important;
43
43
  }
44
44
  }
@@ -46,7 +46,7 @@
46
46
  /* SM Only */
47
47
  @media (min-width: 575px) and (max-width: 767px) {
48
48
  #sidebar-menu .list-unstyled li {
49
- width: 50%;
50
49
  display: inline-block;
50
+ width: 50%;
51
51
  }
52
52
  }
@@ -0,0 +1,54 @@
1
+ .search-container {
2
+ left: -12px;
3
+ width: 40px;
4
+ }
5
+
6
+ .form-control-search {
7
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m16.38 14.92-.66.05-.41-.41c2.44-2.81 2.28-7.1-.5-9.7S7.8 2.4 5.17 4.94a6.988 6.988 0 0 0-.08 9.98c2.61 2.61 6.77 2.72 9.52.34l.41.41-.05.65 3.89 3.89a.996.996 0 1 0 1.41-1.41l-3.88-3.88Zm-2.81-1.41a5.016 5.016 0 0 1-7.08 0c-1.95-1.95-1.95-5.13 0-7.08s5.13-1.95 7.08 0 1.95 5.13 0 7.08Z'/%3E%3C/svg%3E");
8
+ background-position: 5px center;
9
+ background-repeat: no-repeat;
10
+ background-size: 20px;
11
+ border-left: 0;
12
+ border-right: 0;
13
+ left: auto;
14
+ padding: 0;
15
+ right: 5px;
16
+ top: 10px;
17
+ transition: all 0.2s;
18
+ width: 0 !important;
19
+ z-index: 1210;
20
+ }
21
+
22
+ .form-control-search:focus {
23
+ max-width: calc(100vw - 200px);
24
+ padding: 0 4px 4px 16px;
25
+ text-indent: 18px;
26
+ visibility: visible;
27
+ width: 363px !important;
28
+ }
29
+
30
+ .form-control-search:focus + .btn-search {
31
+ background-color: transparent;
32
+ pointer-events: none !important;
33
+ transition: all 1s;
34
+ }
35
+
36
+ .form-control-search:focus + .btn-search img {
37
+ opacity: 0;
38
+ }
39
+
40
+ .btn-search {
41
+ top: 0;
42
+ }
43
+
44
+ .btn-search i {
45
+ margin-top: 18px;
46
+ }
47
+
48
+ [data-bs-theme="dark"] .form-control-search {
49
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='m16.38 14.92-.66.05-.41-.41c2.44-2.81 2.28-7.1-.5-9.7S7.8 2.4 5.17 4.94a6.988 6.988 0 0 0-.08 9.98c2.61 2.61 6.77 2.72 9.52.34l.41.41-.05.65 3.89 3.89a.996.996 0 1 0 1.41-1.41l-3.88-3.88Zm-2.81-1.41a5.016 5.016 0 0 1-7.08 0c-1.95-1.95-1.95-5.13 0-7.08s5.13-1.95 7.08 0 1.95 5.13 0 7.08Z'/%3E%3C/svg%3E") !important;
50
+ }
51
+
52
+ [data-bs-theme="dark"] .btn-search img {
53
+ filter: invert(1);
54
+ }
@@ -0,0 +1,27 @@
1
+ html[data-bs-theme="dark"] {
2
+ nav.navbar-blue .dropdown-menu img {
3
+ filter: invert(1);
4
+ }
5
+ }
6
+
7
+ .navbar-site-title {
8
+ margin-top: 12px;
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
+ }
@@ -48,11 +48,11 @@
48
48
  }
49
49
 
50
50
  .row-main {
51
- height: calc(100dvh - 66px);
51
+ min-height: calc(100dvh - 66px);
52
52
  }
53
53
 
54
54
  #sidebar.collapsing {
55
- transition: none;
55
+ transition: none !important;
56
56
  }
57
57
 
58
58
  #sidebar.collapsing + div,
@@ -8,8 +8,8 @@
8
8
  outline: 1px dotted;
9
9
  }
10
10
 
11
- .sr-only-focusable:focus {
12
- top: 0 !important;
11
+ .visually-hidden-focusable:focus {
13
12
  margin-bottom: 30px;
13
+ top: 0 !important;
14
14
  z-index: 22222;
15
15
  }
@@ -0,0 +1,34 @@
1
+ main table {
2
+ border: 1px solid rgba(133, 133, 133, 0.1);
3
+ margin-bottom: 1rem;
4
+ vertical-align: top;
5
+ width: 100%;
6
+
7
+ // border-color: var(--bs-table-border-color);
8
+ }
9
+
10
+ main table thead th {
11
+ border-bottom-width: 1px;
12
+ line-height: 1.25;
13
+ vertical-align: middle;
14
+ }
15
+
16
+ main table thead tr {
17
+ background-color: rgba(133, 133, 133, 0.1);
18
+ }
19
+
20
+ main table td {
21
+ font-size: 0.875rem;
22
+ vertical-align: middle;
23
+ }
24
+
25
+ .table-bordered > :not(caption) > * > * {
26
+ border-width: 0 var(--bs-border-width);
27
+ }
28
+
29
+ table > :not(caption) > * > * {
30
+ background-color: var(--bs-table-bg);
31
+ border-bottom-width: var(--bs-border-width);
32
+ box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
33
+ padding: 0.25rem 1rem;
34
+ }
@@ -1,10 +1,10 @@
1
1
  .feedback {
2
- border-color: #90939f !important;
2
+ border-color: #90939f;
3
3
  }
4
4
 
5
5
  .btn-feedback {
6
- opacity: 0.7;
7
6
  min-width: 32px;
7
+ opacity: 0.7;
8
8
  }
9
9
 
10
10
  .btn-feedback svg {
@@ -16,8 +16,8 @@
16
16
  }
17
17
 
18
18
  .btn-feedback[disabled] {
19
- opacity: 0.4;
20
19
  cursor: default;
20
+ opacity: 0.4;
21
21
  pointer-events: none;
22
22
  }
23
23
 
@@ -17,7 +17,8 @@
17
17
  @import "news";
18
18
  @import "posts";
19
19
  @import "print";
20
- @import "scroll-to-top-btn";
20
+
21
+ // @import "scroll-to-top-btn";
21
22
  @import "skippy"; // skip to content accessibility
22
23
  @import "tables";
23
24
  @import "footer";
@@ -40,7 +41,7 @@ h6 {
40
41
  }
41
42
 
42
43
  // underline links
43
- main a {
44
+ main a:not([class], li.breadcrumb-item a) {
44
45
  text-decoration: underline;
45
46
  }
46
47
 
@@ -62,5 +63,5 @@ code {
62
63
  }
63
64
 
64
65
  main {
65
- min-height: calc(100vh - 418px);
66
+ min-height: calc(100vh - 340px);
66
67
  }
@@ -1 +1 @@
1
- var autoComplete=function(){function e(e){function t(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function o(e,t,o){e.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o)}function s(e,t,o){e.detachEvent?e.detachEvent("on"+t,o):e.removeEventListener(t,o)}function n(e,s,n,l){o(l||document,s,function(o){for(var s,l=o.target||o.srcElement;l&&!(s=t(l,e));)l=l.parentElement;s&&n.call(l,o)})}if(document.querySelector){var l={selector:0,source:0,minChars:3,delay:150,offsetLeft:0,offsetTop:1,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(){}};for(var c in e)e.hasOwnProperty(c)&&(l[c]=e[c]);for(var a="object"==typeof l.selector?[l.selector]:document.querySelectorAll(l.selector),u=0;u<a.length;u++){var i=a[u];i.sc=document.createElement("div"),i.sc.className="autocomplete-suggestions "+l.menuClass,i.autocompleteAttr=i.getAttribute("autocomplete"),i.setAttribute("autocomplete","off"),i.cache={},i.last_val="",i.updateSC=function(e,t){var o=i.getBoundingClientRect();if(i.sc.style.left=Math.round(o.left+(window.pageXOffset||document.documentElement.scrollLeft)+l.offsetLeft)+"px",i.sc.style.top=Math.round(o.bottom+(window.pageYOffset||document.documentElement.scrollTop)+l.offsetTop)+"px",i.sc.style.width=Math.round(o.right-o.left)+"px",!e&&(i.sc.style.display="block",i.sc.maxHeight||(i.sc.maxHeight=parseInt((window.getComputedStyle?getComputedStyle(i.sc,null):i.sc.currentStyle).maxHeight)),i.sc.suggestionHeight||(i.sc.suggestionHeight=i.sc.querySelector(".autocomplete-suggestion").offsetHeight),i.sc.suggestionHeight))if(t){var s=i.sc.scrollTop,n=t.getBoundingClientRect().top-i.sc.getBoundingClientRect().top;n+i.sc.suggestionHeight-i.sc.maxHeight>0?i.sc.scrollTop=n+i.sc.suggestionHeight+s-i.sc.maxHeight:0>n&&(i.sc.scrollTop=n+s)}else i.sc.scrollTop=0},o(window,"resize",i.updateSC),document.body.appendChild(i.sc),n("autocomplete-suggestion","mouseleave",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&setTimeout(function(){e.className=e.className.replace("selected","")},20)},i.sc),n("autocomplete-suggestion","mouseover",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&(e.className=e.className.replace("selected","")),this.className+=" selected"},i.sc),n("autocomplete-suggestion","mousedown",function(e){if(t(this,"autocomplete-suggestion")){var o=this.getAttribute("data-val");i.value=o,l.onSelect(e,o,this),i.sc.style.display="none"}},i.sc),i.blurHandler=function(){try{var e=document.querySelector(".autocomplete-suggestions:hover")}catch(t){var e=0}e?i!==document.activeElement&&setTimeout(function(){i.focus()},20):(i.last_val=i.value,i.sc.style.display="none",setTimeout(function(){i.sc.style.display="none"},350))},o(i,"blur",i.blurHandler);var r=function(e){var t=i.value;if(i.cache[t]=e,e.length&&t.length>=l.minChars){for(var o="",s=0;s<e.length;s++)o+=l.renderItem(e[s],t);i.sc.innerHTML=o,i.updateSC(0)}else i.sc.style.display="none"};i.keydownHandler=function(e){var t=window.event?e.keyCode:e.which;if((40==t||38==t)&&i.sc.innerHTML){var o,s=i.sc.querySelector(".autocomplete-suggestion.selected");return s?(o=40==t?s.nextSibling:s.previousSibling,o?(s.className=s.className.replace("selected",""),o.className+=" selected",i.value=o.getAttribute("data-val")):(s.className=s.className.replace("selected",""),i.value=i.last_val,o=0)):(o=40==t?i.sc.querySelector(".autocomplete-suggestion"):i.sc.childNodes[i.sc.childNodes.length-1],o.className+=" selected",console.log(o),i.value=o.getAttribute("data-val")),i.updateSC(0,o),!1}if(27==t)i.value=i.last_val,i.sc.style.display="none";else if(13==t||9==t){var s=i.sc.querySelector(".autocomplete-suggestion.selected");s&&"none"!=i.sc.style.display&&(l.onSelect(e,s.getAttribute("data-val"),s),setTimeout(function(){i.sc.style.display="none"},20))}},o(i,"keydown",i.keydownHandler),i.keyupHandler=function(e){var t=window.event?e.keyCode:e.which;if(!t||(35>t||t>40)&&13!=t&&27!=t){var o=i.value;if(o.length>=l.minChars){if(o!=i.last_val){if(i.last_val=o,clearTimeout(i.timer),l.cache){if(o in i.cache)return void r(i.cache[o]);for(var s=1;s<o.length-l.minChars;s++){var n=o.slice(0,o.length-s);if(n in i.cache&&!i.cache[n].length)return void r([])}}i.timer=setTimeout(function(){l.source(o,r)},l.delay)}}else i.last_val=o,i.sc.style.display="none"}},o(i,"keyup",i.keyupHandler),i.focusHandler=function(e){i.last_val="\n",i.keyupHandler(e)},l.minChars||o(i,"focus",i.focusHandler)}this.destroy=function(){for(var e=0;e<a.length;e++){var t=a[e];s(window,"resize",t.updateSC),s(t,"blur",t.blurHandler),s(t,"focus",t.focusHandler),s(t,"keydown",t.keydownHandler),s(t,"keyup",t.keyupHandler),t.autocompleteAttr?t.setAttribute("autocomplete",t.autocompleteAttr):t.removeAttribute("autocomplete"),document.body.removeChild(t.sc),t=null}}}}return e}();!function(){"function"==typeof define&&define.amd?define("autoComplete",function(){return autoComplete}):"undefined"!=typeof module&&module.exports?module.exports=autoComplete:window.autoComplete=autoComplete}();
1
+ var autoComplete=function(){function e(e){function t(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function o(e,t,o){e.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o)}function s(e,t,o){e.detachEvent?e.detachEvent("on"+t,o):e.removeEventListener(t,o)}function n(e,s,n,l){o(l||document,s,function(o){for(var s,l=o.target||o.srcElement;l&&!(s=t(l,e));)l=l.parentElement;s&&n.call(l,o)})}if(document.querySelector){var l={selector:0,source:0,minChars:3,delay:150,offsetLeft:0,offsetTop:1,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" role="link" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(){}};for(var c in e)e.hasOwnProperty(c)&&(l[c]=e[c]);for(var a="object"==typeof l.selector?[l.selector]:document.querySelectorAll(l.selector),u=0;u<a.length;u++){var i=a[u];i.sc=document.createElement("div"),i.sc.className="autocomplete-suggestions"+l.menuClass,i.autocompleteAttr=i.getAttribute("autocomplete"),i.setAttribute("autocomplete","off"),i.cache={},i.last_val="",i.updateSC=function(e,t){var o=i.getBoundingClientRect();if(i.sc.style.left=Math.round(o.left+(window.pageXOffset||document.documentElement.scrollLeft)+l.offsetLeft)+"px",i.sc.style.top=Math.round(o.bottom+(window.pageYOffset||document.documentElement.scrollTop)+l.offsetTop)+"px",i.sc.style.width=Math.round(o.right-o.left)+"px",!e&&(i.sc.style.display="block",i.sc.maxHeight||(i.sc.maxHeight=parseInt((window.getComputedStyle?getComputedStyle(i.sc,null):i.sc.currentStyle).maxHeight)),i.sc.suggestionHeight||(i.sc.suggestionHeight=i.sc.querySelector(".autocomplete-suggestion").offsetHeight),i.sc.suggestionHeight))if(t){var s=i.sc.scrollTop,n=t.getBoundingClientRect().top-i.sc.getBoundingClientRect().top;n+i.sc.suggestionHeight-i.sc.maxHeight>0?i.sc.scrollTop=n+i.sc.suggestionHeight+s-i.sc.maxHeight:0>n&&(i.sc.scrollTop=n+s)}else i.sc.scrollTop=0},o(window,"resize",i.updateSC),document.body.appendChild(i.sc),n("autocomplete-suggestion","mouseleave",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&setTimeout(function(){e.className=e.className.replace("selected","")},20)},i.sc),n("autocomplete-suggestion","mouseover",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&(e.className=e.className.replace("selected","")),this.className+=" selected"},i.sc),n("autocomplete-suggestion","mousedown",function(e){if(t(this,"autocomplete-suggestion")){var o=this.getAttribute("data-val");i.value=o,l.onSelect(e,o,this),i.sc.style.display="none"}},i.sc),i.blurHandler=function(){try{var e=document.querySelector(".autocomplete-suggestions:hover")}catch(t){var e=0}e?i!==document.activeElement&&setTimeout(function(){i.focus()},20):(i.last_val=i.value,i.sc.style.display="none",setTimeout(function(){i.sc.style.display="none"},350))},o(i,"blur",i.blurHandler);var r=function(e){var t=i.value;if(i.cache[t]=e,e.length&&t.length>=l.minChars){for(var o="",s=0;s<e.length;s++)o+=l.renderItem(e[s],t);i.sc.innerHTML=o,i.updateSC(0)}else i.sc.style.display="none"};i.keydownHandler=function(e){var t=window.event?e.keyCode:e.which;if((40==t||38==t)&&i.sc.innerHTML){var o,s=i.sc.querySelector(".autocomplete-suggestion.selected");return s?(o=40==t?s.nextSibling:s.previousSibling,o?(s.className=s.className.replace("selected",""),o.className+=" selected",i.value=o.getAttribute("data-val")):(s.className=s.className.replace("selected",""),i.value=i.last_val,o=0)):(o=40==t?i.sc.querySelector(".autocomplete-suggestion"):i.sc.childNodes[i.sc.childNodes.length-1],o.className+=" selected",console.log(o),i.value=o.getAttribute("data-val")),i.updateSC(0,o),!1}if(27==t)i.value=i.last_val,i.sc.style.display="none";else if(13==t||9==t){var s=i.sc.querySelector(".autocomplete-suggestion.selected");s&&"none"!=i.sc.style.display&&(l.onSelect(e,s.getAttribute("data-val"),s),setTimeout(function(){i.sc.style.display="none"},20))}},o(i,"keydown",i.keydownHandler),i.keyupHandler=function(e){var t=window.event?e.keyCode:e.which;if(!t||(35>t||t>40)&&13!=t&&27!=t){var o=i.value;if(o.length>=l.minChars){if(o!=i.last_val){if(i.last_val=o,clearTimeout(i.timer),l.cache){if(o in i.cache)return void r(i.cache[o]);for(var s=1;s<o.length-l.minChars;s++){var n=o.slice(0,o.length-s);if(n in i.cache&&!i.cache[n].length)return void r([])}}i.timer=setTimeout(function(){l.source(o,r)},l.delay)}}else i.last_val=o,i.sc.style.display="none"}},o(i,"keyup",i.keyupHandler),i.focusHandler=function(e){i.last_val="\n",i.keyupHandler(e)},l.minChars||o(i,"focus",i.focusHandler)}this.destroy=function(){for(var e=0;e<a.length;e++){var t=a[e];s(window,"resize",t.updateSC),s(t,"blur",t.blurHandler),s(t,"focus",t.focusHandler),s(t,"keydown",t.keydownHandler),s(t,"keyup",t.keyupHandler),t.autocompleteAttr?t.setAttribute("autocomplete",t.autocompleteAttr):t.removeAttribute("autocomplete"),document.body.removeChild(t.sc),t=null}}}}return e}();!function(){"function"==typeof define&&define.amd?define("autoComplete",function(){return autoComplete}):"undefined"!=typeof module&&module.exports?module.exports=autoComplete:window.autoComplete=autoComplete}();
@@ -1 +1 @@
1
- var lunrIndex,pagesIndex;function endsWith(a,b){return-1!==a.indexOf(b,a.length-b.length)}function initLunr(){endsWith(baseurl,"/")||(baseurl+="/");jQuery.getJSON(baseurl+"index.json").done(function(a){pagesIndex=a,lunrIndex=lunr(function(){this.ref("uri"),this.field("title",{boost:15}),this.field("tags",{boost:10}),this.field("content",{boost:5}),this.pipeline.remove(lunr.stemmer),this.searchPipeline.remove(lunr.stemmer),pagesIndex.forEach(function(a){this.add(a)},this)})}).fail(function(a,b,c){console.error("Error getting Hugo index file:",b+", "+c)})}function search(a){return lunrIndex.search(a+"^100 "+a+"*^10 *"+a+"^10 "+a+"~2^1").map(function(a){return pagesIndex.filter(function(b){return b.uri===a.ref})[0]})}initLunr(),jQuery(document).ready(function(){new autoComplete({selector:jQuery("#search-by").get(0),source:function(a,b){b(search(a))},renderItem:function(a,b){var c=a.content.match("(?:\\s?(?:[\\w]+)\\s?){0,2}"+b+"(?:\\s?(?:[\\w]+)\\s?){0,"+2+"}");return a.context=c,"<div class=\"autocomplete-suggestion\" data-term=\""+b+"\" data-title=\""+a.title+"\" data-uri=\""+a.uri+"?q="+b+"#"+b+"\" data-context=\""+a.context+"\">\xBB "+a.title+"<div class=\"context\">"+(a.context||"")+"</div></div>"},onSelect:function(a,b,c){location.href=c.getAttribute("data-uri")}})});
1
+ var lunrIndex,pagesIndex;function endsWith(a,b){return-1!==a.indexOf(b,a.length-b.length)}function initLunr(){endsWith(baseurl,"/")||(baseurl+="/");jQuery.getJSON(baseurl+"index.json").done(function(a){pagesIndex=a,lunrIndex=lunr(function(){this.ref("uri"),this.field("title",{boost:15}),this.field("tags",{boost:10}),this.field("content",{boost:5}),this.pipeline.remove(lunr.stemmer),this.searchPipeline.remove(lunr.stemmer),pagesIndex.forEach(function(a){this.add(a)},this)})}).fail(function(a,b,c){console.error("Error getting Hugo index file:",b+", "+c)})}function search(a){return lunrIndex.search(a+"^100 "+a+"*^10 *"+a+"^10 "+a+"~2^1").map(function(a){return pagesIndex.filter(function(b){return b.uri===a.ref})[0]})}initLunr(),jQuery(document).ready(function(){new autoComplete({selector:jQuery("#search-by").get(0),source:function(a,b){b(search(a))},renderItem:function(a,b){var c=a.content.match("(?:\\s?(?:[\\w]+)\\s?){0,2}"+b+"(?:\\s?(?:[\\w]+)\\s?){0,"+2+"}");return a.context=c,"<div class=\"autocomplete-suggestion\" role=\"link\" data-term=\""+b+"\" aria-label=\""+a.title+"\" data-title=\""+a.title+"\" data-uri=\""+a.uri+"?q="+b+"#"+b+"\" data-context=\""+a.context+"\">\xBB "+a.title+"<div aria-hidden=\"true\" class=\"context\">"+(a.context||"")+"</div></div>"},onSelect:function(a,b,c){location.href=c.getAttribute("data-uri")}})});
@@ -1,15 +1,22 @@
1
1
  $(function () {
2
- $('.feedback').fadeIn('slow').addClass('d-block').removeClass('d-none');
2
+ $('.feedback').fadeIn('slow').addClass('d-block');
3
3
  $('.btn-feedback').click(function () {
4
4
  $('.btn-feedback').addClass('img-grayscale').attr('disabled', 'disabled');
5
5
  $('.feedback-thanks').fadeIn('slow').addClass('d-block');
6
6
  });
7
+
7
8
  $('.btn-feedback-helpful').click(function () {
8
9
  $('.feedback-helpful').fadeIn('slow').addClass('d-block');
9
- $('.feedback-helpful').removeClass('d-none');
10
+ $('.icon-helpful-solid').addClass('d-block');
11
+ $('.icon-helpful-solid').removeClass('d-none');
12
+ $('.icon-helpful-outlined').removeClass('d-block');
13
+ $('.icon-helpful-outlined').addClass('d-none');
10
14
  });
11
15
  $('.btn-feedback-not-helpful').click(function () {
12
16
  $('.feedback-not-helpful').fadeIn('slow').addClass('d-block');
13
- $('.feedback-not-helpful').removeClass('d-none');
17
+ $('.icon-not-helpful-solid').addClass('d-block');
18
+ $('.icon-not-helpful-solid').removeClass('d-none');
19
+ $('.icon-not-helpful-solid').removeClass('d-none');
20
+ $('.icon-not-helpful-outlined').addClass('d-none');
14
21
  });
15
22
  });
@@ -1,15 +1,19 @@
1
+ - title: Modus Style Guide
2
+ icon: "/img/icons/trimble.svg"
3
+ url: "https://modus.trimble.com/"
4
+
1
5
  - title: Modus Web Components
2
- icon: ""
6
+ icon: "/img/icons/web-components.svg"
3
7
  url: "https://modus-web-components.trimble.com/"
4
8
 
5
9
  - title: Modus Icons
6
- icon: ""
10
+ icon: "/img/icons/check-circle-outlined.svg"
7
11
  url: "https://modus-icons.trimble.com"
8
12
 
9
13
  - title: Modus Bootstrap
10
- icon: ""
14
+ icon: "/img/icons/code.svg"
11
15
  url: "https://modus-bootstrap.trimble.com/"
12
16
 
13
17
  - title: Modus on GitHub
14
- icon: ""
18
+ icon: "/img/icons/github.svg"
15
19
  url: "https://github.com/trimble-oss/?q=modus&type=all&language=&sort=stargazers"
@@ -1,4 +1,4 @@
1
- <h{{ .Level }} id="{{ .Anchor | safeURL }}"
1
+ <h{{ .Level }} id="{{- .Anchor | safeURL -}}"
2
2
  class="{{- if (eq .Level 2 ) }}
3
3
  h1 mt-5 {{- end -}}
4
4
  {{- if (eq .Level 3 ) }}
@@ -20,4 +20,4 @@
20
20
  {{ if and (ne .Anchor "use-when") (ne .Anchor "dont-use-when") }}
21
21
  <a class="header-link text-light text-decoration-none fw-normal" href="#{{- .Anchor | safeURL -}}"
22
22
  aria-label="anchor"></a>{{ end }}
23
- </h{{ .Level }}>
23
+ </h{{ .Level }}>
@@ -1,4 +1,4 @@
1
- <a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"
2
- {{- end -}}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener" {{ end }}>
1
+ <a href="{{- .Destination | safeURL -}}" {{ with .Title}} title="{{- . -}}"
2
+ {{- end -}}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener" {{- end -}}>
3
3
  {{- .Text | safeHTML -}}
4
- </a>
4
+ </a>
@@ -1,5 +1,6 @@
1
1
  <!doctype html>
2
- <html lang="en-US" class="h-100 no-js {{ with .Page.Params.html_class }}{{ . -}}{{- end -}}">
2
+ <html lang="{{ with .Site.LanguageCode }}{{- . -}}{{ else }}en-US{{- end -}}"
3
+ class="h-100 no-js {{ with .Page.Params.html_class }}{{ . -}}{{- end -}}">
3
4
 
4
5
  <head>
5
6
  {{ partial "meta" . }}
@@ -7,6 +8,7 @@
7
8
 
8
9
  <body data-url="{{ .RelPermalink }}" class="overflow-x-hidden {{ with .Page.Params.body_class -}}{{ . -}}{{- end -}}"
9
10
  {{ if not .Params.disableScrollSpy }}{{- end -}}>
11
+ {{ partial "skippy" . }}
10
12
  {{ if not .Params.NavbarFalse }}{{ partial "navbar" . }}{{ end }}
11
13
  {{ block "body" . }}{{ block "main" . }}
12
14
  {{- end -}}
@@ -26,7 +28,10 @@
26
28
  if (event.which === 27) {
27
29
  const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
28
30
  tooltipTriggerList.forEach(function (tooltipTriggerEl) {
29
- $(tooltipTriggerEl).tooltip('hide');
31
+ var bootstrapTooltip = bootstrap.Tooltip.getInstance(tooltipTriggerEl);
32
+ if (bootstrapTooltip) {
33
+ bootstrapTooltip.hide();
34
+ }
30
35
  });
31
36
  }
32
37
  });
@@ -36,6 +41,8 @@
36
41
  const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
37
42
  const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
38
43
  </script>
44
+
45
+ {{- if not .IsHome -}}
39
46
  <script>
40
47
  // Disable all links with #
41
48
  var links = document.querySelectorAll('a[href="#"]');
@@ -47,7 +54,6 @@
47
54
  });
48
55
  });
49
56
  </script>
50
- {{- if not .IsHome -}}
51
57
  <script>
52
58
  // Change Submit buttons within docs examples to type=button
53
59
  var article = document.querySelector('article');
@@ -62,4 +68,4 @@
62
68
  {{- end -}}
63
69
  </body>
64
70
 
65
- </html>
71
+ </html>
@@ -15,6 +15,18 @@
15
15
 
16
16
  <div class="col col-auto col-12 col-main border-start p-0 overflow-x-hidden">
17
17
 
18
+ <script>
19
+ function _calculateScrollbarWidth() {
20
+ document.documentElement.style.setProperty('--scrollbar-width', (window.innerWidth - document.documentElement.clientWidth) + "px");
21
+ }
22
+ // recalculate on resize
23
+ window.addEventListener('resize', _calculateScrollbarWidth, false);
24
+ // recalculate on dom load
25
+ document.addEventListener('DOMContentLoaded', _calculateScrollbarWidth, false);
26
+ // recalculate on load (assets loaded as well)
27
+ window.addEventListener('load', _calculateScrollbarWidth);
28
+ </script>
29
+
18
30
  <main id="main" class="container">
19
31
 
20
32
  {{ .Content }}
@@ -28,4 +40,4 @@
28
40
 
29
41
  </div>
30
42
  </div>
31
- {{- end -}}
43
+ {{- end -}}
@@ -1,5 +1,5 @@
1
1
  <!doctype html>
2
- <html lang="en">
2
+ <html lang="{{ with .Site.LanguageCode }}{{- . -}}{{ else }}en-US{{- end -}}">
3
3
 
4
4
  <head>
5
5
  <meta charset="utf-8">
@@ -17,7 +17,7 @@
17
17
 
18
18
  {{ partial "header" . }}
19
19
 
20
- <main class="container mx-auto mt-5" style="max-width: 1090px;">
20
+ <main class="container mx-auto mt-5" id="main">
21
21
  <div class="row">
22
22
  <div class="col-12 col-xl-9">
23
23
  {{ if .Params.blog }}
@@ -26,9 +26,9 @@
26
26
  </h1>
27
27
  <div class="d-flex">
28
28
  <div class="mx-3">
29
- <img src="/img/author/{{ .Params.author | urlize }}.jpg"
29
+ <img src="/img/author/{{- .Params.author | urlize -}}.jpg"
30
30
  class="bg-light rounded-circle mx-auto text-center border" height="44" width="44"
31
- alt="{{ .Params.author }}">
31
+ alt="{{- .Params.author -}}">
32
32
  </div>
33
33
  <div>
34
34
  <div class="text-body fw-bold">
@@ -110,4 +110,4 @@
110
110
 
111
111
  </div>
112
112
  </div>
113
- {{ end }}
113
+ {{ end }}
@@ -6,7 +6,7 @@
6
6
  {{- if and $index (gt $index 0) -}},{{- end }}
7
7
  {
8
8
  "uri": "{{- $page.Permalink -}}",
9
- "title": "{{- htmlEscape $page.Title }} {{ if in .Params.tags "in-field" }}(In-Field){{end}}{{ if .Params.componentsWeb }}(Web){{end}}{{ if in .Params.tags "xr" }}(XR){{end}}{{ if in .Params.tags "mobile" }}(Mobile){{end}}",
9
+ "title": "{{- htmlEscape $page.Title -}}",
10
10
  "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}],
11
11
  "description": "{{- htmlEscape .Description -}}",
12
12
  "content": {{- $page.Plain | jsonify -}}
@@ -1,9 +1,12 @@
1
- {{- if not .Site.IsServer -}}
1
+ {{- if not hugo.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 -}}
@@ -2,7 +2,7 @@
2
2
  <div class="col-12 col-lg-6 col-xl-4 my-3">
3
3
  <div class="card card-blog-brief h-100">
4
4
  <div class="card-header top-rounded mb-0 pb-0 border-0"
5
- style="background-image: url({{ .Params.Image | relURL }}); background-color: {{ .Params.headerBgColor }}">
5
+ style="background-image: url({{- .Params.Image | relURL -}}); background-color: {{- .Params.headerBgColor -}}">
6
6
  </div>
7
7
  <div class="card-body border-0 pb-0">
8
8
  <h3 class="card-title text-body px-2 ms-n2 name" {{ if .Params.TitleNoTranslate }}translate="no" {{- end -}}>
@@ -19,12 +19,12 @@
19
19
  <div class="card-footer bg-transparent border-0 py-0">
20
20
  <div class="d-flex mb-1">
21
21
  <div class="me-2">
22
- <img src="/img/author/{{ .Params.author | urlize }}.jpg"
22
+ <img src="/img/author/{{- .Params.author | urlize -}}.jpg"
23
23
  class="bg-light rounded-circle mx-auto text-center img-fluid ms-2" height="40" width="40"
24
- alt="{{ .Params.author }}">
24
+ alt="{{- .Params.author -}}">
25
25
  </div>
26
26
  <div>
27
- <p class="text-muted small mb-0">{{ .Params.author }}</p>
27
+ <p class="text-muted small mb-0">{{- .Params.author -}}</p>
28
28
  <p class="text-muted small">{{- .Date.Format "Jan 2, 2006" }}</p>
29
29
  </div>
30
30
  </div>