initial commit

This commit is contained in:
PrinOrange
2023-12-25 17:21:39 +08:00
commit 0bd1089d74
94 changed files with 18648 additions and 0 deletions

4
styles/font.ts Normal file
View File

@@ -0,0 +1,4 @@
import localFont from "next/font/local";
export const fontSypxzs = localFont({ src: "../assets/fonts/sypxzs.woff2" }); // 思源屏显臻宋
export const fontFzxbs = localFont({ src: "../assets/fonts/fzxbs.woff2" }); // 方正小标宋

20
styles/formuation.css Normal file
View File

@@ -0,0 +1,20 @@
.katex-display {
overflow: auto hidden;
padding-top: 10px;
padding-bottom: 10px;
}
.katex-display::-webkit-scrollbar {
width: 10px;
height: 5px;
}
.katex-display::-webkit-scrollbar-track {
border-radius: 3px;
background: rgba(207, 199, 199, 0.05);
-webkit-box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.08);
}
.katex-display::-webkit-scrollbar-thumb {
border-radius: 3px;
background: rgb(232, 229, 229);
-webkit-box-shadow: inset 0 0 50px rgba(169, 160, 160, 0.2);
}

84
styles/globals.css Normal file
View File

@@ -0,0 +1,84 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "./typesetting.css";
@import "./formuation.css";
@import "./ui.css";
@import "./layout.css";
@import "./scrollbar.css";
@import "./prism.css";
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 224 71.4% 4.1%;
--card: 0 0% 100%;
--card-foreground: 224 71.4% 4.1%;
--popover: 0 0% 100%;
--popover-foreground: 224 71.4% 4.1%;
--primary: 220.9 39.3% 11%;
--primary-foreground: 210 20% 98%;
--secondary: 220 14.3% 95.9%;
--secondary-foreground: 220.9 39.3% 11%;
--muted: 220 14.3% 95.9%;
--muted-foreground: 220 8.9% 46.1%;
--accent: 220 14.3% 95.9%;
--accent-foreground: 220.9 39.3% 11%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 20% 98%;
--border: 220 13% 91%;
--input: 220 13% 91%;
--ring: 224 71.4% 4.1%;
--radius: 0.5rem;
}
.dark {
--background: 224 71.4% 4.1%;
--foreground: 210 20% 98%;
--card: 224 71.4% 4.1%;
--card-foreground: 210 20% 98%;
--popover: 224 71.4% 4.1%;
--popover-foreground: 210 20% 98%;
--primary: 210 20% 98%;
--primary-foreground: 220.9 39.3% 11%;
--secondary: 215 27.9% 16.9%;
--secondary-foreground: 210 20% 98%;
--muted: 215 27.9% 16.9%;
--muted-foreground: 217.9 10.6% 64.9%;
--accent: 215 27.9% 16.9%;
--accent-foreground: 210 20% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 20% 98%;
--border: 215 27.9% 16.9%;
--input: 215 27.9% 16.9%;
--ring: 216 12.2% 83.9%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}

3
styles/layout.css Normal file
View File

@@ -0,0 +1,3 @@
.responsive-width {
@apply px-5 lg:px-20 xl:px-32 2xl:px-52;
}

124
styles/prism.css Normal file
View File

@@ -0,0 +1,124 @@
/**
* Dracula Theme originally by Zeno Rocha [@zenorocha]
* https://draculatheme.com/
*
* Ported for PrismJS by Albert Vallverdu [@byverdu]
*/
code[class*="language-"],
pre[class*="language-"] {
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
border-radius: 0.3em;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #282a36;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: 0.1em;
border-radius: 0.3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: rgb(84, 198, 84);
}
.token.punctuation {
color: #f8f8f2;
}
.namespace {
opacity: 0.7;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #ff79c6;
}
.token.boolean,
.token.number {
color: #ceb9ec;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #50fa7b;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #f8f8f2;
}
.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
color: #f1fa8c;
}
.token.keyword {
color: #8be9fd;
}
.token.regex {
color: blueviolet;
}
.token.important {
color: #ffb86c;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

33
styles/scrollbar.css Normal file
View File

@@ -0,0 +1,33 @@
/* 滚动槽 */
.flat-scrollbar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.flat-scrollbar::-webkit-scrollbar-track {
border-radius: 3px;
background: rgba(0, 0, 0, 0.06);
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
}
/* 滚动条滑块 */
.flat-scrollbar::-webkit-scrollbar-thumb {
border-radius: 3px;
background: gray;
-webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}
/* 滚动槽 */
.flat-scrollbar-thin::-webkit-scrollbar {
width: 3px;
height: 3px;
}
.flat-scrollbar-thin::-webkit-scrollbar-track {
border-radius: 3px;
background: rgba(0, 0, 0, 0.06);
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08);
}
/* 滚动条滑块 */
.flat-scrollbar-thin::-webkit-scrollbar-thumb {
border-radius: 3px;
background: gray;
-webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

28
styles/typesetting.css Normal file
View File

@@ -0,0 +1,28 @@
.typesetting {
@apply prose
max-w-full
overflow-x-auto
break-words
px-0
dark:prose-invert
prose-h1:text-2xl
prose-h2:scroll-mt-20
prose-h3:scroll-mt-20
prose-h4:scroll-mt-20
prose-h5:scroll-mt-20
prose-h6:scroll-mt-20
prose-a:text-sky-700
prose-figure:mx-auto
prose-table:border-4
prose-tr:border-2
prose-tr:p-2
prose-th:border
prose-th:p-2
prose-td:border-2
prose-td:p-2
prose-img:mx-auto
dark:prose-a:text-sky-500;
}

49
styles/ui.css Normal file
View File

@@ -0,0 +1,49 @@
.text-selection {
@apply selection:bg-black
selection:text-white
dark:selection:bg-white
dark:selection:text-black;
}
.list-title {
@apply text-3xl
font-bold
text-sky-600
dark:text-sky-500;
}
.nav-link {
@apply border-b-sky-600
font-bold
hover:text-sky-600
dark:hover:border-b-sky-500
dark:hover:text-sky-500;
}
.tag-link {
@apply border-2
border-black
px-2
hover:border-gray-600
hover:text-gray-600
dark:border-white
dark:text-white
dark:hover:border-gray-200
dark:hover:text-gray-200;
}
.link-button {
@apply rounded-md
bg-black
px-5
py-1
text-white
hover:bg-gray-600
dark:bg-white
dark:text-black
dark:hover:bg-gray-200;
}
* {
@apply text-selection;
}