Files
marketing/update-targetologist.js
2026-04-22 18:23:41 +05:00

266 lines
15 KiB
JavaScript

const fs = require('fs');
const path = require('path');
const targetPath = path.join(__dirname, 'src/views/pages/marketing/targetologist/TargetologistDashboard.vue');
if (!fs.existsSync(targetPath)) process.exit(1);
let content = fs.readFileSync(targetPath, 'utf8');
const newStyle = `<style scoped>
/* ══════════════════════════════════════════════
TARGETOLOGIST DASHBOARD — ULTRA PREMIUM 3D
Font: Onest throughout
══════════════════════════════════════════════ */
.td-page {
font-family: 'Onest', sans-serif;
background: transparent;
min-height: 100vh;
position: relative;
overflow-x: hidden;
color: #0F172A;
}
/* ── Background ── */
.td-bg-dots {
position: fixed; inset: 0;
background-image: radial-gradient(circle, rgba(45,123,255,0.03) 1px, transparent 1px);
background-size: 24px 24px;
pointer-events: none; z-index: 0;
}
.td-orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.td-orb--blue { width: 600px; height: 600px; top: -200px; right: -120px; background: radial-gradient(circle, rgba(45,123,255,0.08) 0%, transparent 65%); }
.td-orb--purple { width: 500px; height: 500px; bottom: -150px; left: -100px; background: radial-gradient(circle, rgba(139,92,246,0.05) 0%, transparent 65%); }
.td-orb--indigo { width: 400px; height: 400px; top: 40%; left: 50%; background: radial-gradient(circle, rgba(99,102,241,0.04) 0%, transparent 65%); }
/* ══ BANNER ══ */
.td-banner {
position: relative; z-index: 1;
padding: 36px 44px 32px;
}
.td-banner__inner {
max-width: 1400px; margin: 0 auto;
display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.td-banner__left { display: flex; align-items: flex-start; gap: 24px; }
.td-banner__right { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.td-back-btn {
width: 48px; height: 48px; border-radius: 12px;
background: rgba(255,255,255,0.9); border: 1px solid rgba(15,23,42,0.05);
color: #64748B; cursor: pointer; transition: all 0.3s;
box-shadow: 0 4px 12px rgba(15,23,42,0.02); display: flex; align-items: center; justify-content: center;
}
.td-back-btn:hover { background: #fff; color: #2D7BFF; transform: translateX(-4px); box-shadow: 0 8px 24px rgba(45,123,255,0.08); }
.td-eyebrow {
display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: #2D7BFF; margin-bottom: 8px;
}
.td-eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: #2D7BFF; box-shadow: 0 0 10px rgba(45,123,255,0.6); animation: td-blink 2s infinite; }
@keyframes td-blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.td-title { font-size: 42px; font-weight: 900; color: #0F172A; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px 0; }
.td-subtitle { font-size: 16px; color: #64748B; margin: 0; }
.td-banner__budget-vis {
background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
border: 1px solid rgba(15,23,42,0.05); border-radius: 20px;
padding: 16px 24px; min-width: 240px; box-shadow: 0 12px 32px rgba(15,23,42,0.03), inset 0 2px 4px rgba(255,255,255,0.8);
}
.td-banner__budget-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #94A3B8; margin-bottom: 8px; }
.td-banner__budget-bar { height: 6px; background: rgba(15,23,42,0.05); border-radius: 999px; overflow: hidden; margin-bottom: 8px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); }
.td-banner__budget-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2D7BFF, #10B981); transition: width 1s cubic-bezier(0.16,1,0.3,1); }
.td-banner__budget-nums { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.td-launch-btn {
display: inline-flex; align-items: center; gap: 10px;
padding: 16px 32px; border-radius: 16px; border: none;
background: linear-gradient(135deg, #2D7BFF, #1a6bff); color: #fff;
font-size: 15px; font-weight: 800; cursor: pointer; transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 8px 24px rgba(45,123,255,0.3);
}
.td-launch-btn:hover { transform: translateY(-4px); box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 16px 36px rgba(45,123,255,0.4); }
/* ══ INNER ══ */
.td-inner { max-width: 1400px; margin: 0 auto; padding: 0 44px 100px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 40px; }
/* ══ KPI GRID ══ */
.td-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.td-kpi {
background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
border: 1px solid rgba(15,23,42,0.05); border-radius: 24px; padding: 24px;
position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
box-shadow: 0 8px 20px rgba(15,23,42,0.02), inset 0 2px 4px rgba(255,255,255,0.8);
}
.td-kpi:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(45,123,255,0.06); background: #fff; }
.td-kpi::before {
content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; opacity: 0; transition: opacity 0.3s;
}
.td-kpi:hover::before { opacity: 1; }
.td-kpi--blue::before { background: linear-gradient(90deg, #2D7BFF, #60A5FA); }
.td-kpi--green::before { background: linear-gradient(90deg, #10B981, #34D399); }
.td-kpi--orange::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.td-kpi--purple::before { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }
.td-kpi__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.td-kpi__icon {
width: 48px; height: 48px; border-radius: 14px;
display: flex; align-items: center; justify-content: center; font-size: 20px;
box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
}
.td-kpi--blue .td-kpi__icon { background: rgba(45,123,255,0.1); color: #2D7BFF; }
.td-kpi--green .td-kpi__icon { background: rgba(16,185,129,0.1); color: #10B981; }
.td-kpi--orange .td-kpi__icon { background: rgba(245,158,11,0.1); color: #F59E0B; }
.td-kpi--purple .td-kpi__icon { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.td-kpi__spark { width: 64px; height: 24px; }
.td-kpi__dots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 64px; }
.td-kpi__dot { width: 10px; height: 10px; border-radius: 3px; background: #10B981; box-shadow: 0 0 8px rgba(16,185,129,0.4); }
.td-kpi__bar-wrap { width: 72px; }
.td-kpi__mini-bar { height: 8px; background: rgba(15,23,42,0.05); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); }
.td-kpi__mini-bar-fill { height: 100%; border-radius: 999px; transition: width 1s ease; }
.td-kpi__num { font-size: 32px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: #0F172A; margin-bottom: 8px; }
.td-kpi__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #94A3B8; }
/* ══ SECTION HEADS ══ */
.td-section-head { margin-bottom: 24px; }
.td-section-label { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 900; color: #0F172A; letter-spacing: -0.01em; }
.td-section-label i { color: #2D7BFF; }
.td-section-hint { font-size: 14px; color: #64748B; margin-top: 4px; font-weight: 500; }
.td-cmp-count { background: rgba(45,123,255,0.1); color: #2D7BFF; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; margin-left: 8px; }
/* ══ INTEGRATIONS ══ */
.td-integrations-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
/* ══ CAMPAIGNS HEAD ══ */
.td-cmp-head {
display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
padding: 24px 32px; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
border: 1px solid rgba(15,23,42,0.05); border-radius: 24px;
box-shadow: 0 12px 32px rgba(15,23,42,0.03), inset 0 2px 4px rgba(255,255,255,0.8);
}
.td-search { position: relative; }
.td-search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94A3B8; font-size: 14px; pointer-events: none; }
.td-search__input {
padding: 14px 44px 14px 48px; border-radius: 16px;
background: #FAFBFF; border: 1px solid rgba(15,23,42,0.05);
color: #0F172A; font-size: 14px; font-family: 'Onest', sans-serif; font-weight: 600; outline: none; width: 320px; transition: all 0.3s;
}
.td-search__input:focus { border-color: #2D7BFF; background: #fff; width: 360px; box-shadow: 0 8px 24px rgba(45,123,255,0.08); }
.td-search__input::placeholder { color: #94A3B8; font-weight: 500; }
.td-search__clear {
position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(15,23,42,0.05); color: #64748B;
display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s;
}
.td-search__clear:hover { background: rgba(239,68,68,0.1); color: #EF4444; }
/* ══ SKELETON ══ */
.td-skeleton-list { display: flex; flex-direction: column; gap: 16px; }
.td-skeleton-item { display: flex; background: #fff; border: 1px solid rgba(15,23,42,0.05); border-radius: 24px; overflow: hidden; height: 140px; box-shadow: 0 8px 24px rgba(15,23,42,0.02); }
.td-skeleton-stripe { width: 6px; flex-shrink: 0; background: rgba(15,23,42,0.03); }
.td-skeleton-body { flex: 1; padding: 24px 32px; }
.td-skeleton-line { height: 12px; border-radius: 6px; background: rgba(15,23,42,0.03); margin-bottom: 12px; }
.td-skeleton-metrics { display: flex; gap: 32px; margin-top: 24px; }
.td-skeleton-metric { width: 100px; height: 44px; border-radius: 12px; background: rgba(15,23,42,0.03); }
.shimmer { position: relative; overflow: hidden; }
.shimmer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); animation: td-shimmer 1.5s infinite; }
@keyframes td-shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
/* ══ EMPTY ══ */
.td-empty {
text-align: center; padding: 100px 24px;
background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
border: 2px dashed rgba(45,123,255,0.2); border-radius: 32px;
box-shadow: 0 12px 40px rgba(15,23,42,0.02);
display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.td-empty__visual { position: relative; width: 100px; height: 100px; }
.td-empty__ring { position: absolute; border-radius: 50%; border: 2px solid; }
.td-empty__ring--1 { inset:-12px; border-color:rgba(45,123,255,0.1); animation:td-spin 12s linear infinite; }
.td-empty__ring--2 { inset:-24px; border-color:rgba(45,123,255,0.05); animation:td-spin 20s linear infinite reverse; border-style:dashed; }
@keyframes td-spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.td-empty__icon {
width:100px; height:100px; border-radius:24px;
background: linear-gradient(135deg, #2D7BFF, #1a6bff);
display:flex; align-items:center; justify-content:center;
font-size:40px; color:#fff; box-shadow:inset 0 2px 4px rgba(255,255,255,0.4), 0 12px 24px rgba(45,123,255,0.2);
}
.td-empty__title { font-size:24px; font-weight:900; color:#0F172A; margin:0; }
.td-empty__desc { font-size:15px; color:#64748B; max-width:500px; line-height:1.6; margin:0; }
/* ══ CAMPAIGN LIST ══ */
.td-list { display: flex; flex-direction: column; gap: 16px; }
.td-cmp {
display: flex; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
border: 1px solid rgba(15,23,42,0.05); border-radius: 24px; cursor: pointer; overflow: hidden;
transition: all 0.4s cubic-bezier(0.16,1,0.3,1); box-shadow: 0 8px 24px rgba(15,23,42,0.02), inset 0 2px 4px rgba(255,255,255,0.8);
}
.td-cmp:hover {
transform: translateY(-4px); box-shadow: 0 20px 48px rgba(45,123,255,0.08);
border-color: rgba(45,123,255,0.2); background: #fff;
}
.td-cmp__stripe { width: 6px; flex-shrink: 0; transition: width 0.3s; }
.td-cmp:hover .td-cmp__stripe { width: 8px; }
.td-cmp__body { flex: 1; padding: 24px 32px; display: flex; flex-direction: column; justify-content: center; }
.td-cmp__top { margin-bottom: 24px; }
.td-cmp__title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.td-cmp__name { font-size: 20px; font-weight: 800; color: #0F172A; margin: 0; flex: 1; }
.td-cmp__status {
display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid;
font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
}
.td-cmp__status i { font-size: 10px; }
.td-cmp__meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #64748B; flex-wrap: wrap; font-weight: 600; }
.td-plat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.td-plat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.td-cmp__metrics { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.td-metric { display: flex; flex-direction: column; gap: 6px; min-width: 100px; }
.td-metric__label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #94A3B8; }
.td-metric__val { font-size: 20px; font-weight: 900; color: #0F172A; line-height: 1; }
.td-metric__bar { height: 6px; background: rgba(15,23,42,0.05); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); }
.td-metric__bar-fill { height: 100%; border-radius: 999px; transition: width 1s cubic-bezier(0.16,1,0.3,1); }
.td-cmp__actions { display: flex; gap: 12px; align-items: center; margin-left: auto; }
.td-act {
width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(15,23,42,0.08); background: #fff; color: #64748B;
display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; font-size: 16px;
box-shadow: 0 4px 12px rgba(15,23,42,0.02);
}
.td-act:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.06); }
.td-act--pause:hover { background: rgba(245,158,11,0.1); color: #F59E0B; border-color: rgba(245,158,11,0.3); }
.td-act--play:hover { background: rgba(16,185,129,0.1); color: #10B981; border-color: rgba(16,185,129,0.3); }
.td-act--open:hover { background: rgba(45,123,255,0.1); color: #2D7BFF; border-color: rgba(45,123,255,0.3); }
/* ══ RESPONSIVE ══ */
@media (max-width: 1024px) { .td-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
.td-banner { padding: 24px; }
.td-inner { padding: 24px; }
.td-kpi-grid { grid-template-columns: 1fr; }
.td-integrations-grid { grid-template-columns: 1fr; }
.td-cmp__metrics { gap: 20px; }
.td-search__input { width: 100%; }
}
</style>`;
const startIndex = content.indexOf('<style scoped>');
const endIndex = content.indexOf('</style>') + '</style>'.length;
if (startIndex !== -1 && endIndex !== -1) {
const updatedContent = content.substring(0, startIndex) + newStyle + content.substring(endIndex);
fs.writeFileSync(targetPath, updatedContent);
console.log('TargetologistDashboard CSS updated successfully!');
} else {
fs.writeFileSync(targetPath, content + '\n' + newStyle);
console.log('Appended style to TargetologistDashboard');
}