Skip to content

Commit d874957

Browse files
Properly format project page descriptions
1 parent 44e8c10 commit d874957

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/website/component.gleam

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ pub fn text_page(
6161
]),
6262
])
6363
}
64+
65+
pub fn dangerous_html(html: String) -> Element(a) {
66+
html.span([attribute.attribute("dangerous-unescaped-html", html)],[])
67+
}

src/website/page/project.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ pub fn view(project: Project) -> Element(a) {
1414
]),
1515
html.div([attribute.class("mx-auto max-w-4xl px-4 sm:px-6 lg:px-8")], [
1616
html.div([attribute.class("py-8 leading-8")], [
17-
html.p([attribute.class("text-xl")], [html.text(project.description)]),
17+
html.p([attribute.class("text-xl")], [component.dangerous_html(project.description)]),
1818
]),
19-
html.text(project.youtube),
19+
component.dangerous_html(project.youtube),
2020
html.a(
2121
[
2222
attribute.href(project.download),

0 commit comments

Comments
 (0)