Files
mixtape/zero.Web/App/Components/header-bar.vue
T

92 lines
1.5 KiB
Vue
Raw Normal View History

2020-04-06 23:48:28 +02:00
<template>
<div class="ui-header-bar">
2020-04-07 00:11:35 +02:00
<div class="ui-header-bar-main">
<ui-icon-button v-if="onBack" :click="onBack" />
<h2 v-if="title" class="ui-header-bar-title" v-localize="title"></h2>
2020-04-08 15:16:05 +02:00
<h2 v-if="!title && titleEmpty" class="ui-header-bar-title is-empty" v-localize="titleEmpty"></h2>
2020-04-07 00:11:35 +02:00
</div>
<div class="ui-header-bar-aside">
<slot></slot>
</div>
2020-04-06 23:48:28 +02:00
</div>
</template>
<script>
export default {
name: 'uiHeaderBar',
props: {
title: {
type: String
},
2020-04-08 15:16:05 +02:00
titleEmpty: {
type: String
},
2020-04-07 00:11:35 +02:00
onBack: {
type: Function
}
2020-04-06 23:48:28 +02:00
},
mounted ()
{
},
methods: {
}
}
</script>
<style lang="scss">
.ui-header-bar
{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 80px;
padding: 0 var(--padding);
2020-04-07 00:11:35 +02:00
background: var(--color-bg-light);
2020-04-10 15:47:29 +02:00
//border-bottom: 1px solid var(--color-line);
2020-04-07 00:11:35 +02:00
}
.ui-header-bar-main
{
display: flex;
align-items: center;
height: 100%;
.ui-icon-button
{
margin-right: var(--padding);
}
}
.ui-header-bar-aside
{
display: flex;
align-items: center;
height: 100%;
2020-04-07 12:28:47 +02:00
> * + *
{
margin-left: 15px;
}
2020-04-06 23:48:28 +02:00
}
.ui-header-bar-title
{
2020-04-10 15:47:29 +02:00
font-family: var(--font);
2020-04-06 23:48:28 +02:00
margin: 0;
font-size: var(--font-size-l);
font-weight: 700;
2020-04-08 15:16:05 +02:00
&.is-empty
{
color: var(--color-fg-light);
font-weight: 400;
}
2020-04-06 23:48:28 +02:00
}
</style>