@rathnasgala/theme 0.0.11 → 0.0.12
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.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"themePackage": {
|
|
4
4
|
"name": "@rathnasgala/theme",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.12",
|
|
6
6
|
"availableDesignThemes": [
|
|
7
7
|
"editorial"
|
|
8
8
|
],
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lib/provider-fixtures/embeds.v1.json": "5f26909fb433135321ddf7fdd14e45aeb702805c88f5676941166c5735143ee2",
|
|
26
26
|
"lib/provider-fixtures/share-intents.v1.json": "66a8eedfcff711253ee45ceb94b53f7d5a6be3ddbbb3d1f0d4e31a114326cc0a",
|
|
27
27
|
"src/404.njk": "be0d44370ac5402156aaf3d32ea581057bc61ec94c1a5f92bb809733af7a8a20",
|
|
28
|
-
"src/_includes/layouts/base.njk": "
|
|
28
|
+
"src/_includes/layouts/base.njk": "1bd300b68db1786b593ae5ef4325d68f21a5c79a78ac1cb3aba09fdba57bec9d",
|
|
29
29
|
"src/_includes/layouts/post.njk": "1accd2832064ad19ee7bf18daf5fa1e60569f32c9b7a547934a6361f747d7eb7",
|
|
30
30
|
"src/_includes/components/ui.njk": "de062ca818759edb53dc5e94ab839ac9453fda1fe458c61c04d9d89ef880c6af",
|
|
31
31
|
"src/_data/buildManifest.js": "628163305984e0d3537e27b0d4050f5ba5ead12a834878266d2ce8004ffe1b1e",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"src/_data/languages.js": "1358748f7fa2f74406d3295a030827d6229a53e94da72cf712e719d7a356aeac",
|
|
35
35
|
"src/_data/site.js": "d9c001f4cc12a34027dd92303530b11b5402d47613459bb997e22c4bcbea326d",
|
|
36
36
|
"src/assets/theme-mode.js": "3797c84dbaa090b5b21427a31928b5dd97f13d04d99833f5e1e74c6b50e01dcc",
|
|
37
|
-
"src/assets/interactions.js": "
|
|
37
|
+
"src/assets/interactions.js": "3cd88a919bde8b894fe8509be8db1b07ddd9459df8b31dac83bf9b0215cd73df",
|
|
38
38
|
"src/assets/embed-codepen.svg": "e9def697f38c466fb2b6652535c4c814e8cbbbefc6e052a69f335aeb27e8356b",
|
|
39
39
|
"src/assets/embed-gist.svg": "fcd9bc2bf29a5c118492b853c0a01390b7539c38ddb985da3c2a6e2f246a39f7",
|
|
40
40
|
"src/assets/embed-x.svg": "0ae74edc6790ec7e933067fe5392bce756e93fa7ad71caacf1c1ca99fa4ec9b6",
|
|
@@ -56,7 +56,11 @@
|
|
|
56
56
|
<main id="main-content">{{ content | safe }}</main>
|
|
57
57
|
<footer class="gala-page-footer">
|
|
58
58
|
<p>© {{ site.site.name }}</p>
|
|
59
|
-
{
|
|
59
|
+
{# Which footer the click came from, which language it was read in, and whose site it was.
|
|
60
|
+
site.id is the identifier available to a built page and resolves to its owner. #}
|
|
61
|
+
{% set galaLinkPlacement = 'article-footer' if post else 'site-footer' %}
|
|
62
|
+
{% set galaLinkLanguage = post.language or site.site.defaultLanguage %}
|
|
63
|
+
{% if attributionTier != 'PAID' %}<p><a href="https://gala67.com/?utm_source=gala-site&utm_medium=referral&utm_campaign=built-with-gala&utm_content={{ galaLinkPlacement | urlencode }}&utm_term={{ galaLinkLanguage | urlencode }}&utm_id={{ site.site.id | urlencode }}" rel="external">Built with Gala</a></p>{% endif %}
|
|
60
64
|
</footer>
|
|
61
65
|
<dialog id="gala-settings-dialog" class="gala-dialog" aria-labelledby="gala-settings-title">
|
|
62
66
|
<form method="dialog" class="gala-dialog__close"><button type="submit" aria-label="Close settings">Close</button></form>
|
|
@@ -91,7 +95,6 @@
|
|
|
91
95
|
<dialog id="gala-account-dialog" class="gala-dialog gala-account-dialog" aria-labelledby="gala-account-title">
|
|
92
96
|
<form method="dialog" class="gala-dialog__close"><button type="submit" aria-label="Close account">Close</button></form>
|
|
93
97
|
<h2 id="gala-account-title">Gala account</h2>
|
|
94
|
-
<p class="gala-account-dialog__invite" data-account-invite hidden>Takes a couple of clicks to authenticate yourself. No passwords, no spam.</p>
|
|
95
98
|
<iframe data-gala-session-frame title="Gala account and sign in" allow="identity-credentials-get" src="{{ site.platform.apiBaseUrl or 'https://api.gala67.com' }}/v1/widget/session?siteId={{ site.site.id | escape }}"></iframe>
|
|
96
99
|
</dialog>
|
|
97
100
|
{% endif %}
|
|
@@ -407,7 +407,6 @@ const pendingEngagementWrites = new Map();
|
|
|
407
407
|
let pendingIntent = null;
|
|
408
408
|
|
|
409
409
|
function requestSession(intent) {
|
|
410
|
-
const dialog = document.getElementById('gala-account-dialog');
|
|
411
410
|
const field = intent.element;
|
|
412
411
|
pendingIntent = {
|
|
413
412
|
kind: intent.kind,
|
|
@@ -416,11 +415,20 @@ function requestSession(intent) {
|
|
|
416
415
|
draft: field && 'value' in field ? field.value : null,
|
|
417
416
|
caret: field && 'selectionStart' in field ? field.selectionStart : null
|
|
418
417
|
};
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
418
|
+
// One window, not three. Asking used to open a modal, containing a frame, containing a
|
|
419
|
+
// button, that opened a popup. The popup is the only part that has to exist, because it is
|
|
420
|
+
// the only one running at the top level on the origin the identity providers accept.
|
|
421
|
+
const frame = document.querySelector('[data-gala-session-frame]');
|
|
422
|
+
const status = document.querySelector('[data-engagement-status]');
|
|
423
|
+
if (!frame) return;
|
|
424
|
+
const source = new URL(frame.getAttribute('src'), window.location.href);
|
|
425
|
+
const signIn = new URL('/v1/widget/session/sign-in', source.origin);
|
|
426
|
+
signIn.searchParams.set('siteId', source.searchParams.get('siteId') ?? '');
|
|
422
427
|
if (field && typeof field.blur === 'function') field.blur();
|
|
423
|
-
if (!
|
|
428
|
+
if (!window.open(signIn, 'gala-sign-in', 'popup,width=520,height=680')) {
|
|
429
|
+
pendingIntent = null;
|
|
430
|
+
if (status) status.textContent = 'Allow pop-ups for this site to sign in, then try again.';
|
|
431
|
+
}
|
|
424
432
|
}
|
|
425
433
|
|
|
426
434
|
/** Puts the reader back exactly where the sign-in interrupted them. */
|
|
@@ -543,13 +551,7 @@ if (sessionFrame) {
|
|
|
543
551
|
document.querySelectorAll('[data-engagement-url]').forEach((region) => {
|
|
544
552
|
if (changed) refreshEngagement(region);
|
|
545
553
|
});
|
|
546
|
-
// Signed in on the back of an interrupted action:
|
|
547
|
-
if (sessionUser && pendingIntent)
|
|
548
|
-
const dialog = document.getElementById('gala-account-dialog');
|
|
549
|
-
const invite = dialog?.querySelector('[data-account-invite]');
|
|
550
|
-
if (invite) invite.hidden = true;
|
|
551
|
-
if (dialog instanceof HTMLDialogElement && dialog.open) dialog.close();
|
|
552
|
-
resumeIntent();
|
|
553
|
-
}
|
|
554
|
+
// Signed in on the back of an interrupted action: finish what they were doing.
|
|
555
|
+
if (sessionUser && pendingIntent) resumeIntent();
|
|
554
556
|
});
|
|
555
557
|
}
|