68ec9b4859
Migrate margin and padding helpers to tailwind ( #30043 )
...
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
2024-03-24 17:42:49 +01:00
04f9ad0568
Fix incorrect tailwind migration ( #30007 )
...
Fixes https://github.com/go-gitea/gitea/issues/30005 . Regression from
https://github.com/go-gitea/gitea/pull/29945 .
There was only once instance of `tw-content-center` before that PR, so I
just ran below command and reverted that one instance.
```sh
perl -p -i -e 's#tw-content-center#tw-items-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
```
2024-03-22 20:51:29 +01:00
f88ad5424f
Replace 10 more gt- classes with tw- ( #29945 )
...
Likely the biggest change of the tailwind refactors. Only thing of note
is that `tw-flex-1` resolves to `flex: 1 1 0%` while our `gt-f1` was
`flex: 1 1 0`, I don't think it will make any difference. Commands I've
ran:
```sh
perl -p -i -e 's#gt-vm#tw-align-middle#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-fw#tw-flex-wrap#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-f1#tw-flex-1#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-fc#tw-flex-col#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-sb#tw-justify-between#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-je#tw-justify-end#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-jc#tw-justify-center#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-ac#tw-content-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
perl -p -i -e 's#gt-df#tw-flex#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
perl -p -i -e 's#gt-dib#tw-inline-block#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2024-03-22 13:45:10 +00:00
4c476fa41d
Remove unnecessary ".Link" usages ( #29909 )
...
In HTML, `?key=val` already means "use the current link with new query parameters"
2024-03-20 13:56:42 +08:00
e0b002a4a8
Unify search boxes ( #29530 )
...
Unify all but a few search boxes to use uniform style, uniform
translations and shared templates where possible.
Remove a few duplicated search templates, e. g. code search.
<details><summary>Example after screenshots:</summary>




</details>
Also includes #29700
Co-authored-by: 6543 <6543@obermui.de >
---------
Co-authored-by: 6543 <m.huber@kithara.com >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: Giteabot <teabot@gitea.io >
2024-03-14 23:24:59 +00:00
4ab597f479
highlight user details link ( #26998 )
...
This PR adds a separated column in the users table for operations. The
username link now redirects back to user page.

Resolves
https://github.com/go-gitea/gitea/pull/26713#pullrequestreview-1603001285
Co-authored-by: silverwind <me@silverwind.io >
2023-10-01 11:58:24 +08:00
93bd4351bf
Fix more "locale" usages ( #27259 )
2023-09-25 20:42:40 +08:00
7960ba7e2b
Always use ctx.Locale.Tr
inside templates ( #27231 )
2023-09-25 08:56:50 +00:00
198a9ca635
Display all user types and org types on admin management UI ( #27050 )
...
Follow #24026
<img width="1049" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/d3fc5159-b5e7-411a-b6f8-4a111a027e6b ">
---------
Co-authored-by: delvh <dev.lh@web.de >
2023-09-14 06:53:36 +00:00
0e8045d8ea
Fix template function DateTime ( #24317 )
...
Before, 500 error

2023-04-25 15:48:30 -04:00
70bb4984cd
Allow using localized absolute date times within phrases with place holders and localize issue due date events ( #24275 )
...
This refactors the `shared/datetime/short|long|full` templates into a
template helper function, which allows us to render absolute date times
within translatable phrases.
- Follows #23988
- The first attempt was in #24055
- This should help #22664
Changes:
1. Added the `DateTime` template helper that replaces the
`shared/datetime/short|long|full` templates
2. Used find-and-replace with varying regexes to replace the templates
from step 1 (for example, `\{\{template "shared/datetime/(\S+) \(dict
"Datetime" ([^"]+) "Fallback" ([^\)]+\)?) ?\)?\}\}` -> `{{DateTime "$1
$2 $3}}`)
3. Used the new `DateTime` helper in the issue due date timestamp
rendering
# Before

# After

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-04-23 15:12:33 -04:00
44e0cfa96e
Change to vertical navbar layout for secondary navbar for repo/user/admin settings ( #24246 )
...
Co-Author: @wxiaoguang
This is the first step of #24229 . And this PR will only includes html
changes, and followed by other PRs that fine tune css and change to
submenus.
After:
Admin Level
<img width="1400" alt="Screen Shot 2023-04-21 at 10 07 16"
src="https://user-images.githubusercontent.com/17645053/233523870-f848b61d-056a-4b41-9760-a9a49fea1fe8.png ">
User Level
<img width="1422" alt="Screen Shot 2023-04-21 at 10 07 23"
src="https://user-images.githubusercontent.com/17645053/233523878-979adb20-a657-43d9-99a6-ad414010c0ef.png ">
Repo Level
<img width="1404" alt="Screen Shot 2023-04-21 at 10 07 07"
src="https://user-images.githubusercontent.com/17645053/233523863-337440bd-c03a-4dfd-87fa-cef40300bfe0.png ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2023-04-23 18:21:21 +08:00
b7b5834831
Use auto-updating, natively hoverable, localized time elements ( #23988 )
...
- Added [GitHub's `relative-time` element](https://github.com/github/relative-time-element )
- Converted all formatted timestamps to use this element
- No more flashes of unstyled content around time elements
- These elements are localized using the `lang` property of the HTML file
- Relative (e.g. the activities in the dashboard) and duration (e.g.
server uptime in the admin page) time elements are auto-updated to keep
up with the current time without refreshing the page
- Code that is not needed anymore such as `formatting.js` and parts of `since.go` have been deleted
Replaces #21440
Follows #22861
## Screenshots
### Localized


### Tooltips
#### Native for dates

#### Interactive for relative

### Auto-update

---------
Signed-off-by: Yarden Shoham <git@yardenshoham.com >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: delvh <dev.lh@web.de >
2023-04-11 01:01:20 +02:00
15c035775a
Add main landmark to templates and adjust titles ( #22670 )
...
* Add main aria landmark to templates
* Adjust some titles to improve understanding of location in navigation
Contributed by @Forgejo
2023-02-01 22:56:10 +00:00
acdb92ad42
Localize all timestamps ( #21440 )
...
Following
* #21410
We are now able to localize all timestamps. Some examples:
`short-date` format, French, user profile page:

`date-time` format, Portuguese, mirror repository settings page:

Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Signed-off-by: Yarden Shoham <hrsi88@gmail.com >
Co-authored-by: Gusted <williamzijl7@hotmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-10-17 12:08:21 +08:00
d55a0b7238
Refactor i18n
to locale
( #20153 )
...
* Refactor `i18n` to `locale`
- Currently we're using the `i18n` variable naming for the `locale`
struct. This contains locale's specific information and cannot be used
for general i18n purpose, therefore refactoring it to `locale` makes
more sense.
- Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200
* Update routers/install/install.go
2022-06-27 15:58:46 -05:00
9da3d78e74
Replace blue button and label classes with primary ( #19763 )
...
* make blue really blue
* replace blue button and label classes with primary
* add --color-blue-dark
* add light color variants, tweak a few colors
* fix colors
* add comment
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2022-05-20 00:08:08 +02:00
3725fa28cc
Improve UI on mobile ( #19546 )
...
Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience.
- Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row.
- The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that.
- The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row.
- The notification table will now be show a scrollbar instead of overflow.
- The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high.
- The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile.
- Fixes to not overflow the tables but instead force them to be scrollable.
- When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 18:11:21 +02:00
c80d7f33b6
Unified link creation. ( #15619 )
2021-04-30 19:25:13 +02:00
c85bb62635
Replace more icons with SVG, repo search tweaks ( #13860 )
...
* Replace more icons with SVG
- Replace remaining icons on admin page with SVG
- Fix vertical menu background on arc-green
- Minor improvments to frontpage repo search
- More icon replacements here and there
* fix integration
* whitespace tweak
* add comment
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2020-12-09 14:03:19 -05:00
b1cf7f4df1
Add class to page content to unify top margin ( #13766 )
...
* Add class to page content to unify top margin
Previously pages would individually set this margin but some didn't so
content would stick to the header without any space. Resolve this by
adding a new class that is added on all pages. The only place where we
remove this margin again is on the pages with menu or wrapper in the
header.
* fix admin notices
* fix team pages
* fix loading segment on gitgraph for arc-green
* fix last missing case
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2020-11-30 23:00:14 -05:00
ffddf3f8a6
Make SVG size argument optional ( #12814 )
...
Now defaults to 16 on both frontend and backend.
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2020-09-11 16:19:00 -04:00
c86478ec47
[UI] Sortable Tables Header By Click ( #7980 )
...
* [UI] Sortable Tables Header By Click
* get rid of padding above header
* restart CI
* fix lint
* convert getArrow JS to SortArrow go func
* addopt SortArrow funct
* suggestions from @silverwind - tablesort.js
Co-authored-by: silverwind <me@silverwind.io >
* Update web_src/js/features/tablesort.js
Co-authored-by: silverwind <me@silverwind.io >
* Update web_src/js/features/tablesort.js
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: silverwind <me@silverwind.io >
2020-06-24 23:23:05 +01:00
86fdba177a
Add Octicon SVG spritemap ( #10107 )
...
* Add octicon SVG sprite
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Static prefix
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* SVG for all repo icons
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* make vendor
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Swap out octicons
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Move octicons to top of less imports
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Fix JS
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Definitely not a search/replace
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Missed regex
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Move to more generic calls and webpack
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* make svg -> make webpack
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Remove svg-sprite
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Update tests
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Missed a test
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Remove svg from makefile
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Suggestions
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Attempt to fix test
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Update tests
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Revert timetracking test
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Swap .octicon for .svg in less
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Add aria-hidden
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Replace mega-octicon
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Fix webpack globbing on Windows
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Revert
Co-Authored-By: silverwind <me@silverwind.io >
* Fix octions from upstream
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Fix Vue and missed JS function
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Add JS helper and PWA
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Preload SVG
Signed-off-by: jolheiser <john.olheiser@gmail.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: techknowlogick <matti@mdranta.net >
2020-02-11 12:02:41 -05:00
8875586570
Change some label colors ( #9051 )
...
* Change label colors
* Override black basic label background for green theme on label list
2019-12-03 20:39:58 -05:00
64ce159a6e
Allow to set organization visibility (public, internal, private) ( #1763 )
2019-02-18 18:00:27 +02:00
f2e20c81b6
Refactor struct's time to remove unnecessary memory usage ( #3142 )
...
* refactor struct's time to remove unnecessary memory usage
* use AsTimePtr simple code
* fix tests
* fix time compare
* fix template on gpg
* use AddDuration instead of Add
2017-12-11 06:37:04 +02:00
25d6e2a660
Add button to admin ui ( #1738 )
...
* Add button to admin ui
* Update according to review
* Update locale_fr-FR.ini
* Rollback to locale french file
2017-05-19 08:20:41 +08:00
efbb895ebe
Cleaner ui for admin, repo settings, and user settings page ( #1269 ) ( #1270 )
2017-03-15 23:39:38 +01:00
562f9b6eae
Merge all pagination-templates into 'base/paginate'
...
to reduce code-duplicity
2016-11-07 12:44:29 +01:00
1f2e173a74
Refactor User.Id to User.ID
2016-07-24 01:08:22 +08:00
2bf8494332
#13 finish user and repository search
...
Both are possible on explore and admin panel
2016-03-11 15:33:12 -05:00
4108c12092
#2156 add edit org link in admin panel
2015-12-12 15:47:59 -05:00
da2585c11e
Indent all templates with tabs
...
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.
1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
such as {{if}} {{with}}
2. Cleans all trailing white-space
3. Adds trailing last line-break to each file
2015-12-08 00:57:46 +01:00
8966750fd4
add some log
2015-11-21 19:11:57 -05:00
21e13cb51e
#1525 Triggere mailer for admin created accounts
2015-09-25 19:45:44 -04:00
c98dad1cf3
New admin organization UI
2015-09-25 19:54:52 +02:00
7759b9ee6e
Remove the "PHP" style formatting function
...
The "PHP" formatting function doesn't add anything, except an undocumented date format.
All usages in the templates have been replaced with DateFmtShort and DateFmtLong for convenience.
2015-02-16 14:44:27 +02:00
fd70f9ec1b
Fix #799 by adding a tooltip for all dates in all settings/panels
2015-01-02 12:41:05 +02:00
7ba9257a7f
Add suburl support
2014-09-19 20:11:34 -04:00
0055cbd365
Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
...
Conflicts:
modules/setting/setting.go
Conflicts:
templates/repo/release/list.tmpl
templates/user/dashboard/dashboard.tmpl
Conflicts:
routers/repo/setting.go
2014-09-18 20:50:48 +02:00
d2aff9a46a
Continue working on new admin pages
2014-08-29 20:50:43 +08:00