forked from ccchb/ansible
use current template version of gitea
This commit is contained in:
parent
c6fee04ba6
commit
45f8337144
3 changed files with 21 additions and 36 deletions
|
@ -1,35 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{.Language}}">
|
||||
<html lang="{{.Language}}" class="theme-{{.SignedUser.Theme}}">
|
||||
<head data-suburl="{{AppSubUrl}}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>{{if .Title}}{{.Title}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title>
|
||||
<title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} </title>
|
||||
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
|
||||
{{if UseServiceWorker}}
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('{{AppSubUrl}}/serviceworker.js').then(function(registration) {
|
||||
// Registration was successful
|
||||
console.info('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
}, function(err) {
|
||||
// registration failed :(
|
||||
console.info('ServiceWorker registration failed: ', err);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{{else}}
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.getRegistrations().then(function(registrations) {
|
||||
registrations.forEach(function(registration) {
|
||||
registration.unregister();
|
||||
console.info('ServiceWorker unregistered');
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{{end}}
|
||||
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
|
||||
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
|
||||
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
|
||||
|
@ -84,8 +60,10 @@
|
|||
</script>
|
||||
<script>
|
||||
window.config = {
|
||||
AppVer: '{{AppVer}}',
|
||||
AppSubUrl: '{{AppSubUrl}}',
|
||||
StaticUrlPrefix: '{{StaticUrlPrefix}}',
|
||||
UseServiceWorker: {{UseServiceWorker}},
|
||||
csrf: '{{.CsrfToken}}',
|
||||
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
|
||||
Minicolors: {{if .RequireMinicolors}}true{{else}}false{{end}},
|
||||
|
@ -94,14 +72,26 @@
|
|||
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
|
||||
Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
|
||||
heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
|
||||
NotificationSettings: {
|
||||
MinTimeout: {{NotificationSettings.MinTimeout}},
|
||||
TimeoutStep: {{NotificationSettings.TimeoutStep}},
|
||||
MaxTimeout: {{NotificationSettings.MaxTimeout}},
|
||||
EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}},
|
||||
},
|
||||
{{if .RequireTribute}}
|
||||
tributeValues: [
|
||||
{{ range .Assignees }}
|
||||
{key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
||||
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'},
|
||||
{{ end }}
|
||||
],
|
||||
{{end}}
|
||||
};
|
||||
</script>
|
||||
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png">
|
||||
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926">
|
||||
<link rel="fluid-icon" href="{{StaticUrlPrefix}}/img/gitea-lg.png" title="{{AppName}}">
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/icons.woff2" type="font/woff2" crossorigin="anonymous">
|
||||
<link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/outline-icons.woff2" type="font/woff2" crossorigin="anonymous">
|
||||
{{if .RequireSimpleMDE}}
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css">
|
||||
{{end}}
|
|
@ -4,12 +4,7 @@
|
|||
src: img/
|
||||
dest: /var/lib/gitea/custom/public/img/
|
||||
|
||||
- name: copy overwrite html templates
|
||||
- name: copy html templates
|
||||
copy:
|
||||
src: base/
|
||||
dest: /var/lib/gitea/custom/templates/base/
|
||||
|
||||
- name: copy custom html templates
|
||||
copy:
|
||||
src: custom/
|
||||
dest: /var/lib/gitea/custom/templates/custom/
|
||||
src: templates/
|
||||
dest: /var/lib/gitea/custom/templates/
|
||||
|
|
Loading…
Reference in a new issue