start taking in account feedbacks
All checks were successful
/ test_checkout (push) Successful in 1m50s
All checks were successful
/ test_checkout (push) Successful in 1m50s
This commit is contained in:
parent
0d50644ede
commit
de6359db3f
3 changed files with 354 additions and 192 deletions
|
|
@ -19,6 +19,8 @@ rgb("#E69426"),
|
|||
pirat-color.red,
|
||||
)
|
||||
|
||||
#let etal = [_et al._]
|
||||
|
||||
#let highlight-block(body) = {
|
||||
set text(fill: white)
|
||||
block(
|
||||
|
|
@ -73,22 +75,8 @@ pirat-color.red,
|
|||
}
|
||||
*/
|
||||
|
||||
#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 place-fg(x: 0pt, y: 0pt, body) = context {
|
||||
let s = measure(body)
|
||||
let hx = s.width / 2
|
||||
let hy = s.height / 2
|
||||
|
||||
|
|
@ -96,10 +84,27 @@ pirat-color.red,
|
|||
bottom + left,
|
||||
dx: x - hx,
|
||||
dy: -y + hy,
|
||||
img
|
||||
body
|
||||
)
|
||||
}
|
||||
|
||||
#let ghost(
|
||||
img, x: 0pt,
|
||||
y: 0pt,
|
||||
mirror: false,
|
||||
rot: 0deg,
|
||||
height: 100pt
|
||||
) = {
|
||||
let img = image(img, height: height)
|
||||
if mirror {
|
||||
img = scale(x: -100%, img)
|
||||
}
|
||||
if rot != 0deg {
|
||||
img = rotate(rot, img)
|
||||
}
|
||||
place-fg(x: x, y: y, 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")
|
||||
|
|
@ -111,3 +116,30 @@ pirat-color.red,
|
|||
#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")
|
||||
|
||||
#let arrow(start, end, strk: 3pt + black) = {
|
||||
let strk = stroke(strk)
|
||||
start.at(1) = -start.at(1)
|
||||
end.at(1) = -end.at(1)
|
||||
let (xe, ye) = end
|
||||
let (xs, ys) = start
|
||||
let w = xe.pt() - xs.pt()
|
||||
let h = ye.pt() - ys.pt()
|
||||
let len = if w == 0pt and h == 0pt {
|
||||
1pt
|
||||
} else {
|
||||
calc.sqrt(w*w + h*h)
|
||||
}
|
||||
let cos = w / len
|
||||
let sin = h / len
|
||||
|
||||
place(bottom + left, line(start: start, end: end, stroke: strk))
|
||||
place(bottom + left, polygon(
|
||||
fill: strk.paint,
|
||||
stroke: strk,
|
||||
end,
|
||||
(xe + strk.thickness * (sin - cos), ye - strk.thickness * (sin + cos )),
|
||||
(xe - strk.thickness * (sin + cos), ye - strk.thickness * (sin - cos )),
|
||||
))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,8 @@ cmyk(25%,7%,0%,0%),
|
|||
|
||||
// Data
|
||||
#let sns-polylux-template_title = state("title", none)
|
||||
#let sns-polylux-template_short-title = state("short-title", none)
|
||||
#let sns-polylux-template_subtitle = state("subtitle", none)
|
||||
#let sns-polylux-template_event = state("event", none)
|
||||
#let sns-polylux-template_footer-text = state("footer-text", none)
|
||||
#let sns-polylux-template_short-event = state("short-event", none)
|
||||
#let sns-polylux-template_authors = state("authors", none)
|
||||
|
||||
|
|
@ -77,8 +76,7 @@ cmyk(25%,7%,0%,0%),
|
|||
// Data
|
||||
title : none,
|
||||
subtitle : none,
|
||||
short-title : none,
|
||||
event : none,
|
||||
footer-text : none,
|
||||
short-event : none,
|
||||
logo-2 : none,
|
||||
logo-1 : none,
|
||||
|
|
@ -115,11 +113,7 @@ cmyk(25%,7%,0%,0%),
|
|||
)
|
||||
sns-polylux-template_title.update(title)
|
||||
sns-polylux-template_subtitle.update(subtitle)
|
||||
if short-title != none { sns-polylux-template_short-title.update(short-title) }
|
||||
else { sns-polylux-template_short-title.update(title) }
|
||||
sns-polylux-template_event.update(event)
|
||||
if short-event != none { sns-polylux-template_short-event.update(short-event) }
|
||||
else { sns-polylux-template_short-event.update(event) }
|
||||
if footer-text != none { sns-polylux-template_footer-text.update(footer-text) }
|
||||
sns-polylux-template_logo-2.update(logo-2)
|
||||
sns-polylux-template_logo-1.update(logo-1)
|
||||
sns-polylux-template_authors.update(authors)
|
||||
|
|
@ -171,7 +165,7 @@ cmyk(25%,7%,0%,0%),
|
|||
let content = align(top + center, context( {
|
||||
let title = sns-polylux-template_title.at(here())
|
||||
let subtitle = sns-polylux-template_subtitle.at(here())
|
||||
let event = sns-polylux-template_event.at(here())
|
||||
let footer-text = sns-polylux-template_footer-text.at(here())
|
||||
let authors = sns-polylux-template_authors.at(here())
|
||||
let title-size = sns-polylux-template_title-size.at(here())
|
||||
let logo = {
|
||||
|
|
@ -224,7 +218,7 @@ cmyk(25%,7%,0%,0%),
|
|||
place(
|
||||
bottom + center,
|
||||
dy: -1cm,
|
||||
text(fill: sns-polylux-template_background-color.at(here()), size: 22pt, event)
|
||||
text(fill: sns-polylux-template_background-color.at(here()), size: 22pt, footer-text)
|
||||
)
|
||||
if logo != none {
|
||||
place(
|
||||
|
|
@ -454,8 +448,7 @@ cmyk(25%,7%,0%,0%),
|
|||
|
||||
// FOOTER
|
||||
let footer = align(top + center, context( {
|
||||
let short-title = sns-polylux-template_short-title.at(here())
|
||||
let short-event = sns-polylux-template_short-event.at(here())
|
||||
let footer-text = sns-polylux-template_footer-text.at(here())
|
||||
|
||||
place(top + center, line(length: 100%-2cm, stroke: (paint: sns-polylux-template_colormap.at(here()).at(1), thickness: 2pt)))
|
||||
|
||||
|
|
@ -468,9 +461,8 @@ cmyk(25%,7%,0%,0%),
|
|||
align(horizon,text(fill: sns-polylux-template_colormap.at(here()).at(2), size: 16pt,
|
||||
grid(
|
||||
gutter: 0.8cm,
|
||||
columns: (0.7fr, 1fr, 0.7fr),
|
||||
align(left, short-title),
|
||||
align(center, smallcaps(short-event)),
|
||||
columns: (1fr, 5em),
|
||||
align(center, smallcaps(footer-text)),
|
||||
align(right, if page-number [#toolbox.slide-number/#toolbox.last-slide-number]),
|
||||
))
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue