forked from c3re/c3re-website
add favicon
parent
ce64a3121f
commit
e63c154bdb
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
|
@ -4,6 +4,7 @@
|
||||||
<meta name="gitdate" content="{{ .Page.GitInfo.CommitDate }}">
|
<meta name="gitdate" content="{{ .Page.GitInfo.CommitDate }}">
|
||||||
<meta name="gitmsg" content="{{ .Page.GitInfo.Subject }}">
|
<meta name="gitmsg" content="{{ .Page.GitInfo.Subject }}">
|
||||||
<meta name="buildtime" content="{{ time.Now }}">
|
<meta name="buildtime" content="{{ time.Now }}">
|
||||||
|
<link rel="icon" type="image/png" href="{{ "img/fav.png" | relURL }}">
|
||||||
{{ $title := .Site.Title -}}
|
{{ $title := .Site.Title -}}
|
||||||
{{ if .Params.Title -}}
|
{{ if .Params.Title -}}
|
||||||
{{ $title = printf "%s | %s" .Params.Title $title -}}
|
{{ $title = printf "%s | %s" .Params.Title $title -}}
|
||||||
|
@ -76,7 +77,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{{ "images/favicon.ico" | relURL }}" type="image/x-icon" />
|
|
||||||
<style>
|
<style>
|
||||||
body{
|
body{
|
||||||
background-color: #202124;
|
background-color: #202124;
|
||||||
|
|
|
@ -6,12 +6,16 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||||
})
|
})
|
||||||
.then(function (data) {
|
.then(function (data) {
|
||||||
let body=document.getElementsByTagName("body")[0];
|
let body=document.getElementsByTagName("body")[0];
|
||||||
|
let fav=document.querySelector("head link[rel='icon']");
|
||||||
if (data.state.open) {
|
if (data.state.open) {
|
||||||
body.classList.remove("door_closed");
|
body.classList.remove("door_closed");
|
||||||
body.classList.add("door_open");
|
body.classList.add("door_open");
|
||||||
|
fav.setAttribute("href", "img/favopen.png")
|
||||||
} else {
|
} else {
|
||||||
body.classList.remove("door_open");
|
body.classList.remove("door_open");
|
||||||
body.classList.add("door_closed");
|
body.classList.add("door_closed");
|
||||||
|
fav.setAttribute("href", "img/favclosed.png")
|
||||||
|
|
||||||
}
|
}
|
||||||
document
|
document
|
||||||
.getElementById("ds-img")
|
.getElementById("ds-img")
|
||||||
|
|
Loading…
Reference in New Issue