Skip to content

Commit 8d34f73

Browse files
committed
chore: enhance responsiveness
1 parent 89189e3 commit 8d34f73

File tree

8 files changed

+76
-31
lines changed

8 files changed

+76
-31
lines changed

src/content/sections/de/Services.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Sprite from '../../../components/Sprite.astro';
77

88
<ServicesSection>
99

10-
<h2>Was wir anbieten</h2>
10+
<h2 slot="title">Was wir anbieten</h2>
1111

1212
<Tabs>
1313
<TabsList>

src/content/sections/en/Services.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Sprite from '../../../components/Sprite.astro';
77

88
<ServicesSection>
99

10-
<h2>What we offer</h2>
10+
<h2 slot="title">What we offer</h2>
1111

1212
<Tabs>
1313
<TabsList>

src/layouts/Shell.css

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,28 @@
4646

4747
@media screen and (max-width: 400px) {
4848
:root {
49+
--font-size: 12px;
4950
--size-page-padding: 1rem;
5051
}
5152
}
5253

54+
@media screen and (min-width: 401px) {
55+
:root {
56+
--font-size: 12px;
57+
--size-page-padding: 1rem;
58+
}
59+
}
60+
61+
@media screen and (min-width: 640px) {
62+
:root {
63+
--font-size: 12px;
64+
}
65+
}
66+
5367
@media screen and (min-width: 640px) {
68+
:root {
69+
--font-size: 14px;
70+
}
5471
}
5572

5673
@media screen and (min-width: 1025px) {
@@ -162,34 +179,50 @@ h6 {
162179
}
163180

164181
h1 {
165-
font-size: 2em;
182+
font-size: 1.7rem;
166183
margin-top: 0;
167184
}
168185

169186
h2 {
170-
font-size: 1.7em;
187+
font-size: 1.5rem;
171188
}
172189

173190
h3 {
174-
font-size: 1.5em;
191+
font-size: 1.3rem;
175192
}
176193

177194
h4 {
178-
font-size: 1.3em;
195+
font-size: 1.2rem;
179196
}
180197

181198
h5 {
182-
font-size: 1.2em;
199+
font-size: 1.1rem;
183200
}
184201

185202
h5 {
186-
font-size: 1.1em;
203+
font-size: 1.05rem;
187204
}
188205

189206
main {
190207
display: flex;
191208
flex-direction: column;
192209
flex-grow: 1;
210+
hyphens: auto;
211+
212+
section {
213+
&.page-padding {
214+
padding-block: var(--size-gutter-massive);
215+
}
216+
217+
header {
218+
text-align: center;
219+
220+
> * {
221+
margin: 0;
222+
margin-bottom: var(--size-gutter-big);
223+
}
224+
}
225+
}
193226

194227
a {
195228
color: var(--color-primary-90);

src/layouts/sections/QuestionsSection.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const questions = questionsCollection.flatMap((q) => {
1414
questions.sort(() => Math.random() - 0.5);
1515
---
1616

17-
<section>
17+
<section class="page-padding">
1818
<Carousel>
1919
{
2020
questions.map((q) => (
@@ -33,7 +33,6 @@ questions.sort(() => Math.random() - 0.5);
3333
<style>
3434
section {
3535
background-color: var(--color-background);
36-
padding: 8rem var(--size-page-padding);
3736
user-select: none;
3837

3938
.carousel .carousel-viewport {

src/layouts/sections/ReferencesSection.astro

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ const companies = await getCollection("referenceCompanies", (entry) => !entry.da
88
const projects = await getCollection("referenceProjects", (entry) => entry.data.locale === locale);
99
---
1010

11-
<section>
12-
<slot name="title" />
11+
<section class="page-padding">
12+
<header>
13+
<slot name="title" />
14+
</header>
1315
<div class="references-projects">
1416
{
1517
projects.map((p) => (
@@ -35,7 +37,6 @@ const projects = await getCollection("referenceProjects", (entry) => entry.data.
3537
<style>
3638
section {
3739
background-color: var(--color-white);
38-
padding: 8rem var(--size-page-padding);
3940
z-index: 1;
4041
}
4142

@@ -48,7 +49,8 @@ const projects = await getCollection("referenceProjects", (entry) => entry.data.
4849

4950
:where(.references-projects) {
5051
display: grid;
51-
grid-template-columns: repeat(2, 1fr);
52+
grid-template-columns: repeat(2, minmax(0, 1fr));
53+
grid-template-rows: auto auto 1fr;
5254
gap: var(--size-gutter-big);
5355
margin-block-end: var(--size-gutter-big);
5456

@@ -58,28 +60,26 @@ const projects = await getCollection("referenceProjects", (entry) => entry.data.
5860

5961
div:first-child {
6062
grid-column: span 2;
61-
62-
h3 {
63-
min-height: 3rem;
64-
}
6563
}
6664

6765
h3 {
68-
min-height: 5rem;
66+
margin: 0;
6967
}
7068

71-
div {
69+
> div {
70+
display: grid;
71+
grid-row: span 3;
72+
grid-template-rows: subgrid;
7273
background-color: var(--color-background);
7374
padding: var(--size-gutter-big);
74-
display: flex;
75-
flex-direction: column;
76-
align-items: center;
75+
justify-items: center;
76+
align-items: start;
7777
}
7878
}
7979

8080
:where(.references-companies) {
8181
display: grid;
82-
grid-template-columns: repeat(4, 1fr);
82+
grid-template-columns: repeat(4, minmax(0, 1fr));
8383
gap: var(--size-gutter-big);
8484

8585
a {
@@ -98,7 +98,7 @@ const projects = await getCollection("referenceProjects", (entry) => entry.data.
9898

9999
@media screen and (max-width: 1600px) {
100100
.references-companies {
101-
grid-template-columns: repeat(2, 1fr);
101+
grid-template-columns: repeat(2, minmax(0, 1fr));
102102
}
103103
}
104104

src/layouts/sections/ServicesSection.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<section>
1+
<section class="page-padding">
2+
<header>
3+
<slot name="title" />
4+
</header>
25
<slot />
36
</section>
47

58
<style>
69
section {
710
background-color: var(--color-white);
8-
padding: 8rem var(--size-page-padding);
911
z-index: 1;
1012

1113
.tab {

src/layouts/sections/SpotlightSection.astro

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import Carousel from "../../components/Carousel.astro";
6868

6969
h3 {
7070
margin: 0;
71+
font-size: 1.7rem;
7172
}
7273
}
7374

@@ -89,11 +90,23 @@ import Carousel from "../../components/Carousel.astro";
8990
align-items: center;
9091
justify-content: flex-end;
9192
font-size: 1.2rem;
93+
padding: 0;
9294

9395
> * {
94-
width: 90%;
96+
width: 95%;
9597
}
9698
}
9799
}
100+
101+
@media screen and (max-width: 640px) {
102+
.background-icon {
103+
img {
104+
margin-block-start: 20%;
105+
}
106+
}
107+
.carousel-overlay {
108+
padding-block-end: 20%;
109+
}
110+
}
98111
}
99112
</style>

src/layouts/sections/TechnologiesSection.astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const technologies = await getCollection("technologies", (entry) => entry.data.l
1515
const randomNumber = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min;
1616
---
1717

18-
<section class:list={[className]}>
18+
<section class:list={[className, "page-padding"]}>
1919
<header>
2020
<slot name="title" />
2121
</header>
@@ -43,14 +43,12 @@ const randomNumber = (min: number, max: number) => Math.floor(Math.random() * (m
4343
display: grid;
4444
grid-template-areas: "header header" "tools main";
4545
grid-template-columns: 2fr minmax(20rem, 1fr);
46-
padding: var(--size-gutter-big) var(--size-page-padding) 8rem var(--size-page-padding);
4746
z-index: 1;
4847
gap: var(--size-gutter-big);
4948
}
5049

5150
header {
5251
grid-area: header;
53-
text-align: center;
5452
margin-block-end: var(--size-gutter-big);
5553
}
5654

0 commit comments

Comments
 (0)