From b4b95191c6e217bc27f0727aaa1cd266698259f6 Mon Sep 17 00:00:00 2001 From: Nabila Febri Viola Date: Wed, 24 Jun 2020 19:43:57 +0700 Subject: [PATCH 1/3] [REFACTOR] Make detail article page more responsive --- frontend/src/pages/article.css | 22 ++++++++++++++++++---- frontend/src/pages/article.js | 8 +++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/article.css b/frontend/src/pages/article.css index f98f9d8..42d9087 100644 --- a/frontend/src/pages/article.css +++ b/frontend/src/pages/article.css @@ -10,7 +10,6 @@ .article .column div { position: relative; float: left; - width: 300px; margin: 0 0 0 25px; padding: 0; } @@ -21,7 +20,6 @@ position: relative; left: 0; display: block; - width: 300px; margin-top: 10px; padding: 0; color: var(--red); @@ -33,7 +31,8 @@ opacity: 0.3; } .article figure { - width: 300px; + max-width: 100%; + height: auto; margin: 0; padding: 0; border-radius: 0.25rem; @@ -51,5 +50,20 @@ #one-article-title { text-align: center; - word-break: break-all; + word-wrap: break-word; +} + +.three-articles-span { + display: block; + text-align: center; + word-wrap: break-word; +} + +a:hover { + text-decoration: none; + font-weight: bold; +} +a:focus { + text-decoration: none; + font-weight: bold; } diff --git a/frontend/src/pages/article.js b/frontend/src/pages/article.js index f4c1f2e..c245bb9 100644 --- a/frontend/src/pages/article.js +++ b/frontend/src/pages/article.js @@ -78,8 +78,8 @@ const Content = props => { ) : ( dataList.data.results.slice(0, 3).map(newArticle => ( - -
+ +
{ className="img-fluid rounded mx-auto d-block" />
- {newArticle.title} + + {newArticle.title} +
-- GitLab From 7c284880607016b1b97a9cbe7f6239d0683d6de9 Mon Sep 17 00:00:00 2001 From: Nabila Febri Viola Date: Wed, 24 Jun 2020 20:10:59 +0700 Subject: [PATCH 2/3] [REFACTOR] Change font logo --- frontend/src/images/logo.svg | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/images/logo.svg b/frontend/src/images/logo.svg index e9cb934..521ac80 100644 --- a/frontend/src/images/logo.svg +++ b/frontend/src/images/logo.svg @@ -1,3 +1,13 @@ - -
D'Blood
UTD PMI Depok
D'Blood...
Viewer does not support full SVG 1.1
+ + + + + + + + + + + + -- GitLab From 37f638be293fb81ad9bbf7894ca22d161cce96d1 Mon Sep 17 00:00:00 2001 From: Nabila Febri Viola Date: Wed, 24 Jun 2020 20:28:26 +0700 Subject: [PATCH 3/3] [REFACTOR] Fix age property in profile model --- backend/main/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/main/models.py b/backend/main/models.py index 8207262..2b10901 100644 --- a/backend/main/models.py +++ b/backend/main/models.py @@ -93,6 +93,8 @@ class Profile(models.Model): @property def age(self): + if self.birthdate is None: + return 0 born = self.birthdate today = date.today() return today.year - born.year - ((today.month, today.day) < (born.month, born.day)) -- GitLab