2015-12-13 04:42:28 +00:00
|
|
|
<template>
|
|
|
|
<header id="mainHeader">
|
2016-02-14 07:36:44 +00:00
|
|
|
<h1 class="brand">{{* appTitle }}</h1>
|
2015-12-13 04:42:28 +00:00
|
|
|
<span class="hamburger" @click="toggleSidebar">
|
2016-01-07 10:58:06 +00:00
|
|
|
<i class="fa fa-bars"></i>
|
2015-12-13 04:42:28 +00:00
|
|
|
</span>
|
|
|
|
<span class="magnifier" @click="toggleSearchForm">
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
</span>
|
|
|
|
<search-form></search-form>
|
|
|
|
<user-badge></user-badge>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2016-02-14 07:36:44 +00:00
|
|
|
import config from '../../config';
|
2015-12-13 04:42:28 +00:00
|
|
|
import searchForm from './search-form.vue';
|
|
|
|
import userBadge from './user-badge.vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { searchForm, userBadge },
|
|
|
|
|
2016-02-14 07:36:44 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
appTitle: config.appTitle,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2015-12-13 04:42:28 +00:00
|
|
|
methods: {
|
|
|
|
/**
|
|
|
|
* No I'm not documenting this.
|
|
|
|
*/
|
|
|
|
toggleSidebar() {
|
|
|
|
this.$root.$broadcast('sidebar:toggle');
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* or this.
|
|
|
|
*/
|
|
|
|
toggleSearchForm() {
|
|
|
|
this.$root.$broadcast('search:toggle');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="sass">
|
2016-03-13 17:00:32 +00:00
|
|
|
@import "../../../sass/partials/_vars.scss";
|
|
|
|
@import "../../../sass/partials/_mixins.scss";
|
2015-12-13 04:42:28 +00:00
|
|
|
|
|
|
|
#mainHeader {
|
|
|
|
height: $headerHeight;
|
|
|
|
background: $color2ndBgr;
|
|
|
|
display: flex;
|
|
|
|
border-bottom: 1px solid $colorMainBgr;
|
|
|
|
|
|
|
|
h1.brand {
|
|
|
|
flex: 1;
|
2016-02-14 07:36:44 +00:00
|
|
|
color: $colorMainText;
|
|
|
|
font-size: 22px;
|
|
|
|
font-weight: $fontWeight_UltraThin;
|
|
|
|
opacity: 0;
|
|
|
|
line-height: $headerHeight;
|
|
|
|
text-align: center;
|
2015-12-13 04:42:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.hamburger, .magnifier {
|
|
|
|
font-size: 140%;
|
|
|
|
flex: 0 0 48px;
|
|
|
|
order: -1;
|
2016-02-14 07:36:44 +00:00
|
|
|
line-height: $headerHeight;
|
|
|
|
text-align: center;
|
2015-12-13 04:42:28 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2016-03-17 09:46:24 +00:00
|
|
|
@media only screen and (max-width: 667px) {
|
2015-12-13 04:42:28 +00:00
|
|
|
display: flex;
|
|
|
|
align-content: stretch;
|
|
|
|
justify-content: flext-start;
|
|
|
|
|
|
|
|
.hamburger, .magnifier {
|
2016-02-14 07:36:44 +00:00
|
|
|
display: inline-block;
|
2015-12-13 04:42:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
h1.brand {
|
2016-02-14 07:36:44 +00:00
|
|
|
opacity: 1;
|
2015-12-13 04:42:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|