Compare commits

...

9 Commits

13 changed files with 86 additions and 510 deletions

View File

@ -1,70 +1,67 @@
<nav class="ui container" id="navbar" aria-label="{{.locale.Tr "aria.navbar"}}"> {{$notificationUnreadCount := 0}}
{{$notificationUnreadCount := 0}} {{if and .IsSigned .NotificationUnreadCount}}
{{if .IsSigned}} {{$notificationUnreadCount = call .NotificationUnreadCount}}
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}} {{end}}
{{end}}
<div class="item brand gt-sb"> <nav id="navbar" class="ui secondary stackable menu" aria-label="{{.locale.Tr "aria.navbar"}}">
<div class="item">
<!-- the logo -->
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}"> <a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}">
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/gitea-sm.png" alt="{{.locale.Tr "logo"}}" aria-hidden="true"> <img width="30" height="30" src="{{AssetUrlPrefix}}/img/gitea-sm.png" alt="{{.locale.Tr "logo"}}" aria-hidden="true">
</a> </a>
<div class="gt-df gt-ac">
<!-- 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">
{{if .IsSigned}} {{if .IsSigned}}
<a href="{{AppSubUrl}}/notifications" class="tooltip mobile-only gt-mr-4 gt-mt-3" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> <a class="item gt-mx-0 gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
<span class="fitted item"> <div class="gt-relative">
{{svg "octicon-bell"}} {{svg "octicon-bell"}}
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}"> <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
{{$notificationUnreadCount}} </div>
</span>
</span>
</a> </a>
{{end}} {{end}}
<button class="ui icon button mobile-only" id="navbar-expand-toggle"> <button class="item ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button>
{{svg "octicon-three-bars"}}
</button>
</div> </div>
</div> </div>
<!-- navbar links -->
{{if and .IsSigned .MustChangePassword}} {{if and .IsSigned .MustChangePassword}}
{{/* No links */}} {{/* No links */}}
{{else if .IsSigned}} {{else if .IsSigned}}
{{if not .UnitIssuesGlobalDisabled}} {{if not .UnitIssuesGlobalDisabled}}
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a> <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a>
{{end}} {{end}}
{{if not .UnitPullsGlobalDisabled}} {{if not .UnitPullsGlobalDisabled}}
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a> <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a>
{{end}} {{end}}
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a>{{end}} {{if .ShowMilestonesDashboardPage}}
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a>
{{end}}
{{end}} {{end}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a>
{{else if .IsLandingPageOrganizations}} {{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a>
{{else}} {{else}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a>
{{end}} {{end}}
{{template "custom/extra_links" .}} {{template "custom/extra_links" .}}
{{/* TODO {{if not .IsSigned}}
<div class="item"> <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.locale.Tr "help"}}</a>
<div class="ui icon input"> {{end}}
<input class="searchbox" type="text" placeholder="{{.locale.Tr "search_project"}}">
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
</div>
</div>
*/}}
<!-- the full dropdown menus -->
{{if and .IsSigned .MustChangePassword}} <div class="right menu">
<div class="right stackable menu"> {{if and .IsSigned .MustChangePassword}}
<div class="ui dropdown jump item tooltip" tabindex="-1" data-content="{{.locale.Tr "user_profile_and_more"}}"> <div class="ui dropdown jump item" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
<span class="text"> <span class="text gt-df gt-ac">
{{avatar $.Context .SignedUser 24 "tiny"}} {{avatar $.Context .SignedUser 24 "gt-mr-2"}}
<span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span> <span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span> <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
</span> </span>
<div class="menu user-menu" tabindex="-1"> <div class="menu user-menu">
<div class="ui header"> <div class="ui header">
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> {{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div> </div>
@ -72,22 +69,20 @@
<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" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out"}} {{svg "octicon-sign-out"}}
{{.locale.Tr "sign_out"}}<!-- Sign Out --> {{.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 -->
</div> {{else if .IsSigned}}
{{else if .IsSigned}}
<div class="right stackable menu">
{{if EnableTimetracking}} {{if EnableTimetracking}}
<a class="active-stopwatch-trigger item ui gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}"> <a class="active-stopwatch-trigger item ui gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{.locale.Tr "active_stopwatch"}}">
<span class="fitted gt-relative"> <div class="gt-relative">
{{svg "octicon-stopwatch"}} {{svg "octicon-stopwatch"}}
<span class="header-stopwatch-dot"></span> <span class="header-stopwatch-dot"></span>
<span class="sr-mobile-only">{{.locale.Tr "active_stopwatch"}}</span> </div>
</span> <span class="mobile-only gt-ml-2">{{.locale.Tr "active_stopwatch"}}</span>
</a> </a>
<div class="active-stopwatch-popup tippy-target"> <div class="active-stopwatch-popup 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"}}
@ -100,64 +95,59 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button <button
type="submit" type="submit"
class="ui button mini compact basic icon fitted tooltip" class="ui button mini compact basic icon"
data-content="{{.locale.Tr "repo.issues.stop_tracking"}}" data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}"
data-position="top right"
>{{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 fitted tooltip" class="ui button mini compact basic icon"
data-content="{{.locale.Tr "repo.issues.cancel_tracking"}}" data-tooltip-content="{{.locale.Tr "repo.issues.cancel_tracking"}}"
data-position="top right"
>{{svg "octicon-trash"}}</button> >{{svg "octicon-trash"}}</button>
</form> </form>
</div> </div>
</div> </div>
{{end}} {{end}}
<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile gt-mx-0" data-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> <a href="{{AppSubUrl}}/notifications" class="item not-mobile gt-mx-0" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
<span class="fitted item"> <div class="gt-relative">
{{svg "octicon-bell"}} {{svg "octicon-bell"}}
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}"> <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
{{$notificationUnreadCount}} </div>
</span>
</span>
</a> </a>
<div class="ui dropdown jump item tooltip gt-mx-0" data-content="{{.locale.Tr "create_new"}}"> <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "create_new"}}">
<span class="text"> <span class="text">
<span class="fitted">{{svg "octicon-plus"}}</span> {{svg "octicon-plus"}}
<span class="sr-mobile-only">{{.locale.Tr "create_new"}}</span> <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
<span class="fitted not-mobile">{{svg "octicon-triangle-down"}}</span> <span class="mobile-only">{{.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">
<span class="fitted">{{svg "octicon-plus"}}</span> {{.locale.Tr "new_repo"}} {{svg "octicon-plus"}} {{.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">
<span class="fitted">{{svg "octicon-repo-push"}}</span> {{.locale.Tr "new_migrate"}} {{svg "octicon-repo-push"}} {{.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">
<span class="fitted">{{svg "octicon-organization"}}</span> {{.locale.Tr "new_org"}} {{svg "octicon-organization"}} {{.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 tooltip gt-mx-0" data-content="{{.locale.Tr "user_profile_and_more"}}"> <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}">
<span class="text"> <span class="text gt-df gt-ac">
{{avatar $.Context .SignedUser 24 "tiny"}} {{avatar $.Context .SignedUser 24 "gt-mr-2"}}
<span class="sr-only">{{.locale.Tr "user_profile_and_more"}}</span> <span class="mobile-only gt-ml-2">{{.SignedUser.Name}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span> <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
</span> </span>
<div class="menu user-menu" tabindex="-1"> <div class="menu user-menu">
<div class="ui header"> <div class="ui header">
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> {{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div> </div>
@ -165,7 +155,7 @@
<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"}}<!-- Your profile --> {{.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">
@ -175,15 +165,15 @@
{{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"}}<!-- Subscriptions --> {{.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"}}<!-- Your settings --> {{.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.io">
{{svg "octicon-question"}} {{svg "octicon-question"}}
{{.locale.Tr "help"}}<!-- Help --> {{.locale.Tr "help"}}
</a> </a>
{{if .IsAdmin}} {{if .IsAdmin}}
<div class="divider"></div> <div class="divider"></div>
@ -201,10 +191,7 @@
</a> </a>
</div><!-- end content avatar menu --> </div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu --> </div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu --> {{else}}
{{else}}
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.locale.Tr "help"}}</a>
<div class="right stackable menu">
{{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"}} {{.locale.Tr "register"}}
@ -213,6 +200,6 @@
<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"}} {{.locale.Tr "sign_in"}}
</a> </a>
</div><!-- end anonymous user right menu --> {{end}}
{{end}} </div><!-- end full right menu -->
</nav> </nav>

View File

@ -1,202 +0,0 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/">
<img class="ui mini image" with="30" height="30" src="{{StaticUrlPrefix}}/img/logo.svg">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
{{if and .IsSigned .MustChangePassword}}
{{/* No links */}}
{{else if .IsSigned}}
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
{{if not .UnitIssuesGlobalDisabled}}
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
{{end}}
{{if not .UnitPullsGlobalDisabled}}
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
{{end}}
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
{{end}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{else if .IsLandingPageHome}}
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{else if .IsLandingPageExplore}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
{{end}}
{{template "custom/extra_links" .}}
{{/*
<div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
</div>
</div>
*/}}
{{if and .IsSigned .MustChangePassword}}
<div class="right stackable menu">
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
{{avatar .SignedUser 24 "tiny"}}
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
</span>
<div class="menu user-menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div>
<div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out"}}
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div>
{{else if .IsSigned}}
<div class="right stackable menu">
{{$issueURL := Printf "%s/%s/issues/%d" AppSubUrl .ActiveStopwatch.RepoSlug .ActiveStopwatch.IssueIndex}}
<a class="active-stopwatch-trigger item ui label {{if not .ActiveStopwatch}}hidden{{end}}" href="{{$issueURL}}">
<span class="text">
<span class="fitted item">
{{svg "octicon-stopwatch"}}
<span class="red" style="position:absolute; right:-0.6em; top:-0.6em;">{{svg "octicon-dot-fill"}}</span>
</span>
<span class="sr-mobile-only">{{.i18n.Tr "active_stopwatch"}}</span>
</span>
</a>
<div class="ui popup very wide">
<div class="df ac">
<a class="stopwatch-link df ac" href="{{$issueURL}}">
{{svg "octicon-issue-opened"}}
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span>
<span class="ui label blue stopwatch-time my-0 mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}">
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
</span>
</a>
<form class="stopwatch-commit" method="POST" action="{{$issueURL}}/times/stopwatch/toggle">
{{.CsrfTokenHtml}}
<button
class="ui button mini compact basic icon fitted poping up"
data-content="{{.i18n.Tr "repo.issues.stop_tracking"}}"
data-position="top right" data-variation="small inverted"
>{{svg "octicon-square-fill"}}</button>
</form>
<form class="stopwatch-cancel" method="POST" action="{{$issueURL}}/times/stopwatch/cancel">
{{.CsrfTokenHtml}}
<button
class="ui button mini compact basic icon fitted poping up"
data-content="{{.i18n.Tr "repo.issues.cancel_tracking"}}"
data-position="top right" data-variation="small inverted"
>{{svg "octicon-trashcan"}}</button>
</form>
</div>
</div>
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<span class="text">
<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">
{{$notificationUnreadCount}}
</span>
</span>
</a>
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<span class="text">
<span class="fitted">{{svg "octicon-plus"}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
<span class="fitted not-mobile">{{svg "octicon-triangle-down"}}</span>
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
<span class="fitted">{{svg "octicon-plus"}}</span> {{.i18n.Tr "new_repo"}}
</a>
{{if not .DisableMigrations}}
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<span class="fitted">{{svg "octicon-repo-push"}}</span> {{.i18n.Tr "new_migrate"}}
</a>
{{end}}
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
<span class="fitted">{{svg "octicon-organization"}}</span> {{.i18n.Tr "new_org"}}
</a>
{{end}}
</div><!-- end content create new menu -->
</div><!-- end dropdown menu create new -->
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
{{avatar .SignedUser 24 "tiny"}}
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down"}}</span>
</span>
<div class="menu user-menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div>
<div class="divider"></div>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
{{svg "octicon-person"}}
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
</a>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
{{svg "octicon-star"}}
{{.i18n.Tr "your_starred"}}
</a>
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
{{svg "octicon-tools"}}
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
{{svg "octicon-question"}}
{{.i18n.Tr "help"}}<!-- Help -->
</a>
{{if .IsAdmin}}
<div class="divider"></div>
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
{{svg "octicon-server"}}
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
</a>
{{end}}
<div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out"}}
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu -->
{{else}}
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
{{svg "octicon-person"}} {{.i18n.Tr "register"}}
</a>
{{end}}
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.CurrentURL}}">
{{svg "octicon-sign-in"}} {{.i18n.Tr "sign_in"}}
</a>
</div><!-- end anonymous right menu -->
{{end}}
</div>

View File

@ -5,12 +5,10 @@
.hero {font-weight: bold !important;} .hero {font-weight: bold !important;}
.full.height {padding-bottom : 10px !important; } .full.height {padding-bottom : 10px !important; }
</style> </style>
<div class="page-content home"> <div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
<div class="ui stackable middle very relaxed page grid"> <div class="gt-mb-5 gt-px-5">
<div class="sixteen wide center aligned centered column"> <div class="center">
<div> <img class="logo" width="220" height="136" src="{{StaticUrlPrefix}}/logo-forgechaprilorg.png" alt="{{.locale.Tr "logo"}}"/>
<img class="logo" width="220" height="136" src="{{AssetUrlPrefix}}/logo-forgechaprilorg.png"/>
</div>
<div class="hero"> <div class="hero">
<h1 class="ui icon header title"> <h1 class="ui icon header title">
{{AppName}} {{AppName}}

View File

@ -1,53 +0,0 @@
{{template "base/head" .}}
<div class="home">
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" src="{{StaticUrlPrefix}}/img/gitea-lg.png" />
</div>
<div class="hero">
<h1 class="ui icon header title">
{{AppName}}
</h1>
<h2>{{.i18n.Tr "startpage.app_desc"}}</h2>
</div>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame" 16}} {{.i18n.Tr "startpage.install"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.install_desc" | Str2html}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-device-desktop" 16}} {{.i18n.Tr "startpage.platform"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.platform_desc" | Str2html}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket" 16}} {{.i18n.Tr "startpage.lightweight"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.lightweight_desc" | Str2html}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code" 16}} {{.i18n.Tr "startpage.license"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.license_desc" | Str2html}}
</p>
</div>
</div>
</div>
{{template "base/footer" .}}

View File

@ -1,56 +0,0 @@
{{template "base/head" .}}
<style type="text/css">.home .hero .svg { color: #1c79c5 !important; }</style>
<div class="home">
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" src="{{StaticUrlPrefix}}/logo-forgechaprilorg.png" />
</div>
<div class="hero">
<h1 class="ui icon header title">
{{AppName}}
</h1>
<h2>Plateforme collaborative de dépôts de logiciels, ressources et contributions libres.</h2>
<!--p><a href="https://www.april.org/" style="color: #005174"><img src="april-logo-gitea.png" /></a>.</p-->
</div>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame" 16}} Qui peut avoir un compte ?
</h1>
<p class="large">
Tout le monde, cette instance est ouverte au public.
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-device-desktop" 16}} Quels contenus sont acceptés ?
</h1>
<p class="large">
La forge Chapril accueille tout type de contenu tel que code source, documentation, graphisme, artistique, littéraire, etc.
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket" 16}} Comment créer un compte ?
</h1>
<p class="large">
La création de compte se fait par une procédure d'inscription classique.
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code" 16}} Licences libres
</h1>
<p class="large">
Tous les dépôts présents sur cette forge sont sous <b>licences libres</b>, au sens de la Free Software Foundation à l'exception des licences Creative Commons en ND ou NC qui sont exclues.<br/>
<a href="https://www.chapril.org/cgu.html#forgechaprilorg-cpu">Consulter les Conditions particulières d'utilisation</a>.
</p>
</div>
</div>
</div>
{{template "base/footer" .}}

View File

@ -1,53 +0,0 @@
{{template "base/head" .}}
<div class="page-content home">
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" width="220" height="220" src="{{StaticUrlPrefix}}/img/logo.svg"/>
</div>
<div class="hero">
<h1 class="ui icon header title">
{{AppName}}
</h1>
<h2>{{.i18n.Tr "startpage.app_desc"}}</h2>
</div>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame"}} {{.i18n.Tr "startpage.install"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.install_desc" | Str2html}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-device-desktop"}} {{.i18n.Tr "startpage.platform"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.platform_desc" | Str2html}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket"}} {{.i18n.Tr "startpage.lightweight"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.lightweight_desc" | Str2html}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code"}} {{.i18n.Tr "startpage.license"}}
</h1>
<p class="large">
{{.i18n.Tr "startpage.license_desc" | Str2html}}
</p>
</div>
</div>
</div>
{{template "base/footer" .}}

View File

@ -1,15 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{{.DisplayName}}, veuillez activer votre compte</title> <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
<title>{{.DisplayName|DotEscape}}, veuillez activer votre compte</title>
</head> </head>
{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
<body> <body>
<p>Bonjour <b>{{.DisplayName}}</b>, merci pour votre inscription à {{AppName}} !</p> <p>Bonjour <b>{{.DisplayName|DotEscape}}</b>, merci pour votre inscription à {{AppName}} !</p>
<p>Veuillez cliquer sur le lien suivant pour activer votre compte avant <b>{{.ActiveCodeLives}}</b> :</p> <p>Veuillez cliquer sur le lien suivant pour activer votre compte avant <b>{{.ActiveCodeLives}}</b> :</p>
<p><a href="{{AppUrl}}user/activate?code={{.Code}}">{{AppUrl}}user/activate?code={{.Code}}</a></p> <p><a href="{{$activate_url}}">{{$activate_url}}</a></p>
<p>Un problème ? Essayez en copiant/collant le lien dans votre navigateur web.</p> <p>Un problème ? Essayez en copiant/collant le lien dans votre navigateur web.</p>
<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p> <p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
</body> </body>
</html> </html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.DisplayName}}, please activate your account</title>
</head>
<body>
<p>Hi <b>{{.DisplayName}}</b>, thanks for registering at {{AppName}}!</p>
<p>Please click the following link to activate your account within <b>{{.ActiveCodeLives}}</b>:</p>
<p><a href="{{AppUrl}}user/activate?code={{.Code}}">{{AppUrl}}user/activate?code={{.Code}}</a></p>
<p>Not working? Try copying and pasting it to your browser.</p>
<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
</body>
</html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.DisplayName}}, please activate your account</title>
</head>
<body>
<p>Hi <b>{{.DisplayName}}</b>, thanks for registering at {{AppName}}!</p>
<p>Please click the following link to activate your account within <b>{{.ActiveCodeLives}}</b>:</p>
<p><a href="{{AppUrl}}user/activate?code={{.Code}}">{{AppUrl}}user/activate?code={{.Code}}</a></p>
<p>Not working? Try copying and pasting it to your browser.</p>
<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
</body>
</html>

View File

@ -3,7 +3,7 @@
En créant un compte, vous acceptez les <a href="https://www.chapril.org/cgu.html">conditions générales d'utilisation</a> du <a href="https://www.chapril.org/">Chapril</a> et les <a href="https://www.chapril.org/cgu.html#forgechaprilorg-cpu">conditions particulières d'utilisation</a> du service <i>forge.chapril.org</i>.<br/> En créant un compte, vous acceptez les <a href="https://www.chapril.org/cgu.html">conditions générales d'utilisation</a> du <a href="https://www.chapril.org/">Chapril</a> et les <a href="https://www.chapril.org/cgu.html#forgechaprilorg-cpu">conditions particulières d'utilisation</a> du service <i>forge.chapril.org</i>.<br/>
Notamment, vous vous engagez à ce que tous les contenus de vos dépôts soient sous <a href="https://www.gnu.org/licenses/license-list.fr.html">licence libre</a>, au sens de la Free Software Foundation. Notamment, vous vous engagez à ce que tous les contenus de vos dépôts soient sous <a href="https://www.gnu.org/licenses/license-list.fr.html">licence libre</a>, au sens de la Free Software Foundation.
</div> </div>
<div class="page-content user signin{{if .LinkAccountMode}} icon{{end}}"> <div role="main" aria-label="{{.Title}}" class="page-content user signin{{if .LinkAccountMode}} icon{{end}}">
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
{{template "user/auth/signup_inner" .}} {{template "user/auth/signup_inner" .}}
</div> </div>

View File

@ -1,3 +0,0 @@
{{template "base/head" .}}
{{template "user/auth/signup_inner" .}}
{{template "base/footer" .}}

View File

@ -1,7 +0,0 @@
{{template "base/head" .}}
<div style="background: #ffc; border-radius: 20px; min-height: 40px; margin: 2em auto; padding: 15px 20px 15px 80px; border-collapse: collapse; min-width: 400px; max-width: 40%; background-image: url(https://forge.chapril.org/img/important.png); background-position: 20px 50%; background-repeat: no-repeat; text-align: center;">
En créant un compte, vous acceptez les <a href="https://www.chapril.org/cgu.html">conditions générales d'utilisation</a> du <a href="https://www.chapril.org/">Chapril</a> et les <a href="https://www.chapril.org/cgu.html#forgechaprilorg-cpu">conditions particulières d'utilisation</a> du service <i>forge.chapril.org</i>.<br/>
Notamment, vous vous engagez à ce que tous les contenus de vos dépôts soient sous <a href="https://www.gnu.org/licenses/license-list.fr.html">licence libre</a>, au sens de la Free Software Foundation.
</div>
{{template "user/auth/signup_inner" .}}
{{template "base/footer" .}}

View File

@ -1,7 +0,0 @@
{{template "base/head" .}}
<div class="page-content user signin{{if .LinkAccountMode}} icon{{end}}">
<div class="ui middle very relaxed page grid">
{{template "user/auth/signup_inner" .}}
</div>
</div>
{{template "base/footer" .}}