diff --git a/index.html b/index.html new file mode 100644 index 0000000..99f583a --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/package.json b/package.json index 9888465..aa97d90 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,10 @@ "description": "Brand new imageboard engine", "main": "index.js", "scripts": { - "dev": "nodemon src/index.js", - "start": "node src/index.js" + "dev": "nodemon src/index.js & vite", + "build": "vite build", + "preview": "vite preview", + "start": "node src/index.js & vite" }, "repository": { "type": "git", @@ -17,6 +19,7 @@ "author": "orion, leca", "license": "GPL-3.0-or-later", "dependencies": { + "@vitejs/plugin-vue": "^4.4.1", "axios": "^1.6.1", "bcryptjs": "^2.4.3", "dotenv": "^16.3.1", diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..e9be761 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,10 @@ + + + + + diff --git a/src/assets/background.jpg b/src/assets/background.jpg new file mode 100644 index 0000000..ef8bed3 Binary files /dev/null and b/src/assets/background.jpg differ diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..7565660 --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ + diff --git a/src/assets/main.css b/src/assets/main.css new file mode 100644 index 0000000..95acff6 --- /dev/null +++ b/src/assets/main.css @@ -0,0 +1,25 @@ + + +*, +*::before, +*::after { + padding: 0; + margin: 0; +} + + +body{ + background-image: url("background.jpg"); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + min-height: 100vh; + color: whitesmoke; + margin: 0 auto; + padding: 0; + overflow: hidden; +} \ No newline at end of file diff --git a/src/components/Board.vue b/src/components/Board.vue new file mode 100644 index 0000000..8d8d825 --- /dev/null +++ b/src/components/Board.vue @@ -0,0 +1,104 @@ + + + + + + diff --git a/src/components/Header.vue b/src/components/Header.vue new file mode 100644 index 0000000..fbe7899 --- /dev/null +++ b/src/components/Header.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/components/icons/IconCommunity.vue b/src/components/icons/IconCommunity.vue new file mode 100644 index 0000000..2dc8b05 --- /dev/null +++ b/src/components/icons/IconCommunity.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconDocumentation.vue b/src/components/icons/IconDocumentation.vue new file mode 100644 index 0000000..6d4791c --- /dev/null +++ b/src/components/icons/IconDocumentation.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconEcosystem.vue b/src/components/icons/IconEcosystem.vue new file mode 100644 index 0000000..c3a4f07 --- /dev/null +++ b/src/components/icons/IconEcosystem.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconSupport.vue b/src/components/icons/IconSupport.vue new file mode 100644 index 0000000..7452834 --- /dev/null +++ b/src/components/icons/IconSupport.vue @@ -0,0 +1,7 @@ + diff --git a/src/components/icons/IconTooling.vue b/src/components/icons/IconTooling.vue new file mode 100644 index 0000000..660598d --- /dev/null +++ b/src/components/icons/IconTooling.vue @@ -0,0 +1,19 @@ + + diff --git a/src/index.js b/src/index.js index b2c7a3b..c7acc27 100644 --- a/src/index.js +++ b/src/index.js @@ -48,9 +48,6 @@ const init = async () => { let tokens = {}; -app.set('views','./public'); -app.use(express.static('public')); -app.set('view engine', 'ejs'); app.use(express.urlencoded({ extended: true })) app.use(express.json()) @@ -65,9 +62,6 @@ app.use(session({ cookie: { maxAge: 1000*60*60*24 } })); -app.get('/', (req, res) => { - res.render('index'); -}); app.post('/api/uploadMedia', async (req, res) => { @@ -188,4 +182,4 @@ const validateThread = (threadName, isLocked, isPinned, content, options, boardO //TODO: check if image is required return 'ok' -} \ No newline at end of file +} diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..b828038 --- /dev/null +++ b/src/main.js @@ -0,0 +1,7 @@ + + +import { createApp } from 'vue' +import App from './App.vue' +import './assets/main.css' + +createApp(App).mount('#app') diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..5c45e1d --- /dev/null +++ b/vite.config.js @@ -0,0 +1,16 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + } +})