Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 layout: fix HTML, avoid nested main #1137

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions assets/scss/_main-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@

.td-main {
flex-grow: 1;
}

main {
@include media-breakpoint-up(md) {
padding-top: 5.5rem;
}


padding-bottom: 2rem;
}
.td-404 main,
.td-main main {
padding-top: 1.5rem;
padding-bottom: 2rem;
@include media-breakpoint-up(md) { padding-top: 5.5rem; }
}
Comment on lines +28 to 32
Copy link
Collaborator Author

@chalin chalin Jul 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a refactoring of the selector .td-main main so that the style definition can be reused for .td-404 main, plus the added non-media-breakpoint base style of padding-top: 1.5rem. IMHO, the result looks better if you look at the screenshots in the Conversation tab.

14 changes: 6 additions & 8 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{{ define "main"}}
<main id="main">
<div>
<h1 id="title">Not found</h1>
<p>Oops! This page doesn't exist. Try going back to our <a href="{{ "" | relURL }}">home page</a>.</p>
</div>
</main>
{{ end }}
{{ define "main" -}}
<div class="td-content">
<h1>Not found</h1>
<p>Oops! This page doesn't exist. Try going back to the <a href="{{ "" | relURL }}">home page</a>.</p>
</div>
{{- end }}