aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/less
Commit message (Collapse)AuthorAgeFilesLines
* hCaptcha Support (#12594)John Olheiser2020-10-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work on hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use module Signed-off-by: jolheiser <john.olheiser@gmail.com> * Format Signed-off-by: jolheiser <john.olheiser@gmail.com> * At least return and debug log a captcha error Signed-off-by: jolheiser <john.olheiser@gmail.com> * Pass context to hCaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add context to recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * fix lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Finish hcaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update example config Signed-off-by: jolheiser <john.olheiser@gmail.com> * Apply error fix for recaptcha Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change recaptcha ChallengeTS to string Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net>
* Fix formatting of branches ahead-behind on narrow windows (#12989)zeripath2020-10-021-1/+2
| | | | | | | | | | Make the bar-groups width 50% with max-width of 90px Fix #12252 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove code-view class from diff view (#13011)mrsdizzie2020-10-021-0/+1
| | | | | | | | code-view class seems unecessary here as everything needed style wise comes from various diff classes. This allows comments and comment editor to be styled properly and fixes linked bug. Fixes #13010 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Changed width of signature avatar from auto to 16px (#12961)Victor2020-09-281-1/+1
| | | | | Signed-off-by: Victor Roest <victor@xirion.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Adopt repositories (#12920)zeripath2020-09-252-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't automatically delete repository files if they are present Prior to this PR Gitea would delete any repository files if they are present during creation or migration. This can in certain circumstances lead to data-loss and is slightly unpleasant. This PR provides a mechanism for Gitea to adopt repositories on creation and otherwise requires an explicit flag for deletion. PushCreate is slightly different - the create will cause adoption if that is allowed otherwise it will delete the data if that is allowed. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix tests and migrate overwrite Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @lunny Only offer to adopt or overwrite if the user can do that. Allow the site administrator to adopt or overwrite in all circumstances Signed-off-by: Andrew Thornton <art27@cantab.net> * Use setting.Repository.DefaultBranch for the default branch Signed-off-by: Andrew Thornton <art27@cantab.net> * Always set setting.Repository.DefaultBranch Signed-off-by: Andrew Thornton <art27@cantab.net> * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * update templates Signed-off-by: Andrew Thornton <art27@cantab.net> * ensure repo closed Signed-off-by: Andrew Thornton <art27@cantab.net> * Rewrite of adoption as per @6543 and @lunny Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review * update swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * missing not Signed-off-by: Andrew Thornton <art27@cantab.net> * add modals and flash reporting Signed-off-by: Andrew Thornton <art27@cantab.net> * Make the unadopted page searchable Signed-off-by: Andrew Thornton <art27@cantab.net> * Add API Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Handle empty and non-master branched repositories Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * remove commented out code Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix line selection on blame view (#12857)mrsdizzie2020-09-151-1/+1
| | | | | | | Blame and regular code view have diverge slightly so line highlighting wasn't working properly anymore. Make work again in lieu of a larger refactor of blame HTML to move it outside of source and into templates to match code view. Fixes #12836 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix background of signed-commits on arc-green (#12837)zeripath2020-09-141-1/+2
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add a migrate service type switch page (#12697)Lunny Xiao2020-09-092-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a migrat service type switch page * Improve translations * remove images * Fix images * remove extra create repo button on dashboard * Follow reviewers' opinions * Fix frontend lint * Remove wrong submit file * Fix tests * Adjust the size of image * Apply suggestions from code review Co-authored-by: 赵智超 <1012112796@qq.com> * Remove username and password from migration of github/gitlab * Improve docs * Improve interface docs Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* File header tweaks, add CSS helpers (#12635)silverwind2020-09-083-7/+108
| | | | | | | | | - replace two instances of fontawesome with octicons - add new "class" optional argument to "svg" helper - add many new CSS helpers and move their import to the end for increaseed precedence Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Dark theme for line numbers in blame view (#12632)Mike L2020-08-291-2/+4
|
* Avoid unnecessary system-ui expansion (#12522)Mike L2020-08-281-8/+8
| | | | | | | | * Avoid unnecessary system-ui expansion (fix #12325) * extract config to static object Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Apply #12576 to top right reaction picker (#12623)Mike L2020-08-282-13/+10
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Git migration UX (#12619)John Olheiser2020-08-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Implementation Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix gitlab and token cloning Signed-off-by: jolheiser <john.olheiser@gmail.com> * Imports and JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Linting Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move mirror toggle and rename options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix ellipsis in files table (#12617)silverwind2020-08-271-2/+3
| | | | | | | Turns out text ellispsis does not work in combination with flexbox and while wrapping in a display:block can help in some cases, I could not get this to work properly so this changes the truncate to inline-block again and reduces the clickable area to just vertical expansion from the links.
* Extract Swagger CSS to its own file (#12616)silverwind2020-08-261-0/+31
|
* Fix file table overflows (#12603)silverwind2020-08-263-5/+21
| | | | | | | | | - Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reindent Less to 2-space (#12602)silverwind2020-08-2520-5828/+5828
| | | Reindent and unify codebase to 2-space indentation.
* Reaction picker display improvements (#12576)silverwind2020-08-232-7/+28
| | | | | | | | - Remove overly thin font-width on counter - Add hover effect on reaction picker - Change colors on arc-green to green to match the theme Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Increase clickable area on files table links (#12553)silverwind2020-08-231-5/+10
|
* Set z-index for sticky diff box lower (#12537)zeripath2020-08-191-1/+1
| | | | | Fix #12525 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Kanban board (#8346)Lanre Adelowo2020-08-162-0/+94
| | | | | | | | | | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: Kerry <flatline-studios@users.noreply.github.com> Co-authored-by: Jaqra <jaqra@hotmail.com> Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com> Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com> Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Actually fix image diff padding/border (#12381)silverwind2020-08-061-2/+2
| | | | | | | | https://github.com/go-gitea/gitea/pull/12346 was using the wrong selector which affected only the single image view. Use the correct selector for image diffs. Removal of border-radius is still worth to keep to override the global 3px on <img>. Co-authored-by: Lauris BH <lauris@nix.lv>
* Render the git graph on the server (#12333)zeripath2020-08-065-25/+304
| | | | | | | | | | | | | Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation. * This implementation provides a 16 limited color selection * The uniqued color numbers are also provided * And there is also a monochrome version *In addition is a hover highlight that allows users to highlight commits on the same flow. Closes #12209 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: silverwind <me@silverwind.io>
* Add loading spinners and mermaid error handling (#12358)silverwind2020-08-045-7/+75
| | | | | - Add loading spinners on editor and mermaid renderers - Add error handling and inline error box for mermaid - Fix Mermaid rendering by using the .init api
* Various arc-green fixes (#12384)silverwind2020-07-301-6/+27
| | | | | | | | - Fix various white borders - Fix dropdown triangle - Fix tab backgrounds - Fix release page timeline dots Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove padding/border-radius on image diffs (#12346)silverwind2020-07-281-1/+2
|
* Add mermaid JS renderer (#12334)silverwind2020-07-272-0/+12
| | | | | | | | | | | | | | | | | | | * Add mermaid JS renderer For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes. Ref: https://github.com/go-gitea/gitea/issues/3340 Fixes: https://github.com/go-gitea/gitea/issues/12307 * add feature entry, switch to neutral theme, remove border * add bindFunctions support * remove unnecessary border-radius Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Reduce emoji size (#12317)silverwind2020-07-252-20/+5
| | | | | | | | | | * Reduce emoji size Rendering should now pretty much match GitHub with 1.25em. I verified that emojis don't increase the line height and removed unecessary size overrides because now all emojis should appear similar in relation to the font size. * fix reaction hover
* Update Octicons to v10 (#12240)silverwind2020-07-173-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update Octicons to v10 Besides a few renames, these icons are no longer present in v10 that we've used, so had to change: file-symlink-directory -> file-submodule internal-repo -> repo repo-force-push -> repo-push repo-template-private -> repo-template Fixes: https://github.com/go-gitea/gitea/issues/11889 Ref: https://github.com/primer/octicons/releases/tag/v10.0.0 * add custom sliders svg for removed octicon-settings * apply suggestion * fix triangles and use play on admin dashboard * add custom mirror svg * add missing build files * unify custom svgs * move to octicon-repo-clone to gitea-mirror * use octicon-x on conflicts * tweak timeline icons * tweak comment buttons * update settings icon to octicons v1 * switch to octicon-mirror and octicon-tools * replace two wiki buttons with octicons * remove whitespace in svg sources * Fix filepath basename on Windows for SVG bindata (#12241) * move octicons to devDependencies * move back to dependencies * move svgo to devDependencies again Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Replace code fold icons with octicons (#12222)silverwind2020-07-133-33/+50
| | | | | | | | - replace font-awesome icons with octicons - clean up js and css surrounding the code expansion and file folding - fix hover color on arc-green - tweak diff line number colors Co-authored-by: zeripath <art27@cantab.net>
* Make copy/paste work for source code (#12191)mrsdizzie2020-07-081-0/+4
| | | | | | | | | | | | | | | * Make copy/paste work for source code Fix regression casued by #12047 so copy/paste works properly in all browsers. Fixes #12184 Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore. * use pseudo-element to prevent copying of comment + symbol even when not visually selected * remove added newline here should not be necessary anymore * make sure empty line is newline so there is something to select and copy
* Adjust margin-top for repo header label (#12174)Cirno the Strongest2020-07-071-0/+1
|
* Fonts rework (#12114)silverwind2020-07-062-56/+7
| | | | | | | | | | | | | - Use system fonts only for text to avoid FOUT - Move font-awesome to npm/webpack - Move NotoColorEmoji to web_src - Remove presumably unneccesary 'PT Sans Narrow' - Simplify webpack import exclusions Fixes: https://github.com/go-gitea/gitea/issues/11818 Fixes: https://github.com/go-gitea/gitea/pull/11814 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Ensure tabs wrap correctly on user profile page (#12144)George Merlocco2020-07-051-0/+3
| | | Co-authored-by: zeripath <art27@cantab.net>
* Rewrite GitGraph.js (#12137)zeripath2020-07-051-0/+8
| | | | | | | | | | | | | | | | | | | The current vendored gitgraph.js is no longer maintained and is difficult to understand, fix and maintain. This PR completely rewrites its logic - hopefully in a clearer fashion and easier to maintain. It also includes @silverwind's improvements of coloring the commit dots and preventing the flash of incorrect content. Further changes to contemplate in future will be abstracting out of the flows to an object, storing the involved commit references on the flows etc. However, this is probably a required step for this. Replaces #12131 Fixes #11981 (part 3) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Provide option to unlink a fork (#11858)zeripath2020-07-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | * Provide option to unlink a fork Fix #4566 Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * Add check that user can create repo Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @cirnoT Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Improve arc-green code colors (#12111)silverwind2020-07-012-72/+59
| | | | | | | | | | * Improve arc-green code colors This should fix all previous colors that had too few contrast on the background. I took solarized-dark as a baseline and did various improvments. I removed bold/italic flags because I don't think they fit and generally other tools also don't use those font flags. * diff tweak
* Fix merge section in dark theme (#12086)Lauris BH2020-07-011-26/+29
| | | | | * Fix merge section in dark theme * Fix lint
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-015-133/+819
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Server-side syntax hilighting for all code This PR does a few things: * Remove all traces of highlight.js * Use chroma library to provide fast syntax hilighting directly on the server * Provide syntax hilighting for diffs * Re-style both unified and split diffs views * Add custom syntax hilighting styling for both regular and arc-green Fixes #7729 Fixes #10157 Fixes #11825 Fixes #7728 Fixes #3872 Fixes #3682 And perhaps gets closer to #9553 * fix line marker * fix repo search * Fix single line select * properly load settings * npm uninstall highlight.js * review suggestion * code review * forgot to call function * fix test * Apply suggestions from code review suggestions from @silverwind thanks Co-authored-by: silverwind <me@silverwind.io> * code review * copy/paste error * Use const for highlight size limit * Update web_src/less/_repository.less Co-authored-by: Lauris BH <lauris@nix.lv> * update size limit to 1MB and other styling tweaks * fix highlighting for certain diff sections * fix test * add worker back as suggested Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix commit icon position (#12087)Lauris BH2020-06-292-1/+2
|
* Use custom SVGs for commit signing lock icon (#12017)Cirno the Strongest2020-06-281-1/+5
| | | | | | | | | | | | * Use custom SVGs for commit signing lock icon * missing spans * editorconfig * xmlns and remove aria-hidden Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Shorten markdown heading anchors links (#11903)silverwind2020-06-261-63/+33
| | | | | | | | | | | | | | | | | | | | | This changes the links on headings like '# Usage' in markdown from `https://host/user/repo#user-content-usage` to just `https://host/user/repo#usage` matching GitHub and GitLab. The linked id elements still have the prefix and this behaviour matches GitHub and GitLab too, so JS is needed to scroll to the active anchor. I suspect it's like that to avoid namespace collission between user-generated content and other page content. Compatibilty for old links is included so they will continue to work. Also included are some enhancements to make the clickable area for the link icon larger and fix its color on arc-green. Fixes: https://github.com/go-gitea/gitea/issues/11896 Fixes: https://github.com/go-gitea/gitea/issues/12062
* Add org avatar on top of internal repo icon (#11895)Cirno the Strongest2020-06-263-5/+24
| | | | | | | | | | | | | | | | | * Add org avatar on top of internal repo icon * add color for arc-green * use wrapper div to avoid negative margins * rename class and move div * move div to icon tmpl * remove unnecessary margin for lock octicon * fix label align together with #11891 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use Fomantic's fluid padded for blame full width (#12023)Cirno the Strongest2020-06-251-6/+0
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [UI] Sortable Tables Header By Click (#7980)65432020-06-243-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | * [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>
* Don't use -webkit-font-smoothing (#12029)mrsdizzie2020-06-241-1/+0
| | | | | | | Don't change font smoothing via CSS. Linked issue has more details, but this seems fowned upon in general and a was also removed from standards track. Hopefully this will be a part of reverting to a native font stack for Gitea. Fixes #11931 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix sticky diff stats container (#12002)Cirno the Strongest2020-06-222-0/+14
| | | | | | | | | | | | | * Fix sticky diff stats container * Use pure CSS sticky instead of Fomantic's JS * add border color to arc-green * add slight padding on sides * make linter happy Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make tabs smaller (#12003)silverwind2020-06-223-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make tabs smaller Fomantic's tabs are excessively wide and with another tab added on the repo tabbar (https://github.com/go-gitea/gitea/pull/8346) it would break the layout on the english language. Globally reduce tab bar padding to around half of the previous values. * disable no-duplicate-selectors linter rule * more tab bar tweaks * more tweaks * merge rules and nesting * remove arc-green weird hover color * few more arc-green tweaks * restore to 12px * tweaks * use half width height padding * final tweak * 10px * remove min-height * 11px * remve new-menu background on light theme too * background fixes for new-menu Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix missing styling for dropdown icon on review button (#11998)Cirno the Strongest2020-06-221-0/+6
| | | | | | | | * Fix missing styling for dropdown icon on review button * Remove unnecessary span element Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use octicons for all repo header buttons (#11890)Cirno the Strongest2020-06-221-2/+2
| | | | | | | | * Use octicons for all repo header buttons * ensure margin isn't set on any other svg outside repo buttons Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>