feat(glossy): theme-table courtesy of Fevol
This commit is contained in:
4 files changed
+33
No files matched your search
@@ -2,4 +2,5 @@
|
|||||||
#import "themes/basic.typ": theme-basic
|
#import "themes/basic.typ": theme-basic
|
||||||
#import "themes/chicago-index.typ": theme-chicago-index
|
#import "themes/chicago-index.typ": theme-chicago-index
|
||||||
#import "themes/compact.typ": theme-compact
|
#import "themes/compact.typ": theme-compact
|
||||||
|
#import "themes/table.typ": theme-table
|
||||||
#import "themes/twocol.typ": theme-twocol
|
#import "themes/twocol.typ": theme-twocol
|
||||||
@@ -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)
|
||||||
|
}
|
||||||
|
)
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 521 KiB After Width: | Height: | Size: 651 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 521 KiB After Width: | Height: | Size: 651 KiB |
Reference in new issue
Block a user