Skip to content
Snippets Groups Projects
Verified Commit 849dc2df authored by anarsec's avatar anarsec
Browse files

layout updates

parent 337f615d
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ tags = ["intro", "linux", "tails", "qubes", "easy"] ...@@ -9,6 +9,7 @@ tags = ["intro", "linux", "tails", "qubes", "easy"]
[extra] [extra]
blogimage="/gifs/destroy.gif" blogimage="/gifs/destroy.gif"
blogimagepng="/images/destroy.png"
toc=true toc=true
dateedit=2023-05-10 dateedit=2023-05-10
a4="linux-a4.pdf" a4="linux-a4.pdf"
......
...@@ -335,6 +335,7 @@ Hacking is really a way of life. If you are truly committed to your cause, you s ...@@ -335,6 +335,7 @@ Hacking is really a way of life. If you are truly committed to your cause, you s
<br> <br>
<hr>
[^1]: This applies to the IPv4 Internet protocol standard. Caution: In some company networks, this no longer applies! [^1]: This applies to the IPv4 Internet protocol standard. Caution: In some company networks, this no longer applies!
......
...@@ -5,32 +5,9 @@ ...@@ -5,32 +5,9 @@
lastediteddate: none, lastediteddate: none,
description: none, description: none,
subtitle: none, subtitle: none,
category: none,
content content
) = { ) = {
// format links
show link: it => {
it.body
if type(it.dest) == "string" {
if it.dest.starts-with("https://") or it.dest.starts-with("http://") {
footnote[#it.dest.trim("https://", at: start).trim("http://", at: start)]
}
else if it.dest.starts-with("/glossary#") or it.dest.starts-with("/glossary/#") {
locate(location => {
let elements = query(label(it.dest.trim("/glossary#", at: start).trim("/glossary/#", at: start)), location)
text[#super[]]
})
}
else if it.dest.starts-with("/") {
footnote({text[anarsec.guide] + it.dest})
}
}
else if type(it.dest) == "label" {
locate(location => {
let elements = query(it.dest, location)
text[ (#emph(elements.first().body))]
})
}
}
// format lists // format lists
set list(marker: ([], [--])) set list(marker: ([], [--]))
...@@ -48,6 +25,11 @@ ...@@ -48,6 +25,11 @@
text(18pt, subtitle) text(18pt, subtitle)
} }
} }
#set align(center + bottom)
#text(18pt)[Series: #category]
] ]
// inside cover // inside cover
...@@ -64,6 +46,40 @@ ...@@ -64,6 +46,40 @@
#outline(indent: 20pt, depth: 3) #outline(indent: 20pt, depth: 3)
] ]
// format links
show link: it => {
it.body
if type(it.dest) == "string" {
if it.dest == "https://anarsec.guide/recommendations" or it.dest == "/recommendations" {
text[ (#emph()[Recommendations])]
}
else if it.dest.starts-with("/recommendations#") or it.dest.starts-with("/recommendations/#") {
locate(location => {
let elements = query(label(it.dest.trim("/recommendations#", at: start).trim("/recommendations/#", at: start)), location)
text[ (#emph()[Recommendations:] #emph(elements.first().body))]
})
}
else if it.dest.starts-with("https://") or it.dest.starts-with("http://") {
footnote[#it.dest.trim("https://", at: start).trim("http://", at: start)]
}
else if it.dest.starts-with("/glossary#") or it.dest.starts-with("/glossary/#") {
locate(location => {
let elements = query(label(it.dest.trim("/glossary#", at: start).trim("/glossary/#", at: start)), location)
text[#super[]]
})
}
else if it.dest.starts-with("/") {
footnote({text[anarsec.guide] + it.dest})
}
}
else if type(it.dest) == "label" {
locate(location => {
let elements = query(it.dest, location)
text[ (#emph(elements.first().body))]
})
}
}
// content // content
set page(numbering: "1") set page(numbering: "1")
set align(left) set align(left)
...@@ -116,3 +132,4 @@ ...@@ -116,3 +132,4 @@
] ]
] ]
] ]
...@@ -101,8 +101,9 @@ class Converter: ...@@ -101,8 +101,9 @@ class Converter:
description = description_txt_path.open().read() description = description_txt_path.open().read()
# Copy the front image # Copy the front image
front_image = pathlib.Path(workingDirectory) / ("front_image" + pathlib.Path(toml_front_matter['extra']['blogimage']).suffix) blogimageid = "blogimagepng" if "blogimagepng" in toml_front_matter["extra"] else "blogimage"
shutil.copy(self.anarsec_root / "static" / toml_front_matter['extra']['blogimage'].removeprefix("/"), front_image) front_image = pathlib.Path(workingDirectory) / ("front_image" + pathlib.Path(toml_front_matter['extra'][blogimageid]).suffix)
shutil.copy(self.anarsec_root / "static" / toml_front_matter['extra'][blogimageid].removeprefix("/"), front_image)
# Copy the back image # Copy the back image
back_image = pathlib.Path(workingDirectory) / "back_image.png" back_image = pathlib.Path(workingDirectory) / "back_image.png"
...@@ -160,6 +161,7 @@ class Converter: ...@@ -160,6 +161,7 @@ class Converter:
lastediteddate: "{toml_front_matter["extra"]["dateedit"]}", lastediteddate: "{toml_front_matter["extra"]["dateedit"]}",
description: "{description}", description: "{description}",
subtitle: "{toml_front_matter.get("description")}", subtitle: "{toml_front_matter.get("description")}",
category: "{toml_front_matter["taxonomies"]["categories"][0]}",
content content
) )
{typst_path.open().read()} {typst_path.open().read()}
......
static/images/destroy.png

16.2 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment