mirror of
https://github.com/searxng/searxng
synced 2024-11-18 15:26:25 +00:00
[simple theme] update to ion icons 5 and drop webfont
* update from ionicons-npm to ionicons ver.5 * drop the webfont built by grunt for icons * built icons.html template for inlining icons with jinja2 into html * update icon to use mostly the outline version * add icons to categories and do not display them on mobile to save space * remove all legacy ion icon font files from simple theme * icons.html is added in this commit since make statc.build.restore requires git to know the file already * cleanup error-dialog
This commit is contained in:
parent
8877512e20
commit
566dfe3330
@ -1,139 +0,0 @@
|
|||||||
/* Generated by grunt-webfont */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family:"ion";
|
|
||||||
src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45");
|
|
||||||
src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"),
|
|
||||||
url("../fonts/ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"),
|
|
||||||
url("../fonts/ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"),
|
|
||||||
url("../fonts/ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"),
|
|
||||||
url("../fonts/ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg");
|
|
||||||
font-weight:normal;
|
|
||||||
font-style:normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ion-icon {
|
|
||||||
|
|
||||||
font-family:"ion";
|
|
||||||
|
|
||||||
display:inline-block;
|
|
||||||
line-height:1;
|
|
||||||
font-weight:normal;
|
|
||||||
font-style:normal;
|
|
||||||
speak:none;
|
|
||||||
text-decoration:inherit;
|
|
||||||
text-transform:none;
|
|
||||||
text-rendering:auto;
|
|
||||||
-webkit-font-smoothing:antialiased;
|
|
||||||
-moz-osx-font-smoothing:grayscale;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Icons */
|
|
||||||
|
|
||||||
|
|
||||||
.ion-navicon-round:before {
|
|
||||||
content:"\f101";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-search:before {
|
|
||||||
content:"\f102";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-play:before {
|
|
||||||
content:"\f103";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-link:before {
|
|
||||||
content:"\f104";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-up:before {
|
|
||||||
content:"\f105";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-left:before {
|
|
||||||
content:"\f106";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-right:before {
|
|
||||||
content:"\f107";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-down-a:before {
|
|
||||||
content:"\f108";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-up-a:before {
|
|
||||||
content:"\f109";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-swap:before {
|
|
||||||
content:"\f10a";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-dropdown:before {
|
|
||||||
content:"\f10b";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-globe:before {
|
|
||||||
content:"\f10c";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-time:before {
|
|
||||||
content:"\f10d";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-location:before {
|
|
||||||
content:"\f10e";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-warning:before {
|
|
||||||
content:"\f10f";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-error:before {
|
|
||||||
content:"\f110";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-film-outline:before {
|
|
||||||
content:"\f111";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-music-note:before {
|
|
||||||
content:"\f112";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-more-vertical:before {
|
|
||||||
content:"\f113";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-magnet:before {
|
|
||||||
content:"\f114";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-close:before {
|
|
||||||
content:"\f115";
|
|
||||||
}
|
|
@ -1,268 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>ion</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
margin:0;
|
|
||||||
padding:10px 20px;
|
|
||||||
background:#fff;
|
|
||||||
color:#222;
|
|
||||||
}
|
|
||||||
h1, div, footer {
|
|
||||||
font-family:"Helvetica Neue", Arial, sans-serif;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
margin:0 0 20px;
|
|
||||||
font-size:32px;
|
|
||||||
font-weight:normal;
|
|
||||||
}
|
|
||||||
h1 small {
|
|
||||||
font-size: 0.8em;
|
|
||||||
padding-left: 2em;
|
|
||||||
}
|
|
||||||
.icons {
|
|
||||||
margin-bottom:40px;
|
|
||||||
-webkit-column-count:5;
|
|
||||||
-moz-column-count:5;
|
|
||||||
column-count:5;
|
|
||||||
-webkit-column-gap:20px;
|
|
||||||
-moz-column-gap:20px;
|
|
||||||
column-gap:20px;
|
|
||||||
}
|
|
||||||
.icons__item,
|
|
||||||
.icons__item i {
|
|
||||||
line-height:2em;
|
|
||||||
cursor:pointer;
|
|
||||||
overflow:hidden;
|
|
||||||
}
|
|
||||||
.icons__item:hover {
|
|
||||||
color:#3c90be;
|
|
||||||
}
|
|
||||||
.icons__item i {
|
|
||||||
display:inline-block;
|
|
||||||
width:32px;
|
|
||||||
text-align:center;
|
|
||||||
}
|
|
||||||
.icons__item:hover i {
|
|
||||||
-webkit-transform:scale(1.5);
|
|
||||||
transform:scale(1.5);
|
|
||||||
}
|
|
||||||
footer {
|
|
||||||
margin-top:40px;
|
|
||||||
font-size:14px;
|
|
||||||
color:#999;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Generated by grunt-webfont */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family:"ion";
|
|
||||||
src:url("ion.eot?31a1b735188db616a2142d17947e8a45");
|
|
||||||
src:url("ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"),
|
|
||||||
url("ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"),
|
|
||||||
url("ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"),
|
|
||||||
url("ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"),
|
|
||||||
url("ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg");
|
|
||||||
font-weight:normal;
|
|
||||||
font-style:normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ion-icon {
|
|
||||||
|
|
||||||
font-family:"ion";
|
|
||||||
|
|
||||||
display:inline-block;
|
|
||||||
line-height:1;
|
|
||||||
font-weight:normal;
|
|
||||||
font-style:normal;
|
|
||||||
speak:none;
|
|
||||||
text-decoration:inherit;
|
|
||||||
text-transform:none;
|
|
||||||
text-rendering:auto;
|
|
||||||
-webkit-font-smoothing:antialiased;
|
|
||||||
-moz-osx-font-smoothing:grayscale;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Icons */
|
|
||||||
|
|
||||||
|
|
||||||
.ion-navicon-round:before {
|
|
||||||
content:"\f101";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-search:before {
|
|
||||||
content:"\f102";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-play:before {
|
|
||||||
content:"\f103";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-link:before {
|
|
||||||
content:"\f104";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-up:before {
|
|
||||||
content:"\f105";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-left:before {
|
|
||||||
content:"\f106";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-right:before {
|
|
||||||
content:"\f107";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-down-a:before {
|
|
||||||
content:"\f108";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-up-a:before {
|
|
||||||
content:"\f109";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-swap:before {
|
|
||||||
content:"\f10a";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-dropdown:before {
|
|
||||||
content:"\f10b";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-globe:before {
|
|
||||||
content:"\f10c";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-time:before {
|
|
||||||
content:"\f10d";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-location:before {
|
|
||||||
content:"\f10e";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-warning:before {
|
|
||||||
content:"\f10f";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-error:before {
|
|
||||||
content:"\f110";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-film-outline:before {
|
|
||||||
content:"\f111";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-music-note:before {
|
|
||||||
content:"\f112";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-more-vertical:before {
|
|
||||||
content:"\f113";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-magnet:before {
|
|
||||||
content:"\f114";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-close:before {
|
|
||||||
content:"\f115";
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>ion</h1>
|
|
||||||
|
|
||||||
<div class="icons" id="icons">
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="navicon-round"><i class="ion-icon ion-navicon-round"></i> ion-navicon-round</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="search"><i class="ion-icon ion-search"></i> ion-search</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="play"><i class="ion-icon ion-play"></i> ion-play</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="link"><i class="ion-icon ion-link"></i> ion-link</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="chevron-up"><i class="ion-icon ion-chevron-up"></i> ion-chevron-up</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="chevron-left"><i class="ion-icon ion-chevron-left"></i> ion-chevron-left</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="chevron-right"><i class="ion-icon ion-chevron-right"></i> ion-chevron-right</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="arrow-down-a"><i class="ion-icon ion-arrow-down-a"></i> ion-arrow-down-a</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="arrow-up-a"><i class="ion-icon ion-arrow-up-a"></i> ion-arrow-up-a</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="arrow-swap"><i class="ion-icon ion-arrow-swap"></i> ion-arrow-swap</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="arrow-dropdown"><i class="ion-icon ion-arrow-dropdown"></i> ion-arrow-dropdown</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="globe"><i class="ion-icon ion-globe"></i> ion-globe</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="time"><i class="ion-icon ion-time"></i> ion-time</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="location"><i class="ion-icon ion-location"></i> ion-location</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="warning"><i class="ion-icon ion-warning"></i> ion-warning</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="error"><i class="ion-icon ion-error"></i> ion-error</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="film-outline"><i class="ion-icon ion-film-outline"></i> ion-film-outline</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="music-note"><i class="ion-icon ion-music-note"></i> ion-music-note</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="more-vertical"><i class="ion-icon ion-more-vertical"></i> ion-more-vertical</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="magnet"><i class="ion-icon ion-magnet"></i> ion-magnet</div>
|
|
||||||
|
|
||||||
<div class="icons__item" data-name="close"><i class="ion-icon ion-close"></i> ion-close</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h1>Usage</h1>
|
|
||||||
<pre><code><i class="ion-icon ion-<span id="name">name</span>"></i></code></pre>
|
|
||||||
|
|
||||||
|
|
||||||
<footer>Generated by <a href="https://github.com/sapegin/grunt-webfont">grunt-webfont</a>.</footer>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
(function() {
|
|
||||||
document.getElementById('icons').onclick = function(e) {
|
|
||||||
e = e || window.event;
|
|
||||||
var name = e.target.getAttribute('data-name') || e.target.parentNode.getAttribute('data-name');
|
|
||||||
document.getElementById('name').innerHTML = name;
|
|
||||||
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,8 +8,8 @@ module.exports = function(grunt) {
|
|||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
watch: {
|
watch: {
|
||||||
scripts: {
|
scripts: {
|
||||||
files: ['src/**'],
|
files: ['gruntfile.js', 'src/**'],
|
||||||
tasks: ['eslint', 'copy', 'concat', 'uglify', 'htmlmin', 'less:development', 'less:production']
|
tasks: ['eslint', 'copy', 'concat', 'svg2jinja', 'uglify', 'htmlmin', 'less:development', 'less:production']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
eslint: {
|
eslint: {
|
||||||
@ -106,70 +106,6 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
webfont: {
|
|
||||||
icons: {
|
|
||||||
// src: 'node_modules/ionicons-npm/src/*.svg',
|
|
||||||
src: [
|
|
||||||
'node_modules/ionicons-npm/src/navicon-round.svg',
|
|
||||||
'node_modules/ionicons-npm/src/search.svg',
|
|
||||||
'node_modules/ionicons-npm/src/play.svg',
|
|
||||||
'node_modules/ionicons-npm/src/link.svg',
|
|
||||||
'node_modules/ionicons-npm/src/chevron-up.svg',
|
|
||||||
'node_modules/ionicons-npm/src/chevron-left.svg',
|
|
||||||
'node_modules/ionicons-npm/src/chevron-right.svg',
|
|
||||||
'node_modules/ionicons-npm/src/arrow-down-a.svg',
|
|
||||||
'node_modules/ionicons-npm/src/arrow-up-a.svg',
|
|
||||||
'node_modules/ionicons-npm/src/arrow-swap.svg',
|
|
||||||
'node_modules/ionicons-npm/src/telephone.svg',
|
|
||||||
'node_modules/ionicons-npm/src/android-arrow-dropdown.svg',
|
|
||||||
'node_modules/ionicons-npm/src/android-globe.svg',
|
|
||||||
'node_modules/ionicons-npm/src/android-time.svg',
|
|
||||||
'node_modules/ionicons-npm/src/location.svg',
|
|
||||||
'node_modules/ionicons-npm/src/alert-circled.svg',
|
|
||||||
'node_modules/ionicons-npm/src/android-alert.svg',
|
|
||||||
'node_modules/ionicons-npm/src/ios-film-outline.svg',
|
|
||||||
'node_modules/ionicons-npm/src/music-note.svg',
|
|
||||||
'node_modules/ionicons-npm/src/ion-close-round.svg',
|
|
||||||
'node_modules/ionicons-npm/src/android-more-vertical.svg',
|
|
||||||
'src/fonts/magnet.svg',
|
|
||||||
'node_modules/ionicons-npm/src/android-close.svg',
|
|
||||||
],
|
|
||||||
dest: 'fonts',
|
|
||||||
destLess: 'src/generated',
|
|
||||||
options: {
|
|
||||||
font: 'ion',
|
|
||||||
hashes : true,
|
|
||||||
syntax: 'bem',
|
|
||||||
styles : 'font,icon',
|
|
||||||
types : 'eot,woff2,woff,ttf,svg',
|
|
||||||
order : 'eot,woff2,woff,ttf,svg',
|
|
||||||
stylesheets : ['css', 'less'],
|
|
||||||
relativeFontPath : '../fonts/',
|
|
||||||
autoHint : false,
|
|
||||||
normalize : false,
|
|
||||||
// ligatures : true,
|
|
||||||
optimize : true,
|
|
||||||
// fontHeight : 400,
|
|
||||||
rename : function(name) {
|
|
||||||
basename = path.basename(name);
|
|
||||||
if (basename === 'android-alert.svg') {
|
|
||||||
return 'error.svg';
|
|
||||||
}
|
|
||||||
if (basename === 'alert-circled.svg') {
|
|
||||||
return 'warning.svg';
|
|
||||||
}
|
|
||||||
if (basename === 'ion-close-round.svg') {
|
|
||||||
return 'close.svg';
|
|
||||||
}
|
|
||||||
return basename.replace(/(ios|md|android)-/i, '');
|
|
||||||
},
|
|
||||||
templateOptions: {
|
|
||||||
baseClass: 'ion-icon',
|
|
||||||
classPrefix: 'ion-'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
less: {
|
less: {
|
||||||
development: {
|
development: {
|
||||||
options: {
|
options: {
|
||||||
@ -197,6 +133,89 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
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/menu-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',
|
||||||
|
},
|
||||||
|
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.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
@ -207,7 +226,6 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
grunt.loadNpmTasks('grunt-contrib-less');
|
grunt.loadNpmTasks('grunt-contrib-less');
|
||||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||||
grunt.loadNpmTasks('grunt-webfont');
|
|
||||||
grunt.loadNpmTasks('grunt-stylelint');
|
grunt.loadNpmTasks('grunt-stylelint');
|
||||||
grunt.loadNpmTasks('grunt-eslint');
|
grunt.loadNpmTasks('grunt-eslint');
|
||||||
|
|
||||||
@ -218,6 +236,7 @@ module.exports = function(grunt) {
|
|||||||
'stylelint',
|
'stylelint',
|
||||||
'copy',
|
'copy',
|
||||||
'concat',
|
'concat',
|
||||||
|
'svg2jinja',
|
||||||
'uglify',
|
'uglify',
|
||||||
'htmlmin',
|
'htmlmin',
|
||||||
'less:development',
|
'less:development',
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt-cli": "^1.4.3",
|
"eslint": "^8.0.1",
|
||||||
"grunt": "~1.4.1",
|
"grunt": "~1.4.1",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
|
||||||
"grunt-contrib-concat": "~2.0.0",
|
"grunt-contrib-concat": "~2.0.0",
|
||||||
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
"grunt-contrib-cssmin": "^4.0.0",
|
"grunt-contrib-cssmin": "^4.0.0",
|
||||||
"grunt-contrib-jshint": "~3.1.1",
|
"grunt-contrib-jshint": "~3.1.1",
|
||||||
"grunt-contrib-less": "~3.0.0",
|
"grunt-contrib-less": "~3.0.0",
|
||||||
@ -11,15 +11,15 @@
|
|||||||
"grunt-xmlmin": "~0.1.8",
|
"grunt-xmlmin": "~0.1.8",
|
||||||
"grunt-contrib-htmlmin": "~3.1.0",
|
"grunt-contrib-htmlmin": "~3.1.0",
|
||||||
"grunt-contrib-watch": "~1.1.0",
|
"grunt-contrib-watch": "~1.1.0",
|
||||||
"grunt-stylelint": "^0.16.0",
|
|
||||||
"grunt-eslint": "^23.0.0",
|
"grunt-eslint": "^23.0.0",
|
||||||
"grunt-webfont": "^1.7.2",
|
"grunt-stylelint": "^0.16.0",
|
||||||
"ionicons-npm": "^2.0.1",
|
"ionicons": "^5.5.4",
|
||||||
"eslint": "^8.0.1",
|
|
||||||
"less": "^4.1.1",
|
"less": "^4.1.1",
|
||||||
"less-plugin-clean-css": "^1.5.1",
|
"less-plugin-clean-css": "^1.5.1",
|
||||||
"stylelint": "^13.13.1",
|
"stylelint": "^13.13.1",
|
||||||
"stylelint-config-standard": "^22.0.0"
|
"stylelint-config-standard": "^22.0.0",
|
||||||
|
"ejs": "^3.1.6",
|
||||||
|
"svgo": "^2.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autocomplete-js": "2.7.1",
|
"autocomplete-js": "2.7.1",
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
@ -1,181 +0,0 @@
|
|||||||
// Generated by grunt-webfont
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family:"ion";
|
|
||||||
src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45");
|
|
||||||
src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"),
|
|
||||||
url("../fonts/ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"),
|
|
||||||
url("../fonts/ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"),
|
|
||||||
url("../fonts/ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"),
|
|
||||||
url("../fonts/ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg");
|
|
||||||
font-weight:normal;
|
|
||||||
font-style:normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ion-icon {
|
|
||||||
&:before {
|
|
||||||
font-family:"ion";
|
|
||||||
}
|
|
||||||
display:inline-block;
|
|
||||||
line-height:1;
|
|
||||||
font-weight:normal;
|
|
||||||
font-style:normal;
|
|
||||||
speak:none;
|
|
||||||
text-decoration:inherit;
|
|
||||||
text-transform:none;
|
|
||||||
text-rendering:auto;
|
|
||||||
-webkit-font-smoothing:antialiased;
|
|
||||||
-moz-osx-font-smoothing:grayscale;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Icons
|
|
||||||
|
|
||||||
.ion-navicon-round {
|
|
||||||
&:before {
|
|
||||||
content:"\f101";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-search {
|
|
||||||
&:before {
|
|
||||||
content:"\f102";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-play {
|
|
||||||
&:before {
|
|
||||||
content:"\f103";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-link {
|
|
||||||
&:before {
|
|
||||||
content:"\f104";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-up {
|
|
||||||
&:before {
|
|
||||||
content:"\f105";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-left {
|
|
||||||
&:before {
|
|
||||||
content:"\f106";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-chevron-right {
|
|
||||||
&:before {
|
|
||||||
content:"\f107";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-down-a {
|
|
||||||
&:before {
|
|
||||||
content:"\f108";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-up-a {
|
|
||||||
&:before {
|
|
||||||
content:"\f109";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-swap {
|
|
||||||
&:before {
|
|
||||||
content:"\f10a";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-arrow-dropdown {
|
|
||||||
&:before {
|
|
||||||
content:"\f10b";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-globe {
|
|
||||||
&:before {
|
|
||||||
content:"\f10c";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-time {
|
|
||||||
&:before {
|
|
||||||
content:"\f10d";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-location {
|
|
||||||
&:before {
|
|
||||||
content:"\f10e";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-warning {
|
|
||||||
&:before {
|
|
||||||
content:"\f10f";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-error {
|
|
||||||
&:before {
|
|
||||||
content:"\f110";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-film-outline {
|
|
||||||
&:before {
|
|
||||||
content:"\f111";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-music-note {
|
|
||||||
&:before {
|
|
||||||
content:"\f112";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-more-vertical {
|
|
||||||
&:before {
|
|
||||||
content:"\f113";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-magnet {
|
|
||||||
&:before {
|
|
||||||
content:"\f114";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ion-close {
|
|
||||||
&:before {
|
|
||||||
content:"\f115";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -16,6 +16,40 @@
|
|||||||
"spacer categories";
|
"spacer categories";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.category {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 1rem;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
svg {
|
||||||
|
padding-right: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0.2rem 0;
|
||||||
|
display: inline-flex;
|
||||||
|
text-transform: capitalize;
|
||||||
|
font-size: 0.9em;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
.disable-user-select;
|
||||||
|
|
||||||
|
div.category_name {
|
||||||
|
margin: auto 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"]:checked + label {
|
||||||
|
color: var(--color-categories-item-selected-font);
|
||||||
|
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#search_logo {
|
#search_logo {
|
||||||
grid-area: logo;
|
grid-area: logo;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -79,7 +113,7 @@
|
|||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 8px;
|
padding: 10px;
|
||||||
background: none repeat scroll 0 0 var(--color-search-background);
|
background: none repeat scroll 0 0 var(--color-search-background);
|
||||||
border: 1px solid var(--color-search-border);
|
border: 1px solid var(--color-search-border);
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
@ -156,7 +190,6 @@
|
|||||||
|
|
||||||
#categories {
|
#categories {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
@ -188,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search_box {
|
.search_box {
|
||||||
// hack, should bew 100% ?
|
// hack, should be 100% ?
|
||||||
width: 99%;
|
width: 99%;
|
||||||
margin: 0.1em;
|
margin: 0.1em;
|
||||||
padding: 0 0.1em 0 0;
|
padding: 0 0.1em 0 0;
|
||||||
@ -219,9 +252,15 @@
|
|||||||
.category {
|
.category {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
padding: 10px !important;
|
padding: 0.8rem !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -239,7 +278,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#categories {
|
#categories {
|
||||||
margin: 0 10px 0 0;
|
|
||||||
.disable-user-select;
|
.disable-user-select;
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
@ -248,33 +286,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.category {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin: 0 3px;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0.3rem 0.75rem 0.5rem 0.75rem;
|
|
||||||
margin: 0;
|
|
||||||
display: block;
|
|
||||||
text-transform: capitalize;
|
|
||||||
font-size: 0.9em;
|
|
||||||
border-bottom: 2px solid transparent;
|
|
||||||
.disable-user-select;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="checkbox"]:checked + label {
|
|
||||||
color: var(--color-categories-item-selected-font);
|
|
||||||
border-bottom: 2px solid var(--color-categories-item-border-selected);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#categories_container {
|
#categories_container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
@import "../../__common__/less/stats.less";
|
@import "../../__common__/less/stats.less";
|
||||||
@import "../../__common__/less/result_templates.less";
|
@import "../../__common__/less/result_templates.less";
|
||||||
@import (inline) "../../node_modules/normalize.css/normalize.css";
|
@import (inline) "../../node_modules/normalize.css/normalize.css";
|
||||||
@import "../generated/ion.less";
|
|
||||||
@import "definitions.less";
|
@import "definitions.less";
|
||||||
@import "mixins.less";
|
@import "mixins.less";
|
||||||
@import "code.less";
|
@import "code.less";
|
||||||
@ -28,10 +27,23 @@
|
|||||||
@import "search.less";
|
@import "search.less";
|
||||||
|
|
||||||
// ion-icon
|
// ion-icon
|
||||||
.ion-icon-big {
|
.ion-icon {
|
||||||
.ion-icon;
|
display: inline-block;
|
||||||
|
vertical-align: bottom;
|
||||||
|
line-height: 1;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
font-size: 149%;
|
.ion-icon-small {
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
.ion-icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ion-icon-big {
|
||||||
|
width: 1.5rem;
|
||||||
|
height: 1.5rem;
|
||||||
|
.ion-icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main LESS-Code
|
// Main LESS-Code
|
||||||
@ -530,7 +542,7 @@ article[data-vim-selected].category-social {
|
|||||||
#linkto_preferences {
|
#linkto_preferences {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
top: 2rem;
|
top: 2.2rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -121,20 +121,13 @@ div.selectable_url {
|
|||||||
// dialog
|
// dialog
|
||||||
.dialog() {
|
.dialog() {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 1em 1em 1em 2.7em;
|
display: flex;
|
||||||
|
padding: 1rem;
|
||||||
margin: 0 0 1em 0;
|
margin: 0 0 1em 0;
|
||||||
border: 1px solid var(--color-toolkit-dialog-border);
|
border: 1px solid var(--color-toolkit-dialog-border);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
.rounded-corners;
|
.rounded-corners;
|
||||||
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
top: 0.5em;
|
|
||||||
left: 0.5em;
|
|
||||||
font-family: "ion"; // stylelint-disable font-family-no-missing-generic-family-keyword
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.close {
|
.close {
|
||||||
float: right;
|
float: right;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -177,7 +170,6 @@ div.selectable_url {
|
|||||||
color: var(--color-error);
|
color: var(--color-error);
|
||||||
background: var(--color-error-background);
|
background: var(--color-error-background);
|
||||||
border-color: var(--color-error);
|
border-color: var(--color-error);
|
||||||
.ion-error();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-warning {
|
.dialog-warning {
|
||||||
@ -186,7 +178,6 @@ div.selectable_url {
|
|||||||
color: var(--color-warning);
|
color: var(--color-warning);
|
||||||
background: var(--color-warning-background);
|
background: var(--color-warning-background);
|
||||||
border-color: var(--color-warning);
|
border-color: var(--color-warning);
|
||||||
.ion-warning();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-modal {
|
.dialog-modal {
|
||||||
|
@ -1,7 +1,25 @@
|
|||||||
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
|
{%- set category_icons = {
|
||||||
|
'general': 'search-outline',
|
||||||
|
'images': 'image-outline',
|
||||||
|
'videos': 'play-outline',
|
||||||
|
'news': 'newspaper-outline',
|
||||||
|
'map': 'location-outline',
|
||||||
|
'music': 'musical-notes-outline',
|
||||||
|
'it': 'layers-outline',
|
||||||
|
'science': 'school-outline',
|
||||||
|
'files': 'file-tray-full-outline',
|
||||||
|
'social media': 'people-outline',
|
||||||
|
} -%}
|
||||||
<div id="categories" class="search_categories">{{- '' -}}
|
<div id="categories" class="search_categories">{{- '' -}}
|
||||||
<div id="categories_container">
|
<div id="categories_container">
|
||||||
{%- for category in categories -%}
|
{%- for category in categories -%}
|
||||||
<div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label></div>
|
<div class="category"><input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}"{% if category in selected_categories %} checked="checked"{% endif %}/>
|
||||||
|
<label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">
|
||||||
|
{{- icon_big(category_icons[category]) if category in category_icons else icon_big('globe-outline') -}}
|
||||||
|
<div class="category_name">{{- _(category) -}}</div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
{%- if display_tooltip %}<div class="help">{{ _('Click on the magnifier to perform search') }}</div>{% endif -%}
|
||||||
</div>{{- '' -}}
|
</div>{{- '' -}}
|
||||||
|
36
searx/templates/simple/icons.html
Normal file
36
searx/templates/simple/icons.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{# this file was generated by searx/static/themes/simple/gruntfile.js #}
|
||||||
|
{%- set icons = {
|
||||||
|
'warning':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 80c-8.66 0-16.58 7.36-16 16l8 216a8 8 0 008 8h0a8 8 0 008-8l8-216c.58-8.64-7.34-16-16-16z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><circle cx="256" cy="416" r="16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||||
|
'close':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>',
|
||||||
|
'chevron-up-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 328l144-144 144 144"/></svg>',
|
||||||
|
'chevron-right':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>',
|
||||||
|
'chevron-left':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>',
|
||||||
|
'menu-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 160h352M80 256h352M80 352h352"/></svg>',
|
||||||
|
'ellipsis-vertical-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><circle cx="256" cy="256" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><circle cx="256" cy="416" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><circle cx="256" cy="96" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/></svg>',
|
||||||
|
'magnet-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M421.83 293.82A144 144 0 00218.18 90.17M353.94 225.94a48 48 0 00-67.88-67.88" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M192 464v-48M90.18 421.82l33.94-33.94M48 320h48"/><path d="M286.06 158.06L172.92 271.19a32 32 0 01-45.25 0L105 248.57a32 32 0 010-45.26L218.18 90.17M421.83 293.82L308.69 407a32 32 0 01-45.26 0l-22.62-22.63a32 32 0 010-45.26l113.13-113.17M139.6 169.98l67.88 67.89M275.36 305.75l67.89 67.88" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||||
|
'globe-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 48C141.13 48 48 141.13 48 256s93.13 208 208 208 208-93.13 208-208S370.87 48 256 48z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M256 48c-58.07 0-112.67 93.13-112.67 208S197.93 464 256 464s112.67-93.13 112.67-208S314.07 48 256 48z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M117.33 117.33c38.24 27.15 86.38 43.34 138.67 43.34s100.43-16.19 138.67-43.34M394.67 394.67c-38.24-27.15-86.38-43.34-138.67-43.34s-100.43 16.19-138.67 43.34" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M256 48v416M464 256H48"/></svg>',
|
||||||
|
'search-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M338.29 338.29L448 448"/></svg>',
|
||||||
|
'image-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><rect x="48" y="80" width="416" height="352" rx="48" ry="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><circle cx="336" cy="176" r="32" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path d="M304 335.79l-90.66-90.49a32 32 0 00-43.87-1.3L48 352M224 432l123.34-123.34a32 32 0 0143.11-2L464 368" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||||
|
'play-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M112 111v290c0 17.44 17 28.52 31 20.16l247.9-148.37c12.12-7.25 12.12-26.33 0-33.58L143 90.84c-14-8.36-31 2.72-31 20.16z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/></svg>',
|
||||||
|
'newspaper-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M368 415.86V72a24.07 24.07 0 00-24-24H72a24.07 24.07 0 00-24 24v352a40.12 40.12 0 0040 40h328" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path d="M416 464h0a48 48 0 01-48-48V128h72a24 24 0 0124 24v264a48 48 0 01-48 48z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M240 128h64M240 192h64M112 256h192M112 320h192M112 384h192"/><path d="M176 208h-64a16 16 0 01-16-16v-64a16 16 0 0116-16h64a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>',
|
||||||
|
'location-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M256 48c-79.5 0-144 61.39-144 137 0 87 96 224.87 131.25 272.49a15.77 15.77 0 0025.5 0C304 409.89 400 272.07 400 185c0-75.61-64.5-137-144-137z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><circle cx="256" cy="192" r="48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||||
|
'musical-notes-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M192 218v-6c0-14.84 10-27 24.24-30.59l174.59-46.68A20 20 0 01416 154v22" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M416 295.94v80c0 13.91-8.93 25.59-22 30l-22 8c-25.9 8.72-52-10.42-52-38h0a33.37 33.37 0 0123-32l51-18.15c13.07-4.4 22-15.94 22-29.85V58a10 10 0 00-12.6-9.61L204 102a16.48 16.48 0 00-12 16v226c0 13.91-8.93 25.6-22 30l-52 18c-13.88 4.68-22 17.22-22 32h0c0 27.58 26.52 46.55 52 38l22-8c13.07-4.4 22-16.08 22-30v-80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||||
|
'layers-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M434.8 137.65l-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09zM160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path d="M160 204.48l-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>',
|
||||||
|
'school-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M32 192L256 64l224 128-224 128L32 192z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 240v128l144 80 144-80V240M480 368V192M256 320v128"/></svg>',
|
||||||
|
'file-tray-full-outline':'<svg class="ionicon" viewBox="0 0 512 512" aria-hidden="true"><path d="M384 80H128c-26 0-43 14-48 40L48 272v112a48.14 48.14 0 0048 48h320a48.14 48.14 0 0048-48V272l-32-152c-5-27-23-40-48-40z" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M48 272h144M320 272h144M192 272a64 64 0 00128 0M144 144h224M128 208h256"/></svg>',
|
||||||
|
'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>',
|
||||||
|
|
||||||
|
}
|
||||||
|
-%}
|
||||||
|
|
||||||
|
{% 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 %}
|
@ -1,10 +1,10 @@
|
|||||||
{% extends "simple/base.html" %}
|
{% extends "simple/base.html" %}
|
||||||
{% from 'simple/macros.html' import icon %}
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
<link rel="preload" href="{{ url_for('static', filename='img/searxng.png') }}" as="image" />
|
<link rel="preload" href="{{ url_for('static', filename='img/searxng.png') }}" as="image" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
|
<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon_big('menu-outline') }}</a></nav>
|
||||||
<div class="index">
|
<div class="index">
|
||||||
<div class="title"><h1>SearXNG</h1></div>
|
<div class="title"><h1>SearXNG</h1></div>
|
||||||
{% include 'simple/simple_search.html' %}
|
{% include 'simple/simple_search.html' %}
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
<!-- Draw glyphicon icon from bootstrap-theme -->
|
|
||||||
{% macro icon(action, alt) -%}
|
|
||||||
<span title="{{ alt }}" class="ion-icon-big ion-{{ action }}"></span>
|
|
||||||
{%- endmacro %}
|
|
||||||
|
|
||||||
{% macro icon_small(action) -%}
|
|
||||||
<span class="ion-icon ion-{{ action }}"></span>
|
|
||||||
{%- endmacro %}
|
|
||||||
|
|
||||||
<!-- Draw favicon -->
|
<!-- Draw favicon -->
|
||||||
{% macro draw_favicon(favicon) -%}
|
{% macro draw_favicon(favicon) -%}
|
||||||
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
|
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
|
||||||
@ -43,7 +34,7 @@
|
|||||||
{%- macro result_sub_footer(result, proxify) -%}
|
{%- macro result_sub_footer(result, proxify) -%}
|
||||||
<div class="engines">
|
<div class="engines">
|
||||||
{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}
|
{% for engine in result.engines %}<span>{{ engine }}</span>{% endfor %}
|
||||||
{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}
|
{{ result_link("https://web.archive.org/web/" + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link") }}‎ {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}
|
||||||
</div>{{- '' -}}
|
</div>{{- '' -}}
|
||||||
<div class="break"></div>{{- '' -}}
|
<div class="break"></div>{{- '' -}}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
{% from 'simple/macros.html' import icon %}
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
{% if unresponsive_engines %}
|
{% if unresponsive_engines %}
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error" role="alert">
|
||||||
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
|
{{ icon_big('warning') }}
|
||||||
{% for engine_name, error_type in unresponsive_engines %}
|
<div>
|
||||||
<p>{{- '' -}}
|
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
|
||||||
{{- engine_name }} (
|
{% for engine_name, error_type in unresponsive_engines %}
|
||||||
|
<p>{{- '' -}}
|
||||||
|
{{- engine_name }} (
|
||||||
<a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
<a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
||||||
{{- error_type -}}
|
{{- error_type -}}
|
||||||
</a> ){{- '' -}}
|
</a> ){{- '' -}}
|
||||||
</p>
|
</p>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
<p><small>{{ _('Please, try again later or find another SearXNG instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>) </small></p>
|
||||||
<p><small>{{ _('Please, try again later or find another SearXNG instance.') }} (<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>) </small></p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error" role="alert">
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{% from 'simple/macros.html' import icon, tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
|
{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %}
|
||||||
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
|
|
||||||
{% extends "simple/base.html" %}
|
{% extends "simple/base.html" %}
|
||||||
|
|
||||||
@ -25,7 +26,7 @@
|
|||||||
<p class="engine-description"></p>
|
<p class="engine-description"></p>
|
||||||
<p><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></p>
|
<p><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></p>
|
||||||
{%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%}
|
{%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%}
|
||||||
{%- if search_engine.enable_http %}<p>{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
|
{%- if search_engine.enable_http %}<p>{{ icon_big('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
|
||||||
{%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%}
|
{%- if reliabilities.get(search_engine.name, {}).errors or reliabilities.get(search_engine.name, {}).checker -%}
|
||||||
<a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
<a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
||||||
{{ _('View error logs and submit a bug report') }}
|
{{ _('View error logs and submit a bug report') }}
|
||||||
@ -74,7 +75,7 @@
|
|||||||
<td class="{{ label }} column-reliability">{{- "" -}}
|
<td class="{{ label }} column-reliability">{{- "" -}}
|
||||||
<a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
|
<a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
|
||||||
<span aria-labelledby="{{engine_name}}_reliability">
|
<span aria-labelledby="{{engine_name}}_reliability">
|
||||||
{{ icon('warning', 'The engine is not reliabled') }} {{ r -}}
|
{{ icon_big('warning', 'The engine is not reliabled') }} {{ r -}}
|
||||||
</span>{{- "" -}}
|
</span>{{- "" -}}
|
||||||
</a>{{- "" -}}
|
</a>{{- "" -}}
|
||||||
<div class="engine-tooltip" role="tooltip" id="{{engine_name}}_reliability">
|
<div class="engine-tooltip" role="tooltip" id="{{engine_name}}_reliability">
|
||||||
@ -263,7 +264,7 @@
|
|||||||
{% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %}
|
{% set engine_id = 'engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_') %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="engine_checkbox">{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}</td>
|
<td class="engine_checkbox">{{ checkbox_onoff(engine_id, (search_engine.name, categ) in disabled_engines) }}</td>
|
||||||
<th class="name" data-engine-name="{{ search_engine.name }}">{% if search_engine.enable_http %}{{ icon('warning', 'No HTTPS') }}{% endif %} {{ search_engine.name }} {{ engine_about(search_engine) }}</th>
|
<th class="name" data-engine-name="{{ search_engine.name }}">{% if search_engine.enable_http %}{{ icon_big('warning', 'No HTTPS') }}{% endif %} {{ search_engine.name }} {{ engine_about(search_engine) }}</th>
|
||||||
<td class="shortcut">{{ shortcuts[search_engine.name] }}</td>
|
<td class="shortcut">{{ shortcuts[search_engine.name] }}</td>
|
||||||
<td>{{ checkbox(engine_id + '_supported_languages', supports[search_engine.name]['supports_selected_language'], true, true) }}</td>
|
<td>{{ checkbox(engine_id + '_supported_languages', supports[search_engine.name]['supports_selected_language'], true, true) }}</td>
|
||||||
<td>{{ checkbox(engine_id + '_safesearch', supports[search_engine.name]['safesearch'], true, true) }}</td>
|
<td>{{ checkbox(engine_id + '_safesearch', supports[search_engine.name]['safesearch'], true, true) }}</td>
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
</a>{{- "" -}}
|
</a>{{- "" -}}
|
||||||
<div class="detail">{{- "" -}}
|
<div class="detail">{{- "" -}}
|
||||||
<a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}}
|
<a class="result-detail-close" href="#">{{ icon('close') }}</a>{{- "" -}}
|
||||||
<a class="result-detail-previous" href="#">{{ icon_small('chevron-left') }}</a>{{- "" -}}
|
<a class="result-detail-previous" href="#">{{ icon('chevron-left') }}</a>{{- "" -}}
|
||||||
<a class="result-detail-next" href="#">{{ icon_small('chevron-right') }}</a>{{- "" -}}
|
<a class="result-detail-next" href="#">{{ icon('chevron-right') }}</a>{{- "" -}}
|
||||||
<a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">
|
<a class="result-images-source" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} href="{{ result.img_src }}">
|
||||||
{%- if result.thumbnail_src -%}
|
{%- if result.thumbnail_src -%}
|
||||||
<img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">
|
<img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl, icon with context %}
|
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer, result_footer_rtl with context %}
|
||||||
|
{% from 'simple/icons.html' import icon_small %}
|
||||||
|
|
||||||
{{ result_header(result, favicons, image_proxify) -}}
|
{{ result_header(result, favicons, image_proxify) -}}
|
||||||
{{- result_sub_header(result) -}}
|
{{- result_sub_header(result) -}}
|
||||||
@ -39,7 +40,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
{%- if (result.latitude and result.longitude) or result.boundingbox -%}
|
{%- if (result.latitude and result.longitude) or result.boundingbox -%}
|
||||||
<small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon( 'globe') }} {{ _('show map') }}</a></small>
|
<small> <a class="btn-collapse collapsed searxng_init_map hide_if_nojs" data-target="#result-map-{{ index }}" data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %}>{{ icon_small( 'globe-outline') }} {{ _('show map') }}</a></small>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{{- result_sub_footer(result, proxify) -}}
|
{{- result_sub_footer(result, proxify) -}}
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
{{ result_header(result, favicons, image_proxify) -}}
|
{{ result_header(result, favicons, image_proxify) -}}
|
||||||
{{- result_sub_header(result) -}}
|
{{- result_sub_header(result) -}}
|
||||||
|
|
||||||
{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</p>{% endif %}
|
{% if result.magnetlink %}<p class="altlink"> • {{ result_link(result.magnetlink, icon_big('magnet-outline') + _('magnet link'), "magnetlink") }}</p>{% endif %}
|
||||||
{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %}
|
{% if result.torrentfile %}<p class="altlink"> • {{ result_link(result.torrentfile, icon_big('download-alt') + _('torrent file'), "torrentfile") }}</p>{% endif %}
|
||||||
|
|
||||||
{% if result.seed is defined %}<p class="stat"> • {{ icon('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %}
|
{% if result.seed is defined %}<p class="stat"> • {{ icon_big('arrow-swap') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> • {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span></p>{% endif %}
|
||||||
|
|
||||||
{%- if result.filesize %}<p class="stat">{{ icon('floppy-disk') }} {{ _('Filesize') }}<span class="badge">
|
{%- if result.filesize %}<p class="stat">{{ icon_big('floppy-disk') }} {{ _('Filesize') }}<span class="badge">
|
||||||
{%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }}
|
{%- if result.filesize < 1024 %}{{ result.filesize }} {{ _('Bytes') }}
|
||||||
{%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }}
|
{%- elif result.filesize < 1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024) }} {{ _('kiB') }}
|
||||||
{%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
|
{%- elif result.filesize < 1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</span></p>
|
</span></p>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if result.files %}<p class="stat">{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%}
|
{%- if result.files %}<p class="stat">{{ icon_big('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span></p>{% endif -%}
|
||||||
|
|
||||||
{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
|
{%- if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif -%}
|
||||||
{{- result_sub_footer(result, proxify) -}}
|
{{- result_sub_footer(result, proxify) -}}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% extends "simple/base.html" %}
|
{% extends "simple/base.html" %}
|
||||||
{% from 'simple/macros.html' import icon, icon_small %}
|
{% from 'simple/icons.html' import icon, icon_big, icon_small %}
|
||||||
{% macro engine_data_form(engine_data) -%}
|
{% macro engine_data_form(engine_data) -%}
|
||||||
{% for engine_name, kv_data in engine_data.items() %}
|
{% for engine_name, kv_data in engine_data.items() %}
|
||||||
{% for k, v in kv_data.items() %}
|
{% for k, v in kv_data.items() %}
|
||||||
@ -10,7 +10,7 @@
|
|||||||
{% block title %}{% if method == 'GET' %}{{- q|e -}} -{% endif %}{% endblock %}
|
{% block title %}{% if method == 'GET' %}{{- q|e -}} -{% endif %}{% endblock %}
|
||||||
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon('navicon-round') }}</a></nav>
|
<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon_big('menu-outline') }}</a></nav>
|
||||||
{% include 'simple/search.html' %}
|
{% include 'simple/search.html' %}
|
||||||
|
|
||||||
{% if results and results|map(attribute='template')|unique|list|count == 1 %}
|
{% if results and results|map(attribute='template')|unique|list|count == 1 %}
|
||||||
@ -42,14 +42,17 @@
|
|||||||
|
|
||||||
{% if unresponsive_engines and results|length >= 1 %}
|
{% if unresponsive_engines and results|length >= 1 %}
|
||||||
<div class="dialog-error" role="alert">
|
<div class="dialog-error" role="alert">
|
||||||
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
|
{{ icon_big('warning') }}
|
||||||
{%- for engine_name, error_type in unresponsive_engines -%}
|
<div>
|
||||||
<p>{{- engine_name }} (
|
<p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
|
||||||
<a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
{%- for engine_name, error_type in unresponsive_engines -%}
|
||||||
|
<p>{{- engine_name }} (
|
||||||
|
<a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
|
||||||
{{- error_type -}}
|
{{- error_type -}}
|
||||||
</a> ){{- '' -}}
|
</a> ){{- '' -}}
|
||||||
</p>
|
</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -141,7 +144,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div id="backToTop">
|
<div id="backToTop">
|
||||||
<a href="#">{{ icon_small('chevron-up') }}</a>
|
<a href="#">{{ icon_small('chevron-up-outline') }}</a>
|
||||||
</div>
|
</div>
|
||||||
{% if paging %}
|
{% if paging %}
|
||||||
<nav id="pagination">
|
<nav id="pagination">
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<div id="search_wrapper">
|
<div id="search_wrapper">
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
|
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
|
||||||
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
|
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
|
||||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
|
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="search_filters">
|
<div class="search_filters">
|
||||||
{% include 'simple/languages.html' %}
|
{% include 'simple/languages.html' %}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<div id="search_wrapper">
|
<div id="search_wrapper">
|
||||||
<div class="search_box">
|
<div class="search_box">
|
||||||
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
|
<input id="q" autofocus name="q" type="text" placeholder="{{ _('Search for...') }}" tabindex="1" autocomplete="off" spellcheck="false" dir="auto" {% if q %}value="{{ q }}"{% endif %} >
|
||||||
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
|
<button id="clear_search" type="button" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('close') }}</span><span class="show_if_nojs">{{ _('Clear search') }}</span></button>
|
||||||
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
|
<button id="send_search" type="submit" tabindex="-1"><span class="hide_if_nojs">{{ icon_big('search-outline') }}</span><span class="show_if_nojs">{{ _('Start search') }}</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% from 'simple/macros.html' import icon %}
|
{% from 'simple/icons.html' import icon_big %}
|
||||||
{% from '__common__/new_issue.html' import new_issue with context %}
|
{% from '__common__/new_issue.html' import new_issue with context %}
|
||||||
|
|
||||||
{% extends "simple/base.html" %}
|
{% extends "simple/base.html" %}
|
||||||
@ -7,7 +7,7 @@
|
|||||||
{% if selected_engine_name %}
|
{% if selected_engine_name %}
|
||||||
{{ column_name }}
|
{{ column_name }}
|
||||||
{% elif column_order==sort_order %}
|
{% elif column_order==sort_order %}
|
||||||
{{ column_name }} {{ icon('arrow-dropdown') }}
|
{{ column_name }} {{ icon_big('arrow-dropdown') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ url_for('stats', sort=column_order) }}">{{ column_name }}</a>
|
<a href="{{ url_for('stats', sort=column_order) }}">{{ column_name }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -13,6 +13,7 @@ STATIC_BUILT_PATHS=(
|
|||||||
searx/static/themes/simple/src/generated/pygments.less
|
searx/static/themes/simple/src/generated/pygments.less
|
||||||
searx/static/themes/simple/img/favicon.png
|
searx/static/themes/simple/img/favicon.png
|
||||||
searx/templates/__common__/searxng-wordmark.min.svg
|
searx/templates/__common__/searxng-wordmark.min.svg
|
||||||
|
searx/templates/simple/icons.html
|
||||||
)
|
)
|
||||||
|
|
||||||
static_help(){
|
static_help(){
|
||||||
|
Loading…
Reference in New Issue
Block a user