feat: add variable gitea_extra_links to customize nav bar
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
BREAKING CHANGE: The variable `gitea_footer_custom_links` was renamed to `gitea_extra_links_footer`.
This commit is contained in:
parent
7cdd220b84
commit
b3b77eca5d
@ -197,9 +197,7 @@ gitea_markdown_file_ext:
|
|||||||
gitea_lfs_enabled: False
|
gitea_lfs_enabled: False
|
||||||
gitea_lfs_jwt_secret: gitea_lfs_jwt_secret
|
gitea_lfs_jwt_secret: gitea_lfs_jwt_secret
|
||||||
|
|
||||||
# @var gitea_org_creation_enabled: description: >
|
# @var gitea_org_creation_enabled: description: Allow regular (non-admin) users to create organizations.
|
||||||
# Allow regular (non-admin) users to create organizations.
|
|
||||||
# @end
|
|
||||||
gitea_org_creation_enabled: True
|
gitea_org_creation_enabled: True
|
||||||
|
|
||||||
gitea_gravatar_enabled: False
|
gitea_gravatar_enabled: False
|
||||||
@ -238,20 +236,21 @@ gitea_api_default_git_trees_per_page: 1000
|
|||||||
gitea_footer_show_branding: False
|
gitea_footer_show_branding: False
|
||||||
gitea_footer_show_version: False
|
gitea_footer_show_version: False
|
||||||
gitea_footer_show_template_load_time: False
|
gitea_footer_show_template_load_time: False
|
||||||
# @var gitea_footer_custom_links:description: >
|
|
||||||
# Add custom links e.g. legal notice to gitea footer.
|
# @var gitea_extra_links_footer:description: Add custom links e.g. legal notice to gitea footer.
|
||||||
# @end
|
# @var gitea_extra_links_footer:example: >
|
||||||
# @var gitea_footer_custom_links:example: >
|
# gitea_extra_links_footer:
|
||||||
# gitea_footer_custom_links:
|
|
||||||
# - name: Legal Notice
|
# - name: Legal Notice
|
||||||
# href: https://example.com/legal_notice
|
# href: https://example.com/legal_notice
|
||||||
# @end
|
# @end
|
||||||
gitea_footer_custom_links: []
|
gitea_extra_links_footer: []
|
||||||
|
gitea_extra_links: []
|
||||||
|
|
||||||
gitea_oauth_provider_enabled: False
|
gitea_oauth_provider_enabled: False
|
||||||
gitea_access_token_expiration_time: 3600
|
gitea_access_token_expiration_time: 3600
|
||||||
gitea_refresh_token_expiration_time: 730
|
gitea_refresh_token_expiration_time: 730
|
||||||
gitea_invalidate_refresh_tokens: False
|
gitea_invalidate_refresh_tokens: False
|
||||||
|
|
||||||
# @bar gitea_jwt_secret:description: >
|
# @bar gitea_jwt_secret:description: >
|
||||||
# OAuth2 authentication secret for access and refresh tokens.
|
# OAuth2 authentication secret for access and refresh tokens.
|
||||||
# Should be replaced by your own secret.
|
# Should be replaced by your own secret.
|
||||||
|
@ -40,9 +40,12 @@
|
|||||||
|
|
||||||
- name: Copy template files
|
- name: Copy template files
|
||||||
template:
|
template:
|
||||||
src: "templates/custom/templates/custom/extra_links_footer.tmpl.j2"
|
src: "templates/custom/templates/custom/{{ item }}.tmpl.j2"
|
||||||
dest: "{{ gitea_template_dir }}/custom/extra_links_footer.tmpl"
|
dest: "{{ gitea_template_dir }}/custom/{{ item }}.tmpl"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
loop:
|
||||||
|
- extra_links_footer
|
||||||
|
- extra_links
|
||||||
notify: __gitea_restart
|
notify: __gitea_restart
|
||||||
become: True
|
become: True
|
||||||
become_user: "{{ gitea_user }}"
|
become_user: "{{ gitea_user }}"
|
||||||
|
4
templates/custom/templates/custom/extra_links.tmpl.j2
Normal file
4
templates/custom/templates/custom/extra_links.tmpl.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#jinja2: lstrip_blocks: True
|
||||||
|
{% for link in gitea_extra_links %}
|
||||||
|
<a class="item" href="{{ link.href }}">{{ link.name }}</a>
|
||||||
|
{% endfor %}
|
@ -1,4 +1,4 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
#jinja2: lstrip_blocks: True
|
||||||
{% for link in gitea_footer_custom_links %}
|
{% for link in gitea_extra_links_footer %}
|
||||||
<a class="item" href="{{ link.href }}">{{ link.name }}</a>
|
<a class="item" href="{{ link.href }}">{{ link.name }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user