From fdbbceb114d620ce51f5916db0f40f8ae6b49a28 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Sat, 1 Feb 2020 19:24:11 +1030 Subject: [PATCH] Fixes to icon display --- app.js | 18 ++++++++++++++++ package-lock.json | 21 +++++++++++++++++++ package.json | 1 + views/customers.hbs | 2 +- views/layouts/layout.hbs | 12 +++++------ views/orders.hbs | 4 ++-- views/partials/menu.hbs | 28 ++++++++++++------------- views/products.hbs | 4 ++-- views/settings-menu.hbs | 8 +++---- views/themes/Cloth/cart.hbs | 2 +- views/themes/Cloth/checkout-payment.hbs | 2 +- views/themes/Cloth/product.hbs | 4 ++-- views/users.hbs | 4 ++-- 13 files changed, 75 insertions(+), 35 deletions(-) diff --git a/app.js b/app.js index 3b67641..5adfbd8 100644 --- a/app.js +++ b/app.js @@ -320,6 +320,21 @@ handlebars = handlebars.create({ return text.substring(0, 155) + '...'; } return text; + }, + feather: (icon) => { + // eslint-disable-next-line keyword-spacing + return ` + + `; } } }); @@ -375,6 +390,9 @@ app.use(i18n.init); // serving static content app.use(express.static(path.join(__dirname, 'public'))); app.use(express.static(path.join(__dirname, 'views', 'themes'))); +app.use(express.static(path.join(__dirname, 'node_modules', 'feather-icons'))); + +console.log('test', path.join(__dirname, 'node_modules', 'feather-icons', 'dist')); // Make stuff accessible to our router app.use((req, res, next) => { diff --git a/package-lock.json b/package-lock.json index 8fb6257..45573db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1975,6 +1975,11 @@ } } }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, "clean-css": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", @@ -4108,6 +4113,22 @@ "reusify": "1.0.4" } }, + "feather-icons": { + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/feather-icons/-/feather-icons-4.25.0.tgz", + "integrity": "sha512-gIJbA4Kmzqub+eTwqA3LRJhC+G267t7QlvFxx+nnHYEEaCpXh5HwRY9pW39b51/Y8c7D9mjLplNdzGCWPz39Sg==", + "requires": { + "classnames": "2.2.6", + "core-js": "3.6.4" + }, + "dependencies": { + "core-js": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + } + } + }, "feature-policy": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", diff --git a/package.json b/package.json index efa6850..0d286f5 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "express-handlebars": "^3.1.0", "express-rate-limit": "^5.0.0", "express-session": "^1.17.0", + "feather-icons": "^4.25.0", "glob": "^7.1.5", "gulp-less": "^4.0.1", "helmet": "^3.21.2", diff --git a/views/customers.hbs b/views/customers.hbs index bbf42a4..3ba845b 100644 --- a/views/customers.hbs +++ b/views/customers.hbs @@ -8,7 +8,7 @@
- +

{{ @root.__ "Customers can be filtered by: email, name or phone number" }}

diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index 68c3fa9..4f46f99 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -162,14 +162,14 @@