Commit f807f712 authored by Kaushal Modi's avatar Kaushal Modi

Change the Hugo TOC class name from toc to hugotoc

parent 73356ea5
......@@ -16,7 +16,7 @@
{{ if not .Params.notoc }}
<!-- Generate TOC -->
<div class="toc no-text-decoration">
<div class="hugotoc no-text-decoration">
<nav id="TableOfContents">
<!-- Fri May 11 16:50:10 EDT 2018 - kmodi
This crazy nesting of ul>li>ul is needed to match the TOC
......
......@@ -24,7 +24,7 @@
{{ if not .Params.notoc }}
{{ with .TableOfContents }}
<div class="toc no-text-decoration">
<div class="hugotoc no-text-decoration">
{{ . }}
<a href="#top" class="back-to-top">Back to top</a>
</div>
......
......@@ -27,15 +27,15 @@
$(document).ready(function() {
$toc.find('a').parent('li').find('ul').hide();
onScroll();
document.getElementsByClassName('toc')[0].style.display = '';
document.getElementsByClassName('hugotoc')[0].style.display = '';
});}})();</script>
<!-- Minified Version:
https://report-uri.com/home/hash/
'sha256-2aZlOZAHRrMS2shj6RA/8w5XdPjkO9dtCOkcKpGMolI='
'sha256-GHifqkl7lEDJ3LpLU+MiIqEWVMNGYEMoNElqGum/PjY='
(function(){var $toc=$('#TableOfContents');if($toc.length>0){var $window=$(window);function onScroll(){var currentScroll=$window.scrollTop();var h=$('.content h1, .content h2, .content h3, .content h4, .content h5, .content h6, .h-feed h2');var id="";h.each(function(i,e){e=$(e);if(e.offset().top-10<=currentScroll){id=e.attr('id');}});var current=$toc.find('a.current');if(current.length==1&&current.eq(0).attr('href')=='#'+id)return true;current.each(function(i,e){$(e).removeClass('current').siblings('ul').hide();});$toc.find('a[href="#'+id+'"]').parentsUntil('#TableOfContents').each(function(i,e){$(e).children('a').addClass('current').siblings('ul').show();});}
$window.on('scroll',onScroll);$(document).ready(function(){$toc.find('a').parent('li').find('ul').hide();onScroll();document.getElementsByClassName('toc')[0].style.display='';});}})();
$window.on('scroll',onScroll);$(document).ready(function(){$toc.find('a').parent('li').find('ul').hide();onScroll();document.getElementsByClassName('hugotoc')[0].style.display='';});}})();
-->
......@@ -1718,7 +1718,7 @@ pre code.language-xml::before { content: 'XML'; }
}
/* * Table of Contents on side */
.toc {
.hugotoc {
font-family: var(--sans-serif-1);
display: none;
position: fixed;
......@@ -1730,47 +1730,47 @@ pre code.language-xml::before { content: 'XML'; }
max-height: 85%;
padding: 0;
}
.toc li {
.hugotoc li {
list-style: none;
}
.toc ul>li {
.hugotoc ul>li {
margin-bottom: 0.4rem;
}
.toc ul>li>ul>li {
.hugotoc ul>li>ul>li {
font-size: 0.9em;
margin-bottom: 0.4rem;
}
.toc ul>li>ul>li>ul>li {
.hugotoc ul>li>ul>li>ul>li {
font-size: 0.9em;
margin-bottom: 0.3rem;
}
.toc ul { /* Add left padding for headings in TOC */
.hugotoc ul { /* Add left padding for headings in TOC */
padding-left: 1rem;
}
.toc nav>ul { /* The highest level heading in a blog post is level-2 */
.hugotoc nav>ul { /* The highest level heading in a blog post is level-2 */
padding-left: 0; /* The level-1 heading is reserved for the blog title. */
/* So do not add any padding for level-1 heading, as that will never show*/
/* up in the TOC. */
}
.toc a:hover {
.hugotoc a:hover {
color: var(--theme-color);
}
.toc a.current {
.hugotoc a.current {
color: var(--theme-color);
font-weight: bold;
}
/* Override the bullets customization done above, just for list items*/
/* in .toc class */
.toc ul:not(.navbar):not(.no-bullets) li::before {
/* in .hugotoc class */
.hugotoc ul:not(.navbar):not(.no-bullets) li::before {
content: '';
}
.toc .back-to-top { /* Back to top link */
.hugotoc .back-to-top { /* Back to top link */
font-size: 0.8em;
padding-left: 1rem;
}
@media screen and (min-width: 1400px) {
.toc {
.hugotoc {
display: block;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment