mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 05:46:10 +01:00
floating buttons WIP
This commit is contained in:
32
src/public/app/widgets/floating_buttons/floating_buttons.js
Normal file
32
src/public/app/widgets/floating_buttons/floating_buttons.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import Container from "../containers/container.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="floating-buttons">
|
||||
<style>
|
||||
.floating-buttons {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.floating-buttons-children {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
z-index: 100;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="floating-buttons-children"></div>
|
||||
</div>`;
|
||||
|
||||
export default class FloatingButtons extends Container {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.$children = this.$widget.find(".floating-buttons-children");
|
||||
|
||||
for (const widget of this.children) {
|
||||
this.$children.append(widget.render());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user