forked from pencelheimer/typst_nure_template
1769603703
This commit is contained in:
28
src/lib.typ
28
src/lib.typ
@@ -64,19 +64,14 @@
|
||||
let bib_data = yaml(bib_path)
|
||||
|
||||
let format-entry(c) = {
|
||||
if (c.type == "Web") {
|
||||
let date_array = c.url.date.split("-")
|
||||
let date = datetime(
|
||||
year: int(date_array.at(0)),
|
||||
month: int(date_array.at(1)),
|
||||
day: int(date_array.at(2)),
|
||||
)
|
||||
[#c.title. #c.author. URL: #c.url.value (дата звернення: #date.display("[day].[month].[year]")).]
|
||||
} else if (
|
||||
c.type == "Book"
|
||||
) [#c.author #c.title. #c.publisher, #c.date. #c.page-total c. ] else {
|
||||
panic("Unsupported bibliography entry type")
|
||||
}
|
||||
(
|
||||
"Web": c => {
|
||||
let date_array = c.url.date.split("-")
|
||||
let date = datetime(year: int(date_array.at(0)), month: int(date_array.at(1)), day: int(date_array.at(2)))
|
||||
[#c.title. #c.author. URL: #c.url.value (дата звернення: #date.display("[day].[month].[year]")).]
|
||||
},
|
||||
"Book": c => [#c.author #c.title. #c.publisher, #c.date. #c.page-total c.],
|
||||
).at(c.type, default: panic("Unsupported bibliography entry type"))(c)
|
||||
}
|
||||
|
||||
show enum.item: it => {
|
||||
@@ -88,10 +83,9 @@
|
||||
}
|
||||
|
||||
context {
|
||||
for (i, citation) in query(ref.where(element: none))
|
||||
.map(r => str(r.target))
|
||||
.dedup()
|
||||
.enumerate() { enum.item(i + 1, format-entry(bib_data.at(citation))) }
|
||||
for (i, citation) in query(ref.where(element: none)).map(r => str(r.target)).dedup().enumerate() {
|
||||
enum.item(i + 1, format-entry(bib_data.at(citation)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ go:
|
||||
value: https://go.dev/
|
||||
date: 2024-12-10
|
||||
|
||||
|
||||
htmx:
|
||||
type: Web
|
||||
title: Htmx - high power tools for html
|
||||
|
||||
@@ -40,10 +40,7 @@
|
||||
[2], [Концептуальне моделювання], [24.09.24-30.09.24], [~],
|
||||
[2], [Постановка задачі], [28.09.24 – 2.10.24], [Виконано],
|
||||
[3], [Побудова ER-діаграми та схеми БД], [2.10.24 – 18.10.24], [Виконано],
|
||||
[4],
|
||||
[Оформлення розділів 1, 2 та 3.1, 3.2 пояснювальної записки],
|
||||
[10.10.24 - 18.10.24],
|
||||
[Виконано],
|
||||
[4], [Оформлення розділів 1, 2 та 3.1, 3.2 пояснювальної записки], [10.10.24 - 18.10.24], [Виконано],
|
||||
|
||||
[5], [Перша контрольна точка з курсової роботи], [20.10.24], [Виконано],
|
||||
[6], [Нормалізація бази даних], [20.10.24 - 15.11.24], [Виконано],
|
||||
|
||||
Reference in New Issue
Block a user