diff --git a/assets/css/style.css b/assets/css/style.css index 4b9d929..029ae5b 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -22,6 +22,10 @@ src: url(../fonts/WorkSans-SemiBold.eot?#iefix) format("embedded-opentype"), url(../fonts/WorkSans-SemiBold.woff) format("woff"), url(../fonts/WorkSans-SemiBold.ttf) format("truetype"), url(../fonts/WorkSans-SemiBold.svg) format("svg") } +html { + scroll-behavior: smooth; +} + body { line-height: 1.5; font-family: var(--font-family), sans-serif; @@ -50,27 +54,27 @@ h6 { h1, .h1 { - font-size: 45px; + font-size: 32px; } h2, .h2 { - font-size: 32px; + font-size: 26px; } h3, .h3 { - font-size: 26px; + font-size: 20px; } h4, .h4 { - font-size: 20px; + font-size: 18px; } h5, .h5 { - font-size: 18px; + font-size: 16px; } h6, @@ -226,8 +230,17 @@ select:focus { } } +.main-title { + font-size: 45px; +} + .section-title { margin-bottom: 40px; + font-size: 32px; +} + +.section-item { + font-size: 26px; } .bg-cover { @@ -606,6 +619,38 @@ textarea.form-control { top: 8px; } +#TableOfContents ul li, +#TableOfContents ul li ul { + margin-bottom: 0; +} + +#TableOfContents ul li a:hover, +#TableOfContents ul li ul a:hover { + text-decoration: underline; +} + +/* this is so that the header does not overlap the section title */ +.content h2:before, +.content h3:before, +.content h4:before { + display: block; + content: ""; + height: 75px; + margin: -75px 0 0; +} + +.content .title-link { + opacity: 0; + transition: 0.3s; + margin-left: 10px; +} + +.content h2:hover .title-link, +.content h3:hover .title-link, +.content h4:hover .title-link { + opacity: 1; +} + .list-styled li { position: relative; } diff --git a/assets/js/script.js b/assets/js/script.js index 4b46685..7316daf 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -128,6 +128,14 @@ }) + // table of contents + $('h2, h3, h4', '.content').each(function () { + if ($('#TableOfContents', '.content').length) { + $(this).append('#'); + } + }); + + // Download page to pdf format window.onload = function() { var generatePDF = document.getElementById('generatePDF'); diff --git a/layouts/index.html b/layouts/index.html index 133d2aa..32602b3 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -22,7 +22,7 @@ {{ with .Params.icon}} {{end}} -
{{. | markdownify}}
{{end}} diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html index 1936158..8635074 100644 --- a/layouts/partials/banner.html +++ b/layouts/partials/banner.html @@ -2,7 +2,7 @@diff --git a/layouts/partials/default.html b/layouts/partials/default.html index a69fccd..96b665b 100644 --- a/layouts/partials/default.html +++ b/layouts/partials/default.html @@ -30,7 +30,7 @@