From 06f7bbd5b53ab8324e41fcdae161f45e622e0894 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Fri, 1 Nov 2019 23:23:42 +0100 Subject: [PATCH 01/10] Ad show page focused styles --- public/stylesheets/style.css | 160 +++++++++++++++++++++++++++++++++-- views/ads/create.hbs | 2 +- views/ads/show.hbs | 61 ++++++++----- 3 files changed, 195 insertions(+), 28 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 910a8be..6deeacc 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -1,7 +1,20 @@ +:root { + --bg-color: #e3e7f1; + --sh-color: #494ca2; + --fg-color: #222; + --hl-color: #8186d5; +} + body { margin: 0; padding: 0; font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; + background: var(--bg-color); +} + +body > main { + box-sizing: border-box; + padding: 25px; } .msgs { @@ -32,6 +45,11 @@ span.error-message { color: red; } +textarea { + border: solid 2px var(--fg-color); + border-radius: 5px; +} + .msg { display: flex; justify-content: space-between; @@ -67,23 +85,151 @@ span.error-message { cursor: pointer; } -.ad-photos { +.ad-pictures { display: flex; align-items: center; - width: 100%; - max-width: 750px; justify-content: space-around; } -.ad-photos > img { +.ad-pictures > img { box-sizing: border-box; - border: solid 2px black; - padding: 2px; - max-width: 25%; + border: solid 5px var(--bg-color); + border-radius: 5px; + background: var(--sh-color); + max-width: 28%; height: 100%; margin-bottom: 15px; + box-shadow: 0 0 5px var(--fg-color); } .reply-form { display: none; +} + +.ad { + box-sizing: border-box; + box-shadow: 0 0 8px var(--fg-color); + border-radius: 15px; + padding: 25px; + width: 45%; + background: var(--hl-color); + color: var(--fg-color); + display: flex; + flex-direction: column; +} + +.infos-title > h2 { + margin: 0; + margin-bottom: 0.33em; +} + +.infos-title > h1 { + color: var(--bg-color); + font-size: 1.8em; + margin: 0; +} + +.infos-details { + width: 100%; + color: var(--bg-color); + font-size: 1.2em; + display: grid; + grid-template-columns: 50% 50%; +} + +.infos-item > p, .infos-item > time { + margin: 0; + font-size: 1.3em; +} + +.infos-item > h4 { + margin-bottom: 5px; + color: var(--fg-color) +} + +.ad-description { + color: var(--bg-color); + font-size: 1.2em; +} + +button, input[type=submit], a { + box-sizing: border-box; + background: var(--fg-color); + color: var(--bg-color); + border: none; + border-radius: 5px; + padding: 10px 20px; + font-size: 1.2em; + text-decoration: none; + cursor: pointer; + display: inline-block; + width: max-content; + font-family: "Lucida Grande", Helvetica, Arial, sans-serif; +} + +button:hover, input[type=submit]:hover, a:hover { + color: var(--hl-color); +} + +button:active, input[type=submit]:active, a:active { + background: var(--sh-color); + color: var(--fg-color); +} + +.ad-questions { + margin-bottom: 15px; +} + +.questions-details > .question:not(:last-child) { + margin-bottom: 10px; +} + +.question { + background: var(--sh-color); + padding: 15px; + border-radius: 15px; + border: solid 3px var(--fg-color); + color: var(--bg-color); +} + +.question > main, .reply > main { + font-size: 1.2em; +} + +.question > time, .reply > time { + font-weight: bold; + margin-left: 3em; +} + +.reply { + margin-left: 2em; +} + +.reply:not(:last-child) { + margin-bottom: 10px; +} + +.reply-control { + margin-top: 5px; +} + +.reply-btn { + font-weight: bold; + font-size: 1em; +} + +.m-t { + margin-top: 5px; +} + +.m-b { + margin-bottom: 5px; +} + +.m-l { + margin-left: 5px; +} + +.m-r { + margin-right: 5px; } \ No newline at end of file diff --git a/views/ads/create.hbs b/views/ads/create.hbs index 8fe4c6e..908ffb2 100644 --- a/views/ads/create.hbs +++ b/views/ads/create.hbs @@ -70,7 +70,7 @@ {{errors.pictures.message}} -
+
{{#with ad as |ad|}} {{#each ad.pictures}} {{title}} diff --git a/views/ads/show.hbs b/views/ads/show.hbs index 40ff5b1..b385b9d 100644 --- a/views/ads/show.hbs +++ b/views/ads/show.hbs @@ -1,16 +1,31 @@ -
-
-

Propriété : {{ad.title}}

-
-

Type : {{getEnumValue "type" ad.type}}

-

Statut : {{getEnumValue "transactionStatus" ad.transactionStatus}}

-

Prix : {{formatPrice ad.price}} €

+
+
+
+

Propriété

+

{{ad.title}}

+
+
+
+

Type

+

{{getEnumValue "type" ad.type}}

+
+
+

Statut

+

{{getEnumValue "transactionStatus" ad.transactionStatus}}

+
+
+

Prix

+

{{formatPrice ad.price}} €

+
+
+

Disponible le

+ +
-
-
+

Images

-
+
{{#with ad as |ad|}} {{#each ad.pictures}} {{title}} @@ -18,23 +33,24 @@ {{/with}}

Description

-

{{ad.description}}

+

{{ad.description}}

-
+ {{#if ad.published}} +

Questions

{{#authorize "client"}} -
+

Poser une question


- +
{{/authorize}} -
+

Voir les questions @@ -44,7 +60,7 @@ {{#each ad.questions}}
-

{{body}}

+ {{body}}
{{#authorize "agent"}} @@ -56,18 +72,22 @@ method="POST">
- +

{{/authorize}} {{#if this.answers.length}} -
- Réponses +
+ +

+ Réponses +

+
{{#each this.answers}}
-

{{body}}

+ {{body}}
@@ -83,6 +103,7 @@ {{/with}}
+ {{/if}} {{#authorize "agent"}}
Mettre à jour -- GitLab From fcda9016eb5cee5e285ef3650ad8a8e6e71d878c Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 16:43:39 +0100 Subject: [PATCH 02/10] Styles for index page --- public/stylesheets/style.css | 41 ++++++++++++++++++++++ views/ads/index.hbs | 66 +++++++++++++++++++++++++----------- 2 files changed, 88 insertions(+), 19 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 6deeacc..aeaa57d 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -116,6 +116,15 @@ textarea { color: var(--fg-color); display: flex; flex-direction: column; + margin-bottom: 30px; +} + +.ad-preview { + width: 30%; +} + +.ad-infos { + margin-bottom: 15px; } .infos-title > h2 { @@ -137,6 +146,10 @@ textarea { grid-template-columns: 50% 50%; } +.ad-details > h2 { + margin: 0; +} + .infos-item > p, .infos-item > time { margin: 0; font-size: 1.3em; @@ -167,10 +180,22 @@ button, input[type=submit], a { font-family: "Lucida Grande", Helvetica, Arial, sans-serif; } +button.alt, input.alt[type=submit], a.alt { + background: var(--hl-color); + color: var(--bg-color); + font-weight: bold; +} + button:hover, input[type=submit]:hover, a:hover { color: var(--hl-color); } +button.alt:hover, input.alt[type=submit]:hover, a.alt:hover { + background: var(--sh-color); + color: var(--bg-color); + font-weight: bold; +} + button:active, input[type=submit]:active, a:active { background: var(--sh-color); color: var(--fg-color); @@ -232,4 +257,20 @@ button:active, input[type=submit]:active, a:active { .m-r { margin-right: 5px; +} + +.m-t-lg { + margin-top: 20px; +} + +.m-b-lg { + margin-bottom: 20px; +} + +.m-l-lg { + margin-left: 20px; +} + +.m-r-lg { + margin-right: 20px; } \ No newline at end of file diff --git a/views/ads/index.hbs b/views/ads/index.hbs index 66ef9cb..948a0f4 100644 --- a/views/ads/index.hbs +++ b/views/ads/index.hbs @@ -1,19 +1,33 @@ {{#authorize "agent"}}

Annonces non publiées

-Nouvelle annonce +Nouvelle annonce {{#each ads.notPublished}} -
-
-

{{title}}

-
-

Type : {{getEnumValue "type" type}}

-

Statut : {{getEnumValue "transactionStatus" transactionStatus}}

-

Prix : {{formatPrice price}} €

+
+
+
+

{{title}}

+
+
+
+

Type

+

{{getEnumValue "type" type}}

+
+
+

Statut

+

{{getEnumValue "transactionStatus" transactionStatus}}

+
+
+

Prix

+

{{formatPrice price}} €

+
+
+

Disponible le

+ +
- -
+
Voir @@ -25,16 +39,30 @@

Liste des annonces immobilières

{{#each ads.published}} -
-
-

{{title}}

-
-

Type : {{getEnumValue "type" type}}

-

Statut : {{getEnumValue "transactionStatus" transactionStatus}}

-

Prix : {{formatPrice price}} €

+
+
+
+

{{title}}

+
+
+
+

Type

+

{{getEnumValue "type" type}}

+
+
+

Statut

+

{{getEnumValue "transactionStatus" transactionStatus}}

+
+
+

Prix

+

{{formatPrice price}} €

+
+
+

Disponible le

+ +
- -
+
Voir {{#authorize "agent"}} -- GitLab From 1ea8a238bce72de07fe88011fc73e54a4e0145cf Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 17:47:48 +0100 Subject: [PATCH 03/10] Styles for ad creation --- public/stylesheets/style.css | 32 +++++++++++- views/ads/create.hbs | 95 ++++++++++++++++++++---------------- 2 files changed, 84 insertions(+), 43 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index aeaa57d..1cac3c2 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -32,13 +32,15 @@ body > main { width: min-content; } -form > fieldset, form > button { - margin-top: 5%; +fieldset, form > button { + margin-top: 15px; } div.form-input { display: inline-block; margin-bottom: 15px; + color: var(--bg-color); + font-weight: bold; } span.error-message { @@ -50,6 +52,32 @@ textarea { border-radius: 5px; } +fieldset { + border-color: var(--sh-color); +} + +legend { + color: var(--bg-color); + font-size: 1.2em; + font-weight: bold; +} + +.form-input > label { + font-weight: bold; + color: var(--fg-color); + font-size: 1.2em; +} + +.form-input > ul { + display: flex; + flex-direction: column; + padding-left: 0; +} + +.form-input > ul > li { + list-style-type: none; +} + .msg { display: flex; justify-content: space-between; diff --git a/views/ads/create.hbs b/views/ads/create.hbs index 908ffb2..1eb521f 100644 --- a/views/ads/create.hbs +++ b/views/ads/create.hbs @@ -6,8 +6,9 @@ {{/each}}
-
-
+ +
+
{{errors.title.message}} @@ -16,48 +17,58 @@
Informations sur l'annonce + +
+
+ +
    +
  • + A la vente +
  • +
  • + A la location +
  • +
+ {{errors.type.message}} +
-
- -
    - A la vente - A la location -
- {{errors.type.message}} -
- -
- -
    - Disponible - Louée - Vendue -
- {{errors.transactionStatus.message}} -
+
+ +
    +
  • + Disponible +
  • +
  • + Louée +
  • +
  • + Vendue +
  • +
+ {{errors.transactionStatus.message}} +
-
- -
- € +
+ +
+ € +
+ {{errors.price.message}}
- {{errors.price.message}} -
-
-
- - +
+ + + {{errors.published.message}}
- {{errors.published.message}} -
+
@@ -91,10 +102,12 @@ {{errors.date.message}}
+
- - +
+ +
\ No newline at end of file -- GitLab From 8ea0c4620be4acc7b9b1064c30223233ed757d55 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 18:25:08 +0100 Subject: [PATCH 04/10] Fix images sizing and questions sections tag closing --- public/stylesheets/style.css | 8 +++---- views/ads/show.hbs | 42 +++++++++++++++++------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 1cac3c2..418197a 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -20,10 +20,10 @@ body > main { .msgs { display: flex; flex-direction: column; - position: absolute; - left:0; + position: fixed; + right: 0; bottom: 0; - margin: 0 0 15px 15px; + margin: 0 15px 15px 0; min-width: 150px; } @@ -125,7 +125,7 @@ legend { border-radius: 5px; background: var(--sh-color); max-width: 28%; - height: 100%; + height: auto; margin-bottom: 15px; box-shadow: 0 0 5px var(--fg-color); } diff --git a/views/ads/show.hbs b/views/ads/show.hbs index b385b9d..becc5c4 100644 --- a/views/ads/show.hbs +++ b/views/ads/show.hbs @@ -45,8 +45,8 @@

Poser une question


- +
+
{{/authorize}} @@ -67,36 +67,34 @@
-
+
- +
+
{{/authorize}} {{#if this.answers.length}}
- -

- Réponses -

-
- {{#each this.answers}} -
-
- {{body}} -
- -
- {{/each}} -
- + +

+ Réponses +

+
+ {{#each this.answers}} +
+
+ {{body}} +
+ +
+ {{/each}} + {{else}}

Aucune réponse

{{/if}} + {{else}}

Aucune question.

{{/each}} -- GitLab From 10d84b414cd881aa84ae13e05347053938ba9b17 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 18:47:48 +0100 Subject: [PATCH 05/10] Fix images sizes display --- public/stylesheets/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 418197a..0ddc57f 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -124,10 +124,11 @@ legend { border: solid 5px var(--bg-color); border-radius: 5px; background: var(--sh-color); - max-width: 28%; + flex: 1; height: auto; margin-bottom: 15px; box-shadow: 0 0 5px var(--fg-color); + margin: 0 7px; } .reply-form { -- GitLab From 62347fd0fd3a6e9d249a0610a4a7222bf9c1ad72 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 20:09:50 +0100 Subject: [PATCH 06/10] Navbar --- public/stylesheets/style.css | 73 +++++++++++++++++++++++++++++++++++- views/layout.hbs | 16 +++++++- 2 files changed, 86 insertions(+), 3 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 0ddc57f..8b19211 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -56,6 +56,10 @@ fieldset { border-color: var(--sh-color); } +figure { + margin: 15px 7px; +} + legend { color: var(--bg-color); font-size: 1.2em; @@ -140,7 +144,7 @@ legend { box-shadow: 0 0 8px var(--fg-color); border-radius: 15px; padding: 25px; - width: 45%; + width: 700px; background: var(--hl-color); color: var(--fg-color); display: flex; @@ -149,7 +153,7 @@ legend { } .ad-preview { - width: 30%; + width: 400px; } .ad-infos { @@ -302,4 +306,69 @@ button:active, input[type=submit]:active, a:active { .m-r-lg { margin-right: 20px; +} + +.ads { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} + +nav { + display: flex; + justify-content: space-between; + background: var(--hl-color); + box-shadow: 0 2px 5px black; + margin-bottom: 5px; + padding-top: 5px; +} + +nav>.auth-links, nav>.nav-links { + display: flex; + align-items: center; +} + +.nav-links a { + background: transparent; + color: var(--bg-color); + font-weight: bold; + font-size: 1.4em; + cursor: pointer; +} + +.nav-links a:hover { + color: var(--fg-color); +} + +.nav-links a:active { + color: var(--sh-color); +} + +.auth-links { + font-size: 1.2em; + color: var(--bg-color); +} + +.auth-links a, .auth-links button { + box-sizing: border-box; + font-size: 0.9em; + padding: 5px 10px; + height: max-content; + font-weight: bold; +} + +.auth-form { + width: 300px; + display: flex; + flex-direction: column; +} + +.auth-form > .form-input { + display: flex; + flex-direction: column; +} + +.form-input > select { + width: min-content; } \ No newline at end of file diff --git a/views/layout.hbs b/views/layout.hbs index d3b8081..42140c4 100644 --- a/views/layout.hbs +++ b/views/layout.hbs @@ -1,10 +1,24 @@ - {{title}} + Immoweb - {{title}} +
{{{body}}}
-- GitLab From fa78cb898688b470ecb05614d62b5d2555bbdf74 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 20:10:01 +0100 Subject: [PATCH 07/10] Index page responsive display of ads --- views/ads/index.hbs | 128 +++++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 62 deletions(-) diff --git a/views/ads/index.hbs b/views/ads/index.hbs index 948a0f4..71b4549 100644 --- a/views/ads/index.hbs +++ b/views/ads/index.hbs @@ -3,74 +3,78 @@ Nouvelle annonce -{{#each ads.notPublished}} -
-
-
-

{{title}}

-
-
-
-

Type

-

{{getEnumValue "type" type}}

+
+ {{#each ads.notPublished}} +
+
+
+

{{title}}

+
+
+
+

Type

+

{{getEnumValue "type" type}}

+
+
+

Statut

+

{{getEnumValue "transactionStatus" transactionStatus}}

+
+
+

Prix

+

{{formatPrice price}} €

+
+
+

Disponible le

+ +
-
-

Statut

-

{{getEnumValue "transactionStatus" transactionStatus}}

-
-
-

Prix

-

{{formatPrice price}} €

-
-
-

Disponible le

- -
-
-
-
- Voir - -
-
-{{/each}} + +
+ Voir + +
+ + {{/each}} + {{/authorize}}

Liste des annonces immobilières

-{{#each ads.published}} -
-
-
-

{{title}}

-
-
-
-

Type

-

{{getEnumValue "type" type}}

-
-
-

Statut

-

{{getEnumValue "transactionStatus" transactionStatus}}

-
-
-

Prix

-

{{formatPrice price}} €

-
-
-

Disponible le

- +
+ {{#each ads.published}} +
+
+
+

{{title}}

+
+
+
+

Type

+

{{getEnumValue "type" type}}

+
+
+

Statut

+

{{getEnumValue "transactionStatus" transactionStatus}}

+
+
+

Prix

+

{{formatPrice price}} €

+
+
+

Disponible le

+ +
-
-
-
- Voir - {{#authorize "agent"}} - - {{/authorize}} -
-
-{{/each}} + +
+ Voir + {{#authorize "agent"}} + + {{/authorize}} +
+ + {{/each}} + {{#authorize "agent"}} -- GitLab From 8ccfa769767649f6d6fafa76605d8def757f4304 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 20:10:20 +0100 Subject: [PATCH 08/10] Login and register forms styles --- views/login.hbs | 16 +++++++++------- views/register.hbs | 42 ++++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/views/login.hbs b/views/login.hbs index bf1dcf2..1bbec10 100644 --- a/views/login.hbs +++ b/views/login.hbs @@ -1,11 +1,13 @@
-
- - +
+
+ +
-
- - +
+ +
- + +
\ No newline at end of file diff --git a/views/register.hbs b/views/register.hbs index 558a4aa..4912251 100644 --- a/views/register.hbs +++ b/views/register.hbs @@ -1,23 +1,25 @@
-
- - -
-
- - +
+
+ + -
-
- - -
-
- - -
- + {{/each}} + +
+
+ + +
+
+ + +
+ + \ No newline at end of file -- GitLab From 6722eb2ba0515711357bcb6de9664d789c1b0a02 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 20:10:26 +0100 Subject: [PATCH 09/10] Titles for all routes --- app.js | 2 +- routes/ads.js | 18 +++++++++++++----- routes/auth.js | 3 ++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index 37888bd..f80dea6 100644 --- a/app.js +++ b/app.js @@ -110,7 +110,7 @@ app.use(function(err, req, res, next) { // render the error page res.status(err.status || 500); - res.render('error'); + res.render('error', {title: 'ERREUR'}); }); module.exports = app; diff --git a/routes/ads.js b/routes/ads.js index de4c4df..6bfb9d8 100644 --- a/routes/ads.js +++ b/routes/ads.js @@ -12,7 +12,7 @@ const upload = multer({ /* GET to get to get to the ad creation form */ router .get('/create', authorize('agent'), function(req, res) { - res.render('ads/create'); + res.render('ads/create', {title: 'Créer annonce'}); }) .post('/create', authorize('agent'), upload.array('pictures', 3), function( req, @@ -48,7 +48,10 @@ router res.redirect('/ads/'); }) .catch((reason) => { - res.render('ads/create', reason); + res.render('ads/create', { + title: 'Modifier annonce', + errors: reason.errors, + }); }); } else { const newAd = new adModel.Ad(formData); @@ -61,7 +64,10 @@ router }) .catch((reason) => { console.error(reason); - res.render('ads/create', reason); + res.render('ads/create', { + title: 'Créer annonce', + errors: reason.errors, + }); }); } }) @@ -79,7 +85,7 @@ router req.flash('success', 'Mise à jour réussie !'); } - res.render('ads/create', {ad: ad, errors_update: errors}); + res.render('ads/create', {title: 'Modifier annonce', ad: ad, errors_update: errors}); }); }) .get('/delete/:id', authorize('agent'), deleteAdAction) @@ -172,6 +178,7 @@ router // on trie les annonces par ordre alphabétique res.render('ads/index', { + title: 'Annonces', ads: { published: publishedAds, notPublished: notPublishedAds, @@ -182,6 +189,7 @@ router console.error(err); res.status(500); res.render('ads/index', { + title: 'Annonces', ads: [], _messages: [ ...res.locals._messages, @@ -202,7 +210,7 @@ function renderAdAction(published) { adModel.Ad.findOne({_id: req.params.id, published}, {'pictures.body': 0}) .then((ad) => { if (ad) { - res.render('ads/show', {ad}); + res.render('ads/show', {title: ad.title, ad}); } else { req.flash('error', 'L\'annonce demandé n\'a pas été trouvé'); res.status(404); diff --git a/routes/auth.js b/routes/auth.js index bdb5174..7eb8c1d 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -9,6 +9,7 @@ const users = require('../models/user'); router .get('/register', function(req, res, next) { res.render('register', { + title: 'Inscription', roles: Object.values(users.USER_ROLE), }); }) @@ -42,7 +43,7 @@ router .catch(next); }) .get('/login', function(req, res, next) { - res.render('login'); + res.render('login', {title: 'Connexion'}); }) .post( '/login', -- GitLab From 570b0fc64e74c534a0fa6298af4288958347cbf2 Mon Sep 17 00:00:00 2001 From: florian-boubou Date: Sun, 3 Nov 2019 21:01:16 +0100 Subject: [PATCH 10/10] Fix really weird issue with images width on create Images were overflowing out of parent, set their parent's width to absolute value. REALLY WEIRD IM ANGRY AHHHH. --- public/stylesheets/style.css | 8 ++------ views/ads/create.hbs | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 8b19211..ced89f4 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -27,17 +27,11 @@ body > main { min-width: 150px; } -#create-form { - overflow: hidden; - width: min-content; -} - fieldset, form > button { margin-top: 15px; } div.form-input { - display: inline-block; margin-bottom: 15px; color: var(--bg-color); font-weight: bold; @@ -121,6 +115,8 @@ legend { display: flex; align-items: center; justify-content: space-around; + /*Forced to specify a width here, otherwise container warps outside of parent*/ + width: 610px; } .ad-pictures > img { diff --git a/views/ads/create.hbs b/views/ads/create.hbs index 1eb521f..0ed3e58 100644 --- a/views/ads/create.hbs +++ b/views/ads/create.hbs @@ -91,7 +91,7 @@
- + {{errors.description.message}}
-- GitLab