path correction in image

This commit is contained in:
sandhiya-hepl
2026-07-20 12:12:48 +05:30
parent 728139b69a
commit ee590f8d81
28 changed files with 179 additions and 13 deletions
+3
View File
@@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>CITPL Admin</title>
</head>
<body>
+10
View File
@@ -0,0 +1,10 @@
# Upload/merge this into the Apache document ROOT for demo.cavinkare.in
# (the folder ABOVE /citpl_website/), not into /citpl_website/.htaccess.
#
# Old/cached JS requests https://demo.cavinkare.in/assets/... which 404s.
# This serves those files from the real location under /citpl_website/assets/.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^assets/(.*)$ /citpl_website/assets/$1 [L]
</IfModule>
+5 -2
View File
@@ -5,8 +5,11 @@ RewriteEngine On
# requests /assets/* at domain root instead of /citpl_website/assets/*
<IfModule mod_headers.c>
<FilesMatch "\.(html)$">
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
FileETag None
Header unset ETag
Header always set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"
Header always set Pragma "no-cache"
Header always set Expires "0"
</FilesMatch>
</IfModule>
+3
View File
@@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>CITPL Admin</title>
<script type="module" crossorigin src="/citpl_website/assets/admin-CSMXWGox.js"></script>
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-BGySr-Oa.js">
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{r as i,t as a}from"./App-CIj2WERS.js";var o=n(r(),1),s=t(),c=e();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{r as i,t as a}from"./App-DSMPVYfs.js";var o=n(r(),1),s=t(),c=e();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
+1
View File
@@ -0,0 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{r as i,t as a}from"./App-DSMPVYfs.js";var o=n(r(),1),s=t(),c=e();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
+1
View File
@@ -0,0 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{r as i,t as a}from"./App-DSMPVYfs.js";var o=n(r(),1),s=t(),c=e();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
+1
View File
@@ -0,0 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{r as i,t as a}from"./App-DSMPVYfs.js";var o=n(r(),1),s=t(),c=e();(0,s.createRoot)(document.getElementById(`root`)).render((0,c.jsx)(o.StrictMode,{children:(0,c.jsx)(i,{children:(0,c.jsx)(a,{})})}));
@@ -1 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{n as i,r as a,t as o}from"./App-CIj2WERS.js";var s=n(r(),1),c=t(),l=e();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{n as i,r as a,t as o}from"./App-DSMPVYfs.js";var s=n(r(),1),c=t(),l=e();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
+1
View File
@@ -0,0 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{n as i,r as a,t as o}from"./App-DSMPVYfs.js";var s=n(r(),1),c=t(),l=e();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
+1
View File
@@ -0,0 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{n as i,r as a,t as o}from"./App-DSMPVYfs.js";var s=n(r(),1),c=t(),l=e();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
+1
View File
@@ -0,0 +1 @@
import{c as e,l as t,m as n,u as r}from"./x-BGySr-Oa.js";import{n as i,r as a,t as o}from"./App-DSMPVYfs.js";var s=n(r(),1),c=t(),l=e();function u(){return(0,s.useEffect)(()=>(document.body.classList.add(`admin-preview-embed`),()=>document.body.classList.remove(`admin-preview-embed`)),[]),(0,l.jsx)(o,{previewMode:!0})}(0,c.createRoot)(document.getElementById(`root`)).render((0,l.jsx)(s.StrictMode,{children:(0,l.jsx)(i.Provider,{value:!0,children:(0,l.jsx)(a,{previewMode:!0,children:(0,l.jsx)(u,{})})})}));
+9
View File
File diff suppressed because one or more lines are too long
+10
View File
@@ -0,0 +1,10 @@
# Upload/merge this into the Apache document ROOT for demo.cavinkare.in
# (the folder ABOVE /citpl_website/), not into /citpl_website/.htaccess.
#
# Old/cached JS requests https://demo.cavinkare.in/assets/... which 404s.
# This serves those files from the real location under /citpl_website/assets/.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^assets/(.*)$ /citpl_website/assets/$1 [L]
</IfModule>
+5 -2
View File
@@ -4,10 +4,13 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>Cavin Infotech | One Trusted Technology Partner</title>
<script type="module" crossorigin src="/citpl_website/assets/main-q0-I-ADG.js"></script>
<script type="module" crossorigin src="/citpl_website/assets/main-DDe1Epiy.js"></script>
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-BGySr-Oa.js">
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-CIj2WERS.js">
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-DSMPVYfs.js">
<link rel="stylesheet" crossorigin href="/citpl_website/assets/App-DpUt8oMg.css">
</head>
<body>
+5 -2
View File
@@ -3,10 +3,13 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>CITPL Preview</title>
<script type="module" crossorigin src="/citpl_website/assets/preview-BQQhaIEe.js"></script>
<script type="module" crossorigin src="/citpl_website/assets/preview-gug_t9LZ.js"></script>
<link rel="modulepreload" crossorigin href="/citpl_website/assets/x-BGySr-Oa.js">
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-CIj2WERS.js">
<link rel="modulepreload" crossorigin href="/citpl_website/assets/App-DSMPVYfs.js">
<link rel="stylesheet" crossorigin href="/citpl_website/assets/App-DpUt8oMg.css">
<link rel="stylesheet" crossorigin href="/citpl_website/assets/preview-DknkzKsF.css">
</head>
+3
View File
@@ -4,6 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>Cavin Infotech | One Trusted Technology Partner</title>
</head>
<body>
+1 -1
View File
@@ -8,7 +8,7 @@
"dev:client": "vite",
"server": "node server/index.js",
"start": "node server/index.js",
"build": "vite build && node scripts/copy-assets.js",
"build": "vite build && node scripts/copy-assets.js && node scripts/alias-legacy-bundles.js",
"lint": "eslint .",
"preview": "vite preview"
},
+3
View File
@@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>CITPL Preview</title>
</head>
<body>
+5 -2
View File
@@ -5,8 +5,11 @@ RewriteEngine On
# requests /assets/* at domain root instead of /citpl_website/assets/*
<IfModule mod_headers.c>
<FilesMatch "\.(html)$">
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
FileETag None
Header unset ETag
Header always set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"
Header always set Pragma "no-cache"
Header always set Expires "0"
</FilesMatch>
</IfModule>
+95
View File
@@ -0,0 +1,95 @@
/**
* Stale browsers often keep an old index.html that still points at previous
* hashed chunks (e.g. App-CuujNhcz.js). Those old bundles request /assets/*
* at the domain root 404 under /citpl_website/.
*
* After each build, overwrite known legacy filenames with the current
* main/App/x/admin/preview bundles so cached HTML still gets prefixed URLs.
*/
import { readFileSync, writeFileSync, existsSync, readdirSync } from 'fs';
import { resolve, dirname, join } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const dist = resolve(__dirname, '../dist');
const assetsDir = join(dist, 'assets');
function entryScript(htmlFile, pattern) {
const html = readFileSync(join(dist, htmlFile), 'utf8');
const match = html.match(pattern);
if (!match) throw new Error(`Could not find entry in ${htmlFile}`);
return match[1];
}
const current = {
main: entryScript('index.html', /assets\/(main-[^"]+\.js)/),
app: entryScript('index.html', /assets\/(App-[^"]+\.js)/),
x: entryScript('index.html', /assets\/(x-[^"]+\.js)/),
admin: entryScript('admin.html', /assets\/(admin-[^"]+\.js)/),
preview: entryScript('preview.html', /assets\/(preview-[^"]+\.js)/),
};
const LEGACY = {
main: [
'main-DS8JYUzR.js',
'main-BxILBfZ3.js',
'main-oTwpSzcd.js',
],
app: [
'App-EUHghoux.js',
'App-g0Gkzm_v.js',
'App-CuujNhcz.js',
],
x: [
'x-DnG5sti3.js',
],
admin: [
'admin-D28kGkNT.js',
],
preview: [
'preview-G0j3SNu_.js',
'preview-wEp9RUMD.js',
'preview-C0prGlYe.js',
],
};
function alias(kind, legacyNames) {
const srcName = current[kind];
const srcPath = join(assetsDir, srcName);
if (!existsSync(srcPath)) {
console.warn(`⚠ skip ${kind}: missing ${srcName}`);
return 0;
}
const body = readFileSync(srcPath);
let n = 0;
for (const name of legacyNames) {
if (name === srcName) continue;
writeFileSync(join(assetsDir, name), body);
n++;
}
return n;
}
let total = 0;
for (const [kind, names] of Object.entries(LEGACY)) {
total += alias(kind, names);
}
// Also alias any other main-*/App-*/x-* JS still sitting in dist/assets from older builds
const files = readdirSync(assetsDir);
for (const file of files) {
if (!file.endsWith('.js')) continue;
let kind = null;
if (/^main-/.test(file) && file !== current.main) kind = 'main';
else if (/^App-/.test(file) && file !== current.app) kind = 'app';
else if (/^x-/.test(file) && file !== current.x) kind = 'x';
else if (/^admin-/.test(file) && file !== current.admin) kind = 'admin';
else if (/^preview-/.test(file) && file !== current.preview) kind = 'preview';
if (!kind) continue;
const already = LEGACY[kind]?.includes(file);
if (already) continue;
writeFileSync(join(assetsDir, file), readFileSync(join(assetsDir, current[kind])));
total++;
}
console.log(`✓ Aliased ${total} legacy JS chunks → current build (${current.main}, ${current.app}, ${current.x})`);
+8
View File
@@ -12,3 +12,11 @@ const destRoot = resolve(__dirname, '../dist/assets');
cpSync(src, destPrefixed, { recursive: true, force: true });
cpSync(src, destRoot, { recursive: true, force: true });
console.log('✓ Copied public/assets → dist/citpl_website/assets + dist/assets');
// Ship domain-root rewrite helper with the build output
cpSync(
resolve(__dirname, '../deploy/domain-root.htaccess'),
resolve(__dirname, '../dist/domain-root.htaccess'),
{ force: true },
);
console.log('✓ Copied deploy/domain-root.htaccess → dist/domain-root.htaccess');
+1 -1
View File
@@ -869,7 +869,7 @@ export default function App({ previewMode = false }) {
overflow: 'hidden'
}}>
<img
src={about.badgeImage}
src={assetUrl(about.badgeImage)}
alt={about.badgeAlt}
style={{
height: isMobile ? '40px' : '54px',