1
0
This commit is contained in:
syui 2024-10-15 14:57:45 +09:00
parent 3d3e976adb
commit 9d9f50f0e0
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
3 changed files with 28 additions and 2 deletions

View File

@ -31,7 +31,6 @@
"url": "{{ .Site.BaseURL }}"
}
</script>
<script src="/js/index.js"></script>
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}

View File

@ -1 +1,2 @@
<iframe src="https://card.syui.ai/planet?g=sun" allowfullscreen frameborder="0" style="width:95%;height:600px;"></iframe>
<iframe src="https://card.syui.ai/planet" allowfullscreen frameborder="0" style="width:95%;height:600px;" id="planet"></iframe>
<script src="/js/index.js"></script>

View File

@ -10,3 +10,29 @@ function blog_list_open() {
}
}
function replace() {
const link = document.getElementById('planet');
const date = new Date();
const durl = 'https://card.syui.ai/planet';
let url;
let u = date.getSeconds().toString().substr(-1);
console.log(u);
switch (u) {
case '0':
url = durl + "?g=sun";
break;
case '1':
url = durl + "?g=galaxy";
break;
case '2':
url = durl + "?g=neutron";
break;
case '3':
url = durl + "?g=earth";
break;
default:
url = durl + "?g=moon";
}
link.setAttribute('src', url);
}
replace();