Improve content formatting
This commit is contained in:
@@ -1,6 +1,55 @@
|
||||
#import "style.typ": definition, example, theorem, zut-template
|
||||
|
||||
#set heading(numbering: "1.")
|
||||
#set par(first-line-indent: 0pt)
|
||||
#let color-dark-blue = rgb("#223d73")
|
||||
#let color-page-num = rgb("#6b7b96")
|
||||
#let color-dots = rgb("#a0aabf")
|
||||
|
||||
#set heading(numbering: "1.1")
|
||||
#set text(font: "Fira Sans")
|
||||
#set outline(title: text(size: 24pt, fill: color-dark-blue, weight: "regular")[Spis treści])
|
||||
|
||||
#show outline.entry: it => {
|
||||
let is-lvl-1 = it.level == 1
|
||||
|
||||
let num = it.prefix()
|
||||
let title = it.body()
|
||||
let page-num = it.page()
|
||||
|
||||
let num-style = if is-lvl-1 {
|
||||
text(size: 14pt, fill: color-dark-blue, num)
|
||||
} else {
|
||||
text(size: 12pt, fill: black, num)
|
||||
}
|
||||
|
||||
let title-style = if is-lvl-1 {
|
||||
text(size: 14pt, fill: color-dark-blue, title)
|
||||
} else {
|
||||
text(size: 12pt, fill: black, title)
|
||||
}
|
||||
|
||||
let page-style = text(size: 10pt, fill: color-page-num, weight: "medium", page-num)
|
||||
|
||||
v(if is-lvl-1 { 14pt } else { 6pt }, weak: true)
|
||||
|
||||
link(it.element.location())[
|
||||
#grid(
|
||||
columns: (3em, 1fr, auto),
|
||||
align: (left, left, right),
|
||||
// Kolumna 1: Numery rozdziałów w jednej linii
|
||||
num-style,
|
||||
// Kolumna 2: Tytuł oraz kropki
|
||||
[
|
||||
#title-style
|
||||
#box(width: 1fr, inset: (x: 5pt))[
|
||||
#text(fill: color-dots)[#repeat[ . ]]
|
||||
]
|
||||
],
|
||||
// Kolumna 3: Numer strony
|
||||
page-style,
|
||||
)
|
||||
]
|
||||
}
|
||||
|
||||
#outline()
|
||||
|
||||
#pagebreak()
|
||||
|
||||
Reference in New Issue
Block a user