fix
This commit is contained in:
parent
3d3e976adb
commit
9d9f50f0e0
@ -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 }}
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user