mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 18:02:28 +02:00
ui: update language stats layout and click behavior (#6700)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6700 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Beowulf <beowulf@beocode.eu> Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
parent
fd285bfc4e
commit
4cc0320ed0
3 changed files with 28 additions and 8 deletions
|
@ -20,7 +20,12 @@
|
|||
{{end}}
|
||||
</div>
|
||||
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
|
||||
<div class="ui segment sub-menu language-stats-details tw-hidden">
|
||||
<a class="ui segment show-panel toggle" id="language-stats-bar" data-panel="#language-stats-legend">
|
||||
{{range .LanguageStats}}
|
||||
<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}} data-tooltip-follow-cursor="horizontal"></div>
|
||||
{{end}}
|
||||
</a>
|
||||
<div class="ui segment sub-menu tw-hidden" id="language-stats-legend">
|
||||
{{range .LanguageStats}}
|
||||
<div class="item">
|
||||
<i class="color-icon" style="background-color: {{.Color}}"></i>
|
||||
|
@ -35,11 +40,6 @@
|
|||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<a class="ui segment language-stats show-panel toggle" data-panel=".repository-summary > .sub-menu">
|
||||
{{range .LanguageStats}}
|
||||
<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}} data-tooltip-follow-cursor="horizontal"></div>
|
||||
{{end}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue