mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-09-05 05:05:41 +00:00
Compare commits
No commits in common. "5c135cf3c251434b5d2d6bfd9d43ee68d9a80352" and "2a4c090c5d13298142d02280b03073590d94b870" have entirely different histories.
5c135cf3c2
...
2a4c090c5d
13 changed files with 82 additions and 252 deletions
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
||||||
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
viewBox="0 0 460 460" xml:space="preserve">
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path d="M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272
|
|
||||||
c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729
|
|
||||||
c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z"/>
|
|
||||||
<path d="M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272
|
|
||||||
c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068
|
|
||||||
c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001
|
|
||||||
C291.206,428.715,289.92,430,288.341,430z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
||||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
width="800px" height="800px" viewBox="0 0 335.765 335.765"
|
|
||||||
xml:space="preserve">
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<polygon points="311.757,41.803 107.573,245.96 23.986,162.364 0,186.393 107.573,293.962 335.765,65.795 "/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 571 B |
|
|
@ -1,40 +0,0 @@
|
||||||
<div class="divider" aria-hidden="true"></div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.divider {
|
|
||||||
--divider-red: var(--deep-red);
|
|
||||||
--divider-blue: var(--deep-blue);
|
|
||||||
|
|
||||||
--px: 4px; /* 单个像素点大小 */
|
|
||||||
--stripe: 16px; /* 每段斜纹横向长度 */
|
|
||||||
--period: 64px; /* 一个完整重复周期 */
|
|
||||||
--row-pattern: linear-gradient(
|
|
||||||
90deg,
|
|
||||||
var(--divider-red) 0 var(--stripe),
|
|
||||||
transparent var(--stripe) calc(var(--stripe) * 2),
|
|
||||||
var(--divider-blue) calc(var(--stripe) * 2) calc(var(--stripe) * 3),
|
|
||||||
transparent calc(var(--stripe) * 3) calc(var(--stripe) * 4)
|
|
||||||
);
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
height: calc(var(--px) * 3);
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
|
|
||||||
background:
|
|
||||||
var(--row-pattern) 0 0 / var(--period) var(--px) repeat-x,
|
|
||||||
var(--row-pattern) calc(-1 * var(--px)) calc(1 * var(--px)) /
|
|
||||||
var(--period) var(--px) repeat-x,
|
|
||||||
var(--row-pattern) calc(-2 * var(--px)) calc(2 * var(--px)) /
|
|
||||||
var(--period) var(--px) repeat-x,
|
|
||||||
var(--row-pattern) calc(-3 * var(--px)) calc(3 * var(--px)) /
|
|
||||||
var(--period) var(--px) repeat-x;
|
|
||||||
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(html.dark) .divider,
|
|
||||||
:global(.dark) .divider {
|
|
||||||
--divider-red: #ff8a8a;
|
|
||||||
--divider-blue: #9ecbff;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
---
|
---
|
||||||
import { getLangFromUrl, getTranslations, type Lang } from "@/i18n";
|
import { getLangFromUrl, getTranslations, type Lang } from "@/i18n";
|
||||||
import BuildHashBlocks from "@/components/BuildHashBlocks.astro";
|
import BuildHashBlocks from "@/components/BuildHashBlocks.astro";
|
||||||
import Divider from "@/components/Divider.astro";
|
|
||||||
const commit = import.meta.env.PUBLIC_GIT_COMMIT || "unknown";
|
const commit = import.meta.env.PUBLIC_GIT_COMMIT || "unknown";
|
||||||
const lang = getLangFromUrl(Astro.url);
|
const lang = getLangFromUrl(Astro.url);
|
||||||
const t = getTranslations(lang);
|
const t = getTranslations(lang);
|
||||||
---
|
---
|
||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<Divider />
|
|
||||||
<a
|
<a
|
||||||
href="https://github.com/ClovertaTheTrilobita/SanYeCao-blog"
|
href="https://github.com/ClovertaTheTrilobita/SanYeCao-blog"
|
||||||
class="github"
|
class="github"
|
||||||
|
|
@ -84,6 +82,22 @@ const t = getTranslations(lang);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 12px;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
var(--deep-red) 0 14px,
|
||||||
|
transparent 14px 28px,
|
||||||
|
var(--deep-blue) 28px 42px,
|
||||||
|
transparent 42px 56px
|
||||||
|
);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.footer-content-mobile {
|
.footer-content-mobile {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
@ -94,6 +108,16 @@ const t = getTranslations(lang);
|
||||||
/* display: inline-flex; */
|
/* display: inline-flex; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global(.dark) .footer::before {
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
#ff8a8a 0 14px,
|
||||||
|
transparent 14px 28px,
|
||||||
|
#9ecbff 28px 42px,
|
||||||
|
transparent 42px 56px
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
@media (max-width: 700px) {
|
||||||
.footer-content-pc {
|
.footer-content-pc {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -24,18 +24,10 @@ const { name, description, avatar, url } = Astro.props;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 0.1rem 0.5rem;
|
padding: 0.1rem 0.5rem;
|
||||||
background: #fff5ea;
|
background: #fffcf1;
|
||||||
border-top: 1px dotted var(--deep-blue); /* 上下点线 */
|
border: 2px solid #ede3d0;
|
||||||
border-left: 1px dotted var(--deep-blue);
|
|
||||||
border-bottom: 2px solid var(--deep-blue);
|
|
||||||
border-right: 2px solid var(--deep-blue);
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|
||||||
transition:
|
|
||||||
transform 0.2s ease,
|
|
||||||
background-color 0.2s ease,
|
|
||||||
box-shadow 0.2s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.friendly-link-text {
|
.friendly-link-text {
|
||||||
|
|
@ -71,14 +63,12 @@ const { name, description, avatar, url } = Astro.props;
|
||||||
}
|
}
|
||||||
|
|
||||||
.friendly-link-card:hover {
|
.friendly-link-card:hover {
|
||||||
/* background: #efe2be; */
|
background: #efe2be;
|
||||||
transform: translate(-3px, -3px);
|
|
||||||
box-shadow: 5px 6px 12px rgb(0 0 0 / 18%);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.dark) .friendly-link-card {
|
:global(.dark) .friendly-link-card {
|
||||||
background: rgba(127, 127, 127, 0.12);
|
background: #3a352b;
|
||||||
border-color: #9ecbff;
|
border-color: #8f8268;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.dark) .friendly-link-title {
|
:global(.dark) .friendly-link-title {
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,6 @@ avatar: 'https://s2.loli.net/2025/11/22/tiDKuzdqycx1v9B.png'
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 0rem;
|
padding: 0rem;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
/* color: var(--text-color); */
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(.dark) .friend-code-block {
|
|
||||||
background: rgba(127, 127, 127, 0.12);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.friend-code-block pre {
|
.friend-code-block pre {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
import Navigation from "./Navigation.astro";
|
import Navigation from "./Navigation.astro";
|
||||||
import ThemeIcon from "./ThemeIcon.astro";
|
import ThemeIcon from "./ThemeIcon.astro";
|
||||||
import { getLangFromUrl, getTranslations } from "@/i18n";
|
import { getLangFromUrl, getTranslations } from "@/i18n";
|
||||||
import Divider from "@/components/Divider.astro";
|
|
||||||
|
|
||||||
const lang = getLangFromUrl(Astro.url);
|
const lang = getLangFromUrl(Astro.url);
|
||||||
const t = getTranslations(lang);
|
const t = getTranslations(lang);
|
||||||
|
|
@ -26,9 +25,6 @@ const t = getTranslations(lang);
|
||||||
</div>
|
</div>
|
||||||
<Navigation />
|
<Navigation />
|
||||||
</nav>
|
</nav>
|
||||||
<div class="divider">
|
|
||||||
<Divider />
|
|
||||||
</div>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
@ -85,11 +81,6 @@ const t = getTranslations(lang);
|
||||||
font-size: clamp(1.6rem, 6vw, 2.5rem);
|
font-size: clamp(1.6rem, 6vw, 2.5rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.divider {
|
|
||||||
margin-top: 0.2rem;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.site-header {
|
.site-header {
|
||||||
padding-top: 0.25rem;
|
padding-top: 0.25rem;
|
||||||
|
|
|
||||||
|
|
@ -43,10 +43,37 @@ const t = getTranslations(lang);
|
||||||
<style>
|
<style>
|
||||||
.site-nav {
|
.site-nav {
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 3rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-nav::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 12px;
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
var(--deep-red) 0 14px,
|
||||||
|
transparent 14px 28px,
|
||||||
|
var(--deep-blue) 28px 42px,
|
||||||
|
transparent 42px 56px
|
||||||
|
);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.dark) .site-nav::after {
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
#ff8a8a 0 14px,
|
||||||
|
transparent 14px 28px,
|
||||||
|
#9ecbff 28px 42px,
|
||||||
|
transparent 42px 56px
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
.site-nav-desktop {
|
.site-nav-desktop {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ const tags = data.tags;
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
font-family:
|
font-family:
|
||||||
"Noto Sans SC",
|
|
||||||
system-ui,
|
system-ui,
|
||||||
-apple-system,
|
-apple-system,
|
||||||
BlinkMacSystemFont,
|
BlinkMacSystemFont,
|
||||||
|
|
@ -149,7 +148,6 @@ const tags = data.tags;
|
||||||
.post-title {
|
.post-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family:
|
font-family:
|
||||||
"Noto Sans SC",
|
|
||||||
system-ui,
|
system-ui,
|
||||||
-apple-system,
|
-apple-system,
|
||||||
BlinkMacSystemFont,
|
BlinkMacSystemFont,
|
||||||
|
|
|
||||||
|
|
@ -42,65 +42,6 @@ const {
|
||||||
<title>{pageTitle}</title>
|
<title>{pageTitle}</title>
|
||||||
</head>
|
</head>
|
||||||
<FloatingActions />
|
<FloatingActions />
|
||||||
<script is:inline>
|
|
||||||
function addCodeCopyButtons() {
|
|
||||||
document.querySelectorAll("pre").forEach((pre) => {
|
|
||||||
if (pre.querySelector(":scope > .code-copy-button")) return;
|
|
||||||
|
|
||||||
const code = pre.querySelector("code");
|
|
||||||
if (!code) return;
|
|
||||||
|
|
||||||
const button = document.createElement("button");
|
|
||||||
button.className = "code-copy-button";
|
|
||||||
button.type = "button";
|
|
||||||
button.setAttribute("aria-label", "复制代码");
|
|
||||||
button.title = "复制代码";
|
|
||||||
|
|
||||||
const icon = document.createElement("img");
|
|
||||||
icon.className = "code-copy-icon";
|
|
||||||
icon.src = "/images/copy-svgrepo-com.svg";
|
|
||||||
icon.alt = "";
|
|
||||||
icon.setAttribute("aria-hidden", "true");
|
|
||||||
|
|
||||||
button.appendChild(icon);
|
|
||||||
|
|
||||||
button.addEventListener("click", async () => {
|
|
||||||
const text = code.textContent ?? "";
|
|
||||||
|
|
||||||
try {
|
|
||||||
await navigator.clipboard.writeText(text);
|
|
||||||
} catch {
|
|
||||||
const textarea = document.createElement("textarea");
|
|
||||||
textarea.value = text;
|
|
||||||
textarea.style.position = "fixed";
|
|
||||||
textarea.style.opacity = "0";
|
|
||||||
|
|
||||||
document.body.appendChild(textarea);
|
|
||||||
textarea.select();
|
|
||||||
document.execCommand("copy");
|
|
||||||
textarea.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
icon.src = "/images/correct-signal-svgrepo-com.svg";
|
|
||||||
button.setAttribute("aria-label", "已复制");
|
|
||||||
button.title = "已复制";
|
|
||||||
button.classList.add("copied");
|
|
||||||
|
|
||||||
window.setTimeout(() => {
|
|
||||||
icon.src = "/images/copy-svgrepo-com.svg";
|
|
||||||
button.setAttribute("aria-label", "复制代码");
|
|
||||||
button.title = "复制代码";
|
|
||||||
button.classList.remove("copied");
|
|
||||||
}, 1500);
|
|
||||||
});
|
|
||||||
|
|
||||||
pre.appendChild(button);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
addCodeCopyButtons();
|
|
||||||
document.addEventListener("astro:page-load", addCodeCopyButtons);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<Header />
|
<Header />
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ const pageTitle = lang === "zh" ? "标签索引" : "Tag Index";
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
font-family:
|
font-family:
|
||||||
"Noto Sans SC",
|
|
||||||
system-ui,
|
system-ui,
|
||||||
-apple-system,
|
-apple-system,
|
||||||
BlinkMacSystemFont,
|
BlinkMacSystemFont,
|
||||||
|
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
pre {
|
|
||||||
padding: 1rem;
|
|
||||||
border-radius: 3px;
|
|
||||||
overflow-x: auto;
|
|
||||||
line-height: 1.6;
|
|
||||||
margin: 1rem 0;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* pre:has(> .code-copy-button) {
|
|
||||||
padding-top: 2.75rem;
|
|
||||||
} */
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: "Maple Mono", monospace;
|
|
||||||
font-size: 0.96rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 行内代码 */
|
|
||||||
p code,
|
|
||||||
li code,
|
|
||||||
blockquote code,
|
|
||||||
td code {
|
|
||||||
padding: 0.15em 0.4em;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
background: rgba(127, 127, 127, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-copy-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 0.5rem;
|
|
||||||
right: 0.5rem;
|
|
||||||
z-index: 2;
|
|
||||||
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
width: 2rem;
|
|
||||||
height: 2rem;
|
|
||||||
padding: 0.35rem;
|
|
||||||
|
|
||||||
border-top: 1px dotted var(--deep-blue);
|
|
||||||
border-left: 1px dotted var(--deep-blue);
|
|
||||||
border-right: 2px solid var(--deep-blue);
|
|
||||||
border-bottom: 2px solid var(--deep-blue);
|
|
||||||
border-radius: 3px;
|
|
||||||
|
|
||||||
background: rgba(250, 250, 250, 0.7);
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
transition:
|
|
||||||
transform 0.15s ease,
|
|
||||||
background-color 0.15s ease,
|
|
||||||
box-shadow 0.15s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-copy-icon {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-copy-button:hover {
|
|
||||||
background: rgb(250, 250, 250, 0.9);
|
|
||||||
transform: translate(-1px, -1px);
|
|
||||||
box-shadow: 3px 4px 8px rgb(0 0 0 / 18%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-copy-button:active {
|
|
||||||
transform: translate(0, 0);
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code-copy-button.copied {
|
|
||||||
background: #dcebd5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* .dark .code-copy-button {
|
|
||||||
border-color: #9ecbff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark .code-copy-button:hover {
|
|
||||||
box-shadow: 3px 4px 8px rgb(0 0 0 / 35%);
|
|
||||||
} */
|
|
||||||
|
|
@ -5,8 +5,29 @@
|
||||||
@import "./variables.css";
|
@import "./variables.css";
|
||||||
@import "./dialog.css";
|
@import "./dialog.css";
|
||||||
@import "./posts.css";
|
@import "./posts.css";
|
||||||
@import "./code.css";
|
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
overflow-x: auto;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: "Maple Mono", monospace;
|
||||||
|
font-size: 0.96rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 行内代码 */
|
||||||
|
p code,
|
||||||
|
li code,
|
||||||
|
blockquote code,
|
||||||
|
td code {
|
||||||
|
padding: 0.15em 0.4em;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
background: rgba(127, 127, 127, 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
article svg.flowchart,
|
article svg.flowchart,
|
||||||
article svg[class*="flowchart"],
|
article svg[class*="flowchart"],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue