返回 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 <button
47 class="nav-menu-toggle"
48 type="button"
49 data-mobile-nav-toggle
50 aria-controls="community-mobile-nav"
51 aria-expanded="false"
52 aria-label="Open navigation"
53 title="Open navigation"
54 >
55 <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 6h16M4 12h16M4 18h16" /></svg>
56 </button>
57 </div>
58 <div class="mobile-nav" id="community-mobile-nav" data-mobile-nav hidden>
59 <button class="mobile-nav-backdrop" type="button" data-mobile-nav-close aria-label="Close navigation"></button>
60 <aside class="mobile-nav-panel" role="dialog" aria-modal="true" aria-labelledby="community-mobile-nav-title">
61 <div class="mobile-nav-head">
62 <span id="community-mobile-nav-title"><span class="l-en">Navigation</span><span class="l-zh">导航</span></span>
63 <button class="mobile-nav-close" type="button" data-mobile-nav-close aria-label="Close navigation" title="Close navigation">
64 <svg viewBox="0 0 24 24" aria-hidden="true"><path d="m6 6 12 12M18 6 6 18" /></svg>
65 </button>
66 </div>
67 <nav class="mobile-nav-links" aria-label="Mobile community navigation">
68 <a class:list={[{ here: active === "discussions" }]} href="/community/"><span class="l-en">Discussions</span><span class="l-zh">讨论</span></a>
69 <a href="/community/?category=skills"><span class="l-en">Skills</span><span class="l-zh">技能</span></a>
70 <a href="/community/?category=show"><span class="l-en">Showcase</span><span class="l-zh">展示</span></a>
71 <a href="/docs/"><span class="l-en">Docs ↗</span><span class="l-zh">文档 ↗</span></a>
72 </nav>
73 <div class="mobile-nav-actions">
74 <a class="mobile-nav-github" href="https://github.com/esengine/DeepSeek-Reasonix" target="_blank" rel="noreferrer">
75 <svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M12 .7a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2.3c-3.3.7-4-1.4-4-1.4-.5-1.4-1.3-1.8-1.3-1.8-1.1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.8-1.6-2.6-.3-5.4-1.3-5.4-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.3 1.2a11.5 11.5 0 0 1 6 0c2.3-1.5 3.3-1.2 3.3-1.2.7 1.6.3 2.8.1 3.1.8.8 1.2 1.9 1.2 3.2 0 4.6-2.8 5.6-5.4 5.9.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6A12 12 0 0 0 12 .7Z" /></svg>
76 GitHub
77 </a>
78 <span id="mobile-nav-account"></span>
79 <a class="btn btn-primary" href="/community/new/"><span class="l-en">New topic</span><span class="l-zh">发起话题</span></a>
80 </div>
81 </aside>
82 </div>
83 </header>
84
85 <main>
86 <slot />
87 </main>
88
89 <footer class="foot">
90 <div class="foot-inner">
91 <a class="brand" href="/"><span class="mark">R</span>Reasonix</a>
92 <span><span class="l-en">© 2026 · MIT · built to be left running.</span><span class="l-zh">© 2026 · MIT 许可 · 为常驻运行而生。</span></span>
93 <nav class="links">
94 <a href="/community/guidelines/"><span class="l-en">Guidelines</span><span class="l-zh">规范</span></a>
95 <a href="/docs/"><span class="l-en">Docs</span><span class="l-zh">文档</span></a>
96 <a href="https://github.com/esengine/DeepSeek-Reasonix">GitHub</a>
97 </nav>
98 </div>
99 </footer>
100
101 <script>import "../scripts/community.js";</script>
102 </body>
103 </html>
104
104 lines Plain Text