From ade34c51585f0c40432cb8ddeac634863f518a81 Mon Sep 17 00:00:00 2001
From: Chris Manson
Date: Thu, 2 May 2024 17:08:29 +0100
Subject: [PATCH 1/4] stop using svg-jar
---
addon/components/es-card-content.hbs | 2 +-
addon/components/es-footer-contributions.hbs | 2 +-
addon/components/es-footer-info.hbs | 2 +-
addon/components/es-footer-statement.hbs | 2 +-
addon/components/es-icon.hbs | 1 +
addon/components/es-icon.js | 108 ++
addon/components/es-sidebar.hbs | 4 +-
app/components/es-icon.js | 1 +
package-lock.json | 1080 +++---------------
package.json | 1 -
public/images/icons/arrow-icon.svg | 1 -
public/images/icons/book-icon.svg | 1 -
public/images/icons/bubble-icon.svg | 1 -
public/images/icons/close-icon.svg | 1 -
public/images/icons/discord-logo.svg | 1 -
public/images/icons/discuss-logo.svg | 1 -
public/images/icons/dnsimple-logo-dark.svg | 9 -
public/images/icons/external-link.svg | 1 -
public/images/icons/fastly-logo.svg | 1 -
public/images/icons/github-logo.svg | 1 -
public/images/icons/heroku-logo.svg | 3 -
public/images/icons/mastodon-logo.svg | 3 -
public/images/icons/mic-icon.svg | 1 -
public/images/icons/netlify-logo.svg | 10 -
public/images/icons/pencil-icon.svg | 1 -
public/images/icons/percy-logo.svg | 27 -
public/images/icons/sidebar-icon.svg | 1 -
public/images/icons/tv-icon.svg | 1 -
public/images/icons/twitter-logo.svg | 1 -
29 files changed, 268 insertions(+), 1001 deletions(-)
create mode 100644 addon/components/es-icon.hbs
create mode 100644 addon/components/es-icon.js
create mode 100644 app/components/es-icon.js
delete mode 100644 public/images/icons/arrow-icon.svg
delete mode 100644 public/images/icons/book-icon.svg
delete mode 100644 public/images/icons/bubble-icon.svg
delete mode 100644 public/images/icons/close-icon.svg
delete mode 100644 public/images/icons/discord-logo.svg
delete mode 100644 public/images/icons/discuss-logo.svg
delete mode 100644 public/images/icons/dnsimple-logo-dark.svg
delete mode 100644 public/images/icons/external-link.svg
delete mode 100644 public/images/icons/fastly-logo.svg
delete mode 100644 public/images/icons/github-logo.svg
delete mode 100644 public/images/icons/heroku-logo.svg
delete mode 100644 public/images/icons/mastodon-logo.svg
delete mode 100644 public/images/icons/mic-icon.svg
delete mode 100644 public/images/icons/netlify-logo.svg
delete mode 100644 public/images/icons/pencil-icon.svg
delete mode 100644 public/images/icons/percy-logo.svg
delete mode 100644 public/images/icons/sidebar-icon.svg
delete mode 100644 public/images/icons/tv-icon.svg
delete mode 100644 public/images/icons/twitter-logo.svg
diff --git a/addon/components/es-card-content.hbs b/addon/components/es-card-content.hbs
index b26adb25..97867a64 100644
--- a/addon/components/es-card-content.hbs
+++ b/addon/components/es-card-content.hbs
@@ -2,7 +2,7 @@
{{!-- Bug link: https://github.com/ember-template-lint/ember-template-lint/issues/1286 --}}
{{#if @icon}}
- {{svg-jar @icon class="card__icon" width="60px"}}
+
{{/if}}
{{#if @image}}
diff --git a/addon/components/es-footer-contributions.hbs b/addon/components/es-footer-contributions.hbs
index e23cc5a1..f219843a 100644
--- a/addon/components/es-footer-contributions.hbs
+++ b/addon/components/es-footer-contributions.hbs
@@ -4,7 +4,7 @@
diff --git a/addon/components/es-footer-info.hbs b/addon/components/es-footer-info.hbs
index c3aa42f0..03548c47 100644
--- a/addon/components/es-footer-info.hbs
+++ b/addon/components/es-footer-info.hbs
@@ -12,7 +12,7 @@
diff --git a/addon/components/es-footer-statement.hbs b/addon/components/es-footer-statement.hbs
index 1c51d925..0a7cc9ac 100644
--- a/addon/components/es-footer-statement.hbs
+++ b/addon/components/es-footer-statement.hbs
@@ -5,7 +5,7 @@
{{@tagline}}
{{#if @contributeLink}}
- Contribute to this page {{svg-jar 'external-link'}}
+ Contribute to this page
{{/if}}
\ No newline at end of file
diff --git a/addon/components/es-icon.hbs b/addon/components/es-icon.hbs
new file mode 100644
index 00000000..9230f346
--- /dev/null
+++ b/addon/components/es-icon.hbs
@@ -0,0 +1 @@
+{{{this.icon}}}
\ No newline at end of file
diff --git a/addon/components/es-icon.js b/addon/components/es-icon.js
new file mode 100644
index 00000000..b2082583
--- /dev/null
+++ b/addon/components/es-icon.js
@@ -0,0 +1,108 @@
+import Component from '@glimmer/component';
+import { assert } from '@ember/debug';
+
+const icons = {
+ 'twitter-logo':
+ '',
+ 'github-logo':
+ '',
+ 'discord-logo':
+ '',
+ 'mastodon-logo': ``,
+ 'netlify-logo': ``,
+ 'heroku-logo': ``,
+ 'fastly-logo': ``,
+ 'percy-logo': `
+ `,
+ 'dnsimple-logo-dark': `
+ `,
+ 'external-link': ``,
+ discourse: ``,
+ discord: ``,
+ podcasts: ``,
+ books: ``,
+ videos: ``,
+ emberwork: ``,
+ guides: ``,
+ blog: ``,
+ 'arrow-icon':
+ '',
+ 'book-icon':
+ '',
+ 'bubble-icon':
+ '',
+ 'discuss-logo':
+ '',
+ 'mic-icon':
+ '',
+ 'pencil-icon':
+ '',
+
+ 'tv-icon':
+ '',
+};
+
+export default class EsIconComponent extends Component {
+ get icon() {
+ if (!(this.args.icon in icons)) {
+ assert(
+ `${
+ this.args.icon
+ } isn't a supported icon. We no longer support dynamid svg lookup and can only support the following icons: ${Object.keys(
+ icons
+ ).join(', ')}`
+ );
+ }
+
+ return icons[this.args.icon].replace(
+ '