mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-06-10 22:27:57 +00:00
✨ Docs: 添加 wwads (#2361)
This commit is contained in:
parent
005968ab70
commit
22b6062900
@ -23,6 +23,15 @@ const config = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
scripts: [
|
||||||
|
{
|
||||||
|
type: "text/javascript",
|
||||||
|
charset: "UTF-8",
|
||||||
|
src: "https://cdn.wwads.cn/js/makemoney.js",
|
||||||
|
async: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
"docusaurus-preset-nonepress",
|
"docusaurus-preset-nonepress",
|
||||||
|
@ -3,7 +3,7 @@ import React from "react";
|
|||||||
import Link from "@docusaurus/Link";
|
import Link from "@docusaurus/Link";
|
||||||
import OriginCopyright from "@theme-original/FooterCopyright";
|
import OriginCopyright from "@theme-original/FooterCopyright";
|
||||||
|
|
||||||
function FooterCopyright() {
|
export default function FooterCopyright(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<OriginCopyright />
|
<OriginCopyright />
|
||||||
@ -24,7 +24,7 @@ function FooterCopyright() {
|
|||||||
fill="none"
|
fill="none"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<g clip-path="url(#clip0_236_25)">
|
<g clipPath="url(#clip0_236_25)">
|
||||||
<path
|
<path
|
||||||
d="M58.4704 103.765V77.4144L59.0165 76.8683H65.6043L66.1504 77.4144V103.765L65.6043 104.311H59.0165L58.4704 103.765Z"
|
d="M58.4704 103.765V77.4144L59.0165 76.8683H65.6043L66.1504 77.4144V103.765L65.6043 104.311H59.0165L58.4704 103.765Z"
|
||||||
fill="#05BDBA"
|
fill="#05BDBA"
|
||||||
@ -117,5 +117,3 @@ function FooterCopyright() {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FooterCopyright;
|
|
||||||
|
27
website/src/theme/TOC/index.tsx
Normal file
27
website/src/theme/TOC/index.tsx
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import React from "react";
|
||||||
|
import clsx from "clsx";
|
||||||
|
|
||||||
|
import TOCItems from "@theme/TOCItems";
|
||||||
|
import styles from "./styles.module.css";
|
||||||
|
import type { TOCProps } from "@theme/TOC";
|
||||||
|
|
||||||
|
const LINK_CLASS_NAME = styles["toc-link"];
|
||||||
|
const LINK_ACTIVE_CLASS_NAME = styles["toc-link-active"];
|
||||||
|
|
||||||
|
export default function TOC({ className, ...props }: TOCProps): JSX.Element {
|
||||||
|
return (
|
||||||
|
<div className={clsx(styles.toc, "thin-scrollbar", className)}>
|
||||||
|
<TOCItems
|
||||||
|
{...props}
|
||||||
|
linkClassName={LINK_CLASS_NAME}
|
||||||
|
linkActiveClassName={LINK_ACTIVE_CLASS_NAME}
|
||||||
|
/>
|
||||||
|
<div className={styles.tocAdsContainer}>
|
||||||
|
<div
|
||||||
|
className={clsx("wwads-cn wwads-horizontal", styles.tocAds)}
|
||||||
|
data-id="281"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
41
website/src/theme/TOC/styles.module.css
Normal file
41
website/src/theme/TOC/styles.module.css
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
.toc {
|
||||||
|
max-height: calc(100vh - 7rem);
|
||||||
|
|
||||||
|
@apply sticky top-28 overflow-y-auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc-link {
|
||||||
|
@apply text-light-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global .dark :local .toc-link {
|
||||||
|
@apply text-dark-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toc-link-active {
|
||||||
|
@apply text-light-text-active;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global .dark :local .toc-link-active {
|
||||||
|
@apply text-dark-text-active;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tocAdsContainer {
|
||||||
|
@apply sticky bottom-0 w-full max-w-full mt-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tocAds {
|
||||||
|
@apply max-w-full !bg-light;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global .dark :local .tocAds {
|
||||||
|
@apply !bg-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tocAds :global .wwads-text {
|
||||||
|
@apply text-light-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global .dark :local .tocAds :global .wwads-text {
|
||||||
|
@apply text-dark-text;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user