From be8de118db913711eb72ae5187d26e54a0055727 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 15 Dec 2023 09:11:47 +0800 Subject: refactor(docs): optmst `docs` dir & `deps` --- docs/src/templates/partials/consent.html | 107 +++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 docs/src/templates/partials/consent.html (limited to 'docs/src/templates/partials/consent.html') diff --git a/docs/src/templates/partials/consent.html b/docs/src/templates/partials/consent.html new file mode 100644 index 00000000..c84622bc --- /dev/null +++ b/docs/src/templates/partials/consent.html @@ -0,0 +1,107 @@ + + + +{% set cookies = config.extra.consent.cookies | d({}) %} +{% if config.extra.analytics %} + {% if "analytics" not in cookies %} + {% set _ = cookies.update({ "analytics": "Google Analytics" }) %} + {% endif %} +{% endif %} +{% if config.repo_url and "github.com" in config.repo_url %} + {% if "github" not in cookies %} + {% set _ = cookies.update({ "github": "GitHub" }) %} + {% endif %} +{% endif %} + + +{% set actions = config.extra.consent.actions %} +{% if not actions %} + {% set actions = ["accept", "manage"] %} +{% endif %} + + +{% if "manage" not in actions %} + {% set checked = "checked" %} +{% endif %} + + +

{{ config.extra.consent.title }}

+

{{ config.extra.consent.description }}

+ + + + + + + -- cgit v1.2.3-70-g09d2