Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage responsive fixes #341

Merged
merged 5 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 14 additions & 21 deletions src/lib/molecules/home-campus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<section>
<h2>
Buurt<span>campus</span>
<span>{data.campusInfos[0].title}</span>
<span>{data.campusInfos[0].title2}</span>
</h2>
<article>
Expand All @@ -15,8 +15,8 @@

<style>
section {
padding: 0 3em 3em;
height: 70vh;
padding: 0 1em var(--section-padding-y);
min-height: 70vh;
display: flex;
justify-content: center;
flex-direction: column;
Expand All @@ -26,74 +26,67 @@

h2 {
font-family: var(--sub-header-font);
font-size: 3.5em;
font-size: clamp(2em, 5vw, 8em);
display: flex;
flex-direction: column;
flex-wrap: wrap;
line-height: 1;
padding-bottom: 0.7em;
}

h2 span:nth-of-type(2) {
color: var(--main-color-orange);
}

p {
padding: 0.3em;
max-width: 32em;
margin-bottom: 14em;
font-family: var(--paragraph-font);
/* color: var(--text-color-black); */
}

p:nth-of-type(1) {
margin-bottom: 1em;
}

/* @media (min-width: 10em) {
p{
margin-bottom: 14em;
}
} */

/* MEDIA QUERY TABLET = 430px */
/* MEDIA QUERY MOBILE = 430px */
@media (min-width: 26.8rem) {
h2 {
flex-direction: row;
}
}

/* MEDIA QUERY TABLET = 686px */
/* MEDIA QUERY TABLET S = 686px */
@media (min-width: 42.125rem) {
h2 span:nth-of-type(1) {
margin-right: 0.2em;
}
}

/* MEDIA QUERY TABLET = 768px */
/* MEDIA QUERY TABLET M = 768px */
@media (min-width: 48rem) {
section {
padding: 0 7.5em 3em;
padding: 0 var(--section-padding-x) var(--section-padding-y);
}
h2 {
font-size: 4.5rem;
padding-bottom: 0.7em;
}
p {
max-width: 38em;
}
}

/* MEDIA QUERY TABLET = 1100px */
/* MEDIA QUERY LAPTOP = 1100px */
@media (min-width: 68.75rem) {
section {
padding: 0 9em 3em;
padding: 0 9em var(--section-padding-y);
}

p{
margin-bottom: inherit;
}
}

/* MEDIA QUERY TABLET = 1250px */
/* MEDIA QUERY TABLET L = 1250px */
@media (min-width: 78.1rem) {
section {
height: 70vh;
Expand All @@ -106,7 +99,7 @@
/* MEDIA QUERY DESKTOP = 1500px */
@media (min-width: 93.75rem) {
section {
padding: 0 15em 3em;
padding: 0 15em var(--section-padding-y);
}
}
</style>
25 changes: 11 additions & 14 deletions src/lib/molecules/home-partners.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

<style>
section{
padding: 3em;
padding: var(--section-padding-y) 1em;
display: flex;
height: 70vh;
justify-content: center;
flex-direction: column;
align-items: start;
min-height: 70vh;
background-color: var(--card-color-green);
color: var(--main-color-beige);
overflow: hidden;
Expand All @@ -43,7 +43,7 @@

h2{
font-family: var(--sub-header-font);
font-size: 3.5em;
font-size: clamp(2em, 5vw, 8em);
line-height: 1;
padding-bottom: .7em;
}
Expand All @@ -65,25 +65,22 @@
/* MEDIA QUERY TABLET = 768px */
@media (min-width: 48rem) {
section{
padding: 4rem 7.5rem;
}
h2{
font-size: 4.5rem;
padding: var(--section-padding-y) var(--section-padding-x);
}
}

/* MEDIA QUERY DESKTOP = 1500px */
@media (min-width: 93.75rem) {
section{
padding: 4rem 15em;
}
}

/* MEDIA QUERY TABLET = 1250px */
@media (min-width: 78.1rem) {
p{
max-width: 68em;
}
}

/* MEDIA QUERY DESKTOP = 1500px */
@media (min-width: 93.75rem) {
section{
padding: var(--section-padding-y) 15em;
}
}

</style>
6 changes: 3 additions & 3 deletions src/lib/organisms/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
footer {
position: relative;
width: 100%;
height: 70vh;
min-height: 70vh;
background-color: var(--main-color-beige);
overflow: hidden;
padding: 1em;
padding: var(--section-padding-y) 0;
display: flex;
align-items: center;
justify-content: center;
Expand Down Expand Up @@ -116,7 +116,7 @@
@media (max-width: 43.75em) {
footer {
height: max-content;
padding: 4em 1em;
padding: var(--section-padding-y) 1em;
}
.information {
flex-direction: column;
Expand Down
16 changes: 6 additions & 10 deletions src/lib/organisms/agenda.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
z-index: 2;
max-width: 100%;
overflow: hidden;
padding: 4rem 0 4rem 1rem;
padding: var(--section-padding-y) 0 var(--section-padding-y) 1rem;
}

img {
Expand All @@ -29,7 +29,7 @@
}

h2 {
font-size: 3.5rem;
font-size: clamp(2em, 5vw, 8em);
padding-bottom: 0.7em;
font-family: var(--sub-header-font);
color: var(--main-color-brown);
Expand All @@ -40,11 +40,7 @@
/* MEDIA QUERY TABLET = 768px */
@media (min-width: 48rem) {
section {
padding: 4rem 0 4rem 7.5rem;
}

h2 {
font-size: 4.5rem;
padding: var(--section-padding-y) 0 var(--section-padding-y) var(--section-padding-x);
}
img {
display: block;
Expand All @@ -53,8 +49,8 @@

/* MEDIA QUERY DESKTOP = 1500px */
@media (min-width: 93.75rem) {
/* section {
padding: 4rem 15em;
} */
section {
padding: var(--section-padding-y) 15em;
}
}
</style>
6 changes: 3 additions & 3 deletions src/lib/organisms/footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
footer {
position: relative;
width: 100%;
height: 70vh;
min-height: 70vh;
background-color: var(--main-color-beige);
overflow: hidden;
padding: 1em;
padding: var(--section-padding-y) 0;
display: flex;
align-items: center;
justify-content: center;
Expand Down Expand Up @@ -116,7 +116,7 @@
@media (max-width: 43.75em) {
footer {
height: max-content;
padding: 4em 1em;
padding: var(--section-padding-y) 1em;
}
.information {
flex-direction: column;
Expand Down
3 changes: 3 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ html {
--border-bigCard: 2em;
--border-card: 1.0625em;

--section-padding-y: 4rem;
--section-padding-x: 7.5rem;

--image-gradient: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

Expand Down