my page ollie.earth
0
fork

Configure Feed

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

swap mars pic to svg; and move some stuff into functions so blogs wll actually look neat :3

ollie 03fa939c 72ce4da2

+158 -155
+158 -155
src/page.gleam
··· 32 32 let md = 33 33 markdown.default() 34 34 |> markdown.markdown_path("./blog") 35 + |> markdown.route_prefix("blog") 36 + |> markdown.template(fn(post, _posts) { page(post.contents) }) 35 37 36 38 config.new("https://page.ollie.earth") 37 39 |> config.output_dir("./dist") ··· 41 43 |> config.route("/", home_view) 42 44 } 43 45 44 - fn home_view(posts: List(post.Post(Nil))) -> Element(Nil) { 45 - let sorted = list.sort(posts, fn(a, b) { timestamp.compare(b.date, a.date) }) 46 - 46 + fn page(content) { 47 47 html.html([attribute.lang("en")], [ 48 48 html.head([], [ 49 49 html.meta([ ··· 88 88 html.body([], [ 89 89 html.div( 90 90 [attribute.class("container"), attribute.style("max-width", "850px")], 91 - [ 92 - html.nav([attribute.attribute("data-topnav", "")], [ 93 - html.div([attribute.class("hstack")], [ 94 - html.div([attribute.class("hstack")], [ 95 - link_icon( 96 - to: "ollie.earth", 97 - at: "https://ollie.earth", 98 - with_image: "/media/small_snoot_round.png", 99 - size: Small, 100 - scaling: None, 101 - ), 102 - html.div([attribute.style("font-size", "var(--text-2)")], [ 103 - element.text("ollie.earth"), 104 - ]), 105 - ]), 106 - html.div( 107 - [ 108 - attribute.class("hstack hide-s"), 109 - ], 110 - [ 111 - html.a([attribute.href("https://en.pronouns.page/@liiv")], [ 112 - badge.badge([], [element.text("pronouns")]), 113 - ]), 114 - html.a([attribute.href("https://www.last.fm/user/nnuuvv")], [ 115 - badge.badge([], [element.text("lastfm")]), 116 - ]), 117 - ], 118 - ), 119 - // socials(Some("hide-md"), Size(26, 26)), 91 + content, 92 + ), 93 + ]), 94 + ]) 95 + } 96 + 97 + fn home_view(posts: List(post.Post(Nil))) -> Element(Nil) { 98 + let sorted = list.sort(posts, fn(a, b) { timestamp.compare(b.date, a.date) }) 99 + 100 + page([ 101 + html.nav([attribute.attribute("data-topnav", "")], [ 102 + html.div([attribute.class("hstack")], [ 103 + html.div([attribute.class("hstack")], [ 104 + link_icon( 105 + to: "ollie.earth", 106 + at: "https://ollie.earth", 107 + with_image: "/media/small_snoot_round.png", 108 + size: Small, 109 + scaling: None, 110 + ), 111 + html.div([attribute.style("font-size", "var(--text-2)")], [ 112 + element.text("ollie.earth"), 113 + ]), 114 + ]), 115 + html.div( 116 + [ 117 + attribute.class("hstack hide-s"), 118 + ], 119 + [ 120 + html.a([attribute.href("https://en.pronouns.page/@liiv")], [ 121 + badge.badge([], [element.text("pronouns")]), 122 + ]), 123 + html.a([attribute.href("https://www.last.fm/user/nnuuvv")], [ 124 + badge.badge([], [element.text("lastfm")]), 120 125 ]), 126 + ], 127 + ), 128 + // socials(Some("hide-md"), Size(26, 26)), 129 + ]), 130 + ]), 131 + html.main([], [ 132 + html.div([attribute.class("container")], [ 133 + html.h3([], [element.text("hi there!")]), 134 + html.p([], [ 135 + element.text("im ollie, a developer from germany"), 136 + html.br([]), 137 + element.text("welcome to my little corner of the internet"), 138 + ]), 139 + html.p([], [ 140 + element.text( 141 + "i enjoy backend development, devops, self hosting and, these days, occasionally gaming", 142 + ), 143 + html.br([]), 144 + element.text( 145 + "you can find my public facing services below (the ones i remembered to put here at least...)", 146 + ), 147 + ]), 148 + 149 + html.hr([]), 150 + 151 + html.section([], [ 152 + html.h3([], [element.text("stuff hosted by me")]), 153 + html.div([attribute.class("hstack")], [ 154 + svgs.services(None, svgs.Size(3.25, 3.25)), 121 155 ]), 122 - html.main([], [ 123 - html.div([attribute.class("container")], [ 124 - html.h3([], [element.text("hi there!")]), 125 - html.p([], [ 126 - element.text("im ollie, a developer from germany"), 127 - html.br([]), 128 - element.text("welcome to my little corner of the internet"), 129 - ]), 130 - html.p([], [ 131 - element.text( 132 - "i enjoy backend development, devops, self hosting and, these days, occasionally gaming", 133 - ), 134 - html.br([]), 135 - element.text( 136 - "you can find my public facing services below (the ones i remembered to put here at least...)", 137 - ), 138 - ]), 156 + ]), 139 157 140 - html.hr([]), 158 + html.hr([]), 141 159 142 - html.section([], [ 143 - html.h3([], [element.text("stuff hosted by me")]), 144 - html.div([attribute.class("hstack")], [ 145 - svgs.services(None, svgs.Size(3.25, 3.25)), 146 - ]), 147 - ]), 160 + html.section([], [ 161 + html.h3([], [element.text("people and projects i like")]), 162 + html.div([attribute.class("hstack")], [ 163 + link_icon( 164 + to: "mar", 165 + at: "https://strawmelonjuice.com", 166 + with_image: "https://strawmelonjuice.com/strawmelonjuice.svg", 167 + size: Large, 168 + scaling: None, 169 + ), 170 + link_icon( 171 + to: "gleam", 172 + at: "https://gleam.run", 173 + with_image: "/media/lucy.svg", 174 + size: Large, 175 + scaling: Some(Scaling(Some("auto"), Some("85%"))), 176 + ), 177 + link_icon( 178 + to: "lustre", 179 + at: "https://github.com/lustre-labs", 180 + with_image: "/media/lustre.png", 181 + size: Large, 182 + scaling: None, 183 + ), 184 + // louis 185 + // giacomo 186 + // hayleigh 187 + // mar 188 + // gleam 189 + // lustre 190 + ]), 191 + ]), 148 192 149 - html.hr([]), 193 + html.hr([]), 150 194 151 - html.section([], [ 152 - html.h3([], [element.text("people and projects i like")]), 153 - html.div([attribute.class("hstack")], [ 154 - link_icon( 155 - to: "mar", 156 - at: "https://strawmelonjuice.com", 157 - with_image: "https://strawmelonjuice.com/strawmelonjuice.png", 158 - size: Large, 159 - scaling: None, 160 - ), 161 - link_icon( 162 - to: "gleam", 163 - at: "https://gleam.run", 164 - with_image: "/media/lucy.svg", 165 - size: Large, 166 - scaling: Some(Scaling(Some("auto"), Some("85%"))), 167 - ), 168 - link_icon( 169 - to: "lustre", 170 - at: "https://github.com/lustre-labs", 171 - with_image: "/media/lustre.png", 172 - size: Large, 173 - scaling: None, 174 - ), 175 - // louis 176 - // giacomo 177 - // hayleigh 178 - // mar 179 - // gleam 180 - // lustre 181 - ]), 182 - ]), 183 - 184 - html.hr([]), 195 + html.section([], [ 196 + html.h3([], [element.text("me in other places")]), 197 + svgs.socials(None, svgs.Size(3.25, 3.25)), 198 + ]), 185 199 186 - html.section([], [ 187 - html.h3([], [element.text("me in other places")]), 188 - svgs.socials(None, svgs.Size(3.25, 3.25)), 189 - ]), 200 + html.hr([]), 190 201 191 - html.hr([]), 202 + html.h3([], [ 203 + element.text("this is where id put my blog posts..."), 204 + ]), 205 + element.text("IF I HAD ANY!"), 192 206 193 - html.h3([], [ 194 - element.text("this is where id put my blog posts..."), 207 + // html.img([attribute.src("/media/ref.png")]), 208 + // html.img([attribute.src("/media/puppy.png")]), 209 + html.ul( 210 + [], 211 + list.map(sorted, fn(p) { 212 + html.li([], [ 213 + html.a([attribute.href("/blog/" <> p.slug)], [ 214 + element.text(p.title), 195 215 ]), 196 - element.text("IF I HAD ANY!"), 197 - 198 - // html.img([attribute.src("/media/ref.png")]), 199 - // html.img([attribute.src("/media/puppy.png")]), 200 - html.ul( 201 - [], 202 - list.map(sorted, fn(p) { 203 - html.li([], [ 204 - html.a([attribute.href("/blog/" <> p.slug)], [ 205 - element.text(p.title), 206 - ]), 207 - ]) 208 - }), 209 - ), 210 - 211 - html.footer([attribute.class("footer text-light")], [ 212 - html.p([], [ 213 - element.text("made with "), 214 - html.a([attribute.href("https://gleam.run")], [ 215 - element.text("gleam"), 216 - ]), 217 - element.text(" using "), 218 - html.a([attribute.href("https://blogat.to")], [ 219 - element.text("blogatto"), 220 - ]), 221 - element.text(", "), 222 - html.a([attribute.href("https://oat.ink")], [ 223 - element.text("oat ui"), 224 - ]), 216 + ]) 217 + }), 218 + ), 225 219 226 - element.text(" and "), 227 - html.a( 228 - [ 229 - attribute.href( 230 - "https://github.com/daniellionel01/glaze/tree/main/glaze_oat", 231 - ), 232 - ], 233 - [ 234 - element.text("glaze_oat"), 235 - ], 236 - ), 237 - ]), 220 + html.footer([attribute.class("footer text-light")], [ 221 + html.p([], [ 222 + element.text("made with "), 223 + html.a([attribute.href("https://gleam.run")], [ 224 + element.text("gleam"), 225 + ]), 226 + element.text(" using "), 227 + html.a([attribute.href("https://blogat.to")], [ 228 + element.text("blogatto"), 229 + ]), 230 + element.text(", "), 231 + html.a([attribute.href("https://oat.ink")], [ 232 + element.text("oat ui"), 233 + ]), 238 234 239 - html.div( 240 - [attribute.class("carbonbadge"), attribute.id("wcb")], 241 - [], 235 + element.text(" and "), 236 + html.a( 237 + [ 238 + attribute.href( 239 + "https://github.com/daniellionel01/glaze/tree/main/glaze_oat", 242 240 ), 243 - html.script( 244 - [ 245 - attribute("defer", ""), 246 - attribute.src( 247 - "https://unpkg.com/website-carbon-badges@1.1.3/b.min.js", 248 - ), 249 - ], 250 - "", 251 - ), 252 - ]), 253 - ]), 241 + ], 242 + [ 243 + element.text("glaze_oat"), 244 + ], 245 + ), 254 246 ]), 255 - ], 256 - ), 247 + 248 + html.div([attribute.class("carbonbadge"), attribute.id("wcb")], []), 249 + html.script( 250 + [ 251 + attribute("defer", ""), 252 + attribute.src( 253 + "https://unpkg.com/website-carbon-badges@1.1.3/b.min.js", 254 + ), 255 + ], 256 + "", 257 + ), 258 + ]), 259 + ]), 257 260 ]), 258 261 ]) 259 262 }