Remove unsafe-inline from style csp directives.

* Remove unused CSS variable
This commit is contained in:
Tasos Katsoulas 2022-05-09 12:24:31 +03:00
Родитель 788633b5b3
Коммит 3de6ce298d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 522F81314743785E
12 изменённых файлов: 11 добавлений и 12 удалений

Просмотреть файл

@ -1,5 +1,5 @@
{% macro product_cards(products, topic=None) -%}
<div class="sumo-card-grid is-product-wrap" style="--cg-count: {{ products|length }};">
<div class="sumo-card-grid is-product-wrap">
<div class="scroll-wrap">
{% for product in products %}
<div class="card card--product zoom-on-hover">

Просмотреть файл

@ -1,6 +1,6 @@
{% macro help_topics(topics, product_slug=None, new_tab=False) -%}
<div class="sumo-card-grid" style="--cg-count: {{ topics|length }};">
<div class="sumo-card-grid">
<div class="scroll-wrap">
{% for topic in topics %}
{% set topic_url = url('products.documents', product_slug=product_slug or product.slug, topic_slug=topic.slug) %}

Просмотреть файл

@ -5,7 +5,7 @@
<h1 class="sumo-page-heading">{{ _('Contact Support') }}</h1>
<h2 class="sumo-page-subheading">{{ _('Which product do you need help with?') }}</h2>
<div class="sumo-page-section--inner">
<div id="product-picker" class="sumo-card-grid stack-on-mobile" style="--cg-count: {{ products|length }};">
<div id="product-picker" class="sumo-card-grid stack-on-mobile">
<div class="scroll-wrap">
{% for key, product in products.items() %}
<div class="card card--product zoom-on-hover">

Просмотреть файл

@ -19,7 +19,7 @@
<div class="product-list sumo-card-grid" style="--cg-count: {{ products|length + 1}};">
<div class="product-list sumo-card-grid">
<div class="scroll-wrap">
{% for product in products %}
<div class="card card--product zoom-on-hover product">

Просмотреть файл

@ -43,7 +43,7 @@
<p>{{ _("Try searching again with a different keyword, or browse our featured articles and threads below instead.") }}</p>
<section class="sumo-card-grid content-box" style="--cg-count: {{ fallback_results|length }};">
<section class="sumo-card-grid content-box">
<div class="scroll-wrap">
{% for doc in fallback_results %}
<div class="card card--article result document">

Просмотреть файл

@ -1243,7 +1243,6 @@ CSP_FONT_SRC = (
CSP_STYLE_SRC = (
"'self'",
"'unsafe-inline'",
"https://*.itsre-sumo.mozilla.net",
)

Просмотреть файл

@ -475,7 +475,7 @@
{% endmacro %}
{% macro featured_articles(articles, new_tab=False) %}
<div class="sumo-card-grid is-four-wide" style="--cg-count: 4;">
<div class="sumo-card-grid is-four-wide">
<div class="scroll-wrap">
{% for doc in articles %}
<div class="card card--article zoom-on-hover">

Просмотреть файл

@ -43,7 +43,7 @@
{% else %}
<p>{{ _("Try searching again with a different keyword, or browse our featured articles below instead.") }}</p>
<section class="sumo-card-grid extra-padding content-box" style="--cg-count: {{ fallback_results|length }};">
<section class="sumo-card-grid extra-padding content-box">
<div class="scroll-wrap">
{% for doc in fallback_results %}
<div class="card card--article result document">

Просмотреть файл

@ -113,7 +113,7 @@
<div class="text-center">
<h2 class="sumo-page-subheading">{{ _('Related Articles') }}</h2>
</div>
<div class="sumo-card-grid" style="--cg-count: {{ docs|length }};">
<div class="sumo-card-grid">
<div class="scroll-wrap">
{% for related in docs %}
<div class="card card--article">

Просмотреть файл

@ -3,7 +3,7 @@
<h2 class="sumo-page-subheading">Featured Articles &amp; Threads</h2>
</div>
<div class="sumo-card-grid is-four-wide" style="--cg-count: 4;">
<div class="sumo-card-grid is-four-wide">
<div class="scroll-wrap">
<div class="card card--article">
<img class="card--icon-sm" src="{{ webpack_static('protocol/img/icons/blog.svg') }}" alt="todo: title">

Просмотреть файл

@ -3,7 +3,7 @@
<h2 class="sumo-page-subheading">Get Help</h2>
<p>Pick your product</p>
</div>
<div class="sumo-card-grid" style="--cg-count: 2;">
<div class="sumo-card-grid">
<div class="scroll-wrap">
<div class="card card--product">

Просмотреть файл

@ -1,5 +1,5 @@
<div class="sumo-card-grid {{ modifier_class }}" style="--cg-count: 8;">
<div class="sumo-card-grid {{ modifier_class }}">
<div class="scroll-wrap">
<div class="card card--article">
<img class="card--icon-sm" src="{{ webpack_static('protocol/img/icons/blog.svg') }}" alt="todo: title" />