mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
25.29.2020 214d6fa4ce7922821d3b35ccae875c51c9fc7d33
Merge pull request #22 from geoffreywwang/bug/safari-theme-switching

Bug fixes for theme switching
4 files modified
36 ■■■■ changed files
assets/css/style.css 30 ●●●● patch | view | raw | blame | history
assets/js/anatole-header.js 3 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 2 ●●● patch | view | raw | blame | history
layouts/partials/head.html 1 ●●●● patch | view | raw | blame | history
assets/css/style.css
@@ -20,13 +20,14 @@
  --border-color: rgb(38, 38, 38);
  --pre-bg-color:rgb(33,33,45);
  --nav-text-color:rgb(191, 191, 191);
  --tag-color: rgb(191, 191, 191) !important;
  --tag-color: rgb(191, 191, 191);
  
}
html {
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}
body {
@@ -82,11 +83,6 @@
a:link, a:visited {
  opacity: 1;
  -webkit-transition: all .15s linear;
  -moz-transition: all .15s linear;
  -o-transition: all .15s linear;
  -ms-transition: all .15s linear;
  transition: all .15s linear;
  color: var(--tag-color);
}
@@ -96,12 +92,9 @@
/*basic styles ends*/
/*animation starts*/
.animated {
  -webkit-animation-fill-mode: both;
  -moz-animation-fill-mode: both;
  -ms-animation-fill-mode: both;
  -o-animation-fill-mode: both;
  animation-fill-mode: both;
  transition: top .8s linear;
  -webkit-animation-duration: 1s;
  -moz-animation-duration: 1s;
  -ms-animation-duration: 1s;
@@ -119,48 +112,37 @@
@-webkit-keyframes fadeInDown {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    background-color: var(--bg-color);
    -webkit-transform: translateY(0);
  }
}
@-moz-keyframes fadeInDown {
  0% {
    opacity: 0;
    -moz-transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    background-color: var(--bg-color);
    -moz-transform: translateY(0);
  }
}
@-o-keyframes fadeInDown {
  0% {
    opacity: 0;
    -o-transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    background-color: var(--bg-color);
    -o-transform: translateY(0);
  }
}
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    background-color: var(--bg-color);
    transform: translateY(0);
  }
}
.fadeInDown {
  -webkit-animation-name: fadeInDown;
  -moz-animation-name: fadeInDown;
@@ -242,7 +224,6 @@
  background-size: cover;
  background-color: var(--bg-color);
  height: 100%;
  transition: 0.8s;
  top: 0;
  left: 0;
  position: fixed;
@@ -343,7 +324,6 @@
  color: #2F69B3;
}
.post .post-content h3 {
  /*  */
  font-size: 22px;
  font-weight: 600;
}
assets/js/anatole-header.js
@@ -23,7 +23,6 @@
        }
    }
    else {
        console.log(theme);
        // load a stored theme
        if (theme == 'light') {
            document.documentElement.setAttribute('data-theme', 'light');
@@ -47,7 +46,7 @@
}
document.addEventListener('DOMContentLoaded', function() {
    themeSwitcher = document.querySelector('.theme-switch');
    var themeSwitcher = document.querySelector('.theme-switch');
    themeSwitcher.addEventListener('click', switchTheme, false);
}, false);
layouts/_default/baseof.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="{{- site.Language.Lang -}}">
<html lang="{{- site.Language.Lang -}}" data-theme="light">
    {{- partial "head.html" . -}}
    <body>
        {{- partial "sidebar.html" . -}}
layouts/partials/head.html
@@ -1,4 +1,3 @@
<html lang="en" data-theme="light">
<head>
    <title> {{.Site.Params.author}}{{ with .Title }} | {{ . }}{{ end }} </title>
    <meta charset="utf-8">