Skip to content

Commit 0bfcbcc

Browse files
authored
Add document for webcomponents (#23261)
1 parent ffce336 commit 0bfcbcc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

web_src/js/webcomponents/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Web Components
2+
3+
This `webcomponents` directory contains the source code for the web components used in the Gitea Web UI.
4+
5+
https://developer.mozilla.org/en-US/docs/Web/Web_Components
6+
7+
# Guidelines
8+
9+
* These components are loaded in `<head>` (before DOM body),
10+
so they should have their own dependencies and should be very light,
11+
then they won't affect the page loading time too much.
12+
* If the component is not a public one, it's suggested to have its own `Gitea` or `gitea-` prefix to avoid conflicts.
13+
14+
# TODO
15+
16+
There are still some components that are not migrated to web components yet:
17+
18+
* `<span class="js-pretty-number">`
19+
* `<time data-format>`

0 commit comments

Comments
 (0)