Skip to content

Commit

Permalink
Merge pull request #162 from ChtiJS/pages-use-css-modules
Browse files Browse the repository at this point in the history
Use modules css for credits pages
  • Loading branch information
nfroidure authored Dec 12, 2023
2 parents 861ed19 + 07910ce commit fb8d23b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/components/h3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Heading3 = ({
children,
...props
}: { children: React.ReactNode } & React.HTMLAttributes<HTMLElement>) => (
<h3 className={`${styles.root}$`} {...props}>
<h3 className={styles.root} {...props}>
{children}
</h3>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/h4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Heading4 = ({
children,
...props
}: { children: React.ReactNode } & React.HTMLAttributes<HTMLElement>) => (
<h4 className={`${styles.root}$`} {...props}>
<h4 className={styles.root} {...props}>
{children}

</h4>
Expand Down
2 changes: 1 addition & 1 deletion src/components/h5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Heading5 = ({
children,
...props
}: { children: React.ReactNode } & React.HTMLAttributes<HTMLElement>) => (
<h5 className={`${styles.root}$`} {...props}>
<h5 className={styles.root} {...props}>
{children}

</h5>
Expand Down
2 changes: 1 addition & 1 deletion src/components/h6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Heading6 = ({
children,
...props
}: { children: React.ReactNode } & React.HTMLAttributes<HTMLElement>) => (
<h6 className={`${styles.root}$`} {...props}>
<h6 className={styles.root} {...props}>
{children}
</h6>
);
Expand Down
8 changes: 8 additions & 0 deletions src/pages/credits.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.root img {
float: left;
height: 6rem;
width: 6rem;
margin: 0 2rem 1.5rem 0;
border-radius: 50px;
box-shadow: 5px 5px 2px 1px #c1a008;
}
15 changes: 4 additions & 11 deletions src/pages/credits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Strong from '../components/strong';
import Anchor from '../components/a';
import { Octokit } from '@octokit/rest';
import Article from '../components/article';
import styles from './credits.module.scss';
import type { GetStaticProps } from 'next';

export type Contributors = Awaited<
Expand All @@ -32,6 +33,7 @@ const Page = ({ entries }: Props) => {
<Layout
title="Les contributeurs du site"
description="Découvrez les personnes qui ont créé le site de ChtiJS."

>
<ContentBlock>
<Heading1>Les contributeurs du site</Heading1>
Expand All @@ -40,7 +42,7 @@ const Page = ({ entries }: Props) => {
Découvrez les personnes qui ont créé le site de ChtiJS.
</Strong>
</Paragraph>
<div>
<div className={styles.root}>
{entries.map((entry) => (
<Article key={entry.id}>
<img src={entry.avatar_url} alt={`Avatar de ${entry.name}`} />
Expand Down Expand Up @@ -83,16 +85,7 @@ const Page = ({ entries }: Props) => {
))}
</div>
</ContentBlock>
<style jsx>{`
img {
float: left;
height: 6rem;
width: 6rem;
margin: 0 2rem 1.5rem 0;
border-radius: 50px;
box-shadow: 5px 5px 2px 1px #c1a008;
}
`}</style>

</Layout>
);
};
Expand Down

0 comments on commit fb8d23b

Please sign in to comment.