mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-06 19:12:02 +00:00
Compare commits
No commits in common. "d73ae7fb99a3e7b7533ce3917fb24b9030afd2cd" and "9ab13054f32669db49af0571a0af24dc8fdc65ef" have entirely different histories.
d73ae7fb99
...
9ab13054f3
@ -116,12 +116,16 @@ pub fn main() {
|
|||||||
|> ssg.add_static_dir("static")
|
|> ssg.add_static_dir("static")
|
||||||
|> ssg.add_static_route("/", create_page(index.page()))
|
|> ssg.add_static_route("/", create_page(index.page()))
|
||||||
|> list.fold(posts, _, fn(config, post) {
|
|> list.fold(posts, _, fn(config, post) {
|
||||||
|
let route = case { post.1 }.name {
|
||||||
|
"_index" -> post.0 |> string.drop_end("_index" |> string.length())
|
||||||
|
_ -> post.0
|
||||||
|
}
|
||||||
|
|
||||||
let page = case is_doc_page(post.0) {
|
let page = case is_doc_page(post.0) {
|
||||||
True -> doc.page(post.1, doc_pages)
|
True -> doc.page(post.1, doc_pages)
|
||||||
False -> doc.page(post.1, doc_pages)
|
False -> doc.page(post.1, doc_pages)
|
||||||
}
|
}
|
||||||
io.debug(post.0)
|
ssg.add_static_route(config, route, create_page(page))
|
||||||
ssg.add_static_route(config, post.0, create_page(page))
|
|
||||||
})
|
})
|
||||||
|> ssg.use_index_routes
|
|> ssg.use_index_routes
|
||||||
|> ssg.build
|
|> ssg.build
|
||||||
@ -156,7 +160,7 @@ fn nav() -> element.Element(a) {
|
|||||||
[attribute.href("/"), attribute.class("flex items-center gap-1")],
|
[attribute.href("/"), attribute.class("flex items-center gap-1")],
|
||||||
[
|
[
|
||||||
html.img([
|
html.img([
|
||||||
attribute.src(conf.base_url_join("hilbish-flower.png")),
|
attribute.src("/hilbish-flower.png"),
|
||||||
attribute.class("h-16"),
|
attribute.class("h-16"),
|
||||||
]),
|
]),
|
||||||
html.span([attribute.class("self-center text-3xl font-medium")], [
|
html.span([attribute.class("self-center text-3xl font-medium")], [
|
||||||
@ -169,18 +173,10 @@ fn nav() -> element.Element(a) {
|
|||||||
html.div(
|
html.div(
|
||||||
[attribute.class("flex gap-3 dark:text-pink-300 text-pink-600")],
|
[attribute.class("flex gap-3 dark:text-pink-300 text-pink-600")],
|
||||||
[
|
[
|
||||||
html.a([attribute.href(conf.base_url_join(""))], [
|
html.a([attribute.href("/")], [element.text("Home")]),
|
||||||
element.text("Home"),
|
html.a([attribute.href("/install")], [element.text("Install")]),
|
||||||
]),
|
html.a([attribute.href("/docs")], [element.text("Docs")]),
|
||||||
html.a([attribute.href(conf.base_url_join("/install"))], [
|
html.a([attribute.href("/blog")], [element.text("Blog")]),
|
||||||
element.text("Install"),
|
|
||||||
]),
|
|
||||||
html.a([attribute.href(conf.base_url_join("/docs"))], [
|
|
||||||
element.text("Docs"),
|
|
||||||
]),
|
|
||||||
html.a([attribute.href(conf.base_url_join("/blog"))], [
|
|
||||||
element.text("Blog"),
|
|
||||||
]),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -203,7 +199,7 @@ fn footer() -> element.Element(a) {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
html.img([
|
html.img([
|
||||||
attribute.src(conf.base_url_join("hilbish-flower.png")),
|
attribute.src("/hilbish-flower.png"),
|
||||||
attribute.class("h-24"),
|
attribute.class("h-24"),
|
||||||
]),
|
]),
|
||||||
html.span([attribute.class("self-center text-6xl")], [
|
html.span([attribute.class("self-center text-6xl")], [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user