aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2020-06-30 04:58:26 -0400
committerThedro Neely <thedroneely@gmail.com>2020-06-30 04:58:26 -0400
commit19cf0ea4389a632740e2f18769e7c0a483b60c68 (patch)
treed74b57bec5e9d88c5f0d677a448fbd2d1c368f0f /templates
parent4f58c6fded326fa1186f29cfe017aa8cbc42f809 (diff)
downloadgitea-templates-19cf0ea4389a632740e2f18769e7c0a483b60c68.tar.gz
gitea-templates-19cf0ea4389a632740e2f18769e7c0a483b60c68.tar.bz2
gitea-templates-19cf0ea4389a632740e2f18769e7c0a483b60c68.zip
templates: 1.11.4 -> 1.11.8
Diffstat (limited to 'templates')
-rw-r--r--templates/base/head.tmpl8
-rw-r--r--templates/repo/header.tmpl40
2 files changed, 29 insertions, 19 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 237f0e9..f466c0d 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -84,7 +84,11 @@
for the JavaScript code in this page.
*/`}}
</script>
-
+ <script>
+ window.config = {
+ StaticUrlPrefix: '{{StaticUrlPrefix}}'
+ }
+ </script>
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png" />
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926">
<link rel="preload" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css" as="style" onload="this.rel='stylesheet'">
@@ -156,7 +160,7 @@
{{else}}
<meta property="og:title" content="{{AppName}}">
<meta property="og:type" content="website" />
- <meta property="og:image" content="{{StaticUrlPrefix}}img/gitea-lg.png" />
+ <meta property="og:image" content="{{StaticUrlPrefix}}/img/gitea-lg.png" />
<meta property="og:url" content="{{AppUrl}}" />
<meta property="og:description" content="{{MetaDescription}}">
{{end}}
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index e6e2350..8606696 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -21,22 +21,28 @@
</div>
{{if not .IsBeingCreated}}
<div class="repo-buttons">
- <div class="ui labeled button" tabindex="0">
- <a class="ui compact basic button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
- <i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
- </a>
- <a class="ui basic label" href="{{.Link}}/watchers">
- {{.NumWatches}}
- </a>
- </div>
- <div class="ui labeled button" tabindex="0">
- <a class="ui compact basic button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
- <i class="icon star{{if not $.IsStaringRepo}} outline{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
- </a>
- <a class="ui basic label" href="{{.Link}}/stars">
- {{.NumStars}}
- </a>
- </div>
+ <form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
+ {{$.CsrfTokenHtml}}
+ <div class="ui labeled button" tabindex="0">
+ <button type="submit" class="ui compact basic button">
+ <i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
+ </button>
+ <a class="ui basic label" href="{{.Link}}/watchers">
+ {{.NumWatches}}
+ </a>
+ </div>
+ </form>
+ <form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
+ {{$.CsrfTokenHtml}}
+ <div class="ui labeled button" tabindex="0">
+ <button type="submit" class="ui compact basic button">
+ <i class="icon star{{if not $.IsStaringRepo}} outline{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
+ </button>
+ <a class="ui basic label" href="{{.Link}}/stars">
+ {{.NumStars}}
+ </a>
+ </div>
+ </form>
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
<div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
<a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
@@ -129,7 +135,7 @@
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
- <i class="octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumReleases}}gray{{else}}blue{{end}} small label">{{.Repository.NumReleases}}</span>
+ <i class="octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span>
</a>
{{end}}