浏览代码

💄: hide header on battleground page

master
Adrien 4 年前
父节点
当前提交
eeb5fa431b
共有 1 个文件被更改,包括 29 次插入21 次删除
  1. +29
    -21
      src/App.vue

+ 29
- 21
src/App.vue 查看文件

@@ -1,6 +1,6 @@
<template>
<div id="app">
<header>
<header v-if="showHeader">
<span>Nexus Timers</span>
</header>
<main>
@@ -10,28 +10,20 @@
</template>

<script>
export default {
name: 'app'
}
// The header will be shown if the path match this regex
const ROUTES_WITH_HEADER = /\/(battlegrounds)?$/

export default {
name: 'app',
computed: {
showHeader () {
return ROUTES_WITH_HEADER.test(this.$route.path)
}
}
}
</script>


<style lang="sass">
body
margin: 0

html
font-family: Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
color: $blizzard-font-color
text-shadow: 0 0 1rem #009cff
background-color: $blizzard-background-color

main

margin-top: 20px

<style lang="sass" scoped>
header
margin: 0
height: 56px
@@ -49,4 +41,20 @@ export default {
box-sizing: border-box
padding-top: 16px

main
margin-top: 20px
</style>

<style lang="sass">
body
margin: 0

html
font-family: Avenir, Helvetica, Arial, sans-serif
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
color: $blizzard-font-color
text-shadow: 0 0 1rem #009cff
background-color: $blizzard-background-color

</style>

正在加载...
取消
保存