Skip to content

Commit

Permalink
Merge pull request #160 from ChtiJS/refactor/pages
Browse files Browse the repository at this point in the history
refactor(pages): use CSS modules for members page
  • Loading branch information
nfroidure authored Dec 12, 2023
2 parents acd65ff + 3a3b382 commit 0e7753f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/li.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.root > :global(:first-child:last-child) {
margin: 0;
}
li {
.root li {
margin-left: 50px;
}
8 changes: 8 additions & 0 deletions src/pages/membres.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;
}
13 changes: 2 additions & 11 deletions src/pages/membres.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 './membres.module.scss';
import type { GetStaticProps } from 'next';

export type Members = Awaited<
Expand All @@ -32,7 +33,7 @@ const Page = ({ entries }: Props) => {
<Paragraph>
<Strong>Découvrez la liste des membres 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 @@ -70,16 +71,6 @@ 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 0e7753f

Please sign in to comment.