Skip to content

Templates for extra links in top navbar and repo tool tabs. #3308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/doc/advanced/customizing-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ To add custom HTML to the header or the footer of the page, in the `templates/cu
directory there is `header.tmpl` and `footer.tmpl` that can be modified. This can be
a useful place to add custom CSS files or additional Javascript.

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.

## Customizing gitignores, labels, licenses, locales, and readmes.

Place custom files in corresponding sub-folder under `custom/options`.
3 changes: 3 additions & 0 deletions templates/base/head.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@
{{end}}

<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>

{{template "custom/extra_links" .}}

{{/*
<div class="item">
<div class="ui icon input">
Expand Down
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
</a>
{{end}}

{{template "custom/extra_tabs" .}}

{{if .IsRepositoryAdmin}}
<div class="right menu">
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
Expand Down