You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/templates
wxiaoguang 6913053223
Start using template context function (#26254)
Before:

* `{{.locale.Tr ...}}`
* `{{$.locale.Tr ...}}`
* `{{$.root.locale.Tr ...}}`
* `{{template "sub" .}}`
* `{{template "sub" (dict "locale" $.locale)}}`
* `{{template "sub" (dict "root" $)}}`
* .....

With context function: only need to `{{ctx.Locale.Tr ...}}`

The "ctx" could be considered as a super-global variable for all
templates including sub-templates.


To avoid potential risks (any bug in the template context function
package), this PR only starts using "ctx" in "head.tmpl" and
"footer.tmpl" and it has a "DataRaceCheck". If there is anything wrong,
the code can be fixed or reverted easily.
2 years ago
..
admin Allow package cleanup from admin page (#25307) 2 years ago
api/packages/pypi Remove incorrect HTML self close tag (#23748) 2 years ago
base Start using template context function (#26254) 2 years ago
code Fix inconsistent user profile layout across tabs (#25625) 2 years ago
custom
devtest Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790) 2 years ago
explore Fix incorrect sort link with `.profile` repository (#26374) 2 years ago
mail Add template linting via djlint (#25212) 2 years ago
org Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790) 2 years ago
package Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790) 2 years ago
projects Merge `templates/projects/list.tmpl` and `templates/repo/projects/list.tmpl` together (#26265) 2 years ago
repo Display human-readable text instead of cryptic filemodes (#26352) 2 years ago
shared Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790) 2 years ago
status Replace fomantic divider module with our own (#25539) 2 years ago
swagger Doc update swagger doc for POST /orgs/{org}/teams (#26155) 2 years ago
user Introduce `flex-list` & `flex-item` elements for Gitea UI (#25790) 2 years ago
home.tmpl Improve home page template, fix Sort dropdown menu flash (#23856) 2 years ago
install.tmpl Show correct SSL Mode on "install page" (#25818) 2 years ago
post-install.tmpl Remove incorrect element ID on "post-install" page (#25104) 2 years ago