Commit baccfb80 authored by Daniel's avatar Daniel

Merge branch 'eelo_theme' into 'master'

Updated theme

See merge request spot/my-spot!8
parents 96638df2 e7083b67
......@@ -7,14 +7,17 @@ nav {
a {
transition: color 0.2s ease-in-out;
}
.border-color-transition,
#search_form #search_input_container {
.border-color-transition {
transition: border-color 0.2s ease-in-out;
}
.fill-transition,
.checkmark .icon {
transition: fill 0.2s ease-in-out;
}
.box-shadow-transition,
#search_form #search_input_container {
transition: box-shadow 0.2s ease-in-out;
}
.disabled,
[disabled],
#preferences #engines .engine input:checked ~ .data {
......@@ -207,6 +210,12 @@ input.btn[type="submit"] {
.checkmark_input.inverted:not(:checked) + .checkmark .unchecked {
display: none;
}
.collapser input:checked ~ .collapse {
display: initial;
}
.collapser input:not(:checked) ~ .collapse {
display: none;
}
.custom-select {
appearance: none;
-webkit-appearance: none;
......@@ -287,6 +296,9 @@ footer {
color: #c1c1c1;
padding-bottom: 8px;
}
footer .links > :first-child {
margin-right: 8px;
}
.hidden,
#icons {
display: none;
......@@ -430,7 +442,7 @@ nav #eelo_links > * {
}
#search_form #search_input_container:hover,
#search_form #search_input_container:active {
border-color: #5068dd;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.13);
}
#search_form #search_input_container #q {
font-size: 16px;
......@@ -541,6 +553,7 @@ nav #eelo_links > * {
font-size: 14px;
font-weight: normal;
margin-right: 16px;
cursor: pointer;
}
#search_form .search_categories input[type="radio"]:checked + label,
#search_form #categories input[type="radio"]:checked + label {
......@@ -571,6 +584,9 @@ nav #eelo_links > * {
align-items: center;
position: relative;
}
#show_more_categories_ {
cursor: default;
}
#more_categories_toggle:checked ~ #more_categories,
#more_categories_toggle_[checked] ~ #more_categories {
display: flex;
......@@ -623,7 +639,7 @@ nav #eelo_links > * {
#search_form #more_categories > label {
padding: 0;
}
#search_input_container {
#search_form.inline-search > #search_input_container {
margin-right: 40px;
}
.tt-dropdown-menu {
......@@ -634,6 +650,14 @@ nav #eelo_links > * {
margin-top: 32px;
margin-bottom: 32px;
}
.result .result-template {
font-weight: bold;
text-transform: uppercase;
color: rgba(0, 0, 0, 0.4);
}
.result .result-template + .result_header {
margin-top: 0;
}
.result .result_header {
margin-bottom: 6px;
}
......@@ -641,15 +665,61 @@ nav #eelo_links > * {
width: 16px;
height: 16px;
}
.result .subheader > :not(:last-child),
.result .subheader > * > :not(:last-child) {
margin-right: 16px;
}
.result .result-content {
margin-top: 8px;
margin-bottom: 6px;
}
.result .result-content p,
.result .result-content pre {
margin-top: 8px;
margin-bottom: 8px;
}
.result.result-torrent .extra-info > :not(:last-child) {
margin-right: 16px;
}
.result.result-videos {
position: relative;
}
.result.result-videos .result-content {
display: flex;
margin: 0px;
}
.result.result-videos .result-content .result_header {
margin-top: 0;
}
.result.result-videos .result-content > .thumbnail {
flex: 1;
}
.result.result-videos .result-content > :not(.thumbnail) {
flex: 3;
padding-left: 16px;
}
.result.result-videos .result-content .thumbnail > img {
width: 100%;
}
.result .external-link {
font-size: 14px;
color: #39a441;
}
.result.result-default {
.result .extra-info {
color: rgba(0, 0, 0, 0.4);
}
.result .code-block {
background-color: rgba(0, 0, 0, 0.03);
padding: 0 16px;
border-radius: 8px;
border: 1px solid rgba(0, 0, 0, 0.2);
}
.result .code-block pre {
white-space: pre-wrap;
}
.result.result-default,
.result.result-torrent,
.result.result-videos {
margin-bottom: 32px;
}
.result.result-images {
......@@ -690,12 +760,21 @@ nav #eelo_links > * {
#default_images_container {
column-count: 5;
column-gap: 8px;
margin-bottom: 32px;
}
#default_images_container .img-thumb-link {
display: block;
max-height: 120px;
overflow: hidden;
}
#suggestions form,
#corrections form {
display: inline-block;
}
#suggestions form .btn,
#corrections form .btn {
text-transform: none;
}
.infobox {
margin-top: 32px;
}
......@@ -720,11 +799,29 @@ nav #eelo_links > * {
width: 100%;
margin-top: 16px;
}
.infobox table {
margin-top: 16px;
}
.infobox table tr {
vertical-align: top;
}
.infobox table tr td {
padding: 0;
padding-bottom: 8px;
}
.infobox table tr > .label {
text-align: right;
color: rgba(0, 0, 0, 0.4);
padding-right: 16px;
}
#image_result_mini_gallery_header {
display: flex;
align-items: center;
justify-content: space-between;
}
#image_result_mini_gallery_header .title {
font-size: 18px;
}
@media screen and (max-width: 1100px) {
#results.image-gallery {
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
......@@ -814,3 +911,9 @@ nav #eelo_links > * {
margin-bottom: 8px;
}
}
.highlight .lineno,
.highlighttable .lineno {
margin-right: 16px;
color: rgba(0, 0, 0, 0.4);
display: none;
}
This diff is collapsed.
/*! eelo/searx.min.js | 28-05-2018 | https://github.com/asciimoo/searx */
/*! eelo/searx.min.js | 26-06-2018 | https://github.com/asciimoo/searx */
function configure_image_view(a){document.getElementById("image_view_image").src=a.href,document.getElementById("image_view_file_link").href=a.href,document.getElementById("image_view_url_link").href=a.dataset.url}function show_image_view_modal(a){a.preventDefault();var b=a.target;"IMG"==b.tagName&&(b=b.parentElement);var c=document.getElementById("image_view_modal");c.classList.remove("hidden"),c.style.top=window.scrollY+"px",configure_image_view(b),document.body.classList.add("lock")}function close_image_view_modal(){document.getElementById("image_view_modal").classList.add("hidden"),document.getElementById("image_view_image").src="",document.getElementById("image_view_file_link").href="#",document.getElementById("image_view_url_link").href="#",document.body.classList.remove("lock")}requirejs.config({baseUrl:"./static/themes/oscar/js",paths:{app:"../app"}}),searx.autocompleter&&(searx.searchResults=new Bloodhound({datumTokenizer:Bloodhound.tokenizers.obj.whitespace("value"),queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"./autocompleter?q=%QUERY"}),searx.searchResults.initialize()),$(document).ready(function(){searx.autocompleter&&($("#q").typeahead(null,{name:"search-results",displayKey:function(a){return a},source:searx.searchResults.ttAdapter()}),$("#q").bind("typeahead:selected",function(a){$("#search_form").submit()}))}),$(document).ready(function(){$("#q[autofocus]").focus(),$(".select-all-on-click").click(function(){$(this).select()}),$(".btn-collapse").click(function(){var a=$(this).data("btn-text-collapsed"),b=$(this).data("btn-text-not-collapsed");""!==a&&""!==b&&($(this).hasClass("collapsed")?new_html=$(this).html().replace(a,b):new_html=$(this).html().replace(b,a),$(this).html(new_html))}),$(".btn-toggle .btn").click(function(){var a="btn-"+$(this).data("btn-class"),b=$(this).data("btn-label-default"),c=$(this).data("btn-label-toggled");""!==c&&($(this).hasClass("btn-default")?new_html=$(this).html().replace(b,c):new_html=$(this).html().replace(c,b),$(this).html(new_html)),$(this).toggleClass(a),$(this).toggleClass("btn-default")}),$(".media-loader").click(function(){var a=$(this).data("target"),b=$(a+" > iframe"),c=b.attr("src");void 0!==c&&!1!==c||b.attr("src",b.data("src"))}),$("#show_more_categories_").click(function(a){$(a.target).addClass("hidden"),$("#show_less_categories_").removeClass("hidden"),$("#more_categories_toggle_").attr("checked",!0)}),$("#show_less_categories_").click(function(a){$(a.target).addClass("hidden"),$("#show_more_categories_").removeClass("hidden"),$("#more_categories_toggle_").attr("checked",!1)}),$("#show_more_categories_").removeClass("hidden"),$('<div id="more_categories_toggle_" class="hidden"></div>').insertAfter($("#more_categories_toggle")),$("#more_categories_toggle, #show_more_categories, #show_less_categories").remove()}),$(document).ready(function(){$(".searx_overpass_request").on("click",function(a){var b="https://overpass-api.de/api/interpreter?data=",c=b+"[out:json][timeout:25];(",d=");out meta;",e=$(this).data("osm-id"),f=$(this).data("osm-type"),g=$(this).data("result-table"),h="#"+$(this).data("result-table-loadicon"),i=["addr:city","addr:country","addr:housenumber","addr:postcode","addr:street"];if(e&&f&&g){g="#"+g;var j=null;switch(f){case"node":j=c+"node("+e+");"+d;break;case"way":j=c+"way("+e+");"+d;break;case"relation":j=c+"relation("+e+");"+d}if(j){$.ajax(j).done(function(a){if(a&&a.elements&&a.elements[0]){var b=a.elements[0],c=$(g).html();for(var d in b.tags)if(null===b.tags.name||-1==i.indexOf(d)){switch(c+="<tr><td>"+d+"</td><td>",d){case"phone":case"fax":c+='<a href="tel:'+b.tags[d].replace(/ /g,"")+'">'+b.tags[d]+"</a>";break;case"email":c+='<a href="mailto:'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"website":case"url":c+='<a href="'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikidata":c+='<a href="https://www.wikidata.org/wiki/'+b.tags[d]+'">'+b.tags[d]+"</a>";break;case"wikipedia":if(-1!=b.tags[d].indexOf(":")){c+='<a href="https://'+b.tags[d].substring(0,b.tags[d].indexOf(":"))+".wikipedia.org/wiki/"+b.tags[d].substring(b.tags[d].indexOf(":")+1)+'">'+b.tags[d]+"</a>";break}default:c+=b.tags[d]}c+="</td></tr>"}$(g).html(c),$(g).removeClass("hidden"),$(h).addClass("hidden")}}).fail(function(){$(h).html($(h).html()+'<p class="text-muted">could not load data!</p>')})}}$(this).off(a)}),$(".searx_init_map").on("click",function(a){var b=$(this).data("leaflet-target"),c=$(this).data("map-lon"),d=$(this).data("map-lat"),e=$(this).data("map-zoom"),f=$(this).data("map-boundingbox"),g=$(this).data("map-geojson");require(["leaflet-0.7.3.min"],function(a){f&&(southWest=L.latLng(f[0],f[2]),northEast=L.latLng(f[1],f[3]),map_bounds=L.latLngBounds(southWest,northEast)),L.Icon.Default.imagePath="./static/themes/oscar/img/map";var h=L.map(b),i="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",j='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',k=new L.TileLayer(i,{minZoom:1,maxZoom:19,attribution:j}),l="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",m='Wikimedia maps beta | Maps data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';new L.TileLayer(l,{minZoom:1,maxZoom:19,attribution:m});map_bounds?setTimeout(function(){h.fitBounds(map_bounds,{maxZoom:17})},0):c&&d&&(e?h.setView(new L.LatLng(d,c),e):h.setView(new L.LatLng(d,c),8)),h.addLayer(k);var n={"OSM Mapnik":k};L.control.layers(n).addTo(h),g&&L.geoJson(g).addTo(h)}),$(this).off(a)})});
\ No newline at end of file
......@@ -56,6 +56,10 @@ footer {
text-align: center;
color: #c1c1c1;
padding-bottom: @spacing_medium;
.links > :first-child {
margin-right: @spacing_medium;
}
}
......
.highlight, .highlighttable {
.lineno {
margin-right: @spacing_large;
color: @text-muted-color;
display: none;
}
.kd {}
.kt {}
.nf {}
.o {}
}
\ No newline at end of file
......@@ -13,6 +13,7 @@
@corner-radius: 8px;
@dim-color-superlighter: rgba(0, 0, 0, 0.03);
@dim-color-lighter: rgba(0, 0, 0, 0.1);
@dim-color-light: rgba(0, 0, 0, 0.2);
@dim-color-normal: rgba(0, 0, 0, 0.4);
......@@ -57,10 +58,12 @@
@color-transition: color .2s ease-in-out;
@border-color-transition: border-color .2s ease-in-out;
@fill-transition: fill .2s ease-in-out;
@box-shadow-transition: box-shadow .2s ease-in-out;
.color-transition { transition: @color-transition; }
.border-color-transition { transition: @border-color-transition; }
.fill-transition { transition: @fill-transition; }
.box-shadow-transition { transition: @box-shadow-transition; }
.widget-border(@color: rgba(0, 0, 0, .2)) {
border: 2px solid @color;
......
......@@ -7,4 +7,5 @@
@import "search.less";
@import "results.less";
@import "preferences.less";
\ No newline at end of file
@import "preferences.less";
@import "code.less";
\ No newline at end of file
......@@ -4,6 +4,13 @@
}
.result {
.result-template {
font-weight: bold;
text-transform: uppercase;
color: @text-muted-color;
& + .result_header { margin-top: 0; }
}
.result_header {
margin-bottom: @spacing_small;
......@@ -12,18 +19,62 @@
height: 16px;
}
}
.subheader > :not(:last-child), .subheader > * > :not(:last-child) {
margin-right: @spacing_large;
}
.result-content {
margin-top: @spacing_medium;
margin-bottom: @spacing_small;
p, pre {
margin-top: @spacing_medium;
margin-bottom: @spacing_medium;
}
}
&.result-torrent {
.extra-info > :not(:last-child) { margin-right: @spacing_large; }
}
&.result-videos {
position: relative;
.result-content {
display: flex;
margin: 0px;
.result_header { margin-top: 0; }
& > .thumbnail { flex: 1; }
& > :not(.thumbnail) {
flex: 3;
padding-left: @spacing_large;
}
.thumbnail > img { width: 100%; }
}
}
.external-link {
font-size: @fontsize_small;
color: #39a441;
}
.extra-info {
color: @text-muted-color;
}
.code-block {
background-color: @dim-color-superlighter;
padding: 0 @spacing_large;
border-radius: @corner-radius;
border: 1px solid @dim-color-light;
pre {
white-space: pre-wrap;
}
}
}
.result.result-default {
.result.result-default, .result.result-torrent, .result.result-videos {
margin-bottom: @spacing_xx-large;
}
.result.result-images {
......@@ -69,6 +120,7 @@
#default_images_container {
column-count: 5;
column-gap: @spacing_medium;
margin-bottom: @spacing_xx-large;
.img-thumb-link {
display: block;
......@@ -78,6 +130,14 @@
}
#suggestions, #corrections {
form {
display: inline-block;
.btn { text-transform: none; }
}
}
.infobox {
margin-top: @spacing_xx-large;
......@@ -111,12 +171,30 @@
.footer {
}
table { margin-top: @spacing_large; }
table tr {
vertical-align: top;
td {
padding: 0;
padding-bottom: @spacing_medium;
}
& > .label {
text-align: right;
color: @text-muted-color;
padding-right: @spacing_large;
}
}
}
#image_result_mini_gallery_header {
display: flex;
align-items: center;
justify-content: space-between;
.title { font-size: @fontsize_large; }
}
......
......@@ -12,8 +12,8 @@
.widget-border(rgba(0, 0, 0, 0.24));
border-radius: 50px;
height: @input-size;
&:hover, &:active { border-color: @color_accent; }
&:extend(.border-color-transition);
&:hover, &:active { box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.13); }
&:extend(.box-shadow-transition);
// the actual input
#q {
......@@ -140,6 +140,7 @@
font-size: @fontsize_small;
font-weight: normal;
margin-right: @spacing_large;
cursor: pointer;
}
input[type="radio"]:checked + label {
......@@ -173,6 +174,7 @@
align-items: center;
position: relative;
}
#show_more_categories_ { cursor: default; }
#more_categories_toggle:checked, #more_categories_toggle_[checked] {
& ~ #more_categories { display: flex; }
& ~ #show_more_categories { display: none; }
......@@ -211,7 +213,7 @@
> label { padding: 0; }
}
}
#search_input_container {
#search_form.inline-search > #search_input_container {
margin-right: @spacing_medium * 2 + 24px;
}
.tt-dropdown-menu {
......
......@@ -76,6 +76,12 @@
}
.collapser {
input:checked ~ .collapse { display: initial; }
input:not(:checked) ~ .collapse { display: none; }
}
.custom-select {
appearance: none;
-webkit-appearance: none;
......
{% extends "eelo/base.html" %}
{% block title %}{{ _('about') }} - {% endblock %}
{% block content %}
{% include '__common__/about.html' %}
<div class="container">
{% include '__common__/about.html' %}
</div>
{% endblock %}
......@@ -58,17 +58,21 @@
{% set inline_search_form = true %}
<main>
{% if errors %}
<div class="alert alert-danger fade in" role="alert">
<button class="close" data-dismiss="alert" type="button">
<span aria-hidden="true">×</span>
<span class="sr-only">{{ _('Close') }}</span>
</button>
<strong class="lead">{{ icon('info-sign') }} {{ _('Error!') }}</strong>
{# Ignore errors for now, they might not be very useful #}
{% if errors and False %}
<div class="error danger" role="alert">
<div class="header">
<strong class="lead">{{ _('Error!') }}</strong>
<button class="close" data-dismiss="alert" type="button">
{{ icon("close") }}
</button>
</div>
<ul>
{% for message in errors %}
{% for message in errors %}
<li>{{ message }}</li>
{% endfor %}
{% endfor %}
</ul>
</div>
{% endif %}
......@@ -104,10 +108,12 @@
{% endblock %}
<p class="text-muted">
<small>
eelo 2018
eelo 2018,
{{ _('Powered by') }} <a href="https://asciimoo.github.io/searx/">searx</a><br/>
<a href="https://eelo.io">{{ _('About') }}</a>
<a href="https://github.com/asciimoo/searx/issues">{{ _('Privacy') }}</a>
<span class="links">
<a href="https://eelo.io">{{ _('About') }}</a>
<a href="#">{{ _('Privacy') }}</a>
</span>
</small>
</p>
</footer>
......
......@@ -3,9 +3,11 @@
<label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
{%- endmacro -%}
{% set main_categories = ["general", "images", "news"] %}
<div id="categories" {% if rtl %} class="rtl" {% endif %}>
{% for category in categories %}
{% if category in ["general", "images"] or category in selected_categories %}
{% if category in main_categories or category in selected_categories %}
{{ category_widget(category) }}
{% endif %}
{% endfor %}
......@@ -18,7 +20,7 @@
<span id="show_less_categories_" class="hidden">{{_("Less")}}</span>
<div id="more_categories">
{% for category in categories %}
{% if not (category in ["general", "images"] or category in selected_categories) %}
{% if not (category in main_categories + ["map"] or category in selected_categories) %}
{{ category_widget(category) }}
{% endif %}
{% endfor %}
......
......@@ -21,14 +21,14 @@
</div>
{% if infobox.attributes %}
<table class="table table-striped infobox_part">
<table>
{% for attribute in infobox.attributes %}
<tr>
<td><bdi>{{ attribute.label }}</bdi></td>
<td class="label"><bdi>{{ attribute.label }}</bdi></td>
{% if attribute.image %}
<td><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
<td class="value"><img class="img-responsive" src="{{ image_proxify(attribute.image.src) }}" alt="{{ attribute.image.alt }}" /></td>
{% else %}
<td><bdi>{{ attribute.value }}</bdi></td>
<td class="value"><bdi>{{ attribute.value }}</bdi></td>
{% endif %}
</tr>
{% endfor %}
......
......@@ -41,9 +41,14 @@
<!-- Draw result sub header -->
{% macro result_sub_header(result) -%}
{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
{% if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %}
{% if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %}
<small class="subheader">
{% if result.publishedDate %}
<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>
{% endif %}
{% if caller %}
<span class="links">{{caller()}}</span>
{% endif %}
</small>
{%- endmacro %}
<!-- Draw result footer -->
......@@ -84,3 +89,32 @@
</span>
{% endif %}
{%- endmacro %}
{% macro search_link(text, q, method=None, time_range=None, lang=None, category=None) -%}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation">
<input type="hidden" name="q" value="{{ q }}" />
{% if time_range %}
<input type="hidden" name="time_range" value="{{ time_range }}" />
{% endif %}
{% if time_range %}
<input type="hidden" name="language" value="{{ lang }}" />
{% endif %}
{% if category %}
<input type="hidden" name="category" value="images" />
{% endif %}
<button type="submit" class="btn btn-flat" >{{ text }}</button>
</form>
{% endmacro %}
{% macro collapser(text, id, classes) -%}
<div class="collapser">
<input type="checkbox" class="hidden" id="{{id}}">
<label for="{{id}}" class="{{classes}}">{{text}}</label>
<div class="collapse">
{{ caller() }}
</div>
</div>
{%- endmacro %}
\ No newline at end of file
{% from 'eelo/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% call result_sub_header(result) %}
{% if result.repository %}<a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a>{% endif %}
{% endcall %}
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
<div class="result-content">
{% if result.content %}{{ result.content|safe }}{% endif %}
{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
<div dir="ltr">
{{ result.codelines|code_highlighter(result.code_language)|safe }}
<div dir="ltr" class="code-block">
{{ result.codelines|code_highlighter(result.code_language)|safe }}
</div>
</div>
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
{{ result_footer(result) }}
\ No newline at end of file
{% from 'eelo/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% call result_sub_header(result) %}
{% endcall %}
{% if result.embedded %}
<small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music') }} {{ _('show media') }}</a></small>
{% endif %}
{% if result.embedded %}
<div id="result-media-{{ index }}" class="collapse">
{{ result.embedded|safe }}
</div>
{% endif %}
{% if result.img_src %}
<div class="container-fluid">
<div class="row">
<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
{% if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif %}
</div>
<div class="result-content">
<span>
{% if result.content %}{{ result.content|safe }}{% endif %}
</span>
</div>
{% else %}
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
{% endif %}
{% if rtl %}
{{ result_footer_rtl(result) }}
{% else %}
{{ result_footer(result) }}
{% endif %}
{% from 'eelo/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{% from 'eelo/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, result_link, icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
{% call result_sub_header(result) %}
{% if result.magnetlink %}
{{ result_link(result.magnetlink, _('magnet link'), "magnetlink") }}
{% endif %}
{% if result.torrentfile %}
{{ result_link(result.torrentfile, _('torrent file'), "torrentfile") }}
{% endif %}
{% endcall %}
<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>
{% if result.filesize %}<br />{{ icon('floppy-disk') }} {{ _('Filesize') }}
<span class="badge">
{% 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*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
{% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }}
{% else %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024/1024) }} {{ _('TiB') }}{% endif %}
</span>{% endif %}
{% if result.files %}<br />{{ icon('file') }} {{ _('Number of Files') }} <span class="badge">{{ result.files }}</span>{% endif %}
<div class="result-content">
{% if result.content %}<br />{{ result.content|safe }}{% endif %}
<div class="extra-info">
{% if result.seed and result.leech -%}
<span>{{ _('Seeders') }}: {{ result.seed }}</span>
<span>{{ _('Leechers') }}: {{ result.leech }}</span>
{%- endif %}
{% if result.filesize %}
<span class="badge"> {{ _('Filesize') }}:
{% 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*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024) }} {{ _('MiB') }}
{% elif result.filesize < 1024*1024*1024*1024 %}{{ '{0:0.2f}'.format(result.filesize/1024/1024/1024) }} {{ _('GiB') }}