Skip to content

Elements template #105

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

Merged
merged 18 commits into from
Mar 27, 2025
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
Binary file modified bun.lockb
Binary file not shown.
374 changes: 188 additions & 186 deletions composer.lock

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"devDependencies": {
"@inertiajs/vue3": "^2.0.3",
"@sentry/vue": "^8.54.0",
"@inertiajs/vue3": "^2.0.5",
"@sentry/vue": "^8.55.0",
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.0.4",
"@vitejs/plugin-vue": "^5.2.1",
"autoprefixer": "^10.4.20",
"@tailwindcss/vite": "^4.0.17",
"@vitejs/plugin-vue": "^5.2.3",
"laravel-vite-plugin": "^1.2.0",
"tailwindcss": "^4.0.0",
"vite": "^6.1.0",
"tailwindcss": "^4.0.17",
"vite": "^6.2.3",
"vue": "^3.5.13"
},
"private": true,
Expand All @@ -19,7 +17,7 @@
},
"type": "module",
"dependencies": {
"caniuse-lite": "^1.0.30001697",
"caniuse-lite": "^1.0.30001707",
"lucide-vue-next": "^0.479.0"
}
}
42 changes: 10 additions & 32 deletions resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,19 @@

@import "tailwindcss";

@plugin '@tailwindcss/forms';

@import "./variables.css";

@import "./typography.css";
@import "./utilities.css";
@import "./forms.css";
@import "./buttons.css";
@import "./tables.css";
@import "./content.css";

@plugin '@tailwindcss/forms';
@plugin '@tailwindcss/typography';

@theme {
--font-*: initial;
--font-text: "Arial", sans-serif;
--font-heading: "Arial", sans-serif;

--breakpoint-xs: 321px;
--breakpoint-sm: 451px;
--breakpoint-md: 671px;
--breakpoint-lg: 769px;
--breakpoint-xl: 1025px;
--breakpoint-2xl: 1281px;
--breakpoint-3xl: 1441px;
--breakpoint-4xl: 1901px;

--color-brand-50: #f3f6fb;
--color-brand-100: #e5e9f4;
--color-brand-200: #d0d9ed;
--color-brand-300: #b0c0e0;
--color-brand-400: #8a9fd0;
--color-brand-500: #6a7fc1;
--color-brand-600: #5b6bb5;
--color-brand-700: #505aa5;
--color-brand-800: #464c87;
--color-brand-900: #3c416c;
--color-brand-950: #282a43;
}

#app {
@apply h-full;
@layer base {
#app {
@apply h-full;
}
}
2 changes: 1 addition & 1 deletion resources/css/buttons.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@utility button {
@apply cursor-pointer rounded-md bg-brand-800 px-6 py-3 text-sm font-semibold text-white inline-flex shadow-xs hover:bg-brand-600 transition-all ease-in-out duration-200;
@apply cursor-pointer rounded-md bg-brand-800 px-6 py-3 text-sm font-semibold text-white inline-flex shadow-xs hover:bg-brand-600 transition-colors;

&[disabled] {
@apply pointer-events-none opacity-50;
Expand Down
83 changes: 53 additions & 30 deletions resources/css/content.css
Original file line number Diff line number Diff line change
@@ -1,87 +1,110 @@
@utility content {
@apply prose text-neutral-700;
strong {
@apply font-bold;
}

h1,
h2,
h3,
h4,
h5,
h6 {
@apply font-heading font-bold text-neutral-900;
@apply heading;
}

h1 {
@apply text-4xl md:text-5xl;
@apply h1;
}

h2 {
@apply text-3xl;
@apply h2;
}

h3 {
@apply text-2xl;
@apply h3;
}

h4 {
@apply text-xl;
@apply h4;
}

h5 {
@apply text-lg;
@apply h5;
}

h6 {
@apply text-base;
@apply h6;
}

li {
@apply ml-8;
a:not(.button) {
@apply text-link;
}

a {
@apply hover:underline;
blockquote {
@apply pl-6 py-3 border-l-3 border-brand-300;

p {
@apply text-xl font-serif italic;
}
}

ul li {
@apply list-disc;
table {
@apply table;
}

ol li {
@apply list-decimal;
tr:first-child th {
@apply pt-0;
}

strong {
@apply font-bold;
ol,
ul {
@apply list-inside;
}

blockquote {
@apply pl-4 py-3 my-4 border-s-4 border-gray-300 text-xl italic;
ol li {
@apply list-decimal;
}

table {
@apply w-full text-sm text-left;
ul li {
@apply list-disc;
}

th {
@apply p-4 font-bold bg-brand-200;
> * + * {
@apply mt-12;
}

td {
@apply p-4 font-medium;
p + p,
p + ol,
ol + p,
p + ul,
ul + p,
ul + ul,
ol + ol,
ul + ol,
ol + ul {
@apply mt-6;
}

tr:not(:last-child) td {
@apply border-b border-brand-200;
li + li {
@apply mt-2;
}

* {
h1,
h2,
h3,
h4,
h5,
h6 {
& + p,
& + ul,
& + ol,
& + h1,
& + h2,
& + h3,
& + h4,
& + h5,
& + h6 {
@apply mt-8;
@apply mt-6;
}
}
}
21 changes: 18 additions & 3 deletions resources/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
}

@utility inline-label {
@apply flex items-center gap-x-2;
@apply flex items-center gap-x-2 text-sm;
}

@utility field {
@apply block rounded-md border-brand-300 shadow-xs outline-hidden hover:ring-3 hover:ring-brand-200/50 focus:border-brand-300 focus:ring-3 focus:ring-brand-200/50 focus:ring-offset-0 transition ease-in-out duration-200;
@apply block rounded-md border-brand-300 shadow-xs outline-hidden hover:ring-3 hover:ring-brand-200/50 focus:border-brand-300 focus:ring-3 focus:ring-brand-200/50 focus:ring-offset-0 transition;
}

@utility input {
Expand All @@ -45,7 +45,7 @@
}

@utility option {
@apply field cursor-pointer size-5 text-brand-800;
@apply field cursor-pointer size-5 text-brand-800 checked:border-transparent;
}

@utility checkbox {
Expand All @@ -55,3 +55,18 @@
@utility radio {
@apply option rounded-full;
}

@utility toggle {
@apply inline-flex items-center gap-3 cursor-pointer;

div {
@apply relative w-9 h-5 bg-brand-200 rounded-full transition;
@apply peer-hover:ring-3 peer-hover:ring-brand-200/50 peer-focus:ring-3 peer-focus:ring-brand-200/50 peer-focus:outline-hidden;
@apply peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white peer-checked:bg-brand-800;
@apply after:bg-white after:rounded-full after:size-4 after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:transition-all;
}

span {
@apply text-sm;
}
}
34 changes: 34 additions & 0 deletions resources/css/tables.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@utility table {
@apply w-full text-left;

th,
td {
@apply border-b;
}

th:first-child,
td:first-child {
@apply pl-0;
}

th:last-child,
td:last-child {
@apply pr-0;
}

th {
@apply p-3 font-bold border-b-2 border-brand-950;
}

td {
@apply p-3 border-brand-950/15;
}
}

@utility table-wrap {
@apply w-full overflow-auto;

table {
@apply min-w-[500px];
}
}
2 changes: 1 addition & 1 deletion resources/css/typography.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@utility heading {
@apply text-neutral-900 font-semibold leading-none;
@apply text-neutral-900 font-medium leading-none;
}

@utility h1 {
Expand Down
3 changes: 3 additions & 0 deletions resources/css/utilities.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@utility text-link {
@apply underline hover:decoration-transparent transition-colors;
}
28 changes: 28 additions & 0 deletions resources/css/variables.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@theme {
--default-transition-duration: 0.2s;

--font-text: "Arial", sans-serif;
--font-heading: "Arial", sans-serif;
--font-serif: "Georgia", sans-serif;

--breakpoint-xs: 321px;
--breakpoint-sm: 451px;
--breakpoint-md: 671px;
--breakpoint-lg: 769px;
--breakpoint-xl: 1025px;
--breakpoint-2xl: 1281px;
--breakpoint-3xl: 1441px;
--breakpoint-4xl: 1901px;

--color-brand-50: #f3f6fb;
--color-brand-100: #e5e9f4;
--color-brand-200: #d0d9ed;
--color-brand-300: #b0c0e0;
--color-brand-400: #8a9fd0;
--color-brand-500: #6a7fc1;
--color-brand-600: #5b6bb5;
--color-brand-700: #505aa5;
--color-brand-800: #464c87;
--color-brand-900: #3c416c;
--color-brand-950: #282a43;
}
2 changes: 1 addition & 1 deletion resources/js/Components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
© 2024
<a
href="https://sebkay.com/"
class="underline hover:decoration-transparent transition-colors ease-in-out duration-200"
class="text-link"
target="_blank"
>Seb Kay</a
>. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:method="link?.method"
:as="link?.method == 'post' ? 'button' : 'a'"
v-text="link.label"
class="rounded-xl px-3 py-2 text-sm font-medium cursor-pointer transition-colors ease-in-out duration-200"
class="rounded-xl px-3 py-2 text-sm font-medium cursor-pointer transition-colors"
:class="{
'bg-brand-100 text-brand-950': link.components.includes($page.component),
'text-brand-600 hover:text-brand-950 focus:text-brand-950': !link.components.includes($page.component),
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/PageTitle.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<h1
v-text="text"
class="xl:text-4xl text-3xl font-medium text-neutral-900 text-center"
class="heading h3 text-center"
></h1>
</template>

Expand Down
4 changes: 2 additions & 2 deletions resources/js/Layouts/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<div class="min-h-full flex flex-col">
<Header :menu="menu" />

<main>
<div class="mx-auto max-w-7xl xl:py-16 py-8 px-4 sm:px-6 xl:px-8">
<main class="xl:py-16 py-8 px-4 sm:px-6 xl:px-8">
<div class="mx-auto max-w-7xl">
<slot />
</div>
</main>
Expand Down
Loading