[fix] new_issue.html: drop inline style attributes (CSP conformance)

Inline styles are blocked by default with Content Security Policy (CSP).  Move
the inline styles from 'new_issue.html' to::

    searx/static/themes/__common__/less/new_issue.less

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2021-04-28 16:07:21 +02:00
parent 7f2dc530b2
commit 70cc196e2d
6 changed files with 20 additions and 39 deletions

View File

@ -0,0 +1,14 @@
.github-issue-button {
display: block;
padding: 8px 16px;
font-family: sans-serif;
font-size: 16px;
color: white;
background-color: #238636 !important; /* important is needed cause to an !important in logicodev-dark */
border: #2ea043;
border-radius: 10px !important;
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;
}
.github-issue-button:hover {
background-color: #2ea043;
}

View File

@ -1,4 +1,5 @@
@import "../logicodev/variables.less"; @import "../logicodev/variables.less";
@import "../../../../__common__/less/new_issue.less";
@stacked-bar-chart: rgb(213, 216, 215, 1); @stacked-bar-chart: rgb(213, 216, 215, 1);

View File

@ -1,23 +1,14 @@
@import "variables.less"; @import "variables.less";
@import "../../../../__common__/less/new_issue.less";
@import "navbar.less"; @import "navbar.less";
@import "footer.less"; @import "footer.less";
@import "checkbox.less"; @import "checkbox.less";
@import "onoff.less"; @import "onoff.less";
@import "results.less"; @import "results.less";
@import "infobox.less"; @import "infobox.less";
@import "search.less"; @import "search.less";
@import "advanced.less"; @import "advanced.less";
@import "cursor.less"; @import "cursor.less";
@import "code.less"; @import "code.less";
@import "preferences.less"; @import "preferences.less";

View File

@ -1,25 +1,15 @@
@import "variables.less"; @import "variables.less";
@import "../../../../__common__/less/new_issue.less";
@import "footer.less"; @import "footer.less";
@import "checkbox.less"; @import "checkbox.less";
@import "onoff.less"; @import "onoff.less";
@import "results.less"; @import "results.less";
@import "infobox.less"; @import "infobox.less";
@import "search.less"; @import "search.less";
@import "advanced.less"; @import "advanced.less";
@import "cursor.less"; @import "cursor.less";
@import "code.less"; @import "code.less";
@import "navbar.less"; @import "navbar.less";
@import "code.less"; @import "code.less";
@import "preferences.less"; @import "preferences.less";

View File

@ -6,6 +6,8 @@
@stacked-bar-chart: rgb(0, 0, 0); @stacked-bar-chart: rgb(0, 0, 0);
@import "../../__common__/less/new_issue.less";
@import "normalize.less"; @import "normalize.less";
@import "definitions.less"; @import "definitions.less";

View File

@ -52,23 +52,6 @@ or manually by executing the searx/webapp.py file? -->
{{-'\n '}}* {{ test_name }}: {% for result in results%}`{{ result }}`,{% endfor -%} {{-'\n '}}* {{ test_name }}: {% for result in results%}`{{ result }}`,{% endfor -%}
{%- endfor -%} {%- endfor -%}
</textarea> </textarea>
<style>
.github-issue-button {
display: block;
padding: 8px 16px;
font-family: sans-serif;
font-size: 16px;
color: white;
background-color: rgb(35, 134, 54);
border: rgb(46, 160, 67);
border-radius: 10px !important;
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;
}
.github-issue-button:hover {
background-color: rgb(46, 160, 67);
}
</style>
<button type="submit" class="github-issue-button" title="{{ new_issue_url }}">{{ _('Submit a new issue on Github including the above information') }}</button> <button type="submit" class="github-issue-button" title="{{ new_issue_url }}">{{ _('Submit a new issue on Github including the above information') }}</button>
</form> </form>
{% endmacro %} {% endmacro %}