Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update footer & YooldoTailwindConfig #8

Merged
merged 2 commits into from
Oct 30, 2023
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "catze-ui",
"private": false,
"version": "0.0.11",
"version": "0.0.12",
"type": "module",
"main": "dist/index.umd.js",
"module": "dist/index.es.js",
Expand Down
25 changes: 20 additions & 5 deletions src/yooldo/components/YooldoFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { forwardRef } from 'react';
import { forwardRef, ComponentPropsWithoutRef } from 'react';

import { TextLink } from './TextLink';
import { Divider } from './Divider';
Expand Down Expand Up @@ -28,19 +28,34 @@ type SocialLinkListProps = {
[key in SocialLinkCategory]: SocialItemProps[];
};

export interface FooterProps {
export interface FooterProps extends ComponentPropsWithoutRef<'footer'> {
projectsLinks: ProjectLinkProps;
socialLinks?: SocialLinkListProps['yooldo'];
backgroundNode?: React.ReactNode;
logoClassName?: string;
}
export const YooldoFooter = forwardRef<HTMLDetailsElement, FooterProps>(
({ projectsLinks, socialLinks, backgroundNode }, footerRef) => {
(
{
className,
projectsLinks,
socialLinks,
backgroundNode,
logoClassName,
...props
},
footerRef,
) => {
const upperLinks = Object.entries(projectsLinks).map((v) => v);

return (
<footer
className={'relative flex flex-col gap-12 px-5 py-8 lg:px-8 lg:py-10'}
className={cn([
'relative flex flex-col gap-12 px-5 py-8 lg:px-8 lg:py-10',
className,
])}
ref={footerRef}
{...props}
>
<div
className={
Expand Down Expand Up @@ -78,7 +93,7 @@ export const YooldoFooter = forwardRef<HTMLDetailsElement, FooterProps>(
</div>
<Divider className={'z-1 mx-auto w-full'} />
<div className={'z-1 flex flex-col items-center gap-6'}>
<YooldoLogo />
<YooldoLogo className={logoClassName} />
<div className={'flex items-center gap-4'}>
{socialLinks?.map((item) => (
<a
Expand Down
3 changes: 2 additions & 1 deletion src/yooldo/components/YooldoLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { ComponentPropsWithRef } from 'react';

import '../../index.css';
import { cn } from '../../common/utils/cn';

export interface YooldoLogoProps extends ComponentPropsWithRef<'svg'> {
pathClassName?: string;
Expand All @@ -22,7 +23,7 @@ export const YooldoLogo: React.FC<YooldoLogoProps> = ({
viewBox="0 0 52 49"
xmlns="http://www.w3.org/2000/svg"
fill="none"
className={className}
className={cn(['fill-yooldo-white', className])}
{...props}
>
<path
Expand Down
26 changes: 14 additions & 12 deletions src/yooldo/tailwind/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,25 +131,27 @@ export const yooldoTailwindConfig = {
'14px': '14px',
},
boxShadow: {
'btn-primary': '4px 4px 0 0 #b54100',
'btn-secondary': '4px 4px 0 0 #005099',
'btn-sunset': '4px 4px 0 0 #b54100',
'btn-blue': '4px 4px 0 0 #005099',
'btn-dark': '4px 4px 0 0 #576476',
'btn-purple': '4px 4px 0 0 #6500a0',
'btn-green': '4px 4px 0 0 #65a188',
box: '0px 0px 20px 0px rgba(10, 48, 105, 0.80)',
outline: '0 0 0 1.5px #F97316',
},
zIndex: {
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
8: 8,
9: 9,
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
},
opacity: {
80: '0.8',
'80': '0.8',
},

left: {
Expand Down
171 changes: 14 additions & 157 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,167 +1,24 @@
/** @type {import('tailwindcss').Config} */
import { yooldoTailwindConfig } from './src/yooldo/tailwind/config';

export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
darkMode: 'class',
theme: {
extend: {
screens: {
sm: `640px`,
md: `768px`,
lg: `1240px`,
xl: `1470px`,
'2xl': `1740px`,
},
colors: {
'yooldo-sunset': {
50: '#ffefe6',
100: '#ffccb0',
200: '#ffb48a',
300: '#ff9254',
400: '#ff7d33',
500: '#ff5c00',
600: '#e85400',
700: '#b54100',
800: '#8c3300',
900: '#6b2700',
DEFAULT: '#ff5c00',
},
'yooldo-sunrise': {
50: '#fae9e6',
100: '#f1bcb0',
200: '#ea9b8a',
300: '#e06e54',
400: '#da5133',
500: '#d12600',
600: '#be2300',
700: '#941b00',
800: '#731500',
900: '#581000',
DEFAULT: '#d12600',
},
'yooldo-minting': {
50: '#e7faf8',
100: '#b6f0ea',
200: '#92e9df',
300: '#61e0d1',
400: '#42d9c8',
500: '#13d0ba',
600: '#11bda9',
700: '#0d9484',
800: '#0a7266',
900: '#08574e',
DEFAULT: '#13d0ba',
},
'yooldo-another-blue': {
50: '#e6f3ff',
100: '#b0d9ff',
200: '#8ac7ff',
300: '#54adff',
400: '#339dff',
500: '#0085ff',
600: '#0079e8',
700: '#005eb5',
800: '#00498c',
900: '#00386b',
DEFAULT: '#0085ff',
},
'yooldo-another-purple': {
50: '#f5e6fa',
100: '#e0b0f1',
200: '#d18aea',
300: '#bc54e0',
400: '#af33da',
500: '#9b00d1',
600: '#8d00be',
700: '#6e0094',
800: '#550073',
900: '#410058',
DEFAULT: '#9b00d1',
},
'yooldo-another-green': {
50: '#e7faf2',
100: '#b6f0d8',
200: '#92e9c5',
300: '#61e0ab',
400: '#42d99a',
500: '#13d081',
600: '#11bd75',
700: '#0d945c',
800: '#0a7247',
900: '#085736',
DEFAULT: '#13d081',
},
'yooldo-white': '#fbfbfb',
'yooldo-black': {
50: '#e6e8eb',
100: '#b1b7c0',
200: '#8c94a1',
300: '#576476',
400: '#36455c',
500: '#041733',
600: '#04152e',
700: '#031024',
800: '#020d1c',
900: '#020a15',
DEFAULT: '#041733',
},
'yooldo-card-black': '#000d1e',
'yooldo-highlight-sunset': '#FF5C0040',
'yooldo-highlight-blue': '#0085ff40',
},
fontFamily: {
lexend: ['var(--lexend)', 'sans-serif'],
mono: ['var(--ibm-plex-mono)'],
},
fontSize: {
'4xl': '3.5rem', // 56px
'3xl': '2rem', // 32px
'2xl': '1.625rem', // 26px
xl: '1.25rem', // 20px
base: '1rem', // 16px
sm: '0.875rem', // 14px
xs: '0.75rem', // 12px
},
width: {
6.5: '1.625rem',
},
padding: {
12.5: '3.125rem', // 50px
17: '4.25rem', // 68px
22: '5.5rem', // 88px
},
flexBasis: {
22: '5.5rem', // 88px
},
spacing: {
'14px': '14px',
},
boxShadow: {
'btn-sunset': '4px 4px 0 0 #b54100',
'btn-blue': '4px 4px 0 0 #005099',
'btn-dark': '4px 4px 0 0 #576476',
'btn-purple': '4px 4px 0 0 #6500a0',
'btn-green': '4px 4px 0 0 #65a188',
box: '0px 0px 20px 0px rgba(10, 48, 105, 0.80)',
outline: '0 0 0 1.5px #F97316',
},
zIndex: {
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
},
opacity: {
80: '0.8',
},
screens: yooldoTailwindConfig.screens,
colors: yooldoTailwindConfig.colors,
fontFamily: yooldoTailwindConfig.fontFamily,
fontSize: yooldoTailwindConfig.fontSize,
width: yooldoTailwindConfig.width,
padding: yooldoTailwindConfig.padding,
flexBasis: yooldoTailwindConfig.flexBasis,
spacing: yooldoTailwindConfig.spacing,
boxShadow: yooldoTailwindConfig.boxShadow,
zIndex: yooldoTailwindConfig.zIndex,
opacity: yooldoTailwindConfig.opacity,

left: {
'-1/5': '-20%',
},
left: yooldoTailwindConfig.left,
animation: {
'move-tr-bl': 'tr-bl 30s ease-in-out infinite',
'move-tl-br': 'tl-br 16s ease-in-out infinite',
Expand Down