|
14 | 14 | {{end}}
|
15 | 15 | </h2>
|
16 | 16 | <ul id="release-list">
|
17 |
| - {{range $release := .Releases}} |
| 17 | + {{range $idx, $release := .Releases}} |
18 | 18 | <li class="ui grid">
|
19 | 19 | <div class="ui four wide column meta">
|
20 | 20 | {{if .IsTag}}
|
|
71 | 71 | {{Str2html .Note}}
|
72 | 72 | </div>
|
73 | 73 | <div class="download">
|
74 |
| - <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2> |
75 |
| - <ul class="list"> |
76 |
| - {{if $.Permission.CanRead $.UnitTypeCode}} |
77 |
| - <li> |
78 |
| - <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16}} {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a> |
79 |
| - </li> |
80 |
| - <li> |
81 |
| - <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong>{{svg "octicon-file-zip" 16}} {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a> |
82 |
| - </li> |
83 |
| - {{end}} |
84 |
| - {{if .Attachments}} |
85 |
| - {{range .Attachments}} |
86 |
| - <li> |
87 |
| - <span class="ui text right" data-tooltip="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}" data-position="bottom right">{{svg "octicon-info" 16}}</span> |
88 |
| - <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> |
89 |
| - <strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16}}</span> {{.Name}}</strong> |
90 |
| - <span class="ui text grey right">{{.Size | FileSize}}</span> |
91 |
| - </a> |
92 |
| - </li> |
93 |
| - {{end}} |
94 |
| - {{end}} |
95 |
| - </ul> |
| 74 | + <div class="ui accordion"> |
| 75 | + <h2 class="title {{if eq $idx 0}}active{{end}}"> |
| 76 | + <i class="dropdown icon"></i> |
| 77 | + {{$.i18n.Tr "repo.release.downloads"}} |
| 78 | + </h2> |
| 79 | + <div class="content {{if eq $idx 0}}active{{end}}"> |
| 80 | + <ul class="list"> |
| 81 | + {{if $.Permission.CanRead $.UnitTypeCode}} |
| 82 | + <li> |
| 83 | + <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16}} {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a> |
| 84 | + </li> |
| 85 | + <li> |
| 86 | + <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong>{{svg "octicon-file-zip" 16}} {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a> |
| 87 | + </li> |
| 88 | + {{end}} |
| 89 | + {{if .Attachments}} |
| 90 | + {{range .Attachments}} |
| 91 | + <li> |
| 92 | + <span class="ui text right" data-tooltip="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}" data-position="bottom right">{{svg "octicon-info" 16}}</span> |
| 93 | + <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> |
| 94 | + <strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16}}</span> {{.Name}}</strong> |
| 95 | + <span class="ui text grey right">{{.Size | FileSize}}</span> |
| 96 | + </a> |
| 97 | + </li> |
| 98 | + {{end}} |
| 99 | + {{end}} |
| 100 | + </ul> |
| 101 | + </div> |
| 102 | + </div> |
96 | 103 | </div>
|
97 | 104 | {{end}}
|
98 | 105 | <span class="dot"> </span>
|
|
0 commit comments