Ver código fonte

Customize gitea start page and footer etc

Thomas Buck 5 anos atrás
pai
commit
ba289af88d

+ 2
- 0
roles/gitea/files/data_gitea_custom_robots.txt Ver arquivo

@@ -0,0 +1,2 @@
1
+User-agent: *
2
+Disallow:

+ 1
- 0
roles/gitea/files/data_gitea_custom_templates_custom_footer.tmpl Ver arquivo

@@ -0,0 +1 @@
1
+<!-- add fathom tracking code here -->

+ 17
- 0
roles/gitea/files/data_gitea_custom_templates_home.tmpl Ver arquivo

@@ -0,0 +1,17 @@
1
+{{template "base/head" .}}
2
+<div class="home">
3
+	<div class="ui stackable middle very relaxed page grid">
4
+		<div class="sixteen wide center aligned centered column">
5
+			<div>
6
+				<img class="logo" src="{{AppSubUrl}}/img/gitea-lg.png" />
7
+			</div>
8
+			<div class="hero">
9
+				<h1 class="ui icon header title">
10
+					{{AppName}}
11
+				</h1>
12
+				<h2>{{.i18n.Tr "app_desc"}}</h2>
13
+			</div>
14
+		</div>
15
+	</div>
16
+</div>
17
+{{template "base/footer" .}}

+ 34
- 0
roles/gitea/tasks/gitea.yml Ver arquivo

@@ -39,6 +39,8 @@
39 39
   with_items:
40 40
     - gitea
41 41
     - gitea/custom
42
+    - gitea/custom/templates
43
+    - gitea/custom/templates/custom
42 44
     - gitea/data
43 45
     - gitea/log
44 46
     - gitea/repos
@@ -102,6 +104,38 @@
102 104
     owner=root
103 105
     group=root
104 106
 
107
+- name: Add homepage template to gitea
108
+  copy:
109
+    src=data_gitea_custom_templates_home.tmpl
110
+    dest=/data/gitea/custom/templates/home.tmpl
111
+    owner=git
112
+    group=root
113
+    mode=0644
114
+
115
+- name: Add extra links to gitea
116
+  template:
117
+    src=data_gitea_custom_templates_custom_extra_links.j2
118
+    dest=/data/gitea/custom/templates/custom/extra_links.tmpl
119
+    owner=git
120
+    group=root
121
+    mode=0644
122
+
123
+- name: Add robots.txt to gitea
124
+  copy:
125
+    src=data_gitea_custom_robots.txt
126
+    dest=/data/gitea/custom/robots.txt
127
+    owner=git
128
+    group=root
129
+    mode=0644
130
+
131
+- name: Add custom footer to gitea
132
+  copy:
133
+    src=data_gitea_custom_templates_custom_footer.tmpl
134
+    dest=/data/gitea/custom/templates/custom/footer.tmpl
135
+    owner=git
136
+    group=root
137
+    mode=0644
138
+
105 139
 - name: Register new gitea service
106 140
   systemd: name=gitea daemon_reload=yes enabled=yes
107 141
 

+ 1
- 0
roles/gitea/templates/data_gitea_custom_templates_custom_extra_links.j2 Ver arquivo

@@ -0,0 +1 @@
1
+<a class="item" href="https://{{ domain }}">Start</a>

Carregando…
Cancelar
Salvar