Add responsiveness to HomePage
This commit is contained in:
parent
d471542762
commit
e4f6a04c95
13 changed files with 62 additions and 45 deletions
|
@ -14,7 +14,7 @@ export const About = () => (
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
<section>
|
<section>
|
||||||
<img src="/images/Chef.jpg" alt="Mario" />{" "}
|
<img src="/images/Chef.jpg" alt="Mario" />
|
||||||
<img src="/images/Chef2.jpg" alt="Adrian" />
|
<img src="/images/Chef2.jpg" alt="Adrian" />
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const Specials = () => (
|
||||||
<h2>This week‘s specials!</h2>
|
<h2>This week‘s specials!</h2>
|
||||||
<Link className="button-link">Online Menu</Link>
|
<Link className="button-link">Online Menu</Link>
|
||||||
</section>
|
</section>
|
||||||
<section className="row">
|
<section className="row specials-row">
|
||||||
<Special
|
<Special
|
||||||
title="Greek salad"
|
title="Greek salad"
|
||||||
image="/images/Food1.jpg"
|
image="/images/Food1.jpg"
|
||||||
|
|
|
@ -19,12 +19,6 @@ a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: 5rem 1fr 15rem;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
main {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -46,6 +40,7 @@ img {
|
||||||
.button-link {
|
.button-link {
|
||||||
background-color: var(--primary-2);
|
background-color: var(--primary-2);
|
||||||
color: black;
|
color: black;
|
||||||
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
border-radius: 0.75rem;
|
border-radius: 0.75rem;
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { Outlet } from "react-router-dom"
|
|
||||||
import { Footer } from "../components/Footer.jsx"
|
|
||||||
import { Header } from "../components/Header.jsx"
|
|
||||||
|
|
||||||
export const Root = () => {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Header />
|
|
||||||
<main>
|
|
||||||
<Outlet />
|
|
||||||
</main>
|
|
||||||
<Footer />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
|
@ -5,6 +5,17 @@
|
||||||
color: black;
|
color: black;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 18rem;
|
min-height: 18rem;
|
||||||
|
padding: 0 2rem;
|
||||||
|
gap: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about p {
|
||||||
|
max-width: 40rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about section {
|
||||||
|
width: 15rem;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.about h2 {
|
.about h2 {
|
||||||
|
@ -14,10 +25,6 @@
|
||||||
color: var(--primary-1);
|
color: var(--primary-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.about article {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about img {
|
.about img {
|
||||||
height: 15rem;
|
height: 15rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -32,3 +39,9 @@
|
||||||
top: 2rem;
|
top: 2rem;
|
||||||
right: 10rem;
|
right: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 760px) {
|
||||||
|
.about section {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
.button-link {
|
|
||||||
background-color: var(--primary-2);
|
|
||||||
color: black;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
border-radius: 0.75rem;
|
|
||||||
}
|
|
|
@ -2,7 +2,7 @@ footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 3rem;
|
gap: 3rem;
|
||||||
padding: 2rem;
|
padding: 0.8rem;
|
||||||
background-color: var(--primary-1);
|
background-color: var(--primary-1);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
@ -10,17 +10,24 @@ footer {
|
||||||
footer section {
|
footer section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
gap: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer h3 {
|
footer h3 {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer img {
|
footer img {
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer span {
|
@media (max-width: 500px) {
|
||||||
padding: 0.5rem;
|
footer img {
|
||||||
border-radius: 2rem;
|
display: none;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
gap: 1.45rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
nav {
|
nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 3rem;
|
gap: 0.5rem 3rem;
|
||||||
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
header img {
|
header img {
|
||||||
|
@ -13,12 +15,14 @@ header img {
|
||||||
|
|
||||||
nav ul {
|
nav ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 1rem 2rem;
|
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav a {
|
nav a {
|
||||||
|
|
|
@ -24,3 +24,13 @@
|
||||||
.jumbo h2 {
|
.jumbo h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 550px) {
|
||||||
|
.jumbo {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jumbo img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
.column {
|
.column {
|
||||||
width: 100%;
|
|
||||||
background-color: var(--secondary-1);
|
background-color: var(--secondary-1);
|
||||||
color: black;
|
color: black;
|
||||||
|
max-width: 20rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.column,
|
.column,
|
||||||
|
|
|
@ -4,11 +4,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.specials {
|
.specials {
|
||||||
width: 60%;
|
margin: 1rem;
|
||||||
margin: 1rem auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.specials h2 {
|
.specials h2 {
|
||||||
color: var(--primary-1);
|
color: var(--primary-1);
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.specials-row {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
.testimonial {
|
.testimonial {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
max-width: 30rem;
|
||||||
color: black;
|
color: black;
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
padding: 1rem;
|
padding: 1rem 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.testimonial img {
|
.testimonial img {
|
||||||
|
@ -15,12 +16,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
|
text-align: center;
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.testimonyRow {
|
.testimonyRow {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: 0.2rem 1rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.testimonialRow {
|
.testimonialRow {
|
||||||
width: 70%;
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.testimonials h2 {
|
.testimonials h2 {
|
||||||
|
|
Reference in a new issue