From efac3c6a14f58b5e8eed7e5d367b499728a4afb1 Mon Sep 17 00:00:00 2001 From: Laurent Dlc Date: Thu, 15 Jun 2023 21:01:04 +0200 Subject: [PATCH 1/5] before debugging, working version --- css/style.css | 463 +++++++++++++++++++++++++++++++++++++++++++++----- index.html | 245 +++++++++++++++++++++++--- 2 files changed, 641 insertions(+), 67 deletions(-) diff --git a/css/style.css b/css/style.css index 4399d5fa..347cec3c 100644 --- a/css/style.css +++ b/css/style.css @@ -1,6 +1,8 @@ /****** General ***********/ * { font-family: 'Raleway', sans-serif; + margin: 0; + padding: 0; } :root { @@ -9,40 +11,69 @@ --filter-bg-color: #DEEBFF; } -.fa-solid { - color: var(--main-color); -} - body { display: flex; justify-content: center; } -.main-container { +.main { width: 100%; max-width: 1440px; padding: 0 50px; box-sizing: border-box; } -.section-title { - margin: 0; - font-size: 22px; -} - .card { background-color: white; border-radius: 20px; padding: 5px; filter: drop-shadow(0px 3px 15px rgba(0, 0, 0, 0.1)); + display: flex; + margin-top: 33px; } -.card img { +.cards__img { + width: 33%; + height: 136px; + border-top-left-radius: 20px; + border-bottom-left-radius: 20px; object-fit: cover; } -.card-title { - font-size: 16px; +.card__title { + margin : 20px 19px; + font-weight: 700; +} + +.card__subtitle { + padding: 4px 0; + font-size: 14px; +} + +.card__content { + padding-left: 15px; + display: flex; + flex-direction: column; + justify-content: space-between; + box-sizing: border-box; + overflow: hidden; +} +.card__rating { + margin-bottom: 5px; +} + + +.card--col { + flex-direction: column; + gap: 8px; +} + +.cards__img--col { + width: 100%; + height : clamp(200px, 7vw, 450px); + border-top-left-radius: 20px; + border-top-right-radius: 20px; + object-fit: cover; } .euro { @@ -50,16 +81,284 @@ body { } .neutralStar { - color: var(--main-bg-color) + color: var(--main-bg-color); +} + +.title { + font-weight: 700; + font-size: 22px; + margin: 0; +} + +.lead__text { + font-size: 16px; +} + +.lead__text--bold { + font-size: 18px; + font-weight: 700; +} + +.nav__link { + text-decoration: none; + color: #000; +} + + +/****** Header ***********/ + +.header { + display: flex; + width: 100%; + justify-content: space-between; } -/****** Hebergements And Populaires ***********/ + .header__logo { + padding: 30px 0; + } + + .header__logo__img { + width: 61.09px; + height: 19px; + } + +.header__nav { + display: flex; + gap: 68px; + align-items: flex-start; +} + + .header__nav__button { + display: flex; + flex-direction: column-reverse; + } + + .header__nav__link { + padding-top: 15px; + } + + .header__nav__line { + height: 2px; + background-color: var(--main-bg-color); + } + + .header__nav__link:hover + .header__nav__line { + color: var(--main-color); + background-color: var(--main-color); + } + + .header__nav__link:hover, .header__nav__link:hover::before { + transform-origin: left; + color: var(--main-color); + transform: scaleX(1); + + } + +/* ********** Header section Media queries ********** */ +/* Small devices (phones, less than 768px) */ + +@media (max-width: 767.98px) { + + .nav__link { + padding-top: 0; + padding-bottom: 15px; + } + + .header { + align-items: center; + flex-direction: column; + } + + .header__nav { + width: 100%; + display:grid; + grid-template-columns: 1fr 1fr; + gap: 0; + } + + .header__nav__link { + padding-top: 15px; + } + + .header__nav__button { + text-align: center; + flex-direction: column; + } + + .header__nav__link:hover + .header__nav__line { + color: var(--main-color); + background-color: var(--main-color); + } + + .header__nav__line { + width: 100%; + height: 2px; + background-color: var(--main-bg-color); + } + +} + +/****** Hero Section ***********/ + +.hero { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 35px; + margin-top: 30px; + margin-bottom: 35px; +} + + .hero__headline__title { + margin-bottom: 8px; + } + + .hero__searchbar__form { + display: flex; + } + + .hero__searchbar__icon { + background-color: var(--main-bg-color); + color: #000; + display: flex; + width: 50px; + justify-content: center; + align-items: center; + font-size: 18px; + border-top-left-radius: 15px; + border-bottom-left-radius: 15px; + } + + .hero__searchbar__input { + border: 2px solid var(--main-bg-color); + padding: 14px; + text-align: center; + font-size: 18px; + font-weight: 700; + user-select: text; + } + + .hero__searchbar__input:focus { + outline: none; + } + + .hero__searchbar__btn { + padding: 14px 16px; + background-color: var(--main-color); + border : none; + color: var(--main-bg-color); + font-size: 18px; + text-align: left; + border-top-right-radius: 15px; + border-bottom-right-radius: 15px; + font-weight: 700; + cursor: pointer; + } + + .hero__searchbar__icon--blue { + background-color: var(--main-color); + color: var(--main-bg-color); + display: none; + margin-left: -9px; + justify-content: center; + align-items: center; + border-radius: 15px; + width: 50px; + font-size: 18px; + cursor: pointer; + } + + .hero__filter { + display: flex; + gap: 15px; + flex-wrap: wrap ; + align-items: center; + } + + .hero__filter__title { + font-size: 18px; + font-weight: 700; + } + + .hero__filter__btn { + padding: 15px 19px; + font-size: 17px; + font-weight: 700; + background-color: #fff; + border: 2px solid var(--main-bg-color); + border-radius: 50px; + transition: all .4s; + cursor: pointer; + } + + .hero__filter__btn:hover { + background-color: var(--filter-bg-color); + } + + .hero__filter__icon { + padding-right : 14px; + font-size: 17px; + color: var(--main-color); + } + + .hero__info { + display: flex; + gap: 10px; + align-items: center; + } + + .hero__info__icon { + padding:7px 12px; + border: solid 2px var(--main-bg-color); + border-radius: 50%; + color: var(--main-color); + } + + + /* ********** Hero section Media queries ********** */ + /* Small devices (phones, less than 768px) */ + +@media (max-width: 767.98px) { + .hero { + align-items: center; + padding : 30px 20px 35px; + margin: 0; + } + + .hero__filter { + flex-direction: column; + align-items: flex-start; + } + + .hero__filter__btn { + font-size: 14px; + } + + .hero__filter__buttons { + display: grid; + grid-template-columns: 1fr 1fr; + row-gap: 20px; + column-gap: 10px; + } + + .hero__searchbar__icon--blue { + display: flex; + } + + .hero__searchbar__btn { + display: none; + } +} + +/****** Hebergements And Populaires section ***********/ + + .hebergements-and-populaires { display: flex; justify-content: space-between; } -.hebergements-and-populaires section { +.hebergements, .populaires { background-color: var(--main-bg-color); border-radius: 20px; padding: 30px; @@ -67,55 +366,66 @@ body { } /****** Hebergements ***********/ + + .hebergements { width: 65%; } + .hebergements__cards { + display: grid; + grid-template-columns: repeat(3,1fr); + gap: 30px; + } + + .hebergements__see-more { + padding : 35px 0; + } + /****** Populaires ***********/ + + .populaires { - width: 32%; + width: 32%; } -.populaires-title { +.populaires__title { display: flex; justify-content: space-between; align-items: center; } -.populaires-cards .card { - display: flex; - margin-top: 33px; -} +/****** Activités ***********/ -.populaires-cards img { - width: 33%; - height: 136px; - border-top-left-radius: 20px; - border-bottom-left-radius: 20px; -} -.populaires-cards .card-content { - width: 67%; - padding-left: 15px; +.city-activities { + padding: 30px 30px; +} +.city-activities__cards { display: flex; - flex-direction: column; - justify-content: space-between; - box-sizing: border-box; + gap: 30px; } -.populaires-cards .card-title { - margin-top: 10px; - margin-bottom: 4px; +.city-activities__card { + padding: 0; } -.populaires-cards .card-subtitle { - margin: 0; -} +/****** Footer ***********/ -.populaires-cards .card-rating { - margin-bottom: 5px; +.footer { + background-color: var(--main-bg-color); + display: flex; + justify-content: space-between; + align-items: flex-start; + padding: 20px 15px; } +.footer__section { + display: flex; + flex-direction: column; + flex: 1; + gap: 15px; +} @@ -137,26 +447,85 @@ body { margin-top: 50px; } - .populaires-cards { + .populaires__cards { display: flex; flex-direction: row; justify-content: space-between; } - .populaires-cards .card { + .populaires__cards .card { width: 30%; } - .populaires-cards .card-title { + .card__title { font-size: 14px; } - .populaires-cards .card-subtitle { + .card__subtitle { font-size: 13px; } } /* Small devices (phones, less than 768px) */ @media (max-width: 767.98px) { - /* ... */ + + + + .main { + padding: 0; + width: 100vw; + } + + .city-activities__cards { + flex-direction: column; + } + + + + + .hebergements-and-populaires { + flex-direction: column-reverse; + } + + .hebergements { + background-color: #fff !important; + } + + .hebergements-and-populaires section { + border-radius: 0; + } + + .populaires__cards { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + } + + .populaires { + margin-top: 0; + } + + .populaires__cards .card { + width: 100%; + } + + .hebergements__cards { + grid-template-columns: 1fr; + } + + .city-activities__cards { + gap: 0px; + margin-top: 0; + } + + .footer { + flex-direction: column; + padding: 30px 30px; + } + + .footer__section:not(:nth-child(2)) { + margin: 50px 0; + } + } \ No newline at end of file diff --git a/index.html b/index.html index 2f90d086..38281d9e 100644 --- a/index.html +++ b/index.html @@ -15,27 +15,189 @@ -
-
+
+
+ + + + +
+ + + +
+
+

Trouvez votre hébergement pour des vacances de rêve

+

En plein centre-ville ou en pleine nature

+
+ +
+ + + +
+ +
+

+ Filtres +

+
+ + + + +
+
+
+ +

Plus de 500 logements sont disponibles dans cette ville

+
+ +
+ + +
- +

Hébergements à Marseille

+
+
+ Image de la chambre fenêtre ouverte +
+
+

Hôtel du port

+

Nuit à partir de 52

+
+
+ + + + + + Note de 4 sur 5 +
+
+
+
+ Image de la chambre d'hôtel montrant un lit +
+
+

Hôtel Le soleil du matin

+

Nuit à partir de 128

+
+
+ + + + + + Note de 4 sur 5 +
+
+
+
+ Image de la chambre d'hôtel montrant un lit +
+
+

Hôtel Le soleil du matin

+

Nuit à partir de 128

+
+
+ + + + + + Note de 4 sur 5 +
+
+
+
+ Image de la chambre d'hôtel montrant un lit +
+
+

Hôtel Le soleil du matin

+

Nuit à partir de 128

+
+
+ + + + + + Note de 4 sur 5 +
+
+
+
+ Image de la chambre d'hôtel montrant un lit +
+
+

Hôtel Le soleil du matin

+

Nuit à partir de 128

+
+
+ + + + + + Note de 4 sur 5 +
+
+
+
+ Image de la chambre d'hôtel montrant un lit +
+
+

Hôtel Le soleil du matin

+

Nuit à partir de 128

+
+
+ + + + + + Note de 4 sur 5 +
+
+
+
+
+

+ Afficher Plus +

+
-
-

Les plus populaires

+
+

Les plus populaires

-
+
- Image de la chambre d'hôtel montrant un lit -
+ Image de la chambre d'hôtel montrant un lit +
-

Hôtel Le soleil du matin

-

Nuit à partir de 128

+

Hôtel Le soleil du matin

+

Nuit à partir de 128

-
+
@@ -46,11 +208,12 @@

Hôtel Le soleil du matin

- Image de la chambre d'hôtel montrant un lit -
+ Image de la chambre d'hôtel montrant un lit +
-

Chambres d’hôtes Au cœur de l’eau

-

Nuit à partir de 71

+

Chambres d’hôtes Au cœur de l’eau

+

Nuit à partir de 71

@@ -63,11 +226,12 @@

Chambres d’hôtes Au cœur de l’eau

- Image de la chambre d'hôtel montrant un lit -
+ Image de la chambre d'hôtel montrant un lit +
-

Hôtel Bleu et Blanc

-

Nuit à partir de 68

+

Hôtel Bleu et Blanc

+

Nuit à partir de 68

@@ -82,8 +246,49 @@

Hôtel Bleu et Blanc

+
+

Activités à Marseille

+
+
+ +
+

Vieux-Port

+
+ +
+
+ +

Vieux-Port

+
+
+ +

Vieux-Port

+
+
+ +

Vieux-Port

+
+
+
-
+
From 103b8268447409460f4dc6062dce3b27db464f1d Mon Sep 17 00:00:00 2001 From: Laurent Dlc Date: Fri, 16 Jun 2023 08:34:10 +0200 Subject: [PATCH 2/5] Final Version --- css/style.css | 263 ++++++++++++++++++++++++++------------------------ index.html | 107 ++++++++++---------- 2 files changed, 193 insertions(+), 177 deletions(-) diff --git a/css/style.css b/css/style.css index 347cec3c..140cac1f 100644 --- a/css/style.css +++ b/css/style.css @@ -29,7 +29,7 @@ body { padding: 5px; filter: drop-shadow(0px 3px 15px rgba(0, 0, 0, 0.1)); display: flex; - margin-top: 33px; + width: 100%; } .cards__img { @@ -40,6 +40,19 @@ body { object-fit: cover; } +.card--col { + flex-direction: column; + gap: 8px; +} + +.cards__img--col { + width: 100%; + height: 136px; + border-top-left-radius: 20px; + border-top-right-radius: 20px; + object-fit: cover; +} + .card__title { margin : 20px 19px; font-weight: 700; @@ -62,32 +75,18 @@ body { margin-bottom: 5px; } - -.card--col { - flex-direction: column; - gap: 8px; -} - -.cards__img--col { - width: 100%; - height : clamp(200px, 7vw, 450px); - border-top-left-radius: 20px; - border-top-right-radius: 20px; - object-fit: cover; -} - .euro { font-weight: 700; } -.neutralStar { - color: var(--main-bg-color); +.neutral-star { + color: var(--main-bg-color) !important; } .title { font-weight: 700; font-size: 22px; - margin: 0; + margin-bottom: 33px; } .lead__text { @@ -104,6 +103,26 @@ body { color: #000; } +/****** General Media queries ***********/ + +/* Medium devices (tablets, less/equal than 1024px) */ +@media (max-width: 1024px) { + .card__title { + font-size: 14px; + } + + .card__subtitle { + font-size: 13px; + } +} + +/* Small devices (phones, less than 768px) */ +@media (max-width: 767.98px) { + .main { + padding: 0; + width: 100vw; + } +} /****** Header ***********/ @@ -389,143 +408,139 @@ body { width: 32%; } -.populaires__title { - display: flex; - justify-content: space-between; - align-items: center; -} - -/****** Activités ***********/ - - -.city-activities { - padding: 30px 30px; -} -.city-activities__cards { - display: flex; - gap: 30px; -} - -.city-activities__card { - padding: 0; -} - -/****** Footer ***********/ - -.footer { - background-color: var(--main-bg-color); - display: flex; - justify-content: space-between; - align-items: flex-start; - padding: 20px 15px; -} - -.footer__section { +.populaires__cards { display: flex; flex-direction: column; - flex: 1; - gap: 15px; + gap: 30px; } - - -/* Le code ci-dessous correspond à la version responsive uniquement */ - -/****** Media queries ***********/ -/* Medium devices (tablets, less/equal than 1024px) */ -@media (max-width: 1024px) { - .hebergements-and-populaires { - flex-direction: column; - } - - .hebergements { - width: 100%; - } - - .populaires { - width: 100%; - margin-top: 50px; - } - - .populaires__cards { + .populaires__title { display: flex; - flex-direction: row; justify-content: space-between; + align-items: baseline; } - .populaires__cards .card { - width: 30%; - } + .fa-star { + color: var(--main-color); + } - .card__title { - font-size: 14px; - } + .card-rating__icon { + color: var(--main-color); + } - .card__subtitle { - font-size: 13px; +/****** Hébergements et populaires Media queries ***********/ +/* Medium devices (tablets, less/equal than 1024px) */ + +@media (max-width: 1024px) { + .hebergements-and-populaires { + flex-direction: column; + } + + .hebergements { + width: 100%; + } + + .populaires { + width: 100%; + margin-top: 50px; + } + + .populaires__cards { + flex-direction: row; + gap: 20px; + } + + .populaires__cards .card { + width: 30%; + } } -} /* Small devices (phones, less than 768px) */ -@media (max-width: 767.98px) { +@media (max-width: 767.98px) { + .hebergements-and-populaires { + flex-direction: column-reverse; + } + .hebergements { + background-color: #fff !important; + } - .main { - padding: 0; - width: 100vw; - } - - .city-activities__cards { - flex-direction: column; - } + .hebergements__see-more { + padding: 15px; + } - + .hebergements-and-populaires section { + border-radius: 0; + } - - .hebergements-and-populaires { - flex-direction: column-reverse; + .populaires { + margin-top: 0; + } + + .populaires__cards .card { + width: 100%; + } + + .hebergements__cards { + grid-template-columns: 1fr; + gap: 15px; + } } - .hebergements { - background-color: #fff !important; - } +/****** Activités ***********/ - .hebergements-and-populaires section { - border-radius: 0; - } - .populaires__cards { +.city-activities { + padding: 30px; + margin-bottom: 35px; +} + .city-activities__cards { display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; + gap: 30px; } - .populaires { - margin-top: 0; - } + .city-activities__card { + padding: 0; + } - .populaires__cards .card { - width: 100%; - } +/****** Activités Media queries ***********/ +/* Small devices (phones, less than 768px) */ - .hebergements__cards { - grid-template-columns: 1fr; +@media (max-width: 767.98px) { + .city-activities__cards, .populaires__cards { + flex-direction: column; + gap: 15px; + } } - .city-activities__cards { - gap: 0px; - margin-top: 0; - } +/****** Footer ***********/ + +.footer { + background-color: var(--main-bg-color); + display: flex; + justify-content: space-between; + align-items: flex-start; + padding: 20px 15px; +} - .footer { + .footer__section { + display: flex; flex-direction: column; - padding: 30px 30px; + flex: 1; + gap: 15px; } - .footer__section:not(:nth-child(2)) { - margin: 50px 0; - } - +/****** Footer Media queries ***********/ +/* Small devices (phones, less than 768px) */ + +@media (max-width: 767.98px) { + .footer { + flex-direction: column; + padding: 30px 30px; + } + + .footer__section:not(:first-child) { + margin-top: 50px + } } \ No newline at end of file diff --git a/index.html b/index.html index 38281d9e..ae9fcc24 100644 --- a/index.html +++ b/index.html @@ -44,11 +44,11 @@

Trouvez votre hébergement pour des vaca

En plein centre-ville ou en pleine nature

-
+ - +
@@ -56,16 +56,16 @@

Filtres

- +
-
+

Plus de 500 logements sont disponibles dans cette ville

-
+

@@ -96,8 +96,8 @@

Hôtel du port

Image de la chambre d'hôtel montrant un lit
-

Hôtel Le soleil du matin

-

Nuit à partir de 128

+

Auberge La Canebière

+

Nuit à partir de 25

@@ -110,11 +110,11 @@

Hôtel Le soleil du matin

- Image de la chambre d'hôtel montrant un lit + Image de la chambre d'hôtel montrant un lit
-

Hôtel Le soleil du matin

-

Nuit à partir de 128

+

Hôtel Les mouettes

+

Nuit à partir de 76

@@ -127,11 +127,11 @@

Hôtel Le soleil du matin

- Image de la chambre d'hôtel montrant un lit + Image de la chambre d'hôtel montrant un lit
-

Hôtel Le soleil du matin

-

Nuit à partir de 128

+

Hôtel de la mer

+

Nuit à partir de 46

@@ -144,11 +144,11 @@

Hôtel Le soleil du matin

- Image de la chambre d'hôtel montrant un lit + Image de la chambre d'hôtel montrant un lit
-

Hôtel Le soleil du matin

-

Nuit à partir de 128

+

Auberge Le Panier

+

Nuit à partir de 23

@@ -161,11 +161,11 @@

Hôtel Le soleil du matin

- Image de la chambre d'hôtel montrant un lit + Image de la chambre d'hôtel montrant un lit
-

Hôtel Le soleil du matin

-

Nuit à partir de 128

+

Hôtel chez Amina

+

Nuit à partir de 96

@@ -187,7 +187,7 @@

Hôtel Le soleil du matin

Les plus populaires

- +
@@ -198,11 +198,11 @@

Hôtel Le soleil du matin

Nuit à partir de 128

- - - - - + + + + + Note de 4 sur 5
@@ -216,11 +216,11 @@

Chambres d’hôtes Au cœur de l’eau

Nuit à partir de 71

- - - - - + + + + + Note de 4 sur 5
@@ -234,11 +234,11 @@

Hôtel Bleu et Blanc

Nuit à partir de 68

- - - - - + + + + + Note de 4 sur 5
@@ -246,30 +246,31 @@

Hôtel Bleu et Blanc

-
+ +

Activités à Marseille

-
-
+
+

Vieux-Port

-
-
- -

Vieux-Port

-
-
- -

Vieux-Port

-
-
- -

Vieux-Port

-
-
-
+ +
+ +

Fort de Pomègues

+
+
+ +

Parc national des Calanques

+
+
+ +

Notre-Dame-de-la-Garde

+
+ +