Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve recruitment applet card design #1621

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

.card {
padding: 1rem;
border-radius: 3px;
border: 1px solid $grey-4;
border-radius: 5px;
border: 1px solid $grey-36;
display: block;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
max-width: 16rem;
width: 16rem;

&:hover {
text-decoration: none;
border-color: $grey-35;
border-color: $grey-32;
}

@include for-mobile-down {
Expand All @@ -53,19 +53,9 @@
}
}

.wrapper {
@include for-mobile-down {
width: 100%;
}
}

.disabled {
cursor: not-allowed;

.card {
opacity: 0.5;
pointer-events: none;
}
opacity: 0.5;
pointer-events: none;
}

.title {
Expand All @@ -80,10 +70,14 @@
.description {
color: $grey-2;
font-size: 0.875rem;
margin-top: 0.25rem;
margin-top: 0.5rem;
}

.content {
position: relative;
padding-right: 2rem;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Icon } from '@iconify/react';
import classNames from 'classnames';
import { Link } from '~/Components';
import styles from './AppletCard.module.scss';

Expand All @@ -11,14 +12,12 @@ type Props = {

export function AppletCard({ title, description, url, disabled }: Props) {
return (
<div className={`${styles.wrapper} ${disabled ? styles.disabled : ''}`}>
<Link url={url} className={styles.card}>
<div className={styles.content}>
<span className={styles.title}>{title}</span>
{description && <div className={styles.description}>{description}</div>}
<Icon icon="ion:arrow-forward-outline" width={16} className={styles.arrow_icon} />
</div>
</Link>
</div>
<Link url={url} className={classNames(styles.card, { [styles.disabled]: disabled })}>
<div className={styles.content}>
<span className={styles.title}>{title}</span>
{description && <div className={styles.description}>{description}</div>}
<Icon icon="ion:arrow-forward-outline" width={16} className={styles.arrow_icon} />
</div>
</Link>
);
}
2 changes: 2 additions & 0 deletions frontend/src/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ $black-1: #161616; // small contrast to black
$black-2: #222222;
$grey-5: #f4f4f4;
$grey-4: #eeeeee;
$grey-36: #dddddd;
$grey-35: #cccccc;
$grey-32: #bbbbbb;
$grey-3: #999999;
$grey-2: #777777;
$grey-1: #555555;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export const nb = prepareTranslations({
[KEY.recruitment_separate_recruitment]: 'Separat opptak',

// Recruitment applets
[KEY.recruitment_applet_dashboard_description]: 'Gå til ditt personlige dashbord',
[KEY.recruitment_applet_dashboard_description]: 'Ditt personlige dashbord',
[KEY.recruitment_applet_edit_description]: 'Rediger opptaket',
[KEY.recruitment_applet_open_to_other_positions]: 'Åpen for mer',
[KEY.recruitment_applet_overview_description]: 'Se hvor langt opptaket har kommet',
Expand Down Expand Up @@ -861,7 +861,7 @@ export const en = prepareTranslations({
[KEY.recruitment_separate_recruitment]: 'Seperate recruitment',

// Recruitment applets
[KEY.recruitment_applet_dashboard_description]: 'Go to your personal dashboard',
[KEY.recruitment_applet_dashboard_description]: 'Your personal dashboard',
[KEY.recruitment_applet_edit_description]: 'Edit recruitment',
[KEY.recruitment_applet_open_to_other_positions]: 'Open for more',
[KEY.recruitment_applet_overview_description]: 'See how far the recruitment has come',
Expand Down
Loading