Skip to content

Commit

Permalink
feat(app): Added Gems and polish some UI Components
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Nov 30, 2023
1 parent d781ce8 commit dfb814c
Show file tree
Hide file tree
Showing 10 changed files with 388 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/(home)/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@tailwind utilities;

:root {
--bg-dark: #101010;
--bg-dark: #202020;
--bg-light: #ffffff;

--text-dark: #ffffff;
Expand Down
5 changes: 3 additions & 2 deletions src/components/ColorPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React, { useState } from 'react';
import { ColorPickerModal } from './modal';

import { Color, Colors } from 'bibata/app';
import { GemsSVG } from '@components/svgs';

type Props = {
name: string;
Expand Down Expand Up @@ -48,7 +49,7 @@ export const ColorPickerButton: React.FC<Props> = (props) => {
disabled={selected && disabled}
onClick={props.onClick}>
<div
className={`w-full h-20 md:h-32 flex justify-center items-center ${
className={`w-full h-24 md:h-32 flex justify-center items-center ${
selected ? 'rounded-lg sm:rounded-xl' : 'rounded-2xl sm:rounded-3xl'
}`}
style={
Expand All @@ -63,7 +64,7 @@ export const ColorPickerButton: React.FC<Props> = (props) => {
background: wheel
}
}>
<p>{'o-o'}</p>
<GemsSVG gems={name} />
</div>
<div className='mt-0 sm:mt-3 text-center text-xs sm:text-sm'>{name}</div>
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Cursors/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Report Issue here: https://github.com/ful1e5/bibata/issues`
backgroundColor: `color-mix(in srgb, #1e1e1e 95%, ${props.color.base})`
}}
className='w-full mb-4 overflow-hidden rounded-2xl sm:rounded-3xl border-white/[.1] border'>
<div title={name} className='relative w-full h-24 sm:h-40 mb-4'>
<div title={name} className='relative w-full h-24 sm:h-40'>
{(loading || frames.length === 0) && (
<div className='flex justify-center items-center w-full h-full animate-pulse bg-white/[.2]'>
<ProcessingSVG />
Expand Down Expand Up @@ -194,7 +194,7 @@ Report Issue here: https://github.com/ful1e5/bibata/issues`
</div>

<div className='text-center text-[8px] sm:text-sm'>
<p className='mb-2'>{name}</p>
<p className='py-3'>{name}</p>
</div>
</div>
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Cursors/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export const CursorsLoading: React.FC<Props> = (_props) => {
className='w-full mb-4 overflow-hidden rounded-2xl sm:rounded-3xl bg-white/[0.05] border-white/[.1] border'>
<div
className={
'w-full h-20 sm:h-40 animate-pulse bg-white/[.2]'
'w-full h-24 sm:h-40 animate-pulse bg-white/[.2]'
}></div>
<div className='flex animate-pulse bg-white/[.1] h-8'></div>
<div className='flex animate-pulse bg-white/[.1] h-10' />
</div>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const NavBar: React.FC<Props> = (_props) => {
const { data: session, status } = useSession();

return (
<header className='sticky py-px top-0 z-20 bg-[#030303] backdrop-filter backdrop-blur-md border-b border-white/[.1] firefox:bg-opacity-90'>
<header className='sticky py-px top-0 z-20 bg-[#030303] backdrop-filter backdrop-blur-2xl border-b border-white/[.1] firefox:bg-opacity-70'>
<nav className='container mx-auto p-3 md:p-4 flex items-center justify-between'>
<Link href='/'>
<div className='overflow-hidden flex items-center justify-center gap-2'>
Expand Down
8 changes: 4 additions & 4 deletions src/components/TypePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ interface Props {
export const TypePicker: React.FC<Props> = (props) => {
return (
<div className='flex items-center justify-center'>
<div className='w-5/6 sm:w-1/2 lg:w-2/5 bg-black/[0.2] overflow-hidden '>
<div className='w-full sm:w-1/2 lg:w-2/5 px-12 sm:px-0'>
<div className={`grid grid-cols-2 gap-3`}>
{props.list.map((t) => (
<button
key={t}
title={`Bibata ${t}`}
disabled={t === props.value}
onClick={() => props.onClick(t)}
className={`py-2 inline-flex justify-center items-center gap font-bold border rounded-2xl shadow-md border-gray-500 ${
className={`py-2 flex justify-center items-center gap-1 font-bold border rounded-2xl shadow-md border-white/[.2] ${
t === props.value
? 'bg-white fill-black text-black font-bold'
: 'fill-gray-500 text-gray-500 hover:text-white hover:fill-white hover:border-white'
: 'fill-white/[.4] text-white/[.4] hover:text-white hover:fill-white hover:border-white'
}`}>
<>
{t === 'Modern' && <ModernSVG />}
{t === 'Original' && <OriginalSVG />}
{t}
<p className='hidden sm:block'>{t}</p>
</>
</button>
))}
Expand Down
Loading

0 comments on commit dfb814c

Please sign in to comment.