mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 22:26:19 +00:00
Compare commits
5 commits
ec9ba5c53d
...
1bc4bcfe3e
Author | SHA1 | Date | |
---|---|---|---|
1bc4bcfe3e | |||
fb3518e198 | |||
080322ef42 | |||
2e211a4647 | |||
ccce1f004b |
5 changed files with 50 additions and 41 deletions
|
@ -2,8 +2,9 @@ export const DB_PATH = process.env.DB_PATH ?? "../sqlite.db";
|
||||||
|
|
||||||
/** @type { import("drizzle-kit").Config } */
|
/** @type { import("drizzle-kit").Config } */
|
||||||
export default {
|
export default {
|
||||||
schema: "./schema.ts",
|
schema: "./schema.js",
|
||||||
out: "./drizzle",
|
out: "./drizzle",
|
||||||
|
driver: "better-sqlite",
|
||||||
dbCredentials: {
|
dbCredentials: {
|
||||||
url: DB_PATH,
|
url: DB_PATH,
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/better-sqlite3": "^7.6.8",
|
"@types/better-sqlite3": "^7.6.8",
|
||||||
"@types/node": "^20.10.6",
|
"@types/node": "^20.10.6",
|
||||||
"drizzle-kit": "^0.20.7"
|
"drizzle-kit": "^0.20.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ importers:
|
||||||
specifier: ^20.10.6
|
specifier: ^20.10.6
|
||||||
version: 20.11.0
|
version: 20.11.0
|
||||||
drizzle-kit:
|
drizzle-kit:
|
||||||
specifier: ^0.20.7
|
specifier: ^0.20.13
|
||||||
version: 0.20.12
|
version: 0.20.13
|
||||||
|
|
||||||
sitio:
|
sitio:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -113,8 +113,8 @@ packages:
|
||||||
'@jridgewell/trace-mapping': 0.3.21
|
'@jridgewell/trace-mapping': 0.3.21
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@drizzle-team/studio@0.0.37:
|
/@drizzle-team/studio@0.0.39:
|
||||||
resolution: {integrity: sha512-LZyAPGJBX43jsrVZh7+w1Jig/BC6PJx63ReHUYK+GRQYNY9UJNlPXmn1uC/LMRX+A7JwYM4Sr4Fg/hnJSqlfgA==}
|
resolution: {integrity: sha512-c5Hkm7MmQC2n5qAsKShjQrHoqlfGslB8+qWzsGGZ+2dHMRTNG60UuzalF0h0rvBax5uzPXuGkYLGaQ+TUX3yMw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
superjson: 2.2.1
|
superjson: 2.2.1
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -1269,11 +1269,11 @@ packages:
|
||||||
wordwrap: 1.0.0
|
wordwrap: 1.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/drizzle-kit@0.20.12:
|
/drizzle-kit@0.20.13:
|
||||||
resolution: {integrity: sha512-JWJposyEO6QvGIdvj0CmnJK5sMWW9j5HPiGnRIKvYNaAfZEHbmWlemxV2np7g2FZzSvuzwpa9EGmO20PaPeUmA==}
|
resolution: {integrity: sha512-j9oZSQXNWG+KBJm0Sg3S/zJpncHGKnpqNfFuM4NUxUMGTcihDHhP9SW6Jncqwb5vsP1Xm0a8JLm3PZUIspC/oA==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@drizzle-team/studio': 0.0.37
|
'@drizzle-team/studio': 0.0.39
|
||||||
'@esbuild-kit/esm-loader': 2.6.5
|
'@esbuild-kit/esm-loader': 2.6.5
|
||||||
camelcase: 7.0.1
|
camelcase: 7.0.1
|
||||||
chalk: 5.3.0
|
chalk: 5.3.0
|
||||||
|
|
|
@ -6,38 +6,46 @@
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- https://flowbite.com/docs/forms/search-input/ -->
|
<div
|
||||||
<form method="GET" action="/search">
|
class="relative m-4 rounded-lg border border-yellow-300 bg-yellow-50 p-4 text-yellow-800 dark:border-yellow-600 dark:bg-neutral-800 dark:text-yellow-400"
|
||||||
<div class="flex items-stretch p-4">
|
>
|
||||||
<input
|
<div class="text-sm opacity-80">
|
||||||
type="search"
|
<strong>¡Ey!</strong> Preciazo todavía está en beta, y todavía estamos
|
||||||
name="q"
|
buscando su lugar en el mundo :) Si notas algún problema,
|
||||||
class="block w-full rounded-l-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500"
|
<a class="underline" href="mailto:preciazo@nulo.ar">contactame :)</a>
|
||||||
placeholder={`Buscar entre ${data.nProductos} productos`}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="block rounded-e-lg border border-blue-700 bg-blue-700 p-2.5 text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
class="h-4 w-4"
|
|
||||||
aria-hidden="true"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
fill="none"
|
|
||||||
viewBox="0 0 20 20"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
stroke-width="2"
|
|
||||||
d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<span class="sr-only">Search</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- https://flowbite.com/docs/forms/search-input/ -->
|
||||||
|
<form class="mx-4 my-4 flex items-stretch" method="GET" action="/search">
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
name="q"
|
||||||
|
class="block w-full rounded-l-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500"
|
||||||
|
placeholder={`Buscar entre ${data.nProductos} productos`}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="block rounded-e-lg border border-blue-700 bg-blue-700 p-2.5 text-sm font-medium text-white hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
class="h-4 w-4"
|
||||||
|
aria-hidden="true"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 20 20"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<span class="sr-only">Search</span>
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="h-[300px] w-full min-w-[500px] bg-neutral-200 dark:invert">
|
<div class="h-[300px] w-full bg-neutral-200 dark:invert">
|
||||||
<ChartJs
|
<ChartJs
|
||||||
type="line"
|
type="line"
|
||||||
data={{ datasets }}
|
data={{ datasets }}
|
||||||
|
|
Loading…
Reference in a new issue