ui: use switch for markdown editor modes (#7481)

Replaces https://codeberg.org/forgejo/forgejo/pulls/5478
Closes https://codeberg.org/forgejo/forgejo/issues/244

Use switch for preview mode switching instead of tabs. It is placed in line with the toolbar buttons.

Preview:
* https://codeberg.org/attachments/38910747-c14c-41d1-9935-c35f3e17033b
* https://codeberg.org/attachments/ff8ea47a-f157-424f-8b7f-af1008d5e8b5

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7481
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
This commit is contained in:
0ko 2025-04-07 13:47:13 +00:00 committed by David Rotermund
parent 61ad6d5bc0
commit 2430107459
5 changed files with 94 additions and 42 deletions

View file

@ -11,6 +11,14 @@
flex-wrap: wrap;
}
markdown-toolbar .switch .item {
padding: 0.25em 1em;
}
.markdown-toolbar-hidden .markdown-toolbar-button {
display: none;
}
.combo-markdown-editor .markdown-toolbar-group {
display: flex;
}