diff options
author | silverwind <me@silverwind.io> | 2021-05-23 02:45:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-23 08:45:39 +0800 |
commit | b4d10598c9be1ba8008c5a47ef1cd3612e99331a (patch) | |
tree | 6740ce6a49eed31d91d66dd8a18b481c3abe12a2 /templates/repo | |
parent | 308b562b3c0440e800dc63b0ef2eb6777a1e0026 (diff) | |
download | gitea-b4d10598c9be1ba8008c5a47ef1cd3612e99331a.tar.gz gitea-b4d10598c9be1ba8008c5a47ef1cd3612e99331a.zip |
Remove fomantic accordion module (#15951)
Replace it with native <detail> element. Did some slight restyling on
the release downloads, new behaviour should be exactly the same
otherwise.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/release/list.tmpl | 55 | ||||
-rw-r--r-- | templates/repo/settings/options.tmpl | 13 |
2 files changed, 32 insertions, 36 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index d98e441644..f9bc0ebb02 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -139,39 +139,36 @@ <div class="markup desc"> {{Str2html .Note}} </div> - <div class="ui accordion download"> - <h2 class="title {{if eq $idx 0}}active{{end}} df ac mb-0"> - {{svg "octicon-triangle-right" 14 "dropdown icon"}} + <details class="download border-secondary-top mt-4 pt-4" {{if eq $idx 0}}open{{end}}> + <summary class="mb-4"> {{$.i18n.Tr "repo.release.downloads"}} - </h2> - <div class="content {{if eq $idx 0}}active{{end}}"> - <ul class="list"> - {{if and (not .IsDraft) ($.Permission.CanRead $.UnitTypeCode)}} - <li> - <a class="archive-link" data-url="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a> - </li> + </summary> + <ul class="list"> + {{if and (not .IsDraft) ($.Permission.CanRead $.UnitTypeCode)}} + <li> + <a class="archive-link" data-url="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a> + </li> + <li> + <a class="archive-link" data-url="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a> + </li> + {{end}} + {{if .Attachments}} + {{range .Attachments}} <li> - <a class="archive-link" data-url="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a> - </li> - {{end}} - {{if .Attachments}} - {{range .Attachments}} - <li> - <span class="ui text middle aligned right"> - <span class="ui text grey">{{.Size | FileSize}}</span> - <span class="poping up" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> - {{svg "octicon-info"}} - </span> + <span class="ui text middle aligned right"> + <span class="ui text grey">{{.Size | FileSize}}</span> + <span class="poping up" data-content="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> + {{svg "octicon-info"}} </span> - <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> - <strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16 "mr-2"}}</span>{{.Name}}</strong> - </a> - </li> - {{end}} + </span> + <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> + <strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16 "mr-2"}}</span>{{.Name}}</strong> + </a> + </li> {{end}} - </ul> - </div> - </div> + {{end}} + </ul> + </details> {{end}} <span class="dot"> </span> </div> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 012bff317d..fb4b65dbad 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -94,12 +94,11 @@ <input id="mirror_address" name="mirror_address" value="{{MirrorFullAddress .Mirror}}" required> <p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p> </div> - <div class="ui accordion optional field"> - <label class="ui title {{if .Err_Auth}}text red active{{end}}"> - <i class="icon dropdown"></i> - <label for="">{{.i18n.Tr "repo.need_auth"}}</label> - </label> - <div class="content {{if .Err_Auth}}active{{else if (MirrorUserName .Mirror)}}active{{end}}"> + <details class="ui optional field" {{if .Err_Auth}}open{{else if (MirrorUserName .Mirror)}}open{{end}}> + <summary class="p-2"> + {{.i18n.Tr "repo.need_auth"}} + </summary> + <div class="p-2"> <div class="inline field {{if .Err_Auth}}error{{end}}"> <label for="mirror_username">{{.i18n.Tr "username"}}</label> <input id="mirror_username" name="mirror_username" value="{{MirrorUserName .Mirror}}" {{if not .mirror_username}}data-need-clear="true"{{end}}> @@ -110,7 +109,7 @@ <input id="mirror_password" name="mirror_password" type="password" value="{{MirrorPassword .Mirror}}" {{if not .mirror_password}}data-need-clear="true"{{end}} autocomplete="off"> </div> </div> - </div> + </details> {{if .LFSStartServer}} <div class="inline field"> |