From 24cb6df7357a77022ca6aed9bd1c5d2be163a68c Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Mon, 23 Dec 2024 14:25:13 +0100 Subject: [PATCH] added cover page to manual + header/footer --- README.md | 12 ++++----- gallery/readme_banner.typ | 34 ++++++++++++------------ manual.pdf | Bin 65196 -> 65196 bytes manual.typ | 53 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c5c1c3f..0ca799c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ - -

- - - - Banner - + + + + Banner +

**Jumble** is [Typst](https://typst.app) package providing some common hashing functions, as well as other related algorithms. diff --git a/gallery/readme_banner.typ b/gallery/readme_banner.typ index 6296018..c043ac7 100644 --- a/gallery/readme_banner.typ +++ b/gallery/readme_banner.typ @@ -1,20 +1,5 @@ #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 g = gradient.linear( red, @@ -47,4 +32,21 @@ #let txt = "Jumble" #let cipher = bytes-to-hex(sha1(txt)) -*sha1("#txt") =* #colorize-hex(cipher) \ No newline at end of file +#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 \ No newline at end of file diff --git a/manual.pdf b/manual.pdf index 5ab4cafacee57febb8d337ac3c2833a767da58bb..cad6f9fd49bdb91ce075dbe436630f78615d92b1 100644 GIT binary patch delta 193 zcmZ4UmwC-!<_-F9)Qk;{jLnUVqcph`6!d-bQ(O{DQWZ2@tc(ndObm^TpwgQ|-?%b~ z8F>0t8AWI(dw4lT<&+f`1UkBBnFmhZ@J=0v)aJMExEZ;OLkx|qjLof#j3+aF&_?2J YHvgc`XNcWYTU$*94eU~r`~S%T0Q>np1ONa4 delta 193 zcmZ4UmwC-!<_-F9)Qk)a4GfHpqBOY_6!d-bQ(O{DQWZ2@tc(ndObm^TpwgQ|-?%b~ z`FaLL6h!zMr+JlBc&53hRQkCY6_iij@J=0v)aJMExEZ;OLJSP83=FJ{jV3dF&_?2J YHvgc`XNcWYTU$*94eU~r`~S%T0ESXO3;+NC diff --git a/manual.typ b/manual.typ index c955a35..1f8ab79 100644 --- a/manual.typ +++ b/manual.typ @@ -2,6 +2,59 @@ #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( scope: (jumble: lib), preamble: "#import jumble: *;"