2017-07-23 18:42:08 +00:00
|
|
|
<template>
|
|
|
|
<div class="button-bar">
|
|
|
|
<div class="button-bar__inner button-bar__inner--top">
|
2017-12-10 23:49:20 +00:00
|
|
|
<button class="button-bar__button button" :class="{ 'button-bar__button--on': layoutSettings.showNavigationBar }" @click="toggleNavigationBar()" v-title="'Toggle navigation bar'">
|
2017-07-23 18:42:08 +00:00
|
|
|
<icon-navigation-bar></icon-navigation-bar>
|
2017-11-04 16:59:48 +00:00
|
|
|
</button>
|
2018-01-21 00:11:05 +00:00
|
|
|
<button class="button-bar__button button" :class="{ 'button-bar__button--on': layoutSettings.showSidePreview }" tour-step-anchor="editor" @click="toggleSidePreview()" v-title="'Toggle side preview'">
|
2017-07-23 18:42:08 +00:00
|
|
|
<icon-side-preview></icon-side-preview>
|
2017-11-04 16:59:48 +00:00
|
|
|
</button>
|
|
|
|
<button class="button-bar__button button" @click="toggleEditor(false)" v-title="'Reader mode'">
|
2017-07-25 08:19:39 +00:00
|
|
|
<icon-eye></icon-eye>
|
2017-11-04 16:59:48 +00:00
|
|
|
</button>
|
2017-07-23 18:42:08 +00:00
|
|
|
</div>
|
|
|
|
<div class="button-bar__inner button-bar__inner--bottom">
|
2017-12-10 23:49:20 +00:00
|
|
|
<button class="button-bar__button button" :class="{ 'button-bar__button--on': layoutSettings.focusMode }" @click="toggleFocusMode()" v-title="'Toggle focus mode'">
|
2017-08-03 17:08:12 +00:00
|
|
|
<icon-target></icon-target>
|
2017-11-04 16:59:48 +00:00
|
|
|
</button>
|
2017-12-10 23:49:20 +00:00
|
|
|
<button class="button-bar__button button" :class="{ 'button-bar__button--on': layoutSettings.scrollSync }" @click="toggleScrollSync()" v-title="'Toggle scroll sync'">
|
2017-10-02 22:48:01 +00:00
|
|
|
<icon-scroll-sync></icon-scroll-sync>
|
2017-11-04 16:59:48 +00:00
|
|
|
</button>
|
2017-12-10 23:49:20 +00:00
|
|
|
<button class="button-bar__button button" :class="{ 'button-bar__button--on': layoutSettings.showStatusBar }" @click="toggleStatusBar()" v-title="'Toggle status bar'">
|
2017-07-23 18:42:08 +00:00
|
|
|
<icon-status-bar></icon-status-bar>
|
2017-11-04 16:59:48 +00:00
|
|
|
</button>
|
2017-07-23 18:42:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2017-08-03 17:08:12 +00:00
|
|
|
import { mapGetters, mapActions } from 'vuex';
|
2017-07-23 18:42:08 +00:00
|
|
|
|
|
|
|
export default {
|
2017-08-03 17:08:12 +00:00
|
|
|
computed: mapGetters('data', [
|
2017-12-10 23:49:20 +00:00
|
|
|
'layoutSettings',
|
2017-07-23 18:42:08 +00:00
|
|
|
]),
|
2017-08-03 17:08:12 +00:00
|
|
|
methods: mapActions('data', [
|
2017-07-23 18:42:08 +00:00
|
|
|
'toggleNavigationBar',
|
|
|
|
'toggleEditor',
|
|
|
|
'toggleSidePreview',
|
|
|
|
'toggleStatusBar',
|
2017-08-03 17:08:12 +00:00
|
|
|
'toggleFocusMode',
|
2017-10-02 22:48:01 +00:00
|
|
|
'toggleScrollSync',
|
2017-07-23 18:42:08 +00:00
|
|
|
]),
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2018-01-14 16:27:06 +00:00
|
|
|
@import 'common/variables.scss';
|
|
|
|
|
2017-07-23 18:42:08 +00:00
|
|
|
.button-bar {
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-bar__inner {
|
|
|
|
position: absolute;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-bar__inner--bottom {
|
|
|
|
bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-bar__button {
|
|
|
|
color: rgba(0, 0, 0, 0.2);
|
2018-01-14 16:27:06 +00:00
|
|
|
display: block;
|
2017-07-23 18:42:08 +00:00
|
|
|
width: 26px;
|
|
|
|
height: 26px;
|
|
|
|
padding: 2px;
|
|
|
|
margin: 3px 0;
|
|
|
|
|
2018-01-14 16:27:06 +00:00
|
|
|
.app--dark & {
|
|
|
|
color: rgba(255, 255, 255, 0.15);
|
|
|
|
}
|
|
|
|
|
2017-11-04 16:59:48 +00:00
|
|
|
&:active,
|
|
|
|
&:focus,
|
2017-07-23 18:42:08 +00:00
|
|
|
&:hover {
|
2017-11-04 16:59:48 +00:00
|
|
|
color: rgba(0, 0, 0, 0.2);
|
2018-01-14 16:27:06 +00:00
|
|
|
|
|
|
|
.app--dark & {
|
|
|
|
color: rgba(255, 255, 255, 0.15);
|
|
|
|
background-color: $navbar-hover-background;
|
|
|
|
}
|
2017-07-23 18:42:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-bar__button--on {
|
|
|
|
color: rgba(0, 0, 0, 0.4);
|
2017-11-04 16:59:48 +00:00
|
|
|
|
2018-01-14 16:27:06 +00:00
|
|
|
.app--dark & {
|
|
|
|
color: rgba(255, 255, 255, 0.4);
|
|
|
|
}
|
|
|
|
|
2017-11-04 16:59:48 +00:00
|
|
|
&:active,
|
|
|
|
&:focus,
|
|
|
|
&:hover {
|
|
|
|
color: rgba(0, 0, 0, 0.4);
|
2018-01-14 16:27:06 +00:00
|
|
|
|
|
|
|
.app--dark & {
|
|
|
|
color: rgba(255, 255, 255, 0.4);
|
|
|
|
}
|
2017-11-04 16:59:48 +00:00
|
|
|
}
|
2017-07-23 18:42:08 +00:00
|
|
|
}
|
|
|
|
</style>
|