consently 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b563d7b5602bb17c10a2ac0ee0b04c6c59642df56920a36e292d808bfef5c89b
4
- data.tar.gz: 0ae29edf9f32feb8fc79cbb7e2717e0a68fee7bef0dafdb38b9e4e5f1523b754
3
+ metadata.gz: 3ae532d0c3dd92af70f6bd6bfae150b2d61889fbb7ecae3ea1edae521e33605a
4
+ data.tar.gz: f0bccd48aba2d92a00e1a1359580b5f051206de246aa205bb3a2a3323df516c9
5
5
  SHA512:
6
- metadata.gz: e71581b2492efb315e7679f1a5d534dd45d8771fe6b552d75b946e763678bad95fccf4bffaa9f03371500ffafbb237a520d5e0c7e4552a616ba18b320fbf6b8a
7
- data.tar.gz: a108dbed5dd145646f649807a953693963d6da9c4eb2ec64eca666301b5dd6e569a1699d71c4000dc879348242dbe547eb17da87558b9bd6deea2e34461ebaca
6
+ metadata.gz: 8c2917ed994ffc2db028512616ef551d18471e2e68df786e150337fae51b14c8de902aabd209cf3d65a81b14fcd7aed13135e5b2a8a3f886a217a5e6b4abd348
7
+ data.tar.gz: bc74d85205720239b176d6caeab993e1bd08d9c49258f4fc6778dd17d763b808a4705155f32b8f7eec620102b1f4215469d3b523fe51b859c74a6961fafa763e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1 (2026-08-13)
4
+
5
+ - The banner's custom properties moved from `.consently` to `:root`, so the
6
+ button on a blocked embed - which lives elsewhere on the page and wears the
7
+ same classes - is styled like the one in the banner instead of losing its
8
+ background. Overriding them on `.consently` still themes the banner.
9
+ - The cookie policy pluralises durations, so a one-day cookie no longer reads
10
+ "1 days"; the Slavic locales carry the full set of forms.
11
+ - A page anybody can open: <https://xeross99.github.io/consently/> runs four
12
+ tags blocked in the browser, and shows what happens to them - and to the
13
+ requests, the cookies and the dataLayer - the moment consent is given.
14
+
3
15
  ## 0.2.0 (2026-08-13)
4
16
 
5
17
  - `consently_embed` for videos and maps: a YouTube or Vimeo iframe, or a
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright TODO: Write your name
1
+ Copyright (c) 2026 Michał Krzysteczko
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -13,6 +13,9 @@ an inert `<script type="text/plain">` the browser will not even fetch, and
13
13
  becomes a live script the instant the visitor agrees - no page reload, no lost
14
14
  pageview.
15
15
 
16
+ **[Try it in your browser](https://xeross99.github.io/consently/)** - four tags
17
+ blocked on a live page, and what happens to them the moment you click.
18
+
16
19
  | | |
17
20
  | --- | --- |
18
21
  | **Blocks** | GA4, Google Tag Manager, Google Ads, Microsoft Clarity, Meta Pixel, Hotjar, Plausible, anything custom |
@@ -319,11 +322,11 @@ moment the visitor chooses.
319
322
 
320
323
  ## Styling
321
324
 
322
- The banner ships as plain CSS scoped under `.consently`, driven by custom
323
- properties. Most restyling is a few variables in your own stylesheet:
325
+ The banner ships as plain CSS, driven by custom properties. Most restyling is a
326
+ few variables in your own stylesheet:
324
327
 
325
328
  ```css
326
- .consently {
329
+ :root {
327
330
  --consently-accent: #4f46e5;
328
331
  --consently-accent-text: #ffffff;
329
332
  --consently-radius: 0;
@@ -331,6 +334,11 @@ properties. Most restyling is a few variables in your own stylesheet:
331
334
  }
332
335
  ```
333
336
 
337
+ The defaults live on `:root`, not on `.consently`: a blocked embed sits
338
+ somewhere else on the page and its button wears the same classes, so variables
339
+ scoped to the banner would never reach it. Scope them tighter if you mean to,
340
+ `.consently` included - it is your stylesheet.
341
+
334
342
  Want the markup instead? Take the partial over, and turn the gem's stylesheet
335
343
  off so it stops loading:
336
344
 
@@ -2,14 +2,18 @@
2
2
  * The banner's own styles. Plain CSS on purpose: a gem that only works if the
3
3
  * host application runs Tailwind is half a gem.
4
4
  *
5
- * Everything is scoped under .consently and driven by custom properties, so
6
- * restyling means overriding a handful of variables rather than forking the
7
- * markup:
5
+ * Every rule is scoped under .consently, .consently-embed or .consently-policy
6
+ * and driven by custom properties, so restyling means overriding a handful of
7
+ * variables rather than forking the markup:
8
8
  *
9
- * .consently { --consently-accent: #4f46e5; --consently-radius: 0; }
9
+ * :root { --consently-accent: #4f46e5; --consently-radius: 0; }
10
+ *
11
+ * The defaults live on :root rather than on .consently because a blocked embed
12
+ * is somewhere else on the page entirely, and its button wears the same
13
+ * classes: scoped to the banner, those variables would not reach it.
10
14
  */
11
15
 
12
- .consently {
16
+ :root {
13
17
  --consently-background: #ffffff;
14
18
  --consently-text: #111827;
15
19
  --consently-muted: #4b5563;
@@ -19,7 +23,9 @@
19
23
  --consently-radius: 0.75rem;
20
24
  --consently-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
21
25
  --consently-max-width: 36rem;
26
+ }
22
27
 
28
+ .consently {
23
29
  position: fixed;
24
30
  inset-inline: 0;
25
31
  bottom: 0;
@@ -23,7 +23,11 @@ cs:
23
23
  no_cookies: "Nenastavuje žádné cookies."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Doba uložení"
26
- duration_days: "%{count} dní"
26
+ duration_days:
27
+ one: "%{count} den"
28
+ few: "%{count} dny"
29
+ many: "%{count} dne"
30
+ other: "%{count} dní"
27
31
  duration_session: "do zavření prohlížeče"
28
32
  own_heading: "Samotná cookie se souhlasem"
29
33
  own_body: "Vaše volba je uložená v jedné cookie ve vašem prohlížeči: kategorie, se kterými jste souhlasili, verze těchto zásad a čas. Nic o vás."
@@ -23,7 +23,9 @@ de:
23
23
  no_cookies: "Setzt keine Cookies."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Speicherdauer"
26
- duration_days: "%{count} Tage"
26
+ duration_days:
27
+ one: "%{count} Tag"
28
+ other: "%{count} Tage"
27
29
  duration_session: "bis zum Schließen des Browsers"
28
30
  own_heading: "Das Einwilligungs-Cookie selbst"
29
31
  own_body: "Ihre Wahl liegt in einem Cookie in Ihrem Browser: die Kategorien, denen Sie zugestimmt haben, die Version dieser Richtlinie und die Uhrzeit. Nichts über Sie."
@@ -23,7 +23,9 @@ en:
23
23
  no_cookies: "Sets no cookies."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Kept for"
26
- duration_days: "%{count} days"
26
+ duration_days:
27
+ one: "%{count} day"
28
+ other: "%{count} days"
27
29
  duration_session: "until you close the browser"
28
30
  own_heading: "The consent cookie itself"
29
31
  own_body: "Your choice is kept in one cookie in your browser: the categories you agreed to, the version of this policy and the time. Nothing about you."
@@ -23,7 +23,9 @@ es:
23
23
  no_cookies: "No instala cookies."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Se conserva"
26
- duration_days: "%{count} días"
26
+ duration_days:
27
+ one: "%{count} día"
28
+ other: "%{count} días"
27
29
  duration_session: "hasta que cierres el navegador"
28
30
  own_heading: "La propia cookie de consentimiento"
29
31
  own_body: "Tu elección se guarda en una cookie de tu navegador: las categorías que aceptaste, la versión de esta política y la hora. Nada sobre ti."
@@ -23,7 +23,9 @@ fr:
23
23
  no_cookies: "Ne dépose aucun cookie."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Conservé"
26
- duration_days: "%{count} jours"
26
+ duration_days:
27
+ one: "%{count} jour"
28
+ other: "%{count} jours"
27
29
  duration_session: "jusqu'à la fermeture du navigateur"
28
30
  own_heading: "Le cookie de consentement lui-même"
29
31
  own_body: "Votre choix tient dans un cookie de votre navigateur : les catégories acceptées, la version de cette politique et l'heure. Rien sur vous."
@@ -23,7 +23,9 @@ hu:
23
23
  no_cookies: "Nem helyez el sütit."
24
24
  cookie_name: "Süti"
25
25
  cookie_duration: "Megőrzés"
26
- duration_days: "%{count} nap"
26
+ duration_days:
27
+ one: "%{count} nap"
28
+ other: "%{count} nap"
27
29
  duration_session: "a böngésző bezárásáig"
28
30
  own_heading: "Maga a hozzájárulási süti"
29
31
  own_body: "A választásod egyetlen sütiben van a böngésződben: az elfogadott kategóriák, e szabályzat verziója és az idő. Rólad semmi."
@@ -23,7 +23,9 @@ it:
23
23
  no_cookies: "Non imposta cookie."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Conservato"
26
- duration_days: "%{count} giorni"
26
+ duration_days:
27
+ one: "%{count} giorno"
28
+ other: "%{count} giorni"
27
29
  duration_session: "fino alla chiusura del browser"
28
30
  own_heading: "Il cookie di consenso"
29
31
  own_body: "La tua scelta sta in un cookie nel tuo browser: le categorie accettate, la versione di questa policy e l'ora. Nulla su di te."
@@ -23,7 +23,9 @@ nl:
23
23
  no_cookies: "Plaatst geen cookies."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Bewaard"
26
- duration_days: "%{count} dagen"
26
+ duration_days:
27
+ one: "%{count} dag"
28
+ other: "%{count} dagen"
27
29
  duration_session: "tot je de browser sluit"
28
30
  own_heading: "De toestemmingscookie zelf"
29
31
  own_body: "Je keuze staat in één cookie in je browser: de categorieën die je toestond, de versie van dit beleid en het tijdstip. Niets over jou."
@@ -23,7 +23,11 @@ pl:
23
23
  no_cookies: "Nie ustawia ciasteczek."
24
24
  cookie_name: "Ciasteczko"
25
25
  cookie_duration: "Przechowywane"
26
- duration_days: "%{count} dni"
26
+ duration_days:
27
+ one: "%{count} dzień"
28
+ few: "%{count} dni"
29
+ many: "%{count} dni"
30
+ other: "%{count} dni"
27
31
  duration_session: "do zamknięcia przeglądarki"
28
32
  own_heading: "Samo ciasteczko zgody"
29
33
  own_body: "Twój wybór trzymamy w jednym ciasteczku w Twojej przeglądarce: kategorie, na które się zgodziłeś, wersja tej polityki i czas. Nic o Tobie."
@@ -23,7 +23,11 @@ sk:
23
23
  no_cookies: "Nenastavuje žiadne cookies."
24
24
  cookie_name: "Cookie"
25
25
  cookie_duration: "Doba uloženia"
26
- duration_days: "%{count} dní"
26
+ duration_days:
27
+ one: "%{count} deň"
28
+ few: "%{count} dni"
29
+ many: "%{count} dňa"
30
+ other: "%{count} dní"
27
31
  duration_session: "do zatvorenia prehliadača"
28
32
  own_heading: "Samotná cookie so súhlasom"
29
33
  own_body: "Vaša voľba je uložená v jednej cookie vo vašom prehliadači: kategórie, s ktorými ste súhlasili, verzia týchto zásad a čas. Nič o vás."
@@ -1,3 +1,3 @@
1
1
  module Consently
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consently
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Krzysteczko
@@ -103,6 +103,7 @@ licenses:
103
103
  - MIT
104
104
  metadata:
105
105
  homepage_uri: https://github.com/Xeross99/consently
106
+ documentation_uri: https://xeross99.github.io/consently/
106
107
  bug_tracker_uri: https://github.com/Xeross99/consently/issues
107
108
  changelog_uri: https://github.com/Xeross99/consently/blob/main/CHANGELOG.md
108
109
  rubygems_mfa_required: 'true'