mirror of https://github.com/luizdepra/hugo-coder.git

Clément Pannetier
11.51.2020 be7b79af623f89574480e7a84a76126d6110ad45
Add theme toggle button feature (#358)

* Add theme toggle button feature

* Add theme toggle button feature

* Replaced svg icon with FA icon + fixed indentation + refactored css

* Added back colorsheme configurations + script moved to be process by hugo pipe

* Make release

* Fix toggle button not working when loading new page + setTheme() refactor

* Make release

* Update exampleSite/config.toml

Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
7 files modified
5 files added
147 ■■■■ changed files
assets/scss/_navigation.scss 28 ●●●● patch | view | raw | blame | history
assets/scss/_navigation_dark.scss 14 ●●●●● patch | view | raw | blame | history
exampleSite/assets/js/dark-mode.js 28 ●●●●● patch | view | raw | blame | history
exampleSite/config.toml 2 ●●● patch | view | raw | blame | history
layouts/_default/baseof.html 10 ●●●●● patch | view | raw | blame | history
layouts/partials/header.html 56 ●●●●● patch | view | raw | blame | history
resources/_gen/assets/js/js/dark-mode.js_d11fe7b62c27961c87ecd0f2490357b9.content 2 ●●●●● patch | view | raw | blame | history
resources/_gen/assets/js/js/dark-mode.js_d11fe7b62c27961c87ecd0f2490357b9.json 1 ●●●● patch | view | raw | blame | history
resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.content 1 ●●●● patch | view | raw | blame | history
resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.json 1 ●●●● patch | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.content 2 ●●● patch | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.json 2 ●●● patch | view | raw | blame | history
assets/scss/_navigation.scss
@@ -55,6 +55,11 @@
        margin-right: 1.0rem;
      }
    }
    .separator {
      @media only screen and (max-width : 768px) {
        display: none;
      }
    }
    .menu-separator {
      @media only screen and (max-width : 768px) {
        border-top: 2px solid $fg-color;
@@ -65,10 +70,15 @@
      }
    }
  }
  #dark-mode-toggle {
    margin: 1.7rem 0;
    font-size: 2.4rem;
    line-height: inherit;
  }
  #menu-toggle {
    display: none;
    @media only screen and (max-width : 768px) {
      &:checked + label {
      &:checked + label > i {
        color: $alt-bg-color;
      }
      &:checked + label + ul {
@@ -82,15 +92,17 @@
    display: none;
    @media only screen and (max-width : 768px) {
      display: block;
      margin: 1.8rem 0;
      font-size: 2.4rem;
      font-weight: 400;
      line-height: 6.0rem;
      color: $fg-color;
      cursor: pointer;
      &:hover,
      &:focus {
        color: $link-color
      }
    }
  }
  i {
    color: $fg-color;
    cursor: pointer;
    &:hover,
    &:focus {
      color: $link-color;
    }
  }
}
assets/scss/_navigation_dark.scss
@@ -25,18 +25,16 @@
    }
    #menu-toggle {
      @media only screen and (max-width : 768px) {
        &:checked + label {
        &:checked + label > i {
          color: $alt-bg-color-dark;
        }
      }
    }
    .menu-button {
      @media only screen and (max-width : 768px) {
        color: $fg-color-dark;
        &:hover,
        &:focus {
          color: $link-color-dark;
        }
    i {
      color: $fg-color-dark;
      &:hover,
      &:focus {
        color: $link-color-dark;
      }
    }
  }
exampleSite/assets/js/dark-mode.js
New file
@@ -0,0 +1,28 @@
const body = document.body;
const darkModeToggle = document.getElementById('dark-mode-toggle');
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
// Check if user preference is set, if not check value of body class for light or dark else it means that colorsheme = auto
if (localStorage.getItem("colorscheme")) {
  setTheme(localStorage.getItem("colorscheme"));
} else if (body.classList.contains('colorscheme-light') || body.classList.contains('colorscheme-dark')) {
  setTheme(body.classList.contains("colorscheme-dark") ? "dark" : "light");
} else {
  setTheme(darkModeMediaQuery.matches ? "dark" : "light");
}
darkModeToggle.addEventListener('click', () => {
  setTheme(body.classList.contains("colorscheme-dark") ? "light" : "dark");
});
darkModeMediaQuery.addListener((event) => {
  setTheme(event.matches ? "dark" : "light");
});
function setTheme(theme) {
  body.classList.remove('colorscheme-auto');
  inverse = theme === 'dark' ? 'light' : 'dark';
  localStorage.setItem('colorscheme', theme);
  body.classList.remove('colorscheme-' + inverse);
  body.classList.add('colorscheme-' + theme);
}
exampleSite/config.toml
@@ -41,7 +41,7 @@
    # "auto" (use preference set by browser)
    # "dark" (dark background, light foreground)
    # "light" (light background, dark foreground) (default)
    colorscheme = "light"
    colorscheme = "auto"
    # Series see also post count
    maxSeeAlsoItems = 5
layouts/_default/baseof.html
@@ -89,7 +89,7 @@
    {{ hugo.Generator }}
  </head>
  {{ $csClass := "colorscheme-light" }}
  {{ if eq .Site.Params.colorscheme "dark" }}
    {{ $csClass = "colorscheme-dark" }}
@@ -109,6 +109,14 @@
      {{ partial "footer.html" . }}
    </main>
    {{ if .Site.IsServer }}
      {{ $script := resources.Get "js/dark-mode.js" }}
      <script src="{{ $script.RelPermalink }}"></script>
    {{ else }}
      {{ $script := resources.Get "js/dark-mode.js" | minify | fingerprint }}
      <script src="{{ $script.RelPermalink }}"></script>
    {{ end }}
    {{ range .Site.Params.custom_js }}
      <script src="{{ . | relURL }}"></script>
    {{ end }}
layouts/partials/header.html
@@ -4,34 +4,42 @@
      {{ .Site.Title }}
    </a>
    {{ if or .Site.Menus.main .Site.IsMultiLingual }}
    <input type="checkbox" id="menu-toggle" />
    <label class="menu-button float-right" for="menu-toggle"><i class="fas fa-bars"></i></label>
    <ul class="navigation-list">
      {{ with .Site.Menus.main}}
        {{ range sort . }}
          <li class="navigation-item">
            <a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
          </li>
        {{ end }}
      {{ end }}
      {{ if .Site.IsMultiLingual }}
        {{ $node := . }}
        {{ .Scratch.Set "separator" true }}
        {{ range (default .Site.Home.AllTranslations .Translations) }}
          {{ if ne $.Site.Language .Language }}
            {{ if $node.Scratch.Get "separator" }}
              <li class="navigation-item menu-separator">
                <span>|</span>
              </li>
              {{ $node.Scratch.Set "separator" false }}
            {{ end }}
      <span id="dark-mode-toggle" class="float-right">
        <i class="fas fa-adjust fa-fw"></i>
      </span>
      <input type="checkbox" id="menu-toggle" />
      <label class="menu-button float-right" for="menu-toggle">
        <i class="fas fa-bars fa-fw"></i>
      </label>
      <ul class="navigation-list">
        {{ with .Site.Menus.main}}
          {{ range sort . }}
            <li class="navigation-item">
              <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
              <a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
            </li>
          {{ end }}
        {{ end }}
      {{ end }}
    </ul>
        {{ if .Site.IsMultiLingual }}
          {{ $node := . }}
          {{ .Scratch.Set "separator" true }}
          {{ range (default .Site.Home.AllTranslations .Translations) }}
            {{ if ne $.Site.Language .Language }}
              {{ if $node.Scratch.Get "separator" }}
                <li class="navigation-item menu-separator">
                  <span>|</span>
                </li>
                {{ $node.Scratch.Set "separator" false }}
              {{ end }}
              <li class="navigation-item">
                <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
              </li>
            {{ end }}
          {{ end }}
        {{ end }}
        <li class="navigation-item separator">
          <span>|</span>
        </li>
      </ul>
    {{ end }}
  </section>
</nav>
resources/_gen/assets/js/js/dark-mode.js_d11fe7b62c27961c87ecd0f2490357b9.content
New file
@@ -0,0 +1,2 @@
const body=document.body;const darkModeToggle=document.getElementById('dark-mode-toggle');const darkModeMediaQuery=window.matchMedia('(prefers-color-scheme: dark)');if(localStorage.getItem("colorscheme")){setTheme(localStorage.getItem("colorscheme"));}else if(body.classList.contains('colorscheme-light')||body.classList.contains('colorscheme-dark')){setTheme(body.classList.contains("colorscheme-dark")?"dark":"light");}else{setTheme(darkModeMediaQuery.matches?"dark":"light");}
darkModeToggle.addEventListener('click',()=>{setTheme(body.classList.contains("colorscheme-dark")?"light":"dark");});darkModeMediaQuery.addListener((event)=>{setTheme(event.matches?"dark":"light");});function setTheme(theme){body.classList.remove('colorscheme-auto');inverse=theme==='dark'?'light':'dark';localStorage.setItem('colorscheme',theme);body.classList.remove('colorscheme-'+inverse);body.classList.add('colorscheme-'+theme);}
resources/_gen/assets/js/js/dark-mode.js_d11fe7b62c27961c87ecd0f2490357b9.json
New file
@@ -0,0 +1 @@
{"Target":"js/dark-mode.min.0213e1773e6d1c5a644f847c67a6f8abac49a3776e2976f6008038af8c5b76a1.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-AhPhdz5tHFpkT4R8Z6b4q6xJo3duKXb2AIA4r4xbdqE="}}
resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.content
New file
@@ -0,0 +1 @@
body.colorscheme-dark{color:#dadada;background-color:#212121}body.colorscheme-dark a{color:#42a5f5}body.colorscheme-dark h1,body.colorscheme-dark h2,body.colorscheme-dark h3,body.colorscheme-dark h4,body.colorscheme-dark h5,body.colorscheme-dark h6{color:#dadada}body.colorscheme-dark code{background-color:#424242;color:#dadada}body.colorscheme-dark pre code{background-color:inherit;color:inherit}body.colorscheme-dark blockquote{border-left:2px solid #424242}body.colorscheme-dark table td,body.colorscheme-dark table th{border:2px solid #dadada}@media(prefers-color-scheme:dark){body.colorscheme-auto{color:#dadada;background-color:#212121}body.colorscheme-auto a{color:#42a5f5}body.colorscheme-auto h1,body.colorscheme-auto h2,body.colorscheme-auto h3,body.colorscheme-auto h4,body.colorscheme-auto h5,body.colorscheme-auto h6{color:#dadada}body.colorscheme-auto code{background-color:#424242;color:#dadada}body.colorscheme-auto pre code{background-color:inherit;color:inherit}body.colorscheme-auto blockquote{border-left:2px solid #424242}body.colorscheme-auto table td,body.colorscheme-auto table th{border:2px solid #dadada}}body.colorscheme-dark .content .list ul li .title{color:#dadada}body.colorscheme-dark .content .list ul li .title:hover,body.colorscheme-dark .content .list ul li .title:focus{color:#42a5f5}body.colorscheme-dark .content .centered .about ul li a{color:#dadada}body.colorscheme-dark .content .centered .about ul li a:hover,body.colorscheme-dark .content .centered .about ul li a:focus{color:#42a5f5}@media(prefers-color-scheme:dark){body.colorscheme-auto .content .list ul li .title{color:#dadada}body.colorscheme-auto .content .list ul li .title:hover,body.colorscheme-auto .content .list ul li .title:focus{color:#42a5f5}body.colorscheme-auto .content .centered .about ul li a{color:#dadada}body.colorscheme-auto .content .centered .about ul li a:hover,body.colorscheme-auto .content .centered .about ul li a:focus{color:#42a5f5}}body.colorscheme-dark .navigation a,body.colorscheme-dark .navigation span{color:#dadada}body.colorscheme-dark .navigation a:hover,body.colorscheme-dark .navigation a:focus{color:#42a5f5}@media only screen and (max-width:768px){body.colorscheme-dark .navigation .navigation-list{background-color:#212121;border-top:solid 2px #424242;border-bottom:solid 2px #424242}}@media only screen and (max-width:768px){body.colorscheme-dark .navigation .navigation-list .menu-separator{border-top:2px solid #dadada}}@media only screen and (max-width:768px){body.colorscheme-dark .navigation #menu-toggle:checked+label>i{color:#424242}}body.colorscheme-dark .navigation i{color:#dadada}body.colorscheme-dark .navigation i:hover,body.colorscheme-dark .navigation i:focus{color:#42a5f5}@media(prefers-color-scheme:dark){body.colorscheme-auto .navigation a,body.colorscheme-auto .navigation span{color:#dadada}body.colorscheme-auto .navigation a:hover,body.colorscheme-auto .navigation a:focus{color:#42a5f5}}@media only screen and (prefers-color-scheme:dark) and (max-width:768px){body.colorscheme-auto .navigation .navigation-list{background-color:#212121;border-top:solid 2px #424242;border-bottom:solid 2px #424242}}@media only screen and (prefers-color-scheme:dark) and (max-width:768px){body.colorscheme-auto .navigation .navigation-list .menu-separator{border-top:2px solid #dadada}}@media only screen and (prefers-color-scheme:dark) and (max-width:768px){body.colorscheme-auto .navigation #menu-toggle:checked+label>i{color:#424242}}@media(prefers-color-scheme:dark){body.colorscheme-auto .navigation i{color:#dadada}body.colorscheme-auto .navigation i:hover,body.colorscheme-auto .navigation i:focus{color:#42a5f5}}body.colorscheme-dark .footer a{color:#42a5f5}@media(prefers-color-scheme:dark){body.colorscheme-auto .footer a{color:#42a5f5}}
resources/_gen/assets/scss/scss/coder-dark.scss_1fcd9040f1144c65015c77e7b93bc5ac.json
New file
@@ -0,0 +1 @@
{"Target":"css/coder-dark.min.717236c74e0a5208ef73964a9f44c6b443b689a95b270d8b2a40d0c012460dac.css","MediaType":"text/css","Data":{"Integrity":"sha256-cXI2x04KUgjvc5ZKn0TGtEO2ialbJw2LKkDQwBJGDaw="}}
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.content
@@ -1 +1 @@
*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#212121;background-color:#fafafa;font-family:Merriweather,Georgia,serif;font-size:1.6em;font-weight:300;line-height:1.8em}@media only screen and (max-width:768px){body{font-size:1.6em;line-height:1.6em}}a{font-weight:300;color:#1565c0;text-decoration:none}a:focus,a:hover{text-decoration:underline}p{margin:2rem 0}h1,h2,h3,h4,h5,h6{font-family:Lato,Helvetica,sans-serif;font-weight:700;color:#000;margin:6.4rem 0 3.2rem}h1{font-size:3.2rem;line-height:3.6rem}@media only screen and (max-width:768px){h1{font-size:3rem;line-height:3.4rem}}h2{font-size:2.8rem;line-height:3.2rem}@media only screen and (max-width:768px){h2{font-size:2.6rem;line-height:3rem}}h3{font-size:2.4rem;line-height:2.8rem}@media only screen and (max-width:768px){h3{font-size:2.2rem;line-height:2.6rem}}h4{font-size:2.2rem;line-height:2.6rem}@media only screen and (max-width:768px){h4{font-size:2rem;line-height:2.4rem}}h5{font-size:2rem;line-height:2.4rem}@media only screen and (max-width:768px){h5{font-size:1.8rem;line-height:2.2rem}}h6{font-size:1.8rem;line-height:2.2rem}@media only screen and (max-width:768px){h6{font-size:1.6rem;line-height:2rem}}b,strong{font-weight:700}.highlight>div,.highlight>pre{margin:0 0 2rem;padding:1rem;border-radius:1rem}pre{display:block;font-family:source code pro,lucida console,monospace;font-size:1.6rem;font-weight:400;line-height:2.6rem;overflow-x:auto;margin:0}pre code{display:inline-block;background-color:inherit;color:inherit}code{font-family:source code pro,lucida console,monospace;font-size:1.6rem;font-weight:400;background-color:#e0e0e0;color:#212121}blockquote{border-left:2px solid #e0e0e0;padding-left:2rem;line-height:2.2rem;font-weight:400;font-style:italic}th,td{padding:1.6rem}table{border-collapse:collapse}table td,table th{border:2px solid #000}table tr:first-child th{border-top:0}table tr:last-child td{border-bottom:0}table tr td:first-child,table tr th:first-child{border-left:0}table tr td:last-child,table tr th:last-child{border-right:0}img{max-width:100%}figure{text-align:center}.wrapper{display:flex;flex-direction:column;min-height:100vh;width:100%}.container{margin:0 auto;max-width:90rem;width:100%;padding-left:2rem;padding-right:2rem}.fab{font-weight:400}.fas{font-weight:700}.float-right{float:right}.float-left{float:left}.fab{font-weight:400}.fas{font-weight:900}img.emoji{height:1em;width:1em;margin:0 .05em 0 .1em;vertical-align:-.1em}.content{flex:1;display:flex;margin-top:1.6rem;margin-bottom:3.2rem}.content article header{margin-top:6.4rem;margin-bottom:3.2rem}.content article header h1{font-size:4.2rem;line-height:4.6rem;margin:0}@media only screen and (max-width:768px){.content article header h1{font-size:4rem;line-height:4.4rem}}.content article footer{margin-top:4rem}.content article footer .see-also{margin:3.2rem 0}.content article footer .see-also h3{margin:3.2rem 0}.content article p{text-align:justify;text-justify:auto;hyphens:auto}.content .post .post-title{margin-bottom:.75em}.content .post .post-meta i{text-align:center;width:1.6rem;margin-left:0;margin-right:.5rem}.content .post .post-meta .date .posted-on{margin-left:0;margin-right:1.5rem}.content figure{margin:0;padding:0}.content figcaption p{text-align:center;font-style:italic;font-size:1.6rem;margin:0}.avatar img{width:20rem;height:auto;border-radius:50%}@media only screen and (max-width:768px){.avatar img{width:10rem}}.list ul{margin:3.2rem 0;list-style:none;padding:0}.list ul li{font-size:1.8rem}@media only screen and (max-width:768px){.list ul li{margin:1.6rem 0}}.list ul li .date{display:inline-block;width:20rem;text-align:right;margin-right:3rem}@media only screen and (max-width:768px){.list ul li .date{display:block;text-align:left}}.list ul li .title{font-size:1.8rem;color:#212121;font-family:Lato,Helvetica,sans-serif;font-weight:700}.list ul li .title:hover,.list ul li .title:focus{color:#1565c0}.centered{display:flex;align-items:center;justify-content:center}.centered .about{text-align:center}.centered .about h1{margin-top:2rem;margin-bottom:.5rem}.centered .about h2{margin-top:1rem;margin-bottom:.5rem;font-size:2.4rem}@media only screen and (max-width:768px){.centered .about h2{font-size:2rem}}.centered .about ul{list-style:none;margin:3rem 0 1rem;padding:0}.centered .about ul li{display:inline-block;position:relative}.centered .about ul li a{color:#212121;text-transform:uppercase;margin-left:1rem;margin-right:1rem;font-size:1.6rem}.centered .about ul li a:hover,.centered .about ul li a:focus{color:#1565c0}@media only screen and (max-width:768px){.centered .about ul li a{font-size:1.4rem}}.centered .about ul li a i{font-size:3.2rem}.centered .error{text-align:center}.centered .error h1{margin-top:2rem;margin-bottom:.5rem;font-size:4.6rem}@media only screen and (max-width:768px){.centered .error h1{font-size:3.2rem}}.centered .error h2{margin-top:2rem;margin-bottom:3.2rem;font-size:3.2rem}@media only screen and (max-width:768px){.centered .error h2{font-size:2.8rem}}.navigation{height:6rem;width:100%}.navigation a,.navigation span{display:inline;font-size:1.6rem;font-family:Lato,Helvetica,sans-serif;font-weight:700;line-height:6rem;color:#212121}.navigation a:hover,.navigation a:focus{color:#1565c0}.navigation .navigation-title{letter-spacing:.1rem;text-transform:uppercase}.navigation .navigation-list{float:right;list-style:none;margin-bottom:0;margin-top:0}@media only screen and (max-width:768px){.navigation .navigation-list{position:absolute;top:6rem;right:0;z-index:5;visibility:hidden;opacity:0;padding:0;max-height:0;width:100%;background-color:#fafafa;border-top:solid 2px #e0e0e0;border-bottom:solid 2px #e0e0e0;transition:opacity .25s,max-height .15s linear}}.navigation .navigation-list .navigation-item{float:left;margin:0;position:relative}@media only screen and (max-width:768px){.navigation .navigation-list .navigation-item{float:none!important;text-align:center}.navigation .navigation-list .navigation-item a,.navigation .navigation-list .navigation-item span{line-height:5rem}}.navigation .navigation-list .navigation-item a,.navigation .navigation-list .navigation-item span{margin-left:1rem;margin-right:1rem}@media only screen and (max-width:768px){.navigation .navigation-list .menu-separator{border-top:2px solid #212121;margin:0 8rem}.navigation .navigation-list .menu-separator span{display:none}}.navigation #menu-toggle{display:none}@media only screen and (max-width:768px){.navigation #menu-toggle:checked+label{color:#e0e0e0}.navigation #menu-toggle:checked+label+ul{visibility:visible;opacity:1;max-height:100rem}}.navigation .menu-button{display:none}@media only screen and (max-width:768px){.navigation .menu-button{display:block;font-size:2.4rem;font-weight:400;line-height:6rem;color:#212121;cursor:pointer}.navigation .menu-button:hover,.navigation .menu-button:focus{color:#1565c0}}.pagination{margin-top:6rem;text-align:center;font-family:Lato,Helvetica,sans-serif}.pagination li{display:inline;text-align:center;font-weight:700}.pagination li span{margin:0;text-align:center;width:3.2rem}.pagination li a{font-weight:300}.pagination li a span{margin:0;text-align:center;width:3.2rem}.footer{width:100%;text-align:center;line-height:2rem;margin-bottom:1rem}.footer a{color:#1565c0}
*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#212121;background-color:#fafafa;font-family:Merriweather,Georgia,serif;font-size:1.6em;font-weight:300;line-height:1.8em}@media only screen and (max-width:768px){body{font-size:1.6em;line-height:1.6em}}a{font-weight:300;color:#1565c0;text-decoration:none}a:focus,a:hover{text-decoration:underline}p{margin:2rem 0}h1,h2,h3,h4,h5,h6{font-family:Lato,Helvetica,sans-serif;font-weight:700;color:#000;margin:6.4rem 0 3.2rem}h1{font-size:3.2rem;line-height:3.6rem}@media only screen and (max-width:768px){h1{font-size:3rem;line-height:3.4rem}}h2{font-size:2.8rem;line-height:3.2rem}@media only screen and (max-width:768px){h2{font-size:2.6rem;line-height:3rem}}h3{font-size:2.4rem;line-height:2.8rem}@media only screen and (max-width:768px){h3{font-size:2.2rem;line-height:2.6rem}}h4{font-size:2.2rem;line-height:2.6rem}@media only screen and (max-width:768px){h4{font-size:2rem;line-height:2.4rem}}h5{font-size:2rem;line-height:2.4rem}@media only screen and (max-width:768px){h5{font-size:1.8rem;line-height:2.2rem}}h6{font-size:1.8rem;line-height:2.2rem}@media only screen and (max-width:768px){h6{font-size:1.6rem;line-height:2rem}}b,strong{font-weight:700}.highlight>div,.highlight>pre{margin:0 0 2rem;padding:1rem;border-radius:1rem}pre{display:block;font-family:source code pro,lucida console,monospace;font-size:1.6rem;font-weight:400;line-height:2.6rem;overflow-x:auto;margin:0}pre code{display:inline-block;background-color:inherit;color:inherit}code{font-family:source code pro,lucida console,monospace;font-size:1.6rem;font-weight:400;background-color:#e0e0e0;color:#212121}blockquote{border-left:2px solid #e0e0e0;padding-left:2rem;line-height:2.2rem;font-weight:400;font-style:italic}th,td{padding:1.6rem}table{border-collapse:collapse}table td,table th{border:2px solid #000}table tr:first-child th{border-top:0}table tr:last-child td{border-bottom:0}table tr td:first-child,table tr th:first-child{border-left:0}table tr td:last-child,table tr th:last-child{border-right:0}img{max-width:100%}figure{text-align:center}.wrapper{display:flex;flex-direction:column;min-height:100vh;width:100%}.container{margin:0 auto;max-width:90rem;width:100%;padding-left:2rem;padding-right:2rem}.fab{font-weight:400}.fas{font-weight:700}.float-right{float:right}.float-left{float:left}.fab{font-weight:400}.fas{font-weight:900}img.emoji{height:1em;width:1em;margin:0 .05em 0 .1em;vertical-align:-.1em}.content{flex:1;display:flex;margin-top:1.6rem;margin-bottom:3.2rem}.content article header{margin-top:6.4rem;margin-bottom:3.2rem}.content article header h1{font-size:4.2rem;line-height:4.6rem;margin:0}@media only screen and (max-width:768px){.content article header h1{font-size:4rem;line-height:4.4rem}}.content article footer{margin-top:4rem}.content article footer .see-also{margin:3.2rem 0}.content article footer .see-also h3{margin:3.2rem 0}.content article p{text-align:justify;text-justify:auto;hyphens:auto}.content .post .post-title{margin-bottom:.75em}.content .post .post-meta i{text-align:center;width:1.6rem;margin-left:0;margin-right:.5rem}.content .post .post-meta .date .posted-on{margin-left:0;margin-right:1.5rem}.content figure{margin:0;padding:0}.content figcaption p{text-align:center;font-style:italic;font-size:1.6rem;margin:0}.avatar img{width:20rem;height:auto;border-radius:50%}@media only screen and (max-width:768px){.avatar img{width:10rem}}.list ul{margin:3.2rem 0;list-style:none;padding:0}.list ul li{font-size:1.8rem}@media only screen and (max-width:768px){.list ul li{margin:1.6rem 0}}.list ul li .date{display:inline-block;width:20rem;text-align:right;margin-right:3rem}@media only screen and (max-width:768px){.list ul li .date{display:block;text-align:left}}.list ul li .title{font-size:1.8rem;color:#212121;font-family:Lato,Helvetica,sans-serif;font-weight:700}.list ul li .title:hover,.list ul li .title:focus{color:#1565c0}.centered{display:flex;align-items:center;justify-content:center}.centered .about{text-align:center}.centered .about h1{margin-top:2rem;margin-bottom:.5rem}.centered .about h2{margin-top:1rem;margin-bottom:.5rem;font-size:2.4rem}@media only screen and (max-width:768px){.centered .about h2{font-size:2rem}}.centered .about ul{list-style:none;margin:3rem 0 1rem;padding:0}.centered .about ul li{display:inline-block;position:relative}.centered .about ul li a{color:#212121;text-transform:uppercase;margin-left:1rem;margin-right:1rem;font-size:1.6rem}.centered .about ul li a:hover,.centered .about ul li a:focus{color:#1565c0}@media only screen and (max-width:768px){.centered .about ul li a{font-size:1.4rem}}.centered .about ul li a i{font-size:3.2rem}.centered .error{text-align:center}.centered .error h1{margin-top:2rem;margin-bottom:.5rem;font-size:4.6rem}@media only screen and (max-width:768px){.centered .error h1{font-size:3.2rem}}.centered .error h2{margin-top:2rem;margin-bottom:3.2rem;font-size:3.2rem}@media only screen and (max-width:768px){.centered .error h2{font-size:2.8rem}}.navigation{height:6rem;width:100%}.navigation a,.navigation span{display:inline;font-size:1.6rem;font-family:Lato,Helvetica,sans-serif;font-weight:700;line-height:6rem;color:#212121}.navigation a:hover,.navigation a:focus{color:#1565c0}.navigation .navigation-title{letter-spacing:.1rem;text-transform:uppercase}.navigation .navigation-list{float:right;list-style:none;margin-bottom:0;margin-top:0}@media only screen and (max-width:768px){.navigation .navigation-list{position:absolute;top:6rem;right:0;z-index:5;visibility:hidden;opacity:0;padding:0;max-height:0;width:100%;background-color:#fafafa;border-top:solid 2px #e0e0e0;border-bottom:solid 2px #e0e0e0;transition:opacity .25s,max-height .15s linear}}.navigation .navigation-list .navigation-item{float:left;margin:0;position:relative}@media only screen and (max-width:768px){.navigation .navigation-list .navigation-item{float:none!important;text-align:center}.navigation .navigation-list .navigation-item a,.navigation .navigation-list .navigation-item span{line-height:5rem}}.navigation .navigation-list .navigation-item a,.navigation .navigation-list .navigation-item span{margin-left:1rem;margin-right:1rem}@media only screen and (max-width:768px){.navigation .navigation-list .separator{display:none}}@media only screen and (max-width:768px){.navigation .navigation-list .menu-separator{border-top:2px solid #212121;margin:0 8rem}.navigation .navigation-list .menu-separator span{display:none}}.navigation #dark-mode-toggle{margin:1.7rem 0;font-size:2.4rem;line-height:inherit}.navigation #menu-toggle{display:none}@media only screen and (max-width:768px){.navigation #menu-toggle:checked+label>i{color:#e0e0e0}.navigation #menu-toggle:checked+label+ul{visibility:visible;opacity:1;max-height:100rem}}.navigation .menu-button{display:none}@media only screen and (max-width:768px){.navigation .menu-button{display:block;margin:1.8rem 0;font-size:2.4rem;font-weight:400}}.navigation i{color:#212121;cursor:pointer}.navigation i:hover,.navigation i:focus{color:#1565c0}.pagination{margin-top:6rem;text-align:center;font-family:Lato,Helvetica,sans-serif}.pagination li{display:inline;text-align:center;font-weight:700}.pagination li span{margin:0;text-align:center;width:3.2rem}.pagination li a{font-weight:300}.pagination li a span{margin:0;text-align:center;width:3.2rem}.footer{width:100%;text-align:center;line-height:2rem;margin-bottom:1rem}.footer a{color:#1565c0}
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.json
@@ -1 +1 @@
{"Target":"css/coder.min.3219ef62ae52679b7a9c19043171c3cd9f523628c2a65f3ef247ee18836bc90b.css","MediaType":"text/css","Data":{"Integrity":"sha256-MhnvYq5SZ5t6nBkEMXHDzZ9SNijCpl8+8kfuGINryQs="}}
{"Target":"css/coder.min.0e5ce5b959a68dfe0232c6ddcec1e8ef154517c968464707f3181c437fe611c0.css","MediaType":"text/css","Data":{"Integrity":"sha256-DlzluVmmjf4CMsbdzsHo7xVFF8loRkcH8xgcQ3/mEcA="}}