mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
chore: upgrade tailwindcss
up to v4
This commit is contained in:
@ -35,7 +35,7 @@ export default async function Page({
|
|||||||
height={32}
|
height={32}
|
||||||
className="rounded-lg-full "
|
className="rounded-lg-full "
|
||||||
/>
|
/>
|
||||||
<h1 className="ml-2 overflow-hidden text-xl whitespace-nowrap overflow-ellipsis">
|
<h1 className="ml-2 overflow-hidden text-xl whitespace-nowrap text-ellipsis">
|
||||||
<Link href="/gists">
|
<Link href="/gists">
|
||||||
<LinkAnchor external={false}>{gist.login}</LinkAnchor>
|
<LinkAnchor external={false}>{gist.login}</LinkAnchor>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -14,7 +14,7 @@ const loading = () => {
|
|||||||
<h1
|
<h1
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'ml-2 overflow-hidden text-xl',
|
'ml-2 overflow-hidden text-xl',
|
||||||
'whitespace-nowrap overflow-ellipsis',
|
'whitespace-nowrap text-ellipsis',
|
||||||
'flex items-center',
|
'flex items-center',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
@ -16,9 +16,7 @@ const GlobalError = ({
|
|||||||
className={clsx('w-full h-dvh flex', 'justify-center items-center')}
|
className={clsx('w-full h-dvh flex', 'justify-center items-center')}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-xl text-subtext1">
|
<h2 className="text-xl">Something went wrong! ノ( OωOノ)</h2>
|
||||||
Something went wrong! ノ( OωOノ)
|
|
||||||
</h2>
|
|
||||||
<Button onClick={() => reset()}>Try again</Button>
|
<Button onClick={() => reset()}>Try again</Button>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -11,7 +11,7 @@ const Page = async () => {
|
|||||||
id="article"
|
id="article"
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'relative max-w-4xl px-4 mx-auto my-10',
|
'relative max-w-4xl px-4 mx-auto my-10',
|
||||||
'lg:w-[56rem] w-full flex-1',
|
'lg:w-4xl w-full flex-1',
|
||||||
'mt-8',
|
'mt-8',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
@ -62,7 +62,7 @@ const Page = async ({
|
|||||||
id="article"
|
id="article"
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'relative max-w-4xl px-4 mx-auto my-10',
|
'relative max-w-4xl px-4 mx-auto my-10',
|
||||||
'lg:w-[56rem] w-full flex-1',
|
'lg:w-4xl w-full flex-1',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<h1>{mdxSource.frontmatter?.title}</h1>
|
<h1>{mdxSource.frontmatter?.title}</h1>
|
||||||
|
@ -36,7 +36,7 @@ const BackToTop = () => {
|
|||||||
<Button
|
<Button
|
||||||
onClick={handleBack}
|
onClick={handleBack}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'!p-3 fixed',
|
'p-3! fixed',
|
||||||
'right-4 bottom-4',
|
'right-4 bottom-4',
|
||||||
'lg:right-8 lg:bottom-8',
|
'lg:right-8 lg:bottom-8',
|
||||||
'transition-all duration-300',
|
'transition-all duration-300',
|
||||||
|
@ -19,7 +19,7 @@ const Anchor = forwardRef<HTMLAnchorElement, Props>(
|
|||||||
<span
|
<span
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'mx-[2px] text-teal-500 relative',
|
'mx-[2px] text-teal-500 relative',
|
||||||
'before:left-0 before:top-[1px] before:block before:absolute',
|
'before:left-0 before:top-px before:block before:absolute',
|
||||||
'before:w-full before:h-full before:transition-all before:shadow-underline',
|
'before:w-full before:h-full before:transition-all before:shadow-underline',
|
||||||
'hover:before:shadow-throughline',
|
'hover:before:shadow-throughline',
|
||||||
'dark:text-teal-600',
|
'dark:text-teal-600',
|
||||||
|
@ -14,7 +14,7 @@ const Anchor = ({ children, external = true, className }: Props) => {
|
|||||||
<span
|
<span
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'mx-[2px] text-teal-500 relative',
|
'mx-[2px] text-teal-500 relative',
|
||||||
'before:left-0 before:top-[1px] before:block before:absolute',
|
'before:left-0 before:top-px before:block before:absolute',
|
||||||
'before:w-full before:h-full before:transition-all before:shadow-underline',
|
'before:w-full before:h-full before:transition-all before:shadow-underline',
|
||||||
'hover:before:shadow-throughline',
|
'hover:before:shadow-throughline',
|
||||||
'dark:text-teal-600',
|
'dark:text-teal-600',
|
||||||
|
@ -30,7 +30,7 @@ const PostCard = ({ post }: Props) => {
|
|||||||
<div className="hidden lg:block">{post.date}</div>
|
<div className="hidden lg:block">{post.date}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-between text-subtext0">
|
<div className="flex justify-between">
|
||||||
<div className="flex items-center text-sm">
|
<div className="flex items-center text-sm">
|
||||||
{Array.isArray(post.tags) ? (
|
{Array.isArray(post.tags) ? (
|
||||||
post.tags.map((tag) => (
|
post.tags.map((tag) => (
|
||||||
|
@ -18,7 +18,7 @@ const FriendCard = ({ friend }: { friend: Friend }) => {
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<h2 className={clsx('text-xl font-semibold')}>{friend.name}</h2>
|
<h2 className={clsx('text-xl font-semibold')}>{friend.name}</h2>
|
||||||
<div className="text-sm text-subtext0">{friend.link}</div>
|
<div className="text-sm">{friend.link}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="overflow-hidden rounded-lg w-14 h-14">
|
<div className="overflow-hidden rounded-lg w-14 h-14">
|
||||||
<Image
|
<Image
|
||||||
|
@ -16,7 +16,7 @@ const GistsCode = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<div className="h-[30px] bg-[#f6f8fa] dark:bg-[hsl(220,13%,18%)] flex">
|
<div className="h-[30px] bg-[#f6f8fa] dark:bg-rua-gray-700 flex">
|
||||||
<div className="flex items-center h-full mx-3">
|
<div className="flex items-center h-full mx-3">
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
@ -45,8 +45,8 @@ const GistsCode = () => {
|
|||||||
className={clsx(
|
className={clsx(
|
||||||
'px-4 bg-white',
|
'px-4 bg-white',
|
||||||
'leading-[30px]',
|
'leading-[30px]',
|
||||||
'dark:bg-[hsl(220,13%,18%)] dark:border-b dark:border-b-[rgb(128,203,196)]',
|
'dark:bg-rua-gray-700 dark:border-b dark:border-b-[rgb(128,203,196)]',
|
||||||
'overflow-hidden whitespace-nowrap overflow-ellipsis',
|
'overflow-hidden whitespace-nowrap text-ellipsis',
|
||||||
'flex items-center',
|
'flex items-center',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
@ -41,7 +41,7 @@ const GistsCode = ({ file, showFileName = false }: Props) => {
|
|||||||
<>
|
<>
|
||||||
{showFileName ? (
|
{showFileName ? (
|
||||||
<div className={clsx(styles.wrapper, 'relative group')}>
|
<div className={clsx(styles.wrapper, 'relative group')}>
|
||||||
<div className="h-[30px] bg-[#f6f8fa] dark:bg-[hsl(220,13%,18%)] flex">
|
<div className="h-[30px] bg-[#f6f8fa] dark:bg-rua-gray-700 flex">
|
||||||
<div className="flex items-center h-full mx-3">
|
<div className="flex items-center h-full mx-3">
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
@ -70,8 +70,8 @@ const GistsCode = ({ file, showFileName = false }: Props) => {
|
|||||||
className={clsx(
|
className={clsx(
|
||||||
'px-4 bg-white',
|
'px-4 bg-white',
|
||||||
'leading-[30px]',
|
'leading-[30px]',
|
||||||
'dark:bg-[hsl(220,13%,18%)] dark:border-b dark:border-b-[rgb(128,203,196)]',
|
'dark:bg-rua-gray-700 dark:border-b dark:border-b-[rgb(128,203,196)]',
|
||||||
'overflow-hidden whitespace-nowrap overflow-ellipsis',
|
'overflow-hidden whitespace-nowrap text-ellipsis',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{file.filename}
|
{file.filename}
|
||||||
|
@ -16,7 +16,7 @@ const GistSkeleton = () => {
|
|||||||
<h1
|
<h1
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'ml-2 overflow-hidden text-xl',
|
'ml-2 overflow-hidden text-xl',
|
||||||
'whitespace-nowrap overflow-ellipsis',
|
'whitespace-nowrap text-ellipsis',
|
||||||
'w-[234px] animate-pulse bg-gray-300',
|
'w-[234px] animate-pulse bg-gray-300',
|
||||||
'h-6 rounded-lg',
|
'h-6 rounded-lg',
|
||||||
'dark:bg-gray-400',
|
'dark:bg-gray-400',
|
||||||
|
@ -16,7 +16,7 @@ const PojectCardSkeleton = () => {
|
|||||||
>
|
>
|
||||||
<VscGithubInverted className="w-8 h-8" />
|
<VscGithubInverted className="w-8 h-8" />
|
||||||
|
|
||||||
<a className="w-[calc(100%_-_40px)]" target="_blank" rel="noreferrer">
|
<a className="w-[calc(100%-40px)]" target="_blank" rel="noreferrer">
|
||||||
<h2
|
<h2
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'text-xl overflow-hidden',
|
'text-xl overflow-hidden',
|
||||||
|
@ -33,7 +33,7 @@ const ProjectCard = ({ project, icon }: ProjectCardProps) => {
|
|||||||
|
|
||||||
<a
|
<a
|
||||||
href={project.url}
|
href={project.url}
|
||||||
className="w-[calc(100%_-_40px)]"
|
className="w-[calc(100%-40px)]"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
|
@ -58,12 +58,12 @@ const PostToc = ({ toc, tocLength }: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="toc text-lg">
|
<div className="toc text-lg">
|
||||||
<ul className="!pl-[unset]">
|
<ul className="pl-[unset]!">
|
||||||
{toc?.map((h) => (
|
{toc?.map((h) => (
|
||||||
<Fragment key={h.link}>
|
<Fragment key={h.link}>
|
||||||
<TocItem item={h} />
|
<TocItem item={h} />
|
||||||
{h.children.map((child) => (
|
{h.children.map((child) => (
|
||||||
<ul className="!pl-4" key={child.link}>
|
<ul className="pl-4!" key={child.link}>
|
||||||
<TocItem item={child} />
|
<TocItem item={child} />
|
||||||
</ul>
|
</ul>
|
||||||
))}
|
))}
|
||||||
|
@ -5,7 +5,7 @@ import styles from './vercel-loading.module.css';
|
|||||||
const VercelLoading = () => {
|
const VercelLoading = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="fixed bottom-[10px] right-[20px] z-[99999]">
|
<div className="fixed bottom-[10px] right-[20px] z-99999">
|
||||||
<div
|
<div
|
||||||
id="container"
|
id="container"
|
||||||
className={clsx(styles.container, styles.visible, styles.building)}
|
className={clsx(styles.container, styles.visible, styles.building)}
|
||||||
|
@ -29,7 +29,7 @@ const Tab = ({ defaultValue, children }: Props) => {
|
|||||||
<ul
|
<ul
|
||||||
role="tablist"
|
role="tablist"
|
||||||
aria-orientation="horizontal"
|
aria-orientation="horizontal"
|
||||||
className="flex list-none !p-[unset]"
|
className="flex list-none p-[unset]!"
|
||||||
>
|
>
|
||||||
{children.map((child) => (
|
{children.map((child) => (
|
||||||
<li
|
<li
|
||||||
@ -44,7 +44,7 @@ const Tab = ({ defaultValue, children }: Props) => {
|
|||||||
'select-none cursor-pointer',
|
'select-none cursor-pointer',
|
||||||
'min-w-[76px] text-center',
|
'min-w-[76px] text-center',
|
||||||
'hover:bg-gray-200 dark:hover:bg-rua-gray-800',
|
'hover:bg-gray-200 dark:hover:bg-rua-gray-800',
|
||||||
'!list-none',
|
'list-none!',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{child.props.label}
|
{child.props.label}
|
||||||
|
@ -11,7 +11,7 @@ export type ItemProps = {
|
|||||||
const TabItem = ({ showContent, children }: ItemProps) => {
|
const TabItem = ({ showContent, children }: ItemProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={clsx('hidden', showContent && '!block')}>{children}</div>
|
<div className={clsx('hidden', showContent && 'block!')}>{children}</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -111,7 +111,7 @@ pub fn DarkMode(#[prop(optional)] class: Cow<'static, str>) -> impl IntoView {
|
|||||||
</div>
|
</div>
|
||||||
<ul
|
<ul
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="dropdown-content menu bg-base-100 rounded-box z-[1] w-32 p-2 shadow flex flex-col h-64 overflow-y-auto flex-nowrap"
|
class="dropdown-content menu bg-base-100 rounded-box z-1 w-32 p-2 shadow flex flex-col h-64 overflow-y-auto flex-nowrap"
|
||||||
>
|
>
|
||||||
<For
|
<For
|
||||||
each=move || COLOR_MODE
|
each=move || COLOR_MODE
|
||||||
|
@ -17,6 +17,11 @@ const nextConfig = {
|
|||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
// swcMinify: true,
|
// swcMinify: true,
|
||||||
output: 'standalone',
|
output: 'standalone',
|
||||||
|
allowedDevOrigins: [
|
||||||
|
'local-origin.dev',
|
||||||
|
'*.local-origin.dev',
|
||||||
|
'192.168.31.158',
|
||||||
|
],
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
4
pnpm-lock.yaml
generated
4
pnpm-lock.yaml
generated
@ -6343,7 +6343,7 @@ snapshots:
|
|||||||
|
|
||||||
lightningcss@1.30.1:
|
lightningcss@1.30.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
detect-libc: 2.0.3
|
detect-libc: 2.0.4
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
lightningcss-darwin-arm64: 1.30.1
|
lightningcss-darwin-arm64: 1.30.1
|
||||||
lightningcss-darwin-x64: 1.30.1
|
lightningcss-darwin-x64: 1.30.1
|
||||||
@ -7906,7 +7906,7 @@ snapshots:
|
|||||||
acorn-import-attributes: 1.9.5(acorn@8.13.0)
|
acorn-import-attributes: 1.9.5(acorn@8.13.0)
|
||||||
browserslist: 4.24.5
|
browserslist: 4.24.5
|
||||||
chrome-trace-event: 1.0.4
|
chrome-trace-event: 1.0.4
|
||||||
enhanced-resolve: 5.17.1
|
enhanced-resolve: 5.18.1
|
||||||
es-module-lexer: 1.5.4
|
es-module-lexer: 1.5.4
|
||||||
eslint-scope: 5.1.1
|
eslint-scope: 5.1.1
|
||||||
events: 3.3.0
|
events: 3.3.0
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@config "../tailwind.config.js";
|
@config "../tailwind.config.js";
|
||||||
|
@plugin "@catppuccin/tailwindcss";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The default border color has changed to `currentcolor` in Tailwind CSS v4,
|
The default border color has changed to `currentcolor` in Tailwind CSS v4,
|
||||||
@ -81,8 +82,8 @@ font-family: 'Poppins', sans-serif;
|
|||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
body {
|
body {
|
||||||
/* @apply text-gray-600 bg-bluish-gray dark:bg-rua-gray-900 dark:text-gray-200; */
|
@apply text-gray-600 bg-bluish-gray dark:bg-rua-gray-900 dark:text-gray-200;
|
||||||
@apply text bg-linear-to-b from-base to-crust;
|
/* @apply text bg-linear-to-b from-base to-crust; */
|
||||||
font-family:
|
font-family:
|
||||||
'Poppins',
|
'Poppins',
|
||||||
-apple-system,
|
-apple-system,
|
||||||
|
Reference in New Issue
Block a user