From 0138806bd85f8b23d4b8230b16b62d7be20efb1c Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Mon, 16 Oct 2023 00:14:23 +0200 Subject: chore: add favicon --- package-lock.json | 89 ++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + resources/src/images/tubo.png | Bin 0 -> 2674 bytes resources/src/images/tubo.svg | 69 ++++++++++++++++++++++++++++++++ src/backend/tubo/handler.clj | 2 +- webpack.config.js | 11 +++++- 6 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 resources/src/images/tubo.png create mode 100644 resources/src/images/tubo.svg diff --git a/package-lock.json b/package-lock.json index 9fb9ac9..dfb0dde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@tailwindcss/forms": "^0.5.4", "@tailwindcss/line-clamp": "^0.4.4", "autoprefixer": "^10.4.15", + "copy-webpack-plugin": "^11.0.0", "cross-env": "^7.0.3", "css-loader": "^6.8.1", "cssnano": "^6.0.1", @@ -1028,6 +1029,42 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/copy-webpack-plugin": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.1", + "globby": "^13.1.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/cosmiconfig": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.2.0.tgz", @@ -1283,6 +1320,18 @@ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", "dev": true }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dlv": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", @@ -1634,6 +1683,25 @@ "process": "^0.11.10" } }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -1692,6 +1760,15 @@ } ] }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/immutable": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", @@ -3441,6 +3518,18 @@ "node": ">=8" } }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", diff --git a/package.json b/package.json index b532da3..acb6ca0 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@tailwindcss/forms": "^0.5.4", "@tailwindcss/line-clamp": "^0.4.4", "autoprefixer": "^10.4.15", + "copy-webpack-plugin": "^11.0.0", "cross-env": "^7.0.3", "css-loader": "^6.8.1", "cssnano": "^6.0.1", diff --git a/resources/src/images/tubo.png b/resources/src/images/tubo.png new file mode 100644 index 0000000..574ffc1 Binary files /dev/null and b/resources/src/images/tubo.png differ diff --git a/resources/src/images/tubo.svg b/resources/src/images/tubo.svg new file mode 100644 index 0000000..778deef --- /dev/null +++ b/resources/src/images/tubo.svg @@ -0,0 +1,69 @@ + + + + diff --git a/src/backend/tubo/handler.clj b/src/backend/tubo/handler.clj index d033793..d7f321d 100644 --- a/src/backend/tubo/handler.clj +++ b/src/backend/tubo/handler.clj @@ -17,7 +17,7 @@ [:meta {:charset "UTF-8"}] [:meta {:name "viewport" :content "width=device-width, initial-scale=1"}] [:title "Tubo"] - [:link {:rel "shortcut icon" :href "#"}] + [:link {:rel "icon" :type "image/png" :href "/images/tubo.png"}] (hiccup/include-css "/css/tubo.css")] [:body [:div#app] diff --git a/webpack.config.js b/webpack.config.js index b3b8620..37a942c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,11 +1,12 @@ const path = require("path") const MiniCssExtractPlugin = require("mini-css-extract-plugin") const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts") +const CopyPlugin = require("copy-webpack-plugin") module.exports = { mode: process.env.NODE_ENV, entry: { - tubo: "./resources/src/css/tubo.scss" + tubo: path.resolve(__dirname, "resources/src/css/tubo.scss") }, output: { path: path.resolve(__dirname, "resources/public") @@ -14,6 +15,14 @@ module.exports = { new RemoveEmptyScriptsPlugin(), new MiniCssExtractPlugin({ filename: "css/[name].css", + }), + new CopyPlugin({ + patterns: [ + { + from: path.resolve(__dirname, "resources/src/images"), + to: "images" + } + ] }) ], module: { -- cgit v1.2.3