From 7d7b2b147bd54265f5ecb6bb01e2dccfabb93ba7 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sat, 6 Dec 2025 16:57:57 +0100 Subject: [PATCH] vault backup: 2025-12-06 16:57:57 --- .../Elektrontransportkedjan/Provfrågor.md | 9 ++ wip/static.py | 7 ++ wip/templates/base.html | 113 ++++++++++++++++- wip/test.html | 116 ++++++++++++++++-- 4 files changed, 228 insertions(+), 17 deletions(-) diff --git a/content/Biokemi/Metabolism/Elektrontransportkedjan/Provfrågor.md b/content/Biokemi/Metabolism/Elektrontransportkedjan/Provfrågor.md index 36468ee..1340c43 100644 --- a/content/Biokemi/Metabolism/Elektrontransportkedjan/Provfrågor.md +++ b/content/Biokemi/Metabolism/Elektrontransportkedjan/Provfrågor.md @@ -6,3 +6,12 @@ tags: föreläsare: Ingela Parmryd date: 2025-12-05 --- + +```dataviewjs +for (const path of dv.pagePaths("#provfråga and #elektrontransportkedjan")) { + dv.span(" \n[[" + path + "]]\n") + const content = await dv.io.load(path) + dv.span(content) + dv.span(" \n \n-----\n\n\n") +} +``` \ No newline at end of file diff --git a/wip/static.py b/wip/static.py index f59815b..4d95812 100644 --- a/wip/static.py +++ b/wip/static.py @@ -41,6 +41,13 @@ env.filters["markdown"] = m.convert output = root_dir / "test.html" template = env.get_template("base.html") +def out_content(self): + content = note.content + if content.startswith("---\n"): + content = content.split("---\n", 2)[2] + return content + +note.__class__.our_content = property(out_content) with output.open("w", encoding="utf-8") as f: data = template.render(note=note, vault=vault) f.write(data) diff --git a/wip/templates/base.html b/wip/templates/base.html index f910bf1..a919395 100644 --- a/wip/templates/base.html +++ b/wip/templates/base.html @@ -2,14 +2,119 @@ {{note.title}}

{{note.title}}

-{{note.content | markdown}} +{{note.frontmatter}} +{{note.our_content | markdown}} \ No newline at end of file diff --git a/wip/test.html b/wip/test.html index df45ebc..c702fb0 100644 --- a/wip/test.html +++ b/wip/test.html @@ -2,22 +2,113 @@ +/* Root scales + light/dark system colors */ +:root { + color-scheme: light dark; + --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; + --font-mono: ui-monospace, "SF Mono", Menlo, monospace; + --max-width: 70ch; + --line-height: 1.6; + --space: 1.25rem; + --radius: 6px; +} + +body { + margin: 0 auto; + max-width: var(--max-width); + padding: calc(var(--space) * 1.2); + font-family: var(--font-body); + line-height: var(--line-height); + font-size: 1rem; + word-wrap: break-word; + text-rendering: optimizeLegibility; +} + +/* Color auto-adjusts with system theme */ +@media (prefers-color-scheme: light) { + body { background: #fafafa; color: #222; } + a { color: #0645ad; } + code, pre { background: #f0f0f0; } + hr { border-color: #ddd; } +} +@media (prefers-color-scheme: dark) { + body { background: #111; color: #ddd; } + a { color: #7bbaff; } + code, pre { background: #222; } + hr { border-color: #333; } +} + +p, ul, ol, blockquote, pre, table { + margin: var(--space) 0; +} + +/* Headings: predictable rhythm, not oversized */ +h1, h2, h3, h4, h5, h6 { + line-height: 1.25; + margin: calc(var(--space) * 1.6) 0 var(--space); + font-weight: 600; +} +h1 { font-size: 1.8rem; } +h2 { font-size: 1.45rem; } +h3 { font-size: 1.25rem; } +h4 { font-size: 1.1rem; } +h5, h6 { font-size: 1rem; } + +/* Lists */ + +/* Code */ +code, pre { + font-family: var(--font-mono); + font-size: 0.9rem; + border-radius: var(--radius); +} +pre { + padding: 0.75rem 1rem; + overflow-x: auto; +} + +/* Tables */ +table { + width: 100%; + border-collapse: collapse; + font-size: 0.95rem; +} +th, td { + padding: 0.5rem 0.75rem; + border: 1px solid currentcolor; + border-opacity: 0.2; +} +th { font-weight: 600; } + +/* Blockquotes */ +blockquote { + padding: 0.75rem 1rem; + border-inline-start: 4px solid currentcolor; + border-opacity: 0.4; + opacity: 0.9; +} + +/* Images & media */ +img, video { + max-width: 100%; + height: auto; + display: block; + border-radius: var(--radius); + margin: var(--space) 0; +} + +/* Horizontal rule */ +hr { + margin: calc(var(--space) * 2) 0; + border: none; + border-bottom: 1px solid; + opacity: 0.2; +} Anteckningar

Anteckningar

-
-

föreläsare: Ingela Parmryd -tags: - - biokemi - - anteckningar - - transport-över-cellmembran -date: 2025-11-25

-
+{'föreläsare': 'Ingela Parmryd', 'tags': ['biokemi', 'anteckningar', 'transport-över-cellmembran'], 'date': datetime.date(2025, 11, 25)}

Diffusion är något INTE behöver hjälp Passiv vs Aktiv transport Faciliterad diffusion

@@ -282,6 +373,5 @@ kanalfogar binder ihop små celler, t.ex. näring i benceller Jongradienter Na/Kalium mkt inne/ut på av ATPaset-pump ABC kräver 2 ATP fosfo+defosfo MDR inblandat i pumpar

-

\ No newline at end of file