From 5bd2ee97eb8fb78723f9d1a9b814299e79c9d791 Mon Sep 17 00:00:00 2001 From: Nazareno Oviedo Date: Wed, 6 Apr 2022 10:51:41 -0300 Subject: [PATCH] feat: improve data, ui --- src/components/icons/socials.tsx | 29 +++- .../sections/about/team/team.module.scss | 149 +++++++++--------- src/components/sections/about/team/team.tsx | 52 +++--- src/components/sections/about/team/teams.ts | 63 ++++---- 4 files changed, 164 insertions(+), 129 deletions(-) diff --git a/src/components/icons/socials.tsx b/src/components/icons/socials.tsx index f193386..3131eec 100644 --- a/src/components/icons/socials.tsx +++ b/src/components/icons/socials.tsx @@ -130,6 +130,24 @@ const Linkedin = ({ ) } +const Github = ({ className, fill }: { className?: string; fill?: string }) => { + return ( + + + + ) +} + const Facebook = ({ className, fill @@ -257,4 +275,13 @@ const Discourse = ({ ) } -export { Discourse, Facebook, Instagram, Linkedin, Reddit, Telegram, Twitter } +export { + Discourse, + Facebook, + Github, + Instagram, + Linkedin, + Reddit, + Telegram, + Twitter +} diff --git a/src/components/sections/about/team/team.module.scss b/src/components/sections/about/team/team.module.scss index a999848..3aca871 100644 --- a/src/components/sections/about/team/team.module.scss +++ b/src/components/sections/about/team/team.module.scss @@ -16,22 +16,22 @@ > div:nth-child(2) { display: flex; - margin: auto; - width: tovw(1076px, 'default', 400px); - gap: tovw(24px, 'default', 24px); justify-content: space-between; + width: tovw(1076px, 'default', 400px); + margin: auto; padding-top: tovw(68px, 'default', 40px); + gap: tovw(24px, 'default', 24px); @media screen and (max-width: 800px) { - width: 100%; flex-direction: column; + width: 100%; } p { - margin: 0; - width: tovw(524px, 'default', 300px); font-size: tovw(24px, 'default', 18px); line-height: 1.32; + width: tovw(524px, 'default', 300px); + margin: 0; letter-spacing: -0.01em; @media screen and (max-width: 800px) { @@ -45,10 +45,10 @@ .team { display: flex; flex-direction: column; - margin: auto; - gap: tovw(64px, 'default', 26px); - padding-top: tovw(120px, 'default', 60px); width: tovw(1076px, 'default', 400px); + margin: auto; + padding-top: tovw(120px, 'default', 60px); + gap: tovw(64px, 'default', 26px); @media screen and (max-width: 800px) { width: 100%; @@ -71,9 +71,9 @@ } span:last-child { - padding-top: tovw(18px, 'default', 8px); - font-size: tovw(16px, 'default', 12px); font-family: var(--font-dm-mono), sans-serif; + font-size: tovw(16px, 'default', 12px); + padding-top: tovw(18px, 'default', 8px); color: var(--color-grey-light); @media screen and (max-width: 800px) { @@ -88,85 +88,86 @@ scaleX(2.2) scaleY(1.6); @media screen and (max-width: 800px) { + height: tovw(32px, 'default', 32px); transform: rotate(-90deg) scaleX(2.2) scaleY(1.4) translateY(tovw(-2px, 'mobile', -3px)); - height: tovw(32px, 'default', 32px); } } } +} - .profilesContainer { - @media screen and (min-width: 1400px) { - display: flex; - justify-content: flex-start; - gap: tovw(100px, 'default', 40px); +.profiles__container { + @media screen and (min-width: 1400px) { + display: flex; + justify-content: flex-start; + gap: tovw(100px, 'default', 40px); + } + + @media screen and (max-width: 800px) { + width: 100vw; + margin: 0 tovw(-70px, 'tablet', -35px); + scroll-behavior: smooth; + } +} + +.member { + display: flex; + flex-direction: column; + justify-content: space-between; + width: tovw(194px, 'default', 80px); + transition: filter var(--normal-transition); + gap: tovw(24px, 'default', 18px); + + img { + overflow: hidden; + border-radius: tovw(5px, 'default', 5px); + } + + .description { + font-family: var(--font-tt-hoves); + font-size: tovw(18px, 'default', 16px); + line-height: 1.3; + display: flex; + flex-direction: column; + letter-spacing: -0.02em; + gap: tovw(5px, 'default', 5px); + + span:last-child { + color: var(--color-grey-light); + } + } + + .socials { + display: flex; + gap: tovw(14px, 'default', 14px); + + button { + cursor: pointer; + border: none; + background-color: unset; } - @media screen and (max-width: 800px) { - width: 100vw; - margin: 0 tovw(-70px, 'tablet', -35px); - scroll-behavior: smooth; - } + svg { + width: tovw(23px, 'default', 18px); - .member { - display: flex; - flex-direction: column; - justify-content: space-between; - gap: tovw(24px, 'default', 18px); - width: tovw(194px, 'default', 80px); - transition: filter 350ms; - - img { - border-radius: tovw(5px, 'default', 5px); - } - } - - .darker { - @media screen and (max-width: 1400px) { - filter: opacity(40%); - transition: filter 200ms; - } - } - - .description { - display: flex; - flex-direction: column; - gap: tovw(5px, 'default', 5px); - letter-spacing: -0.02em; - line-height: 1.3; - font-family: var(--font-tt-hoves), sans-serif; - font-size: tovw(18px, 'default', 16px); - - span:last-child { - color: var(--color-grey-light); - } - } - - .socials { - display: flex; - gap: tovw(14px, 'default', 14px); - - button { - cursor: pointer; - border: none; - background-color: unset; + @media screen and (max-width: 800px) { + width: tovw(12px, 'mobile', 19px); } - svg { - width: tovw(23px, 'default', 18px); - - @media screen and (max-width: 800px) { - width: tovw(12px, 'mobile', 19px); - } - - &:hover { - filter: opacity(80%); - } + &:hover { + filter: opacity(80%); } } } } +.darker { + @media screen and (max-width: 1400px) { + transition: filter var(--normal-transition); + filter: opacity(40%); + } +} + .arrow { position: absolute; left: tovw(312px, 'default'); diff --git a/src/components/sections/about/team/team.tsx b/src/components/sections/about/team/team.tsx index 28208ba..752f0ad 100644 --- a/src/components/sections/about/team/team.tsx +++ b/src/components/sections/about/team/team.tsx @@ -1,10 +1,11 @@ import 'keen-slider/keen-slider.min.css' +import clsx from 'clsx' import { useKeenSlider } from 'keen-slider/react' import { useState } from 'react' import Line from '~/components/icons/line' -import { Facebook, Linkedin, Twitter } from '~/components/icons/socials' +import { Github, Linkedin, Twitter } from '~/components/icons/socials' import Heading from '~/components/primitives/heading' import s from './team.module.scss' @@ -12,33 +13,39 @@ import s from './team.module.scss' type Team = { member: { fullName: string - position: string + github: string image: string - twitter: string - facebook: string linkedin: string + position: string + twitter: string } className?: string } function MemberProfile({ member, className }: Team) { return ( -
- team member -
+
+ {member.fullName} +
{member.fullName} {member.position}
-
- - - - - - - - - +
+ {member.twitter && ( + + + + )} + {member.github && ( + + + + )} + {member.linkedin && ( + + + + )}
) @@ -47,11 +54,11 @@ function MemberProfile({ member, className }: Team) { type Teams = { members: { fullName: string - position: string + github: string image: string - twitter: string - facebook: string linkedin: string + position: string + twitter: string }[] teamName: string teamNumber: string @@ -95,7 +102,10 @@ function Team({ members, teamName, teamNumber, teamDept }: Teams) {
{teamNumber}
-
+
{members.map((member: any, i) => (