Skip to content

Commit 6f78a43

Browse files
style: migrate to tailwind v4
1 parent a4adff4 commit 6f78a43

File tree

33 files changed

+702
-1789
lines changed

33 files changed

+702
-1789
lines changed

app/article/[[...categories]]/page.module.css

Lines changed: 0 additions & 44 deletions
This file was deleted.

app/article/[[...categories]]/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { CategoriesSelector } from '~/components/Common/CategoriesSelector/index.tsx';
22
import { ArticleCard } from '~/components/Post/ArticleCard/index.tsx';
33
import { getPostsMetadata } from '~/lib/post.ts';
4-
import styles from './page.module.css';
54
import type { FC } from 'react';
65
import type { Metadata } from 'next';
76

@@ -60,9 +59,9 @@ const Page: FC<PageProps> = async ({ params }) => {
6059
const postsMetadata = await getPostsMetadata(currentCategories[0]);
6160

6261
return (
63-
<main className={styles.page}>
64-
<h1>Article list</h1>
65-
<p>
62+
<main className="container mx-auto px-4 py-8">
63+
<h1 className="mb-4 font-bold text-3xl lg:text-4xl">Article list</h1>
64+
<p className="mb-4 max-w-screen-md text-gray-500 dark:text-gray-400">
6665
Here you can find all the articles available on the website. You can
6766
filter them by category using the dropdown below.
6867
</p>
@@ -71,11 +70,13 @@ const Page: FC<PageProps> = async ({ params }) => {
7170
categories={CATEGORIES}
7271
/>
7372
{postsMetadata.length === 0 ? (
74-
<div className={styles.noArticles}>
75-
<p>No articles here for now</p>
73+
<div className="mt-8">
74+
<p className="ext-transparent bg-gradient-to-r from-green-300 to-green-800 bg-clip-text text-center font-black text-3xl">
75+
No articles here for now
76+
</p>
7677
</div>
7778
) : (
78-
<div className={styles.articles}>
79+
<div className="grid grid-cols-1 justify-center gap-4 md:grid-cols-2 lg:grid-cols-3">
7980
{postsMetadata.map(post => (
8081
<ArticleCard key={post.slug} {...post} />
8182
))}

app/article/post/[article]/page.module.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/article/post/[article]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { notFound } from 'next/navigation';
22
import { getContent } from '~/lib/content.ts';
33
import { getAllPosts } from '~/lib/post.ts';
44
import { ArticleHeader } from '~/components/Post/ArticleHeader/index.tsx';
5-
import styles from './page.module.css';
65
import type { FC } from 'react';
76
import type { Metadata } from 'next';
87
import type { PostFrontmatter } from '~/types/frontmatter';
@@ -54,7 +53,7 @@ const Page: FC<PageProps> = async ({ params }) => {
5453
const { content, frontmatter } = mdxResult;
5554

5655
return (
57-
<main className={styles.page}>
56+
<main className="container mx-auto px-4">
5857
<ArticleHeader
5958
title={frontmatter.title}
6059
description={frontmatter.description}

components/Common/AuthorsList/index.module.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/Common/AuthorsList/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { getGitHubAvatarUrl, getGithubProfileUrl } from '~/utils/gitHubUtils';
22
import { getAcronymFromString } from '~/utils/stringUtils';
33
import { Avatar, AvatarImage, AvatarFallback } from '../Avatar/index.tsx';
4-
import styles from './index.module.css';
54
import type { FC } from 'react';
65

76
type AuthorsListProps = {
@@ -23,5 +22,5 @@ export const AuthorsList: FC<AuthorsListProps> = ({ authors }) => {
2322
</Avatar>
2423
));
2524

26-
return <div className={styles.wrapper}>{authorsList}</div>;
25+
return <div className="flex space-x-2 py-2">{authorsList}</div>;
2726
};

components/Common/Avatar/index.module.css

Lines changed: 0 additions & 40 deletions
This file was deleted.

components/Common/Avatar/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22
import * as AvatarPrimitive from '@radix-ui/react-avatar';
33
import classNames from 'classnames';
4-
import styles from './index.module.css';
54
import type { ComponentProps } from 'react';
65

76
const Avatar = ({
@@ -11,7 +10,10 @@ const Avatar = ({
1110
}: ComponentProps<typeof AvatarPrimitive.Root>) => (
1211
<AvatarPrimitive.Root
1312
ref={ref}
14-
className={classNames(className, styles.root)}
13+
className={classNames(
14+
className,
15+
'flex size-10 shrink-0 overflow-hidden rounded-md shadow-green-300 shadow-sm outline-2 outline-green-300 transition-shadow hover:shadow-green-400 hover:shadow-md dark:shadow-green-800 dark:outline-green-800 hover:dark:shadow-green-700'
16+
)}
1517
{...props}
1618
/>
1719
);
@@ -25,7 +27,7 @@ const AvatarImage = ({
2527
}: ComponentProps<typeof AvatarPrimitive.Image>) => (
2628
<AvatarPrimitive.Image
2729
ref={ref}
28-
className={classNames(styles.image, className)}
30+
className={classNames('aspect-square size-full', className)}
2931
{...props}
3032
/>
3133
);
@@ -39,7 +41,10 @@ const AvatarFallback = ({
3941
}: ComponentProps<typeof AvatarPrimitive.Fallback>) => (
4042
<AvatarPrimitive.Fallback
4143
ref={ref}
42-
className={classNames(styles.fallback, className)}
44+
className={classNames(
45+
'flex size-full items-center justify-center rounded-md bg-green-100 font-bold text-base text-black dark:bg-green-800 dark:text-white',
46+
className
47+
)}
4348
{...props}
4449
/>
4550
);
Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
@reference "../../../styles/globals.css";
2+
13
.button {
2-
@apply rounded
4+
@apply rounded-sm
35
inline-flex
46
items-center
57
justify-center
@@ -8,15 +10,9 @@
810
py-2
911
transition
1012
duration-300
11-
ease-in-out;
12-
13-
&:focus {
14-
@apply outline-none;
15-
}
16-
17-
svg {
18-
@apply size-5;
19-
}
13+
ease-in-out
14+
focus:outline-none
15+
has-[svg]:*:size-5;
2016
}
2117

2218
.primary {
@@ -26,15 +22,12 @@
2622
bg-green-500
2723
text-white
2824
dark:bg-green-400
29-
dark:text-gray-900;
30-
31-
&:hover {
32-
@apply border-gray-600
33-
bg-transparent
34-
text-gray-600
35-
dark:text-gray-300
36-
dark:border-gray-300;
37-
}
25+
dark:text-gray-900
26+
hover:border-gray-600
27+
hover:bg-transparent
28+
hover:text-gray-600
29+
hover:dark:text-gray-300
30+
hover:dark:border-gray-300;
3831
}
3932

4033
.secondary {
@@ -44,15 +37,12 @@
4437
bg-gray-600
4538
text-white
4639
dark:bg-gray-300
47-
dark:text-gray-900;
48-
49-
&:hover {
50-
@apply border-gray-600
51-
bg-transparent
52-
text-gray-600
53-
dark:text-gray-300
54-
dark:border-gray-300;
55-
}
40+
dark:text-gray-900
41+
hover:border-gray-600
42+
hover:bg-transparent
43+
hover:text-gray-600
44+
hover:dark:text-gray-300
45+
hover:dark:border-gray-300;
5646
}
5747

5848
.special {
@@ -62,12 +52,9 @@
6252
bg-transparent
6353
text-gray-600
6454
dark:text-gray-300
65-
dark:border-gray-300;
66-
67-
&:hover {
68-
@apply bg-green-500
69-
text-white
70-
dark:bg-green-400
71-
dark:text-gray-900;
72-
}
55+
dark:border-gray-300
56+
hover:bg-green-500
57+
hover:text-white
58+
hover:dark:bg-green-400
59+
hover:dark:text-gray-900;
7360
}

components/Common/CategoriesSelector/index.module.css

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)