diff --git a/.env.example b/.env.example index 6b5f204a..ad6cbf72 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1 @@ -ORIGIN=http://localhost:5173 # this server -PUBLIC_API_URL_SSR=http://localhost:3030 # server reachable -PUBLIC_API_URL_CSR=http://localhost:3030 # client reachable \ No newline at end of file +API_URL=http://localhost:3030 # server reachable diff --git a/fly.toml b/fly.toml index 3b26ccbe..785da70f 100644 --- a/fly.toml +++ b/fly.toml @@ -10,9 +10,7 @@ primary_region = "cdg" image = "ghcr.io/hearchco/frontend:latest" [env] - ORIGIN = "https://hearch.co" - PUBLIC_API_URL_CSR = "https://api.hearch.co" - PUBLIC_API_URL_SSR = "http://hearchco.flycast" + API_URL = "http://hearchco.flycast" [http_service] internal_port = 3000 diff --git a/package.json b/package.json index 3de8c3e6..fda699a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.3.3", + "version": "0.0.1", "private": true, "scripts": { "start": "node ./build/index.js", @@ -13,7 +13,6 @@ "format": "prettier --plugin-search-dir . --write ." }, "devDependencies": { - "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/adapter-node": "^1.3.1", "@sveltejs/kit": "^1.27.6", "@typescript-eslint/eslint-plugin": "^6.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d5322ff0..df1560c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,6 @@ settings: excludeLinksFromLockfile: false devDependencies: - '@sveltejs/adapter-auto': - specifier: ^2.0.0 - version: 2.1.1(@sveltejs/kit@1.27.6) '@sveltejs/adapter-node': specifier: ^1.3.1 version: 1.3.1(@sveltejs/kit@1.27.6) @@ -459,15 +456,6 @@ packages: rollup: 3.29.4 dev: true - /@sveltejs/adapter-auto@2.1.1(@sveltejs/kit@1.27.6): - resolution: {integrity: sha512-nzi6x/7/3Axh5VKQ8Eed3pYxastxoa06Y/bFhWb7h3Nu+nGRVxKAy3+hBJgmPCwWScy8n0TsstZjSVKfyrIHkg==} - peerDependencies: - '@sveltejs/kit': ^1.0.0 - dependencies: - '@sveltejs/kit': 1.27.6(svelte@4.2.8)(vite@4.5.1) - import-meta-resolve: 4.0.0 - dev: true - /@sveltejs/adapter-node@1.3.1(@sveltejs/kit@1.27.6): resolution: {integrity: sha512-A0VgRQDCDPzdLNoiAbcOxGw4zT1Mc+n1LwT1OmO350R7WxrEqdMUChPPOd1iMfIDWlP4ie6E2d/WQf5es2d4Zw==} peerDependencies: @@ -1389,10 +1377,6 @@ packages: resolve-from: 4.0.0 dev: true - /import-meta-resolve@4.0.0: - resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} - dev: true - /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} diff --git a/src/app.css b/src/app.css index f17b83a7..db963ef1 100644 --- a/src/app.css +++ b/src/app.css @@ -2,43 +2,40 @@ @tailwind components; @tailwind utilities; -.body { - @apply custom-bg dark:custom-bg flex min-h-screen flex-col -} - -.footer { - @apply custom-bg-headfoot dark:custom-bg-headfoot mt-auto flex h-20 w-full place-content-center items-center border border-gray-100 dark:border-0; -} - - -.custom-bg, .custom-bg-button, .custom-bg-headfoot { - background-color: #fff; +.custom-bg, +.custom-bg-button, +.custom-bg-headfoot { + background-color: #fff; } @media (prefers-color-scheme: dark) { - .dark\:custom-bg { - background-color: #222428; - } - .dark\:custom-bg-button { - background-color: #2b2e36; - } - .dark\:custom-bg-headfoot { - background-color: #1e1e22; - } + .dark\:custom-bg { + background-color: #222428; + } + .dark\:custom-bg-button { + background-color: #2b2e36; + } + .dark\:custom-bg-headfoot { + background-color: #1e1e22; + } } -.hearchco-bg-primary, .hover\:hearchco-bg-primary:hover { - background-color: #ffb280; +.hearchco-bg-primary, +.hover\:hearchco-bg-primary:hover { + background-color: #ffb280; } -.hearchco-bg-secondary, .hover\:hearchco-bg-secondary:hover { - background-color: #2b1100; +.hearchco-bg-secondary, +.hover\:hearchco-bg-secondary:hover { + background-color: #2b1100; } -.hearchco-text-primary, .hover\:hearchco-text-primary:hover { - color: #ffb280; +.hearchco-text-primary, +.hover\:hearchco-text-primary:hover { + color: #ffb280; } -.hearchco-text-secondary, .hover\:hearchco-text-secondary:hover { - color: #2b1100; -} \ No newline at end of file +.hearchco-text-secondary, +.hover\:hearchco-text-secondary:hover { + color: #2b1100; +} diff --git a/src/app.html b/src/app.html index be5c7430..1d9ffcf5 100644 --- a/src/app.html +++ b/src/app.html @@ -18,6 +18,7 @@ title="Hearchco" /> + @@ -27,14 +28,10 @@ %sveltekit.head% - +
%sveltekit.body%
- diff --git a/src/lib/components/Error.svelte b/src/lib/components/Error.svelte index 3c5c894a..050968be 100644 --- a/src/lib/components/Error.svelte +++ b/src/lib/components/Error.svelte @@ -1,7 +1,11 @@ diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte new file mode 100644 index 00000000..a5bab4e7 --- /dev/null +++ b/src/lib/components/Footer.svelte @@ -0,0 +1,9 @@ + diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte new file mode 100644 index 00000000..d83bab03 --- /dev/null +++ b/src/lib/components/Header.svelte @@ -0,0 +1,25 @@ + + +
+
+
+
+ + logo + +
+ +
+
+
+
diff --git a/src/lib/components/Result.svelte b/src/lib/components/Result.svelte new file mode 100644 index 00000000..543a75c6 --- /dev/null +++ b/src/lib/components/Result.svelte @@ -0,0 +1,24 @@ + + +
+ {result.URL} +

+ {result.Title} +

+

+ {result.Description} +

+
+ {#each result.EngineRanks as engineRank (engineRank.SearchEngine)} + {engineRank.SearchEngine} + {/each} +
+
diff --git a/src/routes/search/types.ts b/src/lib/components/ResultType.ts similarity index 94% rename from src/routes/search/types.ts rename to src/lib/components/ResultType.ts index cdda8b78..f0ede4c0 100644 --- a/src/routes/search/types.ts +++ b/src/lib/components/ResultType.ts @@ -13,5 +13,4 @@ export type Result = { Description: string; EngineRanks: EngineRank[]; TimesReturned: number; - Response: any; }; diff --git a/src/lib/components/Searchbox.svelte b/src/lib/components/Searchbox.svelte index 8d184b33..23888eab 100644 --- a/src/lib/components/Searchbox.svelte +++ b/src/lib/components/Searchbox.svelte @@ -1,5 +1,5 @@
import '../app.css'; + import Footer from '$lib/components/Footer.svelte'; +