mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Merge of features tied to 'Trinidad Scorpion' funding goal
This commit is contained in:
parent
a3f457ecb1
commit
e2556d84d6
@ -1,3 +1,12 @@
|
||||
mkdocs-material-8.3.0 (2022-06-02)
|
||||
|
||||
* Added support for custom admonition icons
|
||||
* Added support for linking of content tabs
|
||||
* Added support for boosting pages in search
|
||||
* Added previous/next next indicators to content tabs
|
||||
* Improved typeset link colors in light and dark modes
|
||||
* Fixed #3954: add option to hide footer navigation
|
||||
|
||||
mkdocs-material-8.2.16+insiders-4.16.2 (2022-05-28)
|
||||
|
||||
* Fixed #3961: Nested sections triggered build error for navigation tabs
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
Binary file not shown.
Before Width: | Height: | Size: 46 KiB |
@ -6,6 +6,15 @@ template: overrides/main.html
|
||||
|
||||
## Material for MkDocs
|
||||
|
||||
### 8.3.0 <small>_ June 2, 2022</small> { id="8.3.0" }
|
||||
|
||||
- Added support for custom admonition icons
|
||||
- Added support for linking of content tabs
|
||||
- Added support for boosting pages in search
|
||||
- Added previous/next next indicators to content tabs
|
||||
- Fixed #3954: add option to hide footer navigation
|
||||
- Improved typeset link colors in light and dark modes
|
||||
|
||||
### 8.2.16 <small>_ May 28, 2022</small> { id="8.2.16" }
|
||||
|
||||
- Fixed #3957: Only animate code annotations when visible (save CPU cycles)
|
||||
|
@ -195,9 +195,6 @@ which are currently exclusively available to sponsors:
|
||||
- [x] [Excluding content from search]
|
||||
- [x] [Social cards]
|
||||
- [x] [Cookie consent]
|
||||
- [x] [Linking content tabs]
|
||||
- [x] [Boosting pages in search]
|
||||
- [x] [Custom admonition icons]
|
||||
|
||||
</div>
|
||||
|
||||
@ -211,16 +208,6 @@ features prefixed with a checkmark symbol, denoting whether a feature is
|
||||
:octicons-check-circle-fill-24:{ style="color: var(--md-default-fg-color--lightest)" } planned, but not yet implemented. When the funding goal is hit, the features
|
||||
are released for general availability.
|
||||
|
||||
#### $ 6,000 – Trinidad Scorpion
|
||||
|
||||
- [x] [Boosting pages in search]
|
||||
- [x] [Custom admonition icons]
|
||||
- [x] [Linking content tabs]
|
||||
|
||||
[Boosting pages in search]: ../setup/setting-up-site-search.md#search-boosting
|
||||
[Custom admonition icons]: ../reference/admonitions.md#admonition-icons
|
||||
[Linking content tabs]: ../reference/content-tabs.md#linked-content-tabs
|
||||
|
||||
#### $ 7,000 – Royal Gold
|
||||
|
||||
- [x] [Cookie consent]
|
||||
@ -296,6 +283,16 @@ This section lists all funding goals that were previously completed, which means
|
||||
that those features were part of Insiders, but are now generally available and
|
||||
can be used by all users.
|
||||
|
||||
#### $ 6,000 – Trinidad Scorpion
|
||||
|
||||
- [x] [Boosting pages in search]
|
||||
- [x] [Custom admonition icons]
|
||||
- [x] [Linking content tabs]
|
||||
|
||||
[Boosting pages in search]: ../setup/setting-up-site-search.md#search-boosting
|
||||
[Custom admonition icons]: ../reference/admonitions.md#admonition-icons
|
||||
[Linking content tabs]: ../reference/content-tabs.md#linked-content-tabs
|
||||
|
||||
#### $ 5,000 – Aji Panca
|
||||
|
||||
- [x] [Mermaid.js integration]
|
||||
|
@ -35,8 +35,8 @@ See additional configuration options:
|
||||
|
||||
### Admonition icons
|
||||
|
||||
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
|
||||
[:octicons-tag-24: insiders-2.4.0][Insiders]
|
||||
[:octicons-tag-24: 8.3.0][icon support] ·
|
||||
:octicons-beaker-24: Experimental
|
||||
|
||||
Each of the supported admonition types has a distinct icon, which can be changed
|
||||
to any icon bundled with the theme, or even a [custom icon]. Add the following
|
||||
@ -82,12 +82,6 @@ theme:
|
||||
quote: octicons/quote-16
|
||||
```
|
||||
|
||||
<div class="result" markdown>
|
||||
|
||||
[![Octicons]][Octicons]
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
=== ":fontawesome-brands-font-awesome: FontAwesome"
|
||||
|
||||
@ -109,18 +103,10 @@ theme:
|
||||
quote: fontawesome/solid/quote-left
|
||||
```
|
||||
|
||||
<div class="result" markdown>
|
||||
|
||||
[![FontAwesome]][FontAwesome]
|
||||
|
||||
</div>
|
||||
|
||||
[Insiders]: ../insiders/index.md
|
||||
[icon support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.3.0
|
||||
[custom icon]: ../setup/changing-the-logo-and-icons.md#additional-icons
|
||||
[supported types]: #supported-types
|
||||
[icon search]: icons-emojis.md#search
|
||||
[Octicons]: ../assets/screenshots/admonition-octicons.png
|
||||
[FontAwesome]: ../assets/screenshots/admonition-fontawesome.png
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -46,8 +46,7 @@ See additional configuration options:
|
||||
### Code annotations
|
||||
|
||||
[:octicons-tag-24: 8.0.0][Code annotations support] ·
|
||||
:octicons-unlock-24: Feature flag ·
|
||||
:octicons-beaker-24: Experimental
|
||||
:octicons-unlock-24: Feature flag
|
||||
|
||||
Code annotations offer a comfortable and friendly way to attach arbitrary
|
||||
content to specific sections of code blocks by adding numeric markers in block
|
||||
@ -127,8 +126,7 @@ import tensorflow as tf
|
||||
|
||||
### Adding a title
|
||||
|
||||
[:octicons-tag-24: 7.3.6][Title support] ·
|
||||
:octicons-beaker-24: Experimental
|
||||
[:octicons-tag-24: 7.3.6][Title support]
|
||||
|
||||
In order to provide additional context, a custom title can be added to a code
|
||||
block by using the `title="<custom title>"` option directly after the shortcode,
|
||||
|
@ -33,8 +33,7 @@ See additional configuration options:
|
||||
|
||||
### Linked content tabs
|
||||
|
||||
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
|
||||
[:octicons-tag-24: insiders-2.9.0][Insiders] ·
|
||||
[:octicons-tag-24: 8.3.0][link support] ·
|
||||
:octicons-unlock-24: Feature flag ·
|
||||
:octicons-beaker-24: Experimental
|
||||
|
||||
@ -61,7 +60,7 @@ integrated with [instant loading] and persisted across page loads.
|
||||
|
||||
[![content.tabs.link disabled]][content.tabs.link disabled]
|
||||
|
||||
[Insiders]: ../insiders/index.md
|
||||
[link support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.3.0
|
||||
[instant loading]: ../setup/setting-up-navigation.md#instant-loading
|
||||
[content.tabs.link enabled]: ../assets/screenshots/content-tabs-link.png
|
||||
[content.tabs.link disabled]: ../assets/screenshots/content-tabs.png
|
||||
|
@ -17,8 +17,7 @@ support for many of its features.
|
||||
|
||||
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
|
||||
[:octicons-tag-24: insiders-4.10.0][Insiders] ·
|
||||
:octicons-cpu-24: Plugin ·
|
||||
:octicons-beaker-24: Experimental
|
||||
:octicons-cpu-24: Plugin
|
||||
|
||||
The built-in offline plugin makes sure that the [site search] works when you
|
||||
distribute the contents of your [site directory] as a download. Simply add
|
||||
|
@ -96,8 +96,7 @@ theme:
|
||||
#### Sticky navigation tabs
|
||||
|
||||
[:octicons-tag-24: 7.3.0][navigation.tabs.sticky support] ·
|
||||
:octicons-unlock-24: Feature flag ·
|
||||
:octicons-beaker-24: Experimental
|
||||
:octicons-unlock-24: Feature flag
|
||||
|
||||
When sticky tabs are enabled, navigation tabs will lock below the header and
|
||||
always remain visible when scrolling down. Just add the following two feature
|
||||
@ -211,8 +210,7 @@ page in that section (or the section index page).
|
||||
### Section index pages
|
||||
|
||||
[:octicons-tag-24: 7.3.0][navigation.indexes support] ·
|
||||
:octicons-unlock-24: Feature flag ·
|
||||
:octicons-beaker-24: Experimental
|
||||
:octicons-unlock-24: Feature flag
|
||||
|
||||
When section index pages are enabled, documents can be directly attached to
|
||||
sections, which is particularly useful for providing overview pages. Add the
|
||||
|
@ -316,8 +316,8 @@ clipboard.
|
||||
|
||||
### Search boosting
|
||||
|
||||
[:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
|
||||
[:octicons-tag-24: insiders-2.8.0][Insiders]
|
||||
[:octicons-tag-24: 8.3.0][boost support] ·
|
||||
:octicons-beaker-24: Experimental
|
||||
|
||||
When [Metadata] is enabled, pages can be boosted in search with custom front
|
||||
matter, which will make them rank higher. Add the following lines at the top of
|
||||
@ -336,6 +336,7 @@ search:
|
||||
1. :woman_in_lotus_position: When boosting pages, be gentle and start with
|
||||
__low values__.
|
||||
|
||||
[boost support]: https://github.com/squidfunk/mkdocs-material/releases/tag/8.3.0
|
||||
[Metadata]: extensions/python-markdown.md#metadata
|
||||
|
||||
### Search exclusion
|
||||
|
29
material/assets/javascripts/bundle.0f659f14.min.js
vendored
Normal file
29
material/assets/javascripts/bundle.0f659f14.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -43,6 +43,6 @@
|
||||
* Copyright(c) 2015 Andreas Lubbe
|
||||
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
||||
* MIT Licensed
|
||||
*/var Le=/["'&<>]/;ne.exports=we;function we(t){var e=""+t,r=Le.exec(e);if(!r)return e;var n,i="",s=0,o=0;for(s=r.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}o!==s&&(i+=e.substring(o,s)),o=s+1,i+=n}return o!==s?i+e.substring(o,s):i}});var le=H(re());Object.entries||(Object.entries=function(t){let e=[];for(let r of Object.keys(t))e.push([r,t[r]]);return e});Object.values||(Object.values=function(t){let e=[];for(let r of Object.keys(t))e.push(t[r]);return e});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(t,e){typeof t=="object"?(this.scrollLeft=t.left,this.scrollTop=t.top):(this.scrollLeft=t,this.scrollTop=e)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...t){let e=this.parentNode;if(e){t.length===0&&e.removeChild(this);for(let r=t.length-1;r>=0;r--){let n=t[r];typeof n!="object"?n=document.createTextNode(n):n.parentNode&&n.parentNode.removeChild(n),r?e.insertBefore(this.previousSibling,n):e.replaceChild(n,this)}}}));var ie=H(q());function se(t){let e=new Map,r=new Set;for(let n of t){let[i,s]=n.location.split("#"),o=n.location,a=n.title,u=n.tags,c=(0,ie.default)(n.text).replace(/\s+(?=[,.:;!?])/g,"").replace(/\s+/g," ");if(s){let h=e.get(i);r.has(h)?e.set(o,{location:o,title:a,text:c,parent:h}):(h.title=n.title,h.text=c,r.add(h))}else e.set(o,M({location:o,title:a,text:c},u&&{tags:u}))}return e}var oe=H(q());function ae(t,e){let r=new RegExp(t.separator,"img"),n=(i,s,o)=>`${s}<mark data-md-highlight>${o}</mark>`;return i=>{i=i.replace(/[\s*+\-:~^]+/g," ").trim();let s=new RegExp(`(^|${t.separator})(${i.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return o=>(e?(0,oe.default)(o):o).replace(s,n).replace(/<\/mark>(\s+)<mark[^>]*>/img,"$1")}}function ue(t){let e=new lunr.Query(["title","text"]);return new lunr.QueryParser(t,e).parse(),e.clauses}function ce(t,e){var i;let r=new Set(t),n={};for(let s=0;s<e.length;s++)for(let o of r)e[s].startsWith(o.term)&&(n[o.term]=!0,r.delete(o));for(let s of r)(i=lunr.stopWordFilter)!=null&&i.call(lunr,s.term)&&(n[s.term]=!1);return n}function Ee(t,e){let[r,n]=[new Set(t),new Set(e)];return[...new Set([...r].filter(i=>!n.has(i)))]}var U=class{constructor({config:e,docs:r,options:n}){this.options=n,this.documents=se(r),this.highlight=ae(e,!1),lunr.tokenizer.separator=new RegExp(e.separator),this.index=lunr(function(){e.lang.length===1&&e.lang[0]!=="en"?this.use(lunr[e.lang[0]]):e.lang.length>1&&this.use(lunr.multiLanguage(...e.lang));let i=Ee(["trimmer","stopWordFilter","stemmer"],n.pipeline);for(let s of e.lang.map(o=>o==="en"?lunr:lunr[o]))for(let o of i)this.pipeline.remove(s[o]),this.searchPipeline.remove(s[o]);this.ref("location"),this.field("title",{boost:1e3}),this.field("text"),this.field("tags",{boost:1e6});for(let s of r)this.add(s)})}search(e){if(e)try{let r=this.highlight(e),n=ue(e).filter(o=>o.presence!==lunr.Query.presence.PROHIBITED),i=this.index.search(`${e}*`).reduce((o,{ref:a,score:u,matchData:c})=>{let h=this.documents.get(a);if(typeof h!="undefined"){let{location:y,title:g,text:b,tags:m,parent:Q}=h,p=ce(n,Object.keys(c.metadata)),d=+!Q+ +Object.values(p).every(w=>w);o.push(Z(M({location:y,title:r(g),text:r(b)},m&&{tags:m.map(r)}),{score:u*(1+d),terms:p}))}return o},[]).sort((o,a)=>a.score-o.score).reduce((o,a)=>{let u=this.documents.get(a.location);if(typeof u!="undefined"){let c="parent"in u?u.parent.location:u.location;o.set(c,[...o.get(c)||[],a])}return o},new Map),s;if(this.options.suggestions){let o=this.index.query(a=>{for(let u of n)a.term(u.term,{fields:["title"],presence:lunr.Query.presence.REQUIRED,wildcard:lunr.Query.wildcard.TRAILING})});s=o.length?Object.keys(o[0].matchData.metadata):[]}return M({items:[...i.values()]},typeof s!="undefined"&&{suggestions:s})}catch(r){console.warn(`Invalid query: ${e} \u2013 see https://bit.ly/2s3ChXG`)}return{items:[]}}};var Y;function ke(t){return z(this,null,function*(){let e="../lunr";if(typeof parent!="undefined"&&"IFrameWorker"in parent){let n=document.querySelector("script[src]"),[i]=n.src.split("/worker");e=e.replace("..",i)}let r=[];for(let n of t.lang){switch(n){case"ja":r.push(`${e}/tinyseg.js`);break;case"hi":case"th":r.push(`${e}/wordcut.js`);break}n!=="en"&&r.push(`${e}/min/lunr.${n}.min.js`)}t.lang.length>1&&r.push(`${e}/min/lunr.multi.min.js`),r.length&&(yield importScripts(`${e}/min/lunr.stemmer.support.min.js`,...r))})}function Te(t){return z(this,null,function*(){switch(t.type){case 0:return yield ke(t.data.config),Y=new U(t.data),{type:1};case 2:return{type:3,data:Y?Y.search(t.data):{items:[]}};default:throw new TypeError("Invalid message type")}})}self.lunr=le.default;addEventListener("message",t=>z(void 0,null,function*(){postMessage(yield Te(t.data))}));})();
|
||||
//# sourceMappingURL=search.e82c77d7.min.js.map
|
||||
*/var Le=/["'&<>]/;ne.exports=we;function we(t){var e=""+t,r=Le.exec(e);if(!r)return e;var n,i="",s=0,o=0;for(s=r.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}o!==s&&(i+=e.substring(o,s)),o=s+1,i+=n}return o!==s?i+e.substring(o,s):i}});var le=H(re());Object.entries||(Object.entries=function(t){let e=[];for(let r of Object.keys(t))e.push([r,t[r]]);return e});Object.values||(Object.values=function(t){let e=[];for(let r of Object.keys(t))e.push(t[r]);return e});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(t,e){typeof t=="object"?(this.scrollLeft=t.left,this.scrollTop=t.top):(this.scrollLeft=t,this.scrollTop=e)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...t){let e=this.parentNode;if(e){t.length===0&&e.removeChild(this);for(let r=t.length-1;r>=0;r--){let n=t[r];typeof n!="object"?n=document.createTextNode(n):n.parentNode&&n.parentNode.removeChild(n),r?e.insertBefore(this.previousSibling,n):e.replaceChild(n,this)}}}));var ie=H(q());function se(t){let e=new Map,r=new Set;for(let n of t){let[i,s]=n.location.split("#"),o=n.location,a=n.title,u=n.tags,c=(0,ie.default)(n.text).replace(/\s+(?=[,.:;!?])/g,"").replace(/\s+/g," ");if(s){let h=e.get(i);r.has(h)?e.set(o,{location:o,title:a,text:c,parent:h}):(h.title=n.title,h.text=c,r.add(h))}else e.set(o,M({location:o,title:a,text:c},u&&{tags:u}))}return e}var oe=H(q());function ae(t,e){let r=new RegExp(t.separator,"img"),n=(i,s,o)=>`${s}<mark data-md-highlight>${o}</mark>`;return i=>{i=i.replace(/[\s*+\-:~^]+/g," ").trim();let s=new RegExp(`(^|${t.separator})(${i.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return o=>(e?(0,oe.default)(o):o).replace(s,n).replace(/<\/mark>(\s+)<mark[^>]*>/img,"$1")}}function ue(t){let e=new lunr.Query(["title","text"]);return new lunr.QueryParser(t,e).parse(),e.clauses}function ce(t,e){var i;let r=new Set(t),n={};for(let s=0;s<e.length;s++)for(let o of r)e[s].startsWith(o.term)&&(n[o.term]=!0,r.delete(o));for(let s of r)(i=lunr.stopWordFilter)!=null&&i.call(lunr,s.term)&&(n[s.term]=!1);return n}function Ee(t,e){let[r,n]=[new Set(t),new Set(e)];return[...new Set([...r].filter(i=>!n.has(i)))]}var U=class{constructor({config:e,docs:r,options:n}){this.options=n,this.documents=se(r),this.highlight=ae(e,!1),lunr.tokenizer.separator=new RegExp(e.separator),this.index=lunr(function(){e.lang.length===1&&e.lang[0]!=="en"?this.use(lunr[e.lang[0]]):e.lang.length>1&&this.use(lunr.multiLanguage(...e.lang));let i=Ee(["trimmer","stopWordFilter","stemmer"],n.pipeline);for(let s of e.lang.map(o=>o==="en"?lunr:lunr[o]))for(let o of i)this.pipeline.remove(s[o]),this.searchPipeline.remove(s[o]);this.ref("location"),this.field("title",{boost:1e3}),this.field("text"),this.field("tags",{boost:1e6});for(let s of r)this.add(s,{boost:s.boost})})}search(e){if(e)try{let r=this.highlight(e),n=ue(e).filter(o=>o.presence!==lunr.Query.presence.PROHIBITED),i=this.index.search(`${e}*`).reduce((o,{ref:a,score:u,matchData:c})=>{let h=this.documents.get(a);if(typeof h!="undefined"){let{location:y,title:g,text:b,tags:m,parent:Q}=h,p=ce(n,Object.keys(c.metadata)),d=+!Q+ +Object.values(p).every(w=>w);o.push(Z(M({location:y,title:r(g),text:r(b)},m&&{tags:m.map(r)}),{score:u*(1+d),terms:p}))}return o},[]).sort((o,a)=>a.score-o.score).reduce((o,a)=>{let u=this.documents.get(a.location);if(typeof u!="undefined"){let c="parent"in u?u.parent.location:u.location;o.set(c,[...o.get(c)||[],a])}return o},new Map),s;if(this.options.suggestions){let o=this.index.query(a=>{for(let u of n)a.term(u.term,{fields:["title"],presence:lunr.Query.presence.REQUIRED,wildcard:lunr.Query.wildcard.TRAILING})});s=o.length?Object.keys(o[0].matchData.metadata):[]}return M({items:[...i.values()]},typeof s!="undefined"&&{suggestions:s})}catch(r){console.warn(`Invalid query: ${e} \u2013 see https://bit.ly/2s3ChXG`)}return{items:[]}}};var Y;function ke(t){return z(this,null,function*(){let e="../lunr";if(typeof parent!="undefined"&&"IFrameWorker"in parent){let n=document.querySelector("script[src]"),[i]=n.src.split("/worker");e=e.replace("..",i)}let r=[];for(let n of t.lang){switch(n){case"ja":r.push(`${e}/tinyseg.js`);break;case"hi":case"th":r.push(`${e}/wordcut.js`);break}n!=="en"&&r.push(`${e}/min/lunr.${n}.min.js`)}t.lang.length>1&&r.push(`${e}/min/lunr.multi.min.js`),r.length&&(yield importScripts(`${e}/min/lunr.stemmer.support.min.js`,...r))})}function Te(t){return z(this,null,function*(){switch(t.type){case 0:return yield ke(t.data.config),Y=new U(t.data),{type:1};case 2:return{type:3,data:Y?Y.search(t.data):{items:[]}};default:throw new TypeError("Invalid message type")}})}self.lunr=le.default;addEventListener("message",t=>z(void 0,null,function*(){postMessage(yield Te(t.data))}));})();
|
||||
//# sourceMappingURL=search.b028fd86.min.js.map
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/main.fd896c8a.min.css
vendored
Normal file
1
material/assets/stylesheets/main.fd896c8a.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/main.fd896c8a.min.css.map
Normal file
1
material/assets/stylesheets/main.fd896c8a.min.css.map
Normal file
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/palette.cbb835fc.min.css
vendored
Normal file
1
material/assets/stylesheets/palette.cbb835fc.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/palette.cbb835fc.min.css.map
Normal file
1
material/assets/stylesheets/palette.cbb835fc.min.css.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["src/assets/stylesheets/palette/_scheme.scss","../../../src/assets/stylesheets/palette.scss","src/assets/stylesheets/palette/_accent.scss","src/assets/stylesheets/palette/_primary.scss","src/assets/stylesheets/utilities/_break.scss"],"names":[],"mappings":"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","file":"palette.css"}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"version":3,"sources":["src/assets/stylesheets/palette/_accent.scss","../../../src/assets/stylesheets/palette.scss","src/assets/stylesheets/palette/_primary.scss","src/assets/stylesheets/utilities/_break.scss","src/assets/stylesheets/palette/_scheme.scss"],"names":[],"mappings":"AA8CE,2BACE,4BAAA,CACA,oDAAA,CAOE,yBAAA,CACA,8CCnDN,CDyCE,4BACE,4BAAA,CACA,mDAAA,CAOE,yBAAA,CACA,8CC5CN,CDkCE,8BACE,4BAAA,CACA,qDAAA,CAOE,yBAAA,CACA,8CCrCN,CD2BE,mCACE,4BAAA,CACA,qDAAA,CAOE,yBAAA,CACA,8CC9BN,CDoBE,8BACE,4BAAA,CACA,qDAAA,CAOE,yBAAA,CACA,8CCvBN,CDaE,4BACE,4BAAA,CACA,qDAAA,CAOE,yBAAA,CACA,8CChBN,CDME,kCACE,4BAAA,CACA,oDAAA,CAOE,yBAAA,CACA,8CCTN,CDDE,4BACE,4BAAA,CACA,oDAAA,CAOE,yBAAA,CACA,8CCFN,CDRE,4BACE,4BAAA,CACA,oDAAA,CAOE,yBAAA,CACA,8CCKN,CDfE,6BACE,4BAAA,CACA,mDAAA,CAOE,yBAAA,CACA,8CCYN,CDtBE,mCACE,4BAAA,CACA,oDAAA,CAOE,yBAAA,CACA,8CCmBN,CD7BE,4BACE,4BAAA,CACA,oDAAA,CAIE,oCAAA,CACA,2CC6BN,CDpCE,8BACE,4BAAA,CACA,oDAAA,CAIE,oCAAA,CACA,2CCoCN,CD3CE,6BACE,yBAAA,CACA,oDAAA,CAIE,oCAAA,CACA,2CC2CN,CDlDE,8BACE,4BAAA,CACA,oDAAA,CAIE,oCAAA,CACA,2CCkDN,CDzDE,mCACE,4BAAA,CACA,qDAAA,CAOE,yBAAA,CACA,8CCsDN,CC3DE,4BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwDN,CCnEE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgEN,CC3EE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwEN,CCnFE,oCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgFN,CC3FE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwFN,CCnGE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgGN,CC3GE,mCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwGN,CCnHE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgHN,CC3HE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwHN,CCnIE,8BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgIN,CC3IE,oCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwIN,CCnJE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,qCAAA,CACA,4CDmJN,CC3JE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,qCAAA,CACA,4CD2JN,CCnKE,8BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,qCAAA,CACA,4CDmKN,CC3KE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,qCAAA,CACA,4CD2KN,CCnLE,oCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgLN,CC3LE,8BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwLN,CCnME,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDgMN,CC3ME,kCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,+CDwMN,CC9LA,8BACE,0BAAA,CACA,+CAAA,CACA,2CAAA,CACA,qCAAA,CACA,4CAAA,CAGA,4BD+LF,CE9EI,mCD3GA,+CACE,gCD4LJ,CCzLI,qDACE,gCD2LN,CCtLE,iEACE,qBDwLJ,CACF,CEzFI,sCDxFA,uCACE,0CDoLJ,CACF,CC3KA,8BACE,0BAAA,CACA,4CAAA,CACA,gCAAA,CACA,0BAAA,CACA,+CAAA,CAGA,4BD4KF,CCzKE,yCACE,qBD2KJ,CEvFI,wCD7EA,8CACE,gCDuKJ,CACF,CE/GI,mCDjDA,+CACE,oCDmKJ,CChKI,qDACE,mCDkKN,CACF,CEpGI,wCDtDA,iFACE,qBD6JJ,CACF,CE5HI,sCD1BA,uCACE,qBDyJJ,CACF,CGvSA,cAGE,6BAKE,YAAA,CAGA,mDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CACA,mDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CAGA,gDAAA,CACA,gDAAA,CAGA,uCAAA,CACA,iCAAA,CACA,kCAAA,CACA,mCAAA,CACA,mCAAA,CACA,kCAAA,CACA,iCAAA,CACA,+CAAA,CACA,6DAAA,CACA,gEAAA,CACA,4DAAA,CACA,4DAAA,CACA,6DAAA,CAGA,6CAAA,CAGA,+CAAA,CAGA,2CAAA,CAGA,uDAAA,CACA,6DAAA,CACA,2DAAA,CAGA,yDAAA,CAGA,0DAAA,CAGA,qDAAA,CACA,wDHgRF,CG7QE,oHAIE,4BH4QJ,CGxQE,kHAEE,YH0QJ,CGtQE,gHAEE,eHwQJ,CGnQA,+FAGE,iCHsQF,CACF","file":"palette.css"}
|
@ -22,7 +22,7 @@
|
||||
<link rel="canonical" href="{{ page.canonical_url }}">
|
||||
{% endif %}
|
||||
<link rel="icon" href="{{ config.theme.favicon | url }}">
|
||||
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-8.2.16">
|
||||
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-8.3.0">
|
||||
{% endblock %}
|
||||
{% block htmltitle %}
|
||||
{% if page and page.meta and page.meta.title %}
|
||||
@ -34,10 +34,10 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.64b3143d.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.fd896c8a.min.css' | url }}">
|
||||
{% if config.theme.palette %}
|
||||
{% set palette = config.theme.palette %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.cc9b2e1e.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.cbb835fc.min.css' | url }}">
|
||||
{% if palette.primary %}
|
||||
{% import "partials/palette.html" as map %}
|
||||
{% set primary = map.primary(
|
||||
@ -46,6 +46,7 @@
|
||||
<meta name="theme-color" content="{{ primary }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% include "partials/icons.html" %}
|
||||
{% endblock %}
|
||||
{% block libs %}{% endblock %}
|
||||
{% block fonts %}
|
||||
@ -164,10 +165,11 @@
|
||||
{% include "partials/content.html" %}
|
||||
{% endblock %}
|
||||
</article>
|
||||
{% include "partials/javascripts/content.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% if "navigation.top" in features %}
|
||||
<a href="#" class="md-top md-icon" data-md-component="top" data-md-state="hidden">
|
||||
<a href="#" class="md-top md-top--hidden md-icon" data-md-component="top">
|
||||
{% include ".icons/material/arrow-up.svg" %}
|
||||
{{ lang.t('top.title') }}
|
||||
</a>
|
||||
@ -185,7 +187,7 @@
|
||||
"base": base_url,
|
||||
"features": features,
|
||||
"translations": {},
|
||||
"search": "assets/javascripts/workers/search.e82c77d7.min.js" | url
|
||||
"search": "assets/javascripts/workers/search.b028fd86.min.js" | url
|
||||
} -%}
|
||||
{%- if config.extra.version -%}
|
||||
{%- set _ = app.update({ "version": config.extra.version }) -%}
|
||||
@ -214,7 +216,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.3a4b43e5.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.0f659f14.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -19,5 +19,5 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.2bc01bfd.min.js' | url }}"></script>
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.1ff6d521.min.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
|
@ -3,7 +3,8 @@
|
||||
-#}
|
||||
<footer class="md-footer">
|
||||
{% if page.previous_page or page.next_page %}
|
||||
<nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}">
|
||||
{% set hidden = "hidden" if "footer" in page.meta.hide %}
|
||||
<nav class="md-footer__inner md-grid" aria-label="{{ lang.t('footer.title') }}" {{ hidden }}>
|
||||
{% if page.previous_page %}
|
||||
{% set direction = lang.t("footer.previous") %}
|
||||
<a href="{{ page.previous_page.url | url }}" class="md-footer__link md-footer__link--prev" aria-label="{{ direction }}: {{ page.previous_page.title | e }}" rel="prev">
|
||||
|
17
material/partials/icons.html
Normal file
17
material/partials/icons.html
Normal file
@ -0,0 +1,17 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% if config.theme.icon.admonition %}
|
||||
{% set style = ["\x3cstyle\x3e:root{"] %}
|
||||
{% for type, icon in config.theme.icon.admonition.items() %}
|
||||
{% import ".icons/" ~ icon ~ ".svg" as icon %}
|
||||
{% set _ = style.append(
|
||||
"--md-admonition-icon--" ~ type ~ ":" ~
|
||||
"url('data:image/svg+xml;charset=utf-8," ~
|
||||
icon | replace("\n", "") ~
|
||||
"');"
|
||||
) %}
|
||||
{% endfor %}
|
||||
{% set _ = style.append("}\x3c/style\x3e") %}
|
||||
{{ style | join }}
|
||||
{% endif %}
|
6
material/partials/javascripts/content.html
Normal file
6
material/partials/javascripts/content.html
Normal file
@ -0,0 +1,6 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
{% if "content.tabs.link" in features %}
|
||||
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var tab,labels=set.querySelector(".tabbed-labels");for(tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
|
||||
{% endif %}
|
@ -3,7 +3,6 @@
|
||||
-#}
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "el",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "Αντιγραφή στο πρόχειρο",
|
||||
"clipboard.copied": "Αντιγράφηκε στο πρόχειρο",
|
||||
"edit.link.title": "Επεξεργασία αυτής της σελίδας",
|
||||
|
@ -3,7 +3,6 @@
|
||||
-#}
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "it",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "Copia",
|
||||
"clipboard.copied": "Copiato",
|
||||
"edit.link.title": "Modifica",
|
||||
|
@ -3,7 +3,6 @@
|
||||
-#}
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "pt",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "Copiar para área de Transferência",
|
||||
"clipboard.copied": "Copiado para área de Transferência",
|
||||
"edit.link.title": "Editar esta página",
|
||||
|
@ -3,7 +3,6 @@
|
||||
-#}
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "zh",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "复制",
|
||||
"clipboard.copied": "已复制",
|
||||
"edit.link.title": "编辑此页",
|
||||
|
@ -15,7 +15,7 @@
|
||||
<li class="{{ class }} md-nav__item--nested">
|
||||
{% set checked = "checked" if nav_item.active %}
|
||||
{% if "navigation.expand" in features and not checked %}
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="{{ path }}" data-md-state="indeterminate" type="checkbox" id="{{ path }}" checked>
|
||||
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}" checked>
|
||||
{% else %}
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}" {{ checked }}>
|
||||
{% endif %}
|
||||
|
@ -47,3 +47,9 @@ class SearchIndex(BaseIndex):
|
||||
# Add document tags
|
||||
if "tags" in page.meta:
|
||||
entry["tags"] = page.meta["tags"]
|
||||
|
||||
# Add document boost for search
|
||||
if "search" in page.meta:
|
||||
search = page.meta["search"]
|
||||
if "boost" in search:
|
||||
entry["boost"] = search["boost"]
|
||||
|
@ -27,7 +27,6 @@ from markdown.extensions.toc import slugify
|
||||
from mkdocs import utils
|
||||
from mkdocs.commands.build import DuplicateFilter
|
||||
from mkdocs.config.config_options import Type
|
||||
from mkdocs.exceptions import ConfigurationError
|
||||
from mkdocs.plugins import BasePlugin
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
13079
package-lock.json
generated
13079
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mkdocs-material",
|
||||
"version": "8.2.16",
|
||||
"version": "8.3.0",
|
||||
"description": "Documentation that simply works",
|
||||
"keywords": [
|
||||
"mkdocs",
|
||||
|
@ -31,6 +31,7 @@ import { getElement, getLocation } from "~/browser"
|
||||
*/
|
||||
export type Flag =
|
||||
| "content.code.annotate" /* Code annotations */
|
||||
| "content.tabs.link" /* Link content tabs */
|
||||
| "header.autohide" /* Hide header */
|
||||
| "navigation.expand" /* Automatic expansion */
|
||||
| "navigation.indexes" /* Section pages */
|
||||
|
@ -54,9 +54,9 @@ export interface Mermaid {}
|
||||
let mermaid$: Observable<void>
|
||||
|
||||
/**
|
||||
* Global index for Mermaid integration
|
||||
* Global sequence number for diagrams
|
||||
*/
|
||||
let index = 0
|
||||
let sequence = 0
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Helper functions
|
||||
@ -101,7 +101,7 @@ export function mountMermaid(
|
||||
/* Render diagram */
|
||||
mermaid$.subscribe(() => {
|
||||
el.classList.add("mermaid") // Hack: mitigate https://bit.ly/3CiN6Du
|
||||
const id = `__mermaid_${index++}`
|
||||
const id = `__mermaid_${sequence++}`
|
||||
const host = h("div", { class: "mermaid" })
|
||||
mermaid.mermaidAPI.render(id, el.textContent, (svg: string) => {
|
||||
|
||||
|
@ -32,6 +32,7 @@ import {
|
||||
fromEvent,
|
||||
map,
|
||||
merge,
|
||||
skip,
|
||||
startWith,
|
||||
subscribeOn,
|
||||
takeLast,
|
||||
@ -39,13 +40,18 @@ import {
|
||||
tap
|
||||
} from "rxjs"
|
||||
|
||||
import { feature } from "~/_"
|
||||
import {
|
||||
getElement,
|
||||
getElementContentOffset,
|
||||
getElementContentSize,
|
||||
getElementOffset,
|
||||
getElementSize,
|
||||
getElements,
|
||||
watchElementContentOffset,
|
||||
watchElementSize
|
||||
} from "~/browser"
|
||||
import { renderTabbedControl } from "~/templates"
|
||||
|
||||
import { Component } from "../../_"
|
||||
|
||||
@ -75,18 +81,15 @@ export function watchContentTabs(
|
||||
el: HTMLElement
|
||||
): Observable<ContentTabs> {
|
||||
const inputs = getElements<HTMLInputElement>(":scope > input", el)
|
||||
const active = inputs.find(input => input.checked) || inputs[0]
|
||||
const initial = inputs.find(input => input.checked) || inputs[0]
|
||||
return merge(...inputs.map(input => fromEvent(input, "change")
|
||||
.pipe(
|
||||
map(() => ({
|
||||
active: getElement(`label[for=${input.id}]`)
|
||||
}) as ContentTabs)
|
||||
map(() => getElement<HTMLLabelElement>(`label[for=${input.id}]`))
|
||||
)
|
||||
))
|
||||
.pipe(
|
||||
startWith({
|
||||
active: getElement(`label[for=${active.id}]`)
|
||||
} as ContentTabs)
|
||||
startWith(getElement<HTMLLabelElement>(`label[for=${initial.id}]`)),
|
||||
map(active => ({ active }))
|
||||
)
|
||||
}
|
||||
|
||||
@ -105,18 +108,29 @@ export function watchContentTabs(
|
||||
export function mountContentTabs(
|
||||
el: HTMLElement
|
||||
): Observable<Component<ContentTabs>> {
|
||||
|
||||
/* Render content tab previous button for pagination */
|
||||
const prev = renderTabbedControl("prev")
|
||||
el.append(prev)
|
||||
|
||||
/* Render content tab next button for pagination */
|
||||
const next = renderTabbedControl("next")
|
||||
el.append(next)
|
||||
|
||||
/* Mount component on subscription */
|
||||
const container = getElement(".tabbed-labels", el)
|
||||
return defer(() => {
|
||||
const push$ = new Subject<ContentTabs>()
|
||||
const done$ = push$.pipe(takeLast(1))
|
||||
combineLatest([push$, watchElementSize(el)])
|
||||
.pipe(
|
||||
auditTime(1, animationFrameScheduler),
|
||||
takeUntil(push$.pipe(takeLast(1)))
|
||||
takeUntil(done$)
|
||||
)
|
||||
.subscribe({
|
||||
|
||||
/* Handle emission */
|
||||
next([{ active }]) {
|
||||
next([{ active }, size]) {
|
||||
const offset = getElementOffset(active)
|
||||
const { width } = getElementSize(active)
|
||||
|
||||
@ -124,11 +138,12 @@ export function mountContentTabs(
|
||||
el.style.setProperty("--md-indicator-x", `${offset.x}px`)
|
||||
el.style.setProperty("--md-indicator-width", `${width}px`)
|
||||
|
||||
/* Smoothly scroll container */
|
||||
container.scrollTo({
|
||||
behavior: "smooth",
|
||||
left: offset.x
|
||||
})
|
||||
/* Scroll container to active content tab */
|
||||
const content = getElementContentOffset(container)
|
||||
if (offset.x < content.x)
|
||||
prev.click()
|
||||
else if (offset.x + width > content.x + size.width)
|
||||
next.click()
|
||||
},
|
||||
|
||||
/* Handle complete */
|
||||
@ -138,6 +153,57 @@ export function mountContentTabs(
|
||||
}
|
||||
})
|
||||
|
||||
/* Hide content tab buttons on borders */
|
||||
combineLatest([
|
||||
watchElementContentOffset(container),
|
||||
watchElementSize(container)
|
||||
])
|
||||
.pipe(
|
||||
takeUntil(done$)
|
||||
)
|
||||
.subscribe(([offset, size]) => {
|
||||
const content = getElementContentSize(container)
|
||||
prev.hidden = offset.x < 16
|
||||
next.hidden = offset.x > content.width - size.width - 16
|
||||
})
|
||||
|
||||
/* Paginate content tab container on click */
|
||||
merge(
|
||||
fromEvent(prev, "click").pipe(map(() => -1)),
|
||||
fromEvent(next, "click").pipe(map(() => +1))
|
||||
)
|
||||
.pipe(
|
||||
takeUntil(done$)
|
||||
)
|
||||
.subscribe(direction => {
|
||||
const { width } = getElementSize(container)
|
||||
container.scrollBy({
|
||||
left: width * direction,
|
||||
behavior: "smooth"
|
||||
})
|
||||
})
|
||||
|
||||
/* Set up linking of content tabs, if enabled */
|
||||
if (feature("content.tabs.link"))
|
||||
push$.pipe(skip(1))
|
||||
.subscribe(({ active }) => {
|
||||
const tab = active.innerText.trim()
|
||||
for (const set of getElements("[data-tabs]"))
|
||||
for (const input of getElements<HTMLInputElement>(
|
||||
":scope > input", set
|
||||
)) {
|
||||
const label = getElement(`label[for=${input.id}]`)
|
||||
if (label.innerText.trim() === tab) {
|
||||
input.click()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
/* Persist active tabs in local storage */
|
||||
const tabs = __md_get<string[]>("__tabs") || []
|
||||
__md_set("__tabs", [...new Set([tab, ...tabs])])
|
||||
})
|
||||
|
||||
/* Create and return component */
|
||||
return watchContentTabs(el)
|
||||
.pipe(
|
||||
|
@ -113,11 +113,8 @@ export function mountDialog(
|
||||
return defer(() => {
|
||||
const push$ = new Subject<Dialog>()
|
||||
push$.subscribe(({ message, active }) => {
|
||||
el.classList.toggle("md-dialog--active", active)
|
||||
inner.textContent = message
|
||||
if (active)
|
||||
el.setAttribute("data-md-state", "open")
|
||||
else
|
||||
el.removeAttribute("data-md-state")
|
||||
})
|
||||
|
||||
/* Create and return component */
|
||||
|
@ -175,16 +175,15 @@ export function mountHeader(
|
||||
): Observable<Component<Header>> {
|
||||
return defer(() => {
|
||||
const push$ = new Subject<Main>()
|
||||
const done$ = push$.pipe(takeLast(1))
|
||||
push$
|
||||
.pipe(
|
||||
distinctUntilKeyChanged("active"),
|
||||
combineLatestWith(header$)
|
||||
)
|
||||
.subscribe(([{ active }, { hidden }]) => {
|
||||
if (active)
|
||||
el.setAttribute("data-md-state", hidden ? "hidden" : "shadow")
|
||||
else
|
||||
el.removeAttribute("data-md-state")
|
||||
el.classList.toggle("md-header--hidden", hidden)
|
||||
el.classList.toggle("md-header--shadow", active && !hidden)
|
||||
})
|
||||
|
||||
/* Link to main area */
|
||||
@ -193,7 +192,7 @@ export function mountHeader(
|
||||
/* Create and return component */
|
||||
return header$
|
||||
.pipe(
|
||||
takeUntil(push$.pipe(takeLast(1))),
|
||||
takeUntil(done$),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
})
|
||||
|
@ -116,10 +116,7 @@ export function mountHeaderTitle(
|
||||
return defer(() => {
|
||||
const push$ = new Subject<HeaderTitle>()
|
||||
push$.subscribe(({ active }) => {
|
||||
if (active)
|
||||
el.setAttribute("data-md-state", "active")
|
||||
else
|
||||
el.removeAttribute("data-md-state")
|
||||
el.classList.toggle("md-header__title--active", active)
|
||||
})
|
||||
|
||||
/* Obtain headline, if any */
|
||||
|
@ -32,6 +32,7 @@ import {
|
||||
fromEvent,
|
||||
map,
|
||||
merge,
|
||||
share,
|
||||
shareReplay,
|
||||
startWith,
|
||||
take,
|
||||
@ -155,6 +156,7 @@ export function mountSearchQuery(
|
||||
el: HTMLInputElement, { tx$, rx$ }: SearchWorker
|
||||
): Observable<Component<SearchQuery, HTMLInputElement>> {
|
||||
const push$ = new Subject<SearchQuery>()
|
||||
const done$ = push$.pipe(takeLast(1))
|
||||
|
||||
/* Handle value changes */
|
||||
push$
|
||||
@ -184,7 +186,7 @@ export function mountSearchQuery(
|
||||
/* Handle reset */
|
||||
fromEvent(el.form!, "reset")
|
||||
.pipe(
|
||||
takeUntil(push$.pipe(takeLast(1)))
|
||||
takeUntil(done$)
|
||||
)
|
||||
.subscribe(() => el.focus())
|
||||
|
||||
@ -193,6 +195,7 @@ export function mountSearchQuery(
|
||||
.pipe(
|
||||
tap(state => push$.next(state)),
|
||||
finalize(() => push$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
map(state => ({ ref: el, ...state })),
|
||||
share()
|
||||
)
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ export function mountSource(
|
||||
const push$ = new Subject<Source>()
|
||||
push$.subscribe(({ facts }) => {
|
||||
inner.appendChild(renderSourceFacts(facts))
|
||||
inner.setAttribute("data-md-state", "done")
|
||||
inner.classList.add("md-source__repository--active")
|
||||
})
|
||||
|
||||
/* Create and return component */
|
||||
|
@ -120,15 +120,12 @@ export function mountTabs(
|
||||
|
||||
/* Handle emission */
|
||||
next({ hidden }) {
|
||||
if (hidden)
|
||||
el.setAttribute("data-md-state", "hidden")
|
||||
else
|
||||
el.removeAttribute("data-md-state")
|
||||
el.classList.toggle("md-tabs--hidden", hidden)
|
||||
},
|
||||
|
||||
/* Handle complete */
|
||||
complete() {
|
||||
el.removeAttribute("data-md-state")
|
||||
el.classList.remove("md-tabs--hidden")
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -269,19 +269,18 @@ export function mountTableOfContents(
|
||||
): Observable<Component<TableOfContents>> {
|
||||
return defer(() => {
|
||||
const push$ = new Subject<TableOfContents>()
|
||||
const done$ = push$.pipe(takeLast(1))
|
||||
push$.subscribe(({ prev, next }) => {
|
||||
|
||||
/* Look forward */
|
||||
for (const [anchor] of next) {
|
||||
anchor.removeAttribute("data-md-state")
|
||||
anchor.classList.remove(
|
||||
"md-nav__link--active"
|
||||
)
|
||||
anchor.classList.remove("md-nav__link--passed")
|
||||
anchor.classList.remove("md-nav__link--active")
|
||||
}
|
||||
|
||||
/* Look backward */
|
||||
for (const [index, [anchor]] of prev.entries()) {
|
||||
anchor.setAttribute("data-md-state", "blur")
|
||||
anchor.classList.add("md-nav__link--passed")
|
||||
anchor.classList.toggle(
|
||||
"md-nav__link--active",
|
||||
index === prev.length - 1
|
||||
@ -293,7 +292,7 @@ export function mountTableOfContents(
|
||||
if (feature("navigation.tracking"))
|
||||
viewport$
|
||||
.pipe(
|
||||
takeUntil(push$.pipe(takeLast(1))),
|
||||
takeUntil(done$),
|
||||
distinctUntilKeyChanged("offset"),
|
||||
debounceTime(250),
|
||||
skip(1),
|
||||
|
@ -134,16 +134,16 @@ export function mountBackToTop(
|
||||
el: HTMLElement, { viewport$, header$, main$, target$ }: MountOptions
|
||||
): Observable<Component<BackToTop>> {
|
||||
const push$ = new Subject<BackToTop>()
|
||||
const done$ = push$.pipe(takeLast(1))
|
||||
push$.subscribe({
|
||||
|
||||
/* Handle emission */
|
||||
next({ hidden }) {
|
||||
el.classList.toggle("md-top--hidden", hidden)
|
||||
if (hidden) {
|
||||
el.setAttribute("data-md-state", "hidden")
|
||||
el.setAttribute("tabindex", "-1")
|
||||
el.blur()
|
||||
} else {
|
||||
el.removeAttribute("data-md-state")
|
||||
el.removeAttribute("tabindex")
|
||||
}
|
||||
},
|
||||
@ -151,7 +151,7 @@ export function mountBackToTop(
|
||||
/* Handle complete */
|
||||
complete() {
|
||||
el.style.top = ""
|
||||
el.setAttribute("data-md-state", "hidden")
|
||||
el.classList.add("md-top--hidden")
|
||||
el.removeAttribute("tabindex")
|
||||
}
|
||||
})
|
||||
@ -159,7 +159,7 @@ export function mountBackToTop(
|
||||
/* Watch header height */
|
||||
header$
|
||||
.pipe(
|
||||
takeUntil(push$.pipe(endWith(0), takeLast(1))),
|
||||
takeUntil(done$),
|
||||
distinctUntilKeyChanged("height")
|
||||
)
|
||||
.subscribe(({ height }) => {
|
||||
|
@ -56,6 +56,7 @@ export interface SearchIndexDocument {
|
||||
title: string /* Document title */
|
||||
text: string /* Document text */
|
||||
tags?: string[] /* Document tags */
|
||||
boost?: number /* Document boost */
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -207,7 +208,7 @@ export class Search {
|
||||
|
||||
/* Index documents */
|
||||
for (const doc of docs)
|
||||
this.add(doc)
|
||||
this.add(doc, { boost: doc.boost })
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,8 @@ export function patchIndeterminate(
|
||||
document$
|
||||
.pipe(
|
||||
switchMap(() => getElements<HTMLInputElement>(
|
||||
"[data-md-state=indeterminate]"
|
||||
// @todo `data-md-state` is deprecated and removed in v9
|
||||
".md-toggle--indeterminate, [data-md-state=indeterminate]"
|
||||
)),
|
||||
tap(el => {
|
||||
el.indeterminate = true
|
||||
@ -71,14 +72,14 @@ export function patchIndeterminate(
|
||||
}),
|
||||
mergeMap(el => fromEvent(el, "change")
|
||||
.pipe(
|
||||
takeWhile(() => el.hasAttribute("data-md-state")),
|
||||
takeWhile(() => el.classList.contains("md-toggle--indeterminate")),
|
||||
map(() => el)
|
||||
)
|
||||
),
|
||||
withLatestFrom(tablet$)
|
||||
)
|
||||
.subscribe(([el, tablet]) => {
|
||||
el.removeAttribute("data-md-state")
|
||||
el.classList.remove("md-toggle--indeterminate")
|
||||
if (tablet)
|
||||
el.checked = false
|
||||
})
|
||||
|
@ -76,11 +76,11 @@ export function patchScrolllock(
|
||||
)
|
||||
.subscribe(([active, { offset: { y }}]) => {
|
||||
if (active) {
|
||||
document.body.setAttribute("data-md-state", "lock")
|
||||
document.body.setAttribute("data-md-scrolllock", "")
|
||||
document.body.style.top = `-${y}px`
|
||||
} else {
|
||||
const value = -1 * parseInt(document.body.style.top, 10)
|
||||
document.body.removeAttribute("data-md-state")
|
||||
document.body.removeAttribute("data-md-scrolllock")
|
||||
document.body.style.top = ""
|
||||
if (value)
|
||||
window.scrollTo(0, value)
|
||||
|
@ -24,5 +24,6 @@ export * from "./annotation"
|
||||
export * from "./clipboard"
|
||||
export * from "./search"
|
||||
export * from "./source"
|
||||
export * from "./tabbed"
|
||||
export * from "./table"
|
||||
export * from "./version"
|
||||
|
56
src/assets/javascripts/templates/tabbed/index.tsx
Normal file
56
src/assets/javascripts/templates/tabbed/index.tsx
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2022 Martin Donath <martin.donath@squidfunk.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { h } from "~/utilities"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Helper types
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Tabbed control type
|
||||
*/
|
||||
type TabbedControlType =
|
||||
| "prev"
|
||||
| "next"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Functions
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Render control for content tabs
|
||||
*
|
||||
* @param type - Control type
|
||||
*
|
||||
* @returns Element
|
||||
*/
|
||||
export function renderTabbedControl(
|
||||
type: TabbedControlType
|
||||
): HTMLElement {
|
||||
const classes = `tabbed-control tabbed-control--${type}`
|
||||
return (
|
||||
<div class={classes} hidden>
|
||||
<button class="tabbed-button" tabIndex={-1}></button>
|
||||
</div>
|
||||
)
|
||||
}
|
@ -54,7 +54,7 @@ function renderVersion(version: Version): HTMLElement {
|
||||
const url = new URL(`../${version.version}/`, config.base)
|
||||
return (
|
||||
<li class="md-version__item">
|
||||
<a href={url.toString()} class="md-version__link">
|
||||
<a href={`${url}`} class="md-version__link">
|
||||
{version.title}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -100,11 +100,16 @@ export function h<T extends h.JSX.Element>(
|
||||
|
||||
/* Set attributes, if any */
|
||||
if (attributes)
|
||||
for (const attr of Object.keys(attributes))
|
||||
for (const attr of Object.keys(attributes)) {
|
||||
if (typeof attributes[attr] === "undefined")
|
||||
continue
|
||||
|
||||
/* Set default attribute or boolean */
|
||||
if (typeof attributes[attr] !== "boolean")
|
||||
el.setAttribute(attr, attributes[attr])
|
||||
else if (attributes[attr])
|
||||
else
|
||||
el.setAttribute(attr, "")
|
||||
}
|
||||
|
||||
/* Append child nodes */
|
||||
for (const child of children)
|
||||
|
@ -50,60 +50,56 @@
|
||||
--md-accent-bg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-accent-bg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
|
||||
// Light theme (default)
|
||||
> * {
|
||||
// Code color shades
|
||||
--md-code-fg-color: hsla(200, 18%, 26%, 1);
|
||||
--md-code-bg-color: hsla(0, 0%, 96%, 1);
|
||||
|
||||
// Code color shades
|
||||
--md-code-fg-color: hsla(200, 18%, 26%, 1);
|
||||
--md-code-bg-color: hsla(0, 0%, 96%, 1);
|
||||
// Code highlighting color shades
|
||||
--md-code-hl-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
|
||||
--md-code-hl-number-color: hsla(0, 67%, 50%, 1);
|
||||
--md-code-hl-special-color: hsla(340, 83%, 47%, 1);
|
||||
--md-code-hl-function-color: hsla(291, 45%, 50%, 1);
|
||||
--md-code-hl-constant-color: hsla(250, 63%, 60%, 1);
|
||||
--md-code-hl-keyword-color: hsla(219, 54%, 51%, 1);
|
||||
--md-code-hl-string-color: hsla(150, 63%, 30%, 1);
|
||||
--md-code-hl-name-color: var(--md-code-fg-color);
|
||||
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
||||
|
||||
// Code highlighting color shades
|
||||
--md-code-hl-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
|
||||
--md-code-hl-number-color: hsla(0, 67%, 50%, 1);
|
||||
--md-code-hl-special-color: hsla(340, 83%, 47%, 1);
|
||||
--md-code-hl-function-color: hsla(291, 45%, 50%, 1);
|
||||
--md-code-hl-constant-color: hsla(250, 63%, 60%, 1);
|
||||
--md-code-hl-keyword-color: hsla(219, 54%, 51%, 1);
|
||||
--md-code-hl-string-color: hsla(150, 63%, 30%, 1);
|
||||
--md-code-hl-name-color: var(--md-code-fg-color);
|
||||
--md-code-hl-operator-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-comment-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-generic-color: var(--md-default-fg-color--light);
|
||||
--md-code-hl-variable-color: var(--md-default-fg-color--light);
|
||||
// Typeset color shades
|
||||
--md-typeset-color: var(--md-default-fg-color);
|
||||
|
||||
// Typeset color shades
|
||||
--md-typeset-color: var(--md-default-fg-color);
|
||||
// Typeset `a` color shades
|
||||
--md-typeset-a-color: var(--md-primary-fg-color);
|
||||
|
||||
// Typeset `a` color shades
|
||||
--md-typeset-a-color: var(--md-primary-fg-color);
|
||||
// Typeset `mark` color shades
|
||||
--md-typeset-mark-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
|
||||
|
||||
// Typeset `mark` color shades
|
||||
--md-typeset-mark-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
|
||||
// Typeset `del` and `ins` color shades
|
||||
--md-typeset-del-color: hsla(6, 90%, 60%, 0.15);
|
||||
--md-typeset-ins-color: hsla(150, 90%, 44%, 0.15);
|
||||
|
||||
// Typeset `del` and `ins` color shades
|
||||
--md-typeset-del-color: hsla(6, 90%, 60%, 0.15);
|
||||
--md-typeset-ins-color: hsla(150, 90%, 44%, 0.15);
|
||||
// Typeset `kbd` color shades
|
||||
--md-typeset-kbd-color: hsla(0, 0%, 98%, 1);
|
||||
--md-typeset-kbd-accent-color: hsla(0, 100%, 100%, 1);
|
||||
--md-typeset-kbd-border-color: hsla(0, 0%, 72%, 1);
|
||||
|
||||
// Typeset `kbd` color shades
|
||||
--md-typeset-kbd-color: hsla(0, 0%, 98%, 1);
|
||||
--md-typeset-kbd-accent-color: hsla(0, 100%, 100%, 1);
|
||||
--md-typeset-kbd-border-color: hsla(0, 0%, 72%, 1);
|
||||
// Typeset `table` color shades
|
||||
--md-typeset-table-color: hsla(0, 0%, 0%, 0.12);
|
||||
|
||||
// Typeset `table` color shades
|
||||
--md-typeset-table-color: hsla(0, 0%, 0%, 0.12);
|
||||
// Admonition color shades
|
||||
--md-admonition-fg-color: var(--md-default-fg-color);
|
||||
--md-admonition-bg-color: var(--md-default-bg-color);
|
||||
|
||||
// Admonition color shades
|
||||
--md-admonition-fg-color: var(--md-default-fg-color);
|
||||
--md-admonition-bg-color: var(--md-default-bg-color);
|
||||
|
||||
// Footer color shades
|
||||
--md-footer-fg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-footer-fg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
--md-footer-fg-color--lighter: hsla(0, 0%, 100%, 0.3);
|
||||
--md-footer-bg-color: hsla(0, 0%, 0%, 0.87);
|
||||
--md-footer-bg-color--dark: hsla(0, 0%, 0%, 0.32);
|
||||
}
|
||||
// Footer color shades
|
||||
--md-footer-fg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-footer-fg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
--md-footer-fg-color--lighter: hsla(0, 0%, 100%, 0.3);
|
||||
--md-footer-bg-color: hsla(0, 0%, 0%, 0.87);
|
||||
--md-footer-bg-color--dark: hsla(0, 0%, 0%, 0.32);
|
||||
|
||||
// Shadow depth 1
|
||||
--md-shadow-z1:
|
||||
@ -120,3 +116,10 @@
|
||||
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.2),
|
||||
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.35);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Allow to explicitly use color schemes in nested content
|
||||
[data-md-color-scheme="default"] {
|
||||
@extend :root;
|
||||
}
|
||||
|
@ -152,6 +152,7 @@ $admonitions: (
|
||||
// Rules: flavours
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Define admonition flavors
|
||||
@each $names, $props in $admonitions {
|
||||
$name: list.nth($names, 1);
|
||||
$tint: list.nth($props, 2);
|
||||
|
@ -24,6 +24,14 @@
|
||||
// Rules
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Tabbed variables
|
||||
:root {
|
||||
--md-tabbed-icon--prev: svg-load("material/chevron-left.svg");
|
||||
--md-tabbed-icon--next: svg-load("material/chevron-right.svg");
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Scoped in typesetted content to match specificity of regular content
|
||||
.md-typeset {
|
||||
|
||||
@ -139,6 +147,7 @@
|
||||
transition:
|
||||
background-color 250ms,
|
||||
color 250ms;
|
||||
scroll-margin-inline-start: px2rem(20px);
|
||||
|
||||
// [print]: Intersperse labels with containers
|
||||
@media print {
|
||||
@ -239,6 +248,85 @@
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Tabbed button
|
||||
.tabbed-button {
|
||||
display: block;
|
||||
align-self: center;
|
||||
width: px2rem(18px);
|
||||
height: px2rem(18px);
|
||||
margin-top: px2rem(2px);
|
||||
color: var(--md-default-fg-color--light);
|
||||
border-radius: 100%;
|
||||
cursor: pointer;
|
||||
transition: background-color 250ms;
|
||||
pointer-events: initial;
|
||||
|
||||
// Tabbed button on hover
|
||||
&:hover {
|
||||
color: var(--md-accent-fg-color);
|
||||
background-color: var(--md-accent-fg-color--transparent);
|
||||
}
|
||||
|
||||
// Tabbed button icon
|
||||
&::after {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: currentcolor;
|
||||
transition:
|
||||
background-color 250ms,
|
||||
transform 250ms;
|
||||
mask-image: var(--md-tabbed-icon--prev);
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
// Tabbed control
|
||||
.tabbed-control {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
width: px2rem(24px);
|
||||
height: px2rem(38px);
|
||||
background:
|
||||
linear-gradient(
|
||||
to right,
|
||||
var(--md-default-bg-color) 60%,
|
||||
transparent
|
||||
);
|
||||
transition: opacity 125ms;
|
||||
pointer-events: none;
|
||||
|
||||
// Adjust for right-to-left languages
|
||||
[dir="rtl"] & {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
// Tabbed control is hidden
|
||||
&[hidden] {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
// Tabbed control next
|
||||
&--next {
|
||||
right: 0;
|
||||
justify-content: end;
|
||||
background:
|
||||
linear-gradient(
|
||||
to left,
|
||||
var(--md-default-bg-color) 60%,
|
||||
transparent
|
||||
);
|
||||
|
||||
// Tabbed button icon content
|
||||
.tabbed-button::after {
|
||||
mask-image: var(--md-tabbed-icon--next);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -261,6 +349,20 @@
|
||||
padding-inline-end: px2rem(16px);
|
||||
content: "";
|
||||
}
|
||||
|
||||
// Tabbed control previous
|
||||
~ .tabbed-control--prev {
|
||||
width: px2rem(40px);
|
||||
margin-inline-start: px2rem(-16px);
|
||||
padding-inline-start: px2rem(16px);
|
||||
}
|
||||
|
||||
// Tabbed control next
|
||||
~ .tabbed-control--next {
|
||||
width: px2rem(40px);
|
||||
margin-inline-end: px2rem(-16px);
|
||||
padding-inline-end: px2rem(16px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// All definitions
|
||||
:root > * {
|
||||
:root {
|
||||
--md-mermaid-font-family: var(--md-text-font-family), sans-serif;
|
||||
|
||||
// Colors
|
||||
|
@ -66,7 +66,7 @@ body {
|
||||
}
|
||||
|
||||
// Body in locked state
|
||||
&[data-md-state="lock"] {
|
||||
&[data-md-scrolllock] {
|
||||
|
||||
// [tablet portrait -]: Omit scroll bubbling
|
||||
@include break-to-device(tablet portrait) {
|
||||
|
@ -47,8 +47,8 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Dialog in open state
|
||||
&[data-md-state="open"] {
|
||||
// Active dialog
|
||||
&--active {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
transition:
|
||||
|
@ -36,10 +36,14 @@
|
||||
|
||||
// Footer wrapper
|
||||
&__inner {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: px2rem(4px);
|
||||
overflow: auto;
|
||||
|
||||
// Footer is visible
|
||||
&:not([hidden]) {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
// Footer link to previous and next page
|
||||
@ -99,6 +103,7 @@
|
||||
padding: 0 px2rem(20px);
|
||||
font-size: px2rem(18px);
|
||||
line-height: px2rem(48px);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// Footer link button
|
||||
|
@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
// Header in shadow state, i.e. shadow is visible
|
||||
&[data-md-state="shadow"] {
|
||||
&--shadow {
|
||||
box-shadow:
|
||||
0 0 px2rem(4px) rgba(0, 0, 0, 0.1),
|
||||
0 px2rem(4px) px2rem(8px) rgba(0, 0, 0, 0.2);
|
||||
@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
// Header in hidden state, i.e. moved out of sight
|
||||
&[data-md-state="hidden"] {
|
||||
&--hidden {
|
||||
transform: translateY(-100%);
|
||||
transition:
|
||||
transform 250ms cubic-bezier(0.8, 0, 0.6, 1),
|
||||
@ -150,6 +150,7 @@
|
||||
position: absolute;
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
transition:
|
||||
transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1),
|
||||
opacity 150ms;
|
||||
@ -186,7 +187,7 @@
|
||||
line-height: px2rem(48px);
|
||||
|
||||
// Header title in active state, i.e. page title is visible
|
||||
&[data-md-state="active"] .md-header__topic {
|
||||
&--active .md-header__topic {
|
||||
z-index: -1;
|
||||
transform: translateX(px2rem(-25px));
|
||||
opacity: 0;
|
||||
|
@ -101,8 +101,8 @@
|
||||
transition: color 125ms;
|
||||
scroll-snap-align: start;
|
||||
|
||||
// Navigation link in blurred state
|
||||
&[data-md-state="blur"] {
|
||||
// Navigation link that was passed
|
||||
&--passed {
|
||||
color: var(--md-default-fg-color--light);
|
||||
}
|
||||
|
||||
|
@ -529,6 +529,8 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
// Hack: omit accidental text selection on fast toggle of more button
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
// Search result item
|
||||
|
@ -122,7 +122,7 @@
|
||||
opacity: 0.75;
|
||||
|
||||
// Show after the data was loaded
|
||||
[data-md-state="done"] & {
|
||||
.md-source__repository--active & {
|
||||
animation: facts 250ms ease-in;
|
||||
}
|
||||
}
|
||||
@ -132,7 +132,7 @@
|
||||
display: inline-block;
|
||||
|
||||
// Show after the data was loaded
|
||||
[data-md-state="done"] & {
|
||||
.md-source__repository--active & {
|
||||
animation: fact 400ms ease-out;
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
color: var(--md-primary-bg-color);
|
||||
line-height: 1.3;
|
||||
background-color: var(--md-primary-fg-color);
|
||||
|
||||
// [print]: Hide tabs
|
||||
@ -41,8 +42,8 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Tabs in hidden state, i.e. when scrolling down
|
||||
&[data-md-state="hidden"] {
|
||||
// Navigation tabs are hidden
|
||||
&--hidden {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@ -94,7 +95,7 @@
|
||||
|
||||
// Hide tabs upon scrolling - disable transition to minimizes repaints
|
||||
// while scrolling down, while scrolling up seems to be okay
|
||||
.md-tabs[data-md-state="hidden"] & {
|
||||
.md-tabs.md-tabs--hidden & {
|
||||
transform: translateY(50%);
|
||||
opacity: 0;
|
||||
transition:
|
||||
|
@ -61,12 +61,10 @@
|
||||
clamp(
|
||||
var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)},
|
||||
var(--md-tooltip-x),
|
||||
(
|
||||
100vw +
|
||||
var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)} -
|
||||
var(--md-tooltip-width) -
|
||||
2 * #{px2rem(16px)}
|
||||
)
|
||||
100vw +
|
||||
var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)} -
|
||||
var(--md-tooltip-width) -
|
||||
2 * #{px2rem(16px)}
|
||||
);
|
||||
// Hack: set an explicit `z-index` so we can transition it to ensure that any
|
||||
// following elements are not overlaying the tooltip during the transition.
|
||||
|
@ -54,8 +54,8 @@
|
||||
transform: translate(50%, 0);
|
||||
}
|
||||
|
||||
// Back-to-top button in hidden state
|
||||
&[data-md-state="hidden"] {
|
||||
// Back-to-top button is hidden
|
||||
&--hidden {
|
||||
transform: translate(-50%, px2rem(4px));
|
||||
opacity: 0;
|
||||
transition-duration: 0ms;
|
||||
|
@ -35,6 +35,6 @@
|
||||
|
||||
@import "config";
|
||||
|
||||
@import "palette/scheme";
|
||||
@import "palette/accent";
|
||||
@import "palette/primary";
|
||||
@import "palette/scheme";
|
||||
|
@ -24,6 +24,7 @@
|
||||
// Rules
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Define accent colors
|
||||
@each $name, $color in (
|
||||
"red": $clr-red-a400,
|
||||
"pink": $clr-pink-a400,
|
||||
|
@ -26,6 +26,7 @@
|
||||
// Rules
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Define primary colors
|
||||
@each $name, $colors in (
|
||||
"red": $clr-red-400 $clr-red-300 $clr-red-600,
|
||||
"pink": $clr-pink-500 $clr-pink-400 $clr-pink-700,
|
||||
@ -62,6 +63,26 @@
|
||||
--md-primary-bg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
}
|
||||
|
||||
// Typeset color shades
|
||||
@if index("grey" "blue-grey", $name) {
|
||||
--md-typeset-a-color: hsl(#{hex2hsl($clr-indigo-500)});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Adjust link colors for light primary colors
|
||||
@each $name, $color in (
|
||||
"light-green": hsl(88, 58%, 43%),
|
||||
"lime": hsl(66, 88%, 32%),
|
||||
"yellow": hsl(54, 100%, 36%),
|
||||
"amber": hsl(45, 100%, 41%),
|
||||
"orange": hsl(36, 100%, 45%)
|
||||
) {
|
||||
[data-md-color-primary="#{$name}"]:not([data-md-color-scheme="slate"]) {
|
||||
--md-typeset-a-color: #{$color};
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +90,7 @@
|
||||
// Rules: white
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Color palette
|
||||
// Define primary colors for white
|
||||
[data-md-color-primary="white"] {
|
||||
--md-primary-fg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-primary-fg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
@ -77,8 +98,8 @@
|
||||
--md-primary-bg-color: hsla(0, 0%, 0%, 0.87);
|
||||
--md-primary-bg-color--light: hsla(0, 0%, 0%, 0.54);
|
||||
|
||||
// Typeset color shades
|
||||
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-500)}, 1);
|
||||
// Typeset `a` color shades
|
||||
--md-typeset-a-color: hsl(#{hex2hsl($clr-indigo-500)});
|
||||
|
||||
// [tablet portrait +]: Header-embedded search
|
||||
@include break-from-device(tablet landscape) {
|
||||
@ -113,7 +134,7 @@
|
||||
// Rules: black
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Color palette
|
||||
// Define primary colors for black
|
||||
[data-md-color-primary="black"] {
|
||||
--md-primary-fg-color: hsla(0, 0%, 0%, 1);
|
||||
--md-primary-fg-color--light: hsla(0, 0%, 0%, 0.54);
|
||||
@ -121,8 +142,8 @@
|
||||
--md-primary-bg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
|
||||
// Text color shades
|
||||
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-500)}, 1);
|
||||
// Typeset `a` color shades
|
||||
--md-typeset-a-color: hsl(#{hex2hsl($clr-indigo-500)});
|
||||
|
||||
// Header
|
||||
.md-header {
|
||||
|
@ -82,19 +82,27 @@
|
||||
--md-typeset-table-color: hsla(var(--md-hue), 75%, 95%, 0.12);
|
||||
|
||||
// Admonition color shades
|
||||
--md-admonition-bg-color: hsla(var(--md-hue), 0%, 100%, 0.025);
|
||||
--md-admonition-fg-color: var(--md-default-fg-color);
|
||||
--md-admonition-bg-color: var(--md-default-bg-color);
|
||||
|
||||
// Footer color shades
|
||||
--md-footer-bg-color: hsla(var(--md-hue), 15%, 12%, 0.87);
|
||||
--md-footer-bg-color--dark: hsla(var(--md-hue), 15%, 10%, 1);
|
||||
|
||||
// Black and white primary colors
|
||||
&[data-md-color-primary="black"],
|
||||
&[data-md-color-primary="white"] {
|
||||
// Shadow depth 1
|
||||
--md-shadow-z1:
|
||||
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.2),
|
||||
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.1);
|
||||
|
||||
// Typeset color shades
|
||||
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-400)}, 1);
|
||||
}
|
||||
// Shadow depth 2
|
||||
--md-shadow-z2:
|
||||
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.3),
|
||||
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.25);
|
||||
|
||||
// Shadow depth 3
|
||||
--md-shadow-z3:
|
||||
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.4),
|
||||
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.35);
|
||||
|
||||
// Hide images for light mode
|
||||
img[src$="#only-light"],
|
||||
@ -109,6 +117,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// Adjust link colors for dark primary colors
|
||||
@each $name, $color in (
|
||||
"pink": hsl(340, 81%, 63%),
|
||||
"purple": hsl(291, 43%, 63%),
|
||||
"deep-purple": hsl(262, 63%, 70%),
|
||||
"indigo": hsl(219, 56%, 63%),
|
||||
"teal": hsl(174, 100%, 40%),
|
||||
"green": hsl(122, 39%, 60%),
|
||||
"deep-orange": hsl(14, 100%, 73%),
|
||||
"brown": hsl(16, 45%, 60%),
|
||||
|
||||
// Set neutral colors to indigo
|
||||
"grey": hsl(219, 56%, 63%),
|
||||
"blue-grey": hsl(219, 56%, 63%),
|
||||
"white": hsl(219, 56%, 63%),
|
||||
"black": hsl(219, 56%, 63%)
|
||||
) {
|
||||
[data-md-color-scheme="slate"][data-md-color-primary="#{$name}"] {
|
||||
--md-typeset-a-color: #{$color};
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// Switching in progress - disable all transitions temporarily
|
||||
[data-md-color-switching] *,
|
||||
[data-md-color-switching] *::before,
|
||||
|
@ -92,6 +92,9 @@
|
||||
<meta name="theme-color" content="{{ primary }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Custom icons -->
|
||||
{% include "partials/icons.html" %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- JavaScript libraries -->
|
||||
@ -157,8 +160,6 @@
|
||||
{% else %}
|
||||
<body dir="{{ direction }}">
|
||||
{% endif %}
|
||||
|
||||
<!-- Retrieve features from configuration -->
|
||||
{% set features = config.theme.features or [] %}
|
||||
|
||||
<!-- User preference: color palette -->
|
||||
@ -247,10 +248,10 @@
|
||||
<main class="md-main" data-md-component="main">
|
||||
<div class="md-main__inner md-grid">
|
||||
|
||||
<!-- Navigation -->
|
||||
<!-- Sidebars -->
|
||||
{% block site_nav %}
|
||||
|
||||
<!-- Main navigation -->
|
||||
<!-- Navigation -->
|
||||
{% if nav %}
|
||||
{% if page and page.meta and page.meta.hide %}
|
||||
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
|
||||
@ -296,6 +297,9 @@
|
||||
{% include "partials/content.html" %}
|
||||
{% endblock %}
|
||||
</article>
|
||||
|
||||
<!-- User preference: content -->
|
||||
{% include "partials/javascripts/content.html" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -303,9 +307,8 @@
|
||||
{% if "navigation.top" in features %}
|
||||
<a
|
||||
href="#"
|
||||
class="md-top md-icon"
|
||||
class="md-top md-top--hidden md-icon"
|
||||
data-md-component="top"
|
||||
data-md-state="hidden"
|
||||
>
|
||||
{% include ".icons/material/arrow-up.svg" %}
|
||||
{{ lang.t('top.title') }}
|
||||
|
@ -25,9 +25,11 @@
|
||||
|
||||
<!-- Link to previous and/or next page -->
|
||||
{% if page.previous_page or page.next_page %}
|
||||
{% set hidden = "hidden" if "footer" in page.meta.hide %}
|
||||
<nav
|
||||
class="md-footer__inner md-grid"
|
||||
aria-label="{{ lang.t('footer.title') }}"
|
||||
{{ hidden }}
|
||||
>
|
||||
|
||||
<!-- Link to previous page -->
|
||||
|
37
src/partials/icons.html
Normal file
37
src/partials/icons.html
Normal file
@ -0,0 +1,37 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2022 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Custom admonition icons -->
|
||||
{% if config.theme.icon.admonition %}
|
||||
{% set style = ["\x3cstyle\x3e:root{"] %}
|
||||
{% for type, icon in config.theme.icon.admonition.items() %}
|
||||
{% import ".icons/" ~ icon ~ ".svg" as icon %}
|
||||
{% set _ = style.append(
|
||||
"--md-admonition-icon--" ~ type ~ ":" ~
|
||||
"url('data:image/svg+xml;charset=utf-8," ~
|
||||
icon | replace("\n", "") ~
|
||||
"');"
|
||||
) %}
|
||||
{% endfor %}
|
||||
{% set _ = style.append("}\x3c/style\x3e") %}
|
||||
{{ style | join }}
|
||||
{% endif %}
|
39
src/partials/javascripts/content.html
Normal file
39
src/partials/javascripts/content.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2022 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- User-preference: link content tabs -->
|
||||
{% if "content.tabs.link" in features %}
|
||||
<script>
|
||||
var tabs = __md_get("__tabs")
|
||||
if (Array.isArray(tabs))
|
||||
main: for (var set of document.querySelectorAll(".tabbed-set")) {
|
||||
var labels = set.querySelector(".tabbed-labels")
|
||||
for (var tab of tabs)
|
||||
for (var label of labels.getElementsByTagName("label"))
|
||||
if (label.innerText.trim() === tab) {
|
||||
var input = document.getElementById(label.htmlFor)
|
||||
input.checked = true
|
||||
continue main
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
@ -23,7 +23,6 @@
|
||||
<!-- Translations: Greek -->
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "el",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "Αντιγραφή στο πρόχειρο",
|
||||
"clipboard.copied": "Αντιγράφηκε στο πρόχειρο",
|
||||
"edit.link.title": "Επεξεργασία αυτής της σελίδας",
|
||||
|
@ -23,7 +23,6 @@
|
||||
<!-- Translations: Italian -->
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "it",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "Copia",
|
||||
"clipboard.copied": "Copiato",
|
||||
"edit.link.title": "Modifica",
|
||||
|
@ -23,7 +23,6 @@
|
||||
<!-- Translations: Portuguese (Brasilian) -->
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "pt",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "Copiar para área de Transferência",
|
||||
"clipboard.copied": "Copiado para área de Transferência",
|
||||
"edit.link.title": "Editar esta página",
|
||||
|
@ -23,7 +23,6 @@
|
||||
<!-- Translations: Chinese (Simplified) -->
|
||||
{% macro t(key) %}{{ {
|
||||
"language": "zh",
|
||||
"direction": "ltr",
|
||||
"clipboard.copy": "复制",
|
||||
"clipboard.copied": "已复制",
|
||||
"edit.link.title": "编辑此页",
|
||||
|
@ -46,9 +46,8 @@
|
||||
{% set checked = "checked" if nav_item.active %}
|
||||
{% if "navigation.expand" in features and not checked %}
|
||||
<input
|
||||
class="md-nav__toggle md-toggle"
|
||||
class="md-nav__toggle md-toggle md-toggle--indeterminate"
|
||||
data-md-toggle="{{ path }}"
|
||||
data-md-state="indeterminate"
|
||||
type="checkbox"
|
||||
id="{{ path }}"
|
||||
checked
|
||||
|
@ -26,7 +26,7 @@
|
||||
{{ toc_item.title }}
|
||||
</a>
|
||||
|
||||
<!-- Render nested item list -->
|
||||
<!-- Table of contents list -->
|
||||
{% if toc_item.children %}
|
||||
<nav class="md-nav" aria-label="{{ toc_item.title }}">
|
||||
<ul class="md-nav__list">
|
||||
|
@ -41,7 +41,7 @@
|
||||
{% set toc = first.children %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Render item list -->
|
||||
<!-- Table of contents title and list -->
|
||||
{% if toc %}
|
||||
<label class="md-nav__title" for="__toc">
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
|
@ -47,3 +47,9 @@ class SearchIndex(BaseIndex):
|
||||
# Add document tags
|
||||
if "tags" in page.meta:
|
||||
entry["tags"] = page.meta["tags"]
|
||||
|
||||
# Add document boost for search
|
||||
if "search" in page.meta:
|
||||
search = page.meta["search"]
|
||||
if "boost" in search:
|
||||
entry["boost"] = search["boost"]
|
||||
|
@ -27,7 +27,6 @@ from markdown.extensions.toc import slugify
|
||||
from mkdocs import utils
|
||||
from mkdocs.commands.build import DuplicateFilter
|
||||
from mkdocs.config.config_options import Type
|
||||
from mkdocs.exceptions import ConfigurationError
|
||||
from mkdocs.plugins import BasePlugin
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user