@trimble-oss/modus-docs-hugo-theme 1.0.0-alpha29 → 1.0.0-alpha3
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.
- package/README.md +1 -5
- package/assets/js/auto-complete.min.js +1 -1
- package/assets/js/scroll-to-top.js +33 -0
- package/assets/js/search.min.js +1 -1
- package/assets/js/was-this-page-helpful.js +3 -10
- package/assets/{css → styles}/_article.scss +11 -16
- package/assets/styles/_col-sidebar.scss +3 -0
- package/assets/{css → styles}/_menu-right.scss +5 -6
- package/assets/{css → styles}/_mobile.scss +4 -4
- package/assets/styles/_navbar-search.scss +53 -0
- package/assets/styles/_navbar.scss +5 -0
- package/assets/{css → styles}/_sidebar.scss +4 -4
- package/assets/{css → styles}/_skippy.scss +2 -2
- package/assets/styles/_tables.scss +5 -0
- package/assets/{css → styles}/_theme-light.scss +1 -1
- package/assets/{css → styles}/_theme-toggle.scss +11 -5
- package/assets/{css → styles}/_was-this-page-helpful.scss +3 -3
- package/assets/{css/modus-docs.scss → styles/styles.scss} +5 -5
- package/data/navbar_apps.yml +4 -8
- package/layouts/_default/_markup/render-heading.html +4 -4
- package/layouts/_default/_markup/render-link.html +3 -3
- package/layouts/_default/baseof.html +4 -9
- package/layouts/_default/home.html +8 -3
- package/layouts/_default/list.html +7 -2
- package/layouts/_default/redirect.html +1 -1
- package/layouts/_default/single.html +11 -6
- package/layouts/index.json +1 -1
- package/layouts/index.rss.xml +49 -0
- package/layouts/partials/analytics.html +7 -3
- package/layouts/partials/blog-brief.html +4 -4
- package/layouts/partials/blog-share.html +7 -7
- package/layouts/partials/col-sidebar-menu.html +6 -22
- package/layouts/partials/col-sidebar.html +28 -0
- package/layouts/partials/header.html +4 -15
- package/layouts/partials/icons/brands/codepen.svg +1 -1
- package/layouts/partials/icons/brands/facebook-square.svg +1 -1
- package/layouts/partials/icons/brands/github-alt.svg +1 -1
- package/layouts/partials/icons/brands/github.svg +1 -1
- package/layouts/partials/icons/brands/linkedin.svg +1 -1
- package/layouts/partials/icons/brands/vimeo-square.svg +1 -1
- package/layouts/partials/icons/modus-outlined/accessibility-circle.svg +1 -1
- package/layouts/partials/icons/modus-outlined/arrow-up.svg +1 -1
- package/layouts/partials/icons/modus-outlined/bar-graph-square.svg +1 -1
- package/layouts/partials/icons/modus-outlined/launch.svg +1 -1
- package/layouts/partials/icons/modus-outlined/menu.svg +1 -1
- package/layouts/partials/icons/modus-outlined/more-vertical.svg +1 -1
- package/layouts/partials/icons/modus-outlined/person-account.svg +1 -1
- package/layouts/partials/icons/modus-outlined/search.svg +1 -1
- package/layouts/partials/icons/modus-outlined/sync.svg +1 -1
- package/layouts/partials/icons/modus-outlined/thumbs-down.svg +1 -1
- package/layouts/partials/icons/modus-outlined/thumbs-up.svg +1 -1
- package/layouts/partials/icons/modus-outlined/web.svg +1 -1
- package/layouts/partials/icons/modus-solid/email.svg +1 -1
- package/layouts/partials/icons/modus-solid/palette.svg +1 -1
- package/layouts/partials/icons/transportation/truck.svg +1 -1
- package/layouts/partials/icons/trimble-logo.svg +1 -0
- package/layouts/partials/logos/trimble.svg +1 -1
- package/layouts/partials/menu-right.html +2 -3
- package/layouts/partials/meta.html +19 -31
- package/layouts/partials/navbar-dropdown.html +2 -2
- package/layouts/partials/navbar-search.html +6 -6
- package/layouts/partials/navbar.html +9 -19
- package/layouts/partials/related-content.html +1 -1
- package/layouts/partials/skippy.html +4 -4
- package/layouts/partials/trimble-logo.html +1 -1
- package/layouts/partials/was-this-page-helpful.html +3 -5
- package/layouts/shortcodes/example.html +2 -2
- package/layouts/sitemap.xml +8 -0
- package/package.json +16 -27
- package/static/img/trimble-logo.svg +1 -5
- package/static/js/theme-toggle.js +41 -0
- package/assets/css/_mq-forced-colors-active.scss +0 -29
- package/assets/css/_navbar-search.scss +0 -54
- package/assets/css/_navbar.scss +0 -27
- package/assets/css/_tables.scss +0 -34
- package/layouts/partials/icons/modus-outlined/code.svg +0 -3
- package/layouts/partials/icons/modus-solid/apps.svg +0 -3
- package/layouts/partials/icons/modus-solid/code.svg +0 -3
- package/layouts/partials/icons/modus-solid/menu.svg +0 -3
- package/layouts/partials/icons/modus-solid/thumbs-down.svg +0 -3
- package/layouts/partials/icons/modus-solid/thumbs-up.svg +0 -3
- package/layouts/partials/icons/modus-solid/trimble-logo.svg +0 -3
- package/layouts/partials/icons/modus-solid/user-guide.svg +0 -3
- package/static/img/icons/check-circle-outlined.svg +0 -3
- package/static/img/icons/code.svg +0 -3
- package/static/img/icons/github.svg +0 -3
- package/static/img/icons/trimble.svg +0 -4
- package/static/img/icons/web-components.svg +0 -3
- package/assets/{css → styles}/_autocomplete.scss +11 -11
- package/assets/{css → styles}/_cards.scss +3 -3
- package/assets/{css → styles}/_codefences-dark.scss +0 -0
- package/assets/{css → styles}/_codefences.scss +0 -0
- package/assets/{css → styles}/_font-open-sans.scss +0 -0
- package/assets/{css → styles}/_footer.scss +0 -0
- package/assets/{css → styles}/_javascript-disabled.scss +3 -3
- package/assets/{css → styles}/_list-js.scss +6 -6
- package/assets/{css → styles}/_news.scss +1 -1
- package/assets/{css → styles}/_onetrust-cookie-banner.scss +9 -9
- package/assets/{css → styles}/_posts.scss +2 -2
- package/assets/{css → styles}/_print.scss +0 -0
- package/assets/{css → styles}/_scroll-to-top-btn.scss +5 -5
- /package/assets/{css → styles}/_theme-dark.scss +0 -0
- /package/assets/{css → styles}/_utilities.scss +0 -0
- /package/assets/{css → styles}/_xxl.scss +0 -0
- /package/layouts/partials/{navbar-theme-toggle.html → btn-theme-toggle.html} +0 -0
package/README.md
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
# Modus Docs Hugo Theme (Experimental)
|
2
2
|
|
3
|
-
[](https://raw.githubusercontent.com/trimble-oss/modus-docs-hugo-theme/main/LICENSE)
|
4
|
-
[](https://github.com/marketplace/actions/super-linter)
|
5
|
-
[](https://www.npmjs.com/package/@trimble-oss/modus-docs-hugo-theme)
|
6
|
-
|
7
3
|
A documentation theme for Hugo.
|
8
4
|
|
9
|
-
|
5
|
+
Status: Alpha. This theme is currently under development and is not yet ready for production use.
|
10
6
|
|
11
7
|
## Installation
|
12
8
|
|
@@ -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"
|
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}();
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/*
|
2
|
+
* Scroll to top widget
|
3
|
+
* Copyright (C) 2022 Trimble Inc.
|
4
|
+
* Licensed under MIT
|
5
|
+
*/
|
6
|
+
|
7
|
+
let target = document.querySelector('footer');
|
8
|
+
|
9
|
+
let scrollToTopBtn = document.querySelector('.btn-to-top');
|
10
|
+
let rootElement = document.documentElement;
|
11
|
+
|
12
|
+
function callback(entries, observer) {
|
13
|
+
entries.forEach((entry) => {
|
14
|
+
window.onscroll = function (e) {
|
15
|
+
if (entry.isIntersecting) {
|
16
|
+
scrollToTopBtn.classList.add('btn-to-top-show');
|
17
|
+
} else {
|
18
|
+
scrollToTopBtn.classList.remove('btn-to-top-show');
|
19
|
+
}
|
20
|
+
};
|
21
|
+
});
|
22
|
+
}
|
23
|
+
|
24
|
+
function scrollToTop() {
|
25
|
+
rootElement.scrollTo({
|
26
|
+
top: 0,
|
27
|
+
behavior: 'smooth',
|
28
|
+
});
|
29
|
+
}
|
30
|
+
scrollToTopBtn.addEventListener('click', scrollToTop);
|
31
|
+
|
32
|
+
const observer = new IntersectionObserver(callback);
|
33
|
+
observer.observe(target);
|
package/assets/js/search.min.js
CHANGED
@@ -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\"
|
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,22 +1,15 @@
|
|
1
1
|
$(function () {
|
2
|
-
$('.feedback').fadeIn('slow').addClass('d-block');
|
2
|
+
$('.feedback').fadeIn('slow').addClass('d-block').removeClass('d-none');
|
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
|
-
|
8
7
|
$('.btn-feedback-helpful').click(function () {
|
9
8
|
$('.feedback-helpful').fadeIn('slow').addClass('d-block');
|
10
|
-
$('.
|
11
|
-
$('.icon-helpful-solid').removeClass('d-none');
|
12
|
-
$('.icon-helpful-outlined').removeClass('d-block');
|
13
|
-
$('.icon-helpful-outlined').addClass('d-none');
|
9
|
+
$('.feedback-helpful').removeClass('d-none');
|
14
10
|
});
|
15
11
|
$('.btn-feedback-not-helpful').click(function () {
|
16
12
|
$('.feedback-not-helpful').fadeIn('slow').addClass('d-block');
|
17
|
-
$('.
|
18
|
-
$('.icon-not-helpful-solid').removeClass('d-none');
|
19
|
-
$('.icon-not-helpful-solid').removeClass('d-none');
|
20
|
-
$('.icon-not-helpful-outlined').addClass('d-none');
|
13
|
+
$('.feedback-not-helpful').removeClass('d-none');
|
21
14
|
});
|
22
15
|
});
|
@@ -33,17 +33,17 @@ header {
|
|
33
33
|
// external links have an icon
|
34
34
|
.menu-right a[href^="http"]::after,
|
35
35
|
article a:not(.stretched-link)[href^="https"]::after {
|
36
|
+
content: "";
|
37
|
+
width: 12px;
|
38
|
+
height: 12px;
|
39
|
+
margin-left: 4px;
|
40
|
+
margin-bottom: -1px;
|
36
41
|
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
42
|
background-position: bottom;
|
38
43
|
background-repeat: no-repeat;
|
39
44
|
background-size: contain;
|
40
|
-
content: "";
|
41
45
|
display: inline-block;
|
42
|
-
height: 12px;
|
43
|
-
margin-bottom: -1px;
|
44
|
-
margin-left: 4px;
|
45
46
|
opacity: 0.7;
|
46
|
-
width: 12px;
|
47
47
|
}
|
48
48
|
|
49
49
|
main .sticky-offset {
|
@@ -53,24 +53,20 @@ main .sticky-offset {
|
|
53
53
|
// offsets the anchors to adjust for the fixed navbar
|
54
54
|
article h2:target::before,
|
55
55
|
article h3:target::before {
|
56
|
-
content: " ";
|
57
56
|
display: block;
|
57
|
+
content: " ";
|
58
58
|
height: 80px;
|
59
59
|
margin-top: -80px;
|
60
60
|
visibility: hidden;
|
61
61
|
}
|
62
62
|
|
63
|
-
#main {
|
64
|
-
max-width: 1090px;
|
65
|
-
}
|
66
|
-
|
67
63
|
#main::before {
|
68
|
-
content: " ";
|
69
64
|
display: block;
|
65
|
+
content: " ";
|
70
66
|
height: 80px;
|
71
67
|
margin-top: -80px;
|
72
|
-
top: 80px;
|
73
68
|
visibility: hidden;
|
69
|
+
top: 80px;
|
74
70
|
}
|
75
71
|
|
76
72
|
// anchors # for deep links within docs
|
@@ -81,15 +77,15 @@ a.header-link {
|
|
81
77
|
|
82
78
|
a.header-link::after {
|
83
79
|
content: "#";
|
84
|
-
display: inline-block;
|
85
80
|
min-width: 20px;
|
81
|
+
display: inline-block;
|
86
82
|
}
|
87
83
|
|
88
84
|
.docs-callout {
|
85
|
+
margin-top: 1.25rem;
|
86
|
+
margin-bottom: 1.25rem;
|
89
87
|
border-left-width: 0.25rem !important;
|
90
88
|
border-radius: 0.25rem;
|
91
|
-
margin-bottom: 1.25rem;
|
92
|
-
margin-top: 1.25rem;
|
93
89
|
}
|
94
90
|
|
95
91
|
.docs-callout-danger {
|
@@ -121,4 +117,3 @@ article .nav-tabs .nav-link::after {
|
|
121
117
|
article table {
|
122
118
|
width: 100%;
|
123
119
|
}
|
124
|
-
|
@@ -7,21 +7,20 @@
|
|
7
7
|
#TableOfContents ul ul,
|
8
8
|
#TableOfContents ul ul li {
|
9
9
|
list-style: none;
|
10
|
-
padding-left: 0 !important;
|
11
10
|
text-indent: 10px;
|
12
11
|
}
|
13
12
|
|
14
13
|
// right menu
|
15
14
|
#TableOfContents li a {
|
16
|
-
border-left: 1px solid transparent;
|
17
|
-
font-size: 13px;
|
18
|
-
padding-bottom: 0.3rem;
|
19
15
|
padding-top: 0.3rem;
|
16
|
+
padding-bottom: 0.3rem;
|
17
|
+
font-size: 13px;
|
18
|
+
border-left: 1px solid transparent;
|
20
19
|
}
|
21
20
|
|
22
21
|
.menu-right a {
|
23
|
-
color: #171c1e;
|
24
22
|
font-size: 13px;
|
23
|
+
color: #171c1e;
|
25
24
|
}
|
26
25
|
|
27
26
|
[data-bs-theme="dark"] {
|
@@ -51,6 +50,6 @@ hr {
|
|
51
50
|
|
52
51
|
// scrollspy color
|
53
52
|
.menu-right #TableOfContents li .active {
|
54
|
-
border-left: 1px solid #0d6aa8 !important;
|
55
53
|
color: #000 !important;
|
54
|
+
border-left: 1px solid #0d6aa8 !important;
|
56
55
|
}
|
@@ -29,8 +29,8 @@
|
|
29
29
|
/* SM */
|
30
30
|
@media (max-width: 767px) {
|
31
31
|
#sidebar.show {
|
32
|
-
|
33
|
-
width: 100%
|
32
|
+
width: calc(100% - 68px) !important;
|
33
|
+
min-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
|
-
|
41
|
+
.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
|
-
display: inline-block;
|
50
49
|
width: 50%;
|
50
|
+
display: inline-block;
|
51
51
|
}
|
52
52
|
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
.search-container {
|
2
|
+
width: 40px;
|
3
|
+
left: -12px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.form-control-search {
|
7
|
+
background-image: url("https://cdn.jsdelivr.net/npm/@trimble-oss/modus-icons@1.3.1/dist/modus-solid/svg/search.svg");
|
8
|
+
background-position: 5px center;
|
9
|
+
background-repeat: no-repeat;
|
10
|
+
border-left: 0;
|
11
|
+
border-right: 0;
|
12
|
+
padding: 0;
|
13
|
+
width: 0 !important;
|
14
|
+
z-index: 1210;
|
15
|
+
transition: all 0.2s;
|
16
|
+
left: auto;
|
17
|
+
top: 10px;
|
18
|
+
right: 5px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.form-control-search:focus {
|
22
|
+
width: 363px !important;
|
23
|
+
max-width: calc(100vw - 200px);
|
24
|
+
text-indent: 18px;
|
25
|
+
padding: 0 4px 4px 16px;
|
26
|
+
visibility: visible;
|
27
|
+
}
|
28
|
+
|
29
|
+
.form-control-search:focus + .btn-search {
|
30
|
+
transition: all 1s;
|
31
|
+
background-color: transparent;
|
32
|
+
pointer-events: none !important;
|
33
|
+
}
|
34
|
+
|
35
|
+
.form-control-search:focus + .btn-search img {
|
36
|
+
opacity: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
.btn-search {
|
40
|
+
top: 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
.btn-search i {
|
44
|
+
margin-top: 18px;
|
45
|
+
}
|
46
|
+
|
47
|
+
[data-bs-theme="dark"] .form-control-search {
|
48
|
+
background-image: url("/img/icons/search-white.svg") !important;
|
49
|
+
}
|
50
|
+
|
51
|
+
[data-bs-theme="dark"] .btn-search img {
|
52
|
+
filter: invert(1);
|
53
|
+
}
|
@@ -40,7 +40,7 @@
|
|
40
40
|
}
|
41
41
|
|
42
42
|
.col-main {
|
43
|
-
width:
|
43
|
+
max-width: calc(100vw - 81px);
|
44
44
|
}
|
45
45
|
|
46
46
|
.collapse-horizontal.collapse:not(.show) {
|
@@ -48,16 +48,16 @@
|
|
48
48
|
}
|
49
49
|
|
50
50
|
.row-main {
|
51
|
-
|
51
|
+
height: calc(100dvh - 66px);
|
52
52
|
}
|
53
53
|
|
54
54
|
#sidebar.collapsing {
|
55
|
-
transition: none
|
55
|
+
transition: none;
|
56
56
|
}
|
57
57
|
|
58
58
|
#sidebar.collapsing + div,
|
59
59
|
#sidebar.show + div {
|
60
|
-
max-width:
|
60
|
+
max-width: calc(100vw - 332px);
|
61
61
|
}
|
62
62
|
|
63
63
|
.col-sidebar .sticky-offset {
|
@@ -3,11 +3,11 @@
|
|
3
3
|
}
|
4
4
|
|
5
5
|
.sun-and-moon > :is(.moon, .sun) {
|
6
|
-
fill:
|
6
|
+
fill: var(--icon-fill);
|
7
7
|
}
|
8
8
|
|
9
9
|
.sun-and-moon > .sun-beams {
|
10
|
-
stroke:
|
10
|
+
stroke: var(--icon-fill);
|
11
11
|
stroke-width: 2px;
|
12
12
|
}
|
13
13
|
|
@@ -44,10 +44,14 @@
|
|
44
44
|
}
|
45
45
|
}
|
46
46
|
|
47
|
+
[data-bs-theme="dark"] .sun-and-moon > :is(.moon, .sun) {
|
48
|
+
fill: rgb(255, 255, 255);
|
49
|
+
}
|
50
|
+
|
47
51
|
[data-bs-theme="dark"] .sun-and-moon > .sun {
|
48
52
|
transform: scale(1.75);
|
49
|
-
transition-duration: 0.25s;
|
50
53
|
transition-timing-function: cubic-bezier(0.25, 0, 0.3, 1);
|
54
|
+
transition-duration: 0.25s;
|
51
55
|
}
|
52
56
|
|
53
57
|
[data-bs-theme="dark"] .sun-and-moon > .sun-beams {
|
@@ -62,15 +66,17 @@
|
|
62
66
|
}
|
63
67
|
|
64
68
|
.theme-toggle {
|
69
|
+
--icon-fill: rgb(0, 0, 0);
|
70
|
+
|
65
71
|
aspect-ratio: 1;
|
66
72
|
cursor: pointer;
|
67
|
-
-webkit-tap-highlight-color: transparent;
|
68
73
|
touch-action: manipulation;
|
74
|
+
-webkit-tap-highlight-color: transparent;
|
69
75
|
}
|
70
76
|
|
71
77
|
.theme-toggle > svg {
|
72
|
-
block-size: 100%;
|
73
78
|
inline-size: 100%;
|
79
|
+
block-size: 100%;
|
74
80
|
max-height: 18px;
|
75
81
|
max-width: 18px;
|
76
82
|
stroke-linecap: round;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.feedback {
|
2
|
-
border-color: #90939f;
|
2
|
+
border-color: #90939f !important;
|
3
3
|
}
|
4
4
|
|
5
5
|
.btn-feedback {
|
6
|
-
min-width: 32px;
|
7
6
|
opacity: 0.7;
|
7
|
+
min-width: 32px;
|
8
8
|
}
|
9
9
|
|
10
10
|
.btn-feedback svg {
|
@@ -16,8 +16,8 @@
|
|
16
16
|
}
|
17
17
|
|
18
18
|
.btn-feedback[disabled] {
|
19
|
-
cursor: default;
|
20
19
|
opacity: 0.4;
|
20
|
+
cursor: default;
|
21
21
|
pointer-events: none;
|
22
22
|
}
|
23
23
|
|
@@ -4,10 +4,11 @@
|
|
4
4
|
@import "autocomplete"; // search autocomplete dropdown
|
5
5
|
@import "article";
|
6
6
|
@import "cards";
|
7
|
+
@import "col-sidebar"; // 1st column
|
7
8
|
@import "codefences"; // code syntax highlighting
|
8
9
|
@import "codefences-dark"; // code syntax highlighting
|
9
10
|
@import "javascript-disabled"; // display message at top if JS is disabled
|
10
|
-
@import "
|
11
|
+
// @import "list-js";
|
11
12
|
@import "sidebar";
|
12
13
|
@import "menu-right"; // 'On this page' menu
|
13
14
|
@import "mobile"; // optimizations for xxs mobile screens
|
@@ -16,8 +17,7 @@
|
|
16
17
|
@import "news";
|
17
18
|
@import "posts";
|
18
19
|
@import "print";
|
19
|
-
|
20
|
-
// @import "scroll-to-top-btn";
|
20
|
+
@import "scroll-to-top-btn";
|
21
21
|
@import "skippy"; // skip to content accessibility
|
22
22
|
@import "tables";
|
23
23
|
@import "footer";
|
@@ -40,7 +40,7 @@ h6 {
|
|
40
40
|
}
|
41
41
|
|
42
42
|
// underline links
|
43
|
-
main a
|
43
|
+
main 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 -
|
65
|
+
min-height: calc(100vh - 418px);
|
66
66
|
}
|
package/data/navbar_apps.yml
CHANGED
@@ -1,19 +1,15 @@
|
|
1
|
-
- title: Modus Style Guide
|
2
|
-
icon: "/img/icons/trimble.svg"
|
3
|
-
url: "https://modus.trimble.com/"
|
4
|
-
|
5
1
|
- title: Modus Web Components
|
6
|
-
icon: "
|
2
|
+
icon: ""
|
7
3
|
url: "https://modus-web-components.trimble.com/"
|
8
4
|
|
9
5
|
- title: Modus Icons
|
10
|
-
icon: "
|
6
|
+
icon: ""
|
11
7
|
url: "https://modus-icons.trimble.com"
|
12
8
|
|
13
9
|
- title: Modus Bootstrap
|
14
|
-
icon: "
|
10
|
+
icon: ""
|
15
11
|
url: "https://modus-bootstrap.trimble.com/"
|
16
12
|
|
17
13
|
- title: Modus on GitHub
|
18
|
-
icon: "
|
14
|
+
icon: ""
|
19
15
|
url: "https://github.com/trimble-oss/?q=modus&type=all&language=&sort=stargazers"
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<h{{ .Level }} id="{{
|
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 ) }}
|
5
5
|
h2 mt-5 {{- end -}}
|
6
6
|
{{- if (eq .Level 4 ) }}h4 fw-bold mt-3{{- end -}}{{ if eq .Anchor "use-when" }} text-success{{- end -}}{{ if eq .Anchor "dont-use-when" }} text-danger{{- end -}}">
|
7
7
|
{{ if eq .Anchor "use-when" }}
|
8
|
-
<svg width="18" height="18" fill="currentColor" class="mx-1 mb-1"
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="mx-1 mb-1"
|
9
9
|
viewBox="0 0 24 24">
|
10
10
|
<path
|
11
11
|
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm5.56 7.74-6.39 6.4a1 1 0 0 1-1.42-.01l-3.3-3.34-.01-.01a.993.993 0 0 1 .01-1.4.996.996 0 0 1 1.41 0l2.6 2.62 5.68-5.69a.996.996 0 0 1 1.41 0v.02h.01c.39.39.39 1.02 0 1.41Z" />
|
12
12
|
</svg>{{- end -}}
|
13
13
|
{{- if eq .Anchor "dont-use-when" -}}
|
14
|
-
<svg width="18" height="18" fill="currentColor" class="mx-1 mb-1"
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="mx-1 mb-1"
|
15
15
|
viewBox="0 0 24 24">
|
16
16
|
<path
|
17
17
|
d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2Zm4.3 14.3a.996.996 0 0 1-1.41 0L12 13.41 9.11 16.3a.996.996 0 1 1-1.41-1.41L10.59 12 7.7 9.11A.996.996 0 1 1 9.11 7.7L12 10.59l2.89-2.89a.996.996 0 1 1 1.41 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41Z" />
|
@@ -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="{{
|
2
|
-
{{- end -}}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener" {{
|
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,6 +1,5 @@
|
|
1
1
|
<!doctype html>
|
2
|
-
<html lang="{{ with .
|
3
|
-
class="h-100 no-js {{ with .Page.Params.html_class }}{{ . -}}{{- end -}}">
|
2
|
+
<html lang="en-US" class="h-100 no-js {{ with .Page.Params.html_class }}{{ . -}}{{- end -}}">
|
4
3
|
|
5
4
|
<head>
|
6
5
|
{{ partial "meta" . }}
|
@@ -28,10 +27,7 @@
|
|
28
27
|
if (event.which === 27) {
|
29
28
|
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
30
29
|
tooltipTriggerList.forEach(function (tooltipTriggerEl) {
|
31
|
-
|
32
|
-
if (bootstrapTooltip) {
|
33
|
-
bootstrapTooltip.hide();
|
34
|
-
}
|
30
|
+
$(tooltipTriggerEl).tooltip('hide');
|
35
31
|
});
|
36
32
|
}
|
37
33
|
});
|
@@ -41,8 +37,6 @@
|
|
41
37
|
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
|
42
38
|
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
|
43
39
|
</script>
|
44
|
-
|
45
|
-
{{- if not .IsHome -}}
|
46
40
|
<script>
|
47
41
|
// Disable all links with #
|
48
42
|
var links = document.querySelectorAll('a[href="#"]');
|
@@ -54,6 +48,7 @@
|
|
54
48
|
});
|
55
49
|
});
|
56
50
|
</script>
|
51
|
+
{{- if not .IsHome -}}
|
57
52
|
<script>
|
58
53
|
// Change Submit buttons within docs examples to type=button
|
59
54
|
var article = document.querySelector('article');
|
@@ -68,4 +63,4 @@
|
|
68
63
|
{{- end -}}
|
69
64
|
</body>
|
70
65
|
|
71
|
-
</html>
|
66
|
+
</html>
|
@@ -2,13 +2,18 @@
|
|
2
2
|
|
3
3
|
<div class="container-fluid">
|
4
4
|
<div class="row row-main px-0">
|
5
|
+
|
6
|
+
<div class="col-1 col-sidebar px-0 bg-body shadow-sm">
|
7
|
+
{{ partial "col-sidebar" . }}
|
8
|
+
</div>
|
9
|
+
|
5
10
|
<div class="col col-auto px-0 collapse collapse-horizontal bg-dark bg-opacity-10" id="sidebar">
|
6
11
|
<div id="sidebar-menu" class="z-2 sticky-top sticky-offset shadow-sm overflow-auto w-100">
|
7
12
|
{{ partial "col-sidebar-menu" . }}
|
8
13
|
</div>
|
9
14
|
</div>
|
10
15
|
|
11
|
-
<div class="col col-
|
16
|
+
<div class="col col-auto col-12 col-main border-start p-0 overflow-x-hidden">
|
12
17
|
|
13
18
|
<main id="main" class="container">
|
14
19
|
|
@@ -16,11 +21,11 @@
|
|
16
21
|
|
17
22
|
</main>
|
18
23
|
|
19
|
-
<footer class="p-2 footer py-4 bg-secondary bg-opacity-10
|
24
|
+
<footer class="p-2 footer py-4 bg-secondary bg-opacity-10">
|
20
25
|
{{ partial "footer" . }}
|
21
26
|
</footer>
|
22
27
|
</div>
|
23
28
|
|
24
29
|
</div>
|
25
30
|
</div>
|
26
|
-
{{- end -}}
|
31
|
+
{{- end -}}
|
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
<div class="container-fluid">
|
4
4
|
<div class="row row-main px-0">
|
5
|
+
|
6
|
+
<div class="col-1 col-sidebar px-0 bg-body shadow-sm">
|
7
|
+
{{ partial "col-sidebar" . }}
|
8
|
+
</div>
|
9
|
+
|
5
10
|
<div class="col col-auto px-0 collapse collapse-horizontal bg-dark bg-opacity-10 show" id="sidebar">
|
6
11
|
<div id="sidebar-menu" class="sticky-top sticky-offset shadow-sm overflow-auto"
|
7
12
|
style="min-height: calc(100vh - 66px);max-height: calc(100vh - 66px);">
|
@@ -9,7 +14,7 @@
|
|
9
14
|
</div>
|
10
15
|
</div>
|
11
16
|
|
12
|
-
<div class="col col-
|
17
|
+
<div class="col col-auto col-12 col-main border-start p-0">
|
13
18
|
<div class="mx-auto mw-100">
|
14
19
|
|
15
20
|
{{ partial "header" . }}
|
@@ -33,4 +38,4 @@
|
|
33
38
|
|
34
39
|
</div>
|
35
40
|
</div>
|
36
|
-
{{- end -}}
|
41
|
+
{{- end -}}
|