My personal website, in gleam+lustre!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Think I'm almost ready for site content :3

+110 -60
+3 -2
site.css
··· 14 14 --color-base-content: oklch(25% 0.09 281.288); 15 15 --color-primary: #edbcbc; 16 16 --color-primary-content: oklch(44% 0.043 257.281); 17 - --color-secondary: #85aaa0; 17 + --color-secondary: #ceddd9; 18 18 --color-secondary-content: oklch(29% 0.066 243.157); 19 19 --color-accent: oklch(71% 0.203 305.504); 20 20 --color-accent-content: oklch(38% 0.063 188.416); ··· 47 47 font-style: normal; 48 48 margin: 0; 49 49 } 50 + 50 51 body { 51 52 /*background-color: #f8e4e4;*/ 52 53 @apply w-screen h-screen; 53 54 } 54 - } 55 + }
+90 -54
src/homepage.gleam
··· 6 6 id: 0, 7 7 title: "Test", 8 8 summary: "Testing", 9 - body: File(Plain, "./written-contents/test.txt"), 9 + body: File(Djot, "./written-contents/test.dj"), 10 10 aliases: ["first"], 11 11 comments: CommentsDisable, 12 12 ), ··· 201 201 } 202 202 203 203 fn view(model: Model) -> Element(Msg) { 204 + let header_links = 205 + [ 206 + view_header_link(current: model.route, to: Index, label: "Home"), 207 + view_header_link(current: model.route, to: Portfolio, label: "Portfolio"), 208 + view_header_link(current: model.route, to: Me, label: "Me"), 209 + view_header_link(current: model.route, to: Posts, label: "Posts"), 210 + ] 211 + |> element.fragment 204 212 element.fragment([ 205 213 // Header start 206 214 html.nav([attribute.class("navbar bg-secondary shadow-sm")], [ 207 215 html.div([attribute.class("navbar-start")], [ 208 - html.div([attribute.class("dropdown")], [ 216 + html.div([attribute.class("dropdown md:hidden")], [ 209 217 html.div( 210 218 [ 211 219 attribute.class("btn btn-ghost btn-circle"), ··· 213 221 attribute("tabindex", "0"), 214 222 ], 215 223 [ 216 - // Menu svg 224 + // Menu button svg 217 225 svg.svg( 218 226 [ 219 227 attribute("stroke", "currentColor"), ··· 241 249 ), 242 250 attribute("tabindex", "-1"), 243 251 ], 244 - [ 245 - view_header_link(current: model.route, to: Index, label: "Home"), 246 - view_header_link( 247 - current: model.route, 248 - to: Portfolio, 249 - label: "Portfolio", 250 - ), 251 - view_header_link(current: model.route, to: Me, label: "Me"), 252 - view_header_link(current: model.route, to: Posts, label: "Posts"), 253 - ], 252 + [header_links], 254 253 ), 255 254 ]), 255 + // Menu on bigger screens: 256 + html.ul([attribute.class("menu menu-horizontal px-1 hidden md:flex")], [ 257 + header_links, 258 + ]), 256 259 html.button([attribute.class("btn btn-ghost btn-circle")], [ 257 - // Search 258 - svg.svg( 259 - [ 260 - attribute("stroke", "currentColor"), 261 - attribute("viewBox", "0 0 24 24"), 262 - attribute("fill", "none"), 263 - attribute.class("h-5 w-5"), 264 - attribute("xmlns", "http://www.w3.org/2000/svg"), 265 - ], 266 - [ 267 - svg.path([ 268 - attribute("d", "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"), 269 - attribute("stroke-width", "2"), 270 - attribute("stroke-linejoin", "round"), 271 - attribute("stroke-linecap", "round"), 272 - ]), 273 - ], 274 - ), 260 + // Search - Disabled because I am too lazy to do this rn. 261 + // svg.svg( 262 + // [ 263 + // attribute("stroke", "currentColor"), 264 + // attribute("viewBox", "0 0 24 24"), 265 + // attribute("fill", "none"), 266 + // attribute.class("h-5 w-5"), 267 + // attribute("xmlns", "http://www.w3.org/2000/svg"), 268 + // ], 269 + // [ 270 + // svg.path([ 271 + // attribute("d", "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"), 272 + // attribute("stroke-width", "2"), 273 + // attribute("stroke-linejoin", "round"), 274 + // attribute("stroke-linecap", "round"), 275 + // ]), 276 + // ], 277 + // ), 275 278 ]), 276 279 ]), 277 280 html.div([attribute.class("navbar-center")], [ ··· 458 461 svg.svg( 459 462 [ 460 463 attribute("xmlns", "http://www.w3.org/2000/svg"), 461 - attribute("viewBox", "0 0 24 24"), 464 + 465 + attribute("viewBox", "0 0 .72 .72"), 466 + 462 467 attribute("version", "1.1"), 468 + 469 + attribute("fill", "none"), 470 + 463 471 attribute("height", "24"), 472 + 464 473 attribute("width", "24"), 465 474 ], 466 475 [ 467 - svg.g( 468 - [ 469 - attribute( 470 - "transform", 471 - "matrix(.57653 0 0 .69802 -2.2221 -4.228)", 472 - ), 473 - attribute("fill", "currentColor"), 474 - ], 475 - [ 476 - svg.path([ 477 - attribute( 478 - "d", 479 - "m5.3691 9.627c-0.19546 0.075245-0.38879 0.15579-0.57617 0.25-0.027652 0.013413-0.054772 0.026795-0.082031 0.041016 0.10914 0.076047 0.21858 0.15557 0.30469 0.25781 0.12499 0.1368 0.24891 0.27549 0.39648 0.38867 0.064245 0.04683 0.16051 0.11824 0.22656 0.16016 0.26129 0.16582 0.55027 0.28555 0.83398 0.40625 0.78143 0.27843 1.6018 0.47629 2.3164 0.91211 0.65117 0.43707 1.3067 0.87102 1.9355 1.3398 0.41814 0.33568 0.8314 0.67826 1.291 0.95703 0.48524 0.31301 0.98246 0.61234 1.4199 0.99219 0.31805 0.27601 0.6705 0.50771 1.0059 0.76172 0.32655 0.25744 0.65726 0.50939 0.99219 0.75586 0.28926 0.22266 0.56818 0.45706 0.85742 0.67969 0.52704 0.41425 1.0563 0.82626 1.582 1.2422 1.0179 0.81589 2.0181 1.6539 3.0645 2.4336 0.65528 0.4931 1.3167 0.97738 1.9805 1.459 0.1764 0.128 0.35158 0.2586 0.5293 0.38477 0.2875 0.2041 0.35752 0.24582 0.61523 0.41211 0.01148 0.0074 0.02285 0.01581 0.0332 0.02344 0.01781-0.01183 0.03508-0.02463 0.05273-0.03711 0.1058-0.07483 0.42684-0.31464 0.48633-0.35547 0.88291-0.60595 1.8054-1.1529 2.7188-1.7109 1.4684-0.89144 2.9291-1.7974 4.3535-2.7578 0.6062-0.42505 1.211-0.85151 1.8125-1.2832 0.35129-0.24443 0.6986-0.4944 1.0898-0.67383 0.26148-0.11991 0.53025-0.22314 0.79883-0.32617 0.68138-0.26139 1.3109-0.46849 2.002-0.70508 1.3875-0.45964 2.7439-1.0044 4.0703-1.6172 0.46576-0.20456 0.89236-0.47524 1.3008-0.77539 0.23025-0.16097 0.44607-0.33875 0.63477-0.54688 0.20613-0.24201 0.33905-0.53317 0.45508-0.82617 0.12162-0.35413 0.25749-0.70141 0.35742-1.0625 0.05411-0.23825 0.13476-0.46891 0.2207-0.69727 0.02213-0.05903 0.0511-0.11368 0.08398-0.16602-0.06509-0.037167-0.13164-0.074024-0.19922-0.10547-0.13536-0.055674-0.28069-0.07756-0.42188-0.11328-0.12952-0.044003-0.26316-0.061915-0.39844-0.076172-0.0788-0.00678-0.15735-0.00991-0.23633-0.013672-0.02907-0.00139-0.05765-0.00403-0.08398-0.00781zm-1.0977 0.56445c-0.075371 0.05268-0.14704 0.10708-0.20312 0.18164-0.015495 0.04077-0.028774 0.08397-0.041016 0.12695v24.695c0.082375 0.06016 0.15671 0.16439 0.20312 0.32031 0.020428 0.06863 0.04544 0.13571 0.054687 0.20703 0.015381 0.07298 0.039947 0.14412 0.083984 0.20508 0.11206 0.14764 0.22342 0.2946 0.33398 0.44336 0.050743 0.06572 0.10311 0.13005 0.1543 0.19531h38.451c0.01836-0.01329 0.03767-0.02632 0.05859-0.03906 0.17382-0.10583 0.34701-0.21329 0.52148-0.31836 0.15448-0.13395 0.30149-0.27621 0.45898-0.4082 0.21899-0.20859 0.39726-0.45592 0.55274-0.71484 0.12448-0.20731 0.28208-0.29823 0.41406-0.30078v-23.301c-0.0094-0.02605-0.01793-0.05439-0.02539-0.08398-0.05804-0.23016-0.12489-0.45778-0.19141-0.68555-0.0381-0.12338-0.09593-0.23888-0.1543-0.35352-0.01886-0.03058-0.04023-0.06044-0.06055-0.08984-0.08143 0.21521-0.15829 0.43344-0.20898 0.6582-0.10485 0.37709-0.2448 0.74179-0.37305 1.1113-0.13787 0.34431-0.29717 0.68461-0.54297 0.9668-0.21032 0.22976-0.44536 0.4294-0.70117 0.60742-0.43348 0.31837-0.88713 0.60446-1.3809 0.82227-1.3409 0.61932-2.7127 1.1701-4.1152 1.6348-0.71324 0.24412-1.2763 0.42953-1.9785 0.69726-0.25298 0.09645-0.50541 0.19084-0.75195 0.30274-0.37414 0.1698-0.70556 0.4116-1.041 0.64453-0.60517 0.43432-1.2142 0.8635-1.8242 1.291-1.4302 0.96418-2.8948 1.8726-4.3691 2.7676-0.41294 0.25229-0.82812 0.50162-1.2402 0.75586 0.0099 0.01383 0.01989 0.02918 0.0293 0.04492 0.07968 0.13331 0.16157 0.26974 0.27734 0.375 0.14586 0.07499 0.27651 0.16735 0.39258 0.2832 0.10711 0.13127 0.18289 0.2838 0.26758 0.42969 0.11747 0.17246 0.24353 0.33782 0.36719 0.50586 0.12305 0.17887 0.23558 0.36627 0.33984 0.55664 0.09122 0.16828 0.16861 0.34358 0.24805 0.51758 0.08381 0.20809 0.17868 0.41132 0.26758 0.61719 0.08967 0.1868 0.16117 0.37923 0.22461 0.57617 0.04658 0.14418 0.08273 0.29197 0.13672 0.43359 0.05255 0.14895 0.12435 0.288 0.19336 0.42969 0.0416 0.0965 0.09656 0.18587 0.16211 0.26758 0.05366 0.06286 0.02722 0.02978 0.08398 0.09961 0.289 0.35558-0.07103 0.64714-0.35938 0.29102-0.05329-0.06582-0.02466-0.03115-0.08594-0.10352-0.08546-0.10865-0.16123-0.22452-0.2168-0.35156-0.07514-0.15442-0.15355-0.30846-0.21094-0.4707-0.05602-0.14913-0.09671-0.30125-0.14453-0.45312-0.05887-0.18295-0.12511-0.36184-0.20898-0.53516-0.08742-0.20302-0.18139-0.40411-0.26367-0.60938-0.07462-0.16387-0.14713-0.32959-0.23242-0.48828-0.09416-0.17238-0.19431-0.33944-0.30469-0.50195-0.13363-0.18159-0.27248-0.36043-0.39648-0.54883-0.06546-0.11321-0.12715-0.22942-0.19727-0.33984-0.10843-0.11677-0.25908-0.17157-0.38281-0.26953-0.14681-0.14364-0.26539-0.31073-0.36524-0.49023-0.0041-0.0073-0.0081-0.01428-0.01172-0.02148-0.35574 0.2236-0.70824 0.45174-1.0547 0.68945-0.0027 0.0018-0.43416 0.31811-0.50391 0.36719-0.03839 0.02701-0.07814 0.05204-0.11719 0.07813-0.20276 0.13526-0.36683 0.08763-0.41797-0.02539-0.02251-0.01063-0.04479-0.02387-0.06836-0.03906-0.25772-0.16614-0.32458-0.20846-0.61719-0.41602-0.18137-0.12866-0.35907-0.26201-0.53906-0.39258-0.09527-0.06911-0.19-0.1378-0.28516-0.20703-0.0018 0.0027-4e-3 0.0051-0.0059 0.0078-0.16697 0.25307-0.36277 0.48443-0.57812 0.69726-0.23847 0.19312-0.47956 0.38195-0.71875 0.57422-0.13358 0.12295-0.27811 0.23184-0.41602 0.34961-0.1124 0.093-0.21586 0.19534-0.32227 0.29492-0.07374 0.07581-0.16271 0.13711-0.23633 0.21289-0.0528 0.05436-0.0999 0.11341-0.15039 0.16992-0.29081 0.31256-0.62076 0.58709-0.9375 0.87305-0.25028 0.22718-0.51547 0.43578-0.77148 0.65625-0.16019 0.12829-0.30715 0.2724-0.45898 0.41016-0.12377 0.1216-0.25848 0.2292-0.39648 0.33398-0.36495 0.27709-0.64539-0.09356-0.2793-0.36914 0.12748-0.09596 0.25142-0.19645 0.36523-0.30859 0.15483-0.14045 0.30357-0.28507 0.4668-0.41602 0.25338-0.21792 0.5158-0.42602 0.76367-0.65039 0.15819-0.14282 0.3185-0.28478 0.47656-0.42774 0.03893-0.03521 0.27331-0.24781 0.31836-0.29297 0.03767-0.03775 0.07155-0.07773 0.10742-0.11719 0.13072-0.14628 0.26528-0.28616 0.41602-0.41211 0.11183-0.10426 0.22213-0.2108 0.33984-0.30859 0.14163-0.12008 0.2885-0.23408 0.42578-0.35938 0.22722-0.18254 0.4542-0.36316 0.68359-0.54297 0.20003-0.19557 0.37671-0.41116 0.53125-0.64453v-2e-3l2e-3 -2e-3c-0.44421-0.3246-0.8863-0.65144-1.3262-0.98242-1.0502-0.78249-2.0546-1.6226-3.0762-2.4414-0.52457-0.41429-1.0522-0.82487-1.5781-1.2382-0.28811-0.22153-0.56546-0.45609-0.85352-0.67773-0.33643-0.24747-0.67008-0.50122-0.99805-0.75977-0.34284-0.25571-0.6969-0.49439-1.0215-0.77344-0.42169-0.36505-0.90002-0.65374-1.3672-0.95508-0.47309-0.28738-0.90143-0.6387-1.332-0.98438-0.61906-0.4599-1.2621-0.88667-1.9023-1.3164-0.68579-0.40674-1.4694-0.59616-2.2148-0.86133-0.31137-0.13033-0.62538-0.26118-0.91211-0.44141-0.090572-0.05693-0.17708-0.12457-0.26367-0.1875-0.17369-0.13047-0.32084-0.29146-0.4668-0.45117-0.069151-0.08383-0.16158-0.14363-0.25-0.20508-0.049604-0.03173-0.10131-0.06039-0.15234-0.08984z", 480 - ), 481 - ]), 482 - ], 483 - ), 476 + svg.path([ 477 + attribute("stroke-width", ".072"), 478 + 479 + attribute("stroke-linejoin", "round"), 480 + 481 + attribute("stroke-linecap", "round"), 482 + 483 + attribute("stroke", "currentColor"), 484 + 485 + attribute( 486 + "d", 487 + "m0.074646 0.1641 0.24984 0.15615c0.023346 0.014591 0.052974 0.014591 0.07632 0l0.24984-0.15615m-0.54 0.396h0.504c0.039766 0 0.072-0.032234 0.072-0.072v-0.288c0-0.039764-0.032234-0.072-0.072-0.072h-0.504c-0.039764 0-0.072 0.032236-0.072 0.072v0.288c0 0.039766 0.032236 0.072 0.072 0.072z", 488 + ), 489 + ]), 484 490 ], 485 491 ), 486 492 ], 487 493 ), 488 494 // Bluesky ================================================================================ 489 - //todo 490 - // Tumblr ================================================================================= 495 + html.a( 496 + [ 497 + attribute.target("_blank"), 498 + attribute.href( 499 + "https://witchsky.app/profile/did:plc:jgtfsmv25thfs4zmydtbccnn", 500 + ), 501 + ], 502 + [ 503 + svg.svg( 504 + [ 505 + attribute("xmlns", "http://www.w3.org/2000/svg"), 506 + attribute("viewBox", "0 0 48 24"), 507 + attribute("version", "1.1"), 508 + attribute("fill", "none"), 509 + attribute("height", "24"), 510 + attribute("width", "24"), 511 + ], 512 + [ 513 + svg.path([ 514 + attribute("stroke-width", ".65268"), 515 + attribute("fill", "currentColor"), 516 + attribute( 517 + "d", 518 + "m12.083-4.7208c4.7887 3.6074 9.9404 10.921 11.831 14.845v10.366c0-0.22061-0.08485 0.02872-0.2676 0.56588-0.98686 2.9084-4.8416 14.259-13.656 5.1849-4.6412-4.7776-2.4926-9.5553 5.9557-10.998-4.8331 0.82499-10.267-0.53846-11.757-5.8839-0.42947-1.5377-1.1605-11.009-1.1605-12.289 0-6.408 5.5994-4.3939 9.0547-1.7916zm23.662 0c-4.7887 3.6074-9.9404 10.921-11.831 14.845v10.366c0-0.22061 0.08485 0.02872 0.2676 0.56588 0.98686 2.9084 4.8416 14.259 13.656 5.1849 4.6412-4.7776 2.4926-9.5553-5.9557-10.998 4.8331 0.82499 10.267-0.53846 11.757-5.8839 0.42946-1.5377 1.1605-11.009 1.1605-12.289 0-6.408-5.5987-4.3939-9.0547-1.7916z", 519 + ), 520 + ]), 521 + ], 522 + ), 523 + ], 524 + ), 525 + // Tumblr ================================================================================= 491 526 // html.a( 492 527 // [ 493 528 // attribute.target("_blank"), ··· 648 683 } 649 684 650 685 fn title(title: String) -> Element(msg) { 651 - html.h2([attribute.class("text-3xl text-purple-800 font-light")], [ 686 + html.h2([attribute.class("text-3xl text-accent-content font-light")], [ 652 687 html.text(title), 653 688 ]) 654 689 } ··· 665 700 html.a( 666 701 [ 667 702 href(target), 668 - attribute.class("link link-secondary"), 703 + attribute.class("link link-accent"), 669 704 ], 670 705 [html.text(title)], 671 706 ) ··· 685 720 [ 686 721 attribute.classes([ 687 722 #("", True), 688 - #("text-accent-content bg-accent", is_active), 723 + #("underline", is_active), 724 + // #("border-2 border-dotted border-accent rounded-full", is_active), 689 725 ]), 690 726 ], 691 727 [html.a([href(target)], [html.text(text)])],
+5 -1
src/homepage/djotparse.gleam
··· 9 9 djot 10 10 |> preprocess_tables 11 11 |> jot.to_html 12 - |> string.replace("<a ", "<a class=\"text-info underline\"") 12 + |> string.replace("<a ", "<a class=\"link link-accent\"") 13 + |> string.replace("<strong", "<strong class=\"font-bold\"") 14 + |> string.replace("<em", "<em class=\"italic\"") 15 + |> string.replace("<ul", "<ul class=\"list-inside list-disc\"") 16 + |> string.replace("<ol", "<ol class=\"list-inside list-decimal\"") 13 17 } 14 18 15 19 pub fn preprocess_tables(djot: String) -> String {
+12
written-contents/test.dj
··· 1 + hey you, yes you. *I Love you*. _The misile is lost_. 2 + 3 + - _Not really, no_ 4 + - Well did you? 5 + 6 + {.bg-warning .text-warning-content} 7 + ::: Warning 8 + This is a warning. 9 + Here is a word in [français]{lang=fr}. 10 + ::: 11 + 12 + This is {=highlighted text=}.
-3
written-contents/test.txt
··· 1 - hoi "testing", ik probeer hier 2 - iets uit 3 - wa-