Skip to content

Commit 0c45ae5

Browse files
committed
feat: index-specific styling
1 parent 4f7296b commit 0c45ae5

4 files changed

Lines changed: 52 additions & 4 deletions

File tree

‎content/_index.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
title: Apollo
33
---
44

5-
# Welcome to Apollo
6-
7-
Apollo is a Linux operating system
5+
{% index_section(id="welcome") %}
6+
A quote
7+
{% end %}

‎sass/_index.scss‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
@use 'variables' as *;
2+
3+
@use 'sass:color';
4+
5+
@media (prefers-color-scheme: light) {
6+
body {
7+
div#welcome {
8+
background: linear-gradient(
9+
180deg,
10+
$light-background-colour,
11+
hsl(270, 36%, 85%) 100%
12+
);
13+
}
14+
}
15+
}
16+
17+
@media (prefers-color-scheme: dark) {
18+
body {
19+
div#welcome {
20+
background: linear-gradient(
21+
180deg,
22+
$dark-background-colour,
23+
hsl(270, 21%, 13%) 100%
24+
);
25+
}
26+
}
27+
}
28+
29+
body {
30+
div.index-section {
31+
div.content {
32+
padding-block: 2em;
33+
}
34+
}
35+
36+
div#welcome {
37+
38+
}
39+
}

‎sass/style.scss‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33

44
@use 'header';
55
@use 'body';
6-
@use 'footer';
6+
@use 'footer';
7+
8+
@use 'index';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<section>
2+
<div {% if id %} id="{{id}}" {% endif %}class="index-section">
3+
<div class="content">
4+
{{body}}
5+
</div>
6+
</div>
7+
</section>

0 commit comments

Comments
 (0)