mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-16 09:53:24 +09:00
refactor(templates): update djlint to 1.46.0 and resolve its new findings (#39231)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<label><input name="style" type="radio" value="{{$style}}" {{Iif (eq $.SelectedStyle $style) "checked"}}>{{$style}}</label>
|
||||
{{end}}
|
||||
</div>
|
||||
<button>submit</button>
|
||||
<button type="submit">submit</button>
|
||||
</form>
|
||||
<div class="flex-text-block tw-flex-wrap">
|
||||
{{range $badgeSVG := .BadgeSVGs}}
|
||||
|
||||
@@ -7,26 +7,26 @@
|
||||
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>
|
||||
<button class="ui button link-action" data-url="fetch-action-test?k=1" data-modal-confirm-header="confirm header" data-modal-confirm-content="confirm content">test with confirm header</button>
|
||||
<button type="button" class="link-action" data-url="fetch-action-test?k=1">test action</button>
|
||||
<button type="button" class="link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with confirm</button>
|
||||
<button type="button" class="ui red button link-action" data-url="fetch-action-test?k=1" data-modal-confirm="confirm?">test with risky confirm</button>
|
||||
<button type="button" class="ui button link-action" data-url="fetch-action-test?k=1" data-modal-confirm-header="confirm header" data-modal-confirm-content="confirm content">test with confirm header</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h1>form-fetch-action</h1>
|
||||
<div class="flex-relaxed-list fetch-action-demo-forms">
|
||||
<form method="get" action="./fetch-action-test?k=1" class="form-fetch-action">
|
||||
<button name="btn">submit get</button>
|
||||
<button type="submit" 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"></textarea></div>
|
||||
<div><label><input name="check" type="checkbox"> check</label></div>
|
||||
<div><button name="btn">submit post</button></div>
|
||||
<div><button type="submit" 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>
|
||||
<div><button type="submit" name="btn">submit test</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-trailing">
|
||||
<button class="ui tiny red button">
|
||||
<button type="button" class="ui tiny red button">
|
||||
{{svg "octicon-alert" 14}} CJK文本测试
|
||||
</button>
|
||||
<button class="ui tiny primary button">
|
||||
<button type="button" class="ui tiny primary button">
|
||||
{{svg "octicon-info" 14}} Button
|
||||
</button>
|
||||
<button class="ui tiny primary button">
|
||||
<button type="button" class="ui tiny primary button">
|
||||
Button with long text
|
||||
</button>
|
||||
</div>
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-trailing">
|
||||
<button class="ui tiny red button">
|
||||
<button type="button" class="ui tiny red button">
|
||||
{{svg "octicon-alert" 12}} CJK文本测试 <!-- single CJK text test, it shouldn't be horizontal -->
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui buttons">
|
||||
<button class="ui button">Button with Dropdown</button>
|
||||
<button type="button" class="ui button">Button with Dropdown</button>
|
||||
<div class="ui dropdown button icon">
|
||||
{{svg "octicon-triangle-down"}}
|
||||
<div class="menu">
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<button class="show-modal" data-modal="#test-modal-fill-values"
|
||||
<button type="button" class="show-modal" data-modal="#test-modal-fill-values"
|
||||
data-modal-fill-by-id="value for id"
|
||||
data-modal-fill-by-name="value for name"
|
||||
data-modal-fill-by-class="value for class"
|
||||
|
||||
@@ -24,24 +24,24 @@
|
||||
<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 type="button" class="ui button">Unclassed</button>
|
||||
<button type="button" class="ui basic button">Basic Unclassed</button>
|
||||
<button type="button" class="ui primary button">Primary</button>
|
||||
<button type="button" class="ui basic primary button">Basic Primary</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 green button">Green</button>
|
||||
<button class="ui basic green button">Basic Green</button>
|
||||
<button type="button" class="ui red button">Red</button>
|
||||
<button type="button" class="ui basic red button">Basic Red</button>
|
||||
<button type="button" class="ui green button">Green</button>
|
||||
<button type="button" class="ui basic green button">Basic Green</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>
|
||||
<button type="button" class="btn tw-p-2">Plain button</button>
|
||||
<button type="button" class="btn interact-fg tw-p-2">Plain button with interact fg</button>
|
||||
<button type="button" class="btn interact-bg tw-p-2">Plain button with interact bg</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
<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 class="ui buttons"><button type="button" class="ui button">1</button><button type="button" class="ui button">2</button><button type="button" class="ui button">3</button></div>
|
||||
<div class="ui buttons"><button type="button" class="ui button active">1</button><button type="button" class="ui button">2</button><button type="button" class="ui button">3</button></div>
|
||||
<div class="ui buttons"><button type="button" class="ui button">1</button><button type="button" class="ui button active">2</button><button type="button" class="ui button">3</button></div>
|
||||
<div class="ui buttons"><button type="button" class="ui button">1</button><button type="button" class="ui button">2</button><button type="button" class="ui button active">3</button></div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -128,12 +128,12 @@
|
||||
|
||||
<h2>Button with SVG</h2>
|
||||
<div>
|
||||
<button class="ui red button">{{svg "octicon-alert" 24}} {{svg "octicon-x" 24}} text</button>
|
||||
<button type="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>
|
||||
<button type="button" class="ui basic button">labeled button</button>
|
||||
<a class="ui basic label">123</a>
|
||||
</div>
|
||||
<button class="ui button">{{svg "octicon-x" 16}} button with very very very very very very very very long text</button>
|
||||
<button type="button" class="ui button">{{svg "octicon-x" 16}} button with very very very very very very very very long text</button>
|
||||
</div>
|
||||
|
||||
<h2>Input with SVG</h2>
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
<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>
|
||||
<button type="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>
|
||||
</div>
|
||||
{{template "devtest/devtest-footer"}}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<input class="ui input" placeholder="Press T to focus">
|
||||
<kbd data-global-init="onGlobalShortcut" data-shortcut-keys="t">T</kbd>
|
||||
</div>
|
||||
<button class="ui button">Go</button>
|
||||
<button type="button" class="ui button">Go</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<div class="ui container">
|
||||
<h1>Toast</h1>
|
||||
<div>
|
||||
<button class="ui button toast-test-button" data-toast-level="success" data-toast-message="test success">Show Success Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="info" data-toast-message="test info">Show Info Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="warning" data-toast-message="test warning">Show Warning Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="error" data-toast-message="test error">Show Error Toast</button>
|
||||
<button class="ui button toast-test-button" data-toast-level="error" data-toast-message="very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong message">Show Error Toast (long)</button>
|
||||
<button class="ui button toast-test-button-pre">Show Error (with pre)</button>
|
||||
<button type="button" class="ui button toast-test-button" data-toast-level="success" data-toast-message="test success">Show Success Toast</button>
|
||||
<button type="button" class="ui button toast-test-button" data-toast-level="info" data-toast-message="test info">Show Info Toast</button>
|
||||
<button type="button" class="ui button toast-test-button" data-toast-level="warning" data-toast-message="test warning">Show Warning Toast</button>
|
||||
<button type="button" class="ui button toast-test-button" data-toast-level="error" data-toast-message="test error">Show Error Toast</button>
|
||||
<button type="button" class="ui button toast-test-button" data-toast-level="error" data-toast-message="very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong message">Show Error Toast (long)</button>
|
||||
<button type="button" class="ui button toast-test-button-pre">Show Error (with pre)</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user