first commit

This commit is contained in:
meaz 2023-03-19 10:58:17 +01:00
commit 81e9690dda
Signed by: meaz
GPG key ID: CD7A47B2F1ED43B4
96 changed files with 7827 additions and 0 deletions

40
README.md Normal file
View file

@ -0,0 +1,40 @@
# Searxng_beetroot
Disroot theme for Searxng.
## How to use
To use this theme, `git clone` it on your computer.
Create a `beetroot` folder in `/var/www/searx/searx/static/themes` and in `/var/www/searx/searx/templates`.
Then, copy the content of `beetroot_static` in `/var/www/searx/searx/static/themes/beetroot` and the content of `beetroot_template` in `/var/www/searx/searx/templates/beetroot`.
Enable the beetroot them by editing `/var/www/searx/searx/settings.yml` and changing:
```
default_theme : beetroot
```
Restart searx: `service uwsgi restart`
## How to edit/change this theme
All changes need to be done to Simple theme and then compiled. So:
- You have clone the upstream repo first: `git clone https://github.com/searxng/searxng.git searx`.
- Copy the `beetroot_static/src/less/definitions.less` and the `beetroot_static/src/less/disroot.less` from the beetroot theme repo to the clone (in `static/themes/simple/src/less/`).
- Edit the `static/themes/simple/src/less/definitions.less` and `static/themes/simple/src/less/disroot.less` files copied in the clone with the colors and rules you want.
- Once finished, build the theme: in searx root-src folder, as the searx user, do `make themes.simple`.
- Copy the content of the `static/themes/simple/css` folder obtained in the clone back to this repo (if you didn't change any images, you don't have to copy the `images` folder again). Don't forget to also copy `definitions.less` and `disroot.less`, if you changed those, back to the beetroot repo.
If you want to test in live mode all your changes to the `Simple` theme, do `LIVE_THEME=simple make run` from searx-src folder and edit the `static/themes/simple/src/less/definitions.less` and `static/themes/simple/src/less/disroot.less` files as you wish.
## Screenshots
### Light mode
![Light mode](img/Light01.png)
![Light mode](img/Light02.png)
![Light mode](img/Light03.png)
### Dark mode
![Dark mode](img/Dark01.png)
![Dark mode](img/Dark02.png)
![Dark mode](img/Dark03.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View file

@ -0,0 +1,656 @@
/* required styles */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
width: auto;
padding: 0;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
svg.leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline-offset: 1px;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
}
/* general typography */
.leaflet-container {
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.8);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
line-height: 1.4;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline;
}
.leaflet-attribution-flag {
display: inline !important;
vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
white-space: nowrap;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.8);
text-shadow: 1px 1px #fff;
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 24px 13px 20px;
line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
min-height: 1px;
}
.leaflet-popup-content p {
margin: 17px 0;
margin: 1.3em 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-top: -1px;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
border: none;
text-align: center;
width: 24px;
height: 24px;
font: 16px/24px Tahoma, Verdana, sans-serif;
color: #757575;
text-decoration: none;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
}
.leaflet-popup-scrolled {
overflow: auto;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
-ms-zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-interactive {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
beetroot_static/css/searxng.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,307 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
module.exports = function (grunt) {
const eachAsync = require('each-async');
function file_exists (filepath) {
// filter function to exit grunt task with error if a (src) file not exists
if (!grunt.file.exists(filepath)) {
grunt.fail.fatal('Could not find: ' + filepath, 42);
} else {
return true;
}
}
grunt.initConfig({
_brand: '../../../../src/brand',
_templates: '../../../templates',
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
files: ['gruntfile.js', 'src/**'],
tasks: [
'eslint',
'copy',
'uglify',
'less',
'image',
'svg2png',
'svg2jinja'
]
}
},
eslint: {
options: {
overrideConfigFile: '.eslintrc.json',
failOnError: true,
fix: grunt.option('fix')
},
target: [
'gruntfile.js',
'svg4web.svgo.js',
'src/js/main/*.js',
'src/js/head/*.js',
],
},
stylelint: {
options: {
formatter: 'unix',
},
src: [
'src/less/**/*.less',
]
},
copy: {
js: {
expand: true,
cwd: './node_modules',
dest: './js/',
flatten: true,
filter: 'isFile',
timestamp: true,
src: [
'./leaflet/dist/leaflet.js',
]
},
css: {
expand: true,
cwd: './node_modules',
dest: './css/',
flatten: true,
filter: 'isFile',
timestamp: true,
src: [
'./leaflet/dist/leaflet.css',
]
},
leaflet_images: {
expand: true,
cwd: './node_modules',
dest: './css/images/',
flatten: true,
filter: 'isFile',
timestamp: true,
src: [
'./leaflet/dist/images/*.png',
]
},
},
uglify: {
options: {
output: {
comments: 'some'
},
ie8: false,
warnings: true,
compress: false,
mangle: true,
sourceMap: {
includeSources: true
}
},
dist: {
files: {
'js/searxng.head.min.js': ['src/js/head/*.js'],
'js/searxng.min.js': [
'src/js/main/*.js',
'./node_modules/autocomplete-js/dist/autocomplete.js'
]
}
}
},
less: {
production: {
options: {
paths: ["less"],
plugins: [
new (require('less-plugin-clean-css'))()
],
sourceMap: true,
sourceMapURL: (name) => { const s = name.split('/'); return s[s.length - 1] + '.map'; },
outputSourceFiles: true,
},
files: [
{
src: ['src/less/style-ltr.less'],
dest: 'css/searxng.min.css',
nonull: true,
filter: file_exists,
},
{
src: ['src/less/style-rtl.less'],
dest: 'css/searxng-rtl.min.css',
nonull: true,
filter: file_exists,
},
],
},
},
image: {
svg4web: {
options: {
svgo: ['--config', 'svg4web.svgo.js']
},
files: {
'<%= _templates %>/simple/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg',
'img/searxng.svg': '<%= _brand %>/searxng.svg',
'img/img_load_error.svg': '<%= _brand %>/img_load_error.svg'
}
},
favicon: {
options: {
svgo: ['--config', 'svg4favicon.svgo.js']
},
files: {
'img/favicon.svg': '<%= _brand %>/searxng-wordmark.svg'
}
},
},
svg2png: {
favicon: {
files: {
'img/favicon.png': '<%= _brand %>/searxng-wordmark.svg',
'img/searxng.png': '<%= _brand %>/searxng.svg',
}
}
},
svg2jinja: {
all: {
src: {
'warning': 'node_modules/ionicons/dist/svg/alert-outline.svg',
'close': 'node_modules/ionicons/dist/svg/close-outline.svg',
'chevron-up-outline': 'node_modules/ionicons/dist/svg/chevron-up-outline.svg',
'chevron-right': 'node_modules/ionicons/dist/svg/chevron-forward-outline.svg',
'chevron-left': 'node_modules/ionicons/dist/svg/chevron-back-outline.svg',
'menu-outline': 'node_modules/ionicons/dist/svg/settings-outline.svg',
'ellipsis-vertical-outline': 'node_modules/ionicons/dist/svg/ellipsis-vertical-outline.svg',
'magnet-outline': 'node_modules/ionicons/dist/svg/magnet-outline.svg',
'globe-outline': 'node_modules/ionicons/dist/svg/globe-outline.svg',
'search-outline': 'node_modules/ionicons/dist/svg/search-outline.svg',
'image-outline': 'node_modules/ionicons/dist/svg/image-outline.svg',
'play-outline': 'node_modules/ionicons/dist/svg/play-outline.svg',
'newspaper-outline': 'node_modules/ionicons/dist/svg/newspaper-outline.svg',
'location-outline': 'node_modules/ionicons/dist/svg/location-outline.svg',
'musical-notes-outline': 'node_modules/ionicons/dist/svg/musical-notes-outline.svg',
'layers-outline': 'node_modules/ionicons/dist/svg/layers-outline.svg',
'school-outline': 'node_modules/ionicons/dist/svg/school-outline.svg',
'file-tray-full-outline': 'node_modules/ionicons/dist/svg/file-tray-full-outline.svg',
'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',
},
dest: '../../../templates/simple/icons.html',
},
},
});
grunt.registerMultiTask('svg2jinja', 'Create Jinja2 macro', function () {
const ejs = require('ejs'), svgo = require('svgo');
const icons = {}
for (const iconName in this.data.src) {
const svgFileName = this.data.src[iconName];
try {
const svgContent = grunt.file.read(svgFileName, { encoding: 'utf8' })
const svgoResult = svgo.optimize(svgContent, {
path: svgFileName,
multipass: true,
plugins: [
{
name: "removeTitle",
},
{
name: "removeXMLNS",
},
{
name: "addAttributesToSVGElement",
params: {
attributes: [
{ "aria-hidden": "true" }
]
}
}
]
});
icons[iconName] = svgoResult.data.replace("'", "\\'");
} catch (err) {
grunt.log.error(err);
}
}
const template = `{# this file was generated by searx/static/themes/simple/gruntfile.js #}
{%- set icons = {
<% for (const iconName in icons) { %> '<%- iconName %>':'<%- icons[iconName] %>',
<% } %>
}
-%}
{% macro icon(action, alt) -%}
{{ icons[action] | replace("ionicon", "ion-icon") | safe }}
{%- endmacro %}
{% macro icon_small(action) -%}
{{ icons[action] | replace("ionicon", "ion-icon-small") | safe }}
{%- endmacro %}
{% macro icon_big(action, alt) -%}
{{ icons[action] | replace("ionicon", "ion-icon-big") | safe }}
{%- endmacro %}
`;
const result = ejs.render(template, { icons });
grunt.file.write(this.data.dest, result, { encoding: 'utf8' });
grunt.log.ok(this.data.dest + " created");
});
grunt.registerMultiTask('svg2png', 'Convert SVG to PNG', function () {
const sharp = require('sharp'), done = this.async();
eachAsync(this.files, async (file, _index, next) => {
try {
if (file.src.length != 1) {
next("this task supports only one source per destination");
}
const info = await sharp(file.src[0])
.png({
force: true,
compressionLevel: 9,
palette: true,
})
.toFile(file.dest);
grunt.log.ok(file.dest + ' created (' + info.size + ' bytes, ' + info.width + 'px * ' + info.height + 'px)');
next();
} catch (error) {
grunt.fatal(error);
next(error);
}
}, error => {
if (error) {
grunt.fatal(error);
done(error);
} else {
done();
}
});
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-image');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-stylelint');
grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('test', ['eslint']);
grunt.registerTask('default', [
'eslint',
'stylelint',
'copy',
'uglify',
'less',
'image',
'svg2png',
'svg2jinja',
]);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="92mm"
height="92mm"
viewBox="0 0 92 92"
version="1.1"
id="svg283"
sodipodi:docname="favicon.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
inkscape:export-filename="favicon.png"
inkscape:export-xdpi="72.058701"
inkscape:export-ydpi="72.058701"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs287" />
<sodipodi:namedview
id="namedview285"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="2.2805933"
inkscape:cx="187.45122"
inkscape:cy="180.87399"
inkscape:window-width="1920"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg283" />
<g
id="g12851-2"
transform="matrix(0.27333337,0,0,0.27333337,-18.69294,-5.0517884)"
style="stroke:#50152c;stroke-opacity:0.992157"
inkscape:export-filename="/home/fekete/Nextcloud-Antilopa/Disroot/Artwork/Icons/new_pngs/search.png"
inkscape:export-xdpi="1080.73"
inkscape:export-ydpi="1080.73">
<path
inkscape:connector-curvature="0"
id="path3814-0-7-1"
d="m 80.033739,36.455764 c -7.11959,15.242893 -10.17798,31.779192 -8.22563,48.814566 5.01677,43.77413 41.675291,79.3245 91.536091,95.16289 -6.62576,-22.40752 -5.34093,-44.9362 2.6395,-65.84431 C 118.24672,100.40622 84.338699,71.780528 80.033739,36.455764 Z"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<path
inkscape:connector-curvature="0"
id="path3814-0-8"
d="m 313.2893,37.799153 c 7.11959,15.242893 10.17798,31.779192 8.22563,48.814566 -5.01677,43.774131 -41.67531,79.324501 -91.53611,95.162891 6.62576,-22.40752 5.34093,-44.9362 -2.6395,-65.84431 47.73698,-14.18269 81.64502,-42.808383 85.94998,-78.133147 z"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<path
inkscape:connector-curvature="0"
id="rect3804-7"
d="m 201.77833,175.2842 12.07511,-13.9057 c 4.0785,-4.69679 19.95774,2.45971 35.60368,16.04598 l 130.50177,113.32219 c 15.64593,13.58626 24.95835,28.30512 20.87985,33.00192 l -12.07512,13.9057 c -4.07849,4.69679 -19.95774,-2.45971 -35.60367,-16.04598 L 222.65818,208.28612 C 207.01224,194.69986 197.69983,179.981 201.77833,175.2842 Z"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<circle
r="107.58125"
cy="149.35568"
cx="196.89389"
id="path2987-9"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<circle
r="72.430138"
cy="149.10315"
cx="196.64131"
id="path3757-9-0"
style="fill:#ffffff;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-width:0.713454;stroke-opacity:0.992157" />
<circle
r="27.274118"
cy="150.79912"
cx="197.85327"
id="path3800-2"
style="fill:#50132a;fill-opacity:1;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<circle
r="5.5558391"
cy="141.34952"
cx="208.98526"
id="path3802-3"
style="fill:#ffffff;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="92mm"
height="92mm"
viewBox="0 0 92 92"
version="1.1"
id="svg283"
sodipodi:docname="favicon (copie).svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
inkscape:export-filename="favicon.png"
inkscape:export-xdpi="72.058701"
inkscape:export-ydpi="72.058701"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs287" />
<sodipodi:namedview
id="namedview285"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="2.2805933"
inkscape:cx="187.67046"
inkscape:cy="181.75095"
inkscape:window-width="1920"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g12851-2" />
<g
id="g12851-2"
transform="matrix(0.27333337,0,0,0.27333337,-18.69294,-5.0517884)"
style="stroke:#50152c;stroke-opacity:0.992157"
inkscape:export-filename="/home/fekete/Nextcloud-Antilopa/Disroot/Artwork/Icons/new_pngs/search.png"
inkscape:export-xdpi="1080.73"
inkscape:export-ydpi="1080.73">
<path
inkscape:connector-curvature="0"
id="path3814-0-7-1"
d="m 80.033739,36.455764 c -7.11959,15.242893 -10.17798,31.779192 -8.22563,48.814566 5.01677,43.77413 41.675291,79.3245 91.536091,95.16289 -6.62576,-22.40752 -5.34093,-44.9362 2.6395,-65.84431 C 118.24672,100.40622 84.338699,71.780528 80.033739,36.455764 Z"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<path
inkscape:connector-curvature="0"
id="path3814-0-8"
d="m 313.2893,37.799153 c 7.11959,15.242893 10.17798,31.779192 8.22563,48.814566 -5.01677,43.774131 -41.67531,79.324501 -91.53611,95.162891 6.62576,-22.40752 5.34093,-44.9362 -2.6395,-65.84431 47.73698,-14.18269 81.64502,-42.808383 85.94998,-78.133147 z"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<path
inkscape:connector-curvature="0"
id="rect3804-7"
d="m 201.77833,175.2842 12.07511,-13.9057 c 4.0785,-4.69679 19.95774,2.45971 35.60368,16.04598 l 130.50177,113.32219 c 15.64593,13.58626 24.95835,28.30512 20.87985,33.00192 l -12.07512,13.9057 c -4.07849,4.69679 -19.95774,-2.45971 -35.60367,-16.04598 L 222.65818,208.28612 C 207.01224,194.69986 197.69983,179.981 201.77833,175.2842 Z"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<circle
r="107.58125"
cy="149.35568"
cx="196.89389"
id="path2987-9"
style="fill:#50142b;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-opacity:0.992157" />
<circle
r="72.430138"
cy="149.10315"
cx="196.64131"
id="path3757-9-0"
style="fill:#ffffff;fill-opacity:0.992157;fill-rule:nonzero;stroke:#50152c;stroke-width:0.713454;stroke-opacity:0.992157" />
<text
xml:space="preserve"
style="font-weight:bold;font-size:25.055px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans Bold';text-align:center;text-anchor:middle;fill:#50162d;stroke-width:6.19641"
x="199.42154"
y="198.21521"
id="text402"><tspan
sodipodi:role="line"
id="tspan400"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:150.33px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:6.19641"
x="199.42154"
y="198.21521">?</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="853.677"
height="146.304"
viewBox="0 0 225.869 38.71"
version="1.1"
id="svg6"
sodipodi:docname="searxng.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
inkscape:export-filename="searxng.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs10" />
<sodipodi:namedview
id="namedview8"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="1.017006"
inkscape:cx="426.74283"
inkscape:cy="81.120468"
inkscape:window-width="1920"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg6" />
<g
aria-label="SearXNG"
style="line-height:1.25;fill:#50162d;fill-opacity:1"
font-style="normal"
font-weight="400"
font-size="50.8px"
font-family="sans-serif"
fill="#487cff"
fill-opacity="1"
stroke="none"
stroke-width=".264583"
id="g4">
<path
d="M56.494 102.704q-1.168-1.22-3.048-2.032-1.88-.813-4.42-.813-3.15 0-5.08 1.32-1.93 1.27-1.93 3.455 0 2.337 3.708 3.607l7.671 2.641q3.963 1.321 5.842 3.404 1.88 2.083 1.88 5.13 0 4.065-2.185 7.011-2.184 2.896-5.943 4.42-3.76 1.524-8.484 1.524-5.334 0-9.042-1.778-3.709-1.829-5.537-5.131-.204-.356-.204-.711 0-.356.407-.61l4.013-2.438q.356-.254.762-.254.61 0 1.118.66 1.32 1.626 2.387 2.54 1.118.864 2.693 1.321 1.625.457 4.165.457 3.2 0 5.182-1.168 1.981-1.22 1.981-3.76 0-1.27-.914-2.082-.915-.864-2.947-1.575l-7.417-2.49q-3.657-1.218-5.588-3.555-1.88-2.388-1.88-5.436 0-3.759 2.134-6.655 2.134-2.895 5.69-4.47 3.607-1.575 7.874-1.575 4.369 0 7.67 1.575 3.354 1.524 5.182 3.962.407.508.407.762t-.356.458l-4.52 2.997q-.052.05-.204.05-.305 0-1.067-.761zM77.004 132.37q-3.607 0-6.401-1.472-2.794-1.474-4.318-4.115-1.524-2.693-1.524-6.198 0-4.165 1.981-7.874 2.032-3.759 5.537-5.994 3.556-2.286 7.925-2.286 5.334 0 8.484 3.15 3.15 3.149 3.15 8.686 0 1.473-.204 2.845-.101.406-.355.61-.204.152-.813.152h-17.12q-.813 0-.813 2.184 0 2.388 1.524 3.709 1.575 1.27 4.064 1.27 1.93 0 3.607-.813 1.677-.813 3.302-2.54.254-.254.508-.254.153 0 .66.203l3.353 1.575q.61.203.61.66 0 .254-.254.66-2.946 3.303-5.893 4.573-2.895 1.27-7.01 1.27zm6.451-16.56q1.22 0 1.22-1.981 0-1.93-1.169-3.251-1.168-1.372-3.251-1.372-2.54 0-4.521 1.93-1.93 1.88-2.235 4.674zM109.411 129.374q-3.048 2.997-8.331 2.997-3.556 0-5.588-1.829t-2.032-4.775q0-3.607 2.387-5.893 2.388-2.337 5.995-3.353 3.657-1.067 7.569-1.168l1.829-.153q.965 0 1.117-.965l.153-1.067q.05-.254.05-.812 0-3.048-3.505-3.048-4.013 0-5.943 3.15-.254.355-.66.355-.305 0-.458-.051l-4.927-1.168q-.508-.102-.508-.66 0-.509.254-1.017 3.352-5.486 12.649-5.486 5.486 0 8.026 1.93 2.591 1.93 2.591 5.334 0 .457-.102 1.473l-2.54 17.78q-.05.66-.203.813-.152.102-.711.102h-5.232q-.508 0-.66-.305-.153-.305-.204-1.016l.05-1.32q0-.407-.253-.407-.254 0-.813.559zm2.184-9.754v-.305q0-.203-.101-.254-.102-.101-.407-.05l-1.828.152q-2.947.203-5.487 1.473t-2.54 3.912q0 1.219.864 1.98.914.712 2.438.712 1.321 0 2.49-.356 1.168-.406 2.031-1.066 1.88-1.423 2.083-2.896zM123.864 131.863q-.61 0-.915-.356-.254-.355-.152-.914l3.505-24.943q.05-.457.152-.559.153-.152.56-.152h6.044q.915 0 .712 1.067l-.356 2.286v.203q0 .355.203.355.153 0 .457-.304 1.778-1.88 3.963-2.998 2.184-1.117 3.962-1.117 1.067 0 1.575.152.508.153.457.61l-.813 5.69q-.05.558-.203.71-.101.153-.406.102-1.727-.254-3.455-.254-1.32 0-2.794.711-1.473.66-2.54 1.778-1.016 1.067-1.168 2.134l-2.083 14.834q-.101.66-.355.812-.204.153-.966.153zM176.481 130.085q.457.813.457 1.219 0 .305-.254.457-.254.102-.762.102h-7.06q-.61 0-.966-.153-.305-.152-.508-.61l-5.639-11.734q-.254-.508-.508-.508-.152 0-.559.559l-9.042 11.836q-.254.407-.61.508-.304.102-1.066.102h-5.944q-1.016 0-1.016-.66 0-.458.762-1.525l13.005-16.306q.559-.61.559-1.067 0-.356-.102-.559l-8.484-16.56q-.152-.255-.152-.509 0-.508.762-.508h7.417q.66 0 .914.153.254.152.508.66l4.928 10.363q.152.407.355.407.204 0 .508-.407l8.027-10.566q.305-.407.559-.508.304-.102.965-.102h6.553q.61 0 .61.559 0 .406-.305.914l-12.599 15.647q-.508.66-.508.914 0 .203.153.508zM218.113 94.17q.355 0 .457.202.101.153.05.56l-5.13 36.372q-.05.356-.254.457-.153.102-.559.102h-5.182q-.66 0-1.168-.813l-13.106-22.708q-.153-.254-.305-.254-.305 0-.356.56l-3.15 22.402q-.1.508-.304.66-.153.153-.711.153h-5.588q-.813 0-.712-1.118l5.08-35.814q.102-.508.204-.61.152-.152.66-.152h6.147q.508 0 .762.254.305.203.559.711l11.988 21.184q.254.406.508.406.407 0 .458-.61l2.946-21.284q.05-.407.203-.508.203-.153.66-.153zM236.44 132.37q-4.572 0-7.925-1.93-3.353-1.93-5.131-5.435-1.727-3.556-1.727-8.331 0-6.3 2.489-11.532 2.49-5.283 7.061-8.382 4.572-3.099 10.516-3.099 4.064 0 7.163 1.575 3.15 1.575 4.876 4.166 1.728 2.54 1.83 5.435 0 .508-.102.762-.051.203-.254.254l-6.96 1.016h-.05q-.204 0-.356-.254-.102-.254-.254-1.016-.356-2.54-1.93-4.115-1.525-1.574-4.319-1.574-3.607 0-5.994 2.641-2.337 2.642-3.455 6.807-1.117 4.115-1.117 8.586 0 4.368 1.625 6.299 1.677 1.88 4.877 1.88 3.099 0 5.233-1.728 2.133-1.727 3.15-4.216l.304-1.423q.152-.254.152-.355 0-.305-.61-.305h-6.248q-.304 0-.406-.102-.102-.152-.05-.558l.456-4.166q.051-.559.508-.559l14.53.051q.609 0 .761.203.203.153.102.66l-2.49 17.577q-.05.66-.812.66h-1.524q-.457 0-.711-.152-.204-.152-.356-.61l-.864-3.708q-.05-.254-.355-.254t-.66.407q-1.677 2.083-4.37 3.454-2.692 1.372-6.603 1.372z"
style="-inkscape-font-specification:'Libre Franklin';fill:#50162d;fill-opacity:1"
transform="translate(-29.722 -93.661)"
font-style="normal"
font-variant="normal"
font-weight="400"
font-stretch="normal"
font-size="50.8px"
font-family="Libre Franklin"
fill="#487cff"
fill-opacity="1"
stroke-width=".264583"
id="path2" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
(function(t,e){"use strict";var s=e.currentScript||function(){var t=e.getElementsByTagName("script");return t[t.length-1]}();t.searxng={settings:JSON.parse(atob(s.getAttribute("client_settings")))};var n=e.getElementsByTagName("html")[0];n.classList.remove("no-js");n.classList.add("js")})(window,document);
//# sourceMappingURL=searxng.head.min.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"searxng.head.min.js","sources":["../src/js/head/00_init.js"],"sourcesContent":["/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d) {\n 'use strict';\n\n // add data- properties\n var script = d.currentScript || (function () {\n var scripts = d.getElementsByTagName('script');\n return scripts[scripts.length - 1];\n })();\n\n w.searxng = {\n settings: JSON.parse(atob(script.getAttribute('client_settings')))\n };\n\n // update the css\n var hmtlElement = d.getElementsByTagName(\"html\")[0];\n hmtlElement.classList.remove('no-js');\n hmtlElement.classList.add('js');\n\n})(window, document);\n"],"names":["w","d","script","currentScript","scripts","getElementsByTagName","length","searxng","settings","JSON","parse","atob","getAttribute","hmtlElement","classList","remove","add","window","document"],"mappings":"CACA,SAAWA,EAAGC,gBAIZ,IAAIC,EAASD,EAAEE,eAAkB,WAC/B,IAAIC,EAAUH,EAAEI,qBAAqB,UACrC,OAAOD,EAAQA,EAAQE,OAAS,GAFD,GAKjCN,EAAEO,QAAU,CACVC,SAAUC,KAAKC,MAAMC,KAAKT,EAAOU,aAAa,sBAIhD,IAAIC,EAAcZ,EAAEI,qBAAqB,QAAQ,GACjDQ,EAAYC,UAAUC,OAAO,SAC7BF,EAAYC,UAAUE,IAAI,OAhB5B,CAkBGC,OAAQC"}

18
beetroot_static/js/searxng.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,39 @@
{
"devDependencies": {
"eslint": "^8.18.0",
"grunt": "~1.6.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^4.0.0",
"grunt-contrib-less": "~3.0.0",
"grunt-contrib-uglify": "~5.2.1",
"grunt-xmlmin": "~0.1.8",
"grunt-contrib-watch": "~1.1.0",
"grunt-eslint": "^24.0.0",
"grunt-stylelint": "^0.16.0",
"grunt-image": "^6.4.0",
"ionicons": "^6.0.2",
"less": "^4.1.3",
"less-plugin-clean-css": "^1.5.1",
"sharp": "^0.31.0",
"stylelint": "^13.13.1",
"stylelint-config-standard": "^22.0.0",
"ejs": "^3.1.8",
"svgo": "^3.0.0"
},
"dependencies": {
"autocomplete-js": "2.7.1",
"leaflet": "^1.8.0",
"normalize.css": "^8.0.1"
},
"scripts": {
"all": "npm install && grunt",
"build": "grunt",
"test": "grunt test",
"eslint": "grunt eslint",
"eslint-fix": "grunt eslint --fix",
"watch": "grunt watch",
"clean": "rm -Rf node_modules package-lock.json",
"stylelint": "grunt stylelint",
"stylelint-fix": "grunt stylelint --fix"
}
}

View file

@ -0,0 +1,99 @@
/*
this file is generated automatically by searxng_extra/update/update_pygments.py
using pygments version 2.14.0
*/
.code-highlight .linenos {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
&::selection {
background: transparent; /* WebKit/Blink Browsers */
}
&::-moz-selection {
background: transparent; /* Gecko Browsers */
}
margin-right: 8px;
text-align: right;
}
.code-highlight pre { line-height: 125%; }
.code-highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
.code-highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
.code-highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.code-highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.code-highlight .hll { background-color: #ffffcc }
.code-highlight { background: #f8f8f8; }
.code-highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
.code-highlight .err { border: 1px solid #FF0000 } /* Error */
.code-highlight .k { color: #008000; font-weight: bold } /* Keyword */
.code-highlight .o { color: #666666 } /* Operator */
.code-highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.code-highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.code-highlight .cp { color: #9C6500 } /* Comment.Preproc */
.code-highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.code-highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.code-highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.code-highlight .gd { color: #A00000 } /* Generic.Deleted */
.code-highlight .ge { font-style: italic } /* Generic.Emph */
.code-highlight .gr { color: #E40000 } /* Generic.Error */
.code-highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.code-highlight .gi { color: #008400 } /* Generic.Inserted */
.code-highlight .go { color: #717171 } /* Generic.Output */
.code-highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.code-highlight .gs { font-weight: bold } /* Generic.Strong */
.code-highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.code-highlight .gt { color: #0044DD } /* Generic.Traceback */
.code-highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.code-highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.code-highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.code-highlight .kp { color: #008000 } /* Keyword.Pseudo */
.code-highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.code-highlight .kt { color: #B00040 } /* Keyword.Type */
.code-highlight .m { color: #666666 } /* Literal.Number */
.code-highlight .s { color: #BA2121 } /* Literal.String */
.code-highlight .na { color: #687822 } /* Name.Attribute */
.code-highlight .nb { color: #008000 } /* Name.Builtin */
.code-highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.code-highlight .no { color: #880000 } /* Name.Constant */
.code-highlight .nd { color: #AA22FF } /* Name.Decorator */
.code-highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
.code-highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.code-highlight .nf { color: #0000FF } /* Name.Function */
.code-highlight .nl { color: #767600 } /* Name.Label */
.code-highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.code-highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.code-highlight .nv { color: #19177C } /* Name.Variable */
.code-highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.code-highlight .w { color: #bbbbbb } /* Text.Whitespace */
.code-highlight .mb { color: #666666 } /* Literal.Number.Bin */
.code-highlight .mf { color: #666666 } /* Literal.Number.Float */
.code-highlight .mh { color: #666666 } /* Literal.Number.Hex */
.code-highlight .mi { color: #666666 } /* Literal.Number.Integer */
.code-highlight .mo { color: #666666 } /* Literal.Number.Oct */
.code-highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.code-highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.code-highlight .sc { color: #BA2121 } /* Literal.String.Char */
.code-highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.code-highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.code-highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.code-highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.code-highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.code-highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.code-highlight .sx { color: #008000 } /* Literal.String.Other */
.code-highlight .sr { color: #A45A77 } /* Literal.String.Regex */
.code-highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.code-highlight .ss { color: #19177C } /* Literal.String.Symbol */
.code-highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.code-highlight .fm { color: #0000FF } /* Name.Function.Magic */
.code-highlight .vc { color: #19177C } /* Name.Variable.Class */
.code-highlight .vg { color: #19177C } /* Name.Variable.Global */
.code-highlight .vi { color: #19177C } /* Name.Variable.Instance */
.code-highlight .vm { color: #19177C } /* Name.Variable.Magic */
.code-highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

View file

@ -0,0 +1,20 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
(function (w, d) {
'use strict';
// add data- properties
var script = d.currentScript || (function () {
var scripts = d.getElementsByTagName('script');
return scripts[scripts.length - 1];
})();
w.searxng = {
settings: JSON.parse(atob(script.getAttribute('client_settings')))
};
// update the css
var hmtlElement = d.getElementsByTagName("html")[0];
hmtlElement.classList.remove('no-js');
hmtlElement.classList.add('js');
})(window, document);

View file

@ -0,0 +1,165 @@
/**
* @license
* (C) Copyright Contributors to the SearXNG project.
* (C) Copyright Contributors to the searx project (2014 - 2021).
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
window.searxng = (function (w, d) {
'use strict';
// not invented here tookit with bugs fixed elsewhere
// purposes : be just good enough and as small as possible
// from https://plainjs.com/javascript/events/live-binding-event-handlers-14/
if (w.Element) {
(function (ElementPrototype) {
ElementPrototype.matches = ElementPrototype.matches ||
ElementPrototype.matchesSelector ||
ElementPrototype.webkitMatchesSelector ||
ElementPrototype.msMatchesSelector ||
function (selector) {
var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
while (nodes[++i] && nodes[i] != node);
return !!nodes[i];
};
})(Element.prototype);
}
function callbackSafe (callback, el, e) {
try {
callback.call(el, e);
} catch (exception) {