Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added packages/theme/src/theme/assets/gradient-light.avif
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/theme/src/theme/components/announcement/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { NoSSR } from 'rspress/runtime';
import IconClose from './close.svg?react';
import IconClose from '../../assets/close.svg?react';
import styles from './index.module.scss';

interface AnnouncementProps {
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/src/theme/components/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link } from '@theme';
import * as React from 'react';
import IconArrowBarRight from './arrow-bar-right.svg?react';
import IconCorner from './corner-down-right.svg?react';
import IconArrowBarRight from '../../assets/arrow-bar-right.svg?react';
import IconCorner from '../../assets/corner-down-right.svg?react';
import styles from './index.module.scss';

interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container {
background-image: url('./gradient-dark.avif');
background-image: url('../../assets/gradient-dark.avif');
background-size: cover;
background-position: bottom right;
background-repeat: no-repeat;
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/theme/components/home-banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import abstractAtom from '../../assets/abstract-atom.avif';
import {
HOME_BANNER_BUTTON_TEXT,
HOME_BANNER_DESCRIPTION,
HOME_BANNER_HEADLINE,
} from '../../const';
import { Button } from '../button';
import abstractAtom from './abstract-atom.avif';
import styles from './index.module.scss';

declare const HOME_BANNER_LINK: string;
Expand Down
36 changes: 33 additions & 3 deletions packages/theme/src/theme/components/home-feature/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
}

.featureCard {
position: relative;
color: var(--rp-c-text-1);
border: 1px dashed var(--rp-c-divider);
border-radius: var(--rp-radius-small);
padding: 32px;
Expand All @@ -52,12 +54,41 @@
flex-direction: column;
align-items: flex-start;
height: 100%;
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s;
transition: border-color 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.featureCard:hover {
color: var(--rp-c-brand);
border-color: var(--ck-accent);
transform: scale(1.02);
}

.featureCard::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url('../../assets/gradient-light.avif');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
opacity: 0;
z-index: -1;
border-radius: inherit;
transition: opacity 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
}

:global(.dark) .featureCard::before {
background-image: url('../../assets/gradient-dark.avif');
}

.featureCard:hover::before {
opacity: 1;
}

:global(.dark) .featureCard:hover::before {
opacity: 0.5;
}

.featureIcon {
Expand All @@ -74,7 +105,6 @@
font-family: var(--ck-header-font-family);
font-size: 20px;
font-weight: 500;
color: var(--rp-c-text-1);
line-height: 1.2;
letter-spacing: -0.8px;
margin-bottom: 16px;
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/src/theme/components/home-footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link, SocialLinks } from '@theme';
import { usePageData } from 'rspress/runtime';
import CKLogoDark from './ck-logo-dark.svg?react';
import CKLogoLight from './ck-logo-light.svg?react';
import CKLogoDark from '../../assets/ck-logo-dark.svg?react';
import CKLogoLight from '../../assets/ck-logo-light.svg?react';
import styles from './index.module.scss';

declare const HOME_FOOTER_LINK: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/theme/components/link-card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type * as React from 'react';
import ArrowRight from './arrow-right.svg?react';
import ArrowRight from '../../assets/arrow-right.svg?react';
import styles from './index.module.scss';

interface LinkCardProps {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link } from '@theme';
import IconArrowBarRight from './arrow-bar-right.svg?react';
import IconArrowBarRight from '../../assets/arrow-bar-right.svg?react';
import styles from './index.module.scss';

interface PrevNextPageProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type MouseEvent, useContext } from 'react';
import { DataContext, ThemeContext, flushSync } from 'rspress/runtime';
import IconMoon from './moon.svg?react';
import IconSun from './sun.svg?react';
import IconMoon from '../../assets/moon.svg?react';
import IconSun from '../../assets/sun.svg?react';
import './index.module.scss';

const supportAppearanceTransition = () => {
Expand Down