Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add favicon to public folder #1454

Merged
merged 5 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/public/favicon.ico" sizes="48x48">
<link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">
<link rel="apple-touch-icon" href="/public/apple-touch-icon-180x180.png">
<link rel="manifest" href="/public/manifest.json">

<title>Nexus Fusion</title>
<!--app-head-->
</head>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
"util": "^0.12.5",
"vite": "^5.0.10",
"vite-compatible-readable-stream": "^3.6.1",
"vite-plugin-cp": "^4.0.7",
"vite-plugin-dynamic-base": "^1.0.0",
"vite-plugin-dynamic-import": "^1.5.0",
"vitest": "^1.1.1"
Expand Down
Binary file added public/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Nexus Fusion",
"short_name": "BBP-NF",
"description": "The interface of Blue Brain Nexus, the open-source knowledge graph for data-driven science.",
"dir": "left",
"lang": "en-US",
"display": "standalone",
"orientation": "portrait",
"scope": "/",
"start_url": "/",
"background_color": "#fff",
"theme_color": "#fff",
"icons": [
{
"src": "favicon-64x64.png",
"sizes": "64x64",
"type": "image/png"
},
{
"src": "favicon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "favicon-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "maskable-icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
Binary file added public/maskable-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import svgrPlugin from 'vite-plugin-svgr';
import tsconfigPaths from 'vite-tsconfig-paths';
import commonjs from 'vite-plugin-commonjs';
import viteCompression from 'vite-plugin-compression';
import vitePluginCp from 'vite-plugin-cp';
import 'vite-compatible-readable-stream';

export default defineConfig(() => {
let commitHash = '', version = '';

if(process.env.VITEST !== 'true') {
if (process.env.VITEST !== 'true') {
try {
commitHash = execSync('git rev-parse HEAD').toString().trimEnd();
version = execSync('git describe --tags --always').toString().trimEnd();
Expand All @@ -35,6 +35,11 @@ export default defineConfig(() => {
dynamicBase({
publicPath: 'window.__BASE__',
transformIndexHtml: true,
}),
vitePluginCp({
targets: [
{ src: 'public/', dest: 'dist/public' },
]
})
],
resolve: {
Expand Down Expand Up @@ -74,6 +79,7 @@ export default defineConfig(() => {
emptyOutDir: false,
outDir: 'dist',
assetsDir: 'public',
copyPublicDir: false,
sourcemap: process.env.NODE_ENV !== 'production',
commonjsOptions: {
transformMixedEsModules: true
Expand Down
25 changes: 24 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2837,6 +2837,11 @@
dependencies:
undici-types "~5.26.4"

"@types/node@^14.18.63":
version "14.18.63"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.63.tgz#1788fa8da838dbb5f9ea994b834278205db6ca2b"
integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==

"@types/node@^18.17.5":
version "18.19.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.4.tgz#89672e84f11a2c19543d694dac00ab8d7bc20ddb"
Expand Down Expand Up @@ -6354,6 +6359,15 @@ fs-extra@10.1.0, fs-extra@^10.0.0:
jsonfile "^6.0.1"
universalify "^2.0.0"

fs-extra@^11.1.1:
version "11.2.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"

fs-extra@^9.0.0, fs-extra@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
Expand Down Expand Up @@ -6626,7 +6640,7 @@ globby@^10.0.1:
merge2 "^1.2.3"
slash "^3.0.0"

globby@^13.1.3:
globby@^13.1.3, globby@^13.2.2:
version "13.2.2"
resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592"
integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==
Expand Down Expand Up @@ -12670,6 +12684,15 @@ vite-plugin-compression@^0.5.1:
debug "^4.3.3"
fs-extra "^10.0.0"

vite-plugin-cp@^4.0.7:
version "4.0.7"
resolved "https://registry.yarnpkg.com/vite-plugin-cp/-/vite-plugin-cp-4.0.7.tgz#8a3b5c44e974f1d6deaabad84d41503eb1333cb5"
integrity sha512-1utLg/jdvXiva75OfvNYEYJlmNhaBO0IRITVXb9k19tiYtH9s01VdjcEpovbbtUZsrXyF8szteGOsAJIfhIO2w==
dependencies:
"@types/node" "^14.18.63"
fs-extra "^11.1.1"
globby "^13.2.2"

vite-plugin-dynamic-base@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/vite-plugin-dynamic-base/-/vite-plugin-dynamic-base-1.0.0.tgz#248714f7150f12d9c69bfe244a0d91b2ccc33d3c"
Expand Down