consent.html (1785B)
1 {#- 2 This file was automatically generated - do not edit 3 -#} 4 {% import "partials/language.html" as lang with context %} 5 {% set cookies = config.extra.consent.cookies %} 6 {% if config.extra.analytics and not cookies %} 7 {% set cookies = { "analytics": "Google Analytics" } %} 8 {% endif %} 9 {% set actions = config.extra.consent.actions %} 10 {% if not actions %} 11 {% set actions = ["accept", "manage"] %} 12 {% endif %} 13 <h4>{{ config.extra.consent.title }}</h4> 14 <p>{{ config.extra.consent.description }}</p> 15 <input type="checkbox" class="md-toggle" id="__settings"> 16 <div class="md-consent__settings"> 17 <ul class="task-list"> 18 {% for type in cookies %} 19 {% if cookies[type] is string %} 20 {% set name = cookies[type] %} 21 {% set checked = "checked" %} 22 {% else %} 23 {% set name = cookies[type].name %} 24 {% if cookies[type].checked %} 25 {% set checked = "checked" %} 26 {% endif %} 27 {% endif %} 28 <li class="task-list-item"> 29 <label class="task-list-control"> 30 <input type="checkbox" name="{{ type }}" {{ checked }}> 31 <span class="task-list-indicator"></span> 32 {{ name }} 33 <label> 34 </li> 35 {% endfor %} 36 </ul> 37 </div> 38 <div class="md-consent__controls"> 39 {% for action in actions %} 40 {% if action == "accept" %} 41 <button class="md-button md-button--primary"> 42 {{- lang.t("consent.accept") -}} 43 </button> 44 {% endif %} 45 {% if action == "reject" %} 46 <button type="reset" class="md-button md-button--primary"> 47 {{- lang.t("consent.reject") -}} 48 </button> 49 {% endif %} 50 {% if action == "manage" %} 51 <label class="md-button" for="__settings"> 52 {{- lang.t("consent.manage") -}} 53 </label> 54 {% endif %} 55 {% endfor %} 56 </div>