mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
add code category
This commit is contained in:
parent
3980589b77
commit
e52e42415f
7 changed files with 39 additions and 25 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -11,5 +11,8 @@
|
|||
"[less]": {
|
||||
"editor.tabSize": 2,
|
||||
"editor.insertSpaces": true
|
||||
}
|
||||
},
|
||||
"cSpell.words": [
|
||||
"kvan"
|
||||
]
|
||||
}
|
|
@ -2,7 +2,7 @@ general:
|
|||
# Debug mode, only for development. Is overwritten by ${SEARXNG_DEBUG}
|
||||
debug: false
|
||||
# displayed name
|
||||
instance_name: "SearXNG"
|
||||
instance_name: "KSearch"
|
||||
# For example: https://example.com/privacy
|
||||
privacypolicy_url: false
|
||||
# use true to use your own donation page written in searx/info/en/donate.md
|
||||
|
@ -26,7 +26,7 @@ search:
|
|||
# Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "yandex", "mwmbl",
|
||||
# "seznam", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off
|
||||
# by default.
|
||||
autocomplete: ""
|
||||
autocomplete: "duckduckgo"
|
||||
# minimun characters to type before autocompleter starts
|
||||
autocomplete_min: 4
|
||||
# Default search language - leave blank to detect from browser information or
|
||||
|
@ -111,7 +111,7 @@ ui:
|
|||
# infinite_scroll: When true, automatically loads the next page when scrolling to bottom of the current page.
|
||||
infinite_scroll: false
|
||||
# ui theme
|
||||
default_theme: simple
|
||||
default_theme: kvanDark
|
||||
# center the results ?
|
||||
center_alignment: false
|
||||
# URL prefix of the internet archive, don't forget trailing slash (if needed).
|
||||
|
@ -123,7 +123,7 @@ ui:
|
|||
# results_on_new_tab: false
|
||||
theme_args:
|
||||
# style of simple theme: auto, light, dark
|
||||
simple_style: auto
|
||||
simple_style: dark
|
||||
# Perform search immediately if a category selected.
|
||||
# Disable to select multiple categories at once and start the search manually.
|
||||
search_on_category_select: true
|
||||
|
@ -285,6 +285,7 @@ checker:
|
|||
|
||||
categories_as_tabs:
|
||||
general:
|
||||
code:
|
||||
images:
|
||||
videos:
|
||||
news:
|
||||
|
@ -341,7 +342,7 @@ engines:
|
|||
url_xpath: ./td/h5/a[last()]/@href
|
||||
title_xpath: ./td/h5
|
||||
content_xpath: ./td[h5]/text()
|
||||
categories: it
|
||||
categories: [it, code]
|
||||
timeout: 6.0
|
||||
shortcut: conda
|
||||
disabled: true
|
||||
|
@ -407,7 +408,7 @@ engines:
|
|||
url_xpath: //article[@class="repo-summary"]//a[@class="repo-link"]/@href
|
||||
title_xpath: //article[@class="repo-summary"]//a[@class="repo-link"]
|
||||
content_xpath: //article[@class="repo-summary"]/p
|
||||
categories: [it, repos]
|
||||
categories: [it, repos, code]
|
||||
timeout: 4.0
|
||||
disabled: true
|
||||
shortcut: bb
|
||||
|
@ -554,7 +555,8 @@ engines:
|
|||
- name: docker hub
|
||||
engine: docker_hub
|
||||
shortcut: dh
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
disabled: true
|
||||
|
||||
- name: erowid
|
||||
engine: xpath
|
||||
|
@ -736,7 +738,7 @@ engines:
|
|||
title_query: name_with_namespace
|
||||
content_query: description
|
||||
page_size: 20
|
||||
categories: [it, repos]
|
||||
categories: [it, repos, code]
|
||||
shortcut: gl
|
||||
timeout: 10.0
|
||||
disabled: true
|
||||
|
@ -762,7 +764,7 @@ engines:
|
|||
url_query: html_url
|
||||
title_query: name
|
||||
content_query: description
|
||||
categories: [it, repos]
|
||||
categories: [it, repos, code]
|
||||
shortcut: cb
|
||||
disabled: true
|
||||
about:
|
||||
|
@ -855,7 +857,7 @@ engines:
|
|||
url_xpath: .//a[@class="tm-title__link"]/@href
|
||||
title_xpath: .//a[@class="tm-title__link"]
|
||||
content_xpath: .//div[contains(@class, "article-formatted-body")]
|
||||
categories: it
|
||||
categories: [it, code]
|
||||
timeout: 4.0
|
||||
disabled: true
|
||||
shortcut: habr
|
||||
|
@ -881,7 +883,7 @@ engines:
|
|||
url_xpath: './/div[@class="ans"]//a/@href'
|
||||
content_xpath: './/div[@class="from"]'
|
||||
page_size: 20
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
shortcut: ho
|
||||
about:
|
||||
website: https://hoogle.haskell.org/
|
||||
|
@ -1007,7 +1009,7 @@ engines:
|
|||
url_xpath: .//a[@class="u-url"]/@href
|
||||
title_xpath: .//a[@class="u-url"]
|
||||
content_xpath: .//a[@class="domain"]
|
||||
categories: it
|
||||
categories: [it, code]
|
||||
shortcut: lo
|
||||
timeout: 5.0
|
||||
disabled: true
|
||||
|
@ -1104,7 +1106,7 @@ engines:
|
|||
title_query: package/name
|
||||
content_query: package/description
|
||||
page_size: 25
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
disabled: true
|
||||
timeout: 5.0
|
||||
shortcut: npm
|
||||
|
@ -1128,7 +1130,7 @@ engines:
|
|||
url_query: url
|
||||
title_query: name
|
||||
content_query: description
|
||||
categories: it
|
||||
categories: [it, code]
|
||||
shortcut: man
|
||||
about:
|
||||
website: https://www.mankier.com/
|
||||
|
@ -1218,7 +1220,7 @@ engines:
|
|||
url_query: url
|
||||
title_query: name
|
||||
content_query: description
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
disabled: true
|
||||
timeout: 5.0
|
||||
shortcut: pack
|
||||
|
@ -1294,7 +1296,7 @@ engines:
|
|||
url_xpath: ./div/h3/a/@href
|
||||
title_xpath: ./div/h3/a
|
||||
content_xpath: ./div/div/div[contains(@class,"packages-description")]/span
|
||||
categories: [packages, it]
|
||||
categories: [packages, it, code]
|
||||
timeout: 3.0
|
||||
disabled: true
|
||||
first_page_num: 1
|
||||
|
@ -1321,7 +1323,7 @@ engines:
|
|||
content_xpath: ./p
|
||||
suggestion_xpath: /html/body/main/div/div/div/form/div/div[@class="callout-block"]/p/span/a[@class="link"]
|
||||
first_page_num: 1
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
about:
|
||||
website: https://pypi.org
|
||||
wikidata_id: Q2984686
|
||||
|
@ -1419,13 +1421,13 @@ engines:
|
|||
engine: stackexchange
|
||||
shortcut: st
|
||||
api_site: 'stackoverflow'
|
||||
categories: [it, q&a]
|
||||
categories: [it, q&a, code]
|
||||
|
||||
- name: askubuntu
|
||||
engine: stackexchange
|
||||
shortcut: ubuntu
|
||||
api_site: 'askubuntu'
|
||||
categories: [it, q&a]
|
||||
categories: [it, q&a, code]
|
||||
|
||||
- name: internetarchivescholar
|
||||
engine: internet_archive_scholar
|
||||
|
@ -1436,7 +1438,7 @@ engines:
|
|||
engine: stackexchange
|
||||
shortcut: su
|
||||
api_site: 'superuser'
|
||||
categories: [it, q&a]
|
||||
categories: [it, q&a, code]
|
||||
|
||||
- name: searchcode code
|
||||
engine: searchcode_code
|
||||
|
@ -1873,7 +1875,7 @@ engines:
|
|||
content_xpath: ./span/p
|
||||
suggestion_xpath: /html/body/main/div/div[@class="search__suggestions"]/p/a
|
||||
first_page_num: 1
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
disabled: true
|
||||
about:
|
||||
website: https://rubygems.org/
|
||||
|
@ -2079,7 +2081,7 @@ engines:
|
|||
url_xpath: ./@href
|
||||
title_xpath: ./div[@class="h"]/h4
|
||||
content_xpath: ./div[@class="h"]/p
|
||||
categories: [it, packages]
|
||||
categories: [it, packages, code]
|
||||
disabled: true
|
||||
about:
|
||||
website: https://lib.rs
|
||||
|
@ -2098,7 +2100,7 @@ engines:
|
|||
title_xpath: ./h4/a[2]
|
||||
content_xpath: ./p
|
||||
first_page_num: 1
|
||||
categories: [it, repos]
|
||||
categories: [it, repos, code]
|
||||
disabled: true
|
||||
about:
|
||||
website: https://sr.ht
|
||||
|
@ -2140,7 +2142,7 @@ engines:
|
|||
url_xpath: ./div[@class="SearchSnippet-headerContainer"]/h2/a/@href
|
||||
title_xpath: ./div[@class="SearchSnippet-headerContainer"]/h2/a
|
||||
content_xpath: ./p[@class="SearchSnippet-synopsis"]
|
||||
categories: [packages, it]
|
||||
categories: [packages, it, code]
|
||||
timeout: 3.0
|
||||
disabled: true
|
||||
about:
|
||||
|
|
|
@ -191,6 +191,7 @@ module.exports = function (grunt) {
|
|||
'people-outline': 'node_modules/ionicons/dist/svg/people-outline.svg',
|
||||
'heart-outline': 'node_modules/ionicons/dist/svg/heart-outline.svg',
|
||||
'information-circle-outline': 'src/svg/information-circle-outline.svg',
|
||||
'code-outline': 'src/svg/code.svg',
|
||||
},
|
||||
dest: '../../../templates/kvanDark/icons.html',
|
||||
},
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 8.5 KiB |
6
searx/static/themes/kvanDark/src/svg/code.svg
Normal file
6
searx/static/themes/kvanDark/src/svg/code.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="ion-icon-big" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M7 8l-4 4l4 4" />
|
||||
<path d="M17 8l4 4l-4 4" />
|
||||
<path d="M14 4l-4 16" />
|
||||
</svg>
|
After Width: | Height: | Size: 328 B |
|
@ -1,6 +1,7 @@
|
|||
{% from 'kvanDark/icons.html' import icon_big %}
|
||||
{%- set category_icons = {
|
||||
'general': 'search-outline',
|
||||
'code': 'code-outline',
|
||||
'images': 'image-outline',
|
||||
'videos': 'play-outline',
|
||||
'news': 'newspaper-outline',
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
'people-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>',
|
||||
'heart-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0018 0c96.26-65.34 184.09-143.09 183-252.42-.54-52.67-42.32-96.81-95.08-96.81z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||
'information-circle-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 220h32v116"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M208 340h88"/><path fill="currentColor" stroke="currentColor" stroke-linecap="round" d="M248 130a26 26 0 1026 26 26 26 0 00-26-26z"/></svg>',
|
||||
'code-outline':'<svg class="ion-icon-big" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 8l-4 4l4 4"/><path d="M17 8l4 4l-4 4"/><path d="M14 4l-4 16"/></svg>',
|
||||
|
||||
}
|
||||
-%}
|
||||
|
|
Loading…
Add table
Reference in a new issue