Skip to content

Commit c27b111

Browse files
committed
create TopNavbar component, partially solves #147, just needs added to other sections and styled a bit better
1 parent 1c50b9f commit c27b111

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

src/components/Login.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="login">
3-
3+
<TopNavbar></TopNavbar>
44
<!-- Server status -->
55
<h4>Server Status</h4>
66
<div class="server-status">
@@ -108,6 +108,7 @@
108108

109109
<script>
110110
import CardshifterServerAPI from "../server_interface";
111+
import TopNavbar from "./TopNavbar";
111112
112113
const loginStorageMap = {
113114
"CARDSHIFTER_LAST_NAME": "username",
@@ -136,6 +137,9 @@ export default {
136137
chosenServer: null
137138
};
138139
},
140+
components :{
141+
TopNavbar
142+
},
139143
methods: {
140144
/*
141145
* Called by the login form. This function will to the server

src/components/TopNavbar.vue

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<template>
2+
<nav class="navbar navbar-dark bg-dark top-navbar-container">
3+
<div class="container-fluid">
4+
<div class="navbar-header">
5+
<div class="navbar-brand csh-top-link">
6+
Cardshifter
7+
</div>
8+
</div>
9+
</div>
10+
</nav>
11+
</template>
12+
13+
<script>
14+
export default {
15+
name: "TopNavbar",
16+
data() {
17+
return {}
18+
},
19+
methods: {}
20+
};
21+
</script>
22+
23+
<style>
24+
@import "../assets/style.css";
25+
26+
.top-navbar-container {
27+
/* background-color: black; */
28+
}
29+
</style>

src/router/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Vue from "vue";
22
import Router from "vue-router";
3+
import TopNavbar from "@/components/TopNavbar";
34
import Login from "@/components/Login";
45
import Lobby from "@/components/Lobby";
56
import DeckBuilder from "@/components/DeckBuilder";

0 commit comments

Comments
 (0)