From 995095665414f1e914a7dfa707cc6b9680066632 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Tue, 1 Feb 2022 15:38:47 +0500 Subject: [PATCH] Editor: Split the toolbar into two parts Better usage of space, actually --- static/default.css | 9 +- views/mutators.qtpl | 4 +- views/mutators.qtpl.go | 276 +++++++++++++++++++++-------------------- 3 files changed, 148 insertions(+), 141 deletions(-) diff --git a/static/default.css b/static/default.css index 5e16690..ec8014d 100644 --- a/static/default.css +++ b/static/default.css @@ -60,7 +60,8 @@ header { width: 100%; margin-bottom: 1rem; } .layout { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; margin: 0 1rem; row-gap: 1rem; } .main-width { margin: 0; } main { grid-column: 1 / span 1; grid-row: 1 / span 2; } - .sibling-hyphae, .edit-toolbar, .help-topics { grid-column: 2 / span 1; grid-row: 1 / span 1; } + .sibling-hyphae, .markup-toolbar, .help-topics { grid-column: 2 / span 1; grid-row: 1 / span 1; } + .action-toolbar { grid-column: 2 / span 1; grid-row: 2 / span 1; } .layout-card { width: 100%; } .edit-toolbar__buttons {display: grid; } } @@ -73,8 +74,10 @@ header { width: 100%; margin-bottom: 1rem; } .layout { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } .layout-card {max-width: 18rem;} .main-width { margin: 0 auto; } - main { grid-column: 2 / span 1; } - .sibling-hyphae, .edit-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: 0; } + main { grid-column: 2 / span 1; grid-row: 1 / span 2; } + .sibling-hyphae, .markup-toolbar, .help-topics { grid-column: 3 / span 1; margin-left: 0; } + .markup-toolbar { grid-column: 3 / span 1; grid-row: 1 / span 2; } + .action-toolbar { grid-column: 1 / span 1; grid-row: 1 / span 1; } .edit-toolbar__buttons { grid-template-columns: 1fr; } } diff --git a/views/mutators.qtpl b/views/mutators.qtpl index cfb4e08..117b104 100644 --- a/views/mutators.qtpl +++ b/views/mutators.qtpl @@ -6,7 +6,7 @@ {% import "github.com/bouncepaw/mycorrhiza/user" %} {% func Toolbar(u *user.User, lc *l18n.Localizer) %} -