Add new images.
|
@ -1,6 +1,6 @@
|
||||||
// import { fileURLToPath } from "url";
|
// import { fileURLToPath } from "url";
|
||||||
import fs from 'fs-extra';
|
import fs from "fs-extra";
|
||||||
import path from 'path';
|
import path from "path";
|
||||||
|
|
||||||
let sassEnvVariables = "";
|
let sassEnvVariables = "";
|
||||||
for (let e in import.meta.env) {
|
for (let e in import.meta.env) {
|
||||||
|
@ -18,9 +18,13 @@ if (buildName == "hadith")
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
hooks: {
|
hooks: {
|
||||||
'build:before': () => {
|
"build:before": () => {
|
||||||
const sourceDir = path.resolve(__dirname, `systems/${buildName}_ui/assets/${buildName}/images`); // Source folder (e.g., assets/images)
|
if (buildName == "hadith") {
|
||||||
const targetDir = path.resolve(__dirname, 'public/img'); // Target folder (e.g., public/images)
|
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
|
// Ensure the target directory exists
|
||||||
fs.ensureDirSync(targetDir);
|
fs.ensureDirSync(targetDir);
|
||||||
|
@ -28,7 +32,8 @@ export default defineNuxtConfig({
|
||||||
// Copy files from source to target
|
// Copy files from source to target
|
||||||
fs.copySync(sourceDir, targetDir);
|
fs.copySync(sourceDir, targetDir);
|
||||||
|
|
||||||
console.log('Files copied successfully!');
|
console.log("Files copied successfully!");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"pages:extend"(pages) {
|
"pages:extend"(pages) {
|
||||||
|
@ -137,7 +142,6 @@ export default defineNuxtConfig({
|
||||||
// mode: 'init'
|
// mode: 'init'
|
||||||
// },
|
// },
|
||||||
image: {
|
image: {
|
||||||
|
|
||||||
inject: true,
|
inject: true,
|
||||||
quality: 80,
|
quality: 80,
|
||||||
format: ["webp", "jpeg", "jpg", "png", "gif", "avif"],
|
format: ["webp", "jpeg", "jpg", "png", "gif", "avif"],
|
||||||
|
|
16
public/img/box-1-bgi.svg
Normal file
After Width: | Height: | Size: 263 KiB |
BIN
public/img/card-one-bgi.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
public/img/card-one.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
public/img/card-three-bgi.png
Normal file
After Width: | Height: | Size: 186 KiB |
BIN
public/img/card-three.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
public/img/card-two-bgi.png
Normal file
After Width: | Height: | Size: 198 KiB |
BIN
public/img/card-two.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
public/img/logo.png
Normal file
After Width: | Height: | Size: 25 KiB |