Browse Source

Customize gitea start page and footer etc

Thomas Buck 5 years ago
parent
commit
ba289af88d

+ 2
- 0
roles/gitea/files/data_gitea_custom_robots.txt View File

1
+User-agent: *
2
+Disallow:

+ 1
- 0
roles/gitea/files/data_gitea_custom_templates_custom_footer.tmpl View File

1
+<!-- add fathom tracking code here -->

+ 17
- 0
roles/gitea/files/data_gitea_custom_templates_home.tmpl View File

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 View File

39
   with_items:
39
   with_items:
40
     - gitea
40
     - gitea
41
     - gitea/custom
41
     - gitea/custom
42
+    - gitea/custom/templates
43
+    - gitea/custom/templates/custom
42
     - gitea/data
44
     - gitea/data
43
     - gitea/log
45
     - gitea/log
44
     - gitea/repos
46
     - gitea/repos
102
     owner=root
104
     owner=root
103
     group=root
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
 - name: Register new gitea service
139
 - name: Register new gitea service
106
   systemd: name=gitea daemon_reload=yes enabled=yes
140
   systemd: name=gitea daemon_reload=yes enabled=yes
107
 
141
 

+ 1
- 0
roles/gitea/templates/data_gitea_custom_templates_custom_extra_links.j2 View File

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

Loading…
Cancel
Save