13 lines
7.0 KiB
HTML
13 lines
7.0 KiB
HTML
<!DOCTYPE html><html lang="en"> <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script>
|
|
(function () {
|
|
var stored = localStorage.getItem("theme");
|
|
var prefersDark = window.matchMedia(
|
|
"(prefers-color-scheme: dark)",
|
|
).matches;
|
|
if (stored === "dark" || (!stored && prefersDark)) {
|
|
document.documentElement.classList.add("dark");
|
|
}
|
|
})();
|
|
</script> <title th:text="|${tag.spec.displayName} - ${site.title}|"></title> <link rel="stylesheet" href="/themes/astro-starter/assets/Layout.CBfLtUah.css"></head> <body> <header data-astro-cid-3ef6ksr2> <div class="header-inner" data-astro-cid-3ef6ksr2> <a class="brand" href="/" th:text="${site.title}" data-astro-cid-3ef6ksr2></a> <nav th:with="menu = ${menuFinder.getPrimary()}" aria-label="Main navigation" data-astro-cid-3ef6ksr2> <a th:each="menuItem : ${menu.menuItems}" th:href="@{${menuItem.status.href}}" th:target="${menuItem.spec.target?.value}" th:text="${menuItem.status.displayName}" data-astro-cid-3ef6ksr2></a> </nav> <style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event("astro:load"));})();</script><script>(()=>{var A=Object.defineProperty;var g=(i,o,a)=>o in i?A(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a;var d=(i,o,a)=>g(i,typeof o!="symbol"?o+"":o,a);{let i={0:t=>m(t),1:t=>a(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(a(t)),5:t=>new Set(a(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t),11:t=>Number.POSITIVE_INFINITY*t},o=t=>{let[l,e]=t;return l in i?i[l](e):void 0},a=t=>t.map(o),m=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([l,e])=>[l,o(e)]));class y extends HTMLElement{constructor(){super(...arguments);d(this,"Component");d(this,"hydrator");d(this,"hydrate",async()=>{var b;if(!this.hydrator||!this.isConnected)return;let e=(b=this.parentElement)==null?void 0:b.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let c=this.querySelectorAll("astro-slot"),n={},h=this.querySelectorAll("template[data-astro-template]");for(let r of h){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("data-astro-template")||"default"]=r.innerHTML,r.remove())}for(let r of c){let s=r.closest(this.tagName);s!=null&&s.isSameNode(this)&&(n[r.getAttribute("name")||"default"]=r.innerHTML)}let p;try{p=this.hasAttribute("props")?m(JSON.parse(this.getAttribute("props"))):{}}catch(r){let s=this.getAttribute("component-url")||"<unknown>",v=this.getAttribute("component-export");throw v&&(s+=` (export ${v})`),console.error(`[hydrate] Error parsing props for component ${s}`,this.getAttribute("props"),r),r}let u;await this.hydrator(this)(this.Component,p,n,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});d(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),c.disconnect(),this.childrenConnectedCallback()},c=new MutationObserver(()=>{var n;((n=this.lastChild)==null?void 0:n.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});c.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}async start(){let e=JSON.parse(this.getAttribute("opts")),c=this.getAttribute("client");if(Astro[c]===void 0){window.addEventListener(`astro:${c}`,()=>this.start(),{once:!0});return}try{await Astro[c](async()=>{let n=this.getAttribute("renderer-url"),[h,{default:p}]=await Promise.all([import(this.getAttribute("component-url")),n?import(n):()=>()=>{}]),u=this.getAttribute("component-export")||"default";if(!u.includes("."))this.Component=h[u];else{this.Component=h;for(let f of u.split("."))this.Component=this.Component[f]}return this.hydrator=p,this.hydrate},e,this)}catch(n){console.error(`[astro-island] Error hydrating ${this.getAttribute("component-url")}`,n)}}attributeChangedCallback(){this.hydrate()}}d(y,"observedAttributes",["props"]),customElements.get("astro-island")||customElements.define("astro-island",y)}})();</script><astro-island uid="1L3JFo" prefix="s0" component-url="/themes/astro-starter/assets/ThemeSwitcher.YRqkXSdT.js" component-export="default" renderer-url="/themes/astro-starter/assets/client.DVUslHZS.js" props="{"data-astro-cid-3ef6ksr2":[0,true]}" ssr client="load" opts="{"name":"ThemeSwitcher","value":true}" await-children><button class="theme-toggle" type="button" aria-label="Switch to dark mode" data-astro-cid-3ef6ksr2="true" data-v-976d6eb8><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-976d6eb8><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" data-v-976d6eb8></path></svg></button><!--astro:end--></astro-island> </div> </header> <main class="layout-main"> <article class="page-shell"> <div class="page-content"> <div class="page-heading"> <h1 th:text="${tag.spec.displayName}"></h1> <p class="page-meta"> <span th:text="|${posts.total} 篇文章|"></span> </p> </div> <ul class="post-feed__list" role="list"> <li th:each="post : ${posts.items}" class="post-feed__item"> <a class="post-feed__link" th:href="@{${post.status.permalink}}"> <div class="post-feed__body"> <p class="post-feed__date" th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"></p> <h2 class="post-feed__title" th:text="${post.spec.title}"></h2> <p class="post-feed__excerpt" th:text="${post.status.excerpt}"></p> </div> <img th:unless="${#strings.isEmpty(post.spec.cover)}" class="post-feed__image" th:src="${post.spec.cover}"> </a> </li> </ul> <div th:if="${posts.total == 0}" class="feed-empty">暂无文章。</div> <nav th:if="${posts.totalPages gt 1}" class="pagination" aria-label="Pagination"> <a th:if="${posts.hasPrevious()}" th:href="@{${posts.prevUrl}}" class="pagination__prev">← 较新</a> <span class="pagination__info" th:text="|${posts.page} / ${posts.totalPages}|"></span> <a th:if="${posts.hasNext()}" th:href="@{${posts.nextUrl}}" class="pagination__next">较旧 →</a> </nav> </div> </article> </main> <footer data-astro-cid-sz7xmlte> <div class="footer-inner" data-astro-cid-sz7xmlte> <span data-astro-cid-sz7xmlte>
|
|
© 2026 <th:block th:text="${site.title}" data-astro-cid-sz7xmlte></th:block>.
|
|
</span> </div> </footer> </body></html> |