Skip to content

Commit 2f0223f

Browse files
committed
update line spacing and conditionally render sources heading
1 parent 15ea017 commit 2f0223f

File tree

4 files changed

+44
-27
lines changed

4 files changed

+44
-27
lines changed

assets/scss/components/_article-question.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
max-width: 65rem;
2323
margin: 0 auto;
2424
height: fit-content;
25-
padding: 2.5rem;
26-
line-height: 1.6rem;
25+
padding: 2.5rem;
2726
}
2827

2928
&__title {
@@ -65,6 +64,7 @@
6564
&__body {
6665
font-size: 1.15rem;
6766
margin: 3rem 0;
67+
line-height: 1.6rem;
6868
}
6969

7070
&__sources {

assets/scss/components/_faq-question.scss

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,30 @@
44
min-height: 90vh;
55
height: fit-content;
66
padding-bottom: 5rem;
7+
a {
8+
color: #c40729;
9+
}
10+
11+
a:hover {
12+
color: #ff1f48;
13+
}
14+
15+
a:visited {
16+
color: #c40729;
17+
}
718
}
819

920
&__content {
1021
max-width: 65rem;
1122
margin: 0 auto;
1223
height: fit-content;
13-
padding: 2.5rem;
24+
padding: 2.5rem;
1425
}
1526

1627
&__title {
1728
font-size: 2.5rem;
1829
font-weight: 700;
19-
margin-bottom: 2rem;
30+
height: fit-content;
2031
}
2132

2233
&__contributors {
@@ -26,6 +37,7 @@
2637
&__summary {
2738
font-size: 1.5rem;
2839
margin-bottom: 2rem;
40+
line-height: 1.8rem;
2941
}
3042

3143
&__last-updated {
@@ -37,6 +49,7 @@
3749
font-size: 1.15rem;
3850
margin: 3rem 0;
3951
margin-bottom: 4rem;
52+
line-height: 1.6rem;
4053
}
4154

4255
&__sources {

layouts/_default/article-question.html

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,20 @@ <h1 class="article-question__title">{{ .Title }}</h1>
3535
</div>
3636
<div style="height: 0.2rem"></div>
3737
{{ with .Params.sources }}
38-
<div class="resource__sources">
39-
<div>
40-
<i class="fas fa-external-link-alt" aria-hidden="true"></i>
41-
<span class="resource__sources__heading">Links and Sources</span>
38+
{{ if gt (len .) 0 }}
39+
<div class="resource__sources">
40+
<div>
41+
<i class="fas fa-external-link-alt" aria-hidden="true"></i>
42+
<span class="resource__sources__heading">Links and Sources</span>
43+
</div>
44+
{{ range $index, $source := . }}
45+
<p>
46+
({{ add $index 1 }})
47+
<a href="{{ $source.link }}">{{ $source.name }}</a>
48+
</p>
49+
{{ end }}
4250
</div>
43-
{{ range $index, $source := . }}
44-
<p>
45-
({{ add $index 1 }})
46-
<a href="{{ $source.link }}">{{ $source.name }}</a>
47-
</p>
48-
{{ end }}
49-
</div>
51+
{{ end }}
5052
{{ end }}
5153
</div>
5254
</div>

layouts/_default/faq-question.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,21 @@ <h1 class="faq-question__title">{{ .Title }}</h1>
3535
</div>
3636
<div style="height: 0.2rem"></div>
3737
{{ with .Params.sources }}
38-
<div class="resource__sources">
39-
<div>
40-
<i class="fas fa-external-link-alt" aria-hidden="true"></i>
41-
<span class="resource__sources__heading">Links and Sources</span>
38+
{{ if gt (len .) 0 }}
39+
<div class="resource__sources">
40+
<div>
41+
<i class="fas fa-external-link-alt" aria-hidden="true"></i>
42+
<span class="resource__sources__heading">Links and Sources</span>
43+
</div>
44+
{{ range $index, $source := . }}
45+
<p>
46+
({{ add $index 1 }})
47+
<a href="{{ $source.link }}">{{ $source.name }}</a>
48+
</p>
49+
{{ end }}
4250
</div>
43-
{{ range $index, $source := . }}
44-
<p>
45-
({{ add $index 1 }})
46-
<a href="{{ $source.link }}">{{ $source.name }}</a>
47-
</p>
48-
{{ end }}
49-
</div>
50-
{{ end }}
51+
{{ end }}
52+
{{ end }}
5153
</div>
5254
</div>
5355
{{ end }}

0 commit comments

Comments
 (0)