Add responsive rules

This commit is contained in:
Laurent
2025-03-03 17:20:35 +01:00
parent 93318bdcc6
commit a116072a08
6 changed files with 103 additions and 52 deletions

View File

@@ -17,6 +17,25 @@ body
background: var(--background-color); background: var(--background-color);
} }
.container
{
display: flex;
padding: 0 1vw 3vh 1vw;
}
@media screen and (min-width: 1501px) {
.container
{
flex-direction: row;
}
}
@media screen and (max-width: 1500px) {
.container {
flex-direction: column;
}
}
.colored-text .colored-text
{ {
color: var(--secondary-color); color: var(--secondary-color);

View File

@@ -105,11 +105,15 @@
.day-picker, .day-names { .day-picker, .day-names {
display: grid; display: grid;
grid-template-columns: repeat(7, 2fr); grid-template-columns: repeat(7, 1fr);
row-gap: 20px; row-gap: 20px;
width: 100%; width: 100%;
} }
.day-picker {
grid-template-rows: repeat(6, 1fr);
}
.day-names { .day-names {
padding: 20px 0 20px 0; padding: 20px 0 20px 0;
} }

View File

@@ -13,21 +13,6 @@ const props = defineProps<{
<style scoped> <style scoped>
@media screen and (min-width: 801px) {
.button {
width: 15vw;
min-width: 15vw;
}
}
@media screen and (max-width: 800px) {
.button {
width: 50vw;
min-width: 50vw;
}
}
.button { .button {
color: var(--primary-color); color: var(--primary-color);
text-align: center; text-align: center;

View File

@@ -12,16 +12,9 @@
.text-block { .text-block {
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%;
padding: 0 1vw 0 1vw;
}
.text-block {
flex-direction: column;
padding: 30px;
min-width: 250px;
} }
.text-block { .text-block {
@@ -34,4 +27,16 @@
background: rgb(239, 239, 239); background: rgb(239, 239, 239);
} }
@media screen and (max-width: 1501px) {
.text-block {
padding: 5px 15px 5px 15px;
}
}
@media screen and (min-width: 1500px) {
.text-block {
padding: 10px 30px 10px 30px;
}
}
</style> </style>

View File

@@ -2,35 +2,65 @@
import Calendar from "@/components/Calendar.vue"; import Calendar from "@/components/Calendar.vue";
import TextBlock from "@/components/TextBlock.vue"; import TextBlock from "@/components/TextBlock.vue";
import NavLink from "@/components/NavLink.vue";
</script> </script>
<template> <template>
<div class="container"> <div class="container">
<TextBlock class="text-block"> <TextBlock class="title">
<h1>Create an <span class="colored-text">event</span></h1> <h1>Create an <span class="colored-text">event</span></h1>
</TextBlock> </TextBlock>
<Calendar class="calendar" /> <div class="event-form">
<Calendar class="calendar"/>
<NavLink path="/create" description="Create" class="create-button"></NavLink>
</div> </div>
</div>
</template> </template>
<style scoped> <style scoped>
.container .container
{ {
display: flex;
flex-direction: row;
width: 80%; width: 80%;
gap: 10vw; gap: 10vw;
} }
.text-block .event-form {
{ display: flex;
width: 50%; flex-direction: column;
width: 45%;
gap: 20px;
} }
.calendar /* MEDIA QUERIES */
{ @media screen and (min-width: 1501px) {
width: 45%;
.title {
width: 50%;
}
.title h1
{
font-size: 4rem;
}
.calendar {
width: 100%;
min-width: 100%;
}
}
@media screen and (max-width: 1500px) {
.title, .event-form {
width: 100%;
}
.title {
height: fit-content;
}
} }
</style> </style>

View File

@@ -21,8 +21,8 @@ import TextBlock from "@/components/TextBlock.vue";
<div class="actions-group"> <div class="actions-group">
<h1>Meet up <span class="colored-text">now</span> !</h1> <h1>Meet up <span class="colored-text">now</span> !</h1>
<NavLink path="/create" description="Create"></NavLink> <NavLink path="/create" description="Create" class="button"></NavLink>
<NavLink path="/join" description="Join"></NavLink> <NavLink path="/join" description="Join" class="button"></NavLink>
</div> </div>
</div> </div>
@@ -36,7 +36,6 @@ import TextBlock from "@/components/TextBlock.vue";
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 100%; height: 100%;
padding: 0 1vw 0 1vw;
} }
.container { .container {
@@ -52,7 +51,6 @@ import TextBlock from "@/components/TextBlock.vue";
.actions-group { .actions-group {
flex-direction: column; flex-direction: column;
padding: 30px;
min-width: 250px; min-width: 250px;
} }
@@ -96,19 +94,17 @@ import TextBlock from "@/components/TextBlock.vue";
} }
/* MEDIA QUERIES */ /* MEDIA QUERIES */
@media screen and (min-width: 1500px) { @media screen and (min-width: 1501px) {
.container {
flex-direction: row;
}
.introduction { .introduction {
padding: 0 0 1vw 0;
width: 50%; width: 50%;
min-height: 40vh; min-height: 40vh;
} }
.actions-group { .actions-group {
width: 25%; width: 35%;
min-height: 35vh; min-height: 40vh;
} }
.introduction h1 .introduction h1
@@ -117,13 +113,10 @@ import TextBlock from "@/components/TextBlock.vue";
} }
} }
@media screen and (max-width: 1501px) { @media screen and (max-width: 1500px) {
.container {
flex-direction: column;
}
.introduction, .actions-group { .introduction, .actions-group {
width: 95%; width: 100%;
} }
.introduction { .introduction {
@@ -140,4 +133,19 @@ import TextBlock from "@/components/TextBlock.vue";
} }
} }
@media screen and (min-width: 801px) {
.button {
width: 15vw;
min-width: 15vw;
}
}
@media screen and (max-width: 800px) {
.button {
width: 50vw;
min-width: 50vw;
}
}
</style> </style>