🎉 Initial commit

This commit is contained in:
Freeze455
2021-08-16 22:35:42 +02:00
parent b241751437
commit 74551ad831
11 changed files with 1400 additions and 103 deletions

BIN
src/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

17
src/main.ts Normal file
View File

@@ -0,0 +1,17 @@
import 'virtual:windi.css'
import 'virtual:windi-devtools'
import { createApp } from 'vue'
import App from './templates/layouts/Base.vue'
import { createRouter, createWebHistory } from 'vue-router'
import Manager from './templates/modules/manager/Routes'
const router = createRouter({
history: createWebHistory(),
routes: [
...Manager,
]
})
createApp(App)
.use(router)
.mount('#app')

View File

@@ -0,0 +1,43 @@
<template>
<RouterView />
<button
@click.prevent="toggle()"
class="fixed z-50 bottom-5 left-5 w-10 h-10 border-2 rounded focus:outline-none"
:class="isDark() ? 'bg-gray-800 border-white' : 'bg-white border-gray-800'">
<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2">
<svg v-if="isDark()" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-800" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
</svg>
</div>
</button>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
let htmlStatut = ref(false)
onMounted(() => {
htmlStatut.value = document.documentElement.classList.contains('dark')
})
function toggle () {
const htmlRoot = document.documentElement as HTMLElement
htmlRoot.classList.contains('dark')
? htmlRoot.classList.remove('dark')
: document.documentElement.classList.add('dark')
htmlStatut.value = document.documentElement.classList.contains('dark')
}
function isDark () {
return htmlStatut.value
}
</script>
<style>
</style>