Skip to content

Commit 42ed30e

Browse files
committed
feature: news styling
1 parent deeead4 commit 42ed30e

File tree

8 files changed

+64
-16
lines changed

8 files changed

+64
-16
lines changed

assets/sass/headings.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
h1 {
2+
font-size: 3.6rem;
3+
line-height: 1.25;
4+
font-weight: 700;
5+
margin-bottom: 2rem;
6+
}
7+
8+
h2 {
9+
font-size: 2.4rem;
10+
line-height: 1.25;
11+
margin-bottom: 1.6rem;
12+
font-weight: 700;
13+
}
14+
15+
h3 {
16+
font-size: 2rem;
17+
line-height: 1.25;
18+
margin-bottom: 1.4rem;
19+
font-weight: 700;
20+
}
21+
22+
h4 {
23+
font-size: 1.8rem;
24+
line-height: 1.25;
25+
margin-bottom: 1.2rem;
26+
font-weight: 700;
27+
}

assets/sass/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
@import "footer.scss";
99
@import "content.scss";
1010
@import "textHighlight.scss";
11+
@import "headings.scss";
1112
@import 'node_modules/@material-design-icons/font/round.scss';

assets/sass/styles.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,16 @@ details[open] summary ~ * {
6969
opacity: 1;
7070
transform: translateY(0);
7171
}
72+
}
73+
74+
p {
75+
margin-bottom: 3.2rem;
76+
}
77+
78+
p:has(p + ul) {
79+
margin-bottom: 0;
80+
}
81+
82+
article p:last-child {
83+
margin-bottom: 0;
7284
}

assets/sass/teaser.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
border-radius: 1rem;
1616
}
1717

18+
.m-teaser__dateline {
19+
font-size: 1.4rem;
20+
}
21+
22+
.m-teaser__headline {
23+
margin-bottom: .5rem;
24+
}
25+
1826
.o-stage {
1927
display: flex;
2028
justify-content: center;

layouts/_default/list.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
<div class="container">
33
<h1 data-pagefind-meta="title">{{ .Title }}</h1>
44
{{ .Content }} {{ range .Pages }}
5-
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
6-
{{ .Summary }} {{ end }}
5+
<div class="m-teaser">
6+
<a href="{{ .RelPermalink }}">
7+
<h2 class="m-teaser__headline">{{ .LinkTitle }}</h2>
8+
</a>
9+
<div>{{ .Summary | plainify | truncate 200 }}</div>
10+
</div>
11+
{{ end }}
712
</div>
813
{{ end }}

layouts/_default/single.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{{ define "main" }}
2-
<div class="container">
2+
<article class="container">
33
<h1 data-pagefind-meta="title">{{ .Title }}</h1>
44

55
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
66
{{ $dateHuman := .Date | time.Format ":date_long" }}
77
<div class="updateDate">
88
<time datetime="{{ $dateMachine }}">Zuletzt aktualisiert: {{ $dateHuman }}</time>
99
</div>
10-
<br>
11-
<br>
1210

1311
<div class="content">
1412
{{ .Content }}
@@ -24,5 +22,5 @@ <h3>See Also</h3>
2422
</ul>
2523
{{ end }}
2624
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
27-
</div>
25+
</article>
2826
{{ end }}

layouts/country/single.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
{{ define "main" }}
2-
<div class="container">
2+
<article class="container">
33
<h1 data-pagefind-meta="title">{{ .Title }}</h1>
44

55
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
66
{{ $dateHuman := .Date | time.Format ":date_long" }}
77
<div class="updateDate">
88
<time datetime="{{ $dateMachine }}">Zuletzt aktualisiert: {{ $dateHuman }}</time>
99
</div>
10-
<br>
11-
<br>
12-
10+
<hr>
1311
<div class="tableOfContents">
1412
{{ .TableOfContents }}
1513
</div>
14+
<hr>
1615

1716
<div class="content" data-pagefind-weight="2">
1817
{{ .Content }}
@@ -28,5 +27,5 @@ <h3>See Also</h3>
2827
</ul>
2928
{{ end }}
3029
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
31-
</div>
30+
</article>
3231
{{ end }}

layouts/operator/single.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
{{ define "main" }}
2-
<div class="container">
2+
<article class="container">
33
<h1 data-pagefind-meta="title">{{ .Title }}</h1>
44

55
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
66
{{ $dateHuman := .Date | time.Format ":date_long" }}
77
<div class="updateDate">
88
<time datetime="{{ $dateMachine }}">Zuletzt aktualisiert: {{ $dateHuman }}</time>
99
</div>
10-
<br>
11-
<br>
12-
10+
<hr>
1311
<div class="tableOfContents">
1412
{{ .TableOfContents }}
1513
</div>
16-
14+
<hr>
1715
<div class="content" data-pagefind-weight="3">
1816
{{ .Content }}
1917
</div>

0 commit comments

Comments
 (0)