Skip to content

Commit

Permalink
Revert "Put nav at the bottom of the page, so it doesn't move around …
Browse files Browse the repository at this point in the history
…from lesson to lesson."

This reverts commit 4d346ac.
  • Loading branch information
lpil committed Apr 1, 2024
1 parent 1f271d0 commit e3cb979
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
26 changes: 12 additions & 14 deletions src/tour.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -617,20 +617,17 @@ fn lesson_page_render(lesson: Lesson) -> String {
static_content: [render_navbar()],
content: [
h("article", [#("id", "playground")], [
h("section", [#("id", "left"), #("class", "content-nav")], [
h("div", [], [
h("h2", [], [text(lesson.name)]),
htmb.dangerous_unescaped_fragment(string_builder.from_string(
lesson.text,
)),
]),
h("nav", [#("class", "prev-next")], [
navlink("Back", lesson.previous),
text(" — "),
h("a", [#("href", path_table_of_contents)], [text("Contents")]),
text(" — "),
navlink("Next", lesson.next),
]),
h("section", [#("id", "left")], [
h("h2", [], [text(lesson.name)]),
htmb.dangerous_unescaped_fragment(string_builder.from_string(
lesson.text,
)),
h("nav", [#("class", "prev-next")], [
navlink("Back", lesson.previous),
text(" — "),
h("a", [#("href", path_table_of_contents)], [text("Contents")]),
text(" — "),
navlink("Next", lesson.next),
]),
]),
h("section", [#("id", "right")], [
Expand All @@ -639,6 +636,7 @@ fn lesson_page_render(lesson: Lesson) -> String {
]),
h("aside", [#("id", "output")], []),
]),
]),
],
scripts: ScriptConfig(
body: [
Expand Down
6 changes: 0 additions & 6 deletions static/css/pages/lesson.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,4 @@

.mb-0 {
margin-bottom: 0;
}

.content-nav {
display: flex;
flex-direction: column;
justify-content: space-between;
}

0 comments on commit e3cb979

Please sign in to comment.