diff --git a/icons/arrow-right.svg b/icons/arrow-right.svg
new file mode 100644
index 0000000..96f7e2d
--- /dev/null
+++ b/icons/arrow-right.svg
@@ -0,0 +1,4 @@
+
diff --git a/icons/calendar.svg b/icons/calendar.svg
new file mode 100644
index 0000000..5f88313
--- /dev/null
+++ b/icons/calendar.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/chevron-right.svg b/icons/chevron-right.svg
new file mode 100644
index 0000000..0c2bf7a
--- /dev/null
+++ b/icons/chevron-right.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/icons/download.svg b/icons/download.svg
new file mode 100644
index 0000000..db03e46
--- /dev/null
+++ b/icons/download.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/scripts/aem.js b/scripts/aem.js
index 40662e6..0ba253a 100644
--- a/scripts/aem.js
+++ b/scripts/aem.js
@@ -403,7 +403,7 @@ function decorateButtons(element) {
&& twoup.childNodes.length === 1
&& twoup.tagName === 'P'
) {
- a.className = 'button primary';
+ a.className = 'button button--secondary';
twoup.classList.add('button-container');
}
if (
@@ -412,7 +412,7 @@ function decorateButtons(element) {
&& twoup.childNodes.length === 1
&& twoup.tagName === 'P'
) {
- a.className = 'button secondary';
+ a.className = 'button button--tertiary';
twoup.classList.add('button-container');
}
}
@@ -426,16 +426,23 @@ function decorateButtons(element) {
* @param {string} [prefix] prefix to be added to icon src
* @param {string} [alt] alt text to be added to icon
*/
-function decorateIcon(span, prefix = '', alt = '') {
+async function decorateIcon(span, prefix = '', alt = '') {
const iconName = Array.from(span.classList)
.find((c) => c.startsWith('icon-'))
.substring(5);
- const img = document.createElement('img');
- img.dataset.iconName = iconName;
- img.src = `${window.hlx.codeBasePath}${prefix}/icons/${iconName}.svg`;
- img.alt = alt;
- img.loading = 'lazy';
- span.append(img);
+
+ const resp = await fetch(`${window.hlx.codeBasePath}${prefix}/icons/${iconName}.svg`);
+ if (resp.ok) {
+ const iconHTML = await resp.text();
+ if (iconHTML.match(/