From 55a44c6e2e9c5fa011e5c7de322e5753f1599c7e Mon Sep 17 00:00:00 2001 From: "Vipul Gupta (@vipulgupta2048)" Date: Fri, 9 Feb 2024 14:13:34 +0530 Subject: [PATCH] minor: Add Cookie Consent Dialog box Signed-off-by: Vipul Gupta (@vipulgupta2048) --- static/css/cookie-consent.css | 165 +++++++++++++++++++++++++++++++++ static/css/main.css | 1 + templates/_cookie-consent.html | 127 +++++++++++++++++++++++++ 3 files changed, 293 insertions(+) create mode 100644 static/css/cookie-consent.css create mode 100644 templates/_cookie-consent.html diff --git a/static/css/cookie-consent.css b/static/css/cookie-consent.css new file mode 100644 index 0000000000..b650545625 --- /dev/null +++ b/static/css/cookie-consent.css @@ -0,0 +1,165 @@ +/** Import balena design tokens **/ +@import url("https://unpkg.com/@balena/design-tokens@latest/build/css/tokens.css"); + +html { + -moz-osx-font-smoothing: grayscale; +} + +body { + --wp--style--root--padding-bottom: 0; +} + +.taxonomy-category a { + text-decoration: none; +} + +.taxonomy-category a:hover { + text-decoration: underline; +} + +/** fix a bug in header search form **/ +.wp-block-search-is-layout-flow > * { + margin-block-start: 0; +} + +:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input { + padding-left: 1rem !important; +} + +.wp-block-search__inside-wrapper { + background-color: var(--wp--preset--color--tertiary); + border: none; +} + +.wp-block-search__input, +.wp-block-search__button { + background: transparent; +} + +.wp-block-search__input { + color: var(--wp--preset--color--secondary); +} + +.wp-block-search__button:hover, +.wp-block-search__button:active, +.wp-block-search__button:focus { + background: var(--wp--preset--color--secondary); + color: white !important; +} + +.wp-block-post-content img { + width: 100%; + height: auto; +} + +.page-footer { + margin-top: 0; +} + +.wp-block-social-link-anchor { + font-size: 90% !important; +} + + +/** Tag cloud **/ +.wp-block-tag-cloud.is-style-outline { + & .tag-cloud-link { + border-radius: 100px; + border: none; + background: var(--color-bg-accent); + color: var(--color-text-accent); + padding: 8px 16px; + text-transform: capitalize; + font-size: 14px !important; + + &:hover, + &:active { + background: var(--color-bg-accent-strong); + color: var(--color-text-inverse); + } + } +} + + + +.wp-block-navigation .item-highlighted a { + border: solid 1px var(--color-border-accent-strong); + border-radius: 100px; + padding: 8px 32px; + font-size: 14px; + transition: all 150ms ease-out; + + &:hover, + &:active, + &:focus { + background-color: var(--color-bg-accent-strong); + color: var(--color-text-inverse); + text-decoration: none; + } +} + + +footer a { + color: var(--color-text-accent); +} + + +body .wp-block-separator { + border-bottom: none; + border-color: var(--color-border-subtle); +} + + + +body .is-layout-constrained > .wp-block-image:where(:not(.alignleft):not(.alignright):not(.alignfull)) { + max-width: 850px; +} + +.wp-block-wp-discourse-comments-is-layout-constrained { + font-size: 16px; + margin-block: 5rem !important; + + & .comment:not(:last-child) { + padding-bottom: 2rem; + margin-bottom: 2rem; + border-bottom: solid var(--color-border-subtle) 1px; + } + + & .comment-reply-title, + & .discourse-participants { + font-size: 1.5rem; + } +} + +.wp-block-quote { + border-left: solid 2px var(--color-border-accent) !important; +} + +.wp-block-quote p { + font-size: 1.25rem; + font-style: italic; +} + +.wp-block-quote cite { + font-size: .9rem; +} + + + +.MathJax { + display: inline-block !important; +} + +@media screen and (max-width: 500px) { + .wp-block-query h2 { + font-size: 1.25rem !important; + } + + .wp-block-search__inside-wrapper { + width: 150px !important; + } + + header nav.wp-block-navigation { + display: none; + } +} \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index aec1c4c726..3d2a65a20b 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,4 +1,5 @@ @import "tooltips.css"; +@import "cookie-conset.css"; body { margin-top: 61px; diff --git a/templates/_cookie-consent.html b/templates/_cookie-consent.html new file mode 100644 index 0000000000..701c47e2e2 --- /dev/null +++ b/templates/_cookie-consent.html @@ -0,0 +1,127 @@ + + + + \ No newline at end of file