* initialisation of all libraries

feature: #1
This commit is contained in:
2022-12-30 00:45:54 +01:00
parent b25ca09f32
commit af3b12344f
22 changed files with 7736 additions and 153 deletions

7
src/api/HttpClient.js Normal file
View File

@@ -0,0 +1,7 @@
import axios from 'axios'
export default axios.create({
baseURL: 'https://localhost:8080/',
timeout: 1000,
headers: { 'X-Custom-Header': 'foobar' }
})

View File

@@ -1,4 +1,7 @@
@import './base.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
#app {
max-width: 1280px;

View File

@@ -0,0 +1,6 @@
<template>
<div>
<h1>Page not Found!</h1>
</div>
</template>
<script></script>

17
src/i18n.js Normal file
View File

@@ -0,0 +1,17 @@
import { createI18n as _createI18n } from 'vue-i18n'
import en from './locales/en.json'
import de from './locales/de.json'
export const SUPPORT_LOCALES = ['en', 'de']
export function createI18n() {
return _createI18n({
legacy: false,
globalInjection: true,
locale: 'de',
fallbackLocale: 'en',
messages: {
en,
de
}
})
}

6
src/locales/de.json Normal file
View File

@@ -0,0 +1,6 @@
{
"hello": "Hallo i18n in SFC!",
"welcome": "Willkommen!",
"yes-button": "Ja",
"no-button": "Nein!"
}

6
src/locales/en.json Normal file
View File

@@ -0,0 +1,6 @@
{
"hello": "Hello i18n in SFC!",
"welcome": "Welcome!",
"yes-button": "Yes",
"no-button": "No!"
}

View File

@@ -1,11 +1,23 @@
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createI18n } from './i18n'
import store from './store'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
/* add icons to the library */
library.add(faUserSecret)
import './assets/main.css'
const i18n = createI18n()
const app = createApp(App)
app.use(router)
app.use(i18n)
app.use(store)
app.component('FontAwesomeIcon', FontAwesomeIcon)
app.mount('#app')

View File

@@ -12,10 +12,13 @@ const router = createRouter({
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
// this page is lazy-loaded when the route is visited.
component: () => import('../views/AboutView.vue')
},
{
path: '/:pathMatch(.*)*',
name: 'notfound',
component: () => import('../components/PageNotFound.vue')
}
]
})

10
src/store/index.js Normal file
View File

@@ -0,0 +1,10 @@
import { createStore } from 'vuex'
import moduleA from './moduleA.module'
import moduleB from './moduleB.module'
export default createStore({
modules: {
a: moduleA,
b: moduleB
}
})

View File

@@ -0,0 +1,6 @@
export default {
state: () => ({}),
mutations: {},
actions: {},
getters: {}
}

View File

@@ -0,0 +1,6 @@
export default {
state: () => ({}),
mutations: {},
actions: {},
getters: {}
}

View File

@@ -1,9 +1,9 @@
<template>
<div class="about">
<h1>This is an about page</h1>
<font-awesome-icon icon="fa-solid fa-user-secret" />
</div>
</template>
<style>
@media (min-width: 1024px) {
.about {