返回 DeepSeek-Reasonix
Community.astro
根目录 / site / src / layouts / Community.astro
1 ---
2 import "../styles/community.css";
3 const { title, description, active } = Astro.props;
4 const canonical = new URL(Astro.url.pathname, Astro.site).href;
5 ---
6 <!doctype html>
7 <html lang="en">
8 <head>
9 <meta charset="utf-8" />
10 <meta name="viewport" content="width=device-width, initial-scale=1" />
11 <title>{title}</title>
12 <meta name="description" content={description} />
13 <link rel="canonical" href={canonical} />
14 <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
15 <meta name="theme-color" content="#ffffff" />
16 <script is:inline>
17 (function(){try{var p=localStorage.getItem("reasonix-theme")||"system";var d=p==="dark"||(p==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.dataset.theme=d?"dark":"light";var m=document.querySelector('meta[name="theme-color"]');if(m)m.content=d?"#1f232b":"#ffffff";}catch(e){}})();
18 </script>
19 <meta property="og:type" content="website" />
20 <meta property="og:site_name" content="Reasonix Community" />
21 <meta property="og:title" content={title} />
22 <meta property="og:description" content={description} />
23 </head>
24 <body data-lang="en">
25 <header class="nav">
26 <div class="nav-inner">
27 <a class="brand" href="/community/" aria-label="Reasonix Community"><span class="mark" aria-hidden="true">R</span><span class="brand-name">Reasonix</span><span class="ctag"><span class="l-en">Community</span><span class="l-zh">社区</span></span></a>
28 <nav class="nav-links">
29 <a class={active === "discussions" ? "here" : ""} href="/community/"><span class="l-en">Discussions</span><span class="l-zh">讨论</span></a>
30 <a href="/community/?category=skills"><span class="l-en">Skills</span><span class="l-zh">技能</span></a>
31 <a href="/community/?category=show"><span class="l-en">Showcase</span><span class="l-zh">展示</span></a>
32 <a href="/docs/"><span class="l-en">Docs ↗</span><span class="l-zh">文档 ↗</span></a>
33 </nav>
34 <div class="nav-right">
35 <div class="lang-switch" role="group" aria-label="Language">
36 <button type="button" data-lang="en" class="active">EN</button>
37 <button type="button" data-lang="zh">中文</button>
38 </div>
39 <div class="theme-switch" role="group" aria-label="Theme">
40 <button type="button" data-theme="system" class="active" aria-label="System theme"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg></button>
41 <button type="button" data-theme="light" aria-label="Light theme"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><line x1="12" y1="1" x2="12" y2="4"/><line x1="12" y1="20" x2="12" y2="23"/><line x1="4.2" y1="4.2" x2="6.3" y2="6.3"/><line x1="17.7" y1="17.7" x2="19.8" y2="19.8"/><line x1="1" y1="12" x2="4" y2="12"/><line x1="20" y1="12" x2="23" y2="12"/><line x1="4.2" y1="19.8" x2="6.3" y2="17.7"/><line x1="17.7" y1="6.3" x2="19.8" y2="4.2"/></svg></button>
42 <button type="button" data-theme="dark" aria-label="Dark theme"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg></button>
43 </div>
44 <span id="nav-account"></span>
45 </div>
46 </div>
47 </header>
48
49 <main>
50 <slot />
51 </main>
52
53 <footer class="foot">
54 <div class="foot-inner">
55 <a class="brand" href="/"><span class="mark">R</span>Reasonix</a>
56 <span><span class="l-en">© 2026 · MIT · built to be left running.</span><span class="l-zh">© 2026 · MIT 许可 · 为常驻运行而生。</span></span>
57 <nav class="links">
58 <a href="/community/guidelines/"><span class="l-en">Guidelines</span><span class="l-zh">规范</span></a>
59 <a href="/docs/"><span class="l-en">Docs</span><span class="l-zh">文档</span></a>
60 <a href="https://github.com/esengine/DeepSeek-Reasonix">GitHub</a>
61 </nav>
62 </div>
63 </footer>
64
65 <script>import "../scripts/community.js";</script>
66 </body>
67 </html>
68
68 lines Plain Text