100 lines
3.6 KiB
TypeScript
100 lines
3.6 KiB
TypeScript
import type { NavigationEntry } from '@/lib/site-navigation';
|
|
import type { navigationPageData } from '@/lib/navigation-page';
|
|
import { SiteNavigation } from './SiteNavigation';
|
|
|
|
export function Sidebar({navigation,address,error,contacts}:{navigation:NavigationEntry[];address:string;error?:boolean;contacts?:Pick<ReturnType<typeof navigationPageData>,'telegram'|'tgGroup'|'twitter'>}) {
|
|
return (
|
|
<>
|
|
<aside className={"side"} id={"site-sidebar"} aria-label={"网站侧边栏"}>
|
|
<div className={"sidebar-header"}>
|
|
<a className={"mark sidebar-logo-toggle"} href={"/"} aria-label={"禁果短剧首页"}>
|
|
<span className={"sidebar-brand-window"}>
|
|
<img className={"sidebar-brand"} src={"/assets/40803f26f3c0acbb.svg"} alt={"禁果短剧"} width={"500"} height={"176"} />
|
|
</span>
|
|
</a>
|
|
<button className={"sidebar-toggle"} id={"sidebar-toggle"} type={"button"} aria-controls={"site-sidebar"} aria-expanded={"true"} aria-label={"收起侧边栏"} title={"收起侧边栏"}>
|
|
<svg viewBox={"0 0 24 24"} aria-hidden={"true"}>
|
|
<rect x={"3"} y={"4"} width={"18"} height={"16"} rx={"3"}>
|
|
|
|
</rect>
|
|
<path d={"M9 4v16"}>
|
|
|
|
</path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<SiteNavigation entries={navigation} address={address} error={error} />
|
|
<div className={"side-info"}>
|
|
<strong>
|
|
<img className={"side-info-wordmark"} src={"/assets/87eeb5bf339a03f0.svg"} alt={"禁果短剧"} width={308} height={73} />
|
|
<i className={"side-info-brand-dot"} aria-hidden={"true"}>
|
|
|
|
</i>
|
|
</strong>
|
|
<p className={"side-info-slogan"}>
|
|
{"精品原创 · 日更爽看"}
|
|
</p>
|
|
<div className={"policy-links"} aria-label={"平台规则与帮助"}>
|
|
<a href={"/info/about-us/"} data-info={"about-us"}>
|
|
{"关于我们"}
|
|
</a>
|
|
<a href={"/info/user-agreement/"} data-info={"user-agreement"}>
|
|
{"用户协议"}
|
|
</a>
|
|
<a href={"/info/privacy-policy/"} data-info={"privacy-policy"}>
|
|
{"隐私政策"}
|
|
</a>
|
|
<a href={"/info/help-center/"} data-info={"help-center"}>
|
|
{"常见问题"}
|
|
</a>
|
|
<a href={"/info/2257/"} data-info={"2257"}>
|
|
{"2257"}
|
|
</a>
|
|
<a href={"/info/dmca/"} data-info={"dmca"}>
|
|
{"DMCA"}
|
|
</a>
|
|
<a href={"/info/feedback/"} data-info={"feedback"}>
|
|
{"意见反馈"}
|
|
</a>
|
|
</div>
|
|
<small>
|
|
{"© 2026 禁果短剧"}
|
|
<br />
|
|
{"All rights reserved."}
|
|
</small>
|
|
</div>
|
|
<a className={"collapsed-help"} href={"/info/help-center/"} title={"规则与帮助"} aria-label={"规则与帮助"}>
|
|
<svg viewBox={"0 0 24 24"} aria-hidden={"true"}>
|
|
<circle cx={"12"} cy={"12"} r={"9"}>
|
|
|
|
</circle>
|
|
<path d={"M9.5 9a2.5 2.5 0 0 1 5 0c0 2-2.5 2-2.5 4m0 3v.1"}>
|
|
|
|
</path>
|
|
</svg>
|
|
</a>
|
|
<div className={"sidebar-social"} aria-label={"联系我们"}>
|
|
{contacts?.tgGroup&&<a href={contacts.tgGroup} target={"_blank"} rel={"sponsored nofollow noopener noreferrer"} aria-label={"官方社群"} title={"官方社群"}>
|
|
<img src={"/assets/c9e57990dff7b688.png"} alt={"官方社群图标"} />
|
|
</a>}
|
|
{contacts?.telegram&&<a href={contacts.telegram} target={"_blank"} rel={"sponsored nofollow noopener noreferrer"} aria-label={"Telegram"} title={"Telegram"}>
|
|
<svg viewBox={"0 0 24 24"} aria-hidden={"true"}>
|
|
<path d={"M21.7 3.3 18.4 20c-.2 1.2-.9 1.5-1.9.9l-5-3.7-2.4 2.3c-.3.3-.5.5-1 .5l.4-5.1 9.3-8.4c.4-.4-.1-.6-.6-.3L5.7 13.4.8 11.9c-1-.3-1-1 .2-1.5L20.2 3c.9-.3 1.7.2 1.5.3Z"}>
|
|
|
|
</path>
|
|
</svg>
|
|
</a>}
|
|
{contacts?.twitter&&<a href={contacts.twitter} target={"_blank"} rel={"sponsored nofollow noopener noreferrer"} aria-label={"X"} title={"X"}>
|
|
<svg viewBox={"0 0 24 24"} aria-hidden={"true"}>
|
|
<path d={"M18.9 2H22l-6.8 7.8L23 22h-6.3l-4.9-7.4L5.3 22H2l8.3-9.5L2 2h6.5l4.4 6.8L18.9 2ZM17.8 20h1.8L7.5 4H5.6l12.2 16Z"}>
|
|
|
|
</path>
|
|
</svg>
|
|
</a>}
|
|
</div>
|
|
</aside>
|
|
<SiteNavigation entries={navigation} address={address} surface="mobile" />
|
|
</>
|
|
);
|
|
}
|