Skip to content

Commit c68072f

Browse files
committed
temporary asset path fix before dev tools version bump
1 parent 2b0b9a1 commit c68072f

File tree

4 files changed

+28
-6
lines changed

4 files changed

+28
-6
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ COPY Caddyfile ./
1313
RUN caddy fmt Caddyfile --overwrite
1414

1515
COPY --from=builder /app/dist ./dist
16+
COPY --from=builder /app/assets/. ./dist/
17+
1618

1719
CMD ["caddy", "run", "--config", "Caddyfile", "--adapter", "caddyfile"]

gleam.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ modem = ">= 2.1.1 and < 3.0.0"
2121

2222
[dev-dependencies]
2323
gleeunit = ">= 1.0.0 and < 2.0.0"
24-
lustre_dev_tools = ">= 2.0.2 and < 3.0.0"
24+
lustre_dev_tools = ">= 2.1.1 and < 3.0.0"
2525

2626
[tools.lustre.build]
2727
minify = true

manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ gleam_javascript = { version = ">= 1.0.0 and < 2.0.0" }
4949
gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" }
5050
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
5151
lustre = { version = ">= 5.3.5 and < 6.0.0" }
52-
lustre_dev_tools = { version = ">= 2.0.2 and < 3.0.0" }
52+
lustre_dev_tools = { version = ">= 2.1.1 and < 3.0.0" }
5353
modem = { version = ">= 2.1.1 and < 3.0.0" }

src/app.gleam

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub fn main() {
1818
pub type Route {
1919
Home
2020
Work
21+
Blog
2122
Contact
2223

2324
NotFound
@@ -34,6 +35,7 @@ fn init(_args) -> #(Model, Effect(Msg)) {
3435
case path {
3536
Ok([]) -> Home
3637
Ok(["work"]) -> Work
38+
Ok(["blog"]) -> Blog
3739
Ok(["contact"]) -> Contact
3840

3941
_ -> NotFound
@@ -47,6 +49,7 @@ fn on_url_change(uri: uri.Uri) -> Msg {
4749
case uri.path_segments(uri.path) {
4850
[] -> OnRouterChange(Home)
4951
["work"] -> OnRouterChange(Work)
52+
["blog"] -> OnRouterChange(Blog)
5053
["contact"] -> OnRouterChange(Contact)
5154

5255
_ -> OnRouterChange(NotFound)
@@ -70,6 +73,7 @@ fn view(model: Model) -> Element(Msg) {
7073
case model {
7174
Home -> view_home()
7275
Work -> view_my_work()
76+
Blog -> view_blog()
7377
Contact -> view_contact()
7478

7579
NotFound -> view_not_found()
@@ -89,6 +93,9 @@ fn view_header() -> Element(Msg) {
8993
html.li([], [
9094
html.a([attribute.href("/work")], [html.text("Work")]),
9195
]),
96+
html.li([], [
97+
html.a([attribute.href("/blog")], [html.text("Blog")]),
98+
]),
9299
html.li([], [
93100
html.a([attribute.href("/contact")], [html.text("Contact")]),
94101
]),
@@ -239,8 +246,8 @@ fn view_project(project: Project) {
239246
html.p(
240247
[
241248
attribute.class(
242-
"text-justify leading-6 xs:max-w-md sm:max-w-lg md:max-w-xl xl:max-w-2xl 2xl:max-w-3xl
243-
md:text-lg xl:text-xl",
249+
"text-justify leading-6 xs:max-w-md sm:max-w-lg md:max-w-xl
250+
xl:max-w-2xl 2xl:max-w-3xl md:text-lg xl:text-xl",
244251
),
245252
],
246253
[
@@ -295,7 +302,8 @@ fn view_contact() -> Element(Msg) {
295302
html.p(
296303
[
297304
attribute.class(
298-
"mt-2 text-justify leading-6 md:text-lg xl:text-xl xs:max-w-md sm:max-w-lg md:max-w-xl xl:max-w-2xl 2xl:max-w-3xl",
305+
"mt-2 text-justify leading-6 md:text-lg xl:text-xl xs:max-w-md
306+
sm:max-w-lg md:max-w-xl xl:max-w-2xl 2xl:max-w-3xl",
299307
),
300308
],
301309
[
@@ -308,7 +316,8 @@ fn view_contact() -> Element(Msg) {
308316
html.ul(
309317
[
310318
attribute.class(
311-
"mt-4 flex flex-col gap-2 sm:justify-around sm:flex-row sm:flex-wrap xs:max-w-md sm:max-w-lg md:max-w-xl xl:max-w-2xl 2xl:max-w-3xl",
319+
"mt-4 flex flex-col gap-2 sm:justify-around sm:flex-row sm:flex-wrap
320+
xs:max-w-md sm:max-w-lg md:max-w-xl xl:max-w-2xl 2xl:max-w-3xl",
312321
),
313322
],
314323
// TODO: add status indicator
@@ -347,6 +356,17 @@ fn view_social(social: Social) {
347356
)
348357
}
349358

359+
fn view_blog() -> Element(Msg) {
360+
html.section([], [
361+
html.h1([attribute.class("font-bold text-xl md:text-2xl xl:text-3xl")], [
362+
html.text("Blog"),
363+
]),
364+
html.p([attribute.class("mt-2 md:text-lg xl:text-xl")], [
365+
html.text("Coming soon..."),
366+
]),
367+
])
368+
}
369+
350370
fn view_not_found() -> Element(Msg) {
351371
html.section([], [
352372
html.h1([attribute.class("font-bold text-3xl md:text-4xl")], [

0 commit comments

Comments
 (0)