Add new images.

This commit is contained in:
mustafa-rezae 2025-02-17 16:34:04 +03:30
parent 61c0fc5a8f
commit 384d4464a0
9 changed files with 31 additions and 11 deletions

View File

@ -1,6 +1,6 @@
// import { fileURLToPath } from "url";
import fs from 'fs-extra';
import path from 'path';
import fs from "fs-extra";
import path from "path";
let sassEnvVariables = "";
for (let e in import.meta.env) {
@ -18,17 +18,22 @@ if (buildName == "hadith")
export default defineNuxtConfig({
hooks: {
'build:before': () => {
const sourceDir = path.resolve(__dirname, `systems/${buildName}_ui/assets/${buildName}/images`); // Source folder (e.g., assets/images)
const targetDir = path.resolve(__dirname, 'public/img'); // Target folder (e.g., public/images)
"build:before": () => {
if (buildName == "hadith") {
const sourceDir = path.resolve(
__dirname,
`systems/${buildName}_ui/assets/${buildName}/images`
); // Source folder (e.g., assets/images)
const targetDir = path.resolve(__dirname, "public/img"); // Target folder (e.g., public/images)
// Ensure the target directory exists
fs.ensureDirSync(targetDir);
// Ensure the target directory exists
fs.ensureDirSync(targetDir);
// Copy files from source to target
fs.copySync(sourceDir, targetDir);
// Copy files from source to target
fs.copySync(sourceDir, targetDir);
console.log('Files copied successfully!');
console.log("Files copied successfully!");
}
},
"pages:extend"(pages) {
@ -137,7 +142,6 @@ export default defineNuxtConfig({
// mode: 'init'
// },
image: {
inject: true,
quality: 80,
format: ["webp", "jpeg", "jpg", "png", "gif", "avif"],

16
public/img/box-1-bgi.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 263 KiB

BIN
public/img/card-one-bgi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

BIN
public/img/card-one.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

BIN
public/img/card-three.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
public/img/card-two-bgi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

BIN
public/img/card-two.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
public/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB