mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
57 lines
1.7 KiB
HTML
57 lines
1.7 KiB
HTML
|
{#-
|
||
|
This file was automatically generated - do not edit
|
||
|
-#}
|
||
|
{% import "partials/language.html" as lang with context %}
|
||
|
{% set cookies = config.extra.consent.cookies %}
|
||
|
{% if config.extra.analytics and not cookies %}
|
||
|
{% set cookies = { "analytics": "Google Analytics" } %}
|
||
|
{% endif %}
|
||
|
{% set actions = config.extra.consent.actions %}
|
||
|
{% if not actions %}
|
||
|
{% set actions = ["accept", "manage"] %}
|
||
|
{% endif %}
|
||
|
<h4>{{ config.extra.consent.title }}</h4>
|
||
|
<p>{{ config.extra.consent.description }}</p>
|
||
|
<input type="checkbox" class="md-toggle" id="__settings">
|
||
|
<div class="md-consent__settings">
|
||
|
<ul class="task-list">
|
||
|
{% for type in cookies %}
|
||
|
{% if cookies[type] is string %}
|
||
|
{% set name = cookies[type] %}
|
||
|
{% set checked = "checked" %}
|
||
|
{% else %}
|
||
|
{% set name = cookies[type].name %}
|
||
|
{% if cookies[type].checked %}
|
||
|
{% set checked = "checked" %}
|
||
|
{% endif %}
|
||
|
{% endif %}
|
||
|
<li class="task-list-item">
|
||
|
<label class="task-list-control">
|
||
|
<input type="checkbox" name="{{ type }}" {{ checked }}>
|
||
|
<span class="task-list-indicator"></span>
|
||
|
{{ name }}
|
||
|
<label>
|
||
|
</li>
|
||
|
{% endfor %}
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="md-consent__controls">
|
||
|
{% for action in actions %}
|
||
|
{% if action == "accept" %}
|
||
|
<button class="md-button md-button--primary">
|
||
|
{{- lang.t("consent.accept") -}}
|
||
|
</button>
|
||
|
{% endif %}
|
||
|
{% if action == "reject" %}
|
||
|
<button type="reset" class="md-button md-button--primary">
|
||
|
{{- lang.t("consent.reject") -}}
|
||
|
</button>
|
||
|
{% endif %}
|
||
|
{% if action == "manage" %}
|
||
|
<label class="md-button" for="__settings">
|
||
|
{{- lang.t("consent.manage") -}}
|
||
|
</label>
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
</div>
|