Js-实现文章大纲,点击标题(h1-h6)移动到对应位置(DocumentOutline.js)

链接:

AngeloFaella/DocumentOutline: A vanilla JavaScript library that automatically generates the "Table of Contents" of an HTML document. (github.com)

 

效果图:

主要代码是: DocumentOutline.js

let DocumentOutline;

(function()

{

    const menuSvg = "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' style='transform:;-ms-filter:'><path d='M4 11H16V13H4zM4 6H20V8H4zM4 18L11 18 11.235 18 11.235 16 11 16 4 16z'></path></svg>";

    const closeSvg = "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' stroke='var(--outline-primary-color)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-minimize-2'><polyline points='4 14 10 14 10 20'></polyline><polyline points='20 10 14 10 14 4'></polyline><line x1='14' y1='10' x2='21' y2='3'></line><line x1='3' y1='21' x2='10' y2='14'></line></svg>";

    const cancelSvg = "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' aria-labelledby='title' aria-describedby='desc' role='img' xmlns:xlink='http://www.w3.org/1999/xlink'> <path data-name='layer1'fill='var(--outline-text-color-light)' d='M51 17.25L46.75 13 32 27.75 17.25 13 13 17.25 27.75 32 13 46.75 17.25 51 32 36.25 46.75 51 51 46.75 36.25 32 51 17.25z'></path></svg>";

   

    DocumentOutline = class DocumentOutline {

        /**

         * @class DocumentOutline

         * @param {Object} options

         * @param {String} [options.backgroundColor] background color of the outline

         * @param {String} [options.textColor] text color of the first-level sections

         * @param {String} [options.accentColor] accent color of the outline

         * @param {String} [options.textColorLight] text color of the sub sections

         * @param {String} [options.defaultOpen] indicate the initial mode of the outline. Outline is open by default on desktop and closed on mobile.

         */

        constructor({backgroundColor, textColor, textColorLight, accentColor, defaultOpen}={}){

            this._headingMap = [];

            this._parentList = [];

            this._isMobile = window.innerWidth < 780; // mobile & tablet

            this._open = !this._isMobile;

            // set :root variables

            let root = document.documentElement;

            if(backgroundColor){

                root.style.setProperty('--outline-bg-color', backgroundColor);

            }

            if(textColor){

                root.style.setProperty('--outline-text-color', textColor);

            }

            if(accentColor){

                root.style.setProperty('--outline-primary-color', accentColor);

            }

            if(textColorLight){

                root.style.setProperty('--outline-text-color-light', textColorLight);

            }

            if(defaultOpen != undefined){

                this._open = defaultOpen;

            }

            // get heading tags

            const headingList = document.querySelectorAll("h1, h2, h3, h4, h5, h6")

            headingList.forEach(tag => {

                this._headingMap.push({

                    tag,

                    level: Number(tag.tagName[1])

                })

            });

            this._buildOutline();

            this._renderOutline();

        }

        _getParent = level =>{

            for(let i=0; i < this._parentList.length; i++){

                let node = this._parentList[i];

       

                if(node.level < level)

                    return node;

               

                if(node.level === level && node.elem.tagName == 'UL')

                    return node

            }

        }

       

        _getOffset(el) {

            const rect = el.getBoundingClientRect();

            return {

              x: rect.left + window.scrollX,

              y: rect.top + window.scrollY

            };

        }

        _hasSibilings = level => {

            const parent = this._getParent(level);

            const family = this._parentList.slice(0, this._parentList.indexOf(parent)+1);

            for(let i=0; i < family.length; i++){

                let node = family[i];

       

            if(node.level === level)

                    return true;

            }

            return false;

        }

        _buildOutline = () => {

            this._parentList = [{

                elem: document.createElement('ul'),

                level: 0

            }];

           

            for(let i=0; i < this._headingMap.length; i++){

                const level = this._headingMap[i].level;

                const parent = this._getParent(level)

               

                let li = document.createElement('li');

                let span = document.createElement('span');

                let div = document.createElement('div');

               

                // add navigation

                span.innerHTML = this._headingMap[i].tag.innerHTML;

                span.addEventListener('click', () => {

                    console.log('点击一次');

                    window.scrollTo(0, this._getOffset(this._headingMap[i].tag).y);                                    

                    if(this._isMobile) this.hideOutline();

                    document.getElementsByClassName('outline-search')[0].value = '';

                    this.onSearchInput('')  

                })

                               

                // build dom

                div.setAttribute('class','li-content li-title-'+level);

                div.appendChild(span);

                li.appendChild(div);

           

                let node = { elem: li, level};

                if(parent.elem.tagName == 'LI' || !this._hasSibilings(level)){

                    let ul = document.createElement('ul');

                    ul.appendChild(li);

                    node.elem = ul;

                }

               

                // attach to parent

                let container = parent.elem;

                if(parent.elem.tagName == 'UL'

                    && parent.elem?.childNodes[0]?.tagName == 'LI'

                    && !this._hasSibilings(level)){

                    container = parent.elem.firstChild;

                }

                // attach to list

                container.setAttribute('class','list-head');

                container.appendChild(node.elem);        

                this._parentList.unshift(node);

            }

           

            // save list root

            this._root = this._parentList[this._parentList.length-1].elem;  

            this._root.setAttribute('id','outline-list-root');      

        }

       

        _renderOutline = () => {            

            this._nav = document.createElement('nav');

            this._main = document.createElement('div');

            // menu icon

            this._menuIcon = document.createElement('div');

            this._menuIcon.classList = 'outline-menu-icon-container';

            this._menuMobile = document.createElement('div');

            this._menuMobile.classList.add('outline-mobile-menu-icon-container');

            // serachbar

            this._searchbar = document.createElement('input');

            this._searchbar.classList = 'outline-search';  

            this._searchbar.setAttribute('type','text');  

            this._searchbar.setAttribute('placeholder','Search...')

            this._searchbar.addEventListener('keyup', e => this.onSearchInput(e.target.value));

           

            // searchbar container

            this._searchbarContainer = document.createElement('div');

            this._noResults = document.createElement('p');

            this._noResults.innerHTML = 'No results found.';

            this._searchbarContainer.classList.add('outline-search-container');

            this._searchbarContainer.appendChild(this._searchbar);

            this._searchbarContainer.appendChild(this._noResults);

            // header

            this._navHeader = document.createElement('div');

            this._navHeader.classList = 'outline-nav-header';

            this._navHeader.appendChild(this._searchbarContainer);

            this._navHeader.appendChild(this._menuIcon);

            // outline

            this._nav.appendChild(this._navHeader);

            this._nav.classList = 'outline-nav';

            if(!this._open)

                this.hideOutline();

            // add to DOM

            document.body.removeChild(document.body.childNodes[0]);

            this._main.setAttribute('id','main-document');

            this._nav.appendChild(this._root);

            document.body.appendChild(this._main);

            this._main.appendChild(document.body.childNodes[0])

            document.body.appendChild(this._nav);

            if(this._isMobile || !this._open){

                this._main.appendChild(this._menuMobile);

                this._addIconSvg(this._menuMobile, 'menu');

            }else

                this._addIconSvg(this._menuIcon, 'close');

            this._menuIcon.addEventListener('click', e => {

                if(this._open) this.hideOutline()

                else this.showOutline();

                this._open = !this._open;

            });

           

            this._menuMobile.addEventListener('click', e => {

                this.showOutline()

                this._open = true;

                this._menuMobile.style.display = 'none';

            });

        }

       

        _addIconSvg = (container, icon) => {

            let html = icon === 'menu' ? menuSvg : closeSvg;

            container.innerHTML = html;

           

            if(this._isMobile){

                let svg = document.querySelector('.outline-mobile-menu-icon-container svg');

                if(svg) svg.classList.add('outline-mobile-menu-icon');

            }

        }

        /**

         * @function onSearchInput

         * @description Called when a search is submitted

         * @param {String} text text to search

         */

        onSearchInput = text => {

            let filter = text.toLowerCase();

            let spans = document.querySelectorAll('.li-content > span');

            let divs = document.querySelectorAll('.li-content');

            let resultsFound = false;

            for (let i = 0; i < spans.length; i++) {

                let txtValue = spans[i].innerText || spans[i].innerHTML;

                if (txtValue.toLowerCase().indexOf(filter) > -1) {

                  divs[i].style.display = "";

                  resultsFound = true;

                } else {

                  divs[i].style.display = "none";

                }

            }

            if(!resultsFound)

                this._noResults.style.display = 'block';

            else

                this._noResults.style.display = 'none';

        };

        /**

         * @function showOutline

         * @description Show document outline.

         * On **desktop** the outline is placed aside the main content takes 20% of the width.

         * On **mobile** the outline is placed above the main content and takes 100% of the width.

         */

        showOutline = () => {

            this._menuIcon.style.visibility = 'hidden';

            this._menuIcon.classList.remove('outline-menu-container-collapsed');

            this._navHeader.classList.remove('outline-nav-header-collapsed');

            this._main.classList.remove('no-outline');

           

            this._nav.classList.remove('outline-nav-collapsed')

            if(this._isMobile) document.body.style.overflow = 'hidden';

           

            this._root.style.display = 'block';

            this._root.style.visibility = 'visible';

            setTimeout(() =>{

                this._root.style.opacity = 1

                this._nav.style.overflowY = 'visible';

                this._menuIcon.style.visibility = 'visible';

                this._addIconSvg(this._menuIcon, 'close');

                this._searchbar.style.display = 'block';

            }, 400);

        }

        /**

         * @function hideOutline

         * @description Hide document outline.

         * On **desktop** the outline reduces its width to 3%.

         * On **mobile** the outline disappears completly and a floating button appears in the bottom-left corner.

         */

        hideOutline = () => {

            this._searchbar.style.display = 'none';

            this._menuIcon.style.visibility = 'hidden';

            this._addIconSvg(this._menuIcon, 'menu');

            this._navHeader.classList.add('outline-nav-header-collapsed');

            this._nav.style.overflowY = 'hidden';

            this._nav.classList.add('outline-nav-collapsed');

            this._main.classList.add('no-outline');

            if(this._isMobile) document.body.style.overflow = 'auto';

            this._root.style.visibility = 'hidden';

            this._root.style.opacity = 0;

           

            setTimeout(() => {

                this._root.style.display = 'none';

                this._menuIcon.classList.add('outline-menu-container-collapsed');

                this._menuIcon.style.visibility = 'visible';

               

                if(this._isMobile)

                    this._menuMobile.style.display = 'block';

            }, 350)

           

        }

    }

})();

 outline.css:

:root{

    --outline-text-color: white;

    --outline-text-color-light: lightgrey;

    --outline-primary-color: rgb(0, 140, 255);

    --outline-bg-color: rgb(37, 37, 37);

}

*{

    box-sizing: border-box;

    -webkit-tap-highlight-color: rgba(0,0,0,0);

}

body{

    margin-left: 0;

    margin-right: 0;

    padding-left: 0 !important;

    padding-right: 0 !important;

}

#main-document{

    width: 77%;

    margin-left: 23%;

    transition: width .3s, margin-left .3s;

}

#main-document.no-outline{

    width: 97%;

    margin-left: 3%;

}


 

/****** OUTLINE ******/

.outline-nav{

    background-color: var(--outline-bg-color);

    position: fixed;

    width: 20%;

    height: 100%;

    padding: 2% 1.5%;

    z-index: 10;

    top: 0;

    left: 0;

    overflow-x: hidden;

    overflow-y: visible;

    overflow-wrap: break-word;

    font-size: 1em;

    line-height: 1.5em;

    transition: width .35s, opacity .25s;

    box-shadow: 5px 0 10px rgba(0,0,0,.15);

}

.outline-nav-collapsed{

    padding: 2% 0 !important;

    width: 3%;

}

.outline-nav-header{

    display: grid;

    grid-template-columns: 70% 30%;

    align-items: center;

    margin-bottom: 15%;

}

.outline-nav-header-collapsed{

    display: grid;

    grid-template-columns: 100%;

    align-items: center;

    justify-items: center;

}


 

/****** OUTLINE SEARCH ******/

.outline-search-container{

    display: block;

}

.outline-search-container p{

    color: var(--outline-text-color-light);

    font-size: .8em;

    padding-left: 2.5%;

    display: none;

}

.outline-search{

    width: 60%;

    padding: 3%;

    background: transparent;

    border: solid 1px gray;

    border-radius: .2em;

    transition: width .2s;

    justify-self: start;

    font-size: .9em;

    line-height: 1.5em;

    color: var(--outline-text-color);

}

.outline-search:focus{

    width: 100%;

    border-color: var(--outline-primary-color);

}


 

/****** OUTLINE MENU ICON ******/

.outline-menu-icon-container{

    top: 1%;

    right: 2%;

    width: 30%;

    height: 100%;

    padding: 3%;

    justify-self: end;

    cursor: pointer;

    border-radius: 2em;

    align-items: start;

}

.outline-menu-container-collapsed{

    width: 70%;

    justify-self: center;

}

.outline-menu-icon-container svg{

    width: 100%;

    fill: var(--outline-primary-color);

}

.outline-menu-container-collapsed svg{

    height: 100%;

}

.outline-mobile-menu-icon-container{

    display: none;

}



 

/****** OUTLINE TOC ******/

.outline-nav ul, .outline-nav li{

    text-decoration: none;

    list-style-type: none;

}

.outline-nav li {

    cursor: pointer;

}

.outline-nav span{

    margin-bottom: 3%;

    transition: color .1s;

}

.outline-nav span:hover{

    color: var(--outline-primary-color);

}

.outline-nav li.list-head{

    color: var(--outline-text-color);

}

.outline-nav li.list-head div{

    border-bottom: 1px solid;

    border-bottom-color: var(--outline-primary-color);

    border-bottom-style: groove;

}

.outline-nav li:not(.list-head){

    color: var(--outline-text-color-light);

}

.outline-nav li:not(.list-head) div{

    border-bottom: none;

}

.outline-nav ul:first-child{

    margin-left: 0 !important;

    margin-block-start: 0 !important;

    padding-left: 0 !important;

}

#outline-list-root{

    transition: opacity .2s;

}

.li-content{

    margin-bottom: 6%;

}

.li-title-1{

    font-size: 1em;

    color: var(--outline-text-color);

}

.li-title-2{

    font-size: .9em;

}

.li-title-3{

    font-size: .85em;

}

.li-title-4{

    font-size: .8em;

}

.li-title-5{

    font-size: .75em;

}

.li-title-6{

    font-size: .7em;

}


 

/*********** ANIMATIONS ************/

.slide-left {

    -webkit-animation: slide-left 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;

            animation: slide-left 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;

}

@-webkit-keyframes slide-left {

    0% {

      -webkit-transform: translateX(0);

              transform: translateX(0);

    }

    100% {

      -webkit-transform: translateX(-100px);

              transform: translateX(-100px);

    }

  }

  @keyframes slide-left {

    0% {

      -webkit-transform: translateX(0);

              transform: translateX(0);

    }

    100% {

      -webkit-transform: translateX(-100px);

              transform: translateX(-100px);

    }

  }

/*********** MOBILE & TABLET ************/

@media only screen and (max-width: 780px){

    #main-document{

        width: 100%;

        margin-left: 0;

    }

   

    #main-document.no-outline{

        width: 100%;

        margin-left: 0%;

    }

    .outline-nav{

        position: fixed;

        width: 100%;

        padding: 6% 8%;

        font-size: 1em;

        line-height: 1.5em;

    }

   

    .outline-nav-collapsed{

        width: 0;

    }

    #outline-list-root {

        padding-inline-start: 5%;

        font-size: 1.35em;

    }

    .outline-mobile-menu-icon-container{

        display: block;

        position: sticky;

        bottom: 5%;

        left: 5%;

        width: 7vw;

        height: 7vw;

        border-radius: 5em;

        padding: 1%;

        z-index: 1000;

        background-color: var(--outline-bg-color);

        box-shadow: 0px 0 15px rgba(0,0,0,.25);

    }

   

    .outline-mobile-menu-icon-container svg{

        width: 100%;

        height: 100%;

        fill: var(--outline-primary-color);

    }

}


 

/****** MOBILE ******/

@media only screen and (max-width: 480px){

    .outline-mobile-menu-icon-container{

        display: block;

        bottom: 5%;

        left: 5%;

        width: 16vw;

        height: 16vw;

        border-radius: 5em;

        padding: 2.5%;

    }

    #outline-list-root{

        font-size: 1.1em;

        padding-inline-start: 0;

    }

   

}

 index.html

<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
<title>DocumentOutline.js</title><style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color:#ffffff; --text-color:#333333; --select-text-bg-color:#B5D6FC; --select-text-font-color:auto; --monospace:"Lucida Console",Consolas,"Courier",monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { break-after: avoid; }
  .typora-export #write::after { height: 0px; }
  .is-mac table { break-inside: avoid; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none 0s ease 0s; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; margin-top: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
svg[id^="mermaidChart"] { line-height: 1em; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
mark .md-meta { color: rgb(0, 0, 0); opacity: 0.3 !important; }
@media print {
  .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right: 1px solid rgb(221, 221, 221); background: inherit; white-space: nowrap; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: 0px 0px !important; border: none !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; background: 0px 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; overflow-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; }
.CodeMirror-wrap pre { overflow-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right: 30px solid transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background: rgba(255, 255, 0, 0.4); }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


@import '';

/*by H16nning*/

:root {
  --bg-color: #0d1117;
  --side-bar-bg-color: #161b22;
  --control-text-color: #e6ecf1;
  --primary-color: rgb(34, 137, 255);
  --primary-btn-border-color: #3884ff;
  --active-file-bg-color: #5d6574;
  --active-file-text-color: inherit;
  --active-file-border-color: #3884ff;
  --item-hover-text-color: #8092af;
  --item-hover-bg-color: #29303c;
  --window-border: 1px solid #5d6574;
  --select-text-font-color: #e6ecf1;
  --select-text-bg-color: #3277e5;

  --md-char-color: #8092af;
  --heading-char-color: #8092af;
  --meta-content-color: #3783ff;

  --borders: #353c49;
  --table-border-color: #353c49;
  --boxes: #29303c;
  --boxes-darker: #424b5a;
  --boxes-darker2: #485364;
  --boxes-darkest: #5b697e;
  --drag-placeholder-color: #424b5a;
  --mds: #060d17;

  --text-color: #e6ecf1;
  --heading-text-color: white;
  --light-text-color: #5b697e;
  --light-text-color-brighter: #768292;
  --codeboxes: white;
  --rawblock-edit-panel-bd: transparent;

  --primary-color-white: #5272a7;
  --primary-color-white-darker: #5a83c5;
  --primary-color-darker: #1f65d6;
  --focus-ring-color: #3783ff;

  --danger-color: rgb(255, 70, 66);

  --node-fill: #5252ad;
  --node-border: #3f3fb8;
  --cluster-fill: #ffffde;
  --cluster-border: #aaaa33;
  --note-fill: #fff5ad;
  --note-border: #aaaa33;

  /*****************************/

  --font-family: 'Roboto', sans-serif;
  --code-font-family: 'Source Code Pro';
  --monospace: 'Source Code Pro';
}

html,
.form-control,
.modal {
  font-size: 16px;
}

body {
  background: var(--bg-color);
  font-family: var(--font-family);
  font-weight: 400;
  color: white;
  line-height: 1.625rem;
  height: 100%;
}

#write {
  max-width: 850px;
  margin: 0 auto;
  padding: 30px;
  padding-bottom: 100px;
  position: static;
  width: 100%;
}

#write > ul:first-child,
#write > ol:first-child {
  margin-top: 30px;
}

a {
  color: var(--primary-color);
  text-decoration: none !important;
  transition-duration: 0.2s;
  transition-property: color;
}

a:hover {
  color: var(--primary-color-darker);
}

.ty-preferences a {
  color: var(--primary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  position: relative;
  color: var(--heading-text-color);
  cursor: text;
}

h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
  text-decoration: none;
}

h1 tt,
h1 code {
  font-size: inherit;
}

h2 tt,
h2 code {
  font-size: inherit;
}

h3 tt,
h3 code {
  font-size: inherit;
}

h4 tt,
h4 code {
  font-size: inherit;
}

h5 tt,
h5 code {
  font-size: inherit;
}

h6 tt,
h6 code {
  font-size: inherit;
}

h1 {
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: solid 2px var(--borders);
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

h5 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

h6 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

#write > h1.md-focus:before,
#write > h2.md-focus:before,
#write > h3.md-focus:before,
#write > h4.md-focus:before,
#write > h5.md-focus:before,
#write > h6.md-focus:before {
  color: var(--light-text-color);
  border: none;
  position: absolute;
  font-size: 1rem;
  font-weight: 700;
  padding: 0px;
  line-height: 1;
}

#write > h1.md-focus:before {
  content: 'h1';
  top: 1.25rem;
  left: -1.75rem;
}

#write > h2.md-focus:before {
  content: 'h2';
  top: 0.8rem;
  left: -1.75rem;
}

#write > h3.md-focus:before {
  content: 'h3';
  top: 0.55rem;
  left: -1.75rem;
}

#write > h4.md-focus:before {
  content: 'h4';
  top: 0.35rem;
  left: -1.75rem;
}

#write > h5.md-focus:before {
  content: 'h5';
  top: 0.2rem;
  left: -1.75rem;
}

#write > h6.md-focus:before {
  content: 'h6';
  top: 0.2rem;
  left: -1.75rem;
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child,
blockquote h1,
blockquote h2,
blockquote h3,
blockquote h4,
blockquote h5,
blockquote h6 {
  margin-top: 0rem;
}

p,
blockquote,
ul,
ol,
dl {
  margin: 0.5rem 0rem 1.5rem 0rem;
}

li > ol,
li > ul {
  margin: 0 0;
}

hr {
  height: 2px;
  padding: 0;
  margin: 16px 0;
  background-color: var(--borders);
  border: 0 none;
  overflow: hidden;
  box-sizing: content-box;
}

li p.first {
  display: inline-block;
}

ul,
ol {
  padding-left: 30px;
}

ul:first-child,
ol:first-child {
  margin-top: 0;
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

.md-blockmeta {
  color: var(--md-char-color);
}

mark {
  background-color: rgb(56, 132, 255, 0.4);
  color: var(--text-color);
}

/*BLOCKQUOTE*/

blockquote {
  width: 100%;
  background-color: var(--boxes);
  border-left: 4px solid var(--primary-color);
  border-radius: 0.3em;
  padding: 1rem;
}

blockquote blockquote {
  padding-right: 0;
}

table {
  font-size: 0.875rem;
  padding: 0;
  margin: 1.5rem 0;
  word-break: initial;
}

/*TABLE*/

table tr {
  border-top: 1px solid var(--borders);
  border-bottom: 1px solid var(--borders);
  margin: 0;
  padding: 0;
}

table tr.md-end-block {
  border-top: none;
}

table tr th {
  font-weight: bold;
  border: none;
  border-bottom: solid 2px var(--borders);
  margin: 0;
  padding: 10px 16px;
  transition-duration: 0.1s;
  transition-property: background-color;
}

table tr td {
  border: none;
  margin: 0;
  padding: 10px 16px;
  transition-duration: 0.1s;
  transition-property: background-color;
}

#write table tr td:hover,
#write table tr th:hover {
  background-color: var(--boxes);
}

table tr th:first-child,
table tr td:first-child {
  margin-top: 0;
}

table tr th:last-child,
table tr td:last-child {
  margin-bottom: 0;
}

/*OTHER TABLE THINGS*/

.ty-table-edit {
  padding: 0.3rem;
  border: solid 1px var(--borders);
  border-radius: 0.3rem;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  transition-duration: 0.3s;
  transition-property: opacity;
}

.ty-table-edit:active,
.ty-table-edit:focus,
.popover:active,
.popover:focus {
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

.popover {
  border: solid 1px var(--borders);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  border-radius: 0.3rem;
}

.popover .arrow {
  border-bottom-color: var(--borders);
}

.md-grid-board .md-grid-ext {
  background-color: var(--boxes);
}

.md-grid-board tr[row='1'] .md-grid-ext {
  background-color: var(--boxes-darkest);
}

.md-grid-board a.md-active,
.md-grid-board a:hover {
  background-color: var(--primary-color-white);
  border-color: var(--primary-color-white-darker);
}

#md-grid-width,
#md-grid-height {
  border-radius: 0.3rem;
  border-color: var(--borders);
  transition-duration: 0.3s;
  transition-property: border-color;
}

#md-grid-width:focus,
#md-grid-height:focus {
  border-radius: 0.3rem;
  border-color: var(--primary-color);
}

/*CODE*/

.CodeMirror {
  padding: 1rem;
  font-family: 'Source Code Pro', monospace;
}

.cm-s-inner .CodeMirror-gutters {
  background-color: none;
  border-right: none;
  border-radius: 0px;
  width: 2rem;
  color: white;
  height: 100%;
  white-space: nowrap;
}

.cm-s-inner .CodeMirror-gutter-wrapper {
  left: -2.75rem !important;
}

.CodeMirror.cm-s-typora-default div.CodeMirror-cursor {
  border-left: solid 2px var(--light-text-color-brighter);
}

.CodeMirror.cm-s-typora-default .CodeMirror-activeline-background {
  background-color: var(--boxes);
}

.cm-s-inner .CodeMirror-cursor {
  color: white;
  border-left: solid 1px white;
}

.cm-s-inner .CodeMirror-linenumber {
  color: white;
  opacity: 0.6;
  width: 1.9532rem !important /*required*/;
}

.cm-s-inner .CodeMirror-line::selection,
.cm-s-inner .CodeMirror-line::-moz-selection,
.cm-s-inner .CodeMirror-line > span::selection,
.cm-s-inner .CodeMirror-line > span::-moz-selection,
.cm-s-inner .CodeMirror-line > span > span::selection,
.cm-s-inner .CodeMirror-line > span > span::-moz-selection {
  background-color: rgba(255, 255, 255, 0.1);
}

.cm-s-inner span.cm-comment {
  color: #9daab6;
}

.cm-s-inner span.cm-string,
.cm-s-inner span.cm-string-2 {
  color: #71a7ff;
}

.cm-s-inner span.cm-number {
  color: #ff9d3d;
}

.cm-s-inner span.cm-variable,
.cm-s-inner span.cm-variable-2 {
  color: white;
}

.cm-s-inner span.cm-def {
  color: white;
}

.cm-s-inner span.cm-operator {
  color: #ff9d3d;
}

.cm-s-inner span.cm-keyword {
  color: #61e3a5;
}

.cm-s-inner span.cm-atom {
  color: #bd93f9;
}

.cm-s-inner span.cm-meta {
  color: #f8f8f2;
}

.cm-s-inner span.cm-link {
  color: var(--primary-color);
}

.cm-s-inner span.cm-tag,
.cm-s-inner .cm-header {
  color: #b4f6d6;
}

.cm-s-inner span.cm-attribute {
  color: #ff9d3d;
}

.cm-s-inner span.cm-qualifier,
.cm-s-inner span.cm-type,
.cm-s-inner span.cm-variable-3 {
  color: #82ee9d;
}

.cm-s-inner span.cm-property {
  color: #ffd6ad;
}

.cm-s-inner span.cm-builtin {
  color: #8ffaaa;
}

.md-fences.md-focus .cm-s-inner .CodeMirror-activeline-background {
  background: none;
}

.cm-s-inner .CodeMirror-selected,
.cm-s-inner .CodeMirror-selectedtext {
  background-color: rgba(255, 255, 255, 0.1);
}

.cm-s-typora-default .cm-header,
.cm-s-typora-default .cm-property {
  color: var(--primary-color);
}

#typora-source span.cm-variable {
  color: var(--window-border);
}

#write .code-tooltip {
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  border: solid 1px var(--borders);
  border-radius: 0.3rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  width: 15rem;
  height: 2.5rem;
  bottom: -3rem;
  padding: 0.1875rem;
}

#write .code-tooltip .ty-input {
  border: solid 1px var(--borders);
  height: 2rem;
  line-height: 2rem;
  margin: 0rem;
  padding-left: 0.5rem !important;
  text-align: left;
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-family);
  transition-duration: 0.3s;
  transition-property: border;
}

#write .code-tooltip .ty-input:focus {
  border-color: var(--primary-color);
}

.html-for-mac .ty-cm-lang-input:empty:after {
  left: 0.5rem;
}

.autoComplt-list li,
.fences-auto-suggest li {
  font-weight: 500;
  transition-duration: 0.3s;
  transition-property: background-color, color;
}

.autoComplt-list li.active,
.fences-auto-suggest li:hover {
  background-color: var(--boxes);
  color: var(--primary-color);
}

.md-fences,
tt {
  border-radius: 0.3rem;
  color: #ffffff;
  padding: 1.5rem;
  font-size: 0.8rem;
}

code {
  padding: 0.25rem 0.5rem;
  background-color: var(--boxes);
  font-size: 0.9rem;
  border-radius: 0.2rem;
}

.md-fences .CodeMirror div.CodeMirror-cursor,
.md-htmlblock-panel .CodeMirror div.CodeMirror-cursor {
  border-left: solid 1px white;
}

.md-fences {
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 8px;
  padding-bottom: 6px;
  background-color: var(--mds);
}

/*DIAGRAMS*/

.md-diagram-panel {
  color: var(--text-color);
  border: solid 1px var(--borders);
  border-radius: 0.3rem;
}

.md-diagram-panel text,
.md-diagram-panel .label {
  color: var(--text-color);
}

.md-diagram-panel text {
  fill: var(--text-color) !important /*required*/;
}

.md-diagram-panel-error {
  color: var(--danger-color);
}
/*CHECKBOXES*/

.md-task-list-item > input:before,
input[type='checkbox']:before {
  border-radius: 0.2rem;
  margin-top: -0.08rem;
  margin-left: -0.1rem;
  width: 1rem;
  height: 1rem;
  background-color: var(--borders);
  content: ' ';
  display: block;
  transition-duration: 0.3s;
  transition-property: background-color;
}

.md-task-list-item:hover > input:before,
input[type='checkbox']:hover:before {
  background-color: var(--boxes-darker);
}

.md-task-list-item > input:checked:before,
.md-task-list-item > input[checked]:before,
input[type='checkbox']:checked:before {
  background-color: var(--primary-color);
}

.md-task-list-item:hover > input:checked:before,
.md-task-list-item:hover > input[checked]:before,
input[type='checkbox']:hover:checked:before {
  background-color: var(--primary-color-darker);
}

.md-task-list-item > input:after,
.md-task-list-item > input:after,
input[type='checkbox']:after {
  transform: rotate(-45deg);
  position: absolute;
  border: 2px solid white;
  border-top: 0;
  border-right: 0;
  top: 0.16rem;
  left: 0.1rem;
  width: 0.6rem;
  height: 0.375rem;
  content: ' ';
  opacity: 0;
  transition-duration: 0.3s;
  transition-property: opacity;
}

.md-task-list-item > input:checked:after,
.md-task-list-item > input[checked]:after,
input[type='checkbox']:checked:after {
  opacity: 1;
}

.ty-preferences input[type='checkbox']:before {
  width: 1.2rem;
  height: 1.2rem;
}

.ty-preferences input[type='checkbox']:after {
  width: 0.5rem;
  height: 0.32rem;
  top: 0.19rem;
  left: 0.14rem;
}

@media print {
  html {
    font-size: 13px;
  }

  table,
  pre {
    page-break-inside: avoid;
  }

  pre {
    word-wrap: break-word;
  }
}

#write pre.md-meta-block {
  padding: 1rem;
  line-height: 1.45;
  background-color: var(--boxes);
  border: 0;
  border-radius: 0.3rem;
  color: var(--text-color);
  border-left: solid 4px var(--boxes-darkest);
}

.md-image > .md-meta {
  border-radius: 3px;
  padding: 2px 0px 0px 4px;
  font-size: 0.9em;
  color: inherit;
}

.md-tag {
  color: var(--md-char-color);
  opacity: 1;
}

.md-toc {
  margin: 1.5rem 0rem;
}

/*MATH*/

.md-rawblock {
  margin: 1.5rem 0rem;
}

.md-rawblock-container {
  transition-duration: 0.3s;
  transition-property: box-shadow, border;
  padding: 8px;
  border: solid 1px transparent;
  border-radius: 0.3rem;
}

.md-rawblock:hover > .md-rawblock-container {
  background-color: transparent;
  border: solid 1px var(--borders);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

.md-mathblock-input .CodeMirror div.CodeMirror-cursor {
  border-left: 1px solid white;
}

.md-math-block .md-rawblock-control:not(.md-rawblock-tooltip) {
  background-color: var(--bg-color);
  border-left: solid 2px var(--primary-color);
  border-right: solid 2px var(--primary-color);
}

.md-math-block .md-rawblock-before {
  border-top-left-radius: 0.3rem;
  border-top-right-radius: 0.3rem;
  border-top: solid 2px var(--primary-color);
}

.md-math-block .md-rawblock-after {
  border-bottom-left-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
  border-bottom: solid 2px var(--primary-color);
  margin-bottom: 0.5rem;
}

#write .md-math-block .code-tooltip {
  width: 100%;
}

/*HTML*/

.md-htmlblock-panel {
  border: solid 2px var(--primary-color);
  border-radius: 0.3rem;
}

/*FOOTER*/

.footer-item {
  opacity: 1 !important;
  color: var(--light-text-color);
  transition: 0.3s;
  background: none !important;
}

.footer-item:hover {
  color: var(--light-text-color-brighter) !important;
}

#outline-btn:hover {
  color: var(--light-text-color-brighter) !important;
}

/*SIDEBAR*/

#typora-sidebar {
  border-right: solid 1px var(--borders);
}

.info-panel-tab {
  opacity: 1;
}

.info-panel-tab-border {
  color: var(--primary-color);
}

#ty-sidebar-search-back-btn {
  margin: auto;
}

.ty-show-outline-filter #file-library-search,
.ty-show-search #file-library-search {
  height: 4rem;
}

#file-library-search-input {
  height: 2rem;
}

#file-library-search-panel input {
  margin-top: 8px !important;
}

.ty-sidebar-search-panel .searchpanel-search-option-btn {
  top: 14px;
}

#typora-sidebar #filesearch-case-ion-btn,
#typora-sidebar #filesearch-word-ion-btn {
  background: none;
  margin-top: 0.45rem;
  transition-duration: 0.2s;
  transition-property: background-color;
}

#typora-sidebar #filesearch-case-ion-btn:hover,
#typora-sidebar #filesearch-word-ion-btn:hover {
  color: var(--primary-color);
}

/*sidebar outline*/

#close-outline-filter-btn {
  top: 15px;
  opacity: 1;
  color: var(--light-text-color) !important;
}

#close-outline-filter-btn:hover {
  color: var(--primary-color) !important;
  background-color: transparent !important;
}

#close-outline-filter-btn:active {
  background-color: transparent !important;
}

#outline-content {
  padding-right: 0px;
  line-height: 1rem;
}

.outline-item {
  display: flex;
  padding-top: 0px;
  padding-bottom: 0px;
}

.outline-item .outline-label {
  display: block;
  width: 100%;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  border-right: solid 2px transparent;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--light-text-color-darker);
  transition-duration: 0.3s;
  transition-property: color;
}

.outline-item:hover {
  background: none;
}

.outline-item:hover .outline-label {
  color: var(--primary-color);
}

.outline-label:hover {
  text-decoration: none;
}

.outline-active.outline-label {
  border-right: solid 2px var(--primary-color);
  font-weight: 500;
  color: var(--primary-color);
}

.outline-expander {
  padding-top: 0.4rem;
  padding-right: 0.5rem;
}

/*sidebar file-list and search results*/

#file-library-list[data-state='complete'] #sidebar-loading-template {
  padding: 0rem;
}

#typora-sidebar .file-list-item,
.ty-search-item {
  border: none;
  transition-duration: 0.3s !important;
  transition-property: background-color, border, color !important;
  padding: 1rem;
}

#typora-sidebar .file-list-item:hover,
.ty-search-item:hover {
  background: var(--borders);
}

#typora-sidebar .ty-search-item-line:hover,
#typora-sidebar .ty-search-item-line.active {
  background-color: transparent;
}

#typora-sidebar .ty-search-item-line.active {
  color: var(--primary-color);
  font-weight: 800;
}

#typora-sidebar .file-list-item-file-name {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0rem;
  line-height: 1.8rem;
  float: right;
}

#typora-sidebar .file-list-item-file-ext-part {
  font-weight: 800;
  opacity: 0.5;
}

#typora-sidebar .file-list-item-parent-loc,
#typora-sidebar .file-list-item-time {
  font-weight: 400;
  opacity: 0.5;
  display: block;
}

#typora-sidebar .file-list-item-summary {
  float: left;
  font-size: 0.8rem;
  opacity: 0.9;
}

#typora-sidebar input.file-list-item-file-name {
  margin: 0.5rem 0rem 0.5rem 0.7rem;
  padding: 0.4rem !important;
  line-height: 1rem;
  float: right;
  border-radius: 0.3rem;
  font-weight: 500;
  background-color: var(--bg-color) !important;
}

#typora-sidebar .file-list-item.file-library-file-node {
  border: none;
}

#typora-sidebar .file-tree-node.active .file-node-background,
#typora-sidebar .file-list-item.active,
#typora-sidebar .ty-search-item.active {
  background-color: var(--bg-color);
  outline: 1px solid var(--borders);
  border: none;
  color: var(--primary-color) !important;
}

#typora-sidebar .file-tree-node.active .file-node-content {
  color: var(--primary-color) !important;
}

#typora-sidebar .file-tree-node {
  padding: 0rem;
  font-weight: 500;
  font-size: 0.9rem;
  margin-left: 0.8rem;
}

#typora-sidebar .file-tree-node .file-node-content {
  padding: 0rem;
  line-height: 2.2rem;
  height: 2.2rem;
  background: none;
}

#typora-sidebar .file-tree-node .file-node-background {
  padding: 0rem;
  height: 2.2rem;
}

#typora-sidebar .file-tree-node .file-node-icon {
  margin-right: 0.5rem;
}

#typora-sidebar .file-tree-node .file-node-icon.fa-file-text-o {
  margin-top: 0.33rem;
}

#typora-sidebar .file-tree-node .file-node-icon.fa-folder {
  margin-top: 0.36rem;
}

#typora-sidebar .file-tree-node .fa-caret-down,
#typora-sidebar .file-tree-node .fa-caret-right {
  position: relative;
  top: 5px;
}

#typora-sidebar .file-tree-node .file-tree-rename-input {
  height: 2.2rem;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0rem;
  padding-left: 0rem;
}

/*no left border*/
#typora-sidebar .file-tree-node.active > .file-node-background {
  border: none;
}

/*no dotted highlighting*/
.file-library-node:not(.file-node-root):focus > .file-node-content {
  outline: none;
}

#typora-sidebar #sidebar-files-menu {
  border: solid 1px var(--borders);
  border-radius: 0.3rem;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

#typora-sidebar #ty-sidebar-footer {
  border-top: solid 1px var(--borders);
  background-color: var(--bg-color);
  font-weight: 500;
}

#typora-sidebar #ty-sidebar-footer li {
  transition-duration: 0.2s;
  transition-property: background-color, color;
}

#typora-sidebar #ty-sidebar-footer li:hover {
  color: var(--primary-color);
  background-color: var(--boxes);
}

#typora-sidebar .ty-search-item-collapse-icon {
  top: 9px;
}

/*cursor*/
.file-node-content:hover {
  cursor: pointer;
}

.file-tree-node:not(.file-node-root):not(.file-node-expanded) .file-node-background {
  transition-duration: 0.2s;
  transition-property: background-color;
}

.file-tree-node:not(.file-node-root):not(.file-node-expanded):hover .file-node-background {
  background-color: var(--borders);
}

/*sidebar footer*/
#typora-sidebar .sidebar-footer-item {
  transition-duration: 0.2s;
  transition-property: background-color, color;
  font-weight: 700;
}

#typora-sidebar .sidebar-footer-item:hover {
  color: var(--primary-color);
  background-color: var(--boxes);
}

#typora-quick-open {
  background-color: var(--bg-color);
  border: 1px solid var(--borders);
  border-radius: 0.3rem;
  padding: 0rem;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

#typora-quick-open-input {
  margin-right: 20px;
}

#typora-quick-open-input .input {
  box-shadow: none;
  border: none;
  margin: 0.5rem;
  margin-left: 0.8rem;
}

.typora-quick-open-item {
  background-color: var(--bg-color);
  border: none;
  font-weight: 500;
  transition-duration: 0.2s;
  transition-property: background-color;
}

.typora-quick-open-item:hover {
  background-color: var(--boxes);
  color: var(--primary-color);
}

.typora-quick-open-item.active {
  background-color: var(--boxes);
  border: none;
}

.ty-quick-open-category-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 1;
  color: var(--light-text-color);
  line-height: 32px;
  padding-top: 6px;
  height: 32px;
}

/** focus mode */
.on-focus-mode blockquote {
  border-left-color: rgba(85, 85, 85, 0.12);
}

.md-lang {
  color: var(--primary-color);
}

/*NOTIFICATION*/

#md-notification {
  border-bottom: solid 1px var(--borders);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

#md-notifcation .btn {
  border: 0;
}

/*PREFERENCES*/

.ty-preferences {
  font-family: var(--font-family);
}

.ty-preferences .window-header {
  justify-content: space-between;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  border-bottom: solid 1px var(--borders);
}

.ty-preferences .window-header-content {
  background-color: var(--bg-color);
  margin: 0rem;
}

.ty-preferences .window-header h2 {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0rem;
  margin-left: 1rem;
}

.unibody-window .ty-preferences .window-header h2 {
  margin-left: 1rem !important;
}

.ty-preferences .window-header-back {
  margin-left: 1.2rem;
}

.ty-preferences .window-header-back .icon {
  border-right: none;
}

/*preferences sidebar*/
.ty-preferences .window-content {
  background-color: var(--bg-color);
}

.ty-preferences .nav-group-item {
  color: var(--text-color);
  height: 2.5rem;
  line-height: 2.6rem;
  font-weight: 500;
  padding: 0px 0px 0px 2rem;
  font-size: 1rem;
  transition-duration: 0.2s;
  transition-property: background-color;
}

.ty-preferences .nav-group-item:hover {
  background-color: var(--borders);
  border-radius: 0px;
}

.ty-preferences .nav-group-item.active {
  border-radius: 0rem;
  border: none;
  outline: 1px solid var(--borders);
  background-color: var(--bg-color);
  color: var(--primary-color);
}

.ty-preferences .pane-sm {
  background: var(--boxes);
  flex-basis: 240px;
  flex-grow: 0;
  justify-content: center;
  border-right: 1px solid var(--borders);
  margin: 0rem;
  padding: 0rem;
}

.ty-preferences .pane-sm .list-group {
  width: 100%;
  max-width: 30rem;
}

.ty-preferences .list-group-header {
  display: flex;
  justify-content: space-around;
}

.ty-preferences .list-group-header div {
  width: 100%;
  margin-right: 18px;
  margin-left: 18px;
}

.ty-preferences .pane-sm .search-input {
  margin: 0rem !important;
  width: 100%;
  font-size: 1rem !important;
  height: 2.75rem;
}

.ty-preferences .pane-sm .search-input:active,
.ty-preferences .pane-sm .search-input:focus {
  border: solid 1px var(--primary-color) !important;
  outline: none;
}

/*preferences main*/
.ty-preferences .panel-header {
  font-weight: 600;
  font-size: 1.6rem;
}

/*preferences stuff*/
.ty-preferences .dropdown-menu > li,
.dropdown-item {
  font-weight: 500;
  font-size: 1rem;
  transition-duration: 0.2s;
  transition-property: all;
}

.ty-preferences .dropdown-menu .active,
.ty-preferences .dropdown-menu li:hover,
.dropdown-item:hover {
  background-color: var(--boxes);
  color: var(--primary-color);
}

#ty-spell-check-dict-missing-secondary-btn:hover {
  color: var(--primary-color) !important;
}

.header-close .icon {
  border: none !important;
}
/*DROPDOWN*/

.dropdown-menu:not(.megamenu-menu-list),
.auto-suggest-container {
  background-color: var(--bg-color);
  border: solid 1px var(--borders) !important;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  user-select: none;
}

.dropdown-menu > li > a {
  font-weight: 500;
  font-size: 0.8rem;
  transition-duration: 0.2s;
  transition-property: all;
}

.dropdown-menu > .active > a,
.dropdown-menu > li > a:hover,
.menu-style-btn.active,
.context-menu.dropdown-menu > .active > a,
.context-menu.dropdown-menu > li > a:hover {
  color: var(--primary-color);
  background-color: var(--boxes);
}

.menu-style-btn {
  color: var(--text-color);
  border: none;
  transition-duration: 0.2s;
  transition-property: all;
}

.menu-style-btn:hover {
  color: var(--primary-color);
  background-color: var(--boxes);
  border: none;
}

header .menu-style-btn:hover {
  background-color: transparent;
}

.menu-item-container {
  padding: 0 12px 0 4px;
}

.menu-item-container a.menu-style-btn {
  padding: 0.3rem 0.6rem;
  margin: 0;
}

.dropdown-menu .divider {
  border-color: var(--borders);
}

/*BUTTON*/

.btn,
button,
.md-image-btn {
  border: none !important;
  border-radius: 0.3em !important;
  color: var(--text-color) !important;
  transition-duration: 0.2s;
  transition-property: all;
  font-size: 0.9em !important;
  font-weight: 500;
  outline: none;
}

.btn-default,
.md-image-btn {
  border: none !important;
  border-radius: 0.3em !important;
  background-color: var(--boxes) !important;
}

.btn:hover,
.button-hover,
.md-image-btn:hover {
  border: none;
  border-radius: 0.3em;
  background-color: var(--borders) !important;
  color: var(--text-color);
}

button:active,
button.active,
.btn:active,
.btn-default:active,
.md-image-btn:active {
  border: none;
  border-radius: 0.3em;
  background-color: var(--boxes-darker) !important;
  box-shadow: none;
  outline: none;
  color: var(--text-color);
}

.btn:focus,
.md-image-btn:focus {
  border: none !important;
  outline: none !important;
  background-color: var(--boxes-darker);
}

.btn-primary {
  border: none;
  border-radius: 0.3em;
  background-color: var(--primary-color);
  color: white !important;
}

.btn-primary:hover,
.btn-primary:focus {
  color: white;
  background-color: var(--primary-color-darker) !important;
}

.btn.dropdown-toggle-split,
.btn.dropdown-toggle-split:hover {
  border-radius: 0em 0.3em 0.3em 0em;
}

#ty-spell-check-dict-missing-primary-btn {
  border-radius: 0.3em 0em 0em 0.3em;
}

.open > .dropdown-toggle.btn-primary {
  background-color: var(--primary-color);
  border-color: transparent;
}

/*GHOST BUTTON*/

.window-header button,
#close-sidebar-menu-btn,
.html-for-mac .sidebar-tab-btn,
.label-hint,
.ty-table-edit .btn,
.zoom-hint-button {
  background-color: transparent !important;
  color: var(--light-text-color) !important;
  opacity: 1 !important;
  transition-duration: 0.2s;
  transition-property: color;
}

.window-header button:hover,
.window-header button:focus,
#close-sidebar-menu-btn:hover,
#close-sidebar-menu-btn:focus,
.html-for-mac .sidebar-tab-btn:hover,
.html-for-mac .sidebar-tab-btn:focus,
.label-hint:hover,
.label-hint:focus,
.ty-table-edit .btn:hover,
.ty-table-edit .btn:focus,
.zoom-hint-button:hover,
.zoom-hint-button:focus {
  color: var(--primary-color) !important;
  background: none !important;
}

.ty-table-edit .btn.active {
  color: var(--primary-color) !important;
  box-shadow: none;
}

/*IMAGE BUTTON*/

.md-image-btn {
  background-color: var(--boxes);
  transition-duration: 0.2s;
  transition-property: background-color;
}

.md-image-btn:before {
  color: var(--text-color);
  transition-duration: 0.2s;
  transition-property: color;
}

.md-image-btn:hover {
  background-color: var(--borders);
}

.md-image-btn:hover:before {
  color: var(--primary-color);
}

.md-image-input-src-btn {
  border-radius: 0.3rem 0rem 0rem 0.3rem !important;
}

.md-image-pick-file-btn {
  border-left: none;
  border-radius: 0rem 0.3rem 0.3rem 0rem !important;
}

/*SEARCH-INPUTS*/

.search-input,
.search,
.form-control,
#file-library-search-input {
  background-color: transparent !important;
  border-radius: 0.3rem !important;
  border: solid 1px var(--boxes-darker2) !important;
  box-shadow: none !important;
  color: var(---heading-text-color) !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  padding: 0.7rem !important;
  height: 2rem;
  transition-duration: 0.2s;
  transition-property: border;
}

.search-input:focus,
.search:focus,
.form-control:focus,
#file-library-search-input:focus {
  background-color: transparent !important;
  border-radius: 0.3rem !important;
  border-color: var(--primary-color) !important;
  box-shadow: none !important;
  color: var(--heading-text-color) !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  padding: 0.7rem !important;
}

.search-input::placeholder,
.search::placeholder,
.form-control::placeholder,
#file-library-search-input::placeholder {
  color: var(--light-text-color-brighter) !important;
}

.clear-btn-icon {
  top: 9px !important /*required*/;
  right: 9px !important /*required*/;
}

.content tr.search-hit,
.search-hit,
.md-search-hit,
.md-search-hit.md-search-select,
.md-search-select,
.ty-file-search-match-text {
  background: rgba(56, 132, 255, 0.3) !important;
}

/*ZOOM HINT*/

#zoom-hint {
  border-radius: 0.3rem;
  border: solid 1px var(--borders);
  user-select: none;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

#zoom-hint #zoom-hint-reset {
  border-left: none;
  font-weight: 600;
}

/*SEARCHPANEL*/

#md-searchpanel {
  border-bottom: 1px solid var(--borders);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  max-height: 46px;
}

#md-searchpanel.searchpanel-replace-mode {
  max-height: 84px;
}

#md-searchpanel input {
  height: 2rem;
  margin: 0rem !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
}

#md-searchpanel .input-group-addon {
  height: 2rem;
}

#md-searchpanel .input-group-addon.close-btn {
  padding-left: 8px;
}

.unibody-window #md-searchpanel .btn {
  line-height: 2rem;
}

.searchpanel-search-option-btn {
  top: 9px;
  border: none;
  color: var(--light-text-color-brighter) !important /*required*/;
  transition-duration: 0.3s;
}

.searchpanel-search-option-btn:hover {
  color: var(--primary-color) !important /*required*/;
  background-color: transparent !important /*required*/;
}

.searchpanel-search-option-btn.select,
.searchpanel-search-option-btn.active {
  color: white !important;
  background-color: var(--primary-color) !important;
}

#searchpanel-case-option-btn {
  right: 33px;
}

#searchpanel-word-option-btn {
  right: 9px;
}

#searchpanel-word-option-btn,
#searchpanel-case-option-btn {
  background: none;
}

#md-searchpanel .btn:not(.close-btn):hover {
  box-shadow: none;
}

/*NUMBER-INPUT*/

input[type='text']::placeholder {
  color: var(--light-text-color-brighter) !important;
}

input[type='number'] {
  background-color: var(--boxes) !important;
  border: none !important;
  border-radius: 0.3rem;
}

input[type='number']:focus {
  background-color: var(--item-hover-bg-color) !important;
}

/*SELECTS*/

select {
  background-color: var(--bg-color) !important;
  border-radius: 0.3rem !important;
  border: solid 1px var(--boxes-darker2) !important;
  box-shadow: none !important;
  color: var(---heading-text-color) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  padding: 0.3rem !important;
  height: 2.1rem;
  transition-duration: 0.2s;
  transition-property: border;
}

select:hover {
  background-color: var(--bg-color) !important;
  border-radius: 0r3em !important;
  border-color: var(--primary-color) !important;
  box-shadow: none !important;
  color: var(--heading-text-color) !important;
  font-size: 0.9rem !important;
}

/*MODAL*/

.modal-header,
#common-dialog .modal-header {
  border-bottom: solid 1px var(--borders);
  padding-bottom: 15px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 500;
  user-select: none;
}

.modal-body {
  font-size: 0.9rem;
  color: var(--light-text-color-brighter);
  user-select: none;
}

.modal-content {
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  border: solid 1px var(--borders);
  border-radius: 0.3rem;
}

.modal-footer {
  border-top: solid 1px var(--borders);
}

.modal-open .modal.fade.in {
  background-color: rgba(2, 7, 12, 0.781);
}

/*SCROLLBAR*/

::-webkit-scrollbar {
  width: 9px;
  height: 8px;
  padding: 4px;
  position: absolute;
  background-color: var(--borders);
  border: solid 1px var(--boxes-darker);
  border-radius: 4.5px;
}

::-webkit-scrollbar:hover {
  background-color: var(--borders);
}

::-webkit-scrollbar-corner {
  background: 0 0;
}

::-webkit-scrollbar-thumb {
  background: var(--boxes-darker2);
  background-clip: padding-box;
  border-radius: 4.5px;
  margin-right: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--boxes-darkest);
}

::-webkit-scrollbar-thumb:active {
  background: var(--boxes-darkest);
}

/*LANGS*/

.ty-spell-check-panel-item {
  font-weight: 500;
  transition-duration: 0.2s;
  transition-property: background-color, color;
}

.ty-spell-check-panel-item:hover {
  color: var(--primary-color);
  background-color: var(--boxes);
}

.ty-spell-check-panel-item.ty-active {
  background-color: var(--boxes);
}

/*TOOLTIP*/

.ty-tooltip {
  color: var(--text-color) !important;
  background-color: var(--boxes) !important;
  border-radius: 0.3rem !important;
  border: 1px solid var(--borders) !important;
  -webkit-filter: none !important;
  filter: none;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
}

/*FOOTER*/

footer.ty-footer {
  border: none;
}

.footer-item:hover {
  background-color: var(--boxes) !important;
}

#footer-word-count-info {
  padding: 4px 0;
}

.footer-word-count-info-line {
  padding: 0.25rem;
  line-height: 1.6rem;
}

#footer-word-count-info tr {
  font-weight: 500;
  font-size: 0.8rem;
  transition-duration: 0.2s;
  transition-property: all;
}

#footer-word-count-info tr td:nth-child(1) {
  padding: 0rem;
  padding-right: 1rem;
}

#footer-word-count-info .ty-footer-word-count-all tr:hover {
  color: var(--primary-color) !important;
  background-color: var(--boxes) !important;
}

/*MEGAMENU*/

.megamenu-menu {
  box-shadow: none;
  background-color: var(--boxes);
  border-right: 1px solid var(--borders);
}

.megamenu-opened .megamenu-menu {
  left: 0px;
}

#megamenu-menu-list {
  box-shadow: none;
  border: none;
  background-color: transparent;
}

#megamenu-menu-list li a {
  color: var(--text-color);
  height: 2rem;
  line-height: 1.8rem;
  transition-duration: 0.2s;
  transition-property: background-color;
}

#megamenu-menu-list li a:hover {
  background-color: var(--borders);
}

#megamenu-menu-list li a.active {
  color: var(--primary-color);
  background-color: var(--bg-color);
  outline: solid 1px var(--borders);
}

#megamenu-menu-list .divider {
  background-color: var(--borders);
  margin: 16px 0 0 0;
}

.megamenu-menu-list .saved #m-saved {
  cursor: default;
}

.megamenu-menu-list .saved #m-saved .fa {
  color: var(--primary-color);
}

.megamenu-menu-list .saved #m-saved:hover {
  background-color: transparent;
}

.megamenu-menu-list #m-close:hover {
  color: var(--danger-color);
}

.megamenu-menu-header {
  border-bottom: solid 1px var(--borders);
  margin-bottom: 1.2rem;
  height: 74px;
  transition-duration: 0.3s;
}

.megamenu-menu-header:hover {
  background-color: var(--borders);
}

.megamenu-menu-header #megamenu-menu-header-title {
  color: var(--text-color);
  font-weight: 700;
  font-size: 16px;
  left: 56px;
  top: 24px;
}

#megamenu-back-btn {
  color: var(--text-color);
  font-size: 16px;
  left: 24px;
  top: 24px;
}

.megamenu-opened header {
  background-color: var(--bg-color);
  background-image: none;
}

.megamenu-content {
  background-color: var(--bg-color);
  background-image: none;
}

.megamenu-menu-panel:not(:first-of-type) {
  margin-top: 2rem;
}

.megamenu-menu-panel h1 {
  font-weight: 900;
  font-size: 1.8rem;
  margin: 1rem 0rem 0.4rem 0rem;
}

.megamenu-menu-panel h2 {
  font-weight: 800;
  font-size: 1.3rem;
  margin: 1rem 0rem 0.4rem 0rem;
}

/*recent files*/

#recent-file-panel tbody tr {
  font-weight: 600;
  transition-duration: 0.4s;
}

#recent-file-panel tbody tr:hover,
.megamenu-menu-panel tbody tr:hover td:nth-child(1) {
  color: var(--primary-color);
}

#recent-file-panel tbody tr:nth-child(2n-1) {
  background-color: var(--boxes);
}

/*about help*/

.about-content-slogon {
  color: var(--light-text-color);
}

/*for the god himself*/
.about-content-slogon span {
  color: var(--primary-color) !important;
}

#about-content tbody tr {
  font-weight: 500;
  transition-duration: 0.4s;
}

#about-content tbody tr:hover {
  color: var(--primary-color);
  background-color: var(--boxes) !important /*required important*/;
}

.long-btn {
  margin-bottom: 12px;
  margin-left: 2px;
  box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 6px;
  background-color: var(--bg-color);
  border: 1px solid var(--borders);
  border-radius: 0.3rem;
  padding: 1rem;

  font-weight: 500;
  font-size: 1rem;

  transition-duration: 0.2s;
}

.long-btn:hover {
  background-color: var(--bg-color);
  border: 1px solid var(--primary-color);
  color: var(--primary-color) !important /*important required*/;
}

#m-import-local:hover .preference-item-hint {
  color: var(--primary-color);
  opacity: 0.7;
}

#recent-file-panel-action-btn {
  height: 34px;
  border: none;
  background-color: var(--boxes);
}

#theme-preview-grid {
  max-width: none;
  padding: 1rem;
  background-color: var(--boxes);
  border-radius: 0.5rem;
}

.theme-preview-div {
  border: none;
  border-radius: 0.4rem;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 15px;
  margin: 0.75rem;
  transition-duration: 0.3s;
}

.theme-preview-div:hover {
  box-shadow: rgba(0, 0, 0, 0.6) 3px 8px 15px;
  cursor: pointer;
  transform: rotate3d(1, -0.2, 0.2, 15deg);
}

.theme-preview-content {
  width: 100%;
  height: 100%;
  border-radius: 0.4rem;
}

.theme-preview-content html {
  width: 100%;
  height: 100%;
}

.theme-preview-div.active .fa {
  color: var(--primary-color);
  bottom: 4px;
  left: 4px;
}

.theme-preview-div .fa-check-circle:before {
  background-color: var(--bg-color);
  padding: 0px 2px;
  border-radius: 1rem;
}

.megamenu-menu-panel tbody tr {
  border-radius: 0.3rem;
  transition-duration: 0.2s;
  transition-property: background-color;
}

.megamenu-menu-panel tbody tr:hover {
  background-color: var(--borders) !important /*required important*/;
}

/*MIN MAX CLOSE*/
#w-min,
#w-max,
#w-restore,
#w-close {
  border-radius: 0px !important;
  font-size: 10px !important;
  width: 46px !important;
  height: 29px !important;
}

.btn.toolbar-icon svg,
.btn.toolbar-icon .ty-icon {
  position: relative;
  top: 2px;
}

#w-close.btn.toolbar-icon .ty-icon {
  left: 1px;
}

#w-close:hover {
  background-color: var(--danger-color) !important;
  color: white !important;
}

/*EXTRA STUFF*/

a[type='page-link'] {
  display: block;
  background-color: var(--bg-color);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 8px 0px;
  border: 1px solid var(--borders);
  border-radius: 0.3rem;
  padding: 1rem;

  font-weight: 600;

  transition-duration: 0.2s;
  transition-property: border, box-shadow;
}

a[type='page-link']:hover {
  box-shadow: rgba(0, 0, 0.2, 0.2) 0px 3px 8px 0px;
  border: 1px solid var(--primary-color);
}

p[type='description'] {
  color: var(--light-text-color);
  margin: 0rem;
  margin-bottom: 1rem;
}

@media only screen and (max-width: 480px){
  pre{
    overflow-x: auto !important;
    white-space: pre !important;
  }
  pre div.CodeMirror {
    display: inline-block;
  }
}


</style>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AngeloFaella/DocumentOutline@latest/outline.css">

</head>
<body class='typora-export os-windows'>
<div id='write'  class=''>
  </p><h1><a name="documentoutlinejs" class="md-header-anchor"></a><span>DocumentOutline</span></h1><p><span>DocumentOutline is a vanilla JavaScript library that automatically generates the &quot;Table of Contents&quot; of an HTML document.</span></p><p><strong><span>The table of contents you see on this page is generated with DocumentOutline.js.</span></strong><span> </span></p><br><br><h2><a name="how-to-use" class="md-header-anchor"></a><span>How To Use</span></h2><p><span>Import needed files:</span></p><pre spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" lang="html" style="break-inside: unset;"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="html"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 16px; left: 20px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre>x</pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">html</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">head</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp;<span class="cm-comment">&lt;!-- Import CSS --&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">link</span> <span class="cm-attribute">rel</span>=<span class="cm-string">"stylesheet"</span> <span class="cm-attribute">href</span>=<span class="cm-string">"https://cdn.jsdelivr.net/gh/AngeloFaella/DocumentOutline@1.0/outline.css"</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp;<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">head</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">body</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">  <span class="cm-tab" role="presentation" cm-text="    ">  </span><span class="cm-tab" role="presentation" cm-text="    ">    </span><span class="cm-comment">&lt;!-- Wrap your main content in a div --&gt;</span></span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">div</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-comment">&lt;!-- Use heading tags to structure your document --&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">h1</span><span class="cm-tag cm-bracket">&gt;</span> 1 - Title<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">h1</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">h2</span><span class="cm-tag cm-bracket">&gt;</span> 1.1 - Subtitle<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">h2</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">h3</span><span class="cm-tag cm-bracket">&gt;</span> 1.2 - Subtitle<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">h3</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp;  ...</span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">h1</span><span class="cm-tag cm-bracket">&gt;</span> 2 - Title<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">h1</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">h2</span><span class="cm-tag cm-bracket">&gt;</span> 2.1 - Subtitle<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">h2</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">h3</span><span class="cm-tag cm-bracket">&gt;</span> 2.2 - Subtitle<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">h3</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp; &nbsp;  ...</span></pre></div><div class="" style="position: relative;"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">div</span><span class="cm-tag cm-bracket">&gt;</span> &nbsp;</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp;<span class="cm-comment">&lt;!-- Import the library --&gt;</span> &nbsp; &nbsp;</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp; &nbsp;<span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">script</span> <span class="cm-attribute">src</span>=<span class="cm-string">"https://cdn.jsdelivr.net/gh/AngeloFaella/DocumentOutline@1.0/DocumentOutline.js"</span><span class="cm-tag cm-bracket">&gt;&lt;/</span><span class="cm-tag">script</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> &nbsp;<span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">body</span><span class="cm-tag cm-bracket">&gt;</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag cm-bracket">&lt;/</span><span class="cm-tag">html</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 641px;"></div><div class="CodeMirror-gutters" style="display: none; height: 641px;"></div></div></div></pre><p><span>Then initialize the outline:</span></p><pre spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" lang="js"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="js"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 16px; left: 20px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">let</span> <span class="cm-def">outline</span> <span class="cm-operator">=</span> <span class="cm-keyword">new</span> <span class="cm-variable">DocumentOutline</span>();</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 26px;"></div><div class="CodeMirror-gutters" style="display: none; height: 26px;"></div></div></div></pre><p><span>Or initialize with custom options:</span></p><pre spellcheck="false" class="md-fences md-end-block ty-contain-cm modeLoaded" lang="js"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="js"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 16px; left: 20px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">let</span> <span class="cm-def">outline</span> <span class="cm-operator">=</span> <span class="cm-keyword">new</span> <span class="cm-variable">DocumentOutline</span>({</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="    ">    </span> <span class="cm-property">backgroundColor</span>: <span class="cm-string">'#02181d'</span>,</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="    ">    </span> <span class="cm-property">textColor</span>: <span class="cm-string">'white'</span>,</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="    ">    </span> <span class="cm-property">textColorLight</span>: <span class="cm-string">'lightgrey'</span>,</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="    ">    </span> <span class="cm-property">accentColor</span>: <span class="cm-string">'rgb(221 201 0)'</span>,</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="    ">    </span> <span class="cm-property">defaultOpen</span>: <span class="cm-atom">false</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">});</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 183px;"></div><div class="CodeMirror-gutters" style="display: none; height: 183px;"></div></div></div></pre><br><br><h2><a name="documentation" class="md-header-anchor"></a><span>Documentation</span></h2><br><h3><a name="classes" class="md-header-anchor"></a><strong><span>Classes</span></strong></h3><h4><a name="documentoutline" class="md-header-anchor"></a><span>DocumentOutline</span></h4><p><strong><span>Kind</span></strong><span>: global class  </span></p><br><h3><a name="functions" class="md-header-anchor"></a><strong><span>Functions</span></strong></h3><h4><a name="new-documentoutlineoptions" class="md-header-anchor"></a><span>new DocumentOutline(options)</span></h4><figure><table><thead><tr><th><span>Param</span></th><th><span>Type</span></th><th><span>Description</span></th></tr></thead><tbody><tr><td><span>options</span></td><td><code><span>Object</span></code></td><td>&nbsp;</td></tr><tr><td><span>[options.backgroundColor]</span></td><td><code><span>String</span></code></td><td><span>background color of the outline</span></td></tr><tr><td><span>[options.textColor]</span></td><td><code><span>String</span></code></td><td><span>text color of the first-level sections</span></td></tr><tr><td><span>[options.accentColor]</span></td><td><code><span>String</span></code></td><td><span>accent color of the outline</span></td></tr><tr><td><span>[options.textColorLight]</span></td><td><code><span>String</span></code></td><td><span>text color of the sub sections</span></td></tr><tr><td><span>[options.defaultOpen]</span></td><td><code><span>String</span></code></td><td><span>indicate the initial mode of the outline. Outline is open by default on desktop and closed on mobile.</span></td></tr></tbody></table></figure><br><h4><a name="onsearchinputtext" class="md-header-anchor"></a><span>onSearchInput(text)</span></h4><p><span>Called when a search is submitted</span></p><p><strong><span>Kind</span></strong><span>: global function  </span></p><figure><table><thead><tr><th><span>Param</span></th><th><span>Type</span></th><th><span>Description</span></th></tr></thead><tbody><tr><td><span>text</span></td><td><code><span>String</span></code></td><td><span>text to search</span></td></tr></tbody></table></figure><br><h4><a name="showoutline" class="md-header-anchor"></a><span>showOutline()</span></h4><p><span>Show document outline.</span></p><p><span>On </span><strong><span>desktop</span></strong><span> the outline is placed to the left of the main content takes 20% of the width.</span></p><p><span>On </span><strong><span>mobile</span></strong><span> the outline is placed above the main content and takes 100% of the width.</span></p><p><strong><span>Kind</span></strong><span>: global function  </span></p><br><h4><a name="hideoutline" class="md-header-anchor"></a><span>hideOutline()</span></h4><p><span>Hide document outline.</span></p><p><span>On </span><strong><span>desktop</span></strong><span> the outline reduces its width to 3%.</span></p><p><span>On </span><strong><span>mobile</span></strong><span> the outline disappears completely and a floating button appears in the bottom-left corner.</span></p><p><strong><span>Kind</span></strong><span>: global function  </span></p></div>


<script src="https://cdn.jsdelivr.net/gh/AngeloFaella/DocumentOutline@latest/DocumentOutline.js"></script>
<script>
  let o = new DocumentOutline({
      backgroundColor: 'var(--side-bar-bg-color)',
      textColor: 'white',
      accentColor: 'var(--primary-color)'
  });
</script>
</body>
</html>

  • 11
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值