summaryrefslogtreecommitdiff
path: root/trees/blog/lib.typ
blob: 52a3f4b02668593f2bfc7a00b2108cf4a380dd3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#import "@preview/cetz:0.4.2": canvas, draw
#import "mocha.typ": mocha

#let entries = (
  (file: "./index.typ", name: "Index"),
  (
    file: "./genuary-2026.typ",
    name: "Genuary 2026",
    date: 2026,
  ),
  (
    file: "./corctf-2025.typ",
    name: "COR CTF 2025",
    date: 2025,
  ),
  (
    file: "./googlectf-2025.typ",
    name: "Google CTF 2025",
    date: 2025,
  ),
  (
    file: "./midnightsunctf-2025.typ",
    name: "MidnightSun CTF 2025",
    date: 2025,
  ),
  (
    file: "./wolvctf-2025.typ",
    name: "Wolv CTF 2025",
    date: 2025,
  ),
  (
    file: "./irisctf-2025.typ",
    name: "Iris CTF 2025",
    date: 2025,
  ),
  (
    file: "./tfc-2024.typ",
    name: "TFC CTF 2024",
    date: 2024,
  ),
  (
    file: "./building-a-freeburp-collaborator-with-cloudflare-workers.typ",
    name: "Building a free Burp Collaborator with Cloudflare Workers",
    date: 2023,
  ),
  (
    file: "./router-command-injection.typ",
    name: "Finding a command injection in a router",
    date: 2023,
  ),
  (
    file: "./oswe-some-thoughts.typ",
    name: "OSWE - Some thoughts",
    date: 2023,
  ),
  (
    file: "./the-inevitability-of-getting-pwned.typ",
    name: "The Inevitability of Getting Pwned",
    date: 2023,
  ),
  (
    file: "./psychedelic-programming-languages.typ",
    name: "Psychedelic Programming Languages",
    date: 2022,
  ),
  (file: "./binbin-tree.typ", name: "Binary Binary Tree", date: 2021),
  (
    file: "./mk-lisp-1.typ",
    name: "Making a Lisp - 1",
    date: 2020,
  ),
  (
    file: "./mk-lisp-0.typ",
    name: "Making a Lisp - 0",
    date: 2020,
  ),
  (
    file: "./obi2018-baldes.typ",
    name: "OBI 2018 - Baldes",
    date: 2020,
  ),
  (
    file: "./obi2018-bolas.typ",
    name: "OBI 2018 - Bolas",
    date: 2020,
  ),
  (
    file: "./obi2018-cinco.typ",
    name: "OBI 2018 - Cinco",
    date: 2020,
  ),
  (
    file: "./obi2018-muro.typ",
    name: "OBI 2018 - Muro",
    date: 2020,
  ),
  (
    file: "./obi2018-maximin.typ",
    name: "OBI 2018 - MaxiMin",
    date: 2020,
  ),
)

#let rightbox(content) = {
  html.elem("div", attrs: (class: "flex font-meta text-sm text-justify"))[
    #html.elem("div", attrs: (class: "flex p-8"))[  ]
    #html.elem("div", attrs: (class: "flex p-8"))[  ]
    #html.elem("div", attrs: (
      class: "flex bg-mantle p-4 flex-auto rounded-s-xl",
    ))[
      #content
    ]
  ]
}

#let centerbox(content) = {
  html.elem("div", attrs: (class: "flex font-meta text-sm text-justify m-4"))[
    #html.elem("div", attrs: (
      class: "flex bg-mantle p-4 flex-auto rounded-s-xl place-content-around",
    ))[
      #content
    ]
  ]
}

#let textbox(content) = {
  html.elem("div", attrs: (
    class: "p-4 bg-surface0 rounded-xl font-display text-xs font-bold",
  ))[
    #content
  ]
}

#let separator(n) = {
  html.elem("div", attrs: (class: "mt-4 mb-4"))[
    #html.frame()[
      #canvas({
        draw.fill(blue)
        draw.stroke(none)

        let w = 0.7

        for i in range(n) {
          if calc.rem(i, 2) == 0 {
            draw.fill(mocha.colors.blue.rgb)
            draw.rect((i * w, 0), ((i + 0.8) * w, 0.1))
          } else {
            draw.fill(mocha.colors.peach.rgb)
            draw.rect((i * w, 0), ((i + 0.8) * w, 0.1))
          }
        }
      })
    ]
  ]
}

#let svg_inline(contents) = {
  box()[#html.frame[#text(fill: white)[#contents]]]
}

#let flex(contents) = {
  html.elem("div", attrs: (style: "display: flex; align-items: baseline;"))[
    #contents
  ]
}

#let logos() = {
  html.frame()[#image("./logo3.svg", width: 8em)]
  html.frame()[#image("./logo2.svg", width: 8em)]
}