Skip to content

Commit

Permalink
styling
Browse files Browse the repository at this point in the history
  • Loading branch information
craigkai committed Aug 12, 2024
1 parent 747fd7f commit d47e01f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@
"@vercel/analytics": "^1.3.1",
"autoprefixer": "^10.4.20",
"bits-ui": "^0.21.13",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"dayjs": "^1.11.12",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.43.0",
"formsnap": "^1.0.1",
"framer-motion": "^11.3.24",
"globals": "^15.9.0",
"i": "^0.3.7",
"jsdom": "^24.1.1",
"less": "^4.2.0",
"lucide-react": "^0.427.0",
"lucide-svelte": "^0.427.0",
"mode-watcher": "^0.4.1",
"postcss": "^8.4.41",
Expand All @@ -61,10 +64,12 @@
"svelte-check": "^3.8.5",
"svelte-french-toast": "^1.2.0",
"svelte-hamburgers": "^4.2.1",
"svelte-inview": "^4.0.2",
"sveltekit-superforms": "^2.16.1",
"tailwind-merge": "^2.5.1",
"tailwind-variants": "^0.2.1",
"tailwindcss": "^3.4.9",
"tailwindcss-animate": "^1.0.7",
"tournament-pairings": "^1.5.2",
"tslib": "^2.6.3",
"typedoc": "^0.26.5",
Expand All @@ -74,13 +79,7 @@
"vite": "^5.4.0",
"vitest": "^2.0.5",
"zod": "^3.23.8",
"zod-validation-error": "^3.3.1",
"class-variance-authority": "^0.7.0",
"framer-motion": "^11.3.24",
"lucide-react": "^0.427.0",
"svelte-inview": "^4.0.2",
"tailwindcss-animate": "^1.0.7"
"zod-validation-error": "^3.3.1"
},
"type": "module",
"dependencies": {}
"type": "module"
}
10 changes: 5 additions & 5 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
6 changes: 3 additions & 3 deletions src/components/Matches.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@
);
</script>

<div class="mb-4 block flex text-sm font-bold">
Matches {#if subscriptionStatus && subscriptionStatus === 'SUBSCRIBED'}
<div class="mb-4 block flex justify-center text-sm font-bold">
{#if subscriptionStatus && subscriptionStatus === 'SUBSCRIBED'}
<Zap class="fill-green-200 text-green-500" />
{:else}
<Zapoff class="fill-red-200 text-red-500" />
{/if}:
{/if}
</div>

<div class="rounded rounded-2xl p-2 dark:bg-gray-800">
Expand Down
4 changes: 3 additions & 1 deletion src/lib/matches.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ export class Matches extends Base {
const availableTeams = allTeams.filter((team) => !teamsPlayingThisRound.includes(team));

if (availableTeams.length === 0) {
throw new Error('No available teams to assign as referees.');
throw new Error(
'No available teams to assign as referees, too many courts for the number of teams?'
);
}

// Sort available teams by the number of times they have refereed, ascending
Expand Down
12 changes: 6 additions & 6 deletions src/routes/events/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
</div>
{/if}

<Tabs.Root value={readOnly ? 'matches' : 'settings'}>
<Tabs.List class="mb-4 grid w-full gap-2 {tabsWidth} dark:bg-gray-700">
<Tabs.Root class="w-full lg:w-1/2" value={readOnly ? 'matches' : 'settings'}>
<Tabs.List class="mb-4 grid gap-2 {tabsWidth} dark:bg-gray-700">
{#if !readOnly}
<Tabs.Trigger value="settings">Settings</Tabs.Trigger>
<Tabs.Trigger disabled={isCreate} value="teams">Teams</Tabs.Trigger>
Expand All @@ -113,7 +113,7 @@
{#if !readOnly}
<Tabs.Content value="settings">
<Card.Root
class="relative flex max-w-xl flex-col items-start justify-between rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
class="relative flex flex-col items-center justify-between rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
>
<BorderBeam size={150} duration={12} />

Expand All @@ -129,7 +129,7 @@

<Tabs.Content value="teams">
<Card.Root
class="min-w-xl relative flex max-w-xl flex-col items-start justify-between rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
class="relative flex flex-col items-center justify-between rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
>
<BorderBeam size={150} duration={12} />
<Card.Header>
Expand All @@ -147,7 +147,7 @@

<Tabs.Content value="matches">
<Card.Root
class="relative flex flex-col rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
class="relative flex flex-col items-center justify-between rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
>
<BorderBeam size={150} duration={12} />
<Card.Header>
Expand All @@ -164,7 +164,7 @@

<Tabs.Content value="standings">
<Card.Root
class="min-w-xl relative flex max-w-xl flex-col rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
class="relative flex flex-col items-center justify-between rounded-3xl border border-gray-500/70 bg-background p-7 dark:bg-gray-700"
>
<BorderBeam size={150} duration={12} />
<Card.Header>
Expand Down
5 changes: 1 addition & 4 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ const config = {
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px'
}
padding: '2rem'
},
extend: {
colors: {
Expand Down

0 comments on commit d47e01f

Please sign in to comment.