running-tools

A collection of tools for runners and their coaches
git clone https://git.ashermorgan.net/running-tools/
Log | Files | Refs | README

App.vue (946B)


      1 <script setup lang="ts">
      2 import { RouterLink, RouterView } from 'vue-router';
      3 import type { RouteRecordNameGeneric } from 'vue-router';
      4 import VueFeather from 'vue-feather';
      5 </script>
      6 
      7 <template>
      8   <header>
      9     <router-link :to="{ name: $route.meta.back as RouteRecordNameGeneric }" v-if="$route.meta.back"
     10       class="icon" title="Back">
     11       <vue-feather type="chevron-left" aria-hidden="true"/>
     12     </router-link>
     13 
     14     <h1 v-if="$route.meta.title">
     15       {{ $route.meta.title }}
     16     </h1>
     17     <h1 v-else>
     18       Running Tools
     19     </h1>
     20   </header>
     21 
     22   <div id="route-content">
     23     <router-view v-slot="{ Component }">
     24       <keep-alive>
     25         <component :is="Component"/>
     26       </keep-alive>
     27     </router-view>
     28   </div>
     29 </template>
     30 
     31 <style scoped>
     32 header a {
     33   grid-column: 1;
     34   margin: auto;
     35   height: 2em;
     36   width: 2em;
     37 }
     38 header :deep(.feather-chevron-left) {
     39   padding: 0em;
     40   color: #000000;
     41 }
     42 #route-content {
     43   margin: 1em;
     44 }
     45 </style>