Skip to content

Commit

Permalink
fix: multiple h1 tags per page
Browse files Browse the repository at this point in the history
  • Loading branch information
emily-curry committed May 4, 2024
1 parent 3de8c47 commit 7ee086b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion assets/styles/fonts/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$font-family-h1: Raleway, Impact, Haettenschweiler, "Arial Narrow Bold",
sans-serif;
$font-family-h2: Ubuntu, Arial, Helvetica, sans-serif;
$font-family-h3: Ubuntu, Arial, Helvetica, sans-serif;
$font-family-body: "Maven Pro", "Lucida Sans", "Lucida Sans Regular",
"Lucida Grande", "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
6 changes: 3 additions & 3 deletions assets/styles/fonts/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ body {
font-family: $font-family-body;
}

h1 {
h1,
h2 {
font-family: $font-family-h1;
}

h2,
h3,
h4 {
font-family: $font-family-h2;
font-family: $font-family-h3;
}
11 changes: 8 additions & 3 deletions assets/styles/theme/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ body {
color: $color-text;
}

h2 {
font-size: 1.75rem;
}

a {
color: $color-tertiary;
text-decoration: none;
Expand Down Expand Up @@ -33,7 +37,8 @@ ul {

main {
padding-bottom: 1rem;
& > h1 {
& > h1,
& > h2 {
padding-left: 1rem;
padding-right: 1rem;
margin-top: 0.5rem;
Expand Down Expand Up @@ -70,12 +75,12 @@ article {
}

& > .weekday {
font-family: $font-family-h2;
font-family: $font-family-h3;
font-weight: 600;
}

& > .day {
font-family: $font-family-h2;
font-family: $font-family-h3;
font-weight: 900;
font-size: 2.5rem;
}
Expand Down
2 changes: 1 addition & 1 deletion layouts/events/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>Upcoming Events</h1>
<footer class="past-events"><span>Looking for <a href='{{ ($.Site.GetPage "past-events").RelPermalink }}'>past events</a>?</span></footer>
{{ $series := slice }}{{ range .Site.Taxonomies.series }}{{ $series = append .Page $series }}{{ end }}
{{ with where $series "Params.schedule" true }}
<h1>Schedule</h1>
<h2>Schedule</h2>
<ul class="series-summary">
{{ range (sort . "Weight") }}{{ partial "series-li.html" . }}{{ end }}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions layouts/games/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h1>{{ .Title }}</h1>
{{ end }}
{{ $games_list := where (where .Site.RegularPages "Section" "events") "Params.games" "intersect" (slice .Params.title) }}
{{ with $games_list }}
<h1>
<h2>
Events
</h1>
</h2>
<ul class="events">
{{ range (.ByParam "start_date").Reverse }}
{{ partial "events-li.html" . }}
Expand Down
13 changes: 7 additions & 6 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
{{ define "main" }}
<main aria-role="main">
<h1>{{ .Site.Title }}</h1>
<article>
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{ .Content }}
</article>
{{ $events_list := where (where .Site.RegularPages "Section" "events") "Params.start_date" "ge" now }}
{{ with $events_list }}
<h1>
<h2>
Upcoming Events
</h1>
</h2>
<ul class="events">
{{ range first 3 (.ByParam "start_date") }}
{{ partial "events-li.html" . }}
{{ end }}
<li class="content-item ml">
<h2 id="home-more-events"><a href='{{ ($.Site.GetPage "events").RelPermalink }}'>More...</a></h2>
<h3 id="home-more-events"><a href='{{ ($.Site.GetPage "events").RelPermalink }}'>More...</a></h3>
</li>
</ul>
{{ end }}
{{ $recent_list := where (where (where .Site.RegularPages "Section" "events") "Params.start_date" "lt" now) "Params.start_date" "ge" (now.AddDate 0 -1 0) }}
{{ with $recent_list }}
<h1>
<h2>
Recent Events
</h1>
</h2>
<ul class="events">
{{ range first 3 (.ByParam "start_date").Reverse }}
{{ partial "events-li.html" . }}
{{ end }}
<li class="content-item ml">
<h2 id="home-recent-events"><a href='{{ ($.Site.GetPage "past-events").RelPermalink }}'>More...</a></h2>
<h3 id="home-recent-events"><a href='{{ ($.Site.GetPage "past-events").RelPermalink }}'>More...</a></h3>
</li>
</ul>
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/series/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<main aria-role="main" class="series">
<h1>{{ .Title }}</h1>
{{ with .Content }}<article>{{ . }}</article>{{ end }}
<h1>Schedule</h1>
<h2>Schedule</h2>
<div class="schedule">
<div class="gutter"></div>
{{ partial "schedule.html" . }}
</div>
<h1>Events</h1>
<h2>Events</h2>
<ul class="events">
{{ range (.Pages.ByParam "start_date").Reverse }}
{{ partial "events-li.html" . }}
Expand Down

0 comments on commit 7ee086b

Please sign in to comment.