Commit Graph

129 Commits

Author SHA1 Message Date
techknowlogick 590d56dbb3
switch to fomantic-ui (#9374) 2019-12-17 16:34:11 -05:00
silverwind f0aaffeedc Add USE_SERVICE_WORKER setting (#9110)
* Add USE_SERVICE_WORKER setting

This will be very useful setting for anyone doing frontend work.

Fixes: https://github.com/go-gitea/gitea/issues/9044

* prevent potential syntax error on old browsers
2019-11-21 15:06:23 -05:00
silverwind f8bd90ba60 enable lazy-loading of gitgraph.js (#9036)
- moved gitgraph.js to web_src and made it importable and es6-compatible
- created new webpack chunk for gitgraph
- enabled CSS loader in webpack
- enabled async/await syntax via regenerator-runtime
- added script to ensure webpack chunks are loaded correctly
- disable terser's comment extraction to prevent .LICENCE files

gitgraph.js has many issues:

1. it is incompatible with ES6 because of strict-mode violations
1. it does not export anything
1. it's css has weird styles like for `body`
1. it is not available on npm

I fixed points 1-3 in our version so it's now loadable in webpack. We should eventually consider alternatives.
2019-11-17 23:39:06 +02:00
John Olheiser 3e61a9628c Improve OGP (#8637)
* Improve OGP
* Ensure Repo is loaded when checking Pull info

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-10-23 18:54:13 +01:00
Jakob Ackermann 00629fea95 [assets] configurable URL for static resources (#7911)
* static url

* add cors support for static resources

* [assets] work on the migration to configurable url for assets

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [misc] fix whitespace

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [assets] fix the loading of the manifest.json

It is generated dynamically, and as such can not be served by the cdn.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* Revert "add cors support for static resources"

This reverts commit 42f964fd18

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docs] add the STATIC_URL_PREFIX option

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docs] reverse-proxy: nginx: add two setups for STATIC_URL_PREFIX

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [assets] migrate the url of a new asset to the static url prefix

REF: f2a3abc683
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2019-10-22 20:11:01 +08:00
techknowlogick e6161b09ff
Remove trailing slash from twitter card (#6619) 2019-04-14 18:04:43 -04:00
Andreas Shimokawa de6527b371 fix Open Graph og:image link (#6612) 2019-04-14 13:34:29 -04:00
Lunny Xiao ce646fd04b fix bug manifest.json will not request with cookie so that session will created every request (#6372) 2019-03-19 17:02:18 -04:00
mrsdizzie ba2f6a45c8 Include repo name in page title tag (#6343)
Fixes #6265
2019-03-18 22:27:34 -04:00
zeripath d78bb1d564 Add lang specific font stacks for CJK (#6007)
* Add lang specific font stacks

* Force font changes

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix icons

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix octicons and icons

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Just override the semantic ui fonts only

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Missed the headers... override them too

* Missed some more semantic ui stuff

* Fix PT Sans

Signed-off-by: Andrew Thornton <art27@cantab.net>

* More changes

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Squashed commit of the following:

commit 7d1679e9079541359869c9e677ba7412bfcc59f3
Author: Mike L <cl.jeremy@qq.com>
Date:   Wed Mar 13 13:53:49 2019 +0100

    Remove missed YaHei leftover from _home.less

commit 0079121ea91860a323ed4e5cc1a9c0d490d9cefd
Author: Mike L <cl.jeremy@qq.com>
Date:   Wed Mar 13 12:03:54 2019 +0100

    Fix overdone fixes (inherit, :lang)

commit 62c919915928ec1db4731d547e95885f91a0618d
Author: Mike L <cl.jeremy@qq.com>
Date:   Wed Mar 13 02:29:10 2019 +0100

    Fix elements w/ explicit lang (language chooser)

commit b3117587aa2eb8570d60bed583a11ee5565418be
Author: Mike L <cl.jeremy@qq.com>
Date:   Tue Mar 12 20:17:26 2019 +0100

    Fix textarea also (to match body)

commit 81cedf2c3012c4dd05a7680782b4a98e1b947f67
Author: Mike L <cl.jeremy@qq.com>
Date:   Tue Mar 12 19:41:39 2019 +0100

    Revert css temporarily to fix conflict

commit 80ff82797f3203cbeaf866f22e961334e137df89
Author: Mike L <cl.jeremy@qq.com>
Date:   Tue Mar 12 19:15:30 2019 +0100

    Tweak CJK, fix Yu Gothic, more monospace inherits

commit 581dceb9a869646c2c486dabb925c88c2680d70c
Author: Mike L <cl.jeremy@qq.com>
Date:   Mon Mar 11 13:09:26 2019 +0100

    Add Lato for latin extd. & cyrillic, improve CJK

* update stylesheet
2019-03-18 08:49:01 -04:00
silverwind 8e266c3193 UI: Fix race in update issue labels and assignees (#6194)
Fix #6191 

* fix issue update race condition
* fix similar race same race when clearing assignee
* always load promise polyfill
* replace es6-promise with promise-polyfill
* move promise-polyfill to <head>
2019-02-28 22:10:08 +00:00
Lanre Adelowo 8d2c24f7f9 Allow for user specific themes (#5668)
* add migration and basic UI for changing a user's theme

* update user themem

* use right text on button

* load theme based on users' selection

* load theme based on users' selection in pwa too

* update sample config

* delete older theme loading

* implement AfterLoad to set users' theme properly

* set up default theme when creating a user. This uses the installation wide theme

* use flash messages for error

* set default theme when creating a user from the cli

* fix @lunny review
2019-01-09 12:22:57 -05:00
SohnyBohny 294904321c Create Progressive Web App (#4730)
* Create manifest and serviceworker

* Create templates and add AppSubUrl

* Add JSRenderer

* fix ctx type

* Add JSRenderer to static.go

* Complete adding {{AppSubUrl}}

* Add more fonts to urlsToCache

* Add 512px and 192px icons

* Hardcode font MD5

* Default theme doesn't have a specific CSS file
2018-11-27 10:18:26 -05:00
Lauris BH e09fe48773 Refactor heatmap to vue component (#5401) 2018-11-27 10:36:54 +01:00
kolaente 6759237eda User action heatmap (#5131)
* Added basic heatmap data

* Added extra case for sqlite

* Built basic heatmap into user profile

* Get contribution data from api & styling

* Fixed lint & added extra group by statements for all database types

* generated swagger spec

* generated swagger spec

* generated swagger spec

* fixed swagger spec

* fmt

* Added tests

* Added setting to enable/disable user heatmap

* Added locale for loading text

* Removed UseTiDB

* Updated librejs & moment.js

* Fixed import order

* Fixed heatmap in postgresql

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-Authored-By: kolaente <konrad@kola-entertainments.de>

* Added copyright header

* Fixed a bug to show the heatmap for the actual user instead of the currently logged in

* Added integration test for heatmaps

* Added a heatmap on the dashboard

* Fixed timestamp parsing

* Hide heatmap on mobile

* optimized postgresql group by query

* Improved sqlite group by statement
2018-10-23 10:57:42 +08:00
Lukas Bestle e6a03813d4 Extract header and footer content to separate tmpl (#4797)
This change makes it easier to customize the header and footer content. Before this change, the whole header and footer had to be overridden, including the meta, style and script tags.

Signed-off-by: Lukas Bestle <mail@lukasbestle.com>
2018-09-07 10:59:06 +08:00
Piotr Orzechowski 56d931aeac Hide home button when landing page is not set to home (#4651) 2018-08-26 22:23:27 -04:00
techknowlogick f1d6a1fffc
Add the ability to have built in themes in Gitea (#4198)
This makes it easier for user who want to theme but
don't have the ability to know how to customize templates
all that is required is a change in a config option

The reason why I chose the DEFAULT_THEME as variable,
as perhaps in the future we will allow users to chose their
theme whon logged in just like we do with languages
2018-07-05 17:25:04 -04:00
ucodi 4b654ad17f Update notification icon (#4343) 2018-07-03 19:16:46 -04:00
Fluf 85b7fd1e61 Remove dupelicate link (#4100) 2018-06-03 09:14:37 +08:00
Alberto González Palomo 45c264f681 Templates for extra links in top navbar and repo tool tabs. (#3308)
These templates add content to the top navbar
and to the repository page.
This way we do not have to copy and modify the whole
template, and re-modify it after upgrading Gitea if
it changes.

Signed-off-by: Alberto González Palomo <bugs@sentido-labs.com>
2018-01-10 08:19:50 +02:00
Thomas Boerger c4a8d4ce45 Add more additional template snippets (#3286) 2018-01-02 11:32:41 +01:00
Morgan Bazalgette 3d3faa2624 Responsive view (#2750)
* Viewport meta tag

* responsive: dashboard

* responsive: issues page

* responsive: Explore page

* responsive: navbar, and some navbar css refactoring

* responsive: button for collapsing navbar in mobile view

* Mark the hamburger button as active when pressed

* better homepage for responsive views

* Bring back jump class in navbar

The class was necessary, because this way the
dropdown doesn't assume the contents of the
selected item.

* make repository homes responsive

* Make file view page responsive

* Make forms look good on responsive views

* make commits and commit diff view responsive

* issues and PRs

* responsive wiki

* Don't place auto-init far off the page

* Minor changes to amend broken stuff

minor improvements

- make login/sign up in navbar stackable
- make navbar in explore and sign in not stackable

Change selected class in TestPullCompare

Fix typo that happened when rebasing

fix dashboard on org view

improve profile UI

Use clearing on file diff to fix broken UI caused by floating elements

remove unresolved merge conflict, and | Sanitize

Fix repo home not loading
2017-12-30 18:47:52 -06:00
harry 03ec35ed79 Mention completion for issue editor. (#3136)
* new issue mention

* Mention completion on new issue and view issue page.

* Code format.

* Require tribute in pull request page.
2017-12-11 14:03:04 +08:00
techknowlogick b0971ae37c Reduce overhead of upgrades for users with custom stylesheets/JS (#3051) 2017-12-03 02:26:06 +02:00
Bastian Rinsche 638509b217 Add Safari pinned tab icon (#2799)
Closes #2753

Signed-off-by: Bastian Rinsche <bastian.rinsche@gmail.com>
2017-10-28 20:01:42 -05:00
Jorge Maldonado Ventura 8b6236d67b Fix duplicated rel attribute (#2549)
According to the HTML 5.1 recommendation "The rel attribute on a
and area elements controls what kinds of links the elements create.
The attribute’s value must be a set of space-separated tokens."
(source https://www.w3.org/TR/html51/links.html#links-created-by-a-and-area-elements)
2017-09-20 07:20:11 +03:00
Jorge Maldonado Ventura d155d0e665 Make basic functionality work without JavaScript (#2541) 2017-09-19 01:03:01 +02:00
Michael Lustfield a915a09e4f Moved vendored js/css into `public/vendor` and documented sources (#1484) (#2241)
* Cleaning up public/ and documenting js/css libs.

This commit mostly addresses #1484 by moving vendor'ed plugins into a
vendor/ directory and documenting their upstream source and license in
vendor/librejs.html.

This also proves gitea is using only open source js/css libraries which
helps toward reaching #1524.

* Removing unused css file.

The version of this file in use is located at:
  vendor/plugins/highlight/github.css

* Cleaned up librejs.html and added javascript header

A SafeJS function was added to templates/helper.go to allow keeping
comments inside of javascript.

A javascript comment was added in the header of templates/base/head.tmpl
to mark all non-inline source as free.

The librejs.html file was updated to meet the current librejs spec. I
have now verified that the librejs plugin detects most of the scripts
included in gitea and suspect the non-free detections are the result of
a bug in the plugin. I believe this commit is enough to meet the C0.0
requirement of #1534.

* Updating SafeJS function per lint suggestion

* Added VERSIONS file, per request
2017-08-23 16:58:05 +02:00
Morlinest 951fb572a7 Fix and improve dashboard repo UI (#2285)
* Fix and improve dashboard repo UI

* Change order of scripts loading

* Remove "mirror" tab

* Remove single tab panel for "org user"

* Add localization strings

* Create vue component and change event for search

* Add "mirrors" filter
2017-08-17 09:31:34 +08:00
Lauris BH 60d7e56c69 Add task to generate images from SVG and change to new logo (#2194)
* Add makefile task to generate images from SVG and change to new logo

* use absolute path on generate-images
2017-07-28 13:51:20 +08:00
Sondre Nilsen 24859fe5b6 Fix FOUC on Firefox (#1728)
Firefox users will experience a flash of unstyled content on loading
various pages, this patch will fix this issue using Filament Groups
loadCSS library to asynchronously load the CSS responsible for the FOUC.

Will fix #1698.

Signed-off-by: Sondre Nilsen <nilsen.sondre@gmail.com>
2017-05-31 09:05:49 +08:00
Andrey Nering e67ece26f0 Merge pull request #1750 from andreynering/dashboard-search-org-repos
More fixes for dashboard search
2017-05-27 17:40:09 -03:00
Andrey Nering be5323a05f Update HighlightJS and fix YAML files highlighting (#1764)
* Update HighlightJS to 9.11.0

* Fix YAML files highlighting
2017-05-20 11:52:35 +08:00
Andrey Nering dc2b28ed76 Show repos acording to user/organization 2017-05-18 11:28:29 -03:00
Andrey Nering ab79069dc7 Improve dashboard repo search (#1652)
* Add VueJS

* Improve dashboard search

* Fix tab switching

* Fix input autofocus
2017-05-09 08:31:30 +08:00
Jonas 095e1f5155 Support for custom html meta (#1423)
* Support for custom html meta

* Changed html meta description default
2017-03-31 18:03:01 -07:00
Andrew 3f67676059 Implement basic Open Graph support. (#901) 2017-02-11 20:57:33 +08:00
Bo-Yi Wu d078aa30d6 feat: add search repository on dashboard. (#773) 2017-01-30 13:57:47 +08:00
Bo-Yi Wu 2831267db1 refactor: move js to bottom and move css to top. (#689) 2017-01-25 23:15:25 +08:00
Andrey Nering d2bb8ef503 Notifications: trying to get a better layout (#660)
* i18n button titles

* Improvements on notification page layout

* Notification count badge fixes

* Make table <tr> clickable

* Fix octicon aligment

* Fix use of AppSubUrl
2017-01-18 09:18:55 +08:00
Andrey Nering 769e0a3ea6 Notifications: mark as read/unread and pin (#629)
* Use relative URLs

* Notifications - Mark as read/unread

* Feature of pinning a notification

* On view issue, do not mark as read a pinned notification
2017-01-12 12:27:09 +08:00
Andrey Nering 79d527195d Merge pull request #539 from andreynering/notifications-step-2
Notifications - Step 2
2017-01-05 11:53:01 -02:00
Schwobaland c0904f1942 Restrict creating organisations by user (#193)
* restrict creating organizations based on right on user

* revert bindata.go

* reverse vendor lib

* revert goimports change

* set AllowCreateOrganization default value to true

* revert locale

* added default value for AllowCreateOrganization

* fix typo in migration-comment

* fix comment

* add coments in migration
2016-12-31 10:33:30 +08:00
Andrey Nering 6069abe5fd Notifications - Step 2 2016-12-30 16:51:24 -02:00
Andrey Nering b992858883 Tab on user profile to show starred repos (#519)
* Tab on user profile to show starred repos

* Make golint happy and use transactions on StarRepo function

* x -> sess

* Use sess.Close() instead of sess.Rollback()

* Add copyright

* Fix lint
2016-12-29 22:58:24 +08:00
Kjell Kvinge 22e1bd31c6 commithgraph / timeline (#428)
* Add model and tests for graph

* Add route and router for graph

* Add assets for graph

* Add template for graph
2016-12-29 07:44:32 +08:00
Bwko 331316894e Replace Gogs with Gitea (#520) 2016-12-28 16:33:21 +08:00
Avelino d93429af8b Fixed project name on base template head 2016-12-02 07:48:11 +01:00
Bwko 5ab85372da Added rel="noopener" to target="_blank" hrefs (#327)
* Added rel="noopener" to target="_blank" hrefs

* Replaced gogs.io/docs with docs.gitea.io
2016-12-02 09:12:16 +08:00