Gitea-ui-customized : re-adjusted templates as Gitea 1.17.0 break homepage

This commit is contained in:
unknown 2022-08-07 18:57:51 +07:00
parent cadc794f4d
commit e9ac763312
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC
3 changed files with 210 additions and 221 deletions

View File

@ -1,25 +0,0 @@
<footer>
<div class="ui container">
<div class="ui left">
{{if ShowFooterTemplateLoadTime}}{{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>{{end}}
</div>
<div class="ui right links">
{{if .ShowFooterBranding}}
<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea">{{svg "octicon-mark-github"}}<span class="sr-only">GitHub</span></a>
{{end}}
<div class="ui language bottom floating slide up dropdown link item">
{{svg "octicon-globe"}}
<div class="text">{{.LangName}}</div>
<div class="menu language-menu">
{{range .AllLangs}}
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
{{end}}
</div>
</div>
<a href="{{AssetUrlPrefix}}/js/licenses.txt">{{.i18n.Tr "licenses"}}</a>
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
<a target="_blank" rel="noopener noreferrer" href="https://landing.1w1.one">{{.i18n.Tr "website"}}</a>
{{template "custom/extra_links_footer" .}}
</div>
</div>
</footer>

View File

@ -1,8 +1,22 @@
<div class="ui container" id="navbar"> <div class="ui container" id="navbar">
{{$notificationUnreadCount := 0}}
{{if .IsSigned}}
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
{{end}}
<div class="item brand" style="justify-content: space-between;"> <div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}"> <a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}">
<img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg"> <img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.i18n.Tr "logo"}}" aria-hidden="true">
</a> </a>
{{if .IsSigned}}
<a href="{{AppSubUrl}}/notifications" class="tooltip mobile-only" data-content='{{.i18n.Tr "notifications"}}'>
<span class="text black">
<span class="fitted">{{svg "octicon-bell"}}</span>
<span class="ui red label mini{{if not $notificationUnreadCount}} hidden{{end}} notification_count">
{{$notificationUnreadCount}}
</span>
</span>
</a>
{{end}}
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle"> <div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i> <i class="sidebar icon"></i>
</div> </div>
@ -77,7 +91,7 @@
<a class="stopwatch-link df ac" href="{{.ActiveStopwatch.IssueLink}}"> <a class="stopwatch-link df ac" href="{{.ActiveStopwatch.IssueLink}}">
{{svg "octicon-issue-opened"}} {{svg "octicon-issue-opened"}}
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span> <span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
<span class="ui label blue stopwatch-time my-0 mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}"> <span class="ui primary label stopwatch-time my-0 mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}} {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
</span> </span>
</a> </a>
@ -100,12 +114,9 @@
</div> </div>
</div> </div>
<a href="{{AppSubUrl}}/notifications" class="item tooltip" data-content='{{.i18n.Tr "notifications"}}'> <a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile" data-content="{{.i18n.Tr "notifications"}}" aria-label="{{.i18n.Tr "notifications"}}">
<span class="text"> <span class="text">
<span class="fitted">{{svg "octicon-bell"}}</span> <span class="fitted">{{svg "octicon-bell"}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
{{$notificationUnreadCount := 0}}
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count"> <span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
{{$notificationUnreadCount}} {{$notificationUnreadCount}}
</span> </span>
@ -190,6 +201,9 @@
{{svg "octicon-person"}} {{.i18n.Tr "register"}} {{svg "octicon-person"}} {{.i18n.Tr "register"}}
</a> </a>
{{end}} {{end}}
<a class="item active" target="_blank" rel="nofollow" href="https://landing.1w1.one">
Landing Page
</a>
</div><!-- end anonymous right menu --> </div><!-- end anonymous right menu -->
{{end}} {{end}}
</div> </div>

View File

@ -9,7 +9,7 @@
<h1 class="ui icon header title"> <h1 class="ui icon header title">
{{AppName}} {{AppName}}
</h1> </h1>
</div> <h2>{{.locale.Tr "startpage.app_desc"}}</h2>
</div> </div>
</div> </div>
</div> </div>