Skip to content

Commit

Permalink
Don't use article width on /examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfeldman committed Nov 20, 2023
1 parent f0183d2 commit 451241c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion www/main.roc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,17 @@ view = \page, htmlContent ->
when page is
"index.html" -> [id "homepage-main"]
"tutorial.html" -> [id "tutorial-main", class "article-layout"]
_ -> [class "article-layout"]
_ ->
if Str.startsWith page "examples/" && page != "examples/index.html" then
# Individual examples should render wider than articles.
# Otherwise the width is unreasonably low for the code blocks,
# and those pages don't tend to have big paragraphs anyway.
# Keep the article width on examples/index.html though,
# because otherwise when you're clicking through the top nav links,
# /examples has a surprisingly different width from the other links.
[id "example-main"]
else
[class "article-layout"]

html [lang "en", class "no-js"] [
head [] [
Expand Down

0 comments on commit 451241c

Please sign in to comment.