1
0
Fork 0

refine code

This commit is contained in:
nanxiaobei 2021-08-24 10:14:27 +08:00
parent e5050d8bc4
commit e8237eaf14
2 changed files with 3 additions and 3 deletions

View file

@ -221,7 +221,7 @@ img {
.social a { .social a {
width: 3rem; width: 3rem;
margin-left: 3rem; margin-left: 3rem;
background: var(--img) center center no-repeat; background: var(--url) center center no-repeat;
} }
.dark .social a { .dark .social a {

View file

@ -31,7 +31,7 @@
buttonDark.addEventListener('click', () => { buttonDark.addEventListener('click', () => {
bodyClass.contains('dark') ? setLight() : setDark(); bodyClass.contains('dark') ? setLight() : setDark();
}); });
schemeDark.addEventListener('change', event => { schemeDark.addEventListener('change', (event) => {
event.matches ? setDark() : setLight(); event.matches ? setDark() : setLight();
}); });
</script> </script>
@ -50,7 +50,7 @@
{{ range $key, $val := . }} {{ range $key, $val := . }}
<a <a
class="{{ $key }}" class="{{ $key }}"
style="--img: url(./{{ printf `%s.svg` $key }})" style="--url: url(./{{ printf `%s.svg` $key }})"
href="https://{{ $key }}.com/{{ $val }}" href="https://{{ $key }}.com/{{ $val }}"
target="_blank" target="_blank"
></a> ></a>