Remove unused property in PreRendered type
This commit is contained in:
parent
6e79a34f59
commit
89402f5dce
1 changed files with 7 additions and 11 deletions
|
@ -4,23 +4,23 @@ import gleam/int
|
|||
import gleam/list
|
||||
import gleam/option
|
||||
import gleam/string
|
||||
import scriptorium/config.{type Configuration}
|
||||
import scriptorium/models/database.{type Database}
|
||||
import scriptorium/models/menu.{type MenuItem}
|
||||
import scriptorium/utils/date
|
||||
import scriptorium/utils/ordered_tree
|
||||
import lustre/attribute.{attribute, href, id, name, rel, role, style, type_}
|
||||
import lustre/element.{type Element, text}
|
||||
import lustre/element/html.{
|
||||
a, body, footer, h1, head, header, html, li, link, main, meta, nav, p, section,
|
||||
title, ul,
|
||||
}
|
||||
import scriptorium/config.{type Configuration}
|
||||
import scriptorium/models/database.{type Database}
|
||||
import scriptorium/models/menu.{type MenuItem}
|
||||
import scriptorium/utils/date
|
||||
import scriptorium/utils/ordered_tree
|
||||
|
||||
const tag_min_size = 0.5
|
||||
|
||||
/// The base view pre-renders some content once, so that it can be reused for every render.
|
||||
pub type PreRendered {
|
||||
PreRendered(pages: Element(Nil), tags: Element(Nil), archives: Element(Nil))
|
||||
PreRendered(tags: Element(Nil), archives: Element(Nil))
|
||||
}
|
||||
|
||||
pub fn generate(db: Database, config: Configuration) {
|
||||
|
@ -31,11 +31,7 @@ pub fn generate(db: Database, config: Configuration) {
|
|||
}
|
||||
|
||||
fn pre_render(db, config) -> PreRendered {
|
||||
PreRendered(
|
||||
pages: element.none(),
|
||||
tags: tags(db, config),
|
||||
archives: archives(db, config),
|
||||
)
|
||||
PreRendered(tags: tags(db, config), archives: archives(db, config))
|
||||
}
|
||||
|
||||
fn view(
|
||||
|
|
Loading…
Reference in a new issue