not my website
0
fork

Configure Feed

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

Create project page

+18 -1
+18 -1
src/website.gleam
··· 192 192 } 193 193 194 194 fn view_project(model: Model, id: String) -> Element(Msg) { 195 - html.h1([], [element.text("Project: " <> id)]) 195 + let project = 196 + model.projects 197 + |> list.find(fn(project) { project.id == id }) 198 + html.div([attribute.style(project_style)], case project { 199 + Ok(project) -> [ 200 + cluster.of(html.div, [attribute.style(project_bar_style)], [ 201 + html.img([attribute.src(project.img), attribute.style(icon_style)]), 202 + html.h1([], [element.text(project.title)]), 203 + ]), 204 + html.p([], [project.summary]), 205 + html.h2([], [element.text("More information will be added eventually..")]), 206 + ] 207 + Error(_) -> [ 208 + html.h1([attribute.style([#("text-align", "center")])], [ 209 + element.text("Invalid project!"), 210 + ]), 211 + ] 212 + }) 196 213 } 197 214 198 215 const post_style: List(#(String, String)) = [