wip: 🚧 upgrading for gitea 1.21.3
This commit is contained in:
1 parent
3bd9cbda12
commit
4a1ddf4bed
43 files changed
+524
-162
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+20
-5
@@ -1,14 +1,29 @@
|
|||||||
<footer class="page-footer" role="group" aria-label="{{.locale.Tr "aria.footer"}}">
|
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
|
||||||
<div class="right-links" role="group" aria-label="{{.locale.Tr "aria.footer.links"}}">
|
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
|
||||||
|
<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
|
||||||
|
{{if (or .ShowFooterVersion .PageIsAdmin)}}
|
||||||
|
{{ctx.Locale.Tr "version"}}:
|
||||||
|
{{if .IsAdmin}}
|
||||||
|
<a href="{{AppSubUrl}}/admin/config">{{AppVer}}</a>
|
||||||
|
{{else}}
|
||||||
|
{{AppVer}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
|
||||||
|
{{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
|
||||||
|
{{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
|
||||||
<div class="ui dropdown upward language">
|
<div class="ui dropdown upward language">
|
||||||
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{.locale.LangName}}</span>
|
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{ctx.Locale.LangName}}</span>
|
||||||
<div class="menu language-menu">
|
<div class="menu language-menu">
|
||||||
{{range .AllLangs}}
|
{{range .AllLangs}}
|
||||||
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq $.locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
|
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq ctx.Locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
|
||||||
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
|
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
|
||||||
{{template "custom/extra_links_footer" .}}
|
{{template "custom/extra_links_footer" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+70
-70
@@ -3,86 +3,86 @@
|
|||||||
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<nav id="navbar" class="ui secondary stackable menu" aria-label="{{.locale.Tr "aria.navbar"}}">
|
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
|
||||||
<div class="item">
|
<div class="navbar-left ui secondary menu">
|
||||||
<!-- the logo -->
|
<!-- the logo -->
|
||||||
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}">
|
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
||||||
<img height="24" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}" aria-hidden="true">
|
<img height="24" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
||||||
<div class="ui secondary menu navbar-mobile-right gt-gap-2">
|
<div class="ui secondary menu item navbar-mobile-right">
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
<a class="item gt-mx-0 gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
<a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="gt-relative">
|
<div class="gt-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button class="item ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
|
<button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- navbar links non-mobile -->
|
||||||
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
|
{{/* No links */}}
|
||||||
|
{{else if .IsSigned}}
|
||||||
|
{{if not .UnitIssuesGlobalDisabled}}
|
||||||
|
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not .UnitPullsGlobalDisabled}}
|
||||||
|
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||||
|
{{if .ShowMilestonesDashboardPage}}
|
||||||
|
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{else if .IsLandingPageOrganizations}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{else}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{template "custom/extra_links" .}}
|
||||||
|
|
||||||
|
{{if not .IsSigned}}
|
||||||
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- navbar links -->
|
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
|
||||||
{{/* No links */}}
|
|
||||||
{{else if .IsSigned}}
|
|
||||||
{{if not .UnitIssuesGlobalDisabled}}
|
|
||||||
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{if not .UnitPullsGlobalDisabled}}
|
|
||||||
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
|
||||||
{{if .ShowMilestonesDashboardPage}}
|
|
||||||
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a>
|
|
||||||
{{else if .IsLandingPageOrganizations}}
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a>
|
|
||||||
{{else}}
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{template "custom/extra_links" .}}
|
|
||||||
|
|
||||||
{{if not .IsSigned}}
|
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.locale.Tr "help"}}</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<!-- the full dropdown menus -->
|
<!-- the full dropdown menus -->
|
||||||
<div class="right menu">
|
<div class="navbar-right ui secondary menu">
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
<div class="ui dropdown jump item" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text gt-df gt-ac">
|
<span class="text gt-df gt-ac">
|
||||||
{{avatar $.Context .SignedUser 24 "gt-mr-2"}}
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
||||||
<span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span>
|
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
{{svg "octicon-sign-out"}}
|
{{svg "octicon-sign-out"}}
|
||||||
{{.locale.Tr "sign_out"}}
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
</a>
|
</a>
|
||||||
</div><!-- end content avatar menu -->
|
</div><!-- end content avatar menu -->
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
{{else if .IsSigned}}
|
{{else if .IsSigned}}
|
||||||
{{if EnableTimetracking}}
|
{{if EnableTimetracking}}
|
||||||
<a class="active-stopwatch-trigger item ui gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{.locale.Tr "active_stopwatch"}}">
|
<a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
||||||
<div class="gt-relative">
|
<div class="gt-relative">
|
||||||
{{svg "octicon-stopwatch"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="header-stopwatch-dot"></span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="mobile-only gt-ml-2">{{.locale.Tr "active_stopwatch"}}</span>
|
<span class="mobile-only gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span>
|
||||||
</a>
|
</a>
|
||||||
<div class="active-stopwatch-popup tippy-target gt-p-3">
|
<div class="active-stopwatch-popup item tippy-target gt-p-3">
|
||||||
<div class="gt-df gt-ac">
|
<div class="gt-df gt-ac">
|
||||||
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
||||||
@@ -91,114 +91,114 @@
|
|||||||
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<form class="stopwatch-commit" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="ui button mini compact basic icon"
|
class="ui button mini compact basic icon"
|
||||||
data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
|
||||||
>{{svg "octicon-square-fill"}}</button>
|
>{{svg "octicon-square-fill"}}</button>
|
||||||
</form>
|
</form>
|
||||||
<form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="ui button mini compact basic icon"
|
class="ui button mini compact basic icon"
|
||||||
data-tooltip-content="{{.locale.Tr "repo.issues.cancel_tracking"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
|
||||||
>{{svg "octicon-trash"}}</button>
|
>{{svg "octicon-trash"}}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<a href="{{AppSubUrl}}/notifications" class="item not-mobile gt-mx-0" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
<a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="gt-relative">
|
<div class="gt-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "create_new"}}">
|
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{svg "octicon-plus"}}
|
{{svg "octicon-plus"}}
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
<span class="mobile-only">{{.locale.Tr "create_new"}}</span>
|
<span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
{{svg "octicon-plus"}} {{.locale.Tr "new_repo"}}
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
</a>
|
</a>
|
||||||
{{if not .DisableMigrations}}
|
{{if not .DisableMigrations}}
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
{{svg "octicon-repo-push"}} {{.locale.Tr "new_migrate"}}
|
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
{{if .SignedUser.CanCreateOrganization}}
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
{{svg "octicon-organization"}} {{.locale.Tr "new_org"}}
|
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div><!-- end content create new menu -->
|
</div><!-- end content create new menu -->
|
||||||
</div><!-- end dropdown menu create new -->
|
</div><!-- end dropdown menu create new -->
|
||||||
|
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text gt-df gt-ac">
|
<span class="text gt-df gt-ac">
|
||||||
{{avatar $.Context .SignedUser 24 "gt-mr-2"}}
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
||||||
<span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span>
|
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}">
|
<a class="item" href="{{.SignedUser.HomeLink}}">
|
||||||
{{svg "octicon-person"}}
|
{{svg "octicon-person"}}
|
||||||
{{.locale.Tr "your_profile"}}
|
{{ctx.Locale.Tr "your_profile"}}
|
||||||
</a>
|
</a>
|
||||||
{{if not .DisableStars}}
|
{{if not .DisableStars}}
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
||||||
{{svg "octicon-star"}}
|
{{svg "octicon-star"}}
|
||||||
{{.locale.Tr "your_starred"}}
|
{{ctx.Locale.Tr "your_starred"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
{{.locale.Tr "notification.subscriptions"}}
|
{{ctx.Locale.Tr "notification.subscriptions"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
||||||
{{svg "octicon-tools"}}
|
{{svg "octicon-tools"}}
|
||||||
{{.locale.Tr "your_settings"}}
|
{{ctx.Locale.Tr "your_settings"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
||||||
{{svg "octicon-question"}}
|
{{svg "octicon-question"}}
|
||||||
{{.locale.Tr "help"}}
|
{{ctx.Locale.Tr "help"}}
|
||||||
</a>
|
</a>
|
||||||
{{if .IsAdmin}}
|
{{if .IsAdmin}}
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
|
||||||
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
||||||
{{svg "octicon-server"}}
|
{{svg "octicon-server"}}
|
||||||
{{.locale.Tr "admin_panel"}}
|
{{ctx.Locale.Tr "admin_panel"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
{{svg "octicon-sign-out"}}
|
{{svg "octicon-sign-out"}}
|
||||||
{{.locale.Tr "sign_out"}}
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
</a>
|
</a>
|
||||||
</div><!-- end content avatar menu -->
|
</div><!-- end content avatar menu -->
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if .ShowRegistrationButton}}
|
{{if .ShowRegistrationButton}}
|
||||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||||
{{svg "octicon-person"}} {{.locale.Tr "register"}}
|
{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
||||||
{{svg "octicon-sign-in"}} {{.locale.Tr "sign_in"}}
|
{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div><!-- end full right menu -->
|
</div><!-- end full right menu -->
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
|
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
|
||||||
<div class="gt-mb-5 gt-px-5">
|
<div class="gt-mb-5 gt-px-5">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}">
|
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.locale.Tr "logo"}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+165
@@ -0,0 +1,165 @@
|
|||||||
|
{{template "base/head" .}}
|
||||||
|
<div role="main" aria-label="{{.Title}}" class="page-content repository file list {{if .IsBlame}}blame{{end}}">
|
||||||
|
{{template "repo/header" .}}
|
||||||
|
<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
|
||||||
|
{{template "base/alert" .}}
|
||||||
|
{{template "repo/code/recently_pushed_new_branches" .}}
|
||||||
|
{{if and (not .HideRepoInfo) (not .IsBlame)}}
|
||||||
|
<div class="ui repo-description gt-word-break">
|
||||||
|
<div id="repo-desc" class="gt-font-16">
|
||||||
|
{{$description := .Repository.DescriptionHTML $.Context}}
|
||||||
|
{{if $description}}<span class="description">{{$description | RenderCodeBlock}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{ctx.Locale.Tr "repo.no_desc"}}</span>{{end}}
|
||||||
|
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||||
|
</div>
|
||||||
|
{{if .RepoSearchEnabled}}
|
||||||
|
<div class="ui repo-search">
|
||||||
|
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui small action input{{if .CodeIndexerUnavailable}} disabled left icon{{end}}"{{if .CodeIndexerUnavailable}} data-tooltip-content="{{ctx.Locale.Tr "repo.search.code_search_unavailable"}}"{{end}}>
|
||||||
|
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{ctx.Locale.Tr "repo.search.search_repo"}}">
|
||||||
|
{{if .CodeIndexerUnavailable}}
|
||||||
|
<i class="icon">{{svg "octicon-alert"}}</i>
|
||||||
|
{{end}}
|
||||||
|
<button class="ui small icon button"{{if .CodeIndexerUnavailable}} disabled{{end}} type="submit">
|
||||||
|
{{svg "octicon-search"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="gt-df gt-ac gt-fw gt-gap-2" id="repo-topics">
|
||||||
|
{{range .Topics}}<a class="ui repo-topic large label topic gt-m-0" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
|
||||||
|
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg gt-font-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
|
||||||
|
<div class="ui form gt-hidden gt-df gt-mt-4" id="topic_edit">
|
||||||
|
<div class="field gt-f1 gt-mr-3">
|
||||||
|
<div class="ui fluid multiple search selection dropdown" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}">
|
||||||
|
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
|
||||||
|
{{range .Topics}}
|
||||||
|
{{/* keey the same layout as Fomantic UI generated labels */}}
|
||||||
|
<a class="ui label transition visible gt-cursor-default gt-dib" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
|
||||||
|
{{end}}
|
||||||
|
<div class="text"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button>
|
||||||
|
<button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{if .Repository.IsArchived}}
|
||||||
|
<div class="ui warning message gt-text-center">
|
||||||
|
{{if .Repository.ArchivedUnix.IsZero}}
|
||||||
|
{{ctx.Locale.Tr "repo.archive.title"}}
|
||||||
|
{{else}}
|
||||||
|
{{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix) | Safe}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{template "repo/sub_menu" .}}
|
||||||
|
<div class="repo-button-row">
|
||||||
|
<div class="gt-df gt-ac gt-fw gt-gap-y-3">
|
||||||
|
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
|
||||||
|
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||||
|
{{$cmpBranch := ""}}
|
||||||
|
{{if ne .Repository.ID .BaseRepo.ID}}
|
||||||
|
{{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}}
|
||||||
|
{{end}}
|
||||||
|
{{$cmpBranch = print $cmpBranch (.BranchName|PathEscapeSegments)}}
|
||||||
|
{{$compareLink := printf "%s/compare/%s...%s" .BaseRepo.Link (.BaseRepo.DefaultBranch|PathEscapeSegments) $cmpBranch}}
|
||||||
|
<a id="new-pull-request" role="button" class="ui compact basic button" href="{{$compareLink}}"
|
||||||
|
data-tooltip-content="{{if .PullRequestCtx.Allowed}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}">
|
||||||
|
{{svg "octicon-git-pull-request"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
<!-- Show go to file and breadcrumbs if not on home page -->
|
||||||
|
{{$n := len .TreeNames}}
|
||||||
|
{{$l := Eval $n "-" 1}}
|
||||||
|
{{if eq $n 0}}
|
||||||
|
<a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button">{{ctx.Locale.Tr "repo.find_file.go_to_file"}}</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}}
|
||||||
|
<button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
|
||||||
|
{{ctx.Locale.Tr "repo.editor.add_file"}}
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
|
<div class="menu">
|
||||||
|
<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{ctx.Locale.Tr "repo.editor.new_file"}}
|
||||||
|
</a>
|
||||||
|
{{if .RepositoryUploadEnabled}}
|
||||||
|
<a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{ctx.Locale.Tr "repo.editor.upload_file"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
<a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{ctx.Locale.Tr "repo.editor.patch"}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if and (eq $n 0) (.Repository.IsTemplate)}}
|
||||||
|
<a role="button" class="ui primary compact button" href="{{AppSubUrl}}/repo/create?template_id={{.Repository.ID}}">
|
||||||
|
{{ctx.Locale.Tr "repo.use_template"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{if ne $n 0}}
|
||||||
|
<span class="breadcrumb repo-path gt-ml-2">
|
||||||
|
<a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a>
|
||||||
|
{{- range $i, $v := .TreeNames -}}
|
||||||
|
<span class="breadcrumb-divider">/</span>
|
||||||
|
{{- if eq $i $l -}}
|
||||||
|
<span class="active section" title="{{$v}}">{{StringUtils.EllipsisString $v 30}}</span>
|
||||||
|
{{- else -}}
|
||||||
|
{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{StringUtils.EllipsisString $v 30}}</a></span>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
</span>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="gt-df gt-ac">
|
||||||
|
<!-- Only show clone panel in repository home page -->
|
||||||
|
{{if eq $n 0}}
|
||||||
|
<div class="ui action tiny input" id="clone-panel">
|
||||||
|
{{template "repo/clone_buttons" .}}
|
||||||
|
<button id="more-btn" class="ui basic small compact jump dropdown icon button" data-tooltip-content="{{ctx.Locale.Tr "repo.more_operations"}}">
|
||||||
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
|
<div class="menu">
|
||||||
|
{{if not $.DisableDownloadSourceArchives}}
|
||||||
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.download_zip"}}</a>
|
||||||
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.download_tar"}}</a>
|
||||||
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.bundle" rel="nofollow">{{svg "octicon-package" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.download_bundle"}}</a>
|
||||||
|
{{if .CitiationExist}}
|
||||||
|
<a class="item" id="cite-repo-button">{{svg "octicon-cross-reference" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.cite_this_repo"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<a class="item js-clone-url-vsc" href="vscode://vscode.git/clone?url={{.CloneButtonOriginLink.HTTPS}}">{{svg "gitea-vscode" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.clone_in_vsc"}}</a>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
{{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}}
|
||||||
|
</div>
|
||||||
|
{{template "repo/cite/cite_modal" .}}
|
||||||
|
{{end}}
|
||||||
|
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}}
|
||||||
|
<a class="ui button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{svg "octicon-history" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.file_history"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{if .IsViewFile}}
|
||||||
|
{{template "repo/view_file" .}}
|
||||||
|
{{else if .IsBlame}}
|
||||||
|
{{template "repo/blame" .}}
|
||||||
|
{{else}}
|
||||||
|
{{template "repo/view_list" .}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
||||||
@@ -1,14 +1,29 @@
|
|||||||
<footer class="page-footer" role="group" aria-label="{{.locale.Tr "aria.footer"}}">
|
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
|
||||||
<div class="right-links" role="group" aria-label="{{.locale.Tr "aria.footer.links"}}">
|
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
|
||||||
|
<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
|
||||||
|
{{if (or .ShowFooterVersion .PageIsAdmin)}}
|
||||||
|
{{ctx.Locale.Tr "version"}}:
|
||||||
|
{{if .IsAdmin}}
|
||||||
|
<a href="{{AppSubUrl}}/admin/config">{{AppVer}}</a>
|
||||||
|
{{else}}
|
||||||
|
{{AppVer}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
|
||||||
|
{{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
|
||||||
|
{{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
|
||||||
<div class="ui dropdown upward language">
|
<div class="ui dropdown upward language">
|
||||||
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{.locale.LangName}}</span>
|
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{ctx.Locale.LangName}}</span>
|
||||||
<div class="menu language-menu">
|
<div class="menu language-menu">
|
||||||
{{range .AllLangs}}
|
{{range .AllLangs}}
|
||||||
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq $.locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
|
<a lang="{{.Lang}}" data-url="{{AppSubUrl}}/?lang={{.Lang}}" class="item {{if eq ctx.Locale.Lang .Lang}}active selected{{end}}">{{.Name}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
|
||||||
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
|
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
|
||||||
{{template "custom/extra_links_footer" .}}
|
{{template "custom/extra_links_footer" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,86 +3,86 @@
|
|||||||
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
{{$notificationUnreadCount = call .NotificationUnreadCount}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<nav id="navbar" class="ui secondary stackable menu" aria-label="{{.locale.Tr "aria.navbar"}}">
|
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
|
||||||
<div class="item">
|
<div class="navbar-left ui secondary menu">
|
||||||
<!-- the logo -->
|
<!-- the logo -->
|
||||||
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}">
|
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
|
||||||
<img height="24" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}" aria-hidden="true">
|
<img height="24" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
|
||||||
<div class="ui secondary menu navbar-mobile-right gt-gap-2">
|
<div class="ui secondary menu item navbar-mobile-right">
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
<a class="item gt-mx-0 gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
<a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="gt-relative">
|
<div class="gt-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<button class="item ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
|
<button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- navbar links non-mobile -->
|
||||||
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
|
{{/* No links */}}
|
||||||
|
{{else if .IsSigned}}
|
||||||
|
{{if not .UnitIssuesGlobalDisabled}}
|
||||||
|
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not .UnitPullsGlobalDisabled}}
|
||||||
|
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||||
|
{{if .ShowMilestonesDashboardPage}}
|
||||||
|
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{else if .IsLandingPageOrganizations}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{else}}
|
||||||
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{template "custom/extra_links" .}}
|
||||||
|
|
||||||
|
{{if not .IsSigned}}
|
||||||
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- navbar links -->
|
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
|
||||||
{{/* No links */}}
|
|
||||||
{{else if .IsSigned}}
|
|
||||||
{{if not .UnitIssuesGlobalDisabled}}
|
|
||||||
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{if not .UnitPullsGlobalDisabled}}
|
|
||||||
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
|
||||||
{{if .ShowMilestonesDashboardPage}}
|
|
||||||
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a>
|
|
||||||
{{else if .IsLandingPageOrganizations}}
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a>
|
|
||||||
{{else}}
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{template "custom/extra_links" .}}
|
|
||||||
|
|
||||||
{{if not .IsSigned}}
|
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.locale.Tr "help"}}</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<!-- the full dropdown menus -->
|
<!-- the full dropdown menus -->
|
||||||
<div class="right menu">
|
<div class="navbar-right ui secondary menu">
|
||||||
{{if and .IsSigned .MustChangePassword}}
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
<div class="ui dropdown jump item" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text gt-df gt-ac">
|
<span class="text gt-df gt-ac">
|
||||||
{{avatar $.Context .SignedUser 24 "gt-mr-2"}}
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
||||||
<span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span>
|
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
{{svg "octicon-sign-out"}}
|
{{svg "octicon-sign-out"}}
|
||||||
{{.locale.Tr "sign_out"}}
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
</a>
|
</a>
|
||||||
</div><!-- end content avatar menu -->
|
</div><!-- end content avatar menu -->
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
{{else if .IsSigned}}
|
{{else if .IsSigned}}
|
||||||
{{if EnableTimetracking}}
|
{{if EnableTimetracking}}
|
||||||
<a class="active-stopwatch-trigger item ui gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{.locale.Tr "active_stopwatch"}}">
|
<a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
|
||||||
<div class="gt-relative">
|
<div class="gt-relative">
|
||||||
{{svg "octicon-stopwatch"}}
|
{{svg "octicon-stopwatch"}}
|
||||||
<span class="header-stopwatch-dot"></span>
|
<span class="header-stopwatch-dot"></span>
|
||||||
</div>
|
</div>
|
||||||
<span class="mobile-only gt-ml-2">{{.locale.Tr "active_stopwatch"}}</span>
|
<span class="mobile-only gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span>
|
||||||
</a>
|
</a>
|
||||||
<div class="active-stopwatch-popup tippy-target gt-p-3">
|
<div class="active-stopwatch-popup item tippy-target gt-p-3">
|
||||||
<div class="gt-df gt-ac">
|
<div class="gt-df gt-ac">
|
||||||
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}">
|
||||||
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
||||||
@@ -91,114 +91,114 @@
|
|||||||
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<form class="stopwatch-commit" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
<form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="ui button mini compact basic icon"
|
class="ui button mini compact basic icon"
|
||||||
data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
|
||||||
>{{svg "octicon-square-fill"}}</button>
|
>{{svg "octicon-square-fill"}}</button>
|
||||||
</form>
|
</form>
|
||||||
<form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="ui button mini compact basic icon"
|
class="ui button mini compact basic icon"
|
||||||
data-tooltip-content="{{.locale.Tr "repo.issues.cancel_tracking"}}"
|
data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
|
||||||
>{{svg "octicon-trash"}}</button>
|
>{{svg "octicon-trash"}}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<a href="{{AppSubUrl}}/notifications" class="item not-mobile gt-mx-0" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
|
<a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}">
|
||||||
<div class="gt-relative">
|
<div class="gt-relative">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "create_new"}}">
|
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{svg "octicon-plus"}}
|
{{svg "octicon-plus"}}
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
<span class="mobile-only">{{.locale.Tr "create_new"}}</span>
|
<span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
{{svg "octicon-plus"}} {{.locale.Tr "new_repo"}}
|
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
|
||||||
</a>
|
</a>
|
||||||
{{if not .DisableMigrations}}
|
{{if not .DisableMigrations}}
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
{{svg "octicon-repo-push"}} {{.locale.Tr "new_migrate"}}
|
{{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
{{if .SignedUser.CanCreateOrganization}}
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
{{svg "octicon-organization"}} {{.locale.Tr "new_org"}}
|
{{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div><!-- end content create new menu -->
|
</div><!-- end content create new menu -->
|
||||||
</div><!-- end dropdown menu create new -->
|
</div><!-- end dropdown menu create new -->
|
||||||
|
|
||||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
|
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
|
||||||
<span class="text gt-df gt-ac">
|
<span class="text gt-df gt-ac">
|
||||||
{{avatar $.Context .SignedUser 24 "gt-mr-2"}}
|
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
|
||||||
<span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span>
|
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
|
||||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu">
|
<div class="menu user-menu">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}">
|
<a class="item" href="{{.SignedUser.HomeLink}}">
|
||||||
{{svg "octicon-person"}}
|
{{svg "octicon-person"}}
|
||||||
{{.locale.Tr "your_profile"}}
|
{{ctx.Locale.Tr "your_profile"}}
|
||||||
</a>
|
</a>
|
||||||
{{if not .DisableStars}}
|
{{if not .DisableStars}}
|
||||||
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
|
||||||
{{svg "octicon-star"}}
|
{{svg "octicon-star"}}
|
||||||
{{.locale.Tr "your_starred"}}
|
{{ctx.Locale.Tr "your_starred"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
|
||||||
{{svg "octicon-bell"}}
|
{{svg "octicon-bell"}}
|
||||||
{{.locale.Tr "notification.subscriptions"}}
|
{{ctx.Locale.Tr "notification.subscriptions"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
|
||||||
{{svg "octicon-tools"}}
|
{{svg "octicon-tools"}}
|
||||||
{{.locale.Tr "your_settings"}}
|
{{ctx.Locale.Tr "your_settings"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
|
||||||
{{svg "octicon-question"}}
|
{{svg "octicon-question"}}
|
||||||
{{.locale.Tr "help"}}
|
{{ctx.Locale.Tr "help"}}
|
||||||
</a>
|
</a>
|
||||||
{{if .IsAdmin}}
|
{{if .IsAdmin}}
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
|
||||||
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
|
||||||
{{svg "octicon-server"}}
|
{{svg "octicon-server"}}
|
||||||
{{.locale.Tr "admin_panel"}}
|
{{ctx.Locale.Tr "admin_panel"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
|
||||||
{{svg "octicon-sign-out"}}
|
{{svg "octicon-sign-out"}}
|
||||||
{{.locale.Tr "sign_out"}}
|
{{ctx.Locale.Tr "sign_out"}}
|
||||||
</a>
|
</a>
|
||||||
</div><!-- end content avatar menu -->
|
</div><!-- end content avatar menu -->
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
{{else}}
|
{{else}}
|
||||||
{{if .ShowRegistrationButton}}
|
{{if .ShowRegistrationButton}}
|
||||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||||
{{svg "octicon-person"}} {{.locale.Tr "register"}}
|
{{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
|
||||||
{{svg "octicon-sign-in"}} {{.locale.Tr "sign_in"}}
|
{{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div><!-- end full right menu -->
|
</div><!-- end full right menu -->
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
|
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
|
||||||
<div class="gt-mb-5 gt-px-5">
|
<div class="gt-mb-5 gt-px-5">
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}">
|
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.locale.Tr "logo"}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
{{template "base/head" .}}
|
||||||
|
<div role="main" aria-label="{{.Title}}" class="page-content repository file list {{if .IsBlame}}blame{{end}}">
|
||||||
|
{{template "repo/header" .}}
|
||||||
|
<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
|
||||||
|
{{template "base/alert" .}}
|
||||||
|
{{template "repo/code/recently_pushed_new_branches" .}}
|
||||||
|
{{if and (not .HideRepoInfo) (not .IsBlame)}}
|
||||||
|
<div class="ui repo-description gt-word-break">
|
||||||
|
<div id="repo-desc" class="gt-font-16">
|
||||||
|
{{$description := .Repository.DescriptionHTML $.Context}}
|
||||||
|
{{if $description}}<span class="description">{{$description | RenderCodeBlock}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{ctx.Locale.Tr "repo.no_desc"}}</span>{{end}}
|
||||||
|
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||||
|
</div>
|
||||||
|
{{if .RepoSearchEnabled}}
|
||||||
|
<div class="ui repo-search">
|
||||||
|
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui small action input{{if .CodeIndexerUnavailable}} disabled left icon{{end}}"{{if .CodeIndexerUnavailable}} data-tooltip-content="{{ctx.Locale.Tr "repo.search.code_search_unavailable"}}"{{end}}>
|
||||||
|
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{ctx.Locale.Tr "repo.search.search_repo"}}">
|
||||||
|
{{if .CodeIndexerUnavailable}}
|
||||||
|
<i class="icon">{{svg "octicon-alert"}}</i>
|
||||||
|
{{end}}
|
||||||
|
<button class="ui small icon button"{{if .CodeIndexerUnavailable}} disabled{{end}} type="submit">
|
||||||
|
{{svg "octicon-search"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="gt-df gt-ac gt-fw gt-gap-2" id="repo-topics">
|
||||||
|
{{range .Topics}}<a class="ui repo-topic large label topic gt-m-0" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
|
||||||
|
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg gt-font-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
|
||||||
|
<div class="ui form gt-hidden gt-df gt-mt-4" id="topic_edit">
|
||||||
|
<div class="field gt-f1 gt-mr-3">
|
||||||
|
<div class="ui fluid multiple search selection dropdown" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}">
|
||||||
|
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
|
||||||
|
{{range .Topics}}
|
||||||
|
{{/* keey the same layout as Fomantic UI generated labels */}}
|
||||||
|
<a class="ui label transition visible gt-cursor-default gt-dib" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
|
||||||
|
{{end}}
|
||||||
|
<div class="text"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button>
|
||||||
|
<button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{if .Repository.IsArchived}}
|
||||||
|
<div class="ui warning message gt-text-center">
|
||||||
|
{{if .Repository.ArchivedUnix.IsZero}}
|
||||||
|
{{ctx.Locale.Tr "repo.archive.title"}}
|
||||||
|
{{else}}
|
||||||
|
{{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix) | Safe}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{template "repo/sub_menu" .}}
|
||||||
|
<div class="repo-button-row">
|
||||||
|
<div class="gt-df gt-ac gt-fw gt-gap-y-3">
|
||||||
|
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
|
||||||
|
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||||
|
{{$cmpBranch := ""}}
|
||||||
|
{{if ne .Repository.ID .BaseRepo.ID}}
|
||||||
|
{{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}}
|
||||||
|
{{end}}
|
||||||
|
{{$cmpBranch = print $cmpBranch (.BranchName|PathEscapeSegments)}}
|
||||||
|
{{$compareLink := printf "%s/compare/%s...%s" .BaseRepo.Link (.BaseRepo.DefaultBranch|PathEscapeSegments) $cmpBranch}}
|
||||||
|
<a id="new-pull-request" role="button" class="ui compact basic button" href="{{$compareLink}}"
|
||||||
|
data-tooltip-content="{{if .PullRequestCtx.Allowed}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}">
|
||||||
|
{{svg "octicon-git-pull-request"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
<!-- Show go to file and breadcrumbs if not on home page -->
|
||||||
|
{{$n := len .TreeNames}}
|
||||||
|
{{$l := Eval $n "-" 1}}
|
||||||
|
{{if eq $n 0}}
|
||||||
|
<a href="{{.Repository.Link}}/find/{{.BranchNameSubURL}}" class="ui compact basic button">{{ctx.Locale.Tr "repo.find_file.go_to_file"}}</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}}
|
||||||
|
<button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
|
||||||
|
{{ctx.Locale.Tr "repo.editor.add_file"}}
|
||||||
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
|
<div class="menu">
|
||||||
|
<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{ctx.Locale.Tr "repo.editor.new_file"}}
|
||||||
|
</a>
|
||||||
|
{{if .RepositoryUploadEnabled}}
|
||||||
|
<a class="item" href="{{.RepoLink}}/_upload/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{ctx.Locale.Tr "repo.editor.upload_file"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
<a class="item" href="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{ctx.Locale.Tr "repo.editor.patch"}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if and (eq $n 0) (.Repository.IsTemplate)}}
|
||||||
|
<a role="button" class="ui primary compact button" href="{{AppSubUrl}}/repo/create?template_id={{.Repository.ID}}">
|
||||||
|
{{ctx.Locale.Tr "repo.use_template"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{if ne $n 0}}
|
||||||
|
<span class="breadcrumb repo-path gt-ml-2">
|
||||||
|
<a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a>
|
||||||
|
{{- range $i, $v := .TreeNames -}}
|
||||||
|
<span class="breadcrumb-divider">/</span>
|
||||||
|
{{- if eq $i $l -}}
|
||||||
|
<span class="active section" title="{{$v}}">{{StringUtils.EllipsisString $v 30}}</span>
|
||||||
|
{{- else -}}
|
||||||
|
{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{StringUtils.EllipsisString $v 30}}</a></span>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
</span>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="gt-df gt-ac">
|
||||||
|
<!-- Only show clone panel in repository home page -->
|
||||||
|
{{if eq $n 0}}
|
||||||
|
<div class="ui action tiny input" id="clone-panel">
|
||||||
|
{{template "repo/clone_buttons" .}}
|
||||||
|
<button id="more-btn" class="ui basic small compact jump dropdown icon button" data-tooltip-content="{{ctx.Locale.Tr "repo.more_operations"}}">
|
||||||
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
|
<div class="menu">
|
||||||
|
{{if not $.DisableDownloadSourceArchives}}
|
||||||
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.download_zip"}}</a>
|
||||||
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.download_tar"}}</a>
|
||||||
|
<a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.RefName}}.bundle" rel="nofollow">{{svg "octicon-package" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.download_bundle"}}</a>
|
||||||
|
{{if .CitiationExist}}
|
||||||
|
<a class="item" id="cite-repo-button">{{svg "octicon-cross-reference" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.cite_this_repo"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<a class="item js-clone-url-vsc" href="vscode://vscode.git/clone?url={{.CloneButtonOriginLink.HTTPS}}">{{svg "gitea-vscode" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.clone_in_vsc"}}</a>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
{{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}}
|
||||||
|
</div>
|
||||||
|
{{template "repo/cite/cite_modal" .}}
|
||||||
|
{{end}}
|
||||||
|
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}}
|
||||||
|
<a class="ui button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">
|
||||||
|
{{svg "octicon-history" 16 "gt-mr-3"}}{{ctx.Locale.Tr "repo.file_history"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{if .IsViewFile}}
|
||||||
|
{{template "repo/view_file" .}}
|
||||||
|
{{else if .IsBlame}}
|
||||||
|
{{template "repo/blame" .}}
|
||||||
|
{{else}}
|
||||||
|
{{template "repo/view_list" .}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
||||||
@@ -4,6 +4,7 @@ import { buildFonts } from './fonts.js';
|
|||||||
import { buildTemplates } from './templates.js';
|
import { buildTemplates } from './templates.js';
|
||||||
import { copyTo } from './copy-to.js';
|
import { copyTo } from './copy-to.js';
|
||||||
import { restartService } from './restart-service.js';
|
import { restartService } from './restart-service.js';
|
||||||
|
import { buildImg } from './img.js';
|
||||||
import { extname } from 'path';
|
import { extname } from 'path';
|
||||||
import browsersync from 'browser-sync';
|
import browsersync from 'browser-sync';
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ export async function deploy(srcPath, distPath, serverPath, serviceName, file =
|
|||||||
try {
|
try {
|
||||||
await buildScss(srcPath, distPath);
|
await buildScss(srcPath, distPath);
|
||||||
await buildFonts(srcPath, distPath);
|
await buildFonts(srcPath, distPath);
|
||||||
|
// await buildImg(srcPath, distPath);
|
||||||
await buildTemplates(srcPath, distPath);
|
await buildTemplates(srcPath, distPath);
|
||||||
await copyTo(distPath, serverPath);
|
await copyTo(distPath, serverPath);
|
||||||
shouldRestart && await restartService(serviceName);
|
shouldRestart && await restartService(serviceName);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Logger } from '../utils/logger.js';
|
|||||||
|
|
||||||
const logger = new Logger(buildFonts.name, 'info', 'brightCyan');
|
const logger = new Logger(buildFonts.name, 'info', 'brightCyan');
|
||||||
const imgSrc = 'themes/fonts';
|
const imgSrc = 'themes/fonts';
|
||||||
const imgDest = '/public/fonts';
|
const imgDest = '/public/assets/fonts';
|
||||||
|
|
||||||
export async function buildFonts(srcHome, distHome) {
|
export async function buildFonts(srcHome, distHome) {
|
||||||
logger.info('Fonts build has started');
|
logger.info('Fonts build has started');
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import { mkdirSync, copyFileSync } from 'fs';
|
|||||||
|
|
||||||
const logger = new Logger(buildImg.name, 'info', 'brightGreen');
|
const logger = new Logger(buildImg.name, 'info', 'brightGreen');
|
||||||
const imgSrc = 'themes/img';
|
const imgSrc = 'themes/img';
|
||||||
const imgDest = '/public/img';
|
const imgDest = '/public/assets/img';
|
||||||
|
|
||||||
export async function buildImg(srcHome, distHome) {
|
export async function buildImg(srcHome, distHome) {
|
||||||
logger.info('Images build has started');
|
logger.info('Images build has started');
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import { compile } from 'sass';
|
|||||||
const logger = new Logger(buildScss.name, 'debug', 'pink');
|
const logger = new Logger(buildScss.name, 'debug', 'pink');
|
||||||
const themesSrc = 'themes/scss';
|
const themesSrc = 'themes/scss';
|
||||||
const baseStylesSrc = 'styles';
|
const baseStylesSrc = 'styles';
|
||||||
const cssDistPath = '/public/css';
|
const cssDistPath = '/public/assets/css';
|
||||||
|
|
||||||
async function buildThemes(srcPath, distPath) {
|
async function buildThemes(srcPath, distPath) {
|
||||||
const themes = getScssFiles(srcPath, themesSrc);
|
const themes = getScssFiles(srcPath, themesSrc);
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import { copyFolderRecursiveSync } from '../utils/funcs.js';
|
|||||||
import { Logger } from '../utils/logger.js';
|
import { Logger } from '../utils/logger.js';
|
||||||
|
|
||||||
const logger = new Logger(buildTemplates.name, 'info', 'blue');
|
const logger = new Logger(buildTemplates.name, 'info', 'blue');
|
||||||
const imgSrc = 'templates';
|
const tmplSrc = 'templates';
|
||||||
const imgDest = '/';
|
const tmplDest = '/';
|
||||||
|
|
||||||
export async function buildTemplates(srcHome, distHome) {
|
export async function buildTemplates(srcHome, distHome) {
|
||||||
logger.info('Fonts build has started');
|
logger.info('Templates build has started');
|
||||||
const tmplSrcPath = join(srcHome, imgSrc);
|
const tmplSrcPath = join(srcHome, tmplSrc);
|
||||||
const tmplDestPath = join(distHome, imgDest);
|
const tmplDestPath = join(distHome, tmplDest);
|
||||||
|
|
||||||
// just copy the entire tmplSrcPath to tmplDestPath
|
// just copy the entire tmplSrcPath to tmplDestPath
|
||||||
copyFolderRecursiveSync(tmplSrcPath, tmplDestPath);
|
copyFolderRecursiveSync(tmplSrcPath, tmplDestPath);
|
||||||
|
|||||||
Reference in new issue
Block a user