1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 16:44:26 +00:00
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.
2023-08-08 01:22:47 +00:00
..
admin Allow package cleanup from admin page (#25307) 2023-08-08 00:46:10 +00:00
api/packages/pypi Remove incorrect HTML self close tag (#23748) 2023-03-27 18:05:51 +02:00
base Start using template context function (#26254) 2023-08-08 01:22:47 +00:00
code Fix inconsistent user profile layout across tabs (#25625) 2023-07-06 18:59:24 +00:00
custom Add footer extra links template (#9576) 2020-01-03 20:41:56 +02:00
devtest Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
explore Fix incorrect sort link with .profile repository (#26374) 2023-08-07 19:59:17 +00:00
mail Add template linting via djlint (#25212) 2023-06-14 18:17:58 +00:00
org Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
package Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
projects Merge templates/projects/list.tmpl and templates/repo/projects/list.tmpl together (#26265) 2023-08-01 16:54:54 +00:00
repo Display human-readable text instead of cryptic filemodes (#26352) 2023-08-06 21:52:34 +02:00
shared Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
status Replace fomantic divider module with our own (#25539) 2023-06-29 20:24:22 +08:00
swagger Doc update swagger doc for POST /orgs/{org}/teams (#26155) 2023-07-26 10:22:56 +00:00
user Introduce flex-list & flex-item elements for Gitea UI (#25790) 2023-08-01 00:13:42 +02:00
home.tmpl Improve home page template, fix Sort dropdown menu flash (#23856) 2023-04-01 13:47:54 +08:00
install.tmpl Show correct SSL Mode on "install page" (#25818) 2023-07-11 18:09:23 -04:00
post-install.tmpl Remove incorrect element ID on "post-install" page (#25104) 2023-06-08 12:23:39 +08:00