added cover page to manual + header/footer

This commit is contained in:
Louis Heredero 2024-12-23 14:25:13 +01:00
parent 6bc2819172
commit 24cb6df735
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7
4 changed files with 76 additions and 23 deletions

View File

@ -1,11 +1,9 @@
<p align="center"> <p align="center">
<picture> <picture>
<source media="(prefers-color-scheme: light)" srcset="gallery/readme_banner_light.svg" /> <source media="(prefers-color-scheme: light)" srcset="gallery/readme_banner_light.svg" />
<source media="(prefers-color-scheme: dark)" srcset="gallery/readme_banner_dark.svg" /> <source media="(prefers-color-scheme: dark)" srcset="gallery/readme_banner_dark.svg" />
<img alt="Banner" src="gallery/readme_banner_default.svg" /> <img alt="Banner" src="gallery/readme_banner_default.svg" />
</picture> </picture>
</p> </p>
**Jumble** is [Typst](https://typst.app) package providing some common hashing functions, as well as other related algorithms. **Jumble** is [Typst](https://typst.app) package providing some common hashing functions, as well as other related algorithms.

View File

@ -1,20 +1,5 @@
#import "/src/lib.typ": * #import "/src/lib.typ": *
#let theme = sys.inputs.at("theme", default: "default")
#set page(
width: auto,
height: auto,
margin: 1cm,
fill: if theme == "default" {white} else {none}
)
#set text(
size: 12pt,
font: "Source Sans 3",
fill: if theme == "dark" {white} else {black}
)
#let hex-abc = "0123456789abcdef" #let hex-abc = "0123456789abcdef"
#let g = gradient.linear( #let g = gradient.linear(
red, red,
@ -47,4 +32,21 @@
#let txt = "Jumble" #let txt = "Jumble"
#let cipher = bytes-to-hex(sha1(txt)) #let cipher = bytes-to-hex(sha1(txt))
*sha1("#txt") =* #colorize-hex(cipher) #let banner = [*sha1("#txt") =* #colorize-hex(cipher)]
#let theme = sys.inputs.at("theme", default: "default")
#set page(
width: auto,
height: auto,
margin: 1cm,
fill: if theme == "default" {white} else {none}
)
#set text(
size: 12pt,
font: "Source Sans 3",
fill: if theme == "dark" {white} else {black}
)
#banner

Binary file not shown.

View File

@ -2,6 +2,59 @@
#import "src/lib.typ" #import "src/lib.typ"
#import "gallery/readme_banner.typ" as banner
#set text(font: "Source Sans 3")
#set page(
header: [
jumble #sym.dash.em v#lib.version
],
footer: context {
if counter(page).get().first() != 1 {
align(center, counter(page).display("1 / 1", both: true))
}
}
)
#align(center)[
#v(1cm)
#text(size: 2em)[
*#banner.txt*
]
#text(size: 1.5em)[
#banner.colorize-hex(banner.cipher)
]
#v(0.5cm)
_by LordBaryhobal_
#v(3cm)
#text(
size: 1.8em
)[
*Manual*
]
]
#v(1fr)
#box(
width: 100%,
stroke: black,
inset: 1em,
outline(
indent: 1em,
target: heading.where(level: 2)
)
)
#pagebreak(weak: true)
#let mod = tidy.parse-module.with( #let mod = tidy.parse-module.with(
scope: (jumble: lib), scope: (jumble: lib),
preamble: "#import jumble: *;" preamble: "#import jumble: *;"