Theme refactor: shared base.css + palette-only themes (minified); template P4/P5/P7/P11 skip-link; per-image alt; system theme default
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/*
|
||||
* Tokyo Night palette overrides (share) — variables + color-specific components.
|
||||
* Layout/components live in blog_share_base.css (loaded alongside this file).
|
||||
*/
|
||||
|
||||
/*
|
||||
* Tokyo Night Share Theme (light/dark)
|
||||
* Based on tokyonight.nvim (https://github.com/folke/tokyonight.nvim, Apache-2.0)
|
||||
@@ -50,59 +55,6 @@ body {
|
||||
font-family: "Inter", "Montserrat", "Lucida Grande", "Lucida Sans Unicode", arial, sans-serif;
|
||||
}
|
||||
|
||||
/* ---------- Header: Logo durch Laptop-Emoji ---------- */
|
||||
#header-logo img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#header-logo::before {
|
||||
content: "💻";
|
||||
font-size: 1.5em;
|
||||
line-height: 1;
|
||||
margin-right: 8px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* ---------- Buy Me a Coffee (original, lokal) ---------- */
|
||||
@font-face {
|
||||
font-family: "Cookie";
|
||||
src: url(/api/notes/__COOKIE_FONT_ID__/download) format("woff2");
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
#bmc-links {
|
||||
margin-top: auto;
|
||||
padding: 8px 25px 4px;
|
||||
background: var(--background-secondary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.bmc-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 4px 6px 4px 24px;
|
||||
border-radius: 6px;
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
font-size: 0.9em;
|
||||
transition: background-color 150ms ease, color 150ms ease;
|
||||
}
|
||||
|
||||
.bmc-link:hover {
|
||||
background: var(--background-highlight);
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bmc-link .tn-icon {
|
||||
color: var(--text-link);
|
||||
}
|
||||
|
||||
/* ---------- Menu: wie Footer-Links gestalten ---------- */
|
||||
#menu a {
|
||||
color: var(--text-heading);
|
||||
@@ -197,131 +149,6 @@ body {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* ---------- Reading time ---------- */
|
||||
.reading-time {
|
||||
font-size: 0.8em;
|
||||
color: var(--text-menu);
|
||||
margin: -0.9em 0 1.25em;
|
||||
}
|
||||
|
||||
/* ---------- Blog pagination ---------- */
|
||||
.blog-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin: 1.5em 0 0;
|
||||
padding-top: 1em;
|
||||
border-top: 1px solid var(--background-highlight);
|
||||
}
|
||||
|
||||
.blog-pagination .blog-page-num {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-menu);
|
||||
}
|
||||
|
||||
/* ---------- Share footer navigation (built-in prev/next) ausblenden ---------- */
|
||||
#content-footer .navigation {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ---------- Prev/Next ---------- */
|
||||
.blog-prevnext {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin: 1.5em 0 0;
|
||||
padding-top: 1em;
|
||||
border-top: 1px solid var(--background-highlight);
|
||||
}
|
||||
|
||||
.blog-pn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
max-width: 45%;
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
transition: color 150ms ease;
|
||||
}
|
||||
|
||||
.blog-pn.next {
|
||||
margin-left: auto;
|
||||
align-items: flex-end;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.blog-pn-label {
|
||||
font-size: 0.72em;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--text-menu);
|
||||
}
|
||||
|
||||
.blog-pn:hover {
|
||||
color: var(--text-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.blog-pn.empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ---------- Search ---------- */
|
||||
.blog-search {
|
||||
margin: 0.5em 0 1em;
|
||||
}
|
||||
|
||||
.blog-search-input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 14px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--background-highlight);
|
||||
background: var(--background-secondary);
|
||||
color: var(--text-heading);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.blog-search-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--text-link);
|
||||
}
|
||||
|
||||
.blog-search-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 1em 0 0;
|
||||
}
|
||||
|
||||
.blog-search-hit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--background-highlight);
|
||||
background: var(--blog-card-bg);
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
margin-bottom: 8px;
|
||||
transition: border-color 150ms ease;
|
||||
}
|
||||
|
||||
.blog-search-hit:hover {
|
||||
border-color: var(--text-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.blog-search-path {
|
||||
font-size: 0.8em;
|
||||
color: var(--text-menu);
|
||||
}
|
||||
|
||||
.blog-search-none {
|
||||
color: var(--text-menu);
|
||||
}
|
||||
|
||||
/* ---------- Header-Suche (ersetzt eingebaute) ---------- */
|
||||
.search-item {
|
||||
position: relative;
|
||||
@@ -557,137 +384,6 @@ html.theme-light body.is-garden #content h1#title {
|
||||
border-bottom-color: rgba(160, 166, 194, 0.40) !important;
|
||||
}
|
||||
|
||||
/* ---------- Blog index (generated article list) ---------- */
|
||||
.blog-post {
|
||||
padding: 1.2em 1.4em;
|
||||
margin-bottom: 1.25em;
|
||||
border: 1px solid var(--background-highlight);
|
||||
border-radius: 10px;
|
||||
background: var(--blog-card-bg);
|
||||
transition: border-color 150ms ease, box-shadow 150ms ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blog-post:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.blog-post:hover {
|
||||
border-color: var(--text-link);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
|
||||
#content .blog-post:first-of-type {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
/* ---------- Blog post thumbnails (Bild links, Teaser rechts) ---------- */
|
||||
.blog-post-inner {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.blog-thumb-link {
|
||||
flex: 0 0 auto;
|
||||
width: min(256px, 35%);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.blog-thumb {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-height: 256px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--background-highlight);
|
||||
}
|
||||
|
||||
.blog-post-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.blog-post-title {
|
||||
margin: 0 0 0.25em;
|
||||
}
|
||||
|
||||
.blog-post-title a {
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
transition: color 150ms ease;
|
||||
}
|
||||
|
||||
.blog-post-title a:hover {
|
||||
color: var(--text-link);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.blog-post-meta {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
font-size: 0.85em;
|
||||
color: var(--text-menu);
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.blog-post-date {
|
||||
font-variant-numeric: tabular-nums;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.blog-post-category {
|
||||
background: var(--background-highlight);
|
||||
border-radius: 8px;
|
||||
padding: 1px 10px;
|
||||
color: var(--text-heading);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.blog-post-summary {
|
||||
margin: 0 0 0.5em;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.blog-post-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 0.78em;
|
||||
color: var(--text-link);
|
||||
background: var(--background-secondary);
|
||||
border: 1px solid var(--background-highlight);
|
||||
border-radius: 8px;
|
||||
padding: 1px 8px;
|
||||
}
|
||||
|
||||
a.tag {
|
||||
text-decoration: none;
|
||||
transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
|
||||
}
|
||||
|
||||
a.tag:hover {
|
||||
background: var(--background-highlight);
|
||||
border-color: var(--text-link);
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* ---------- Article meta (date/category on individual pages) ---------- */
|
||||
.article-meta {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
font-size: 0.9em;
|
||||
color: var(--text-menu);
|
||||
margin-bottom: 1em;
|
||||
padding-bottom: 1em;
|
||||
border-bottom: 1px solid var(--background-highlight);
|
||||
}
|
||||
|
||||
/* ---------- Headings (h2-h6) - Harbor header boxes ---------- */
|
||||
html.theme-dark {
|
||||
--header-h2-bg: rgba(122, 162, 247, 0.30);
|
||||
@@ -805,16 +501,6 @@ html.theme-light #content code {
|
||||
border-color: #9aa5ce;
|
||||
}
|
||||
|
||||
/* ---------- Eingebettete Bilder: Radius wie Code-Blöcke (8px) ---------- */
|
||||
#content figure.image {
|
||||
margin: 1.25em auto;
|
||||
}
|
||||
|
||||
#content figure img,
|
||||
#content img:not(.blog-thumb) {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* ---------- 3D model viewer (STL / STEP) ---------- */
|
||||
.model-viewer {
|
||||
position: relative;
|
||||
@@ -1030,6 +716,7 @@ html.theme-light .model-viewer-progress-fill {
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ---------- Light mode: Harbor light highlighter ---------- */
|
||||
html.theme-light .hljs,
|
||||
html.theme-light pre code.hljs {
|
||||
@@ -1105,6 +792,7 @@ html.theme-light .hljs-tag {
|
||||
html.theme-light .hljs-meta .hljs-string {
|
||||
color: #a0a6c2;
|
||||
}
|
||||
|
||||
/* ---------- Admonitions (Trilium-style, gefüllt) ---------- */
|
||||
.admonition {
|
||||
--accent-color: var(--background-highlight);
|
||||
@@ -1161,6 +849,7 @@ html.theme-light .admonition.warning { --admonition-bg: rgba(177, 92, 0, 0.20);
|
||||
.admonition.important::before { content: "\ea7c"; }
|
||||
.admonition.caution::before { content: "\eac7"; }
|
||||
.admonition.warning::before { content: "\eac5"; }
|
||||
|
||||
/* ---------- Tables (Harbor, theme-aware) ---------- */
|
||||
html.theme-dark {
|
||||
--table-header-bg: rgba(122, 162, 247, 0.20);
|
||||
@@ -1253,59 +942,7 @@ html.theme-light {
|
||||
#content table thead th.col-hover {
|
||||
background-color: rgba(122, 162, 247, 0.18) !important;
|
||||
}
|
||||
/* ---------- Category subcategories ---------- */
|
||||
.blog-subcategories {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin: 0 0 1.25em;
|
||||
}
|
||||
|
||||
.blog-subcategory {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: var(--background-secondary);
|
||||
border: 1px solid var(--background-highlight);
|
||||
border-radius: 8px;
|
||||
padding: 4px 12px;
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
transition: background-color 150ms ease, border-color 150ms ease;
|
||||
}
|
||||
|
||||
.blog-subcategory i {
|
||||
color: var(--text-link);
|
||||
}
|
||||
|
||||
.blog-subcategory:hover {
|
||||
background: var(--background-highlight);
|
||||
border-color: var(--text-link);
|
||||
color: var(--text-heading);
|
||||
text-decoration: none;
|
||||
}
|
||||
/* ---------- Digital Garden note table ---------- */
|
||||
.blog-garden-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.blog-garden-table tbody td:first-child {
|
||||
background: transparent !important;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.note-type {
|
||||
display: inline-block;
|
||||
font-size: 0.8em;
|
||||
padding: 2px 10px;
|
||||
border-radius: 8px;
|
||||
background: var(--background-highlight);
|
||||
color: var(--text-heading);
|
||||
font-weight: 600;
|
||||
text-transform: capitalize;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* ---------- Digital Garden rows: clickable + sage hover ---------- */
|
||||
.blog-garden-table tbody tr {
|
||||
cursor: pointer;
|
||||
@@ -1427,6 +1064,7 @@ html.theme-light .note-state.state-unknown {
|
||||
html.theme-light .note-state.state-unknown i {
|
||||
color: #e1e2e7;
|
||||
}
|
||||
|
||||
/* ---------- Code notes: always Harbordark like code boxes ---------- */
|
||||
#content.type-code pre {
|
||||
background-color: #1a1b26 !important;
|
||||
@@ -1452,69 +1090,7 @@ html.theme-light #content.type-code pre {
|
||||
html.theme-light #content.type-code code {
|
||||
color: #3760bf;
|
||||
}
|
||||
/* ---------- Code: line numbers + copy button ---------- */
|
||||
pre.code-processed {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
pre.code-processed .code-wrap {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow-x: auto;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
pre.code-processed .code-wrap code {
|
||||
display: block;
|
||||
line-height: inherit;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
pre.code-processed .code-lines {
|
||||
flex-shrink: 0;
|
||||
user-select: none;
|
||||
text-align: right;
|
||||
padding: 0 12px 0 0;
|
||||
margin: 0 12px 0 0;
|
||||
border-right: 1px solid var(--background-highlight);
|
||||
color: var(--text-menu);
|
||||
white-space: pre;
|
||||
font-family: "JetBrains Mono", Consolas, monospace;
|
||||
font-size: 1em;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
pre.code-processed .code-copy-btn,
|
||||
.mermaid-source pre .code-copy-btn {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
z-index: 2;
|
||||
font-size: 0.75em;
|
||||
padding: 2px 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--background-highlight);
|
||||
background: var(--background-secondary);
|
||||
color: var(--text-heading);
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
transition: opacity 150ms ease;
|
||||
}
|
||||
|
||||
pre.code-processed:hover .code-copy-btn,
|
||||
.mermaid-source pre:hover .code-copy-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
pre.code-processed .code-copy-btn:hover,
|
||||
.mermaid-source pre .code-copy-btn:hover {
|
||||
border-color: var(--text-link);
|
||||
opacity: 1;
|
||||
}
|
||||
/* ---------- highlight.js line numbers ---------- */
|
||||
#content .hljs-ln {
|
||||
border-collapse: collapse;
|
||||
@@ -1573,29 +1149,6 @@ html.theme-light #content .hljs-ln tbody tr:hover td.col-hover {
|
||||
white-space: pre;
|
||||
vertical-align: top;
|
||||
}
|
||||
/* ---------- Scrollbars (Harbor) ---------- */
|
||||
::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--scrollbar-track);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--scrollbar-thumb);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--scrollbar-hover);
|
||||
}
|
||||
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
||||
}
|
||||
|
||||
/* ---------- Code boxes: scrollbars ---------- */
|
||||
pre,
|
||||
@@ -1886,24 +1439,9 @@ html.theme-light .mermaid svg .cluster-label text {
|
||||
fill: #a0a6c2 !important;
|
||||
color: #a0a6c2 !important;
|
||||
}
|
||||
|
||||
/* ---------- G-code / Zusatz-Scopes (name = G/M-Codes, attr = Parameter) ---------- */
|
||||
.hljs-name { color: #e0af68; }
|
||||
.hljs-attr { color: #a9b1d6; }
|
||||
html.theme-light .hljs-name { color: #2e7de9; }
|
||||
html.theme-light .hljs-attr { color: #a0a6c2; }
|
||||
/* ---------- Mobile: Menu always on top (above 3D viewer overlays) ---------- */
|
||||
@media (max-width: 48em) {
|
||||
#left-pane,
|
||||
#toc-pane {
|
||||
z-index: 1000;
|
||||
}
|
||||
#header {
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
||||
}
|
||||
/* ---------- Palette preview images: subtle frame so bars stay visible on any background ---------- */
|
||||
#content figure.image img.palette-img {
|
||||
border: 1px solid var(--background-highlight);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user