mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-08-14 20:22:49 +03:30
- Update resume data with comprehensive professional summary and optimized work experience highlights - Add resume content tech-spec and strategy documentation for 2025 best practices - Create resume guidelines reference document for content consistency - Enhance PDF composable with openPdf preview function alongside downloadPdf - Expand CSS banner hiding rules to block certificates.dev promotional content - Add research documentation on resume best practices and ATS optimization - Update i18n translations for resume content in English and Persian - Include sample Ali Arghyani resume PDF template in design assets - Refactor resume.en.ts with improved professional positioning and achievement metrics - Update API route documentation for PDF generation story artifacts - Establish foundation for Epic 4 sprint planning with tech specifications
69 lines
2.0 KiB
TypeScript
69 lines
2.0 KiB
TypeScript
export default defineNuxtPlugin(() => {
|
|
if (import.meta.client) {
|
|
// Remove promotional banners after mount
|
|
const removeBanners = () => {
|
|
// Direct removal of known banner IDs (certificates.dev banner)
|
|
const directSelectors = [
|
|
'#bb-banner',
|
|
'[id*="bb-banner"]',
|
|
'a[href*="certificates.dev"]',
|
|
'[class*="bb-campaign"]',
|
|
'[class*="bb-close"]',
|
|
]
|
|
|
|
directSelectors.forEach((selector) => {
|
|
document.querySelectorAll(selector).forEach((el) => el.remove())
|
|
})
|
|
|
|
// Target common banner selectors
|
|
const selectors = [
|
|
'[class*="VueSchool"]',
|
|
'[class*="vue-school"]',
|
|
'[class*="promotional"]',
|
|
'[class*="Banner"]',
|
|
'div[class*="bg-blue-950"]', // Common @nuxt/ui banner style
|
|
'a[href*="vueschool.io"]',
|
|
]
|
|
|
|
selectors.forEach((selector) => {
|
|
const elements = document.querySelectorAll(selector)
|
|
elements.forEach((el) => {
|
|
// Check if this looks like a promotional banner
|
|
const parent = el.closest('div')
|
|
if (
|
|
parent &&
|
|
(el.textContent?.toLowerCase().includes('certification') ||
|
|
el.textContent?.toLowerCase().includes('black friday') ||
|
|
el.textContent?.toLowerCase().includes('cyber monday') ||
|
|
el.textContent?.toLowerCase().includes('vueschool') ||
|
|
el.textContent?.toLowerCase().includes('get certified'))
|
|
) {
|
|
parent.remove()
|
|
el.remove()
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// Run on mount and watch for dynamic additions
|
|
onMounted(() => {
|
|
removeBanners()
|
|
|
|
// Use MutationObserver to catch dynamically injected banners
|
|
const observer = new MutationObserver(() => {
|
|
removeBanners()
|
|
})
|
|
|
|
observer.observe(document.body, {
|
|
childList: true,
|
|
subtree: true
|
|
})
|
|
|
|
// Cleanup on unmount
|
|
onUnmounted(() => {
|
|
observer.disconnect()
|
|
})
|
|
})
|
|
}
|
|
})
|