Compare commits

...

4 Commits

Author SHA1 Message Date
Inhji c337503efd add help text and link to dict.cc 2022-11-12 12:40:31 +01:00
Inhji 28d15f9269 add title 2022-11-12 12:40:17 +01:00
Inhji ebf29c4fe8 add vite config 2022-11-12 12:40:13 +01:00
Inhji d856807324 add publish script 2022-11-12 12:40:08 +01:00
4 changed files with 11 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<title>Germanator</title>
</head>
<body>
<div id="app"></div>

View File

@ -17,9 +17,9 @@ const randomIndex = getRandomInt(0, all.length - 1)
const randomWord = all[randomIndex]
document.querySelector('#app').innerHTML = `
<h1>What does '<a href='https://dict.cc/${randomWord}'>${randomWord}</a>' mean?</h1>
<h2>And does this word even exist? 🤔</h2>
<p>(Click on the link to check the meaning on <a href="https://dict.cc">dict.cc</a>)</p>
<p>This word comes from a collection of ${data.verbs.length*data.prefixes.length} verbs made from only ${data.verbs.length} verbs and ${data.prefixes.length} prefixes. See how lazy germans are?</p>
`

View File

@ -5,7 +5,8 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"push": "rsync -av dist/ inhji.de:/var/www/projects/german"
},
"devDependencies": {
"vite": "^2.9.7"

7
vite.config.js Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
// support hosting the app in a subdirectory
base: ""
})