From 1a051e64d595af7a7a668ea655c49e614d821e57 Mon Sep 17 00:00:00 2001 From: aquint-zama Date: Tue, 12 Oct 2021 11:11:24 +0200 Subject: [PATCH] chore: update docs theme to v0.5.0 --- docs/_static/css/zama.css | 96 +++++++++++++++++++++++++++++++++++-- docs/_templates/layout.html | 50 ++++++++++++++++--- docs/conf.py | 1 - 3 files changed, 134 insertions(+), 13 deletions(-) diff --git a/docs/_static/css/zama.css b/docs/_static/css/zama.css index a80d41c2b..c6bc81012 100644 --- a/docs/_static/css/zama.css +++ b/docs/_static/css/zama.css @@ -12,6 +12,8 @@ --tertiary-color: #414042; --tertiary-color-light: #e6e7e8; --link-color: black; + --button-accept-color: #ffd208; + --button-decline-color: grey; --primary-font: Archivo, sans-serif; } @@ -212,11 +214,9 @@ dl.class > dt:first-of-type { display: block !important; } - - - /* - * Admonitions - */ +/* + * Admonitions + */ /* Important admonition */ .rst-content .important .admonition-title { @@ -246,3 +246,89 @@ dl.class > dt:first-of-type { .rst-content .note { background: var(--tertiary-color-light); } + +/* + * RGPD + */ + +.rgpd { + z-index: 300; + position: fixed; + width: calc(100% - 40px); + height: 76px; + padding: 17px 0px; + border: 1px solid rgba(0, 0, 0, 0.2); + background-color: rgba(255, 255, 255, 0.9); + bottom: 20px; + left: 20px; + font-size: 16px; + padding-left: 12.5%; + padding-right: 12.5%; + background: black; + color: white; + opacity: 75%; + font-size: 17px; + white-space: nowrap; +} + +.zama-container { + max-width: 1440px; + margin: auto; + width: 100%; +} + +.rgpd .zama-container .padded { + display: flex; + align-items: center; + justify-content: center; +} + +.rgpd .consent { + text-overflow: ellipsis; + overflow: hidden; + +} + +.rgpd .button { + text-decoration: none; + white-space: nowrap; + position: relative; + z-index: 0; + display: inline-flex; + align-items: center; + justify-content: center; + height: 60px; + padding: 0px 10px; + margin-left: 15px; + height: 46px; + text-transform: uppercase; + font-family: var(--primary-font); + font-weight: bold; + -webkit-font-smoothing: antialiased; + font-size: 14px; + cursor: pointer; + color: black; + transition: all 0.33s cubic-bezier(0.33, 0, 0, 1); +} + +.rgpd .button::after { + background-color: white; + height: 46px; + content: ''; + display: block; + position: absolute; + right: 0; + top: 3px; + width: 100%; + height: 40px; + border-radius: 25px; + z-index: -1; +} + +.rgpd .button-accept::after{ + background-color: var(--button-accept-color); +} + +.rgpd .button-decline::after{ + background-color: var(--button-decline-color); +} diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 8c127267f..f6769705e 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -16,7 +16,19 @@ - + + + + + + {#- Do not conflict with RTD insertion of analytics script #} {%- if not READTHEDOCS %} {%- if theme_analytics_id %} @@ -250,13 +262,37 @@ {% include "versions.html" -%} - - {%- block footer %} {% endblock %} + {%- if theme_analytics_id %} +
+
+
+ +
Accept
+
Decline
+ +
+
+
+ {%- endif%} diff --git a/docs/conf.py b/docs/conf.py index 8bc6aa66a..66a814edc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -71,7 +71,6 @@ html_favicon = "_static/favicon.ico" html_theme_options = { "logo_only": False, "analytics_id": "G-XRM93J9QBW", - "collapse_navigation": True, } pygments_style = "zenburn" html_last_updated_fmt = None # '%b %d, %Y'