xmark added

This commit is contained in:
deniszulic 2023-05-01 01:08:45 +02:00
parent 2260f214ed
commit 5192f4a326
3 changed files with 19 additions and 0 deletions

View file

@ -14,6 +14,12 @@
box-shadow: -10px 0px 5px -10px #b3b3b3;
z-index: 10;
}
.sidebar-xmark {
position: absolute;
right: 10px;
top: 5px;
font-size: 25px;
}
.sidebar .sidebar-content {
padding: 12px;
margin-bottom: 1.6em;
@ -24,6 +30,7 @@
left: 0;
overflow-x: hidden;
overflow-y: auto;
width: 90%;
}
.sidebar .sidebar-content .hide-btn {
display: none;

View file

@ -5,6 +5,7 @@ template(name="sidebar")
// title="{{showTongueTitle}}")
// i.fa.fa-navicon
.sidebar-shadow
a.sidebar-xmark.js-close-sidebar ✕
.sidebar-content.js-board-sidebar-content
//a.hide-btn.js-hide-sidebar
// i.fa.fa-navicon

View file

@ -42,6 +42,14 @@ BlazeComponent.extendComponent({
}
},
close() {
if (this._isOpen.get()) {
this._isOpen.set(false);
EscapeActions.executeUpTo('detailsPane');
this.toggle()
}
},
hide() {
if (this._isOpen.get()) {
this._isOpen.set(false);
@ -125,6 +133,9 @@ BlazeComponent.extendComponent({
'click .js-shortcuts'() {
FlowRouter.go('shortcuts');
},
'click .js-close-sidebar'() {
Sidebar.toggle()
},
},
];
},