thesis/slides/lib.typ

78 lines
1.7 KiB
Typst

#import "sns_polylux_template.typ": *
#import "figures.typ": figures, get_figure
#import "../lib.typ": pb1-text, pb2-text, pb3-text
#let pirat-color = (
black: rgb("#000000"),
white: rgb("#FFFFFF"),
red: rgb("#E33d1C"),
blue: rgb("#4AC3CB"),
)
#let sns-polylux-template_sns-pirat = (
pirat-color.blue.darken(30%), //rgb("#00728D"),
pirat-color.blue.darken(50%),
pirat-color.blue.darken(80%),
rgb("#AB3502"),
rgb("#E69426"),
pirat-color.red,
)
#let highlight-block = block.with(
fill: pirat-color.blue,
width: 100%,
inset: 8pt,
radius: 4pt,
)
#let colortest = [
#for th in (
sns-polylux-template_sns-pirat,
sns-polylux-template_sns-colormap,
sns-polylux-template_unipi-colormap,
) {
stack(dir: ltr, ..for c in th {
(rect(width: 30pt, height: 30pt, fill: c),)
})
}
]
#let ghost(
img, x: 0pt,
y: 0pt,
mirror: false,
rot: 0deg,
height: 100pt
) = context {
let img = image(img, height: height)
if mirror {
img = scale(x: -100%, img)
}
if rot != 0deg {
img = rotate(rot, img)
}
let s = measure(img)
let hx = s.width / 2
let hy = s.height / 2
place(
bottom + left,
dx: x - hx,
dy: -y + hy,
img
)
}
#let ghost-1 = ghost.with("imgs/ghosts/ghost-1.png")
#let ghost-2 = ghost.with("imgs/ghosts/ghost-2.png")
#let ghost-3 = ghost.with("imgs/ghosts/ghost-3.png")
#let ghost-4 = ghost.with("imgs/ghosts/ghost-4.png")
#let ghost-5 = ghost.with("imgs/ghosts/ghost-5.png")
#let ghost-6 = ghost.with("imgs/ghosts/ghost-6.png")
#let ghost-7 = ghost.with("imgs/ghosts/ghost-7.png")
#let eye-1 = ghost.with("imgs/ghosts/eye-1.png")
#let eye-2 = ghost.with("imgs/ghosts/eye-2.png")
#let eye-3 = ghost.with("imgs/ghosts/eye-3.png")
#let eye-4 = ghost.with("imgs/ghosts/eye-4.png")