Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Add TOC debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyflameWarrior committed Feb 28, 2024
1 parent 645ed42 commit 87a1987
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions entries/competition/valley-mall.typ
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@
)
]

#colbreak()

= Skills
#nb_admonition(type: "competition", title: "Skills Performance")[
- *Driver Skills Score:* 72
Expand Down
8 changes: 6 additions & 2 deletions template/toc.typ
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,18 @@

let frontmatter_count = frontmatter_page_counter.final(loc).at(0)

if frontmatter_count + page_number + 2 - page-number-offset + 4 < 0 {
panic(str(info.name) + str(entry.title) + str(frontmatter_count + page_number + 2 - page-number-offset))
}

[
#box(baseline: 15%, nb_icon(label: entry.type, size: 1em))
#h(5pt)
#box(fill: info.color.lighten(30%), radius: 1pt, height: 1em, baseline: 15%)[
#align(center + horizon)[
#link((page: {frontmatter_count + page_number + 2/* - page-number-offset*/}, x: 0pt, y: 0pt))[
#link((page: {{frontmatter_count + page_number + 2 - page-number-offset + 4}}, x: 0pt, y: 0pt))[
#text(fill: black)[
_#h(2pt) /*[#frontmatter_count + #page_number + #2 - #page-number-offset] */#start_date #sym.dash.em #info.name: #entry.title #h(2pt)_
_#h(2pt) {#frontmatter_count + #page_number + #2 - #page-number-offset} #start_date #sym.dash.em #info.name: #entry.title #h(2pt)_
]
]
]
Expand Down

0 comments on commit 87a1987

Please sign in to comment.