Changes
This commit is contained in:
+505
-461
@@ -1,490 +1,534 @@
|
||||
var translations = {
|
||||
ro: {
|
||||
'brand.tagline': 'Romania dezvoltare applicatii',
|
||||
'nav.products': 'Produse', 'nav.services': 'Servicii', 'nav.contact': 'Contactati-ne',
|
||||
'hero.eyebrow': 'Portofoliu software easySoft',
|
||||
'hero.title': 'Software pentru cabinete dentare, gestiune de stocuri si salvare sigura a datelor.',
|
||||
'hero.text': 'Aplicatii practice construite pentru fluxuri reale de lucru: managementul pacientilor, contabilitate si gestiune, plus backup automatizat pentru fisiere importante.',
|
||||
'hero.ctaPrimary': 'Vezi produsele', 'hero.ctaSecondary': 'Contactati-ne',
|
||||
'hero.metric1': 'aplicații software', 'hero.metric2': 'ani experiență în dezvoltare', 'hero.metric3': 'instalări active',
|
||||
'hero.cardLabel': 'Portofoliu software', 'hero.badge1': 'cabinete dentare', 'hero.badge2': 'gestiune si contabilitate', 'hero.badge3': 'salvare automata',
|
||||
'products.eyebrow': 'Produse', 'products.title': 'Aplicatii software pentru activitati de zi cu zi', 'products.text': 'Portofoliul actual include aplicatii pentru cabinete stomatologice, operatiuni comerciale si protectia datelor.',
|
||||
'products.easydent.title': 'Soft pentru cabinete stomatologice',
|
||||
'products.easydent.desc': 'easyDent este un program destinat cabinetelor stomatologice si clinicilor dentare. Puteti urmari pacienti, plati, interventii, pacienti restantieri si profitul pe perioade de timp.',
|
||||
'products.easydent.feature1': 'Planificarea pacientilor intr-o sectiune simplu de utilizat', 'products.easydent.feature2': 'Imagini dentare, istoric pe dinte si poze atasate pacientilor', 'products.easydent.feature3': 'Raport lunar CNAS si configurare pe specializari',
|
||||
'products.easyerp.title': 'Soft de contabilitate si gestiunea stocurilor',
|
||||
'products.easyerp.desc': 'easyERP este un program client-server, bazat pe SQL, compus din module pentru diferite divizii ale companiei: gestiune, contabilitate, facturare, livrari, comenzi si promotii.',
|
||||
'products.easyerp.feature1': 'Receptie de marfa, inventar si cautare rapida in nomenclatoare', 'products.easyerp.feature2': 'Control pe roluri si drepturi de acces pe module', 'products.easyerp.feature3': 'Documente comerciale si rapoarte operationale',
|
||||
'products.easybackup.title': 'Utilitar pentru salvarea fisierelor',
|
||||
'products.easybackup.desc': 'easyBackup salveaza fisiere in directoare partajate sau pe servere FTP, cu job-uri recurente sau simple, monitorizare in timp si optiuni de compresie si notificare.',
|
||||
'products.easybackup.feature1': 'Definire job-uri recurente sau simple', 'products.easybackup.feature2': 'Scanare directoare cu excluderi si filtre', 'products.easybackup.feature3': 'Compresie, parola si notificari prin e-mail',
|
||||
'products.download': 'Descarca',
|
||||
'services.eyebrow': 'Servicii', 'services.title': 'Servicii software si consultanta IT',
|
||||
'services.db.title': 'Proiectare baze de date', 'services.db.text': 'Organizati mai bine informatiile si obtineti rapoartele de care aveti nevoie.',
|
||||
'services.it.title': 'Consultanta IT', 'services.it.text': 'Analizam ofertele disponibile si alegem sistemul informatic potrivit pentru activitatea dumneavoastra.',
|
||||
'services.dev.title': 'Dezvoltare software', 'services.dev.text': 'Construim aplicatii adaptate fluxului real de lucru, nu invers.',
|
||||
'about.eyebrow': 'easySoft', 'about.title': 'Solutii software construite pentru lucru real',
|
||||
'about.text1': 'Portofoliul easySoft acopera activitati esentiale pentru cabinete stomatologice, evidenta comerciala si protectia fisierelor importante.',
|
||||
'about.text2': 'Aplicatiile sunt gandite pentru utilizare practica, implementare rapida si acces clar la informatiile care conteaza in activitatea zilnica.',
|
||||
'about.point1Title': 'Implementare practica', 'about.point1Text': 'Produse software orientate spre utilizare zilnica.',
|
||||
'about.point2Title': 'Fluxuri clare', 'about.point2Text': 'Planificare, evidenta, facturare, rapoarte si backup in functii usor de urmarit.',
|
||||
'about.point3Title': 'Suport comercial direct', 'about.point3Text': 'Pentru prezentare, oferta sau implementare, puteti lua legatura direct cu easySoft.',
|
||||
'contact.eyebrow': 'Contactati-ne', 'contact.title': 'Discutam despre nevoile tale software',
|
||||
'contact.text': 'easySoft Romania dezvoltare applicatii. Pentru prezentari, detalii comerciale sau implementare, folositi datele de mai jos.',
|
||||
'contact.personLabel': 'Persoana de contact', 'contact.addressLabel': 'Adresa', 'contact.phoneLabel': 'Telefon', 'contact.webLabel': 'Website',
|
||||
'contact.form.name': 'Nume', 'contact.form.email': 'Email', 'contact.form.message': 'Mesaj', 'contact.form.send': 'Trimite mesaj',
|
||||
'contact.form.yourname': 'Numele dumneavoastra', 'contact.form.youremail': 'nume@companie.ro', 'contact.form.yourmessage': 'Spuneti-ne ce produs sau serviciu va intereseaza.',
|
||||
'contact.form.success': 'Va multumim pentru mesaj.', 'contact.form.submissionfailed': 'A aparut o eroare la transmiterea mesajului.', 'contact.form.verificationfailed': 'A aparut o eroare la verificare Captcha.',
|
||||
'footer.backToTop': 'Inapoi sus',
|
||||
'cookie.text': 'Folosim cookie-uri pentru a imbunatati experienta pe site, a analiza traficul si a personaliza continutul. Puteti accepta toate cookie-urile sau doar cele necesare.',
|
||||
'cookie.privacy': 'Politica de confidentialitate',
|
||||
'cookie.reject': 'Respinge',
|
||||
'cookie.necessary': 'Doar necesare',
|
||||
'cookie.accept': 'Accepta analitice',
|
||||
'footer.rights': 'Toate drepturile rezervate'
|
||||
},
|
||||
en: {
|
||||
'brand.tagline': 'Romania software development',
|
||||
'nav.products': 'Products', 'nav.services': 'Services', 'nav.contact': 'Contact us',
|
||||
'hero.eyebrow': 'easySoft software portfolio',
|
||||
'hero.title': 'Software for dental offices, stock management and secure data backup.',
|
||||
'hero.text': 'Practical applications built for real workflows: patient management, accounting and inventory, plus automated backup for critical files.',
|
||||
'hero.ctaPrimary': 'View products', 'hero.ctaSecondary': 'Contact us',
|
||||
'hero.metric1': 'software solutions', 'hero.metric2': 'years experience in software development', 'hero.metric3': 'active installations',
|
||||
'hero.cardLabel': 'Software portfolio', 'hero.badge1': 'dental offices', 'hero.badge2': 'inventory and accounting', 'hero.badge3': 'automatic backup',
|
||||
'products.eyebrow': 'Products', 'products.title': 'Software applications for daily operations', 'products.text': 'The current portfolio includes applications for dental offices, business operations and data protection.',
|
||||
'products.easydent.title': 'Software for dental offices',
|
||||
'products.easydent.desc': 'easyDent is built for dental offices and clinics. It helps track patients, payments, interventions, outstanding balances and profit over time.',
|
||||
'products.easydent.feature1': 'Simple patient scheduling section', 'products.easydent.feature2': 'Dental images, tooth history and attached patient photos', 'products.easydent.feature3': 'Monthly reports and specialization-based setup',
|
||||
'products.easyerp.title': 'Accounting and stock management software',
|
||||
'products.easyerp.desc': 'easyERP is a client-server SQL-based application with modules for company divisions: inventory, accounting, invoicing, deliveries, orders and promotions.',
|
||||
'products.easyerp.feature1': 'Receiving merchandise, inventory and fast search', 'products.easyerp.feature2': 'Role-based permissions for modules', 'products.easyerp.feature3': 'Commercial documents and operational reports',
|
||||
'products.easybackup.title': 'File backup utility',
|
||||
'products.easybackup.desc': 'easyBackup saves files to shared folders or FTP servers using recurring or one-time jobs, change tracking, compression and notifications.',
|
||||
'products.easybackup.feature1': 'Recurring or one-time backup jobs', 'products.easybackup.feature2': 'Directory scanning with exclusions and filters', 'products.easybackup.feature3': 'Compression, password protection and email alerts',
|
||||
'products.download': 'Download',
|
||||
'services.eyebrow': 'Services', 'services.title': 'Software services and IT consulting',
|
||||
'services.db.title': 'Database design', 'services.db.text': 'Organize information better and get the reports you actually need.',
|
||||
'services.it.title': 'IT consulting', 'services.it.text': 'We review available systems and help choose the right software solution.',
|
||||
'services.dev.title': 'Software development', 'services.dev.text': 'We build applications around the real workflow, not the other way around.',
|
||||
'about.eyebrow': 'easySoft', 'about.title': 'Software solutions built for real work',
|
||||
'about.text1': 'The easySoft portfolio covers essential workflows for dental offices, commercial operations and protection of important files.',
|
||||
'about.text2': 'The applications are built for practical use, fast implementation and clear access to the information that matters every day.',
|
||||
'about.point1Title': 'Practical implementation', 'about.point1Text': 'Software products focused on daily use.',
|
||||
'about.point2Title': 'Clear workflows', 'about.point2Text': 'Scheduling, records, invoicing, reports and backup in functions that are easy to follow.',
|
||||
'about.point3Title': 'Direct commercial support', 'about.point3Text': 'For presentation, pricing or implementation, you can contact easySoft directly.',
|
||||
'contact.eyebrow': 'Contact us', 'contact.title': 'Let’s discuss your software needs',
|
||||
'contact.text': 'easySoft Romania software development. For product presentations, commercial details or implementation, use the contact details below.',
|
||||
'contact.personLabel': 'Contact person', 'contact.addressLabel': 'Address', 'contact.phoneLabel': 'Phone', 'contact.webLabel': 'Website',
|
||||
'contact.form.name': 'Name', 'contact.form.email': 'Email', 'contact.form.message': 'Message', 'contact.form.send': 'Send message',
|
||||
'contact.form.yourname': 'Your name', 'contact.form.youremail': 'name@company.com', 'contact.form.yourmessage': 'Let us know how we can help you.',
|
||||
'contact.form.success': 'Thank you for your message.', 'contact.form.submissionfailed': 'Failed to send the message.', 'contact.form.verificationfailed': 'Captcha verification failed.',
|
||||
'footer.backToTop': 'Back to top',
|
||||
'cookie.text': 'We use cookies to enhance your experience, analyze traffic and personalize content. You can accept all cookies or just the necessary ones.',
|
||||
'cookie.privacy': 'Privacy policy',
|
||||
'cookie.reject': 'Reject',
|
||||
'cookie.necessary': 'Necessary only',
|
||||
'cookie.accept': 'Accept analytics',
|
||||
'footer.rights': 'All rights reserved'
|
||||
}
|
||||
};
|
||||
|
||||
function updateLegalLinks(lang) {
|
||||
$('.legal-link').each(function () {
|
||||
var $link = $(this);
|
||||
|
||||
if (lang === 'ro') {
|
||||
$link.attr('href', $link.attr('data-ro-href'));
|
||||
$link.text($link.attr('data-ro-text'));
|
||||
} else {
|
||||
$link.attr('href', $link.attr('data-en-href'));
|
||||
$link.text($link.attr('data-en-text'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function applyLanguage(lang) {
|
||||
var dict = translations[lang] || translations.en;
|
||||
|
||||
$('[data-i18n]').each(function () {
|
||||
var key = $(this).data('i18n');
|
||||
|
||||
if (!key) return;
|
||||
|
||||
// Handle special attributes like [placeholder]
|
||||
var match = key.match(/^\[(.*?)\](.*)$/);
|
||||
|
||||
if (match) {
|
||||
var attr = match[1]; // e.g. "placeholder"
|
||||
var realKey = match[2]; // e.g. "contact.form.message"
|
||||
|
||||
if (dict[realKey]) {
|
||||
$(this).attr(attr, dict[realKey]);
|
||||
}
|
||||
} else {
|
||||
if (dict[key]) {
|
||||
$(this).text(dict[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
updateLegalLinks(lang);
|
||||
|
||||
$('html').attr('lang', lang);
|
||||
localStorage.setItem('easysoft-language', lang);
|
||||
|
||||
$('.lang-flag').each(function () {
|
||||
var isActive = $(this).data('lang') === lang;
|
||||
$(this).attr('aria-pressed', isActive ? 'true' : 'false');
|
||||
$(this).toggleClass('is-active', isActive);
|
||||
});
|
||||
}
|
||||
|
||||
function detectLanguage() {
|
||||
var saved = localStorage.getItem('easysoft-language');
|
||||
if (saved && translations[saved]) {
|
||||
return saved;
|
||||
}
|
||||
|
||||
var browserLang = ((navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage || 'en').toLowerCase();
|
||||
if (browserLang.indexOf('ro') === 0) {
|
||||
return 'ro';
|
||||
}
|
||||
|
||||
return 'en';
|
||||
}
|
||||
|
||||
function closeMobileMenu() {
|
||||
$('#mainNav').removeClass('is-open');
|
||||
$('#menuToggle').attr('aria-expanded', 'false');
|
||||
}
|
||||
|
||||
function initCarousels() {
|
||||
$('[data-carousel]').each(function () {
|
||||
var $carousel = $(this);
|
||||
var $slides = $carousel.find('.carousel-slide');
|
||||
var $dotsWrap = $carousel.find('.carousel-dots');
|
||||
var index = 0;
|
||||
var timer = null;
|
||||
|
||||
function renderDots() {
|
||||
$dotsWrap.empty();
|
||||
$slides.each(function (i) {
|
||||
var $dot = $('<button>', {
|
||||
type: 'button',
|
||||
class: 'carousel-dot' + (i === index ? ' active' : ''),
|
||||
'aria-label': 'Go to slide ' + (i + 1)
|
||||
});
|
||||
$dot.on('click', function () {
|
||||
show(i);
|
||||
restartAutoPlay();
|
||||
});
|
||||
$dotsWrap.append($dot);
|
||||
});
|
||||
}
|
||||
|
||||
function show(i) {
|
||||
index = (i + $slides.length) % $slides.length;
|
||||
$slides.removeClass('active').eq(index).addClass('active');
|
||||
$dotsWrap.find('.carousel-dot').removeClass('active').eq(index).addClass('active');
|
||||
}
|
||||
|
||||
function restartAutoPlay() {
|
||||
if (timer) {
|
||||
window.clearInterval(timer);
|
||||
}
|
||||
timer = window.setInterval(function () {
|
||||
show(index + 1);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
$carousel.find('.prev').on('click', function () {
|
||||
show(index - 1);
|
||||
restartAutoPlay();
|
||||
});
|
||||
|
||||
$carousel.find('.next').on('click', function () {
|
||||
show(index + 1);
|
||||
restartAutoPlay();
|
||||
});
|
||||
|
||||
renderDots();
|
||||
show(0);
|
||||
restartAutoPlay();
|
||||
});
|
||||
}
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
var reCaptchaSiteKey; // To be initialized from the backend API
|
||||
var gTagManagerId; // Google Tag Manager ID from backend
|
||||
var gMapKey; // To be initialized from the backend API
|
||||
const CONSENT_KEY = "cookie_consent";
|
||||
"use strict";
|
||||
|
||||
applyLanguage(detectLanguage());
|
||||
var reCaptchaSiteKey = null;
|
||||
var gTagManagerId = null;
|
||||
var CONSENT_KEY = "myai_cookie_consent";
|
||||
var LANG_KEY = "myai_lang";
|
||||
|
||||
$('.lang-flag').on('click', function () {
|
||||
applyLanguage($(this).data('lang'));
|
||||
});
|
||||
var i18n = {
|
||||
en: {
|
||||
"brand.subtitle": "AI engineering showcase",
|
||||
"nav.demos": "Demos",
|
||||
"nav.contact": "Contact",
|
||||
"nav.navigator": "Navigator",
|
||||
"nav.matcher": "Matcher",
|
||||
"home.eyebrow": "Applied AI lab",
|
||||
"home.title": "Production-minded AI demos, not generic chatbot wrappers.",
|
||||
"home.text": "MyAi.ro is a technical showcase for practical AI systems: document understanding, retrieval, matching, automation and decision support.",
|
||||
"home.openCv": "Open CV Matcher",
|
||||
"home.step1": "CV.pdf",
|
||||
"home.step2": "skills, projects, experience",
|
||||
"home.step3": "relevant CV context",
|
||||
"home.step4": "job match + gaps",
|
||||
"home.navigator": "Navigator",
|
||||
"home.selectDemo": "Select an AI demo",
|
||||
"home.selectText": "Our first steps in AI integrations.",
|
||||
"tag.available": "Available",
|
||||
"tag.next": "Next",
|
||||
"demo.cv.title": "CV Matcher",
|
||||
"demo.cv.text": "Upload a CV PDF, provide a job link or description, extract RAG context and generate a match score with strengths and gaps.",
|
||||
"demo.open": "Open demo →",
|
||||
"demo.rag.title": "RAG Playground",
|
||||
"demo.rag.text": "Experiment with chunk size, retrieval count and source context transparency.",
|
||||
"demo.agent.title": "Agent Automation",
|
||||
"demo.agent.text": "Job discovery, filtering, ranking and notification workflows.",
|
||||
"contact.title": "Discuss an AI integration or custom software project",
|
||||
"contact.text": "Fill in the form fields and will contact you.",
|
||||
"contact.person": "Contact person",
|
||||
"contact.phone": "Phone",
|
||||
"form.name": "Name",
|
||||
"form.namePlaceholder": "Your name",
|
||||
"form.email": "Email",
|
||||
"form.emailPlaceholder": "name@company.com",
|
||||
"form.message": "Message",
|
||||
"form.messagePlaceholder": "Tell me what you want to build.",
|
||||
"form.send": "Send message",
|
||||
"form.thanks": "Thank you for your message.",
|
||||
"form.captchaFailed": "Captcha verification failed.",
|
||||
"form.failed": "Failed to send the message.",
|
||||
"footer.rights": "All rights reserved",
|
||||
"footer.top": "Back to top",
|
||||
"legal.terms": "Terms",
|
||||
"legal.privacy": "Privacy",
|
||||
"legal.cookies": "Cookies",
|
||||
"status.sending": "Sending...",
|
||||
"cookies.title": "Cookies",
|
||||
"cookies.text": "We use necessary cookies and, with your consent, analytics through Google Tag Manager.",
|
||||
"cookies.policy": "Privacy policy",
|
||||
"cookies.reject": "Reject",
|
||||
"cookies.necessary": "Necessary only",
|
||||
"cookies.accept": "Accept analytics",
|
||||
"cookies.settings": "Cookie settings",
|
||||
"cv.brand": "CV Matcher",
|
||||
"cv.eyebrow": "AI CV Matcher",
|
||||
"cv.title": "Upload your CV, add a job link, and see how well they match.",
|
||||
"cv.text": "The backend should extract text from the PDF, create RAG context from your CV, retrieve relevant experience for the job, then score strengths, gaps and next actions.",
|
||||
"cv.try": "Try matcher",
|
||||
"cv.back": "Back to navigator",
|
||||
"cv.step1": "PDF text extraction",
|
||||
"cv.step2": "CV chunking + embeddings",
|
||||
"cv.step3": "Job URL/description parsing",
|
||||
"cv.step4": "Match score + evidence",
|
||||
"cv.input": "Input",
|
||||
"cv.details": "CV and job details",
|
||||
"cv.upload": "Upload CV PDF",
|
||||
"cv.fileHint": "PDF only, max size handled by backend",
|
||||
"cv.jobLink": "Job link",
|
||||
"cv.jobDescription": "Or paste job description",
|
||||
"cv.jobPlaceholder": "Paste the job description if the page cannot be crawled.",
|
||||
"cv.gdpr": "I agree that my CV is processed and stred.",
|
||||
"cv.submit": "Extract CV and match job",
|
||||
"cv.result": "Result",
|
||||
"cv.analysis": "Match analysis",
|
||||
"cv.empty": "Upload a CV and provide a job link or description to generate a result.",
|
||||
"cv.contactTitle": "Want this adapted for your workflow?",
|
||||
"cv.contactText": "This form uses the existing template contact API endpoint.",
|
||||
"cv.noFile": "Please upload a CV PDF.",
|
||||
"cv.noJob": "Add a job link or paste a job description.",
|
||||
"cv.noConsent": "GDPR consent is required.",
|
||||
"cv.processing": "Processing...",
|
||||
"cv.extracting": "Extracting CV and matching job...",
|
||||
"cv.processingLong": "Processing CV PDF and job input. Backend endpoints must be available.",
|
||||
"cv.cvFailed": "CV extraction failed",
|
||||
"cv.matchFailed": "Job matching failed",
|
||||
"cv.completed": "Match completed.",
|
||||
"cv.backendMissing": "The frontend is ready, but the backend endpoints /api/cv-matcher/upload and /api/cv-matcher/match-job must be implemented.",
|
||||
"cv.noSummary": "No summary returned.",
|
||||
"cv.noItems": "No items returned.",
|
||||
"cv.strengths": "Strengths",
|
||||
"cv.gaps": "Gaps",
|
||||
"cv.evidence": "Retrieved CV evidence"
|
||||
},
|
||||
ro: {
|
||||
"brand.subtitle": "prezentare inginerie AI",
|
||||
"nav.demos": "Demo-uri",
|
||||
"nav.contact": "Contact",
|
||||
"nav.navigator": "Navigator",
|
||||
"nav.matcher": "Matcher",
|
||||
"home.eyebrow": "Laborator AI aplicat",
|
||||
"home.title": "Demo-uri AI orientate spre producție, nu simple wrapper-e de chatbot.",
|
||||
"home.text": "MyAi.ro este o prezentare tehnică pentru sisteme AI practice: înțelegere documente, retrieval, potrivire, automatizare și suport decizional.",
|
||||
"home.openCv": "Deschide CV Matcher",
|
||||
"home.step1": "CV.pdf",
|
||||
"home.step2": "competențe, proiecte, experiență",
|
||||
"home.step3": "context relevant din CV",
|
||||
"home.step4": "potrivire job + lipsuri",
|
||||
"home.navigator": "Navigator",
|
||||
"home.selectDemo": "Alege un demo AI",
|
||||
"home.selectText": "Primele noastre projecte",
|
||||
"tag.available": "Disponibil",
|
||||
"tag.next": "Urmează",
|
||||
"demo.cv.title": "CV Matcher",
|
||||
"demo.cv.text": "Încarcă un CV PDF, adaugă un link sau o descriere de job, extrage context RAG și generează un scor de potrivire cu puncte forte și lipsuri.",
|
||||
"demo.open": "Deschide demo →",
|
||||
"demo.rag.title": "RAG Playground",
|
||||
"demo.rag.text": "Experimentează cu dimensiunea chunk-urilor, numărul de rezultate și transparența surselor.",
|
||||
"demo.agent.title": "Automatizare cu agenți",
|
||||
"demo.agent.text": "Fluxuri pentru descoperire joburi, filtrare, ranking și notificări.",
|
||||
"contact.title": "Discută o integrare AI sau un proiect software custom",
|
||||
"contact.text": "Complecteaza formularul si te vom contacta.",
|
||||
"contact.person": "Persoană de contact",
|
||||
"contact.phone": "Telefon",
|
||||
"form.name": "Nume",
|
||||
"form.namePlaceholder": "Numele tău",
|
||||
"form.email": "Email",
|
||||
"form.emailPlaceholder": "nume@companie.ro",
|
||||
"form.message": "Mesaj",
|
||||
"form.messagePlaceholder": "Spune-mi ce vrei să construiești.",
|
||||
"form.send": "Trimite mesajul",
|
||||
"form.thanks": "Mulțumesc pentru mesaj.",
|
||||
"form.captchaFailed": "Verificarea Captcha a eșuat.",
|
||||
"form.failed": "Mesajul nu a putut fi trimis.",
|
||||
"footer.rights": "Toate drepturile rezervate",
|
||||
"footer.top": "Înapoi sus",
|
||||
"legal.terms": "Termeni",
|
||||
"legal.privacy": "Confidențialitate",
|
||||
"legal.cookies": "Cookies",
|
||||
"status.sending": "Se trimite...",
|
||||
"cookies.title": "Cookies",
|
||||
"cookies.text": "Folosim cookies necesare și, cu acordul tău, analytics prin Google Tag Manager.",
|
||||
"cookies.policy": "Politica de confidențialitate",
|
||||
"cookies.reject": "Respinge",
|
||||
"cookies.necessary": "Doar necesare",
|
||||
"cookies.accept": "Accept analytics",
|
||||
"cookies.settings": "Setări cookies",
|
||||
"cv.brand": "CV Matcher",
|
||||
"cv.eyebrow": "AI CV Matcher",
|
||||
"cv.title": "Încarcă CV-ul, adaugă un link de job și vezi cât de bine se potrivesc.",
|
||||
"cv.text": "Backend-ul ar trebui să extragă textul din PDF, să creeze context RAG din CV, să recupereze experiența relevantă pentru job, apoi să calculeze punctele forte, lipsurile și pașii următori.",
|
||||
"cv.try": "Încearcă matcherul",
|
||||
"cv.back": "Înapoi la navigator",
|
||||
"cv.step1": "Extragere text PDF",
|
||||
"cv.step2": "Chunking CV + embeddings",
|
||||
"cv.step3": "Parsare URL/descriere job",
|
||||
"cv.step4": "Scor potrivire + dovezi",
|
||||
"cv.input": "Date de intrare",
|
||||
"cv.details": "CV și detalii job",
|
||||
"cv.upload": "Încarcă CV PDF",
|
||||
"cv.fileHint": "Doar PDF, limita de mărime este gestionată de backend",
|
||||
"cv.jobLink": "Link job",
|
||||
"cv.jobDescription": "Sau lipește descrierea jobului",
|
||||
"cv.jobPlaceholder": "Lipește descrierea jobului dacă pagina nu poate fi citită automat.",
|
||||
"cv.gdpr": "Sunt de acord ca CV-ul meu să fie procesat si stocat.",
|
||||
"cv.submit": "Extrage CV și compară jobul",
|
||||
"cv.result": "Rezultat",
|
||||
"cv.analysis": "Analiză potrivire",
|
||||
"cv.empty": "Încarcă un CV și adaugă un link sau o descriere de job pentru a genera rezultatul.",
|
||||
"cv.contactTitle": "Vrei să adaptezi asta pentru workflow-ul tău?",
|
||||
"cv.contactText": "Formularul folosește endpoint-ul existent de contact din template.",
|
||||
"cv.noFile": "Te rog încarcă un CV PDF.",
|
||||
"cv.noJob": "Adaugă un link de job sau lipește descrierea jobului.",
|
||||
"cv.noConsent": "Consimțământul GDPR este obligatoriu.",
|
||||
"cv.processing": "Se procesează...",
|
||||
"cv.extracting": "Se extrage CV-ul și se compară jobul...",
|
||||
"cv.processingLong": "Se procesează PDF-ul și informațiile despre job. Endpoint-urile backend trebuie să fie disponibile.",
|
||||
"cv.cvFailed": "Extragerea CV-ului a eșuat",
|
||||
"cv.matchFailed": "Matching-ul jobului a eșuat",
|
||||
"cv.completed": "Matching finalizat.",
|
||||
"cv.backendMissing": "Frontend-ul este pregătit, dar endpoint-urile backend /api/cv-matcher/upload și /api/cv-matcher/match-job trebuie implementate.",
|
||||
"cv.noSummary": "Nu a fost returnat niciun sumar.",
|
||||
"cv.noItems": "Nu au fost returnate elemente.",
|
||||
"cv.strengths": "Puncte forte",
|
||||
"cv.gaps": "Lipsuri",
|
||||
"cv.evidence": "Dovezi recuperate din CV"
|
||||
}
|
||||
};
|
||||
|
||||
$('#menuToggle').on('click', function () {
|
||||
var $nav = $('#mainNav');
|
||||
var open = !$nav.hasClass('is-open');
|
||||
$nav.toggleClass('is-open', open);
|
||||
$(this).attr('aria-expanded', open ? 'true' : 'false');
|
||||
});
|
||||
function browserLang() {
|
||||
return ((navigator.language || navigator.userLanguage || 'en').toLowerCase().indexOf('ro') === 0) ? 'ro' : 'en';
|
||||
}
|
||||
|
||||
$('.nav a').on('click', function () {
|
||||
closeMobileMenu();
|
||||
});
|
||||
function currentLang() {
|
||||
return localStorage.getItem(LANG_KEY) || browserLang();
|
||||
}
|
||||
|
||||
$('#year').text(new Date().getFullYear());
|
||||
function t(key) {
|
||||
var lang = currentLang();
|
||||
return (i18n[lang] && i18n[lang][key]) || i18n.en[key] || key;
|
||||
}
|
||||
|
||||
/*--------------------------
|
||||
API health check
|
||||
---------------------------- */
|
||||
// Checks the backend API live endpoint and updates #api-status if present.
|
||||
function checkApiLive() {
|
||||
var $statusEl = $('#api-status');
|
||||
return $.ajax({
|
||||
url: '/api/health/live',
|
||||
method: 'GET',
|
||||
dataType: 'json',
|
||||
timeout: 5000
|
||||
}).done(function (data) {
|
||||
var status = (data && data.status) ? data.status : 'unknown';
|
||||
if ($statusEl.length) {
|
||||
$statusEl.text('API: ' + status).removeClass('text-danger').addClass('text-success');
|
||||
} else {
|
||||
console.log('API live status:', status);
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
if ($statusEl.length) {
|
||||
$statusEl.text('API: offline').removeClass('text-success').addClass('text-danger');
|
||||
}
|
||||
console.error('API health check failed:', textStatus, errorThrown);
|
||||
});
|
||||
}
|
||||
function updateLegalLinks(lang) {
|
||||
$('[data-legal]').each(function () {
|
||||
var page = $(this).data('legal');
|
||||
$(this).attr('href', '/legal/' + page + '-' + lang + '.html');
|
||||
});
|
||||
}
|
||||
|
||||
/*--------------------------
|
||||
reCaptcha
|
||||
---------------------------- */
|
||||
function getRecaptchaWebKey() {
|
||||
return $.get("/api/contact", function (res) {
|
||||
reCaptchaSiteKey = res;
|
||||
if (reCaptchaSiteKey) {
|
||||
var script = document.createElement('script');
|
||||
script.setAttribute('src', "https://www.google.com/recaptcha/api.js?render=" + reCaptchaSiteKey);
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
});
|
||||
}
|
||||
function applyLanguage(lang) {
|
||||
localStorage.setItem(LANG_KEY, lang);
|
||||
document.documentElement.lang = lang;
|
||||
updateLegalLinks(lang);
|
||||
$('[data-i18n]').each(function () {
|
||||
$(this).text(t($(this).data('i18n')));
|
||||
});
|
||||
$('[data-i18n-placeholder]').each(function () {
|
||||
$(this).attr('placeholder', t($(this).data('i18n-placeholder')));
|
||||
});
|
||||
$('.lang-flag').attr('aria-pressed', 'false');
|
||||
$('.lang-flag[data-lang="' + lang + '"]').attr('aria-pressed', 'true');
|
||||
}
|
||||
|
||||
/*--------------------------
|
||||
Google Tag Manager ID
|
||||
---------------------------- */
|
||||
function getGoogleTagManagerId() {
|
||||
return $.get("/api/google/tagmanager", function (res) {
|
||||
gTagManagerId = res;
|
||||
});
|
||||
}
|
||||
$('#year').text(new Date().getFullYear());
|
||||
applyLanguage(currentLang());
|
||||
$('.lang-flag').on('click', function () {
|
||||
applyLanguage($(this).data('lang'));
|
||||
});
|
||||
|
||||
/*--------------------------
|
||||
Google Maps Key
|
||||
---------------------------- */
|
||||
function getGMapKey() {
|
||||
return $.get("/api/google/maps", function (res) {
|
||||
gMapKey = res;
|
||||
if (gMapKey) {
|
||||
var script = document.createElement('script');
|
||||
script.setAttribute('src', "https://maps.googleapis.com/maps/api/js?key=" + gMapKey);
|
||||
document.body.appendChild(script);
|
||||
var script = document.createElement('script');
|
||||
script.setAttribute('src', "js/mapcode.js");
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
});
|
||||
}
|
||||
$('#menuToggle').on('click', function () {
|
||||
var $nav = $('#mainNav');
|
||||
var open = !$nav.hasClass('is-open');
|
||||
$nav.toggleClass('is-open', open);
|
||||
$(this).attr('aria-expanded', open ? 'true' : 'false');
|
||||
});
|
||||
$('.nav a').on('click', function () {
|
||||
$('#mainNav').removeClass('is-open');
|
||||
$('#menuToggle').attr('aria-expanded', 'false');
|
||||
});
|
||||
|
||||
/*--------------------------
|
||||
Load Google Tag Manager script with the retrieved ID
|
||||
---------------------------- */
|
||||
function loadGoogleTagManager() {
|
||||
if (window.__gtm_loaded) return;
|
||||
function checkApiLive() {
|
||||
var $statusEl = $('#api-status');
|
||||
return $.ajax({
|
||||
url: '/api/health/live',
|
||||
method: 'GET',
|
||||
dataType: 'json',
|
||||
timeout: 5000
|
||||
}).done(function (data) {
|
||||
var status = (data && data.status) ? data.status : 'unknown';
|
||||
if ($statusEl.length) {
|
||||
$statusEl.text('API: ' + status).removeClass('text-danger').addClass('text-success');
|
||||
} else {
|
||||
console.log('API live status:', status);
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||
if ($statusEl.length) {
|
||||
$statusEl.text('API: offline').removeClass('text-success').addClass('text-danger');
|
||||
}
|
||||
console.error('API health check failed:', textStatus, errorThrown);
|
||||
});
|
||||
}
|
||||
function getRecaptchaWebKey() {
|
||||
return $.get('/api/contact').done(function (res) {
|
||||
reCaptchaSiteKey = res;
|
||||
if (reCaptchaSiteKey && !window.__recaptcha_loaded) {
|
||||
window.__recaptcha_loaded = true;
|
||||
var script = document.createElement('script');
|
||||
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js?render=' + reCaptchaSiteKey);
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
}).fail(function () {
|
||||
console.warn('Could not load reCaptcha site key from /api/contact');
|
||||
});
|
||||
}
|
||||
|
||||
var script = document.createElement('script');
|
||||
script.async = true;
|
||||
script.src = "https://www.googletagmanager.com/gtm/js?id=" + gTagManagerId;
|
||||
document.head.appendChild(script);
|
||||
function getGoogleTagManagerId() {
|
||||
return $.get('/api/google/tagmanager').done(function (res) {
|
||||
gTagManagerId = res;
|
||||
}).fail(function () {
|
||||
console.warn('Could not load Google Tag Manager id from /api/google/tagmanager');
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize dataLayer
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.dataLayer.push({
|
||||
'gtm.start': new Date().getTime(),
|
||||
event: 'gtm.js'
|
||||
});
|
||||
}
|
||||
function loadGoogleTagManager() {
|
||||
if (window.__gtm_loaded || !gTagManagerId) return;
|
||||
window.__gtm_loaded = true;
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.dataLayer.push({
|
||||
'gtm.start': new Date().getTime(),
|
||||
event: 'gtm.js'
|
||||
});
|
||||
var script = document.createElement('script');
|
||||
script.async = true;
|
||||
script.src = 'https://www.googletagmanager.com/gtm/js?id=' + gTagManagerId;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
/*--------------------------
|
||||
Load consent cookie data
|
||||
---------------------------- */
|
||||
function loadConsent() {
|
||||
var consent = getConsent();
|
||||
function getConsent() {
|
||||
try {
|
||||
return JSON.parse(localStorage.getItem(CONSENT_KEY));
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (!consent) {
|
||||
showBanner();
|
||||
} else {
|
||||
applyConsent(consent);
|
||||
showManage();
|
||||
}
|
||||
}
|
||||
function setConsent(consent) {
|
||||
localStorage.setItem(CONSENT_KEY, JSON.stringify(consent));
|
||||
}
|
||||
|
||||
/*--------------------------
|
||||
Preloader
|
||||
---------------------------- */
|
||||
$(window).on('load', async function () {
|
||||
var pre_loader = $('#preloader')
|
||||
try {
|
||||
await Promise.all([
|
||||
checkApiLive(),
|
||||
getRecaptchaWebKey(),
|
||||
getGoogleTagManagerId(),
|
||||
getGMapKey()
|
||||
]).then(loadConsent);
|
||||
function applyConsent(consent) {
|
||||
if (consent && consent.analytics === true) loadGoogleTagManager();
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error("Startup API error", e);
|
||||
}
|
||||
pre_loader.fadeOut('slow', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
function showBanner() {
|
||||
$('#cookieBanner').fadeIn(200);
|
||||
}
|
||||
|
||||
/*--------------------------
|
||||
contact-from
|
||||
---------------------------- */
|
||||
$("#contactForm").on("submit", function (event) {
|
||||
if (event.isDefaultPrevented()) {
|
||||
// handle the invalid form...
|
||||
formError();
|
||||
submitMSG(false, "Did you fill in the form properly?");
|
||||
} else {
|
||||
// everything looks good!
|
||||
event.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
});
|
||||
function submitForm() {
|
||||
var loader = $('#contactLoader')
|
||||
var button = $("#submit");
|
||||
function hideBanner() {
|
||||
$('#cookieBanner').fadeOut(200);
|
||||
}
|
||||
|
||||
loader.css("display", "flex"); // show overlay
|
||||
button.prop("disabled", true);
|
||||
$("#msgSubmit").text("");
|
||||
grecaptcha.ready(function () {
|
||||
grecaptcha.execute(reCaptchaSiteKey, { action: 'contact' })
|
||||
.then(function (token) {
|
||||
// Initiate Variables With Form Content
|
||||
var message = {
|
||||
Name: $("#name").val(),
|
||||
Email: $("#email").val(),
|
||||
Subject: '[Contact request]',
|
||||
Message: $("#message").val(),
|
||||
CaptchaToken: token
|
||||
};
|
||||
function showManage() {
|
||||
$('#cookieManage').show();
|
||||
}
|
||||
$('#cookieReject, #cookieNecessary').on('click', function () {
|
||||
setConsent({
|
||||
necessary: true,
|
||||
analytics: false,
|
||||
ts: new Date().toISOString()
|
||||
});
|
||||
hideBanner();
|
||||
showManage();
|
||||
});
|
||||
$('#cookieAccept').on('click', function () {
|
||||
var consent = {
|
||||
necessary: true,
|
||||
analytics: true,
|
||||
ts: new Date().toISOString()
|
||||
};
|
||||
setConsent(consent);
|
||||
applyConsent(consent);
|
||||
hideBanner();
|
||||
showManage();
|
||||
});
|
||||
$('#cookieManage').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
showBanner();
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/api/contact",
|
||||
data: JSON.stringify(message),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp && resp.ok === true) {
|
||||
formSuccess()
|
||||
} else {
|
||||
var dict = translations[detectLanguage()] || translations.en;
|
||||
submitMSG(false, dict['contact.form.verificationfailed']);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
var dict = translations[detectLanguage()] || translations.en;
|
||||
submitMSG(false, dict['contact.form.submissionfailed']);
|
||||
}
|
||||
}).always(function () {
|
||||
loader.hide();
|
||||
button.prop("disabled", false);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
function initConsent() {
|
||||
var consent = getConsent();
|
||||
if (!consent) showBanner();
|
||||
else {
|
||||
applyConsent(consent);
|
||||
showManage();
|
||||
}
|
||||
}
|
||||
|
||||
function formSuccess() {
|
||||
$("#contactForm")[0].reset();
|
||||
var dict = translations[detectLanguage()] || translations.en;
|
||||
submitMSG(true, dict['contact.form.success'])
|
||||
}
|
||||
function submitMSG(valid, msg) {
|
||||
$('#msgSubmit').removeClass().addClass(valid ? 'form-message text-success' : 'form-message text-danger').text(msg);
|
||||
}
|
||||
|
||||
function formError() {
|
||||
$("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
|
||||
$(this).removeClass();
|
||||
});
|
||||
}
|
||||
function formSuccess() {
|
||||
$('#contactForm')[0].reset();
|
||||
submitMSG(true, t('form.thanks'));
|
||||
}
|
||||
|
||||
function submitMSG(valid, msg) {
|
||||
if (valid) {
|
||||
var msgClasses = "text-center tada animated text-success";
|
||||
} else {
|
||||
var msgClasses = "text-center text-danger";
|
||||
}
|
||||
$("#msgSubmit").removeClass().addClass(msgClasses).text(msg);
|
||||
}
|
||||
function formError() {
|
||||
$('#contactForm').removeClass().addClass('contact-form shake').one('animationend', function () {
|
||||
$(this).removeClass('shake');
|
||||
});
|
||||
}
|
||||
|
||||
$('#contactForm').on('submit', function (event) {
|
||||
event.preventDefault();
|
||||
var loader = $('#contactLoader'),
|
||||
button = $('#submit');
|
||||
loader.css('display', 'flex');
|
||||
button.prop('disabled', true);
|
||||
$('#msgSubmit').text('');
|
||||
|
||||
function postContact(token) {
|
||||
var message = {
|
||||
Name: $('#name').val(),
|
||||
Email: $('#email').val(),
|
||||
Subject: '[MyAi.ro contact request]',
|
||||
Message: $('#message').val(),
|
||||
CaptchaToken: token || ''
|
||||
};
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/api/contact',
|
||||
data: JSON.stringify(message),
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json'
|
||||
}).done(function (resp) {
|
||||
if (resp && resp.ok === true) formSuccess();
|
||||
else submitMSG(false, t('form.captchaFailed'));
|
||||
}).fail(function () {
|
||||
submitMSG(false, t('form.failed'));
|
||||
formError();
|
||||
}).always(function () {
|
||||
loader.hide();
|
||||
button.prop('disabled', false);
|
||||
});
|
||||
}
|
||||
if (window.grecaptcha && reCaptchaSiteKey) {
|
||||
grecaptcha.ready(function () {
|
||||
grecaptcha.execute(reCaptchaSiteKey, {
|
||||
action: 'contact'
|
||||
}).then(postContact);
|
||||
});
|
||||
} else {
|
||||
postContact('');
|
||||
}
|
||||
});
|
||||
|
||||
$('#cvFile').on('change', function () {
|
||||
var file = this.files && this.files[0];
|
||||
$('#cvFileName').text(file ? file.name : t('cv.fileHint'));
|
||||
});
|
||||
$('#cvMatcherForm').on('submit', async function (event) {
|
||||
event.preventDefault();
|
||||
var file = $('#cvFile')[0] && $('#cvFile')[0].files[0];
|
||||
var jobUrl = $('#jobUrl').val();
|
||||
var jobDescription = $('#jobDescription').val();
|
||||
var consent = $('#gdprConsent').is(':checked');
|
||||
var $msg = $('#matcherMsg'),
|
||||
$button = $('#matchSubmit'),
|
||||
$result = $('#matchResult');
|
||||
if (!file) {
|
||||
$msg.removeClass().addClass('form-message text-danger').text(t('cv.noFile'));
|
||||
return;
|
||||
}
|
||||
if (!jobUrl && !jobDescription) {
|
||||
$msg.removeClass().addClass('form-message text-danger').text(t('cv.noJob'));
|
||||
return;
|
||||
}
|
||||
if (!consent) {
|
||||
$msg.removeClass().addClass('form-message text-danger').text(t('cv.noConsent'));
|
||||
return;
|
||||
}
|
||||
$button.prop('disabled', true).text(t('cv.processing'));
|
||||
$msg.removeClass().addClass('form-message').text(t('cv.extracting'));
|
||||
$result.html('<div class="empty-result">' + escapeHtml(t('cv.processingLong')) + '</div>');
|
||||
|
||||
|
||||
/*--------------------------
|
||||
cookie consent
|
||||
---------------------------- */
|
||||
function getConsent() {
|
||||
try {
|
||||
return JSON.parse(localStorage.getItem(CONSENT_KEY));
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (window.grecaptcha && reCaptchaSiteKey) {
|
||||
grecaptcha.ready(function () {
|
||||
grecaptcha.execute(reCaptchaSiteKey, {
|
||||
action: 'contact'
|
||||
}).then(postCv);
|
||||
});
|
||||
} else {
|
||||
postCv('');
|
||||
}
|
||||
function postCv(token) {
|
||||
try {
|
||||
var formData = new FormData();
|
||||
formData.append('cv', file);
|
||||
formData.append('gdprConsent', String(consent));
|
||||
var cvResponse = await fetch('/api/cv-matcher/upload', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
});
|
||||
if (!cvResponse.ok) throw new Error(t('cv.cvFailed'));
|
||||
var cvData = await cvResponse.json();
|
||||
var matchResponse = await fetch('/api/cv-matcher/match-job', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
cvDocumentId: cvData.documentId || cvData.cvDocumentId,
|
||||
jobUrl: jobUrl,
|
||||
jobDescription: jobDescription,
|
||||
gdprConsent: consent
|
||||
})
|
||||
});
|
||||
if (!matchResponse.ok) throw new Error(t('cv.matchFailed'));
|
||||
var match = await matchResponse.json();
|
||||
renderMatchResult(match);
|
||||
$msg.removeClass().addClass('form-message text-success').text(t('cv.completed'));
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
$msg.removeClass().addClass('form-message text-danger').text(err.message || t('cv.matchFailed'));
|
||||
$result.html('<div class="empty-result">' + escapeHtml(t('cv.backendMissing')) + '</div>');
|
||||
} finally {
|
||||
$button.prop('disabled', false).text(t('cv.submit'));
|
||||
}
|
||||
}
|
||||
|
||||
function setConsent(consent) {
|
||||
localStorage.setItem(CONSENT_KEY, JSON.stringify(consent));
|
||||
}
|
||||
});
|
||||
|
||||
function showBanner() { $("#cookieBanner").fadeIn(200); }
|
||||
function hideBanner() { $("#cookieBanner").fadeOut(200); }
|
||||
function showManage() { $("#cookieManage").show(); }
|
||||
function applyConsent(consent) {
|
||||
if (consent && consent.analytics === true) {
|
||||
loadGoogleTagManager();
|
||||
}
|
||||
}
|
||||
function renderMatchResult(match) {
|
||||
var score = match.score || match.matchScore || 0;
|
||||
var summary = match.summary || t('cv.noSummary');
|
||||
var strengths = match.strengths || [];
|
||||
var gaps = match.gaps || match.missingSkills || [];
|
||||
var evidence = match.evidence || match.retrievedChunks || [];
|
||||
|
||||
// Actions
|
||||
$("#cookieReject, #cookieNecessary").on("click", function () {
|
||||
setConsent({ necessary: true, analytics: false, ts: new Date().toISOString() });
|
||||
hideBanner();
|
||||
showManage();
|
||||
location.reload(true);
|
||||
});
|
||||
function list(items) {
|
||||
if (!items || !items.length) return '<p class="empty-result">' + escapeHtml(t('cv.noItems')) + '</p>';
|
||||
return '<ul class="result-list">' + items.map(function (x) {
|
||||
var text = typeof x === 'string' ? x : (x.text || x.title || JSON.stringify(x));
|
||||
return '<li>' + escapeHtml(text) + '</li>';
|
||||
}).join('') + '</ul>';
|
||||
}
|
||||
$('#matchResult').html('<div class="score-badge">' + Number(score).toFixed(0) + '%</div><p>' + escapeHtml(summary) + '</p><h3>' + t('cv.strengths') + '</h3>' + list(strengths) + '<h3>' + t('cv.gaps') + '</h3>' + list(gaps) + '<h3>' + t('cv.evidence') + '</h3>' + list(evidence));
|
||||
}
|
||||
|
||||
$("#cookieAccept").on("click", function () {
|
||||
setConsent({ necessary: true, analytics: true, ts: new Date().toISOString() });
|
||||
hideBanner();
|
||||
showManage();
|
||||
applyConsent(getConsent());
|
||||
location.reload(true);
|
||||
});
|
||||
|
||||
$("#cookieManage").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
showBanner();
|
||||
});
|
||||
|
||||
initCarousels();
|
||||
})(jQuery);
|
||||
function escapeHtml(value) {
|
||||
return String(value).replace(/[&<>'"]/g, function (char) {
|
||||
return ({
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
"'": ''',
|
||||
'"': '"'
|
||||
})[char];
|
||||
});
|
||||
}
|
||||
$(window).on('load', function () {
|
||||
$.when(checkApiLive(), getRecaptchaWebKey(), getGoogleTagManagerId()).always(initConsent);
|
||||
});
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user