diff --git a/astro.config.mjs b/astro.config.mjs index a9a66ad..306289b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,7 +2,7 @@ import { defineConfig } from 'astro/config'; import react from "@astrojs/react"; import tailwind from "@astrojs/tailwind"; -import vercel from "@astrojs/vercel/serverless"; +import node from "@astrojs/node"; // https://astro.build/config export default defineConfig({ @@ -10,5 +10,7 @@ export default defineConfig({ applyBaseStyles: false })], output: "server", - adapter: vercel() + adapter: node({ + mode: "standalone" + }), }); diff --git a/bun.lockb b/bun.lockb index c91bb72..bc93c67 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 122840e..70e5c15 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@astrojs/check": "^0.4.1", + "@astrojs/node": "^8.3.2", "@astrojs/react": "^3.0.9", "@astrojs/tailwind": "^5.1.0", "@astrojs/vercel": "^7.3.1", @@ -19,12 +20,8 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", - "@supabase/supabase-js": "^2.39.7", "@types/react": "^18.2.47", "@types/react-dom": "^18.2.18", - "@vercel/blob": "^0.19.0", - "@vercel/postgres-kysely": "^0.7.1", - "@vercel/speed-insights": "^1.0.9", "astro": "^4.1.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", diff --git a/public/css/tailwind.css b/public/css/tailwind.css new file mode 100644 index 0000000..73750ce --- /dev/null +++ b/public/css/tailwind.css @@ -0,0 +1,1276 @@ +/* +! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com +*/ + +/* +1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) +2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) +*/ + +*, +::before, +::after { + box-sizing: border-box; + /* 1 */ + border-width: 0; + /* 2 */ + border-style: solid; + /* 2 */ + border-color: #e5e7eb; + /* 2 */ +} + +::before, +::after { + --tw-content: ''; +} + +/* +1. Use a consistent sensible line-height in all browsers. +2. Prevent adjustments of font size after orientation changes in iOS. +3. Use a more readable tab size. +4. Use the user's configured `sans` font-family by default. +5. Use the user's configured `sans` font-feature-settings by default. +6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS +*/ + +html, +:host { + line-height: 1.5; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ + -moz-tab-size: 4; + /* 3 */ + -o-tab-size: 4; + tab-size: 4; + /* 3 */ + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + /* 4 */ + font-feature-settings: normal; + /* 5 */ + font-variation-settings: normal; + /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ +} + +/* +1. Remove the margin in all browsers. +2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. +*/ + +body { + margin: 0; + /* 1 */ + line-height: inherit; + /* 2 */ +} + +/* +1. Add the correct height in Firefox. +2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) +3. Ensure horizontal rules are visible by default. +*/ + +hr { + height: 0; + /* 1 */ + color: inherit; + /* 2 */ + border-top-width: 1px; + /* 3 */ +} + +/* +Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* +Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* +Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + text-decoration: inherit; +} + +/* +Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + /* 1 */ + font-feature-settings: normal; + /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ +} + +/* +Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* +Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* +1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) +2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) +3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; + /* 1 */ + border-color: inherit; + /* 2 */ + border-collapse: collapse; + /* 3 */ +} + +/* +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +3. Remove default padding in all browsers. +*/ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-feature-settings: inherit; + /* 1 */ + font-variation-settings: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + font-weight: inherit; + /* 1 */ + line-height: inherit; + /* 1 */ + letter-spacing: inherit; + /* 1 */ + color: inherit; + /* 1 */ + margin: 0; + /* 2 */ + padding: 0; + /* 3 */ +} + +/* +Remove the inheritance of text transform in Edge and Firefox. +*/ + +button, +select { + text-transform: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Remove default button styles. +*/ + +button, +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { + -webkit-appearance: button; + /* 1 */ + background-color: transparent; + /* 2 */ + background-image: none; + /* 2 */ +} + +/* +Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* +Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* +Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* +Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ + +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} + +/* +Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to `inherit` in Safari. +*/ + +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} + +/* +Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* +Removes the default spacing and border for appropriate elements. +*/ + +blockquote, +dl, +dd, +h1, +h2, +h3, +h4, +h5, +h6, +hr, +figure, +p, +pre { + margin: 0; +} + +fieldset { + margin: 0; + padding: 0; +} + +legend { + padding: 0; +} + +ol, +ul, +menu { + list-style: none; + margin: 0; + padding: 0; +} + +/* +Reset default styling for dialogs. +*/ + +dialog { + padding: 0; +} + +/* +Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* +1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +2. Set the default placeholder color to the user's configured gray 400 color. +*/ + +input::-moz-placeholder, textarea::-moz-placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +input::placeholder, +textarea::placeholder { + opacity: 1; + /* 1 */ + color: #9ca3af; + /* 2 */ +} + +/* +Set the default cursor for buttons. +*/ + +button, +[role="button"] { + cursor: pointer; +} + +/* +Make sure disabled buttons don't get the pointer cursor. +*/ + +:disabled { + cursor: default; +} + +/* +1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) +2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; + /* 1 */ + vertical-align: middle; + /* 2 */ +} + +/* +Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* Make elements with the HTML hidden attribute stay hidden by default */ + +[hidden] { + display: none; +} + +:root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 222.2 84% 4.9%; + --radius: 0.5rem; +} + +* { + border-color: hsl(var(--border)); +} + +body { + background-color: hsl(var(--background)); + color: hsl(var(--foreground)); +} + +*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-gradient-from-position: ; + --tw-gradient-via-position: ; + --tw-gradient-to-position: ; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +.container { + width: 100%; + margin-right: auto; + margin-left: auto; + padding-right: 2rem; + padding-left: 2rem; +} + +@media (min-width: 640px) { + .container { + max-width: 640px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 768px; + } +} + +@media (min-width: 1024px) { + .container { + max-width: 1024px; + } +} + +@media (min-width: 1280px) { + .container { + max-width: 1280px; + } +} + +@media (min-width: 1536px) { + .container { + max-width: 1536px; + } +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +.my-8 { + margin-top: 2rem; + margin-bottom: 2rem; +} + +.mr-2 { + margin-right: 0.5rem; +} + +.mt-10 { + margin-top: 2.5rem; +} + +.mt-2 { + margin-top: 0.5rem; +} + +.mt-4 { + margin-top: 1rem; +} + +.flex { + display: flex; +} + +.inline-flex { + display: inline-flex; +} + +.grid { + display: grid; +} + +.contents { + display: contents; +} + +.hidden { + display: none; +} + +.h-10 { + height: 2.5rem; +} + +.h-11 { + height: 2.75rem; +} + +.h-4 { + height: 1rem; +} + +.h-6 { + height: 1.5rem; +} + +.h-9 { + height: 2.25rem; +} + +.h-\[1px\] { + height: 1px; +} + +.h-\[450px\] { + height: 450px; +} + +.h-\[475px\] { + height: 475px; +} + +.h-full { + height: 100%; +} + +.min-h-\[80px\] { + min-height: 80px; +} + +.w-10 { + width: 2.5rem; +} + +.w-4 { + width: 1rem; +} + +.w-6 { + width: 1.5rem; +} + +.w-\[1px\] { + width: 1px; +} + +.w-full { + width: 100%; +} + +.max-w-md { + max-width: 28rem; +} + +.max-w-sm { + max-width: 24rem; +} + +.shrink-0 { + flex-shrink: 0; +} + +@keyframes pulse { + 50% { + opacity: .5; + } +} + +.animate-pulse { + animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; +} + +.resize-none { + resize: none; +} + +.scroll-m-20 { + scroll-margin: 5rem; +} + +.flex-col { + flex-direction: column; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +.gap-1 { + gap: 0.25rem; +} + +.gap-1\.5 { + gap: 0.375rem; +} + +.gap-2 { + gap: 0.5rem; +} + +.gap-4 { + gap: 1rem; +} + +.gap-8 { + gap: 2rem; +} + +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} + +.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); +} + +.overflow-hidden { + overflow: hidden; +} + +.whitespace-nowrap { + white-space: nowrap; +} + +.rounded { + border-radius: 0.25rem; +} + +.rounded-lg { + border-radius: var(--radius); +} + +.rounded-md { + border-radius: calc(var(--radius) - 2px); +} + +.rounded-sm { + border-radius: calc(var(--radius) - 4px); +} + +.border { + border-width: 1px; +} + +.border-2 { + border-width: 2px; +} + +.border-b { + border-bottom-width: 1px; +} + +.border-indigo-800 { + --tw-border-opacity: 1; + border-color: rgb(55 48 163 / var(--tw-border-opacity)); +} + +.border-input { + border-color: hsl(var(--input)); +} + +.border-primary { + border-color: hsl(var(--primary)); +} + +.border-slate-700 { + --tw-border-opacity: 1; + border-color: rgb(51 65 85 / var(--tw-border-opacity)); +} + +.border-zinc-200 { + --tw-border-opacity: 1; + border-color: rgb(228 228 231 / var(--tw-border-opacity)); +} + +.bg-background { + background-color: hsl(var(--background)); +} + +.bg-border { + background-color: hsl(var(--border)); +} + +.bg-card { + background-color: hsl(var(--card)); +} + +.bg-destructive { + background-color: hsl(var(--destructive)); +} + +.bg-green-700 { + --tw-bg-opacity: 1; + background-color: rgb(21 128 61 / var(--tw-bg-opacity)); +} + +.bg-indigo-600 { + --tw-bg-opacity: 1; + background-color: rgb(79 70 229 / var(--tw-bg-opacity)); +} + +.bg-primary { + background-color: hsl(var(--primary)); +} + +.bg-secondary { + background-color: hsl(var(--secondary)); +} + +.bg-slate-900 { + --tw-bg-opacity: 1; + background-color: rgb(15 23 42 / var(--tw-bg-opacity)); +} + +.p-2 { + padding: 0.5rem; +} + +.p-4 { + padding: 1rem; +} + +.p-6 { + padding: 1.5rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.pb-0 { + padding-bottom: 0px; +} + +.pb-2 { + padding-bottom: 0.5rem; +} + +.pt-0 { + padding-top: 0px; +} + +.text-center { + text-align: center; +} + +.text-2xl { + font-size: 1.5rem; + line-height: 2rem; +} + +.text-4xl { + font-size: 2.25rem; + line-height: 2.5rem; +} + +.text-lg { + font-size: 1.125rem; + line-height: 1.75rem; +} + +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.text-xl { + font-size: 1.25rem; + line-height: 1.75rem; +} + +.font-extrabold { + font-weight: 800; +} + +.font-medium { + font-weight: 500; +} + +.font-semibold { + font-weight: 600; +} + +.leading-7 { + line-height: 1.75rem; +} + +.leading-none { + line-height: 1; +} + +.tracking-tight { + letter-spacing: -0.025em; +} + +.text-card-foreground { + color: hsl(var(--card-foreground)); +} + +.text-current { + color: currentColor; +} + +.text-destructive-foreground { + color: hsl(var(--destructive-foreground)); +} + +.text-muted-foreground { + color: hsl(var(--muted-foreground)); +} + +.text-primary { + color: hsl(var(--primary)); +} + +.text-primary-foreground { + color: hsl(var(--primary-foreground)); +} + +.text-secondary-foreground { + color: hsl(var(--secondary-foreground)); +} + +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.underline-offset-4 { + text-underline-offset: 4px; +} + +.shadow { + --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.outline { + outline-style: solid; +} + +.ring-offset-background { + --tw-ring-offset-color: hsl(var(--background)); +} + +.blur-2xl { + --tw-blur: blur(40px); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.drop-shadow-xl { + --tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08)); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + +.transition { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.transition-colors { + transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + +.duration-300 { + transition-duration: 300ms; +} + +.duration-700 { + transition-duration: 700ms; +} + +.ease-in-out { + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +@keyframes enter { + from { + opacity: var(--tw-enter-opacity, 1); + transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0)); + } +} + +@keyframes exit { + to { + opacity: var(--tw-exit-opacity, 1); + transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0)); + } +} + +.duration-300 { + animation-duration: 300ms; +} + +.duration-700 { + animation-duration: 700ms; +} + +.ease-in-out { + animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); +} + +.file\:border-0::file-selector-button { + border-width: 0px; +} + +.file\:bg-inherit::file-selector-button { + background-color: inherit; +} + +.file\:bg-transparent::file-selector-button { + background-color: transparent; +} + +.file\:text-sm::file-selector-button { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.file\:font-medium::file-selector-button { + font-weight: 500; +} + +.placeholder\:text-muted-foreground::-moz-placeholder { + color: hsl(var(--muted-foreground)); +} + +.placeholder\:text-muted-foreground::placeholder { + color: hsl(var(--muted-foreground)); +} + +.placeholder\:text-slate-400::-moz-placeholder { + --tw-text-opacity: 1; + color: rgb(148 163 184 / var(--tw-text-opacity)); +} + +.placeholder\:text-slate-400::placeholder { + --tw-text-opacity: 1; + color: rgb(148 163 184 / var(--tw-text-opacity)); +} + +.first\:mt-0:first-child { + margin-top: 0px; +} + +.hover\:animate-none:hover { + animation: none; +} + +.hover\:bg-accent:hover { + background-color: hsl(var(--accent)); +} + +.hover\:bg-destructive\/90:hover { + background-color: hsl(var(--destructive) / 0.9); +} + +.hover\:bg-green-600:hover { + --tw-bg-opacity: 1; + background-color: rgb(22 163 74 / var(--tw-bg-opacity)); +} + +.hover\:bg-indigo-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(67 56 202 / var(--tw-bg-opacity)); +} + +.hover\:bg-primary\/90:hover { + background-color: hsl(var(--primary) / 0.9); +} + +.hover\:bg-secondary\/80:hover { + background-color: hsl(var(--secondary) / 0.8); +} + +.hover\:text-accent-foreground:hover { + color: hsl(var(--accent-foreground)); +} + +.hover\:underline:hover { + text-decoration-line: underline; +} + +.focus-visible\:outline-none:focus-visible { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus-visible\:ring-2:focus-visible { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus-visible\:ring-ring:focus-visible { + --tw-ring-color: hsl(var(--ring)); +} + +.focus-visible\:ring-offset-2:focus-visible { + --tw-ring-offset-width: 2px; +} + +.disabled\:pointer-events-none:disabled { + pointer-events: none; +} + +.disabled\:cursor-not-allowed:disabled { + cursor: not-allowed; +} + +.disabled\:opacity-50:disabled { + opacity: 0.5; +} + +.peer:disabled ~ .peer-disabled\:cursor-not-allowed { + cursor: not-allowed; +} + +.peer:disabled ~ .peer-disabled\:opacity-70 { + opacity: 0.7; +} + +.data-\[state\=checked\]\:bg-primary[data-state=checked] { + background-color: hsl(var(--primary)); +} + +.data-\[state\=checked\]\:text-primary-foreground[data-state=checked] { + color: hsl(var(--primary-foreground)); +} + +@media (min-width: 1024px) { + .lg\:text-5xl { + font-size: 3rem; + line-height: 1; + } + + .lg\:text-lg { + font-size: 1.125rem; + line-height: 1.75rem; + } +} + +.\[\&\:not\(\:first-child\)\]\:mt-6:not(:first-child) { + margin-top: 1.5rem; +} diff --git a/src/components/LockedContent.tsx b/src/components/LockedContent.tsx index 8be41ef..a3d6a0d 100644 --- a/src/components/LockedContent.tsx +++ b/src/components/LockedContent.tsx @@ -95,61 +95,65 @@ const LocationButton = ({ ); } else { return ( -
- {atTarget ? ( -
- + <> +
+ {atTarget ? ( +
+ -
- +
+ - - - İçeriği görmek için butona bas! - - -
-
- ) : ( -
- -
- - - {hasPermission ? ( + -

İçeriği görmek için konuma gitmelisin!

-

{distanceRemain && `Kalan mesafe: ${distanceRemain}`}

+ İçeriği görmek için butona bas!
- ) : ( -
- - Ne kadar yaklaştığını görmek için aşağıdaki butona bas. - - - -
- )} -
+
+
-
- )} -
+ ) : ( +
+ +
+ + + {hasPermission ? ( + +

İçeriği görmek için konuma gitmelisin!

+

+ {distanceRemain && `Kalan mesafe: ${distanceRemain}`} +

+
+ ) : ( +
+ + Ne kadar yaklaştığını görmek için aşağıdaki butona bas. + + + +
+ )} +
+
+
+ )} +
+ ); } }; diff --git a/src/components/WebComponentWrapper.astro b/src/components/WebComponentWrapper.astro new file mode 100644 index 0000000..d0695b4 --- /dev/null +++ b/src/components/WebComponentWrapper.astro @@ -0,0 +1,94 @@ +--- +interface Props { + contentId?: string; + imageUrl: string; + location?: string; +} + +const { contentId = "", imageUrl = "#", location = "" } = Astro.props; +--- + + + + + + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index d99d1c5..b417c12 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,7 +1,3 @@ ---- -import SpeedInsights from '@vercel/speed-insights/astro'; ---- - @@ -41,7 +37,6 @@ import SpeedInsights from '@vercel/speed-insights/astro'; - diff --git a/src/pages/[id].astro b/src/pages/[id].astro index bce0c68..bfc9be5 100644 --- a/src/pages/[id].astro +++ b/src/pages/[id].astro @@ -1,35 +1,34 @@ --- -import '@/styles/globals.css'; -import '../styles/locked-page.css'; +import "@/styles/globals.css"; +import "../styles/locked-page.css"; -import Layout from '../layouts/Layout.astro'; -import ShareButton from '../components/ShareButton'; +import Layout from "../layouts/Layout.astro"; +import ShareButton from "../components/ShareButton"; import { Card, CardContent, CardFooter, CardHeader, CardTitle, -} from '@/components/ui/card'; -import { CalendarIcon } from '@radix-ui/react-icons'; -import LockedContent from '@/components/LockedContent'; -import { Separator } from '@/components/ui/separator'; -import type { ContentTable } from '@/lib/db'; -import dayjs from 'dayjs'; -import relativeTime from 'dayjs/plugin/relativeTime'; -import utc from 'dayjs/plugin/utc'; +} from "@/components/ui/card"; +import LockedContent from "@/components/LockedContent"; +import WebComponentWrapper from "@/components/WebComponentWrapper.astro"; +import { CalendarIcon } from "@radix-ui/react-icons"; +import { Separator } from "@/components/ui/separator"; +import type { ContentTable } from "@/lib/db"; +import dayjs from "dayjs"; +import relativeTime from "dayjs/plugin/relativeTime"; +import utc from "dayjs/plugin/utc"; type Content = ContentTable; const { id } = Astro.params; -const res = await fetch( - `http://localhost:3000/api/location/${id}` -); +const res = await fetch(`http://localhost:3000/api/location/${id}`); const data: Content | null = res.status === 200 ? await res.json() : null; -console.log(data) +console.log(data); dayjs.extend(relativeTime); @@ -68,7 +67,6 @@ const dateFromNow = dayjs.utc(data?.created_at).from(dayjs.utc());

{dateFromNow}

- @@ -44,13 +39,14 @@ import { Label } from '@/components/ui/label'; getirilecek.

- -

+

Galerinizden bir fotoğraf seçin.

@@ -101,31 +97,27 @@ import { Label } from '@/components/ui/label';
-
-
- +
- +
@@ -164,67 +151,62 @@ import { Label } from '@/components/ui/label'; e.preventDefault(); const locationSelected = document.getElementById( - 'location-selected-confirmation' + "location-selected-confirmation" )?.innerText; if (!locationSelected) { - const coordinatesText = document.getElementById('coordinates'); + const coordinatesText = document.getElementById("coordinates"); - const mapDiv = document.getElementById('map'); + const mapDiv = document.getElementById("map"); - mapDiv?.classList.add('border-slate-700'); - coordinatesText?.classList.add('drop-shadow-xl'); + mapDiv?.classList.add("border-slate-700"); + coordinatesText?.classList.add("drop-shadow-xl"); setTimeout(() => { - mapDiv?.classList.remove('border-slate-700'); - coordinatesText?.classList.remove('drop-shadow-xl'); + mapDiv?.classList.remove("border-slate-700"); + coordinatesText?.classList.remove("drop-shadow-xl"); }, 500); return; } const submitButton = document.getElementById( - 'submit-button' + "submit-button" ) as HTMLButtonElement; - const reloadIcon = document.getElementById( - 'submit-button-reload' - ) as HTMLElement; submitButton.disabled = true; - reloadIcon.classList.toggle('hidden'); const formData = new FormData(e.target as HTMLFormElement); const res = await fetch(`http://127.0.0.1:3000/api/location`, { - method: 'POST', + method: "POST", body: formData, }); - reloadIcon.classList.toggle('hidden'); submitButton.disabled = false; if (res.status === 200) { const data = await res.json(); - if (data.url) location.assign('/' + data.url); + if (data.url) location.assign("/" + data.url); } else { // @ts-ignore Toastify({ - text: 'Konulu konum oluşturulamadı, lütfen tekrar deneyin.', + text: "Konulu konum oluşturulamadı, lütfen tekrar deneyin.", duration: 3000, - gravity: 'top', // `top` or `bottom` - position: 'center', // `left`, `center` or `right` + gravity: "top", // `top` or `bottom` + position: "center", // `left`, `center` or `right` stopOnFocus: true, // Prevents dismissing of toast on hover style: { - background: 'black', - borderRadius: '6px', - margin: '16px', + background: "black", + borderRadius: "6px", + margin: "16px", }, onClick: function () {}, // Callback after click }).showToast(); } }; - document.getElementById('sample-form')!.onsubmit = handleSubmit; + document.getElementById("sample-form")!.onsubmit = handleSubmit;