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/docs/content/doc
wxiaoguang 21a1d76911
Improve the frontend guideline (#23298)
### The CustomEvent prefix

There was already `ce-quick-submit`, the `ce-` prefix seems better than
`us-`. Rename the only `us-` prefixed `us-load-context-popup` to `ce-`
prefixed.

### Styles and Attributes in Go HTML Template

https://github.com/go-gitea/gitea/pull/21855#issuecomment-1429643073

Suggest to stick to `class="c1 {{if $var}}c2{{end}}"`

The readability and maintainability should be applied to the code which
is read by developers, but not for the generated outputs.

The template code is the code for developers, while the generated HTML
are only for browsers.

The `class="c1 {{if $var}}c2{{end}}"` style is clearer for developers
and more intuitive, and the generated HTML also makes browsers happy (a
few spaces do not affect anything)

Think about a more complex case:

* `class="{{if $active}}active{{end}} menu item {{if $show}}show{{end}}
{{if $warn}}warn{{end}}"`
* --vs--
* `class="{{if $active}}active {{end}}menu item{{if $show}}
show{{end}}{{if $warn}} warn{{end}}"`

The first style make it clearer to see each CSS class name with its
`{{if}}` block.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
advanced Add InsecureSkipVerify to Minio Client for Storage (#23166) 2 years ago
developers Improve the frontend guideline (#23298) 2 years ago
features Add missed reverse proxy authentication documentation (#22250) 2 years ago
help Add repo adoption to FAQ (#22778) 2 years ago
installation Add Bash and Zsh completion scripts (#22646) 2 years ago
packages Fix secrets overview page missing from docs sidebar (#23143) 2 years ago
secrets Fix secrets overview page missing from docs sidebar (#23143) 2 years ago
translation Add plural definitions for German translations (#21802) 2 years ago
upgrade Update gogs upgrade information (#22777) 2 years ago
usage Add basic documentation for labels, including scoped labels (#23304) 2 years ago
advanced.en-us.md
advanced.fr-fr.md
advanced.zh-cn.md
advanced.zh-tw.md [docs] Add zh-tw Translations (#14507) 4 years ago
developers.en-us.md Add Package Registry (#16510) 3 years ago
developers.zh-cn.md Refactor docs (#21627) 2 years ago
developers.zh-tw.md Add Package Registry (#16510) 3 years ago
features.en-us.md
features.zh-cn.md
features.zh-tw.md
help.en-us.md
help.fr-fr.md
help.zh-cn.md
help.zh-tw.md [docs] Add zh-tw Translations (#14507) 4 years ago
installation.en-us.md
installation.fr-fr.md
installation.zh-cn.md
installation.zh-tw.md
packages.en-us.md Add Package Registry (#16510) 3 years ago
translation.de-de.md Add Package Registry (#16510) 3 years ago
translation.en-us.md Add Package Registry (#16510) 3 years ago
translation.zh-tw.md Add Package Registry (#16510) 3 years ago
upgrade.en-us.md
upgrade.fr-fr.md
upgrade.zh-cn.md
upgrade.zh-tw.md
usage.en-us.md
usage.zh-cn.md
usage.zh-tw.md [docs] Add zh-tw Translations (#14507) 4 years ago