summaryrefslogtreecommitdiffstats
path: root/templates/repo/search.tmpl
Commit message (Collapse)AuthorAgeFilesLines
* Unify search boxes (#29530)Denys Konovalov2024-03-141-53/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> ![grafik](https://github.com/go-gitea/gitea/assets/47871822/e20e7d6b-c6be-4a47-b132-672766f41421) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d5b11b9c-c12f-4a29-8fb0-24e5aa511d18) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d86bb444-36c7-426d-9cf1-c634963dffb1) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/a76c0319-0518-484a-a840-563d02b61198) </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>
* Fix wrong line number in code search result (#29260)yp053272024-03-061-14/+1
| | | | | | | | | | | Fix #29136 Before: The result is a table and all line numbers are all in one row. After: Use a separate table column for the line numbers. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove incorrect and unnecessary Escape from templates (#29394)wxiaoguang2024-02-251-1/+1
| | | | | | | | | | | Follow #29165 * some of them are incorrect, which would lead to double escaping (eg: `(print (Escape $.RepoLink)`) * other of them are not necessary, because `Tr` handles strings&HTML automatically Suggest to review by "unified view": https://github.com/go-gitea/gitea/pull/29394/files?diff=unified&w=0
* Remove unnecessary "Str2html" modifier from templates (#29319)wxiaoguang2024-02-221-1/+1
| | | Follow #29165
* Fix 500 error of searching commits (#28576)wxiaoguang2023-12-211-1/+1
| | | | | | Regression of #28454 . Now the string is escaped HTML, so it doesn't need `| Safe`. Fix #28575
* Fix more "locale" usages (#27259)wxiaoguang2023-09-251-2/+2
|
* Always use `ctx.Locale.Tr` inside templates (#27231)delvh2023-09-251-9/+9
|
* Refactor some CSS styles and simplify code (#26771)wxiaoguang2023-08-281-2/+2
| | | | | Refactor some CSS styles and simplify code. Some styles are not in use, remove them.
* Use data-tooltip-content for tippy tooltip (#23649)wxiaoguang2023-03-241-3/+3
| | | | | | | | | | | | | | | | | Follow: * #23574 * Remove all ".tooltip[data-content=...]" Major changes: * Remove "tooltip" class, use "[data-tooltip-content=...]" instead of ".tooltip[data-content=...]" * Remove legacy `data-position`, it's dead code since last Fomantic Tooltip -> Tippy Tooltip refactoring * Rename reaction attribute from `data-content` to `data-reaction-content` * Add comments for some `data-content`: `{{/* used by the form */}}` * Remove empty "ui" class * Use "text color" for SVG icons (a few)
* Fix 'View File' button in code search (#23478)silverwind2023-03-141-3/+3
| | | | | | | | | | | | | | - Right-align 'View File' button - Add 'role' attribute to button link Before: <img width="1148" alt="Screenshot 2023-03-14 at 22 02 16" src="https://user-images.githubusercontent.com/115237/225135954-f06153ec-c222-441e-98ba-0177afff3a7a.png"> After: <img width="1150" alt="Screenshot 2023-03-14 at 22 02 33" src="https://user-images.githubusercontent.com/115237/225135966-323cb695-05ef-4b83-a8ef-05f2b1887090.png"> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove Fomantic-UI's `.hidden` CSS class for menu elements (#22895)wxiaoguang2023-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Like #22851 * All other dropdown menu elements do not have such `hidden` class. * Actually the dropdown menu elements do not need it in HTML, so this PR removes it. * There is already `.ui.dropdown .menu { display: none; }`, so when loading the page, the menu is correctly hidden initially, no need to add any more CSS classes. * The Fomantic UI's `.hidden` class should still exist until there is no its checkbox/dropdown module anymore. The Fomantic UI JS code still addes `hidden` for `ui checkbox` and addes `transition hidden` for `ui menu` at the moment. * This PR also cleans the legacy inline `style`, which is quite hacky and no need anymore. All these dropdown menus work well. I have tested these 5 places: * The code search from User Profile * The issue sidebar to lock issue * The repo search form * The repo setting page: branch list * The repo setting page: merge option list Screenshot: ![image](https://user-images.githubusercontent.com/2114189/218534515-e7dfe291-6765-4e0b-833c-b74f17e30117.png)
* Move helpers to be prefixed with `gt-` (#22879)zeripath2023-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | As discussed in #22847 the helpers in helpers.less need to have a separate prefix as they are causing conflicts with fomantic styles This will allow us to have the `.gt-hidden { display:none !important; }` style that is needed to for the reverted PR. Of note in doing this I have noticed that there was already a conflict with at least one chroma style which this PR now avoids. I've also added in the `gt-hidden` style that matches the tailwind one and switched the code that needed it to use that. Signed-off-by: Andrew Thornton <art27@cantab.net> --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add main landmark to templates and adjust titles (#22670)Felipe Leopoldo Sologuren Gutiérrez2023-02-011-1/+1
| | | | | | | * Add main aria landmark to templates * Adjust some titles to improve understanding of location in navigation Contributed by @Forgejo
* Add user/organization code search (#19977)Lauris BH2022-10-111-3/+3
| | | | | | | Fixes #19925 Screenshots: ![attels](https://user-images.githubusercontent.com/165205/173864718-fe789429-55bc-4cad-808c-9f02f335cddf.png)
* Add whitespace removal inside template curly brackes (#20853)silverwind2022-08-251-6/+6
|
* Refactor `i18n` to `locale` (#20153)Gusted2022-06-271-8/+8
| | | | | | | | | | | * 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
* Automatically pause queue if index service is unavailable (#15066)Lauris BH2022-01-271-40/+48
| | | | | | * Handle keyword search error when issue indexer service is not available * Implement automatic disabling and resume of code indexer queue
* Multiple Escaping Improvements (#17551)zeripath2021-11-161-4/+4
| | | | | | | | | | | | | | There are multiple places where Gitea does not properly escape URLs that it is building and there are multiple places where it builds urls when there is already a simpler function available to use this. This is an extensive PR attempting to fix these issues. 1. The first commit in this PR looks through all href, src and links in the Gitea codebase and has attempted to catch all the places where there is potentially incomplete escaping. 2. Whilst doing this we will prefer to use functions that create URLs over recreating them by hand. 3. All uses of strings should be directly escaped - even if they are not currently expected to contain escaping characters. The main benefit to doing this will be that we can consider relaxing the constraints on user names and reponames in future. 4. The next commit looks at escaping in the wiki and re-considers the urls that are used there. Using the improved escaping here wiki files containing '/'. (This implementation will currently still place all of the wiki files the root directory of the repo but this would not be difficult to change.) 5. The title generation in feeds is now properly escaped. 6. EscapePound is no longer needed - urls should be PathEscaped / QueryEscaped as necessary but then re-escaped with Escape when creating html with locales Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net>
* Issue sidebar and misc css fixes (#15524)silverwind2021-05-161-1/+1
| | | | | | | | | | | - Replace remaining font icons with SVG in issue sidebar - Rework issue due date display - Realign avatar in timeline - Fix font size in repo search and code explore - Consolidate active button styles - Fix loading form on arc-green - Align time tracker buttons vertically Fixes: https://github.com/go-gitea/gitea/issues/15896
* Use semantic dropdown for code search query type (#15276)Mike L2021-04-091-13/+9
| | | | | Add comments to CSS rules Co-authored-by: zeripath <art27@cantab.net>
* [Feature] add precise search type for Elastic Search (#12869)Jui-Nan Lin2021-01-271-5/+15
| | | | | | | | * feat: add type query parameters for specifying precise search * feat: add select dropdown in search box Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Search and Diff CSS enhancements (#14050)silverwind2020-12-201-4/+4
| | | | | | | | | | | | | | | | | | | * Search and Diff CSS enhancements - Use flexbox for language stats - Improve labels and code boxes on repo and code search - Use flexbox on diff header and improve suppressed diff text - Add dedicated color for diff expander * more diff tweaks, less vertical padding on header * more minor tweaks * always show fold icon, image diff improvments * remove margin Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Style and template tweaks (#13828)silverwind2020-12-041-9/+1
| | | | | | | | | | | | | | | * 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 * better fix for header button alignment * add label hover for reactions
* Add class to page content to unify top margin (#13766)silverwind2020-11-301-1/+1
| | | | | | | | | | | | | | | | | | | * 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>
* Change search and filter icons to SVG (#13473)silverwind2020-11-091-1/+1
| | | | | | Unfortunately, the Fomantic CSS relies on i.icon instead of .icon so a wrapper is necessary for these with an accompanying class to center the icon.
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* ui: fix status label on branches list vertical alignment (#11109)赵智超2020-04-171-1/+1
| | | | | change status icon for merged PR to git-merge Signed-off-by: a1012112796 <1012112796@qq.com>
* Fix language label vertical alignment (#11061)silverwind2020-04-131-1/+1
| | | Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add detected file language to code search (#10256)Lauris BH2020-02-201-2/+20
| | | | | | | Move langauge detection to separate module to be more reusable Add option to disable vendored file exclusion from file search Allways show all language stats for search
* Don't warn users about *every* dirty form (#3707)Gerben2018-03-231-1/+1
| | | | | | | | | | | The choice regarding which forms should or should not trigger a warning is subjective. I tried to be consistent and not warn about forms that: - run an action, rather than edit data: search, send an email. - delete data: a warning about losing data would be confusing Note that forms on sign-in pages were already ignored (using a selector, rather than an explicit class on the form element). Fixes #3698.
* Escape search query (#3486)Jonas Franz2018-02-111-1/+1
| | | Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Code/repo search (#2582)Ethan Koenig2017-10-271-0/+49
Indexed search of repository contents (for default branch only)