Skip to content

Commit 34c5eee

Browse files
bagasmedavidsvantessonlafriks
committed
Add footer extra links template (#9576)
* Add footer extra links template * [Docs] Update to mention extra links footer template * Commit suggestion from @davidsvantesson Co-Authored-By: David Svantesson <[email protected]> * Move template placement to right side of footer Co-authored-by: David Svantesson <[email protected]> Co-authored-by: Lauris BH <[email protected]>
1 parent ea707f5 commit 34c5eee

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/content/doc/advanced/customizing-gitea.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ Dont forget to restart your gitea to apply the changes.
8080

8181
### Adding links and tabs
8282

83-
If all you want is to add extra links to the top navigation bar, or extra tabs to the repository view, you can put them in `extra_links.tmpl` and `extra_tabs.tmpl` inside your `custom/templates/custom/` directory.
83+
If all you want is to add extra links to the top navigation bar or footer, or extra tabs to the repository view, you can put them in `extra_links.tmpl` (links added to the navbar), `extra_links_footer.tmpl` (links added to the left side of footer), and `extra_tabs.tmpl` inside your `custom/templates/custom/` directory.
8484

8585
For instance, let's say you are in Germany and must add the famously legally-required "Impressum"/about page, listing who is responsible for the site's content:
86-
just place it under your "custom/public/" directory (for instance `custom/public/impressum.html`) and put a link to it in `custom/templates/custom/extra_links.tmpl`.
86+
just place it under your "custom/public/" directory (for instance `custom/public/impressum.html`) and put a link to it in either `custom/templates/custom/extra_links.tmpl` or `custom/templates/custom/extra_links_footer.tmpl`.
8787

8888
To match the current style, the link should have the class name "item", and you can use `{{AppSubUrl}}` to get the base URL:
8989
`<a class="item" href="{{AppSubUrl}}/impressum.html">Impressum</a>`

templates/base/footer_content.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<a href="{{StaticUrlPrefix}}/vendor/librejs.html" data-jslicense="1">JavaScript licenses</a>
2020
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
2121
<a target="_blank" rel="noopener noreferrer" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
22+
{{template "custom/extra_links_footer" .}}
2223
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
2324
</div>
2425
</div>

templates/custom/extra_links_footer.tmpl

Whitespace-only changes.

0 commit comments

Comments
 (0)