mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-06 19:12:02 +00:00
Compare commits
3 Commits
9ab13054f3
...
d73ae7fb99
Author | SHA1 | Date | |
---|---|---|---|
d73ae7fb99 | |||
681e1127f4 | |||
51d8e7b42e |
@ -116,16 +116,12 @@ 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)
|
||||||
}
|
}
|
||||||
ssg.add_static_route(config, route, create_page(page))
|
io.debug(post.0)
|
||||||
|
ssg.add_static_route(config, post.0, create_page(page))
|
||||||
})
|
})
|
||||||
|> ssg.use_index_routes
|
|> ssg.use_index_routes
|
||||||
|> ssg.build
|
|> ssg.build
|
||||||
@ -160,7 +156,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("/hilbish-flower.png"),
|
attribute.src(conf.base_url_join("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")], [
|
||||||
@ -173,10 +169,18 @@ 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("/")], [element.text("Home")]),
|
html.a([attribute.href(conf.base_url_join(""))], [
|
||||||
html.a([attribute.href("/install")], [element.text("Install")]),
|
element.text("Home"),
|
||||||
html.a([attribute.href("/docs")], [element.text("Docs")]),
|
]),
|
||||||
html.a([attribute.href("/blog")], [element.text("Blog")]),
|
html.a([attribute.href(conf.base_url_join("/install"))], [
|
||||||
|
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"),
|
||||||
|
]),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -199,7 +203,7 @@ fn footer() -> element.Element(a) {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
html.img([
|
html.img([
|
||||||
attribute.src("/hilbish-flower.png"),
|
attribute.src(conf.base_url_join("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