From: Paul Hänsch Date: Sat, 12 Aug 2023 10:54:20 +0000 (+0200) Subject: simplified code for editor help tabs X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=0a472330f692be399e9c51d45a610d98435fb0d2;p=shellwiki simplified code for editor help tabs --- diff --git a/themes/default.css b/themes/default.css index c4ebf6e..1823d77 100644 --- a/themes/default.css +++ b/themes/default.css @@ -111,59 +111,37 @@ main pre { /* === Editor === */ -body[id$="/[edit]"] textarea, -body[id$="/[newpage]"] textarea { +[id$="/[edit]"] main .pagemenu { + margin-bottom: 1em; +} + +.tab[name=edithelp] ~ .tab.editor textarea { width: 100%; min-height: 20em; min-height: 50vh; font-family: monospace; font-size: inherit; } - -[id$="/[edit]"] main { - padding-top: 2.5em; -} -[id$="/[edit]"] input[type=radio].tab ~ div.tab.syntax, -[id$="/[edit]"] input[type=radio].tab ~ div.tab.help, -[id$="/[newpage]"] input[type=radio].tab ~ div.tab.syntax, -[id$="/[newpage]"] input[type=radio].tab ~ div.tab.help { +.tab[name=edithelp] ~ .tab.syntax, +.tab[name=edithelp] ~ .tab.attach { background-color: #FFF; min-height: 20em; min-height: 50vh; } -[id$="/[edit]"] input[type=radio].tab#edtr:checked ~ form.tab.editor, -[id$="/[newpage]"] input[type=radio].tab#edtr:checked ~ form.tab.editor { - display: block; -} -[id$="/[edit]"] input[type=radio].tab#help:checked ~ div.tab.syntax, -[id$="/[newpage]"] input[type=radio].tab#help:checked ~ div.tab.syntax { - display: block; -} -[id$="/[edit]"] input[type=radio].tab#himg:checked ~ div.tab.help, -[id$="/[edit]"] input[type=radio].tab#hdoc:checked ~ div.tab.help, -[id$="/[newpage]"] input[type=radio].tab#himg:checked ~ div.tab.help, -[id$="/[newpage]"] input[type=radio].tab#hdoc:checked ~ div.tab.help { - display: block; -} -[id$="/[edit]"] input[type=radio].tab ~ div.tab.help .himg, -[id$="/[edit]"] input[type=radio].tab ~ div.tab.help .hdoc, -[id$="/[newpage]"] input[type=radio].tab ~ div.tab.help .himg, -[id$="/[newpage]"] input[type=radio].tab ~ div.tab.help .hdoc { - display: none; -} -[id$="/[edit]"] input[type=radio].tab ~ div.tab.help, -[id$="/[newpage]"] input[type=radio].tab ~ div.tab.help { + +.tab[name=edithelp] ~ .tab.attach { padding-top: 1em; padding-left: 7em; } -[id$="/[edit]"] input[type=radio].tab ~ div.tab.help .himg img, -[id$="/[newpage]"] input[type=radio].tab ~ div.tab.help .himg img { +.tab[name=edithelp] ~ .tab.attach .aimg img { float: left; max-height: 4em; margin-left: -6em; } -[id$="/[edit]"] input[type=radio].tab#himg:checked ~ div.tab.help .himg, -[id$="/[newpage]"] input[type=radio].tab#himg:checked ~ div.tab.help .himg { display: block; } -[id$="/[edit]"] input[type=radio].tab#hdoc:checked ~ div.tab.help .hdoc, -[id$="/[newpage]"] input[type=radio].tab#hdoc:checked ~ div.tab.help .hdoc { display: block; } + +.tab[name=edithelp]#editor:checked ~ .tab.editor, +.tab[name=edithelp]#syntax:checked ~ .tab.syntax, +.tab[name=edithelp]#attach:checked ~ .tab.attach { + display: block; +} /* === Attachments === */ diff --git a/themes/default.sh b/themes/default.sh index 563ea3a..bb85450 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -74,10 +74,9 @@ theme_editor(){ [ "$template" ] && acl_read "$template" || template="$page" theme_page - "Editor: $title" <<-EOF - - - - + + +