Skip to content

Commit

Permalink
Fix navbar menu on mobile devices (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgroul authored May 19, 2021
1 parent 4e4f02a commit 6f35dee
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<body class="has-navbar-fixed-top">
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
Expand Down
9 changes: 0 additions & 9 deletions src/blocks/Footer.vue

This file was deleted.

18 changes: 13 additions & 5 deletions src/blocks/Navbar.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
<template>
<nav class="navbar" role="navigation" aria-label="main navigation">
<nav class="navbar is-transparent is-fixed-top" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img src="/logo.jpeg" width="28" height="28">
</a>

<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
<a
role="button"
class="navbar-burger"
aria-label="menu"
aria-expanded="false"
data-target="navbarBasicExample"
@click="isMenuActive = !isMenuActive"
>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>

<div id="navbarBasicExample" class="navbar-menu">
<div id="navbarBasicExample" :class="['navbar-menu', {'is-active': isMenuActive}]">
<div class="navbar-start">
<a href="/dashboard" class="navbar-item">
Dashboard
Expand All @@ -23,7 +30,7 @@
{{ username }}
</a>

<div class="navbar-dropdown">
<div class="navbar-dropdown is-boxed">
<a class="navbar-item" @click="push('/profile')">
Profile
</a>
Expand All @@ -39,7 +46,7 @@
More
</a>

<div class="navbar-dropdown">
<div class="navbar-dropdown is-boxed">
<a class="navbar-item">
About
</a>
Expand Down Expand Up @@ -87,6 +94,7 @@ export default defineComponent({
data() {
return {
showModal: false,
isMenuActive: false,
}
},
computed: {
Expand Down
3 changes: 0 additions & 3 deletions src/components/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
/>
</div>
</section>
<Footer />
</template>

<script lang='ts'>
import { defineComponent } from 'vue'
import Footer from '../blocks/Footer.vue'
import Navbar from '../blocks/Navbar.vue'
import ServerItem from './ServerItem.vue'
export default defineComponent({
components: {
Footer,
Navbar,
ServerItem,
},
Expand Down
3 changes: 3 additions & 0 deletions src/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.is-primary {
background-color: #714dd2 !important;
}
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import store from './store'
import { getCookie } from './utils'

import 'bulma/css/bulma.css'
import './main.css'

interface Routes {
[key: string]: Component,
Expand Down

0 comments on commit 6f35dee

Please sign in to comment.