Skip to content

Commit 0540fc8

Browse files
committed
Add main landmark
1 parent 9254771 commit 0540fc8

1 file changed

Lines changed: 46 additions & 52 deletions

File tree

src/_includes/layout.html

Lines changed: 46 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,61 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
{% include "_head.html" %}
4-
</html>
3+
{% include "_head.html" %}
54
<body>
6-
<!--Website title-->
7-
<h1><a href="/">{{ metadata.title }}</a>
8-
{% if subtitle %}<br><span class="site-subtitle"> <span class="highlight">{{ subtitle }}</span></span>{% endif %}</h1>
9-
<!--Pages excluded from collections, i.e. "index" pages, do not need their own metadata displayed-->
10-
{% if eleventyExcludeFromCollections %}
11-
{{ content }}
12-
{% elsif tags contains "microblog" %}
13-
<!--Microblog single post view-->
14-
<div class="microblog-single">
15-
<div class="microblog-card">
16-
{% if image %}
17-
{% microblogImage image, alt %}
18-
{% endif %}
19-
<div class="microblog-card-content">
20-
{% if title %}
21-
<h3 class="microblog-title">{{ title }}</h3>
5+
<header>
6+
<h1><a href="/">{{ metadata.title }}</a>
7+
{% if subtitle %}<br><span class="site-subtitle"> <span class="highlight">{{ subtitle }}</span></span>{% endif %}</h1>
8+
</header>
9+
<main>
10+
{% if eleventyExcludeFromCollections %}
11+
{{ content }}
12+
{% elsif tags contains "microblog" %}
13+
<div class="microblog-single">
14+
<div class="microblog-card">
15+
{% if image %}
16+
{% microblogImage image, alt %}
2217
{% endif %}
23-
<div class="microblog-meta">
24-
{% if date %}
25-
<span class="microblog-date">{{ date | formatDate }}</span>
18+
<div class="microblog-card-content">
19+
{% if title %}
20+
<h3 class="microblog-title">{{ title }}</h3>
2621
{% endif %}
27-
</div>
28-
<div class="microblog-body">
29-
{{ content }}
22+
<div class="microblog-meta">
23+
{% if date %}
24+
<span class="microblog-date">{{ date | formatDate }}</span>
25+
{% endif %}
26+
</div>
27+
<div class="microblog-body">
28+
{{ content }}
29+
</div>
3030
</div>
3131
</div>
3232
</div>
33-
</div>
34-
{% else %}
35-
<!--Otherwise, display metadata-->
36-
<div class="content">
37-
<h2>{{ title }}</h2>
38-
<div>
39-
<small>{{ date | formatDate }}</small><br>
33+
{% else %}
34+
<div class="content">
35+
<h2>{{ title }}</h2>
36+
<div>
37+
<small>{{ date | formatDate }}</small><br>
38+
</div>
39+
{% if image %}
40+
{% wideImage image, alt %}
41+
{% endif %}
42+
{% if links %}
43+
<p>
44+
{% for link in links %}
45+
{% icon link.image, link.name, "textsize-image" %}
46+
<a href="{{ link.url }}">{{ link.name }}</a>&nbsp;
47+
{% endfor %}
48+
</p>
49+
{% endif %}
50+
{{ content }}
4051
</div>
41-
{% if image %}
42-
{% wideImage image, alt %}
43-
{% endif %}
44-
{% if links %}
45-
<p>
46-
{% for link in links %}
47-
{% icon link.image, link.name, "textsize-image" %}
48-
<a href="{{ link.url }}">{{ link.name }}</a>&nbsp;
49-
{% endfor %}
50-
</p>
51-
{% endif %}
52-
{{ content }}
53-
</div>
54-
{% endif %}
55-
<!--footer-->
52+
{% endif %}
53+
</main>
5654
{% include "_foot.html" %}
57-
<!-- Rough.js library -->
5855
<script defer src="https://cdn.jsdelivr.net/npm/roughjs@4.5.2/bundled/rough.js"></script>
59-
<!-- Masonry.js library -->
6056
<script defer src="https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js"></script>
61-
<!-- imagesLoaded for Masonry -->
6257
<script defer src="https://cdn.jsdelivr.net/npm/imagesloaded@5.0.0/imagesloaded.pkgd.min.js"></script>
63-
<!-- Rough cards initialization -->
6458
<script defer src="/_scripts/rough-cards.js"></script>
65-
<!-- Microblog cards ragged edges and masonry layout -->
6659
<script defer src="/_scripts/microblog-cards.js"></script>
67-
</body>
60+
</body>
61+
</html>

0 commit comments

Comments
 (0)