Compare commits

...

3 Commits

Author SHA1 Message Date
urosm a49aa19478 intro 2024-09-01 17:34:19 +02:00
urosm e341eb6bbc bavbavhaus: implement verso and recto iframes 2024-09-01 17:33:38 +02:00
urosm d886f42ffc css: split style and landing layout 2024-09-01 17:30:44 +02:00
15 changed files with 81 additions and 376 deletions

5
.gitignore vendored
View File

@ -1,4 +1,3 @@
*.bak
public_html/*.html
public_html/*.html.part
public_html/*.d
/public_html/*.html
!/public_html/index.html

View File

@ -2,36 +2,21 @@
notes := $(wildcard *.md)
pages := $(patsubst %.md,public_html/%.html,$(notes))
parts := $(patsubst %.md,public_html/%.html.part,$(notes))
preqs := $(patsubst %.md,public_html/%.html.d,$(notes))
static := public_html/index.html
all: $(pages)
PANDOCFLAGS := --data-dir pandoc
BAVBAVHAUSFLAGS = $(PANDOCFLAGS) -M slug=$*
BAVBAVHAUSFLAGS:= --data-dir pandoc -d bavbavhaus.net.yaml
public_html/%.html: %.md
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.yaml $< | sed 's/↩︎/[\&#8288;\&lt;\&#8288;-\&#8288;]/g' > $@
pandoc $(BAVBAVHAUSFLAGS) -o $@ $<
$(pages): pandoc/templates/bavbavhaus.net.html5
public_html/%.html.part: %.md
pandoc $(BAVBAVHAUSFLAGS) -d bavbavhaus.net.part.yaml --id-prefix $* -o $@ $<
$(parts): pandoc/templates/bavbavhaus.net.part.html5
public_html/%.html.d: %.md
pandoc lua dependencies.lua $< > $@
include $(preqs)
clean: oldpages := $(filter-out $(pages),$(wildcard public_html/*.html))
clean: oldparts := $(filter-out $(parts),$(wildcard public_html/*.html.part))
clean: oldpreqs := $(filter-out $(preqs),$(wildcard public_html/*.html.d))
clean: oldpages := $(filter-out $(static) $(pages),$(wildcard public_html/*.html))
clean:
$(if $(oldpages),$(RM) $(filter-out $(pages),$(wildcard public_html/*.html)))
$(if $(oldparts),$(RM) $(filter-out $(parts),$(wildcard public_html/*.html.part)))
$(if $(oldpreqs),$(RM) $(filter-out $(preqs),$(wildcard public_html/*.html.d)))
$(if $(oldpages),$(RM) $(oldpages))
.PHONY: all clean

View File

@ -5,6 +5,8 @@ index: true
> Odkrivanje zatona arhitektov kot aktivnih ideologov, spoznanje o ogromnih tehnoloških zmožnostih racionalizacije mesta in ozemlja skupaj z vsakodnevnimi ugotovitvami o njihovi brezkoristnosti ter zastaranje specifičnih metod projektiranja, še preden so njihove hipoteze lahko preverjene v realnosti, za arhitekte tvorijo tesnobno vzdušje, ki na obzorju ponuja vpogled na zelo konkretno ozadje, zastrašujoče kot največje zlo ... [@tafuri1969peruna, 77]
---
*bavbavhaus.net* je poskus hekanja prokrastinacije in sploščitve nekaterih idej o ["sanjskem datotečnem formatu"](neusmerjeno_pisanje.md) v enostaven sistem povezanih in vzporednih zapiskov okoli teme [arhitekturnega dela in kapitalističnega razvoja](arhitekturno_delo_in_kapitalisticni_razvoj.md).
---

View File

@ -1,12 +0,0 @@
---
from: markdown
toc: true
citeproc: true
csl: chicago-fullnote-sl
template: bavbavhaus.net.part.html5
to: html5
filters:
- localize_quotes.lua
- resolve_internal_links.part.lua
- link_headings.lua
...

View File

@ -7,7 +7,6 @@ template: bavbavhaus.net.html5
to: html5
filters:
- localize_quotes.lua
- collect_internal_linked.lua
- resolve_internal_links.lua
- link_headings.lua
...

View File

@ -1,38 +0,0 @@
SCRIPT_NAME = "collect_internal_linked.lua"
os.setlocale("C")
local RawBlock = pandoc.RawBlock
local parts = pandoc.MetaList({})
local visited = {}
return {
{ Link = function(link)
-- early return for external links
if link.target:find("^https?%:%/%/") then return end
if link.target:find("^mailto%:") then return end
local fp, anchor = link.target:match("^(.+%.md)#?(.*)$")
-- early return for non markdown files
if not fp then return end
-- early return for visited
if visited[fp] then return end
visited[fp] = true
local f = io.open(fp)
-- early return for broken internal links
if f == nil then return link.content else f:close() end -- @todo maybe log broken internal links
local part_fp = fp:gsub("^(.+)%.md$", "public_html/%1.html.part")
local f = assert(io.open(part_fp), "\n" ..
"[ERROR] could not open " .. part_fp .. " for reading.")
local rawblock = RawBlock(FORMAT, f:read("a")); f:close()
parts:insert(rawblock)
end },
{ Meta = function (meta)
meta["parts"] = parts
return meta
end }
}

View File

@ -6,7 +6,7 @@ local Inlines = pandoc.Inlines
return {
{ Link = function(l)
-- early return for external links
if l.target:find("^https?%:%/%/") then return end
if l.target:find("^https?%:%/%/") then return end -- @todo resolve external links
if l.target:find("^mailto%:") then return end
local fp, slug, anchor = l.target:match("^((.+)%.md)#?(.*)$")
@ -17,7 +17,8 @@ return {
-- early return for broken internal links
if f == nil then return l.content else f:close() end -- @todo maybe log broken internal links
l.target = ("#%s%s"):format(slug, anchor)
l.target = ("%s.html#%s"):format(slug, anchor)
l.attributes.target = "internal"
return l
end }

View File

@ -1,29 +0,0 @@
SCRIPT_NAME = "resolve_internal_links.lua"
os.setlocale("C")
local Inlines = pandoc.Inlines
local page_slug
return {
{ Meta = function(meta)
page_slug = meta["slug"]
end },
{ Link = function(l)
-- early return for external links
if l.target:find("^https?%:%/%/") then return end
if l.target:find("^mailto%:") then return end
local fp, slug, anchor = l.target:match("^((.+)%.md)#?(.*)$")
-- early return for non markdown files
if not fp then return end
local f = io.open(fp)
-- early return for broken internal links
if f == nil then return l.content else f:close() end -- @todo maybe log broken internal links
l.target = ("%s.html#%s%s"):format(page_slug, slug, anchor)
return l
end }
}

View File

@ -15,15 +15,14 @@ $else$
<meta name="description" content="bavbavhaus.net" />
$endif$
<title>$pagetitle$, bavbavhaus.net</title>
<link rel="icon" href="favicon.svg" />
<link rel="stylesheet" media="screen" href="css/style.css" />
<link rel="stylesheet" media="print" href="css/print.css" />
<script src="js/resolve_internal_links.js"></script>
</head>
<body$if(slug)$ id="$slug$"$endif$>
<body$if(sourcefile)$ id="$sourcefile$"$endif$>
<main>
<article id="verso" class="post">
<article class="post">
<header>
<h1>$if(index)$$else$<a href="index.html">bavbavhaus.net</a>/$endif$<a href="$slug$.html">$pagetitle$</a></h1>
<h1>$pagetitle$</h1>
</header>
<div class="content">
$if(description)$
@ -47,12 +46,6 @@ $abstract$
$endif$
$body$
</article>
<article id="recto">
$for(parts)$
$it$
$endfor$
</div>
</article>
</main>
</body>
</html>

View File

@ -1,27 +0,0 @@
<article$if(slug)$ id="$slug$"$endif$ class="post tail">
<header>
<h1><a href="$slug$.html">$pagetitle$</a></h1>
</header>
<div class="content">
$if(description)$
<div class="description">
$description$
</div>
$endif$
$if(toc)$
<nav>
$if(toc-title)$
<h2>$toc-title$</h2>
$endif$
$table-of-contents$
</nav>
$endif$
$if(abstract)$
<div class="abstract">
<h2 class="abstract-title">$abstract-title$</h2>
$abstract$
</div>
$endif$
$body$
</div>
</article>

View File

@ -0,0 +1,27 @@
/*
* css styling for bavbavhaus.net index
*/
/* layout */
body {
width: round(down, min(160ch, 100vw), 2ch);
height: round(down, 100vh, 1rlh);
margin-left: auto;
margin-right: auto;
padding-top: 1rlh;
padding-bottom: 1rlh;
}
body>main {
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
}
body>main>iframe {
width: 100%;
height: 100%;
}

View File

@ -1,188 +0,0 @@
/*
* css styling for bavbavhaus.net
*
* A print stylesheet for html generated by `pandoc`.
*
*/
@page {
size: 210mm 297mm;
margin: 24.75mm 26.25mm 49.50mm;
}
/* reset */
:root {
box-sizing: border-box;
text-size-adjust: none;
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
}
*,
*::before,
*::after {
box-sizing: inherit;
margin: 0;
padding: 0;
}
/* root, * */
:root {
font: 12pt/1.25 serif;
}
*,
*::before,
*::after {
color: inherit;
font: inherit;
}
/* blocks */
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
font-weight: bold;
}
h1 {
font-size: 2rem;
text-align: center;
}
h2::before { content: "## "; }
h3::before { content: "### "; }
h4::before { content: "#### "; }
h5::before { content: "##### "; }
h6::before { content: "###### "; }
article :is(h1, h2, h3, h4, h5, h6) {
margin-top: 2rem;
}
article :is(blockquote, dl, div, figure, hr, menu, ol, p, pre, ul) {
margin-top: 1rem;
}
article :is(blockquote, div)>:is(blockquote, div, figure, hr, menu, ol, p, pre, ul):first-child {
margin-top: unset;
}
blockquote,
figcaption {
margin-left: 2rem;
margin-right: 2rem;
}
dt {
font-style: italic;
}
figure {
display: grid;
grid-template-rows: round(down, calc(min(160ch, 100vw)/2), 1rlh) auto;
}
figure img {
place-self: center;
}
hr {
color: unset;
border: unset;
text-align: center;
}
hr::after {
content: "***";
}
:is(ol, ul, menu, dd, li) :is(blockquote, div, figure, hr, menu, ol, p, pre, ul) {
margin-top: unset;
}
ol {
padding-left: 2rem;
}
ul, menu {
padding-left: 2rem;
}
li p + p {
text-indent: 4ch;
}
p {
text-align: justify;
hyphens: auto;
}
pre {
padding-left: 4ch;
}
img, svg {
max-width: 100%;
max-height: 100%;
display: block;
}
.math.diplay {
display: block;
text-align: center;
}
/* inlines */
a {
text-decoration: unset;
}
code {
font-family: monospace;
}
em {
font-style: italic;
}
mark {
text-decoration: underline solid inherit 1pt;
}
strong {
font-weight: bold;
}
sup, sub {
font-size: unset;
vertical-align: unset;
line-height: 0;
}
sup::before {
content: "^";
}
sub::before {
content: "_";
}
u {
text-decoration: underline wavy var(--red) 1pt;
}
/* layout */
main>article#recto {
display: none;
}
/* div.horizontal */
div.horizontal>*:not(:first-child) {
display: none;
}

View File

@ -6,10 +6,11 @@
*
*/
/* variables */
:root {
--font-size: 9pt;
--font-size: 12pt;
--line-height: 1.25;
--font-family: monospace;
@ -56,6 +57,7 @@
box-sizing: inherit;
margin: 0;
padding: 0;
border: 0;
}
@ -211,7 +213,6 @@ pre::after {
color: var(--md-formatting-color);
}
img, svg {
max-width: 100%;
max-height: 100%;
@ -360,49 +361,6 @@ table caption::before {
}
/* layout */
body {
width: round(down, min(160ch, 100vw), 2ch);
height: round(down, 100vh, 1rlh);
margin-left: auto;
margin-right: auto;
padding-top: 1rlh;
padding-bottom: 1rlh;
}
main {
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
}
main>article#recto {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 100%;
overflow-x: scroll;
scroll-snap-type: inline proximity;
}
main>article#recto>* {
scroll-snap-align: end;
}
main>article#verso,
main>article#recto>article.post {
height: 100%;
display: grid;
grid-template-rows: auto 1fr;
overflow: hidden;
}
main>article#verso>div.content,
main>article#recto>article.post>div.content {
overflow-y: scroll;
}
/* footnotes */
a.footnote-ref sup::before {
@ -466,3 +424,9 @@ div.horizontal>* {
text-decoration: underline wavy var(--red) 1pt;
}
/* layout */
article.post {
max-width: 80ch;
}

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
lang="sl"
xml:lang="sl"
>
<head>
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="bavbavhaus.net" />
<title>bavbavhaus.net</title>
<link rel="icon" href="favicon.svg" />
<link rel="stylesheet" media="screen" href="css/style.css" />
<link rel="stylesheet" media="screen" href="css/index.css" />
</head>
<body id="index">
<main>
<iframe name="verso" src="intro.html"></iframe>
<iframe name="recto"></iframe>
</main>
</body>
</html>

View File

@ -0,0 +1,6 @@
document.addEventListener("click", e => {
const anchor = e.target.closest("a[target=\"internal\"");
if (anchor && window.name != "") {
anchor.target = window.name === "verso" ? "recto" : "verso";
}
});