Refactored project ready for server.
Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
This commit is contained in:
parent
5a115374b4
commit
dd67fc967a
36 changed files with 1187 additions and 1003 deletions
3
fe/.eslintrc
Normal file
3
fe/.eslintrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["next", "next/core-web-vitals"]
|
||||
}
|
||||
4
fe/.npmrc
Normal file
4
fe/.npmrc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
auto-install-peers=true
|
||||
node-version=17.9.1
|
||||
engine-strict=false
|
||||
strict-peer-dependencies=false
|
||||
1
fe/.nvmrc
Normal file
1
fe/.nvmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
v17.9.1
|
||||
1
fe/CNAME
Normal file
1
fe/CNAME
Normal file
|
|
@ -0,0 +1 @@
|
|||
vannerba.st
|
||||
49
fe/README.md
Normal file
49
fe/README.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Welcome to [Astro](https://astro.build)
|
||||
|
||||
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||

|
||||
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
|
||||
```
|
||||
/
|
||||
├── public/
|
||||
│ └── favicon.svg
|
||||
├── src/
|
||||
│ ├── components/
|
||||
│ │ └── Card.astro
|
||||
│ ├── layouts/
|
||||
│ │ └── Layout.astro
|
||||
│ └── pages/
|
||||
│ └── index.astro
|
||||
└── package.json
|
||||
```
|
||||
|
||||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
|
||||
|
||||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
|
||||
|
||||
Any static assets, like images, can be placed in the `public/` directory.
|
||||
|
||||
## 🧞 Commands
|
||||
|
||||
All commands are run from the root of the project, from a terminal:
|
||||
|
||||
| Command | Action |
|
||||
| :--------------------- | :------------------------------------------------- |
|
||||
| `npm install` | Installs dependencies |
|
||||
| `npm run dev` | Starts local dev server at `localhost:3000` |
|
||||
| `npm run build` | Build your production site to `./dist/` |
|
||||
| `npm run preview` | Preview your build locally, before deploying |
|
||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` |
|
||||
| `npm run astro --help` | Get help using the Astro CLI |
|
||||
|
||||
## 👀 Want to learn more?
|
||||
|
||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
||||
9
fe/astro.config.mjs
Normal file
9
fe/astro.config.mjs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { defineConfig } from 'astro/config';
|
||||
import vue from "@astrojs/vue";
|
||||
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [vue(), tailwind()]
|
||||
});
|
||||
11
fe/lib/getUser.ts
Normal file
11
fe/lib/getUser.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { prisma } from "~/server"
|
||||
|
||||
export const getUserByDiscordId = async (discord_id: string) => {
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
discord_id
|
||||
}
|
||||
})
|
||||
|
||||
return user
|
||||
}
|
||||
25
fe/package.json
Normal file
25
fe/package.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "friends-best",
|
||||
"type": "module",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "deno run --allow-net --allow-read --allow-env ./dist/server/entry.mjs",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/deno": "^5.0.1",
|
||||
"@astrojs/tailwind": "^5.1.0",
|
||||
"@astrojs/vue": "4.0.8",
|
||||
"astro": "^4.3.7",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"vue": "^3.4.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sass": "1.70.0",
|
||||
"typescript": "^5.3.3"
|
||||
}
|
||||
}
|
||||
4185
fe/pnpm-lock.yaml
generated
Normal file
4185
fe/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
BIN
fe/public/favicon.png
Normal file
BIN
fe/public/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
13
fe/public/favicon.svg
Normal file
13
fe/public/favicon.svg
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
|
||||
<path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
|
||||
<path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-5-2c-1.4 2.1-.35 4.35.6 5.55.14.17.41.07.47-.15.44-1.8 2.93-1.22 2.93.6 0 2.28.87 3.4 1.72 3.81.34.16.59-.2.49-.56-.31-1.05-.29-2.46 1.29-3.25 3-1.5 3.17-4.83 2.5-6-.67.67-2.6 2-5 2Z"/>
|
||||
<defs>
|
||||
<linearGradient id="gradient" x1="16" x2="16" y1="32" y2="24" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#000"/>
|
||||
<stop offset="1" stop-color="#000" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<style>
|
||||
@media (prefers-color-scheme:dark){:root{filter:invert(100%)}}
|
||||
</style>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 873 B |
1
fe/public/icons/arrow-left.svg
Normal file
1
fe/public/icons/arrow-left.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>
|
||||
|
After Width: | Height: | Size: 312 B |
1
fe/public/icons/home.svg
Normal file
1
fe/public/icons/home.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
|
||||
|
After Width: | Height: | Size: 332 B |
BIN
fe/public/yr.jpg
Normal file
BIN
fe/public/yr.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 171 KiB |
1
fe/src/env.d.ts
vendored
Normal file
1
fe/src/env.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/// <reference types="astro/client" />
|
||||
12
fe/tailwind.config.cjs
Normal file
12
fe/tailwind.config.cjs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
'wheat': "#F8EBD9"
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
3
fe/tsconfig.json
Normal file
3
fe/tsconfig.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "astro/tsconfigs/strict"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue