From 46c17c8029a539d276d25585fd6d54153ffa592f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 15 Jun 2023 00:40:15 +0800 Subject: Use flex to align SVG and text (#25163) The code can be as simple as: ```html
{{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)
{{svg "octicon-alert"}} {{svg "octicon-x"}} text
(inline)
``` ![image](https://github.com/go-gitea/gitea/assets/2114189/1d3c10f1-0bc7-4c26-b236-bad537d5c465) --------- Co-authored-by: Giteabot --- templates/devtest/gitea-ui.tmpl | 100 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) (limited to 'templates/devtest') diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl index 516b73cf09..0da443aade 100644 --- a/templates/devtest/gitea-ui.tmpl +++ b/templates/devtest/gitea-ui.tmpl @@ -128,6 +128,106 @@
1y future: {{TimeSince .TimeFuture1y $.locale}}
+
+

SVG alignment

+ +

Text with SVG

+
{{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)
+
{{svg "octicon-alert"}} {{svg "octicon-x"}} text
(inline)
+
+
{{svg "octicon-alert"}} flex every line
+
{{svg "octicon-alert"}} flex every item
+
+ +

Button with SVG

+
+ +
+ + 123 +
+
+ +

Input with SVG

+
+ +
+ +

Dropdown with SVG

+
+ + + + + +
+ + +
+
+ +
+ + +
+
+

ComboMarkdownEditor

ps: no JS code attached, so just a layout
-- cgit v1.2.3