feat: 💄 basic layout

This commit is contained in:
Michel Roux 2024-11-03 08:37:04 +01:00
parent 962067e824
commit d2d894dc6a
3 changed files with 39 additions and 3 deletions

View File

@ -1,6 +1,5 @@
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
export default [
@ -16,7 +15,6 @@ export default [
...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),
skipFormatting,
eslintPluginPrettierRecommended,
{

View File

@ -1,11 +1,41 @@
<template>
<RouterView />
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<span class="icon-text">
<span class="icon">
<i class="fa fa-paper-plane"></i>
</span>
<span>Pilotwings</span>
</span>
</a>
</div>
<div class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" :href="`${$api}doc`">
<span class="icon-text">
<span class="icon">
<i class="fa fa-book"></i>
</span>
<span>API Documentation</span>
</span>
</a>
</div>
</div>
</nav>
<section class="section">
<div class="container">
<RouterView />
</div>
</section>
</template>
<script lang="ts">
import { RouterView } from 'vue-router'
export default {
name: 'App',
components: {
RouterView,
},

View File

@ -1,7 +1,15 @@
import 'bulma/css/bulma.min.css'
import 'font-awesome/css/font-awesome.min.css'
import App from './App.vue'
import { createApp } from 'vue'
import router from './router'
declare module 'vue' {
interface ComponentCustomProperties {
$api: string
}
}
const app = createApp(App)
app.config.globalProperties.$api = import.meta.env.PROD
? `${import.meta.env.BASE_URL}api`