V2 HUGO
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
{{ block "extra_head" . }}{{ end }}
|
||||
</head>
|
||||
<body class="{{ if .IsHome }}home{{ else }}page{{ end }}">
|
||||
<script src="/js/nature-bg.js"></script>
|
||||
{{ partial "nav.html" . }}
|
||||
<main id="main-content">
|
||||
{{ block "body" . }}{{ end }}
|
||||
|
||||
+9
-1
@@ -4,7 +4,13 @@
|
||||
<img src="{{ .Site.Params.logo }}" alt="SNOWARE Logo" class="home-logo" width="160" height="160">
|
||||
</div>
|
||||
<h1 class="home-title">SNOWARE</h1>
|
||||
<p class="home-subtitle">冷静而温馨,简约而不简单。</p>
|
||||
<div class="home-poem">
|
||||
<p class="poem-line fade-1">群星璀璨而流星划过天际,曳尾长明而星空黯淡无光,我们如何在瞬间探寻永恒的答案?</p>
|
||||
<p class="poem-line fade-2">苦旅漫漫,雾霭蒙蒙,文牒拭作灰烬,家书遥遥无期。</p>
|
||||
<p class="poem-line fade-3">雾开雾散,云卷云舒,潮起潮息,光阴流转而你我不凡之辈,即亡没砂石亦必熠熠生辉</p>
|
||||
<p class="poem-line fade-4">曲折的进步似为唯一的答案,我心永恒,流光跃过风雨,终会与你同行。</p>
|
||||
<p class="poem-sig">S.A. 2026 7.5 @EDT</p>
|
||||
</div>
|
||||
<nav class="home-nav">
|
||||
{{ range .Site.Params.navLinks }}
|
||||
<a href="{{ .url }}" class="home-btn{{ if .external }} external{{ end }}" {{ if .external }}target="_blank" rel="noopener"{{ end }}>
|
||||
@@ -30,6 +36,8 @@
|
||||
<svg viewBox="0 0 24 24"><path d="M18 10h-1.26A8 8 0 109 20h9a5 5 0 000-10z"/></svg>
|
||||
{{ else if eq .icon "game" }}
|
||||
<svg viewBox="0 0 24 24"><rect x="2" y="6" width="20" height="12" rx="2"/><line x1="6" y1="12" x2="10" y2="12"/><line x1="8" y1="10" x2="8" y2="14"/><circle cx="16" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1" fill="currentColor" stroke="none"/></svg>
|
||||
{{ else if eq .icon "team" }}
|
||||
<svg viewBox="0 0 24 24"><path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 00-3-3.87"/><path d="M16 3.13a4 4 0 010 7.75"/></svg>
|
||||
{{ end }}
|
||||
</div>
|
||||
<h3>{{ .name }}</h3>
|
||||
|
||||
@@ -8,6 +8,23 @@
|
||||
{{ range .Site.Params.navLinks }}
|
||||
<a href="{{ .url }}" {{ if .external }}target="_blank" rel="noopener"{{ end }}>{{ .name }}</a>
|
||||
{{ end }}
|
||||
<button class="theme-toggle" id="theme-toggle" title="切换主题">
|
||||
<svg class="theme-icon-warm" viewBox="0 0 24 24" width="18" height="18"><circle cx="12" cy="12" r="5" fill="currentColor" stroke="none"/><line x1="12" y1="1" x2="12" y2="3" stroke="currentColor" stroke-width="2"/><line x1="12" y1="21" x2="12" y2="23" stroke="currentColor" stroke-width="2"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" stroke="currentColor" stroke-width="2"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" stroke="currentColor" stroke-width="2"/><line x1="1" y1="12" x2="3" y2="12" stroke="currentColor" stroke-width="2"/><line x1="21" y1="12" x2="23" y2="12" stroke="currentColor" stroke-width="2"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" stroke="currentColor" stroke-width="2"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" stroke="currentColor" stroke-width="2"/></svg>
|
||||
<svg class="theme-icon-cyan" viewBox="0 0 24 24" width="18" height="18"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z" fill="none" stroke="currentColor" stroke-width="2"/></svg>
|
||||
</button>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<script>
|
||||
(function(){
|
||||
var t = localStorage.getItem('snoware-theme') || 'warm';
|
||||
document.documentElement.setAttribute('data-theme', t);
|
||||
var btn = document.getElementById('theme-toggle');
|
||||
if(btn) btn.addEventListener('click', function(){
|
||||
var cur = document.documentElement.getAttribute('data-theme');
|
||||
var next = cur === 'warm' ? 'cyan' : 'warm';
|
||||
document.documentElement.setAttribute('data-theme', next);
|
||||
localStorage.setItem('snoware-theme', next);
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user