Skip to content

Commit

Permalink
minor changes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Jul 24, 2023
1 parent ab708e6 commit b9041b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/gallery/#constants/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ const config: Array<{fileName: string}> = [
];

export default config.map(({fileName}) => ({
src: `/gallery/${fileName}`,
blurDataURL: `/gallery/blured/${fileName}`,
src: `/images/${fileName}`,
blurDataURL: `/images/blured/${fileName}`,
}));
8 changes: 4 additions & 4 deletions lib/dynamicFavicon/toggleFavicon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ const activeTabIconsSet = [
{
rel: 'icon',
sizes: 'any',
href: '/logo/favicon.ico',
href: '/icons/favicon.ico',
},
{
rel: 'icon',
type: 'image/svg+xml',
href: '/logo/icon.svg',
href: '/icons/icon.svg',
},
];

const disabledTabIconsSet = [
{
rel: 'icon',
sizes: 'any',
href: '/logo/favicon.dark.ico',
href: '/icons/favicon.dark.ico',
},
{
rel: 'icon',
type: 'image/svg+xml',
href: '/logo/icon.dark.svg',
href: '/icons/icon.dark.svg',
},
];

Expand Down
11 changes: 5 additions & 6 deletions scripts/generateBlured.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ const path = require('path');
const jimp = require('jimp');
const colors = require('colors/safe');

const galleryDirName = 'public/gallery';
const imagesDirName = 'public/images';
const bluredDirName = 'blured';
const pathGalleryDir = `${process.cwd()}/${galleryDirName}`;
const pathBluredDir = `${pathGalleryDir}/${bluredDirName}`;
const pathImagesDir = `${process.cwd()}/${imagesDirName}`;
const pathBluredDir = `${pathImagesDir}/${bluredDirName}`;

// Clear current blured images
!fs.existsSync(pathGalleryDir) && fs.mkdirSync(pathGalleryDir);
!fs.existsSync(pathBluredDir) && fs.mkdirSync(pathBluredDir);
process.chdir(pathGalleryDir);
process.chdir(pathImagesDir);

const contents = getDirectoryContentFileNames(pathBluredDir);
for (const c of contents) {
Expand All @@ -24,7 +23,7 @@ for (const c of contents) {
console.log(colors.green(`Cleaned up ${bluredDirName} directory`));

// Process gallery images and save into blured directory
const images = getDirectoryContentFileNames(pathGalleryDir);
const images = getDirectoryContentFileNames(pathImagesDir);
// eslint-disable-next-line no-console
console.log(colors.gray('\nStarting process images...\n'));
for (const i of images) {
Expand Down

0 comments on commit b9041b0

Please sign in to comment.