Skip to content

Commit 18b905b

Browse files
Refactor hero section and layout styles; improve spacing and alignment
1 parent 8245f1f commit 18b905b

File tree

5 files changed

+29
-13
lines changed

5 files changed

+29
-13
lines changed

sass/components/hero.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
display: grid;
88
gap: 1.5rem;
99
grid-template-columns: repeat(12, 1fr);
10-
padding-block: 6rem;
10+
padding-block: 4.5rem;
1111
}
1212

1313
h1 {

sass/components/projects.scss

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
.hero-container {
22
.hero-menu {
3-
display: block;
4-
text-align: center;
5-
margin: auto;
6-
padding-top: 2rem;
3+
margin-block-start: 1.5rem;
4+
display: flex;
5+
justify-content: center;
76

87
ul {
98
display: flex;
109
flex-wrap: wrap;
11-
gap: 0.5rem;
10+
width: 100%;
11+
max-width: 36.75rem;
1212
}
1313

1414
li {
15-
a.btn-secondary {
16-
padding-inline: 0.5rem;
17-
height: 2rem;
15+
flex: 1;
16+
17+
a {
18+
width: 100%;
19+
padding-inline: 0;
20+
21+
&:hover {
22+
background-color: var(--color-secondary-400);
23+
}
24+
}
25+
26+
&:not(:last-child) {
27+
a {
28+
border-inline-end: 0;
29+
}
1830
}
1931
}
2032
}

sass/global/global.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ body {
77
line-height: var(--line-height);
88
}
99

10+
.text-center {
11+
text-align: center;
12+
}

sass/global/layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ main {
1616
margin-block-start: 3rem;
1717

1818
@media (min-width: 62rem) {
19-
margin-block-start: 6rem;
19+
margin-block-start: 4.5rem;
2020
}
2121
}
2222

templates/projects/project.html

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

44
{% block content %}
55
<div class="hero-container">
6+
<div class="hero">
7+
<h1 class="text-center"><span>{{ page.title | safe }}</span></h1>
8+
</div>
69
<div class="hero-menu">
710
<ul>
811
{% set links = page.extra.links %}
@@ -11,9 +14,7 @@
1114
{% endfor %}
1215
</ul>
1316
</div>
14-
<div class="hero">
15-
<h1><span>{{ page.title | safe }}</span></h1>
16-
</div>
17+
1718
</div>
1819

1920
<div class="paragraph">

0 commit comments

Comments
 (0)