431 lines
9.6 KiB
HTML
431 lines
9.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
|
<title>{{ title }} — {{ config.site.name }}</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css">
|
|
<style>
|
|
html { background: #21222c; }
|
|
:root {
|
|
--bg: #282a36;
|
|
--bg-lighter: #343746;
|
|
--bg-darker: #21222c;
|
|
--selection: #44475a;
|
|
--comment: #6272a4;
|
|
--fg: #f8f8f2;
|
|
--cyan: #8be9fd;
|
|
--green: #50fa7b;
|
|
--orange: #ffb86c;
|
|
--pink: #ff79c6;
|
|
--purple: #bd93f9;
|
|
--red: #ff5555;
|
|
--yellow: #f1fa8c;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--bg-darker);
|
|
color: var(--fg);
|
|
font-family: "Inter", system-ui, sans-serif;
|
|
font-size: 24px;
|
|
line-height: 1.7;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.layout {
|
|
display: grid;
|
|
grid-template-columns: 260px 1fr;
|
|
grid-template-rows: auto 1fr auto;
|
|
grid-template-areas:
|
|
"header header"
|
|
"sidebar main"
|
|
"footer footer";
|
|
min-height: 100vh;
|
|
}
|
|
|
|
header {
|
|
grid-area: header;
|
|
background: var(--bg);
|
|
border-bottom: 1px solid var(--selection);
|
|
padding: 0 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
height: 56px;
|
|
}
|
|
|
|
.site-name {
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 20px;
|
|
color: var(--purple);
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.site-name span {
|
|
color: var(--comment);
|
|
}
|
|
|
|
.header-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
font-size: 20px;
|
|
color: var(--comment);
|
|
font-family: "Fira Code", monospace;
|
|
}
|
|
|
|
.header-meta .reading-time {
|
|
color: var(--cyan);
|
|
}
|
|
|
|
.header-meta .date {
|
|
color: var(--green);
|
|
}
|
|
|
|
.sidebar {
|
|
grid-area: sidebar;
|
|
background: var(--bg);
|
|
border-right: 1px solid var(--selection);
|
|
padding: 24px 0;
|
|
position: sticky;
|
|
top: 0;
|
|
height: 100vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sidebar-section {
|
|
padding: 0 20px;
|
|
margin-bottom: 28px;
|
|
}
|
|
|
|
.sidebar-label {
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 15px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.15em;
|
|
color: var(--comment);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.tag-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
|
|
.tag {
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 16px;
|
|
padding: 2px 10px;
|
|
border-radius: 999px;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.tag:nth-child(6n+1) { background: rgba(189,147,249,0.2); color: var(--purple); border: 1px solid rgba(189,147,249,0.4); }
|
|
.tag:nth-child(6n+2) { background: rgba(255,121,198,0.2); color: var(--pink); border: 1px solid rgba(255,121,198,0.4); }
|
|
.tag:nth-child(6n+3) { background: rgba(139,233,253,0.2); color: var(--cyan); border: 1px solid rgba(139,233,253,0.4); }
|
|
.tag:nth-child(6n+4) { background: rgba(80,250,123,0.2); color: var(--green); border: 1px solid rgba(80,250,123,0.4); }
|
|
.tag:nth-child(6n+5) { background: rgba(255,184,108,0.2); color: var(--orange); border: 1px solid rgba(255,184,108,0.4); }
|
|
.tag:nth-child(6n+6) { background: rgba(255,85,85,0.2); color: var(--red); border: 1px solid rgba(255,85,85,0.4); }
|
|
|
|
.sidebar-info {
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 18px;
|
|
color: var(--fg);
|
|
line-height: 1.9;
|
|
}
|
|
|
|
.sidebar-info .key {
|
|
color: var(--purple);
|
|
}
|
|
|
|
.sidebar-info .val {
|
|
color: var(--green);
|
|
}
|
|
|
|
.sidebar-info .colon {
|
|
color: var(--pink);
|
|
}
|
|
|
|
.sidebar-divider {
|
|
height: 1px;
|
|
background: var(--selection);
|
|
margin: 0 20px 28px;
|
|
}
|
|
|
|
main {
|
|
grid-area: main;
|
|
padding: 48px 64px;
|
|
max-width: 860px;
|
|
}
|
|
|
|
.post-title {
|
|
font-size: 54px;
|
|
font-weight: 600;
|
|
color: var(--fg);
|
|
line-height: 1.2;
|
|
margin-bottom: 8px;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.title-accent {
|
|
display: block;
|
|
width: 48px;
|
|
height: 3px;
|
|
background: linear-gradient(to right, var(--purple), var(--pink));
|
|
margin-top: 16px;
|
|
margin-bottom: 40px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
.post-content h1 {
|
|
font-size: 42px;
|
|
font-weight: 600;
|
|
color: var(--purple);
|
|
margin-top: 40px;
|
|
margin-bottom: 16px;
|
|
padding-bottom: 8px;
|
|
border-bottom: 1px solid var(--selection);
|
|
}
|
|
|
|
.post-content h2 {
|
|
font-size: 33px;
|
|
font-weight: 600;
|
|
color: var(--pink);
|
|
margin-top: 36px;
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.post-content h3 {
|
|
font-size: 27px;
|
|
font-weight: 500;
|
|
color: var(--cyan);
|
|
margin-top: 28px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.post-content h4 {
|
|
font-size: 24px;
|
|
font-weight: 500;
|
|
color: var(--orange);
|
|
margin-top: 20px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.post-content p {
|
|
margin-bottom: 20px;
|
|
color: var(--fg);
|
|
}
|
|
|
|
.post-content a {
|
|
color: var(--cyan);
|
|
text-decoration: none;
|
|
border-bottom: 1px solid rgba(139,233,253,0.4);
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.post-content a:hover {
|
|
border-color: var(--cyan);
|
|
}
|
|
|
|
.post-content code {
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 21px;
|
|
background: var(--bg);
|
|
color: var(--green);
|
|
padding: 1px 6px;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--selection);
|
|
}
|
|
|
|
.post-content pre {
|
|
background: var(--bg);
|
|
border: 1px solid var(--selection);
|
|
border-left: 3px solid var(--purple);
|
|
border-radius: 6px;
|
|
padding: 20px 24px;
|
|
margin: 24px 0;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.post-content pre code {
|
|
background: none;
|
|
border: none;
|
|
padding: 0;
|
|
color: var(--fg);
|
|
font-size: 21px;
|
|
}
|
|
|
|
.post-content blockquote {
|
|
border-left: 3px solid var(--yellow);
|
|
background: rgba(241,250,140,0.05);
|
|
padding: 16px 20px;
|
|
margin: 24px 0;
|
|
border-radius: 0 6px 6px 0;
|
|
color: var(--yellow);
|
|
font-style: italic;
|
|
}
|
|
|
|
.post-content ul,
|
|
.post-content ol {
|
|
margin: 16px 0 20px 24px;
|
|
}
|
|
|
|
.post-content li {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.post-content ul li::marker {
|
|
color: var(--purple);
|
|
}
|
|
|
|
.post-content ol li::marker {
|
|
color: var(--cyan);
|
|
font-family: "Fira Code", monospace;
|
|
}
|
|
|
|
.post-content table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 24px 0;
|
|
font-size: 21px;
|
|
}
|
|
|
|
.post-content th {
|
|
background: var(--selection);
|
|
color: var(--purple);
|
|
padding: 10px 14px;
|
|
text-align: left;
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 18px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.post-content td {
|
|
border-bottom: 1px solid var(--selection);
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
.post-content tr:hover td {
|
|
background: rgba(68,71,90,0.4);
|
|
}
|
|
|
|
.post-content img {
|
|
max-width: 100%;
|
|
border-radius: 6px;
|
|
border: 1px solid var(--selection);
|
|
}
|
|
|
|
.post-content hr {
|
|
border: none;
|
|
border-top: 1px solid var(--selection);
|
|
margin: 32px 0;
|
|
}
|
|
|
|
footer {
|
|
grid-area: footer;
|
|
background: var(--bg);
|
|
border-top: 1px solid var(--selection);
|
|
padding: 16px 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
font-family: "Fira Code", monospace;
|
|
font-size: 18px;
|
|
color: var(--comment);
|
|
}
|
|
|
|
footer span {
|
|
color: var(--pink);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.layout {
|
|
grid-template-columns: 1fr;
|
|
grid-template-areas:
|
|
"header"
|
|
"main"
|
|
"sidebar"
|
|
"footer";
|
|
}
|
|
|
|
.sidebar {
|
|
position: static;
|
|
height: auto;
|
|
border-right: none;
|
|
border-top: 1px solid var(--selection);
|
|
}
|
|
|
|
main {
|
|
padding: 32px 24px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<a href="/{{ preview_query }}" style="position:fixed;top:calc(1rem + env(safe-area-inset-top, 0px));left:calc(1rem + env(safe-area-inset-left, 0px));z-index:9999;font-family:system-ui,-apple-system,sans-serif;font-size: 1.08rem;padding:0.5rem 0.9rem;background:rgba(255,255,255,0.95);color:#000;text-decoration:none;border-radius:999px;box-shadow:0 2px 8px rgba(0,0,0,0.15);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid rgba(0,0,0,0.1);transition:transform 0.2s">← back</a>
|
|
|
|
<div class="layout">
|
|
<header>
|
|
<div class="site-name">
|
|
<span>// </span>{{ config.site.name }}
|
|
</div>
|
|
<div class="header-meta">
|
|
<span class="date">{{ published_date }}</span>
|
|
<span class="reading-time">{{ reading_time }}</span>
|
|
</div>
|
|
</header>
|
|
|
|
<aside class="sidebar">
|
|
<div class="sidebar-section">
|
|
<div class="sidebar-label">// file info</div>
|
|
<div class="sidebar-info">
|
|
<div><span class="key">author</span><span class="colon">:</span> <span class="val">"{{ config.site.author }}"</span></div>
|
|
<div><span class="key">date</span><span class="colon">:</span> <span class="val">{{ published_date }}</span></div>
|
|
<div><span class="key">read</span><span class="colon">:</span> <span class="val">"{{ reading_time }}"</span></div>
|
|
{% if updated_date %}
|
|
<div><span class="key">updated</span><span class="colon">:</span> <span class="val">{{ updated_date }}</span></div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if taxonomy.tags %}
|
|
<div class="sidebar-divider"></div>
|
|
<div class="sidebar-section">
|
|
<div class="sidebar-label">// tags</div>
|
|
<div class="tag-list">
|
|
{% for tag in taxonomy.tags %}
|
|
<span class="tag">{{ tag }}</span>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</aside>
|
|
|
|
<main>
|
|
<h1 class="post-title">{{ title }}</h1>
|
|
<span class="title-accent"></span>
|
|
<div class="post-content">
|
|
{{ content | safe }}
|
|
</div>
|
|
</main>
|
|
|
|
<footer>
|
|
<span>{{ config.site.name }}</span>
|
|
<span>by <span>{{ config.site.author }}</span></span>
|
|
</footer>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|