techknowlogick [Sat, 5 Dec 2020 22:34:29 +0000 (17:34 -0500)]
Add link to shop in docs (#13864)
Replaced link to code.gitea.io as that subdomain isn't meant for human consumption, but rather for our vanity go import URLs
Only replaced link for english, open to adding links for other languages if anyone is able/willing to add them
silverwind [Sat, 5 Dec 2020 11:00:36 +0000 (12:00 +0100)]
Font weight tweaks (#13854)
Font weight 500 is not discernible from 400 on some fonts/operating
systems so push them back to previous value 600 except for
fomantic-ui elements which stay at 500.
silverwind [Fri, 4 Dec 2020 15:01:47 +0000 (16:01 +0100)]
Remove Noto Color Emoji fallback (#13838)
It's causing browser errors logged in Firefox under certain
circumstances, and I think we're better off recommending Linux users to
install a proper emoji font into their system.
silverwind [Fri, 4 Dec 2020 11:18:37 +0000 (12:18 +0100)]
Style and template tweaks (#13828)
* Style and template tweaks
- Get red and green buttons on arc green closer to base theme
- EasyMDE adjustments, toolbar and focus border
- Fix header on 404 repo page
- Tweaks to frontpage search, add 'Create Repo' button
- Fix misaligned box headers
- Fix pagination on arc-green
- Fix background and footer on explore and repo search
silverwind [Thu, 3 Dec 2020 18:46:11 +0000 (19:46 +0100)]
Direct avatar rendering (#13649)
* Direct avatar rendering
This adds new template helpers for avatar rendering which output image
elements with direct links to avatars which makes them cacheable by the
browsers.
This should be a major performance improvment for pages with many avatars.
* fix avatars of other user's profile pages
* fix top border on user avatar name
* uncircle avatars
* remove old incomplete avatar selector
* use title attribute for name and add it back on blame
silverwind [Wed, 2 Dec 2020 01:18:39 +0000 (02:18 +0100)]
Swap swagger-ui with swagger-ui-dist (#13777)
* Swap swagger-ui with swagger-ui-dist
The prebuilt version of swagger-ui is identical to the regular one but
brings the benefit of faster webpack compilation and less npm
dependencies so it npm installs will speed up too.
silverwind [Tue, 1 Dec 2020 04:00:14 +0000 (05:00 +0100)]
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.
silverwind [Mon, 30 Nov 2020 19:52:04 +0000 (20:52 +0100)]
Set RUN_MODE prod by default (#13765)
I think it's a bad default to have "dev" as the default run mode which
enables debugging and now also disables HTTP caching. It's better to
just default to a value suitable for general deployments.
silverwind [Mon, 30 Nov 2020 17:47:01 +0000 (18:47 +0100)]
Fix bogus http requests on diffs (#13760)
The .blob-excerpt elements don't have these data attributes in some
cases resulting in bogus http request when expanding a diff and clicking
into the expanded area. This prevents those.
silverwind [Sun, 29 Nov 2020 23:16:04 +0000 (00:16 +0100)]
Fix webpack build warnings (#13752)
Turns out some of the dependencies make use of optional dependencies
like the vue-template-compiler. Install them again and install
fomantic-ui only when it's being build to fix webpack warnings.
silverwind [Sun, 29 Nov 2020 21:39:36 +0000 (22:39 +0100)]
Update JS dependencies and misc tweaks (#13741)
* Update JS dependencies and misc tweaks
- Update all JS dependencies minus webpack
- Adapt CodeMirrors styling to new CSS parent introduced by EasyMDE
- Set eslint parser to latest and add new eslint 7.14 rule
- Speed up npm install by disabling audit and fund checks
- Move fomantic-ui to optional dependencies to further speed up npm
- Enable syntax highlighting on GH for .eslintrc and .stylelintrc
- Makefile cleanups
silverwind [Sun, 29 Nov 2020 15:52:11 +0000 (16:52 +0100)]
Markdown and Repo header tweaks (#13744)
* Markdown and Repo header tweaks
- Use CSS vars for all markdown colors
- Tweak repo header, removing double borders and adjust sizes
- Use menu instead of buttons for issue open/close switcher
- Add emoji inversion for select emoji glyphs in arc-green
- Use border over box-shadow for all buttons
- Add spacing element to login form without openid
* repo settings navbar fix
* use shared template in more places and adjust dashboard
silverwind [Sun, 29 Nov 2020 06:22:04 +0000 (07:22 +0100)]
Dropdowns, Labels fixes and more CSS tweaks (#13733)
* Dropdowns and Labels fixes
- Rework dropdown, menu and label styles
- Improve issue sidebar milestone and label sections
- Fix archived repo and private org badge
- Move more colors to CSS vars
- Move issue number to end of title on issue page
zeripath [Sat, 28 Nov 2020 21:00:38 +0000 (21:00 +0000)]
Push HEAD instead of master when initialising repositories (#13719)
* Push HEAD instead of master when initialising repositories
It is possible on modern gits to change the initial branch to something other than
master. This breaks initialising repositories because we assume that the initial
branch is going to be master unless specifically changed.
This PR simply bypasses this issue by pushing the HEAD rather than the master branch.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update modules/repository/init.go
silverwind [Sat, 28 Nov 2020 18:29:46 +0000 (19:29 +0100)]
Fix .editorconfig (#13735)
These whitespaces introduced in #13698 seem to break my editorconfig
plugin in sublime text resulting in tab-indented files getting converted
to spaces on save.
Simon [Sat, 28 Nov 2020 17:52:30 +0000 (18:52 +0100)]
Fix missing stylesheets on installation page (#13736)
When running gitea for the first time, the stylesheets for the
installation page are broken since the middleware that statically serves
stylesheets does not get executed by chi. This is because if no handlers
are registered in chi, it will drop all middleware.
This commit introduces a "dummy" handler to deal with that quirk.
Closes #13725
Thanks: Lunny Xiao <xiaolunwen@gmail.com> for finding the quirk
Jesse Laprade [Sat, 28 Nov 2020 01:08:23 +0000 (20:08 -0500)]
Fixed the log path on fail2ban page (#13726)
* Changed path from /home/git/gitea/log/gitea.log to
/var/lib/gitea/log/gitea.log on the fail2ban page, so the log matches
the instructions found on the following binary installation page:
https://docs.gitea.io/en-us/install-from-binary/#create-required-directory-structure
silverwind [Fri, 27 Nov 2020 23:01:33 +0000 (00:01 +0100)]
Enable linting of JS inside templates (#13708)
Indentation-related rules are disabled because indent templates with
tabs but our lint rules expect spaces.
Also had to exclude a few files where using template variables in the JS
is causing syntax errors for the JS parser. I don't think there's a way
to solve this otherwise.
silverwind [Thu, 26 Nov 2020 20:31:09 +0000 (21:31 +0100)]
Prevent clone protocol button flash on page load (#13626)
* Prevent clone protocol button flash on page load
Previously, the saved active buttons would flash on page load because if
delay involved in JS execution. Prevent these flashes bydisabling
transitions on page load and run the script right after. It's not an
ideal solution (which would require server-side storage of user
settings like this) but I'd say better than before.
silverwind [Mon, 23 Nov 2020 22:41:09 +0000 (23:41 +0100)]
Fix heatmap rendering in Chrome and Safari (#13645)
* Fix heatmap rendering in Chrome and Safari
Apparently SVG inside flexbox renders slightly different across browsers
where Firefox would stretch to fit the parent while Chrome and safari
wouldn't. Stretch the SVG to the width of the parent for consistent
rendering.
Also did a few minor tweaks on the min-height of the box so it takes up
less space on smaller responsive breakpoints.
Fixes: https://github.com/go-gitea/gitea/issues/13634 Fixes: https://github.com/go-gitea/gitea/pull/13637
* position tweak
zeripath [Sat, 21 Nov 2020 22:41:24 +0000 (22:41 +0000)]
Handle incomplete diff files properly (#13662)
* Handle incomplete diff files properly
The code for parsing diff hunks has a bug whereby a very long line
in a very long diff would not be completely read leading to an unexpected
character.
This PR ensures that the line is completely cleared
Fix #13602
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Also allow git max line length <4096
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add test case
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Fix issue/pull request list assignee filter (#13647)
* Fixes #13641 - Filtering in Pull Request kept all the time.
- The URL contains all the time the assignee in cases
where once a type has been selected.
Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
* Followup Fixes #13641 - Filtering in Pull Request kept all the time.
- The URL contains all the time the assignee in cases
where once a type has been selected.
- The same behaviour was observed issues viewed via milestones.
Signed-off-by: Karl Heinz Marbaise <kama@soebes.de>
silverwind [Wed, 18 Nov 2020 22:00:16 +0000 (23:00 +0100)]
Remove fetch request from heatmap (#13623)
* Remove fetch request from heatmap
Render heatmap data directly to HTML, eliminating one HTTP request on
frontpage and user profile. Also added min-height to the container so
the page content will no longer move after loading.
* rename and error display
* also log the js error
* add error handler
* remove useless inline style and hide divider on small screens
silverwind [Tue, 17 Nov 2020 22:44:52 +0000 (23:44 +0100)]
HTTP cache rework and enable caching for storage assets (#13569)
This enabled HTTP time-based cache for storage assets, primarily
avatars. I have not observed If-Modified-Since from browsers during
tests but I guess it's good to support regardless.
It introduces a new generic httpcache module that can handle both
time-based and etag-based caching.
Additionally, manifest.json and robots.txt are now also cachable.
silverwind [Tue, 17 Nov 2020 05:02:41 +0000 (06:02 +0100)]
Fix label display on new issues (#13590)
* Fix label display on new issues
PR #13570 broke label rendering for new issues and pulls because
missed the fact that the code was relying on the DOM elements being
toggled by JavaScript.
On top of that, the label rendering for new issues and pull was using
an outdated template which I consolidated in a new shared template.