feat: create content layout with emotion

This commit is contained in:
Sonny
2024-04-27 20:00:46 +02:00
committed by Sonny
parent df4185bd62
commit 08dcd7455f
23 changed files with 630 additions and 52 deletions

View File

@@ -0,0 +1,19 @@
import { css } from '@emotion/react';
import { theme } from './theme';
const documentStyle = css({
'html, body, #app': {
height: '100svh',
width: '100svw',
fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",
fontSize: '17px',
color: theme.colors.font,
backgroundColor: theme.colors.background,
display: 'flex',
alignItems: 'center',
flexDirection: 'column',
overflow: 'hidden',
},
});
export default documentStyle;

View File

@@ -0,0 +1,10 @@
import { keyframes } from '@emotion/react';
export const fadeIn = keyframes({
'0%': {
opacity: 0,
},
'100%': {
opacity: 1,
},
});

36
inertia/styles/reset.ts Normal file
View File

@@ -0,0 +1,36 @@
import { css } from '@emotion/react';
export const cssReset = css({
'*': {
boxSizing: 'border-box',
outline: 0,
margin: 0,
padding: 0,
scrollBehavior: 'smooth',
},
'.reset': {
backgroundColor: 'inherit',
color: 'inherit',
padding: 0,
margin: 0,
border: 0,
},
'a': {
width: 'fit-content',
color: '#3f88c5',
textDecoration: 'none',
borderBottom: '1px solid transparent',
},
'b': {
fontWeight: 600,
letterSpacing: '0.5px',
},
'h1, h2, h3, h4, h5, h6': {
fontWeight: '400',
margin: '1em 0',
},
});

44
inertia/styles/theme.ts Normal file
View File

@@ -0,0 +1,44 @@
import { Theme } from '@emotion/react';
const lightBlack = '#555';
const black = '#333';
const darkBlack = '#111';
const white = '#fff';
const gray = '#7c7c7c';
const blue = '#3f88c5';
export const theme: Theme = {
colors: {
font: black,
background: white,
primary: blue,
lightBlack,
black,
darkBlack,
white,
gray,
blue,
},
border: {
radius: '5px',
},
media: {
mobile: '768px',
tablet: '1024px',
small_desktop: '1280px',
medium_desktop: '1440px',
large_desktop: '1920px',
xlarge_desktop: '2560px',
},
transition: {
delay: '0.15s',
},
};