Skip to content

Commit

Permalink
feat: credits page improved
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroerta committed Oct 28, 2021
1 parent 746228a commit 46b95ef
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
1 change: 1 addition & 0 deletions devtool/src/_shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export type Author = {
name: string;
url: string;
image?: string;
contributions?: string[];
};
7 changes: 6 additions & 1 deletion devtool/src/devtool/pages/Credits/PersonCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getInitials(name: string) {
}

export const PersonCard: React.FC<Props> = ({ person }) => {
const { name, image, url } = person;
const { name, image, url, contributions = [] } = person;

const onClick = useCallback(() => {
redirect(url);
Expand All @@ -38,6 +38,11 @@ export const PersonCard: React.FC<Props> = ({ person }) => {
<div className={styles.cardContainer} onClick={onClick}>
{cover}
<h3 className={clsx('morfeo-typography-h3', styles.name)}>{name}</h3>
<div className={styles.contributionsContainer}>
{contributions.map(contribution => (
<span>{contribution}</span>
))}
</div>
</div>
);
};
4 changes: 4 additions & 0 deletions devtool/src/devtool/pages/Credits/people.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ export const authors: Author[] = [
name: 'Mauro Erta',
url: 'https://github.com/mauroerta',
image: mauroCoverImage,
contributions: ['💻', '📖', '🤔'],
},
{
name: 'Andrea Porceddu',
url: 'https://github.com/andreaSimonePorceddu',
image: andreaCoverImage,
contributions: ['💻', '📖', '🤔'],
},
{
name: 'Luca Cacciarru',
url: 'https://github.com/lucacacciarru',
image: lucaCoverImage,
contributions: ['🎨', '🤔'],
},
{
name: 'Gabriele Angius',
url: 'https://github.com/gabrieleAngius',
image: gabrieleCoverImage,
contributions: ['🎨', '🤔'],
},
];
8 changes: 8 additions & 0 deletions devtool/src/devtool/pages/Credits/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,12 @@
font-family: var(--fonts-regular);
font-weight: var(--font-weights-bold);
line-height: var(--line-heights-heading);
}

.contributionsContainer {
display: flex;
}

.contributionsContainer span:not(:last-child) {
margin-right: var(--spacings-xxs);
}
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Morfeo',
tagline: 'Framework Agnostic theming system',
tagline: 'The theming system\nyou were missing',
url: 'https://morfeo.dev',
baseUrl: '/',
onBrokenLinks: 'throw',
Expand Down
9 changes: 6 additions & 3 deletions docs/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ function HomepageHeader() {
<div className={styles.logoContainer}>
<Logo />
</div>
<p className={clsx('hero__subtitle', styles.subtitle)}>
{siteConfig.tagline}
</p>
<div className={clsx('hero__subtitle', styles.subtitle)}>
{siteConfig.tagline.split('\n').map(part => (
<p>{part}</p>
))}
</div>

<div className={styles.buttons}>
<Link
className="button button--primary button--lg"
Expand Down
4 changes: 4 additions & 0 deletions docs/src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@
margin-top: 30px;
margin-bottom: 30px;
}

.subtitle p {
margin: 0;
}

0 comments on commit 46b95ef

Please sign in to comment.