mirror of
https://github.com/searxng/searxng
synced 2024-11-05 06:01:05 +00:00
[fix] make oscar theme more CSP compliant - default-image-style
Add default-image-style in:: searx/static/themes/oscar/src/less/result_templates.less Replaced style= in files:: ./oscar/result_templates/default.html:19: <img src="{{ image_proxify(result.img_src or result.thumbnail) }}" 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"> ./oscar/result_templates/files.html:24:<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"> Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
e564cef0fe
commit
9d106ae972
@ -2,6 +2,7 @@
|
|||||||
@import "../../../../__common__/less/new_issue.less";
|
@import "../../../../__common__/less/new_issue.less";
|
||||||
@import "../../../../__common__/less/stats.less";
|
@import "../../../../__common__/less/stats.less";
|
||||||
@import "../../../../__common__/less/result_templates.less";
|
@import "../../../../__common__/less/result_templates.less";
|
||||||
|
@import "../../less/result_templates.less";
|
||||||
@import "../../generated/pygments-logicodev.less";
|
@import "../../generated/pygments-logicodev.less";
|
||||||
|
|
||||||
@stacked-bar-chart: rgb(213, 216, 215, 1);
|
@stacked-bar-chart: rgb(213, 216, 215, 1);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
@import "../../../../__common__/less/new_issue.less";
|
@import "../../../../__common__/less/new_issue.less";
|
||||||
@import "../../../../__common__/less/stats.less";
|
@import "../../../../__common__/less/stats.less";
|
||||||
@import "../../../../__common__/less/result_templates.less";
|
@import "../../../../__common__/less/result_templates.less";
|
||||||
|
@import "../../less/result_templates.less";
|
||||||
@import "../../generated/pygments-logicodev.less";
|
@import "../../generated/pygments-logicodev.less";
|
||||||
|
|
||||||
@import "navbar.less";
|
@import "navbar.less";
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
@import "../../../../__common__/less/new_issue.less";
|
@import "../../../../__common__/less/new_issue.less";
|
||||||
@import "../../../../__common__/less/stats.less";
|
@import "../../../../__common__/less/stats.less";
|
||||||
@import "../../../../__common__/less/result_templates.less";
|
@import "../../../../__common__/less/result_templates.less";
|
||||||
|
@import "../../less/result_templates.less";
|
||||||
@import "../../generated/pygments-pointhi.less";
|
@import "../../generated/pygments-pointhi.less";
|
||||||
|
|
||||||
@import "footer.less";
|
@import "footer.less";
|
||||||
|
5
searx/static/themes/oscar/src/less/result_templates.less
Normal file
5
searx/static/themes/oscar/src/less/result_templates.less
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.default-image-style {
|
||||||
|
width: auto;
|
||||||
|
max-height: 60px;
|
||||||
|
min-height: 60px;
|
||||||
|
}
|
@ -16,7 +16,7 @@
|
|||||||
{%- if result.img_src or result.thumbnail -%}
|
{%- if result.img_src or result.thumbnail -%}
|
||||||
<div class="container-fluid">{{- "" -}}
|
<div class="container-fluid">{{- "" -}}
|
||||||
<div class="row">{{- "" -}}
|
<div class="row">{{- "" -}}
|
||||||
<img src="{{ image_proxify(result.img_src or result.thumbnail) }}" 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">
|
<img src="{{ image_proxify(result.img_src or result.thumbnail) }}" title="{{ result.title|striptags }}" class="default-image-style" 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 -%}
|
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
|
||||||
</div>{{- "" -}}
|
</div>{{- "" -}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{%- if result.img_src -%}
|
{%- if result.img_src -%}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<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">
|
<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="default-image-style 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 -%}
|
{%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user