From d7fe4988418e2282d6fe3fe0169e4600b8756697 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fede=20=C3=81lvarez?=
<78366796+fedealvarezcampos@users.noreply.github.com>
Date: Wed, 13 Apr 2022 21:04:05 +0200
Subject: [PATCH] Improve Blog (#41)
---
src/components/common/card/card.module.scss | 2 +-
src/components/icons/socials.tsx | 23 ++++++++
.../sections/blog/hero/hero.module.scss | 5 ++
.../blog/post-content/content.module.scss | 13 +++--
.../sections/blog/post-hero/hero.module.scss | 3 +-
.../blog/posts-grid/posts-grid.module.scss | 11 +++-
src/components/sections/blog/search/index.tsx | 2 +-
.../sections/blog/search/search.module.scss | 9 ++-
.../sections/blog/shares/icons/discord.js | 16 -----
.../sections/blog/shares/icons/facebook.js | 16 -----
.../sections/blog/shares/icons/instagram.js | 20 -------
.../sections/blog/shares/icons/reddit.js | 18 ------
.../sections/blog/shares/icons/telegram.js | 18 ------
.../sections/blog/shares/icons/twitter.js | 16 -----
src/components/sections/blog/shares/index.tsx | 14 +++--
.../sections/blog/shares/shares.module.scss | 20 +++----
.../sections/community/socials/index.tsx | 58 ++++++++++++-------
.../community/socials/socials.module.scss | 2 +-
src/lib/renderer/blog.module.scss | 5 ++
19 files changed, 118 insertions(+), 153 deletions(-)
delete mode 100644 src/components/sections/blog/shares/icons/discord.js
delete mode 100644 src/components/sections/blog/shares/icons/facebook.js
delete mode 100644 src/components/sections/blog/shares/icons/instagram.js
delete mode 100644 src/components/sections/blog/shares/icons/reddit.js
delete mode 100644 src/components/sections/blog/shares/icons/telegram.js
delete mode 100644 src/components/sections/blog/shares/icons/twitter.js
diff --git a/src/components/common/card/card.module.scss b/src/components/common/card/card.module.scss
index a85f67b..c7c9014 100644
--- a/src/components/common/card/card.module.scss
+++ b/src/components/common/card/card.module.scss
@@ -240,7 +240,7 @@
p {
line-height: 134%;
letter-spacing: -0.02em;
- font-size: tovw(24px, 'default', 24px);
+ font-size: tovw(24px, 'default', 18px);
}
}
diff --git a/src/components/icons/socials.tsx b/src/components/icons/socials.tsx
index 3131eec..8f07af3 100644
--- a/src/components/icons/socials.tsx
+++ b/src/components/icons/socials.tsx
@@ -275,7 +275,30 @@ const Discourse = ({
)
}
+const Discord = ({
+ className,
+ fill
+}: {
+ className?: string
+ fill?: string
+}) => {
+ return (
+
+ )
+}
+
export {
+ Discord,
Discourse,
Facebook,
Github,
diff --git a/src/components/sections/blog/hero/hero.module.scss b/src/components/sections/blog/hero/hero.module.scss
index 62bb73d..ccb682c 100644
--- a/src/components/sections/blog/hero/hero.module.scss
+++ b/src/components/sections/blog/hero/hero.module.scss
@@ -23,5 +23,10 @@
.container {
z-index: 10;
padding-top: tovw(156px, 'default', 159px);
+
+ @media screen and (max-width: 800px) {
+ padding-left: 0;
+ padding-right: 0;
+ }
}
}
diff --git a/src/components/sections/blog/post-content/content.module.scss b/src/components/sections/blog/post-content/content.module.scss
index 05d0bab..502bb45 100644
--- a/src/components/sections/blog/post-content/content.module.scss
+++ b/src/components/sections/blog/post-content/content.module.scss
@@ -4,13 +4,18 @@ $img-height: 590px;
$img-height-mobile: 200px;
.section {
- transform: translateY(
- calc(tovw($img-height, 'default', $img-height-mobile) * -1 / 2)
- );
+ margin-top: tovw(108px, 'default', 90px);
+ padding-bottom: tovw(147px, 'default', 56px);
@media screen and (max-width: 800px) {
transform: none;
- padding-bottom: tovw(56px, 'default', 56px);
+ }
+
+ .container {
+ @include respond-to('mobile') {
+ padding-left: 0;
+ padding-right: 0;
+ }
}
.image__container {
diff --git a/src/components/sections/blog/post-hero/hero.module.scss b/src/components/sections/blog/post-hero/hero.module.scss
index 95c7d4e..71ce816 100644
--- a/src/components/sections/blog/post-hero/hero.module.scss
+++ b/src/components/sections/blog/post-hero/hero.module.scss
@@ -12,7 +12,8 @@
);
padding-top: tovw(220px, 'default', 150px);
max-width: 100%;
- min-height: calc(var(--vh) * 100);
+
+ // min-height: calc(var(--vh) * 100);
overflow: visible;
text-align: center;
diff --git a/src/components/sections/blog/posts-grid/posts-grid.module.scss b/src/components/sections/blog/posts-grid/posts-grid.module.scss
index a0aa6fc..e51c337 100644
--- a/src/components/sections/blog/posts-grid/posts-grid.module.scss
+++ b/src/components/sections/blog/posts-grid/posts-grid.module.scss
@@ -3,15 +3,21 @@
.container {
display: grid;
column-gap: tovw(24px, 'default', 24px);
- padding-top: tovw(96px, 'default', 88px);
+ padding-top: tovw(90px, 'default', 44px);
padding-bottom: tovw(80px, 'default', 80px);
grid-template-columns: repeat(3, 1fr);
row-gap: tovw(104px, 'default', 81px);
+ @media screen and (max-width: 1300px) {
+ grid-template-columns: repeat(2, 1fr);
+ }
+
@media screen and (max-width: 800px) {
display: flex;
flex-direction: column;
gap: tovw(80px, 'default', 80px);
+ padding-left: 0;
+ padding-right: 0;
}
}
@@ -21,10 +27,11 @@
font-weight: 400;
line-height: tovw(84px, 'default', 48px);
margin-top: 0;
- margin-bottom: tovw(88px, 'default', 44px);
+ margin-bottom: 0;
text-align: center;
@media screen and (max-width: 800px) {
letter-spacing: -0.02em;
+ text-align: start;
}
}
diff --git a/src/components/sections/blog/search/index.tsx b/src/components/sections/blog/search/index.tsx
index 2c1af2b..a73ede2 100644
--- a/src/components/sections/blog/search/index.tsx
+++ b/src/components/sections/blog/search/index.tsx
@@ -36,7 +36,7 @@ type ContainerProps = {
export const SearchContainer = ({ children }: ContainerProps) => {
return (