Created keret

This commit is contained in:
2021-06-11 23:51:58 +02:00
parent 2388a5a587
commit bac428238d
12 changed files with 157 additions and 137 deletions

View File

@ -1,32 +1,50 @@
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
<navbar/>
<div id="content">
<b-container>
<router-view/>
</b-container>
</div>
<router-view/>
<div id="footer">
<b-container>
<footer-content/>
</b-container>
</div>
</div>
</template>
<script>
import Navbar from "@/components/Navbar";
import FooterContent from "@/components/FooterContent";
export default {
components: {
FooterContent,
Navbar
},
}
</script>
<style>
#content {
margin-top: 70px;
margin-bottom: 20px;
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
display: flex;
flex-direction: column;
min-height: 100vh;
}
#nav {
padding: 30px;
}
#nav a {
font-weight: bold;
color: #2c3e50;
}
#nav a.router-link-exact-active {
color: #42b983;
#footer {
padding: 1em;
margin-top: auto;
background: #E9ECEF;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,23 @@
<template>
<div>
<b-row align-h="between">
<b-col cols="auto p-0">
<div><b>Birbnetes</b></div>
<div>
<router-link :to="{ name: 'About'}">About</router-link>
</div>
</b-col>
<b-col cols="auto p-0">
<div class="text-center">
System status: Cool&Good
</div>
</b-col>
</b-row>
</div>
</template>
<style scoped>
</style>

View File

@ -1,60 +0,0 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

33
src/components/Navbar.vue Normal file
View File

@ -0,0 +1,33 @@
<template>
<div id="navbar">
<b-navbar toggleable="sm" type="light" variant="light" fixed="top">
<b-navbar-brand>
<b-img src="@/assets/logo.png" height="30" class="pr-2"/>
<b>BirbController</b>
</b-navbar-brand>
<b-navbar-toggle target="nav-text-collapse"></b-navbar-toggle>
<b-collapse id="nav-text-collapse" is-nav>
<b-navbar-nav>
<b-nav-item :to="{ name: 'Home'}">Home</b-nav-item>
<b-nav-item :to="{ name: 'Devices'}">Devices</b-nav-item>
<b-nav-item :to="{ name: 'About'}">About</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>
</div>
</template>
<script>
export default {
name: "Navbar"
}
</script>
<style scoped>
</style>

View File

@ -1,6 +1,7 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Devices from '../views/Devices.vue'
Vue.use(VueRouter)
@ -10,6 +11,11 @@ const routes = [
name: 'Home',
component: Home
},
{
path: '/devices',
name: 'Devices',
component: Devices
},
{
path: '/about',
name: 'About',

14
src/views/Devices.vue Normal file
View File

@ -0,0 +1,14 @@
<template>
<div class="devices">
</div>
</template>
<script>
export default {
name: "Devices"
}
</script>
<style scoped>
</style>

View File

@ -1,18 +1,10 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
export default {
name: 'Home',
components: {
HelloWorld
}
name: 'Home'
}
</script>