Themes: add font switcher and saver

blog-move
Jae Lo Presti 3 months ago
parent 646c1ea7a8
commit 05a69dfe8a
Signed by: jae
SSH Key Fingerprint: SHA256:hmKix/+XG+9GEGHgDdiqXfmB2O7BU4CPVOoQoIYIQ2Y
  1. 2
      themes/maintheme/layouts/_default/baseof.html
  2. 2
      themes/maintheme/layouts/_default/single.html
  3. 2
      themes/maintheme/layouts/index.html
  4. 19
      themes/maintheme/layouts/partials/navigation.html

@ -20,7 +20,7 @@
<meta property="og:description" content="The website of Jae Lo Presti">
<meta property="og:image" content="https://bm.jae.fi/web/Logo-abs.png">
</head>
<body>
<body id="body">
<div class="page">
<div class="header">

@ -22,7 +22,7 @@
<meta property="og:description" content="The website of Jae Lo Presti">
<meta property="og:image" content="https://bm.jae.fi/web/Logo-abs.png">
</head>
<body>
<body id="body">
<div class="page">
<div class="header">

@ -21,7 +21,7 @@
<meta property="og:description" content="The website of Jae Lo Presti">
<meta property="og:image" content="https://bm.jae.fi/web/Logo-abs.png">
</head>
<body>
<body id="body">
<div class="page">
<div class="header">

@ -25,4 +25,23 @@
</div>
<br/>
<p>CC-BY SA 4.0 Jae Lo Presti; Robot on the internet since 2012; This website is <a href="https://git.jae.fi/jae/staticweb">Open-Source</a> and under the MIT license</p>
<hr>
<small id="dotsies">Dotsies?</small>
<script type="text/javascript">
var element = document.getElementById("body");
function changeStyle() {
if (element.style.fontFamily != "dotsies")
{
element.style.fontFamily = "dotsies";
localStorage.setItem("curfont", "dotsies");
}
else
{
element.style.fontFamily = "pixel";
localStorage.setItem("curfont", "pixel");
}
}
element.style.fontFamily = localStorage.getItem("curfont");
document.getElementById("dotsies").addEventListener("click", changeStyle)
</script>
</div>