tangled
alpha
login
or
join now
kacaii.dev
/
blog
0
fork
atom
💻 My personal website
blog.kacaii.dev/
blog
gleam
lustre
0
fork
atom
overview
issues
pulls
pipelines
:fire: remove projects for now
kacaii.dev
2 months ago
514aa730
3a4305a5
+2
-3
1 changed file
expand all
collapse all
unified
split
src
blog
page
navbar.gleam
+2
-3
src/blog/page/navbar.gleam
···
3
import lustre/element/html
4
5
pub fn view(attributes: List(attr.Attribute(_))) {
6
-
let style = class("grid grid-cols-4 place-items-center")
7
8
html.nav([style, ..attributes], [
9
route(icon: "nf-fa-home", href: "/", label: "Home"),
10
route(icon: "nf-md-file_document_edit", href: "/posts", label: "Articles"),
11
route(icon: "nf-md-file_star", href: "/uses", label: "Uses"),
12
-
route(icon: "nf-oct-server", href: "/projects", label: "Projects"),
13
])
14
}
15
···
18
let anchor_style = class("flex gap-2 items-center")
19
20
html.a([anchor_style, attr.href(to)], [
21
-
nerd_font_icon.view([class("hidden md:inline-block")], nf),
22
html.p([text_style], [html.text(text)]),
23
])
24
}
···
3
import lustre/element/html
4
5
pub fn view(attributes: List(attr.Attribute(_))) {
6
+
let style = class("grid grid-cols-3 place-items-center")
7
8
html.nav([style, ..attributes], [
9
route(icon: "nf-fa-home", href: "/", label: "Home"),
10
route(icon: "nf-md-file_document_edit", href: "/posts", label: "Articles"),
11
route(icon: "nf-md-file_star", href: "/uses", label: "Uses"),
0
12
])
13
}
14
···
17
let anchor_style = class("flex gap-2 items-center")
18
19
html.a([anchor_style, attr.href(to)], [
20
+
nerd_font_icon.view([], nf),
21
html.p([text_style], [html.text(text)]),
22
])
23
}