From 8b751b92116cfcd236cc97cbfae7b4b7763f1d8d Mon Sep 17 00:00:00 2001 From: samantha42 Date: Sat, 16 May 2026 09:50:09 +0200 Subject: [PATCH] fixed timeline, new qr design --- Main.typ | 94 ++++------------------------------------------------- helpers.typ | 68 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 87 deletions(-) create mode 100644 helpers.typ diff --git a/Main.typ b/Main.typ index 8585170..973fa70 100644 --- a/Main.typ +++ b/Main.typ @@ -1,60 +1,17 @@ #import "@preview/cetz:0.4.0": canvas, draw -#import "@preview/cades:0.3.1": qr-code #import "@preview/zebra:0.1.0": datamatrix, qrcode #import "@preview/grayness:0.5.0": image-grayscale - -#let FeatureColor = rgb("292929") -#let BackgroundColor = rgb("#fcfcfc") - -#let font = "Helvetica" -#let titlefont = "Libre Caslon Display" -#let textfont = "Libre Caslon Text" +#import "helpers.typ": * #set text(font: font) - #show link: set text(blue) -#let section2(body, topspace: 35pt) = { - v(topspace) - grid( - columns: (1fr, auto, 1fr), - column-gutter: 5pt, - [#v(5pt) #line(length: 100%)], [#text(size: 16pt, font: titlefont, body)],[#v(5pt) #line(length: 100%)] - ) -} - -#let section2danish(body, topspace: 28pt) = section2(topspace: topspace, body) - -#let blob(inverse: false, body) = { - set text(size: 10pt) - if inverse { - box(stroke: (FeatureColor +1pt), radius: 8pt, outset: (top:4pt, bottom: 4pt))[#h(4pt) #text(body) #h(4pt)] - } else { - box(fill: FeatureColor, radius: 8pt, outset: (top:4pt, bottom: 4pt))[#h(4pt) #text(fill: white,body) #h(4pt)] - } -} - -#let section3(body, topspace: 13pt) = { - v(topspace) - text(size:16pt, weight: 800, font: titlefont)[#body] -} - -#let section3danish(body) = section3(topspace: 0pt, body) - - #show heading: set text( size: 18pt, weight: "extralight", ) -#let progress(Number)= { - rect(width: 100%, height: 8pt, stroke: FeatureColor, fill: FeatureColor, inset: 0pt)[ - #align(end)[#rect(width: (1%*(100-Number)), height: 8pt, fill: BackgroundColor)] - ] - -} - // REAL #page(paper: "a4", margin: ( @@ -95,7 +52,7 @@ #place(center + horizon)[ #image("Assets/candlestick-chart.svg", width: 15pt, height: 15pt) ] - #line(angle: 90deg, start: (0pt, 12pt), end: (0pt, 164pt)) + #line(angle: 90deg, start: (0pt, 12pt), end: (0pt, 160pt)) ] #v(133pt) #circle(width: 20pt)[ @@ -141,7 +98,6 @@ ends up well-documented and slightly over-engineered. Practical, but built with care. - #section3[Education History]\ Bachelor of Economics & Business Administration (HA)\ @@ -226,24 +182,7 @@ A self-built backend replacing spreadsheet-based portfolio tracking. Tracks trad #v(12pt) - #grid( - columns: (1fr, 1fr), - [#align(start)[ - #block(width: 60pt)[ - #stack(spacing: 5pt)[ - #align(center)[#text(size: 10pt)[Website]] - ][ - #qr-code(error-correction: "H", "samantha42.xyz", color: FeatureColor, width: 60pt) - ]]]], - [#align(end)[ - #block(width: 60pt)[ - #stack(spacing: 5pt)[ - #align(center)[#text(size: 10pt)[Repository]] - ][ - #qr-code(error-correction: "H", "git.samantha42.xyz", color: FeatureColor, width: 60pt) - ]]]], - ) - + #QR-stack() ] ] @@ -406,26 +345,7 @@ Et selvbygget backend-system, der erstatter regnearksbaseret porteføljestyring. #v(12pt) - #grid( - columns: (1fr, 1fr), - [#align(start)[ - #block(width: 60pt)[ - #stack(spacing: 5pt)[ - #align(center)[#text(size: 10pt)[Website]] - ][ - #qr-code(error-correction: "H", "samantha42.xyz", color: FeatureColor, width: 60pt) - ]]]], - [#align(end)[ - #block(width: 60pt)[ - #stack(spacing: 5pt)[ - #align(center)[#text(size: 10pt)[Repository]] - ][ - #qr-code(error-correction: "H", "git.samantha42.xyz", color: FeatureColor, width: 60pt) - ]]]], - ) - - - ] - ] -) - ] \ No newline at end of file + #QR-stack() + ]] + ) +] \ No newline at end of file diff --git a/helpers.typ b/helpers.typ new file mode 100644 index 0000000..2ba5b65 --- /dev/null +++ b/helpers.typ @@ -0,0 +1,68 @@ +#let FeatureColor = rgb("292929") +#let BackgroundColor = rgb("#fcfcfc") + +#let font = "Helvetica" +#let titlefont = "Libre Caslon Display" +#let textfont = "Libre Caslon Text" + + +#import "@preview/cades:0.3.1": qr-code + + +#let section2(body, topspace: 35pt) = { + v(topspace) + grid( + columns: (1fr, auto, 1fr), + column-gutter: 5pt, + [#v(5pt) #line(length: 100%)], [#text(size: 16pt, font: titlefont, body)],[#v(5pt) #line(length: 100%)] + ) +} + +#let section2danish(body, topspace: 28pt) = section2(topspace: topspace, body) + +#let blob(inverse: false, body) = { + set text(size: 10pt) + if inverse { + box(stroke: (FeatureColor +1pt), radius: 8pt, outset: (top:4pt, bottom: 4pt))[#h(4pt) #text(body) #h(4pt)] + } else { + box(fill: FeatureColor, radius: 8pt, outset: (top:4pt, bottom: 4pt))[#h(4pt) #text(fill: white,body) #h(4pt)] + } +} + +#let section3(body, topspace: 13pt) = { + v(topspace) + text(size:16pt, weight: 800, font: titlefont)[#body] +} + +#let section3danish(body) = section3(topspace: 5pt, body) + + +#let progress(Number)= { + rect(width: 100%, height: 8pt, stroke: FeatureColor, fill: FeatureColor, inset: 0pt)[ + #align(end)[#rect(width: (1%*(100-Number)), height: 8pt, fill: BackgroundColor)] + ] + +} + + +#let QR-stack() = { + grid( + columns: (1fr, 1fr), + [#align(start)[ + #block(width: 60pt)[ + #stack(spacing: 5pt)[ + #align(center)[#text(size: 10pt)[Website]] + ][ + #qr-code(error-correction: "H", "samantha42.xyz", color: FeatureColor, width: 60pt) + #place(center + horizon)[#block(fill: white, width: 15pt, height: 15pt)[#image("Assets/www.svg")]] + ]]]], + [#align(end)[ + #block(width: 60pt)[ + #stack(spacing: 5pt)[ + #align(center)[#text(size: 10pt)[Repository]] + ][ + #qr-code(error-correction: "H", "git.samantha42.xyz", color: FeatureColor, width: 60pt) + #place(center + horizon)[#block(fill: white, width: 15pt, height: 15pt)[#image("Assets/repository.svg")]] + ]]]], + ) +} \ No newline at end of file