From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/devtest/fetch-action.tmpl | 44 +++++ templates/devtest/flex-list.tmpl | 115 ++++++++++++ templates/devtest/fomantic-modal.tmpl | 86 +++++++++ templates/devtest/gitea-ui.tmpl | 330 ++++++++++++++++++++++++++++++++++ templates/devtest/label.tmpl | 27 +++ templates/devtest/list.tmpl | 15 ++ templates/devtest/tmplerr-sub.tmpl | 3 + templates/devtest/tmplerr.tmpl | 12 ++ 8 files changed, 632 insertions(+) create mode 100644 templates/devtest/fetch-action.tmpl create mode 100644 templates/devtest/flex-list.tmpl create mode 100644 templates/devtest/fomantic-modal.tmpl create mode 100644 templates/devtest/gitea-ui.tmpl create mode 100644 templates/devtest/label.tmpl create mode 100644 templates/devtest/list.tmpl create mode 100644 templates/devtest/tmplerr-sub.tmpl create mode 100644 templates/devtest/tmplerr.tmpl (limited to 'templates/devtest') diff --git a/templates/devtest/fetch-action.tmpl b/templates/devtest/fetch-action.tmpl new file mode 100644 index 0000000..be15a53 --- /dev/null +++ b/templates/devtest/fetch-action.tmpl @@ -0,0 +1,44 @@ +{{template "base/head" .}} +
+ {{template "base/alert" .}} +
+

link-action

+
+ Use "window.fetch" to send a request to backend, the request is defined in an "A" or "BUTTON" element. + It might be renamed to "link-fetch-action" to match the "form-fetch-action". +
+
+ + + +
+
+
+

form-fetch-action

+
Use "window.fetch" to send a form request to backend
+
+
+ +
+
+
+
+
+
+
+
bad action url
+
+
+
+
+
+ +{{template "base/footer" .}} diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl new file mode 100644 index 0000000..015ab1e --- /dev/null +++ b/templates/devtest/flex-list.tmpl @@ -0,0 +1,115 @@ +{{template "base/head" .}} + +
+
+

Flex List (standalone)

+
+
+
+
+ {{svg "octicon-info" 32}} +
+
+
+ Flex Item + + with label + +
+
+ consists of leading/main/trailing part +
+
+ main part contains title and (multiple) body lines +
+
+
+ + + +
+
+ +
+
+ {{svg "octicon-info" 32}} +
+
+
+ Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong title +
+
+ consists of leading/main/trailing part +
+
+ Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content + Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content +
+
+
+ +
+
+ +
+
+ {{svg "octicon-repo" 32}} +
+
+ +
+ when inside header, the trailing part will wrap below the title +
+
+
+
+ +
+ +

Flex List (with "ui segment")

+
+
+
item 1
+
item 2
+
+
+
+

Flex List (with "ui segment")

+
+
item 1
+
item 2
+
+
+ +

If parent provides the padding/margin space:

+
+
+
item 1 (no padding top)
+
item 2 (no padding bottom)
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/devtest/fomantic-modal.tmpl b/templates/devtest/fomantic-modal.tmpl new file mode 100644 index 0000000..5cd3672 --- /dev/null +++ b/templates/devtest/fomantic-modal.tmpl @@ -0,0 +1,86 @@ +{{template "base/head" .}} +
+ {{template "base/alert" .}} + + + + + + + + + + + + + + + + + + + + + +
+{{template "base/footer" .}} diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl new file mode 100644 index 0000000..8c5db4d --- /dev/null +++ b/templates/devtest/gitea-ui.tmpl @@ -0,0 +1,330 @@ +{{template "base/head" .}} + +
+
+

Link

+
+ normal + muted + suppressed + silenced +
+

Button

+
+ Style: + + + + +
+
+ State: + +
+
+
    +
  • +

    General purpose:

    + + + + + + + + +
  • +
  • +

    Recommended colors:

    + + + + + + + + + + +
  • +
  • +

    Supported but not recommended:

    +

    Do not use if there is no strong requirement. Do not use grey/black buttons, they don't work well with dark theme.

    + + + + + + + + + + + + + + +
  • +
  • +

    Inline / Plain:

    +
    + + + +
    +
  • +
+ +
+
+ +
+

Buttons

+
+
+
+
+
+ +
+

Tooltip

+
text with tooltip
+
text with interactive tooltip
+
+ +
+

Loading

+
loading ...
+
+

loading ...

+

loading ...

+

loading ...

+

loading ...

+
+
+ +
+

<origin-url>

+
+
+
+ +
+

<overflow-menu>

+ + + +
+ +
+

GiteaAbsoluteDate

+
+
+
+
+
+
relative-time:
+
+ +
+

LocaleNumber

+
{{ctx.Locale.PrettyNumber 1}}
+
{{ctx.Locale.PrettyNumber 12}}
+
{{ctx.Locale.PrettyNumber 123}}
+
{{ctx.Locale.PrettyNumber 1234}}
+
{{ctx.Locale.PrettyNumber 12345}}
+
{{ctx.Locale.PrettyNumber 123456}}
+
{{ctx.Locale.PrettyNumber 1234567}}
+
+ +
+

TimeSince

+
Now: {{TimeSince .TimeNow ctx.Locale}}
+
5s past: {{TimeSince .TimePast5s ctx.Locale}}
+
5s future: {{TimeSince .TimeFuture5s ctx.Locale}}
+
2m past: {{TimeSince .TimePast2m ctx.Locale}}
+
2m future: {{TimeSince .TimeFuture2m ctx.Locale}}
+
1y past: {{TimeSince .TimePast1y ctx.Locale}}
+
1y future: {{TimeSince .TimeFuture1y ctx.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 item with very very very very very very very very long content
+ +
+
{{svg "octicon-alert"}} flex every line
+
{{svg "octicon-alert"}} flex every item
+
{{svg "octicon-alert"}} flex item with very very very very very very very very long content
+
+ +

Button with SVG

+
+ +
+ + 123 +
+ +
+ +

Input with SVG

+
+ +
+ +

Dropdown with SVG

+
+ + + + +
+ + +
+
+ +
+ + + + +
+ +
+ + + + +
+ +
+
+
Button align with ...
+ +
+
+ +
+

Toast

+
+ + + +
+
+ +
+

ComboMarkdownEditor

+
ps: no JS code attached, so just a layout
+ {{template "shared/combomarkdowneditor" .}} +
+ +

Tailwind CSS Demo

+
+ +
+ + +
+{{template "base/footer" .}} diff --git a/templates/devtest/label.tmpl b/templates/devtest/label.tmpl new file mode 100644 index 0000000..c4b52a3 --- /dev/null +++ b/templates/devtest/label.tmpl @@ -0,0 +1,27 @@ +{{template "base/head" .}} + +
+
+

Label

+
+ simple label + red label + green label +
+
+ basic label + basic red label + basic green label +
+
+ long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
+
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
+
+ very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label +
+
+
+{{template "base/footer" .}} diff --git a/templates/devtest/list.tmpl b/templates/devtest/list.tmpl new file mode 100644 index 0000000..90b1fcc --- /dev/null +++ b/templates/devtest/list.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} + + + + + +{{template "base/footer" .}} diff --git a/templates/devtest/tmplerr-sub.tmpl b/templates/devtest/tmplerr-sub.tmpl new file mode 100644 index 0000000..f7974eb --- /dev/null +++ b/templates/devtest/tmplerr-sub.tmpl @@ -0,0 +1,3 @@ +sub template triggers an executing error + + {{ctx.Locale.NoSuch "asdf"}} diff --git a/templates/devtest/tmplerr.tmpl b/templates/devtest/tmplerr.tmpl new file mode 100644 index 0000000..dd938c8 --- /dev/null +++ b/templates/devtest/tmplerr.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
+
+
+ hello hello hello hello hello hello hello hello hello hello +
+
+ {{template "devtest/tmplerr-sub" .}} +
+
+
+{{template "base/footer" .}} -- cgit v1.2.3