mirror of
https://0xacab.org/anarsec/anarsec.guide.git
synced 2025-06-08 06:42:56 -04:00
typst styling
This commit is contained in:
parent
6679c65ba9
commit
679f46f7c6
3 changed files with 12 additions and 10 deletions
|
@ -18,16 +18,16 @@
|
||||||
page()[
|
page()[
|
||||||
#place(
|
#place(
|
||||||
center + top,
|
center + top,
|
||||||
dy: 150pt,
|
dy: 250pt,
|
||||||
image(frontimage)
|
image(frontimage)
|
||||||
)
|
)
|
||||||
|
|
||||||
#place(
|
#place(
|
||||||
center + horizon,
|
center + top,
|
||||||
dy: 40pt,
|
dy: 150pt,
|
||||||
)[
|
)[
|
||||||
#set text(font: "Jost")
|
#set text(font: "Jost")
|
||||||
#text(25pt, title)
|
#text(35pt, title)
|
||||||
|
|
||||||
#{
|
#{
|
||||||
if subtitle != "None" {
|
if subtitle != "None" {
|
||||||
|
@ -37,7 +37,8 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
#place(
|
#place(
|
||||||
center + bottom
|
center + bottom,
|
||||||
|
dy: -20pt,
|
||||||
)[
|
)[
|
||||||
#set text(font: "Jost")
|
#set text(font: "Jost")
|
||||||
#text(18pt)[Series: #category]
|
#text(18pt)[Series: #category]
|
||||||
|
@ -70,18 +71,18 @@
|
||||||
#v(10pt)
|
#v(10pt)
|
||||||
]
|
]
|
||||||
show heading.where(level: 3): it => block(width: 100%)[
|
show heading.where(level: 3): it => block(width: 100%)[
|
||||||
#set text(size: 12pt, font: "Jost", style: "italic")
|
#set text(size: 14pt, font: "Jost", style: "italic")
|
||||||
#text(it.body)
|
#text(it.body)
|
||||||
#v(10pt)
|
#v(10pt)
|
||||||
]
|
]
|
||||||
show heading.where(level: 4): it => block(width: 100%)[
|
show heading.where(level: 4): it => block(width: 100%)[
|
||||||
#set text(size: 11pt, font: "Jost")
|
#set text(size: 11pt, font: "Jost")
|
||||||
#text(it.body)
|
#text(underline(it.body))
|
||||||
#v(10pt)
|
#v(10pt)
|
||||||
]
|
]
|
||||||
|
|
||||||
// table of contents
|
// table of contents
|
||||||
outline(indent: 20pt, depth: 3)
|
outline(indent: 20pt, depth: 2)
|
||||||
|
|
||||||
// format links
|
// format links
|
||||||
show link: it => {
|
show link: it => {
|
||||||
|
@ -131,6 +132,7 @@
|
||||||
content
|
content
|
||||||
|
|
||||||
set page(numbering: none)
|
set page(numbering: none)
|
||||||
|
set heading(outlined: false)
|
||||||
|
|
||||||
// back cover inside
|
// back cover inside
|
||||||
page()[
|
page()[
|
||||||
|
|
|
@ -128,7 +128,7 @@ class Converter:
|
||||||
markdown_content += f"\n\n# Recommendations\n\n{recommendations}\n\n"
|
markdown_content += f"\n\n# Recommendations\n\n{recommendations}\n\n"
|
||||||
|
|
||||||
# Make all images paths relative in the Markdown content
|
# Make all images paths relative in the Markdown content
|
||||||
for extension in ["jpg", "png", "webp", "jpeg"]:
|
for extension in ["jpg", "png", "webp", "jpeg", "gif"]:
|
||||||
markdown_content = re.sub(f'\\(\\/posts/{input_path.parent.name}/(.*?\.{extension})\\)', lambda match: f'({match.group(1)})', markdown_content)
|
markdown_content = re.sub(f'\\(\\/posts/{input_path.parent.name}/(.*?\.{extension})\\)', lambda match: f'({match.group(1)})', markdown_content)
|
||||||
|
|
||||||
# Replace all .webp images to .png images in the Markdown content
|
# Replace all .webp images to .png images in the Markdown content
|
||||||
|
|
|
@ -567,7 +567,7 @@ h3
|
||||||
font-style: italic !important
|
font-style: italic !important
|
||||||
|
|
||||||
h4
|
h4
|
||||||
font-size: 1em !important
|
font-size: 1.1em !important
|
||||||
text-decoration: underline !important
|
text-decoration: underline !important
|
||||||
|
|
||||||
a
|
a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue