diff --git a/preview/glossy/0.2.2/src/themes.typ b/preview/glossy/0.2.2/src/themes.typ index 8ff4163..dc3f4b8 100644 --- a/preview/glossy/0.2.2/src/themes.typ +++ b/preview/glossy/0.2.2/src/themes.typ @@ -2,4 +2,5 @@ #import "themes/basic.typ": theme-basic #import "themes/chicago-index.typ": theme-chicago-index #import "themes/compact.typ": theme-compact +#import "themes/table.typ": theme-table #import "themes/twocol.typ": theme-twocol diff --git a/preview/glossy/0.2.2/src/themes/table.typ b/preview/glossy/0.2.2/src/themes/table.typ new file mode 100644 index 0000000..79ec375 --- /dev/null +++ b/preview/glossy/0.2.2/src/themes/table.typ @@ -0,0 +1,32 @@ +// A tabular theme courtesy of [@Fevol](https://github.com/Fevol) +#let theme-table = ( + section: (title, body) => { + heading(level: 1, title) + body + }, + + group: (name, index, total, body) => { + if name != "" and total > 1 { + heading(level: 2, name) + } + + table(columns: 4, + stroke: none, + inset: (x, y) => { + if (x == 0) { + (left: 0pt, rest: 5pt) + } else if (x == 3) { + (right: 0pt, rest: 5pt) + } else { + 5pt + } + }, + table.header([*Abbreviation*], [*Full Name*], [*Description*], [*Pages*]), + ..body + ) + }, + + entry: (entry, index, total) => { + (entry.short, entry.long, entry.description, entry.pages) + } +) diff --git a/preview/glossy/0.2.2/tests/theme-gallery/ref/1.png b/preview/glossy/0.2.2/tests/theme-gallery/ref/1.png index 582ab7a..74748a3 100644 Binary files a/preview/glossy/0.2.2/tests/theme-gallery/ref/1.png and b/preview/glossy/0.2.2/tests/theme-gallery/ref/1.png differ diff --git a/preview/glossy/0.2.2/themeshots.png b/preview/glossy/0.2.2/themeshots.png index a1d63ee..74748a3 100644 Binary files a/preview/glossy/0.2.2/themeshots.png and b/preview/glossy/0.2.2/themeshots.png differ