summaryrefslogtreecommitdiffstats
path: root/templates/devtest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
commit65aa53fc52ff15efe54df4147564828d535837f8 (patch)
tree31c51dad04fdcca80e6d3043c8bd49d2f1a51f83 /templates/devtest
parentInitial commit. (diff)
downloadforgejo-65aa53fc52ff15efe54df4147564828d535837f8.tar.xz
forgejo-65aa53fc52ff15efe54df4147564828d535837f8.zip
Adding upstream version 8.0.3.HEADupstream/8.0.3upstreamdebian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'templates/devtest')
-rw-r--r--templates/devtest/fetch-action.tmpl44
-rw-r--r--templates/devtest/flex-list.tmpl115
-rw-r--r--templates/devtest/fomantic-modal.tmpl86
-rw-r--r--templates/devtest/gitea-ui.tmpl330
-rw-r--r--templates/devtest/label.tmpl27
-rw-r--r--templates/devtest/list.tmpl15
-rw-r--r--templates/devtest/tmplerr-sub.tmpl3
-rw-r--r--templates/devtest/tmplerr.tmpl12
8 files changed, 632 insertions, 0 deletions
diff --git a/templates/devtest/fetch-action.tmpl b/templates/devtest/fetch-action.tmpl
new file mode 100644
index 00000000..be15a538
--- /dev/null
+++ b/templates/devtest/fetch-action.tmpl
@@ -0,0 +1,44 @@
+{{template "base/head" .}}
+<div class="page-content devtest ui container">
+ {{template "base/alert" .}}
+ <div>
+ <h1>link-action</h1>
+ <div>
+ 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".
+ </div>
+ <div>
+ <button class="link-action" data-url="fetch-action-test?k=1">test action</button>
+ <button class="link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with confirm</button>
+ <button class="ui red button link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with risky confirm</button>
+ </div>
+ </div>
+ <div>
+ <h1>form-fetch-action</h1>
+ <div>Use "window.fetch" to send a form request to backend</div>
+ <div>
+ <form method="get" action="fetch-action-test?k=1" class="form-fetch-action">
+ <button name="btn">submit get</button>
+ </form>
+ <form method="post" action="fetch-action-test?k=1" class="form-fetch-action">
+ <div><textarea name="text" rows="3" class="js-quick-submit"></textarea></div>
+ <div><label><input name="check" type="checkbox"> check</label></div>
+ <div><button name="btn">submit post</button></div>
+ </form>
+ <form method="post" action="no-such-uri" class="form-fetch-action">
+ <div class="tw-py-8">bad action url</div>
+ <div><button name="btn">submit test</button></div>
+ </form>
+ </div>
+ </div>
+</div>
+<style>
+ .ui.message.flash-message {
+ text-align: left;
+ }
+ .form-fetch-action {
+ margin-bottom: 1em;
+ border: 1px red dashed; /* show the border for demo purpose */
+ }
+</style>
+{{template "base/footer" .}}
diff --git a/templates/devtest/flex-list.tmpl b/templates/devtest/flex-list.tmpl
new file mode 100644
index 00000000..015ab1e1
--- /dev/null
+++ b/templates/devtest/flex-list.tmpl
@@ -0,0 +1,115 @@
+{{template "base/head" .}}
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
+<div class="page-content devtest">
+ <div class="ui container">
+ <h1>Flex List (standalone)</h1>
+ <div class="divider"></div>
+ <div class="flex-list">
+ <div class="flex-item">
+ <div class="flex-item-leading">
+ {{svg "octicon-info" 32}}
+ </div>
+ <div class="flex-item-main">
+ <div class="flex-item-title">
+ Flex Item
+ <span class="ui basic label">
+ with label
+ </span>
+ </div>
+ <div class="flex-item-body">
+ consists of leading/main/trailing part
+ </div>
+ <div class="flex-item-body">
+ main part contains title and (multiple) body lines
+ </div>
+ </div>
+ <div class="flex-item-trailing">
+ <button class="ui tiny red button">
+ {{svg "octicon-alert" 14}} CJK文本测试
+ </button>
+ <button class="ui tiny primary button">
+ {{svg "octicon-info" 14}} Button
+ </button>
+ <button class="ui tiny primary button">
+ Button with long text
+ </button>
+ </div>
+ </div>
+
+ <div class="flex-item">
+ <div class="flex-item-leading">
+ {{svg "octicon-info" 32}}
+ </div>
+ <div class="flex-item-main">
+ <div class="flex-item-title">
+ Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong title
+ </div>
+ <div class="flex-item-body">
+ consists of leading/main/trailing part
+ </div>
+ <div class="flex-item-body">
+ Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content
+ <span class="text truncate">Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content</span>
+ </div>
+ </div>
+ <div class="flex-item-trailing">
+ <button class="ui tiny red button">
+ {{svg "octicon-alert" 12}} CJK文本测试 <!-- single CJK text test, it shouldn't be horizontal -->
+ </button>
+ </div>
+ </div>
+
+ <div class="flex-item">
+ <div class="flex-item-leading">
+ {{svg "octicon-repo" 32}}
+ </div>
+ <div class="flex-item-main">
+ <div class="flex-item-header">
+ <div class="flex-item-title">
+ <a class="text primary" href="{{$.Link}}">
+ gitea-org / gitea
+ </a>
+ <span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
+ </div>
+ <div class="flex-item-trailing">
+ <a class="muted" href="{{$.Link}}">
+ <span class="flex-text-inline"><i class="color-icon tw-mr-2 tw-bg-blue"></i>Go</span>
+ </a>
+ <a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
+ <a class="text grey flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
+ </div>
+ </div>
+ <div class="flex-item-body">
+ when inside header, the trailing part will wrap below the title
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="divider"></div>
+
+ <h1>Flex List (with "ui segment")</h1>
+ <div class="ui attached segment">
+ <div class="flex-list">
+ <div class="flex-item">item 1</div>
+ <div class="flex-item">item 2</div>
+ </div>
+ </div>
+ <div class="ui attached segment">
+ <h1>Flex List (with "ui segment")</h1>
+ <div class="flex-list">
+ <div class="flex-item">item 1</div>
+ <div class="flex-item">item 2</div>
+ </div>
+ </div>
+
+ <h1>If parent provides the padding/margin space:</h1>
+ <div class="tw-border tw-border-secondary tw-py-4">
+ <div class="flex-list flex-space-fitted">
+ <div class="flex-item">item 1 (no padding top)</div>
+ <div class="flex-item">item 2 (no padding bottom)</div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/devtest/fomantic-modal.tmpl b/templates/devtest/fomantic-modal.tmpl
new file mode 100644
index 00000000..5cd36721
--- /dev/null
+++ b/templates/devtest/fomantic-modal.tmpl
@@ -0,0 +1,86 @@
+{{template "base/head" .}}
+<div class="page-content devtest ui container">
+ {{template "base/alert" .}}
+
+ <div id="test-modal-form-1" class="ui mini modal">
+ <div class="header">Form dialog (layout 1)</div>
+ <form class="content" method="post">
+ <div class="ui input tw-w-full"><input name="user_input"></div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+ </form>
+ </div>
+
+ <div id="test-modal-form-2" class="ui mini modal">
+ <div class="header">Form dialog (layout 2)</div>
+ <form method="post">
+ <div class="content">
+ <div class="ui input tw-w-full"><input name="user_input"></div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+ </div>
+ </form>
+ </div>
+
+ <div id="test-modal-form-3" class="ui mini modal">
+ <div class="header">Form dialog (layout 3)</div>
+ <form method="post">
+ <div class="content">
+ <div class="ui input tw-w-full"><input name="user_input"></div>
+ </div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+ </form>
+ </div>
+
+ <div id="test-modal-form-4" class="ui mini modal">
+ <div class="header">Form dialog (layout 4)</div>
+ <div class="content">
+ <div class="ui input tw-w-full"><input name="user_input"></div>
+ </div>
+ <form method="post">
+ {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+ </form>
+ </div>
+
+ <div class="ui g-modal-confirm modal" id="test-modal-default">
+ <div class="header">{{svg "octicon-file"}} Default dialog <span>title</span></div>
+ <div class="content">
+ very long aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ </div>
+ {{template "base/modal_actions_confirm"}}
+ </div>
+
+ <div class="ui g-modal-confirm modal" id="test-modal-confirm">
+ <div class="header">Confirm dialog</div>
+ <div class="content">hello, this is the modal dialog content</div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
+ </div>
+
+ <div class="ui g-modal-confirm modal" id="test-modal-blue">
+ <div class="header">Blue dialog</div>
+ <div class="content">hello, this is the modal dialog content</div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "blue")}}
+ </div>
+
+ <div class="ui g-modal-confirm modal" id="test-modal-yellow">
+ <div class="header">yellow dialog</div>
+ <div class="content">hello, this is the modal dialog content</div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "yellow")}}
+ </div>
+
+ <div class="ui g-modal-confirm modal" id="test-modal-danger">
+ {{svg "octicon-x" 16 "inside close"}}
+ <div class="header">dangerous action dialog</div>
+ <div class="content">hello, this is the modal dialog content, this is a dangerous operation</div>
+ {{template "base/modal_actions_confirm" (dict "ModalButtonDangerText" "I know and must do this is dangerous operation")}}
+ </div>
+
+ <div class="modal-buttons flex-text-block tw-flex-wrap"></div>
+ <script type="module">
+ for (const el of $('.ui.modal')) {
+ const $btn = $('<button>').text(`${el.id}`).on('click', () => {
+ $(el).modal({onApprove() {alert('confirmed')}}).modal('show');
+ });
+ $('.modal-buttons').append($btn);
+ }
+ </script>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl
new file mode 100644
index 00000000..8c5db4d8
--- /dev/null
+++ b/templates/devtest/gitea-ui.tmpl
@@ -0,0 +1,330 @@
+{{template "base/head" .}}
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
+<div class="page-content devtest ui container">
+ <div>
+ <h1>Link</h1>
+ <div>
+ <a href="#">normal</a>
+ <a class="muted" href="#">muted</a>
+ <a class="suppressed" href="#">suppressed</a>
+ <a class="silenced" href="#">silenced</a>
+ </div>
+ <h1>Button</h1>
+ <div>
+ Style:
+ <label><input type="checkbox" name="button-style-compact" value="compact">compact</label>
+ <label><input type="radio" name="button-style-size" value="">(normal)</label>
+ <label><input type="radio" name="button-style-size" value="tiny">tiny</label>
+ <label><input type="radio" name="button-style-size" value="mini">mini</label>
+ </div>
+ <div>
+ State:
+ <label><input type="checkbox" name="button-state-disabled" value="disabled">disabled</label>
+ </div>
+ <div id="devtest-button-samples">
+ <ul class="button-sample-groups">
+ <li class="sample-group">
+ <h2>General purpose:</h2>
+ <button class="ui button">Unclassed</button>
+ <button class="ui basic button">Basic Unclassed</button>
+ <button class="ui primary button">Primary</button>
+ <button class="ui basic primary button">Basic Primary</button>
+ <button class="ui negative button">Negative</button>
+ <button class="ui basic negative button">Basic Negative</button>
+ <button class="ui positive button">Positive</button>
+ <button class="ui basic positive button">Basic Positive</button>
+ </li>
+ <li class="sample-group">
+ <h2>Recommended colors:</h2>
+ <button class="ui red button">Red</button>
+ <button class="ui basic red button">Basic Red</button>
+ <button class="ui primary button">Green</button>
+ <button class="ui basic primary button">Basic Green</button>
+ <button class="ui blue button">Blue</button>
+ <button class="ui basic blue button">Basic Blue</button>
+ <button class="ui orange button">Orange</button>
+ <button class="ui basic orange button">Basic Orange</button>
+ <button class="ui yellow button">Yellow</button>
+ <button class="ui basic yellow button">Basic Yellow</button>
+ </li>
+ <li class="sample-group">
+ <h2>Supported but not recommended:</h2>
+ <p>Do not use if there is no strong requirement. Do not use grey/black buttons, they don't work well with dark theme.</p>
+ <button class="ui secondary button">Secondary</button>
+ <button class="ui basic secondary button">Basic Secondary</button>
+ <button class="ui olive button">Olive</button>
+ <button class="ui basic olive button">Basic Olive</button>
+ <button class="ui teal button">Teal</button>
+ <button class="ui basic teal button">Basic Teal</button>
+ <button class="ui violet button">Violet</button>
+ <button class="ui basic violet button">Basic Violet</button>
+ <button class="ui purple button">Purple</button>
+ <button class="ui basic purple button">Basic Purple</button>
+ <button class="ui pink button">Pink</button>
+ <button class="ui basic pink button">Basic Pink</button>
+ <button class="ui brown button">Brown</button>
+ <button class="ui basic brown button">Basic Brown</button>
+ </li>
+ <li class="sample-group">
+ <h2>Inline / Plain:</h2>
+ <div class="tw-my-1">
+ <button class="btn tw-p-2">Plain button</button>
+ <button class="btn interact-fg tw-p-2">Plain button with interact fg</button>
+ <button class="btn interact-bg tw-p-2">Plain button with interact bg</button>
+ </div>
+ </li>
+ </ul>
+ <script type="module">
+ const $buttons = $('#devtest-button-samples').find('button.ui');
+
+ const $buttonStyles = $('input[name*="button-style"]');
+ $buttonStyles.on('click', () => $buttonStyles.map((_ ,el) => $buttons.toggleClass(el.value, el.checked)));
+
+ const $buttonStates = $('input[name*="button-state"]');
+ $buttonStates.on('click', () => $buttonStates.map((_ ,el) => $buttons.prop(el.value, el.checked)));
+ </script>
+ </div>
+ </div>
+
+ <div>
+ <h1>Buttons</h1>
+ <div class="ui buttons"><button class="ui button">1</button><button class="ui button">2</button><button class="ui button">3</button></div>
+ <div class="ui buttons"><button class="ui button active">1</button><button class="ui button">2</button><button class="ui button">3</button></div>
+ <div class="ui buttons"><button class="ui button">1</button><button class="ui button active">2</button><button class="ui button">3</button></div>
+ <div class="ui buttons"><button class="ui button">1</button><button class="ui button">2</button><button class="ui button active">3</button></div>
+ </div>
+
+ <div>
+ <h1>Tooltip</h1>
+ <div><span data-tooltip-content="test tooltip">text with tooltip</span></div>
+ <div><span data-tooltip-content="test tooltip" data-tooltip-interactive="true">text with interactive tooltip</span></div>
+ </div>
+
+ <div>
+ <h1>Loading</h1>
+ <div class="is-loading loading-icon-2px tw-border tw-border-secondary tw-py-1"><span>loading ...</span></div>
+ <div class="is-loading tw-border tw-border-secondary tw-py-4">
+ <p>loading ...</p>
+ <p>loading ...</p>
+ <p>loading ...</p>
+ <p>loading ...</p>
+ </div>
+ </div>
+
+ <div>
+ <h1>&lt;origin-url&gt;</h1>
+ <div><origin-url data-url="test/url"></origin-url></div>
+ <div><origin-url data-url="/test/url"></origin-url></div>
+ </div>
+
+ <div>
+ <h1>&lt;overflow-menu&gt;</h1>
+ <overflow-menu class="ui secondary pointing tabular borderless menu">
+ <div class="overflow-menu-items">
+ <a class="active item">item</a>
+ <a class="item">item 1</a>
+ <a class="item">item 2</a>
+ <a class="item">item 3</a>
+ <a class="item">item 4</a>
+ <a class="item">item 5</a>
+ <a class="item">item 6</a>
+ <a class="item">item 7</a>
+ <a class="item">item 8</a>
+ <a class="item">item 9</a>
+ <a class="item">item 10</a>
+ <a class="item">item 11</a>
+ <a class="item">item 12</a>
+ <a class="item">item 13</a>
+ <a class="item">item 14</a>
+ <a class="item">item 15</a>
+ <a class="item">item 16</a>
+ <a class="item">item 17</a>
+ <a class="item">item 18</a>
+ </div>
+ </overflow-menu>
+ </div>
+
+ <div>
+ <h1>GiteaAbsoluteDate</h1>
+ <div><absolute-date date="2024-03-11" year="numeric" day="numeric" month="short"></absolute-date></div>
+ <div><absolute-date date="2024-03-11" year="numeric" day="numeric" month="long"></absolute-date></div>
+ <div><absolute-date date="2024-03-11" year="" day="numeric" month="numeric"></absolute-date></div>
+ <div><absolute-date date="2024-03-11" year="" day="numeric" month="numeric" weekday="long"></absolute-date></div>
+ <div><absolute-date date="2024-03-11T19:00:00-05:00" year="" day="numeric" month="numeric" weekday="long"></absolute-date></div>
+ <div class="tw-text-text-light-2">relative-time: <relative-time format="datetime" datetime="2024-03-11" year="" day="numeric" month="numeric"></relative-time></div>
+ </div>
+
+ <div>
+ <h1>LocaleNumber</h1>
+ <div>{{ctx.Locale.PrettyNumber 1}}</div>
+ <div>{{ctx.Locale.PrettyNumber 12}}</div>
+ <div>{{ctx.Locale.PrettyNumber 123}}</div>
+ <div>{{ctx.Locale.PrettyNumber 1234}}</div>
+ <div>{{ctx.Locale.PrettyNumber 12345}}</div>
+ <div>{{ctx.Locale.PrettyNumber 123456}}</div>
+ <div>{{ctx.Locale.PrettyNumber 1234567}}</div>
+ </div>
+
+ <div>
+ <h1>TimeSince</h1>
+ <div>Now: {{TimeSince .TimeNow ctx.Locale}}</div>
+ <div>5s past: {{TimeSince .TimePast5s ctx.Locale}}</div>
+ <div>5s future: {{TimeSince .TimeFuture5s ctx.Locale}}</div>
+ <div>2m past: {{TimeSince .TimePast2m ctx.Locale}}</div>
+ <div>2m future: {{TimeSince .TimeFuture2m ctx.Locale}}</div>
+ <div>1y past: {{TimeSince .TimePast1y ctx.Locale}}</div>
+ <div>1y future: {{TimeSince .TimeFuture1y ctx.Locale}}</div>
+ </div>
+
+ <div>
+ <h1>SVG alignment</h1>
+
+ <h2>Text with SVG</h2>
+ <div class="flex-text-block">{{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)</div>
+ <div><div class="flex-text-inline">{{svg "octicon-alert"}} {{svg "octicon-x"}} text</div> (inline)</div>
+
+ <div class="flex-text-block">{{svg "octicon-alert"}} flex item with very very very very very very very very long content</div>
+
+ <div class="flex-items-block">
+ <div class="item">{{svg "octicon-alert"}} flex every line</div>
+ <div class="item">{{svg "octicon-alert"}} flex every item</div>
+ <div class="item">{{svg "octicon-alert"}} flex item with very very very very very very very very long content</div>
+ </div>
+
+ <h2>Button with SVG</h2>
+ <div>
+ <button class="ui red button">{{svg "octicon-alert" 24}} {{svg "octicon-x" 24}} text</button>
+ <div class="ui labeled button">
+ <button class="ui basic button">labeled button</button>
+ <a class="ui basic label">123</a>
+ </div>
+ <button class="ui yellow button">{{svg "octicon-x" 16}} button with very very very very very very very very long text</button>
+ </div>
+
+ <h2>Input with SVG</h2>
+ <div>
+ <div class="ui icon search input">
+ <i class="icon">{{svg "octicon-search"}}</i>
+ <input type="text" placeholder="place holder">
+ </div>
+ </div>
+
+ <h2>Dropdown with SVG</h2>
+ <div>
+ <div class="ui dropdown" style="border: 1px red dashed" data-tooltip-content="border for demo purpose only">
+ <span class="text">simple</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ <div class="menu">
+ <div class="ui icon search input"><i class="icon">{{svg "octicon-search"}}</i><input type="text" value="search input in menu"></div>
+ <div class="item">item</div>
+ </div>
+ </div>
+ <div class="ui search selection dropdown">
+ <span class="text">search ...</span>
+ <input name="value" class="search">
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ {{svg "octicon-x" 14 "remove icon"}}
+ <div class="menu">
+ <div class="item">item</div>
+ </div>
+ </div>
+ <div class="ui multiple selection dropdown">
+ <input class="hidden" value="1">
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ {{svg "octicon-x" 14 "remove icon"}}
+ <div class="default text">empty multiple dropdown</div>
+ <div class="menu">
+ <div class="item">item</div>
+ </div>
+ </div>
+ <div class="ui multiple clearable search selection dropdown">
+ <input type="hidden" value="1">
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ {{svg "octicon-x" 14 "remove icon"}}
+ <div class="default text">clearable search dropdown</div>
+ <div class="menu">
+ <div class="item" data-value="1">item</div>
+ </div>
+ </div>
+ <div class="ui buttons">
+ <button class="ui button">Button with Dropdown</button>
+ <div class="ui dropdown button icon">
+ {{svg "octicon-triangle-down"}}
+ <div class="menu">
+ <div class="item">item</div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div>
+ <div class="ui dropdown mini button">
+ <span class="text">mini dropdown</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ <div class="ui dropdown tiny button">
+ <span class="text">tiny dropdown</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ <div class="ui button dropdown">
+ <span class="text">button dropdown</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ <div class="ui dropdown large button">
+ <span class="text">large dropdown</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ </div>
+
+ <div>
+ <div class="ui dropdown mini compact button">
+ <span class="text">mini compact</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ <div class="ui dropdown tiny compact button">
+ <span class="text">tiny compact</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ <div class="ui button compact dropdown">
+ <span class="text">button compact</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ <div class="ui dropdown large compact button">
+ <span class="text">large compact</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ </div>
+
+ <div>
+ <hr>
+ <div class="ui tiny button">Button align with ...</div>
+ <div class="ui dropdown tiny button">
+ <span class="text">... Dropdown Button</span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </div>
+ </div>
+ </div>
+
+ <div>
+ <h1>Toast</h1>
+ <div>
+ <button class="ui button" id="info-toast">Show Info Toast</button>
+ <button class="ui button" id="warning-toast">Show Warning Toast</button>
+ <button class="ui button" id="error-toast">Show Error Toast</button>
+ </div>
+ </div>
+
+ <div>
+ <h1>ComboMarkdownEditor</h1>
+ <div>ps: no JS code attached, so just a layout</div>
+ {{template "shared/combomarkdowneditor" .}}
+ </div>
+
+ <h1>Tailwind CSS Demo</h1>
+ <div>
+ <button class="{{if true}}tw-bg-red{{end}} tw-p-5 tw-border tw-rounded hover:tw-bg-blue active:tw-bg-yellow">Button</button>
+ </div>
+
+ <script src="{{AssetUrlPrefix}}/js/devtest.js?v={{AssetVersion}}"></script>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/devtest/label.tmpl b/templates/devtest/label.tmpl
new file mode 100644
index 00000000..c4b52a3e
--- /dev/null
+++ b/templates/devtest/label.tmpl
@@ -0,0 +1,27 @@
+{{template "base/head" .}}
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/devtest.css?v={{AssetVersion}}">
+<div class="page-content devtest ui container">
+ <div>
+ <h1>Label</h1>
+ <div class="flex-text-block tw-my-2">
+ <span class="ui label">simple label</span>
+ <span class="ui red label">red label</span>
+ <span class="ui green label">green label</span>
+ </div>
+ <div class="flex-text-block tw-my-2">
+ <span class="ui basic label">basic label</span>
+ <span class="ui basic red label">basic red label</span>
+ <span class="ui basic green label">basic green label</span>
+ </div>
+ <div class="flex-text-block tw-my-2">
+ <span class="ui label">long content must be in a non-flex "gt-ellipsis" element, otherwise it won't get ellipsis. very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span>
+ </div>
+ <div class="flex-text-block tw-my-2">
+ <span class="ui label"><span class="gt-ellipsis">very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span></span>
+ </div>
+ <div class="tw-my-2">
+ <span class="ui label tw-max-w-full"><span class="gt-ellipsis">very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label</span></span>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/devtest/list.tmpl b/templates/devtest/list.tmpl
new file mode 100644
index 00000000..90b1fcc9
--- /dev/null
+++ b/templates/devtest/list.tmpl
@@ -0,0 +1,15 @@
+{{template "base/head" .}}
+
+<ul>
+ {{range .SubNames}}
+ <li><a href="{{AppSubUrl}}/devtest/{{.}}">{{.}}</a></li>
+ {{end}}
+</ul>
+
+<style>
+ul {
+ line-height: 2em;
+}
+</style>
+
+{{template "base/footer" .}}
diff --git a/templates/devtest/tmplerr-sub.tmpl b/templates/devtest/tmplerr-sub.tmpl
new file mode 100644
index 00000000..f7974eb1
--- /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 00000000..dd938c89
--- /dev/null
+++ b/templates/devtest/tmplerr.tmpl
@@ -0,0 +1,12 @@
+{{template "base/head" .}}
+<div class="page-content devtest">
+ <div class="tw-flex">
+ <div class="tw-w-4/5">
+ hello hello hello hello hello hello hello hello hello hello
+ </div>
+ <div class="tw-w-1/5">
+ {{template "devtest/tmplerr-sub" .}}
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}