From de5e986f711355e8d8f55911d2d2eb444763b6ac Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Mon, 10 Apr 2023 20:05:36 +0200 Subject: [PATCH] HTML validation: fix error 'Attribute data not allowed' --- assets/js/shortcodes/intro.js | 8 ++++---- layouts/shortcodes/intro.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/js/shortcodes/intro.js b/assets/js/shortcodes/intro.js index c27337b8..53dbd450 100644 --- a/assets/js/shortcodes/intro.js +++ b/assets/js/shortcodes/intro.js @@ -58,13 +58,13 @@ const themeCommonOptions = { disableInteraction: true, }; const introErrorTitle = atou( - document.getElementById('intro-error-title').getAttribute('data') + document.getElementById('intro-error-title').getAttribute('data-intro') ); const introError = atou( - document.getElementById('intro-error').getAttribute('data') + document.getElementById('intro-error').getAttribute('data-intro') ); const introEmpty = atou( - document.getElementById('intro-empty').getAttribute('data') + document.getElementById('intro-empty').getAttribute('data-intro') ); const introErrorStep = { showBullets: false, @@ -90,7 +90,7 @@ for (let i = 0; i < divi.length; i++) { divi[i].addEventListener('click', function () { disableSmoothScroll(); let introOptions = parseIntroOptions( - atou(divi[i].getAttribute('intro-data')) + atou(divi[i].getAttribute('data-intro')) ); introOptions.steps = manageTriggeredSteps( introOptions.steps, diff --git a/layouts/shortcodes/intro.html b/layouts/shortcodes/intro.html index 3ba87c10..3d362f23 100644 --- a/layouts/shortcodes/intro.html +++ b/layouts/shortcodes/intro.html @@ -13,24 +13,24 @@ {{- if eq ($.Page.Scratch.Get "introUid") 1 -}} {{- end -}}
{{- $.Scratch.Get "introtitle" -}}