Remove unused property in PreRendered type

This commit is contained in:
Mikko Ahlroth 2024-04-28 21:28:27 +03:00
parent 6e79a34f59
commit 89402f5dce

View file

@ -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(