m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-17 09:33:38 -05:00

Work on liquid a bit, format code

This commit is contained in:
Sergio
2025-01-01 14:29:17 +02:00
parent f1e1bcbf1c
commit 9c8e6ccdea
8 changed files with 237 additions and 166 deletions

View File

@@ -30,7 +30,11 @@ function App() {
>
<dl className="grid grid-cols-2 gap-1 overflow-hidden *:relative lg:grid-cols-4">
{Object.entries(data.metrics).map(([name]) => (
<Statistic name={name as keyof typeof data.metrics} metrics={data.metrics} key={name} />
<Statistic
name={name as keyof typeof data.metrics}
metrics={data.metrics}
key={name}
/>
))}
</dl>
</div>

View File

@@ -29,10 +29,12 @@ export function CodeBlock({
{enableCopy &&
navigator.clipboard &&
(copySuccess ? (
<IconCheck className={`absolute right-3 size-7 bg-${theme}-100 pl-2 py-1 dark:bg-${theme}-950`} />
<IconCheck
className={`absolute right-3 size-7 bg-${theme}-100 py-1 pl-2 dark:bg-${theme}-950`}
/>
) : (
<button
className={`duration-50 absolute right-3 bg-${theme}-100 pl-2 py-1 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`}
className={`duration-50 absolute right-3 bg-${theme}-100 py-1 pl-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-${theme}-950`}
onClick={handleCopy(`docker pull ${children}`)}
>
<IconClipboard className="size-5" />

View File

@@ -28,7 +28,7 @@ export default function Statistic({
<div
className={`before:bg-${theme}-200 before:dark:bg-${theme}-800 after:bg-${theme}-200 after:dark:bg-${theme}-800 gi`}
>
<div className="flex lg:min-h-32 h-full flex-col justify-between gap-x-4 gap-y-2 px-6 py-4 align-baseline">
<div className="flex h-full flex-col justify-between gap-x-4 gap-y-2 px-6 py-4 align-baseline lg:min-h-32">
<dt
className={`text-${theme}-500 dark:text-${theme}-400 font-medium leading-6`}
>

View File

@@ -29,13 +29,13 @@ export interface Image {
}
interface VersionInfo {
"type": "version",
version_update_type: "major" | "minor" | "patch",
new_version: string
type: "version";
version_update_type: "major" | "minor" | "patch";
new_version: string;
}
interface DigestInfo {
"type": "digest",
local_digests: string[],
remote_digest: string
}
type: "digest";
local_digests: string[];
remote_digest: string;
}