Skip to content

Commit 6e3dc92

Browse files
Merge pull request #82 from elek-io/small-visual-improvements
Small visual improvements
2 parents 7f4dcc1 + 3b5ff2c commit 6e3dc92

12 files changed

Lines changed: 99 additions & 61 deletions

File tree

.changeset/common-views-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@elek-io/client': patch
3+
---
4+
5+
Small visual improvements

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
"files.watcherExclude": {
3+
"**/routeTree.gen.ts": true
4+
},
5+
"search.exclude": {
6+
"**/routeTree.gen.ts": true
7+
},
8+
"files.readonlyInclude": {
9+
"**/routeTree.gen.ts": true
10+
},
211
"editor.formatOnSave": true,
312
"editor.defaultFormatter": "esbenp.prettier-vscode",
413
"editor.codeActionsOnSave": {

components.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"rsc": true,
55
"tsx": true,
66
"tailwind": {
7-
"config": "tailwind.config.js",
7+
"config": "",
88
"css": "src/renderer/src/index.css",
99
"baseColor": "zinc",
1010
"cssVariables": false,
@@ -13,5 +13,6 @@
1313
"aliases": {
1414
"components": "@renderer/components",
1515
"utils": "@renderer/util"
16-
}
16+
},
17+
"iconLibrary": "lucide"
1718
}

package-lock.json

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"react-hook-form": "7.62.0",
7171
"sonner": "2.0.7",
7272
"tailwind-merge": "3.3.1",
73-
"tailwindcss-animate": "1.0.7",
73+
"tw-animate-css": "1.3.8",
7474
"zod": "4.0.17",
7575
"zustand": "5.0.7"
7676
},

src/renderer/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<link href="/src/index.css" rel="stylesheet" />
1313
</head>
1414
<body
15-
class="h-full bg-zinc-200 dark:bg-zinc-800 text-zinc-800 dark:text-zinc-200"
15+
class="h-full antialiased transition-colors ease-linear bg-zinc-200 dark:bg-zinc-950 text-zinc-800 dark:text-zinc-200"
1616
>
1717
<div id="app" class="flex flex-col h-full"></div>
1818
<script type="module" src="/src/main.tsx"></script>

src/renderer/src/components/ui/card.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
66
<div
77
ref={ref}
88
className={cn(
9-
'rounded-xl border border-zinc-200 bg-white text-zinc-950 shadow-sm dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-50',
9+
'rounded-lg border border-zinc-200 bg-zinc-50 shadow-sm dark:border-zinc-800 dark:bg-zinc-900',
1010
className
1111
)}
1212
{...props}
@@ -19,7 +19,10 @@ const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
1919
({ className, ...props }, ref) => (
2020
<div
2121
ref={ref}
22-
className={cn('flex flex-col space-y-1.5 p-6', className)}
22+
className={cn(
23+
'flex flex-col space-y-1.5 p-6 text-zinc-800 dark:text-zinc-200',
24+
className
25+
)}
2326
{...props}
2427
/>
2528
)
@@ -32,7 +35,7 @@ const CardTitle = forwardRef<
3235
>(({ className, ...props }, ref) => (
3336
<h3
3437
ref={ref}
35-
className={cn('leading-none tracking-tight', className)}
38+
className={cn('text-base font-semibold leading-6', className)}
3639
{...props}
3740
/>
3841
));
Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { cn } from '@renderer/util';
22
import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
3+
import {
4+
Card,
5+
CardContent,
6+
CardDescription,
7+
CardHeader,
8+
CardTitle,
9+
} from './card';
310

411
export interface PageSectionProps extends HTMLAttributes<HTMLDivElement> {
512
children?: ReactNode;
@@ -13,24 +20,21 @@ export function PageSection({
1320
...props
1421
}: PageSectionProps): ReactElement {
1522
return (
16-
<section
17-
className={cn(
18-
'p-6 border-t border-zinc-200 dark:border-zinc-800',
19-
className
20-
)}
21-
>
22-
<div className="sm:flex sm:items-center mb-4">
23-
<div className="sm:flex-auto">
24-
<h2 className="text-base font-semibold leading-6">{props.title}</h2>
25-
<p className="mt-2 text-[0.8rem] text-zinc-500 dark:text-zinc-400">
26-
{props.description}
27-
</p>
28-
</div>
29-
<div className="mt-4 sm:ml-16 sm:mt-0 sm:flex-none">
30-
{props.actions && props.actions}
31-
</div>
32-
</div>
33-
{props.children}
23+
<section className={cn('', className)}>
24+
<Card>
25+
<CardHeader>
26+
<div className="sm:flex sm:items-center">
27+
<div className="sm:flex-auto">
28+
<CardTitle>{props.title}</CardTitle>
29+
<CardDescription>{props.description}</CardDescription>
30+
</div>
31+
<div className="sm:ml-16 sm:flex-none">
32+
{props.actions && props.actions}
33+
</div>
34+
</div>
35+
</CardHeader>
36+
<CardContent>{props.children}</CardContent>
37+
</Card>
3438
</section>
3539
);
3640
}

src/renderer/src/components/ui/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Page = forwardRef<HTMLElement, PageProps>(
3131
onDragEnter={props.onDragEnter}
3232
onDrop={props.onDrop}
3333
>
34-
<div className="relative bg-brand-950 text-white pb-32">
34+
<div className="relative bg-gradient-to-br from-brand-950 to-50% text-white pb-32">
3535
<div className="relative container mx-auto">
3636
<div className="md:flex md:items-center px-4 sm:px-6 lg:px-8 py-10">
3737
<div className="md:flex-auto">

src/renderer/src/index.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
--color-brand-950: var(--color-cyan-950);
2727
}
2828

29+
@utility container {
30+
padding: 0 2rem;
31+
32+
@variant xl {
33+
max-width: 1400px;
34+
}
35+
}
36+
2937
/*
3038
By default, the frameless window is non-draggable.
3139
Apps need to specify -webkit-app-region: drag in CSS to tell Electron

0 commit comments

Comments
 (0)