Skip to content

Commit

Permalink
refactor: 抽离公共样式
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoNeng-wWw committed Aug 16, 2024
1 parent 958d3c4 commit c660534
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/(index)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@mantine/core/styles.css';
import React from 'react';
import { MantineProvider, ColorSchemeScript, AppShell } from '@mantine/core';
import { Notifications } from '@mantine/notifications';
import { theme } from '../../theme';
import { theme } from '@/theme';
import '@mantine/notifications/styles.css';
import Header from '@/components/Header';

Expand Down
2 changes: 1 addition & 1 deletion app/(index)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Button, Center, Container, Group, Image, SimpleGrid, Space, Stack, Text, Title } from '@mantine/core';
import { useRouter } from 'next/navigation';
import { min } from '@floating-ui/utils';
import classes from '../(root)/oauth/components/LoginBanner.module.css';
import classes from '@/styles/common.module.css';
import SurveyCard from '@/components/SurveyCard';
import Footer from '@/components/Footer';

Expand Down
2 changes: 1 addition & 1 deletion app/(root)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@mantine/core/styles.css';
import React from 'react';
import { MantineProvider, ColorSchemeScript, AppShell } from '@mantine/core';
import { Notifications } from '@mantine/notifications';
import { theme } from '../../theme';
import { theme } from '@/theme';
import '@mantine/notifications/styles.css';
import Header from '@/components/Header';
import Footer from '@/components/Footer';
Expand Down
9 changes: 1 addition & 8 deletions app/(root)/oauth/components/LoginBanner.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import url("@/styles/common.module.css");
.wrapper {
display: flex;
align-items: center;
Expand All @@ -21,14 +22,6 @@
}
}

.title {
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
font-family: "Greycliff CF",
var(--mantine-font-family), serif;
line-height: 1;
margin-bottom: var(--mantine-spacing-md);
}

.controls {
display: flex;
margin-top: var(--mantine-spacing-xl);
Expand Down
7 changes: 7 additions & 0 deletions styles/common.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.title {
color: light-dark(var(--mantine-color-black), var(--mantine-color-white));
font-family: "Greycliff CF",
var(--mantine-font-family), serif;
line-height: 1;
margin-bottom: var(--mantine-spacing-md);
}

0 comments on commit c660534

Please sign in to comment.