From 33b8f131b43448d13af82d8c59f818e096e87a6e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 23 Jun 2023 19:49:40 -0700 Subject: [PATCH] Fix job styles --- components/job/JobImage/index.module.scss | 11 ++++++++-- components/job/JobImage/index.tsx | 7 +++--- components/job/JobSection/index.module.scss | 10 ++++----- components/job/JobSection/index.tsx | 12 +++++----- components/job/JobSkillItem/index.module.scss | 14 ++++++------ components/job/JobSkillItem/index.tsx | 22 ++++++++++++------- 6 files changed, 44 insertions(+), 32 deletions(-) diff --git a/components/job/JobImage/index.module.scss b/components/job/JobImage/index.module.scss index 1c176e09..f0fd2689 100644 --- a/components/job/JobImage/index.module.scss +++ b/components/job/JobImage/index.module.scss @@ -1,4 +1,4 @@ -.JobImage { +.image { $height: 252px; $width: 447px; @@ -72,9 +72,16 @@ } } - .Overlay { + .overlay { + backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(1); background: none; position: absolute; + isolation: isolate; + z-index: 9; + top: 0; + right: 0; + bottom: 0; + left: 0; z-index: 1; } } diff --git a/components/job/JobImage/index.tsx b/components/job/JobImage/index.tsx index 01f04895..3b6c6363 100644 --- a/components/job/JobImage/index.tsx +++ b/components/job/JobImage/index.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' import { useRouter } from 'next/router' - +import classNames from 'classnames' import Button from '~components/common/Button' import JobAccessoryPopover from '~components/job/JobAccessoryPopover' @@ -8,7 +8,6 @@ import ShieldIcon from '~public/icons/Shield.svg' import ManaturaIcon from '~public/icons/Manatura.svg' import styles from './index.module.scss' -import classNames from 'classnames' interface Props { job?: Job @@ -103,10 +102,10 @@ const JobImage = ({ ) } return ( -
+
{hasAccessory ? accessoryPopover() : ''} {job && job.id !== '-1' ? image : ''} -
+
) } diff --git a/components/job/JobSection/index.module.scss b/components/job/JobSection/index.module.scss index 03782729..8c786b42 100644 --- a/components/job/JobSection/index.module.scss +++ b/components/job/JobSection/index.module.scss @@ -1,4 +1,4 @@ -#Job { +.job { box-sizing: border-box; display: flex; margin-bottom: $unit-3x; @@ -22,13 +22,13 @@ width: auto; } - .JobDetails { + .details { box-sizing: border-box; display: flex; flex-direction: column; width: 100%; - .JobName { + .name { align-items: center; display: flex; gap: $unit-half; @@ -48,12 +48,12 @@ flex-grow: 0; } - .JobSkills { + .skills { flex-grow: 2; } } - .JobSkills { + .skills { display: flex; flex-direction: column; diff --git a/components/job/JobSection/index.tsx b/components/job/JobSection/index.tsx index c1999f69..fd19c020 100644 --- a/components/job/JobSection/index.tsx +++ b/components/job/JobSection/index.tsx @@ -52,8 +52,8 @@ const JobSection = (props: Props) => { // Classes const skillContainerClasses = classNames({ - JobSkills: true, - editable: props.editable, + [styles.skills]: true, + [styles.editable]: props.editable, }) useEffect(() => { @@ -174,7 +174,7 @@ const JobSection = (props: Props) => { ) const filledJobLabel = ( -
+
{job?.name[locale]} { // Render: JSX components return ( -
+
{ user={party.user} onAccessorySelected={handleAccessorySelected} /> -
+
{props.editable ? ( { ref={selectRef} /> ) : ( -
+
{party.job ? ( {party.job.name[locale]} img, @@ -12,19 +12,19 @@ } } -.JobSkill { +.skill { display: flex; align-items: stretch; justify-content: space-between; - &.editable .Info:hover { + &.editable .info:hover { background-color: var(--button-bg-hover); } &.editable:hover { cursor: pointer; - .Info { + .info { & > img.editable, & > div.placeholder.editable { border: $hover-stroke; @@ -43,7 +43,7 @@ } } - .Info { + .info { align-items: center; border-radius: $input-corner; display: flex; diff --git a/components/job/JobSkillItem/index.tsx b/components/job/JobSkillItem/index.tsx index 93c43ff6..cf333c13 100644 --- a/components/job/JobSkillItem/index.tsx +++ b/components/job/JobSkillItem/index.tsx @@ -51,17 +51,17 @@ const JobSkillItem = React.forwardRef( // Classes const classes = classNames({ - JobSkill: true, - editable: editable, + [styles.skill]: true, + [styles.editable]: editable, }) const imageClasses = classNames({ - placeholder: !skill, - editable: editable && hasJob, + [styles.placeholder]: !skill, + [styles.editable]: editable && hasJob, }) const buttonClasses = classNames({ - Clicked: contextMenuOpen, + [styles.clicked]: contextMenuOpen, }) // Methods: Data mutation @@ -107,9 +107,15 @@ const JobSkillItem = React.forwardRef( if (skill) { jsx =

{skill.name[locale]}

} else if (editable && hasJob) { - jsx =

{t('job_skills.state.selectable')}

+ jsx = ( +

+ {t('job_skills.state.selectable')} +

+ ) } else { - jsx =

{t('job_skills.state.no_skill')}

+ jsx = ( +

{t('job_skills.state.no_skill')}

+ ) } return jsx @@ -159,7 +165,7 @@ const JobSkillItem = React.forwardRef( return (
-
+
{skillImage()} {label()}