Web layer cleanup: Bootstrap removal, JS splitting, CSS consolidation, legal page injection #32
Vendored
-6
File diff suppressed because one or more lines are too long
+207
-155
@@ -1,3 +1,6 @@
|
|||||||
|
/* ============================================================
|
||||||
|
DESIGN TOKENS
|
||||||
|
============================================================ */
|
||||||
:root {
|
:root {
|
||||||
--bg: #041120;
|
--bg: #041120;
|
||||||
--bg-soft: #0a1c34;
|
--bg-soft: #0a1c34;
|
||||||
@@ -11,6 +14,9 @@
|
|||||||
--shadow: 0 18px 60px rgba(0,0,0,.28)
|
--shadow: 0 18px 60px rgba(0,0,0,.28)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
RESET / BASE
|
||||||
|
============================================================ */
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box
|
box-sizing: border-box
|
||||||
}
|
}
|
||||||
@@ -36,6 +42,9 @@ img {
|
|||||||
display: block
|
display: block
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
LAYOUT HELPERS
|
||||||
|
============================================================ */
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1120px;
|
max-width: 1120px;
|
||||||
@@ -48,6 +57,9 @@ img {
|
|||||||
overflow: hidden
|
overflow: hidden
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
STATUS PAGE (job-search redirect result)
|
||||||
|
============================================================ */
|
||||||
.status-hero {
|
.status-hero {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -75,6 +87,9 @@ img {
|
|||||||
line-height: 1.6
|
line-height: 1.6
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
HEADER / NAVIGATION
|
||||||
|
============================================================ */
|
||||||
.header {
|
.header {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -103,15 +118,11 @@ img {
|
|||||||
height: 48px
|
height: 48px
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-mark {
|
.brand-mark img {
|
||||||
display: inline-flex;
|
width: 100%;
|
||||||
align-items: center;
|
height: 100%;
|
||||||
justify-content: center;
|
object-fit: contain;
|
||||||
border-radius: 16px;
|
filter: drop-shadow(0 16px 26px rgba(95,160,255,.24))
|
||||||
background: linear-gradient(135deg,var(--primary),var(--primary-strong));
|
|
||||||
font-weight: 900;
|
|
||||||
color: #fff;
|
|
||||||
box-shadow: 0 18px 40px rgba(95,160,255,.24)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-text {
|
.brand-text {
|
||||||
@@ -141,6 +152,7 @@ img {
|
|||||||
color: #fff
|
color: #fff
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hamburger — hidden on desktop, shown via media query */
|
||||||
.menu-toggle {
|
.menu-toggle {
|
||||||
display: none;
|
display: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -156,6 +168,61 @@ img {
|
|||||||
margin: 5px 0
|
margin: 5px 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Language selector */
|
||||||
|
.nav-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-switch {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 6px;
|
||||||
|
border-radius: 18px;
|
||||||
|
background: rgba(255,255,255,.04);
|
||||||
|
border: 1px solid rgba(255,255,255,.1)
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-flag {
|
||||||
|
width: 46px;
|
||||||
|
height: 32px;
|
||||||
|
padding: 3px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: .78;
|
||||||
|
transition: transform .2s ease,border-color .2s ease,background-color .2s ease,opacity .2s ease
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-flag img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
border-radius: 8px;
|
||||||
|
object-fit: cover;
|
||||||
|
box-shadow: 0 8px 18px rgba(0,0,0,.18)
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-flag:hover {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(-1px)
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-flag[aria-pressed=true] {
|
||||||
|
opacity: 1;
|
||||||
|
border-color: rgba(95,160,255,.65);
|
||||||
|
background: rgba(95,160,255,.1)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
HERO SECTION
|
||||||
|
============================================================ */
|
||||||
.hero {
|
.hero {
|
||||||
padding: 72px 0 48px
|
padding: 72px 0 48px
|
||||||
}
|
}
|
||||||
@@ -200,6 +267,44 @@ img {
|
|||||||
margin-top: 30px
|
margin-top: 30px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hero card / AI console */
|
||||||
|
.banner-card {
|
||||||
|
overflow: hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
.showcase-banner {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 22px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
border: 1px solid rgba(255,255,255,.12);
|
||||||
|
box-shadow: 0 20px 55px rgba(0,0,0,.22)
|
||||||
|
}
|
||||||
|
|
||||||
|
.console-line {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
align-items: center;
|
||||||
|
margin: 12px 0;
|
||||||
|
padding: 16px 18px;
|
||||||
|
border-radius: 18px;
|
||||||
|
background: rgba(255,255,255,.05);
|
||||||
|
color: #dce8ff
|
||||||
|
}
|
||||||
|
|
||||||
|
.console-line span {
|
||||||
|
min-width: 76px;
|
||||||
|
color: #8fb8ff;
|
||||||
|
font-weight: 900
|
||||||
|
}
|
||||||
|
|
||||||
|
.console-line b {
|
||||||
|
font-weight: 700;
|
||||||
|
color: #dce8ff
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
BUTTONS
|
||||||
|
============================================================ */
|
||||||
.btn {
|
.btn {
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 13px 22px;
|
padding: 13px 22px;
|
||||||
@@ -218,6 +323,15 @@ img {
|
|||||||
color: #fff
|
color: #fff
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Bootstrap replacement utilities */
|
||||||
|
.btn-sm { padding: 5px 10px; font-size: .875rem }
|
||||||
|
.btn-dark { background: #1e2730; color: #fff; border-color: #1e2730 }
|
||||||
|
.btn-warning { background: #ffc107; color: #212529; border: 0 }
|
||||||
|
.shadow { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important }
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
SECTION / DEMO GRID
|
||||||
|
============================================================ */
|
||||||
.section {
|
.section {
|
||||||
padding: 76px 0
|
padding: 76px 0
|
||||||
}
|
}
|
||||||
@@ -240,34 +354,6 @@ img {
|
|||||||
line-height: 1.8
|
line-height: 1.8
|
||||||
}
|
}
|
||||||
|
|
||||||
.ai-console-card, .ai-panel, .demo-card, .contact-form {
|
|
||||||
background: var(--panel);
|
|
||||||
border: 1px solid var(--panel-border);
|
|
||||||
border-radius: var(--card-radius);
|
|
||||||
box-shadow: var(--shadow)
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-console-card {
|
|
||||||
padding: 30px
|
|
||||||
}
|
|
||||||
|
|
||||||
.console-line {
|
|
||||||
display: flex;
|
|
||||||
gap: 16px;
|
|
||||||
align-items: center;
|
|
||||||
margin: 12px 0;
|
|
||||||
padding: 16px 18px;
|
|
||||||
border-radius: 18px;
|
|
||||||
background: rgba(255,255,255,.05);
|
|
||||||
color: #dce8ff
|
|
||||||
}
|
|
||||||
|
|
||||||
.console-line span {
|
|
||||||
min-width: 76px;
|
|
||||||
color: #8fb8ff;
|
|
||||||
font-weight: 900
|
|
||||||
}
|
|
||||||
|
|
||||||
.demo-grid {
|
.demo-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3,1fr);
|
grid-template-columns: repeat(3,1fr);
|
||||||
@@ -311,6 +397,23 @@ img {
|
|||||||
font-size: .82rem
|
font-size: .82rem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
SHARED CARD STYLES
|
||||||
|
============================================================ */
|
||||||
|
.ai-console-card, .ai-panel, .demo-card, .contact-form {
|
||||||
|
background: var(--panel);
|
||||||
|
border: 1px solid var(--panel-border);
|
||||||
|
border-radius: var(--card-radius);
|
||||||
|
box-shadow: var(--shadow)
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-console-card {
|
||||||
|
padding: 30px
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
CV MATCHER — INPUT / RESULT PANELS
|
||||||
|
============================================================ */
|
||||||
.matcher-grid {
|
.matcher-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
@@ -441,6 +544,7 @@ img {
|
|||||||
margin: 0
|
margin: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Result panel */
|
||||||
.result-panel {
|
.result-panel {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 110px
|
top: 110px
|
||||||
@@ -473,6 +577,9 @@ img {
|
|||||||
line-height: 1.8
|
line-height: 1.8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
CONTACT SECTION
|
||||||
|
============================================================ */
|
||||||
.contact {
|
.contact {
|
||||||
background: rgba(255,255,255,.03)
|
background: rgba(255,255,255,.03)
|
||||||
}
|
}
|
||||||
@@ -507,6 +614,9 @@ img {
|
|||||||
padding: 28px
|
padding: 28px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
FORM MESSAGES & FEEDBACK
|
||||||
|
============================================================ */
|
||||||
.form-message {
|
.form-message {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 14px
|
margin-top: 14px
|
||||||
@@ -552,6 +662,9 @@ img {
|
|||||||
color: #f7d488 !important
|
color: #f7d488 !important
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
SUBSCRIBE FORM
|
||||||
|
============================================================ */
|
||||||
.subscribe-form {
|
.subscribe-form {
|
||||||
margin-top: 28px;
|
margin-top: 28px;
|
||||||
padding: 28px;
|
padding: 28px;
|
||||||
@@ -586,6 +699,9 @@ img {
|
|||||||
margin-top: 12px
|
margin-top: 12px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
FOOTER
|
||||||
|
============================================================ */
|
||||||
.footer {
|
.footer {
|
||||||
padding: 26px 0;
|
padding: 26px 0;
|
||||||
border-top: 1px solid rgba(255,255,255,.08);
|
border-top: 1px solid rgba(255,255,255,.08);
|
||||||
@@ -618,7 +734,13 @@ img {
|
|||||||
font-family: monospace
|
font-family: monospace
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
COOKIE BANNER & MANAGE BUTTON
|
||||||
|
Initial display:none ensures they are hidden before JS runs;
|
||||||
|
JS calls .fadeIn() / .show() to reveal them.
|
||||||
|
============================================================ */
|
||||||
.cookie-overlay {
|
.cookie-overlay {
|
||||||
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -657,13 +779,22 @@ img {
|
|||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* "Cookie settings" button — hidden until consent is given */
|
||||||
.cookie-manage {
|
.cookie-manage {
|
||||||
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
z-index: 40
|
z-index: 40
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
LOADER OVERLAY
|
||||||
|
Hidden by default; JS adds .loader-visible to show it.
|
||||||
|
Two-class selector (0,2,0) wins over single-class (0,1,0)
|
||||||
|
so no !important is needed.
|
||||||
|
============================================================ */
|
||||||
.loader-overlay {
|
.loader-overlay {
|
||||||
|
display: none;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
z-index: 80;
|
z-index: 80;
|
||||||
@@ -673,6 +804,10 @@ img {
|
|||||||
backdrop-filter: blur(2px)
|
backdrop-filter: blur(2px)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loader-overlay.loader-visible {
|
||||||
|
display: flex
|
||||||
|
}
|
||||||
|
|
||||||
.loader-box {
|
.loader-box {
|
||||||
max-width: 360px;
|
max-width: 360px;
|
||||||
padding: 22px 28px;
|
padding: 22px 28px;
|
||||||
@@ -708,6 +843,9 @@ img {
|
|||||||
animation: loader-spin .8s linear infinite
|
animation: loader-spin .8s linear infinite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
ANIMATIONS
|
||||||
|
============================================================ */
|
||||||
@keyframes loader-spin {
|
@keyframes loader-spin {
|
||||||
to { transform: rotate(360deg) }
|
to { transform: rotate(360deg) }
|
||||||
}
|
}
|
||||||
@@ -717,20 +855,16 @@ img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes shake {
|
@keyframes shake {
|
||||||
25% {
|
25% { transform: translateX(-5px) }
|
||||||
transform: translateX(-5px)
|
50% { transform: translateX(5px) }
|
||||||
}
|
75% { transform: translateX(-3px) }
|
||||||
|
|
||||||
50% {
|
|
||||||
transform: translateX(5px)
|
|
||||||
}
|
|
||||||
|
|
||||||
75% {
|
|
||||||
transform: translateX(-3px)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
RESPONSIVE — tablets and below (≤900px)
|
||||||
|
============================================================ */
|
||||||
@media (max-width:900px) {
|
@media (max-width:900px) {
|
||||||
|
/* Single-column layouts */
|
||||||
.hero-grid, .matcher-grid, .contact-grid, .demo-grid {
|
.hero-grid, .matcher-grid, .contact-grid, .demo-grid {
|
||||||
grid-template-columns: 1fr
|
grid-template-columns: 1fr
|
||||||
}
|
}
|
||||||
@@ -739,6 +873,7 @@ img {
|
|||||||
position: static
|
position: static
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Nav becomes a dropdown */
|
||||||
.nav {
|
.nav {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 84px;
|
top: 84px;
|
||||||
@@ -750,7 +885,8 @@ img {
|
|||||||
background: #071326;
|
background: #071326;
|
||||||
border: 1px solid rgba(255,255,255,.12);
|
border: 1px solid rgba(255,255,255,.12);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
padding: 20px
|
padding: 20px;
|
||||||
|
z-index: 30
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav.is-open {
|
.nav.is-open {
|
||||||
@@ -758,15 +894,36 @@ img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.menu-toggle {
|
.menu-toggle {
|
||||||
display: block
|
display: block;
|
||||||
|
order: 4
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-actions {
|
||||||
|
margin-left: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-wrap {
|
||||||
|
position: relative
|
||||||
}
|
}
|
||||||
|
|
||||||
.cookie-box {
|
.cookie-box {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lang-switch {
|
||||||
|
padding: 4px
|
||||||
|
}
|
||||||
|
|
||||||
|
.lang-flag {
|
||||||
|
width: 42px;
|
||||||
|
height: 30px
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
RESPONSIVE — mobile (≤560px)
|
||||||
|
============================================================ */
|
||||||
@media (max-width:560px) {
|
@media (max-width:560px) {
|
||||||
.hero {
|
.hero {
|
||||||
padding-top: 46px
|
padding-top: 46px
|
||||||
@@ -785,112 +942,7 @@ img {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center
|
text-align: center
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* MyAi brand + main-page language selector */
|
|
||||||
.brand-mark img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
filter: drop-shadow(0 16px 26px rgba(95,160,255,.24))
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-actions {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-switch {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 6px;
|
|
||||||
border-radius: 18px;
|
|
||||||
background: rgba(255,255,255,.04);
|
|
||||||
border: 1px solid rgba(255,255,255,.1)
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag {
|
|
||||||
width: 46px;
|
|
||||||
height: 32px;
|
|
||||||
padding: 3px;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
border-radius: 12px;
|
|
||||||
background: transparent;
|
|
||||||
cursor: pointer;
|
|
||||||
opacity: .78;
|
|
||||||
transition: transform .2s ease,border-color .2s ease,background-color .2s ease,opacity .2s ease
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: block;
|
|
||||||
border-radius: 8px;
|
|
||||||
object-fit: cover;
|
|
||||||
box-shadow: 0 8px 18px rgba(0,0,0,.18)
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag:hover {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(-1px)
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag[aria-pressed=true] {
|
|
||||||
opacity: 1;
|
|
||||||
border-color: rgba(95,160,255,.65);
|
|
||||||
background: rgba(95,160,255,.1)
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner-card {
|
|
||||||
overflow: hidden
|
|
||||||
}
|
|
||||||
|
|
||||||
.showcase-banner {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 22px;
|
|
||||||
margin-bottom: 18px;
|
|
||||||
border: 1px solid rgba(255,255,255,.12);
|
|
||||||
box-shadow: 0 20px 55px rgba(0,0,0,.22)
|
|
||||||
}
|
|
||||||
|
|
||||||
.console-line b {
|
|
||||||
font-weight: 700;
|
|
||||||
color: #dce8ff
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width:900px) {
|
|
||||||
.nav-actions {
|
|
||||||
margin-left: auto
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-wrap {
|
|
||||||
position: relative
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-toggle {
|
|
||||||
order: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
z-index: 30
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-switch {
|
|
||||||
padding: 4px
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag {
|
|
||||||
width: 42px;
|
|
||||||
height: 30px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width:560px) {
|
|
||||||
.brand-text {
|
.brand-text {
|
||||||
font-size: 1.35rem
|
font-size: 1.35rem
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="/css/bootstrap.min.css" />
|
|
||||||
<link rel="stylesheet" href="/css/myai.css" />
|
<link rel="stylesheet" href="/css/myai.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -181,7 +180,7 @@
|
|||||||
<span id="year"></span> MyAi.ro ·
|
<span id="year"></span> MyAi.ro ·
|
||||||
<span data-i18n="footer.rights">All rights reserved</span>
|
<span data-i18n="footer.rights">All rights reserved</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="footer-links footer-legal">
|
<div class="footer-links">
|
||||||
<a data-legal="terms" href="/legal/terms-en.html" target="_blank" data-i18n="legal.terms">Terms</a>
|
<a data-legal="terms" href="/legal/terms-en.html" target="_blank" data-i18n="legal.terms">Terms</a>
|
||||||
<a data-legal="privacy" href="/legal/privacy-en.html" target="_blank" data-i18n="legal.privacy">Privacy</a>
|
<a data-legal="privacy" href="/legal/privacy-en.html" target="_blank" data-i18n="legal.privacy">Privacy</a>
|
||||||
<a data-legal="cookies" href="/legal/cookies-en.html" target="_blank" data-i18n="legal.cookies">Cookies</a>
|
<a data-legal="cookies" href="/legal/cookies-en.html" target="_blank" data-i18n="legal.cookies">Cookies</a>
|
||||||
@@ -191,20 +190,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<div id="contactLoader" class="loader-overlay" style="display:none;" role="status" aria-live="polite">
|
<div id="contactLoader" class="loader-overlay" role="status" aria-live="polite">
|
||||||
<div class="loader-box">
|
<div class="loader-box">
|
||||||
<span class="loader-spinner" aria-hidden="true"></span>
|
<span class="loader-spinner" aria-hidden="true"></span>
|
||||||
<strong data-i18n="status.sending">Sending...</strong>
|
<strong data-i18n="status.sending">Sending...</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="cvLoader" class="loader-overlay" style="display:none;" role="status" aria-live="polite">
|
<div id="cvLoader" class="loader-overlay" role="status" aria-live="polite">
|
||||||
<div class="loader-box">
|
<div class="loader-box">
|
||||||
<span class="loader-spinner" aria-hidden="true"></span>
|
<span class="loader-spinner" aria-hidden="true"></span>
|
||||||
<strong data-i18n="cv.loaderTitle">Working on your CV</strong>
|
<strong data-i18n="cv.loaderTitle">Working on your CV</strong>
|
||||||
<span data-i18n="cv.loaderText">Extracting text, retrieving context and scoring the match. This can take a moment.</span>
|
<span data-i18n="cv.loaderText">Extracting text, retrieving context and scoring the match. This can take a moment.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="cookieBanner" class="cookie-overlay" style="display:none;">
|
<div id="cookieBanner" class="cookie-overlay">
|
||||||
<div class="cookie-box">
|
<div class="cookie-box">
|
||||||
<div class="cookie-text">
|
<div class="cookie-text">
|
||||||
<strong data-i18n="cookies.title">Cookies</strong>
|
<strong data-i18n="cookies.title">Cookies</strong>
|
||||||
@@ -219,9 +218,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" id="cookieManage" class="cookie-manage btn btn-dark btn-sm shadow" style="display:none;" data-i18n="cookies.settings">Cookie settings</a>
|
<a href="#" id="cookieManage" class="cookie-manage btn btn-dark btn-sm shadow" data-i18n="cookies.settings">Cookie settings</a>
|
||||||
<script src="/js/vendor/jquery-4.0.0.min.js"></script>
|
<script src="/js/vendor/jquery-4.0.0.min.js"></script>
|
||||||
<script src="/js/bootstrap.min.js"></script>
|
<script src="/js/i18n.js"></script>
|
||||||
<script src="/js/main.js"></script>
|
<script src="/js/main.js"></script>
|
||||||
|
<script src="/js/cv-matcher.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="/css/bootstrap.min.css" />
|
|
||||||
<link rel="stylesheet" href="/css/myai.css" />
|
<link rel="stylesheet" href="/css/myai.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -184,7 +183,7 @@
|
|||||||
<span id="year"></span> MyAi.ro ·
|
<span id="year"></span> MyAi.ro ·
|
||||||
<span data-i18n="footer.rights">All rights reserved</span>
|
<span data-i18n="footer.rights">All rights reserved</span>
|
||||||
</p>
|
</p>
|
||||||
<div class="footer-links footer-legal">
|
<div class="footer-links">
|
||||||
<a data-legal="terms" href="/legal/terms-en.html" target="_blank" data-i18n="legal.terms">Terms</a>
|
<a data-legal="terms" href="/legal/terms-en.html" target="_blank" data-i18n="legal.terms">Terms</a>
|
||||||
<a data-legal="privacy" href="/legal/privacy-en.html" target="_blank" data-i18n="legal.privacy">Privacy</a>
|
<a data-legal="privacy" href="/legal/privacy-en.html" target="_blank" data-i18n="legal.privacy">Privacy</a>
|
||||||
<a data-legal="cookies" href="/legal/cookies-en.html" target="_blank" data-i18n="legal.cookies">Cookies</a>
|
<a data-legal="cookies" href="/legal/cookies-en.html" target="_blank" data-i18n="legal.cookies">Cookies</a>
|
||||||
@@ -194,13 +193,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<div id="contactLoader" class="loader-overlay" style="display:none;" role="status" aria-live="polite">
|
<div id="contactLoader" class="loader-overlay" role="status" aria-live="polite">
|
||||||
<div class="loader-box">
|
<div class="loader-box">
|
||||||
<span class="loader-spinner" aria-hidden="true"></span>
|
<span class="loader-spinner" aria-hidden="true"></span>
|
||||||
<strong data-i18n="status.sending">Sending...</strong>
|
<strong data-i18n="status.sending">Sending...</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="cookieBanner" class="cookie-overlay" style="display:none;">
|
<div id="cookieBanner" class="cookie-overlay">
|
||||||
<div class="cookie-box">
|
<div class="cookie-box">
|
||||||
<div class="cookie-text">
|
<div class="cookie-text">
|
||||||
<strong data-i18n="cookies.title">Cookies</strong>
|
<strong data-i18n="cookies.title">Cookies</strong>
|
||||||
@@ -215,9 +214,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="#" id="cookieManage" class="cookie-manage btn btn-dark btn-sm shadow" style="display:none;" data-i18n="cookies.settings">Cookie settings</a>
|
<a href="#" id="cookieManage" class="cookie-manage btn btn-dark btn-sm shadow" data-i18n="cookies.settings">Cookie settings</a>
|
||||||
<script src="/js/vendor/jquery-4.0.0.min.js"></script>
|
<script src="/js/vendor/jquery-4.0.0.min.js"></script>
|
||||||
<script src="/js/bootstrap.min.js"></script>
|
<script src="/js/i18n.js"></script>
|
||||||
<script src="/js/main.js"></script>
|
<script src="/js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Vendored
-6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,256 @@
|
|||||||
|
/**
|
||||||
|
* MyAi CV Matcher Form
|
||||||
|
*
|
||||||
|
* Handles CV upload, job description input, and match result rendering.
|
||||||
|
* Depends on: jQuery, i18n.js, main.js (for shared utilities)
|
||||||
|
*/
|
||||||
|
(function ($) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var reCaptchaSiteKey = null;
|
||||||
|
var LANG_KEY = "myai_lang";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve translation by key.
|
||||||
|
* Falls back to English if key not found in current language.
|
||||||
|
*/
|
||||||
|
function t(key) {
|
||||||
|
var lang = localStorage.getItem(LANG_KEY) || 'en';
|
||||||
|
return (window.MyAi.i18n[lang] && window.MyAi.i18n[lang][key]) ||
|
||||||
|
window.MyAi.i18n.en[key] || key;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current language from localStorage or detect from browser.
|
||||||
|
*/
|
||||||
|
function currentLang() {
|
||||||
|
return localStorage.getItem(LANG_KEY) ||
|
||||||
|
(((navigator.language || navigator.userLanguage || 'en').toLowerCase().indexOf('ro') === 0) ? 'ro' : 'en');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display field error message and mark container with is-invalid class.
|
||||||
|
*/
|
||||||
|
function showFieldError(errorId, msg) {
|
||||||
|
var $el = $('#' + errorId);
|
||||||
|
$el.text(msg || '');
|
||||||
|
var $parent = $el.parent();
|
||||||
|
var $container = $parent.is('label, .consent-inline') ? $parent : $el.prev();
|
||||||
|
if (!$container.length || !$container.is('label, .consent-inline, .file-drop, .subscribe-row')) {
|
||||||
|
$container = $el.closest('form');
|
||||||
|
}
|
||||||
|
$container.toggleClass('is-invalid', !!msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear multiple field errors at once.
|
||||||
|
*/
|
||||||
|
function clearFieldErrors(errorIds) {
|
||||||
|
for (var i = 0; i < errorIds.length; i++) showFieldError(errorIds[i], '');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate email format with simple regex.
|
||||||
|
*/
|
||||||
|
function isValidEmail(value) {
|
||||||
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value || '').trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update displayed CV filename when file is selected.
|
||||||
|
*/
|
||||||
|
$('#cvFile').on('change', function () {
|
||||||
|
var file = this.files && this.files[0];
|
||||||
|
$('#cvFileName').text(file ? file.name : t('cv.fileHint'));
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle CV Matcher form submission.
|
||||||
|
*/
|
||||||
|
$('#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 matchEmail = $('#matchEmail').val();
|
||||||
|
var consent = $('#gdprConsent').is(':checked');
|
||||||
|
var $msg = $('#matcherMsg'),
|
||||||
|
$button = $('#matchSubmit'),
|
||||||
|
$result = $('#matchResult');
|
||||||
|
|
||||||
|
clearFieldErrors(['cvFileError', 'cvJobError', 'cvConsentError']);
|
||||||
|
$msg.removeClass().addClass('form-message').text('');
|
||||||
|
|
||||||
|
// Validate inputs
|
||||||
|
var hasError = false;
|
||||||
|
if (!file) { showFieldError('cvFileError', t('cv.noFile')); hasError = true; }
|
||||||
|
if (!jobUrl && !jobDescription) { showFieldError('cvJobError', t('cv.noJob')); hasError = true; }
|
||||||
|
if (!consent) { showFieldError('cvConsentError', t('cv.noConsent')); hasError = true; }
|
||||||
|
if (hasError) return;
|
||||||
|
|
||||||
|
var $cvLoader = $('#cvLoader');
|
||||||
|
$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>');
|
||||||
|
$cvLoader.addClass('loader-visible');
|
||||||
|
|
||||||
|
// Require reCaptcha and get CV upload token
|
||||||
|
if (window.grecaptcha && reCaptchaSiteKey) {
|
||||||
|
grecaptcha.ready(function () {
|
||||||
|
grecaptcha.execute(reCaptchaSiteKey, {
|
||||||
|
action: 'cv_upload'
|
||||||
|
}).then(postCv);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$cvLoader.removeClass('loader-visible');
|
||||||
|
$msg.removeClass().addClass('form-message text-danger').text(t('form.captchaFailed'));
|
||||||
|
$button.prop('disabled', false).text(t('cv.submit'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload CV and request match score.
|
||||||
|
*/
|
||||||
|
async function postCv(token) {
|
||||||
|
try {
|
||||||
|
// Upload CV PDF
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('file', file);
|
||||||
|
formData.append('gdprConsent', String(consent));
|
||||||
|
formData.append('captchaToken', token || '');
|
||||||
|
var cvResponse = await fetch('/api/cv-matcher/upload', {
|
||||||
|
method: 'POST',
|
||||||
|
body: formData
|
||||||
|
});
|
||||||
|
if (!cvResponse.ok) {
|
||||||
|
var cvErrBody = null;
|
||||||
|
try { cvErrBody = await cvResponse.json(); } catch (_) {}
|
||||||
|
throw new Error(extractApiError(cvErrBody, cvResponse.status, 'cv.cvFailed', 'cv.rateLimited'));
|
||||||
|
}
|
||||||
|
var cvData = await cvResponse.json();
|
||||||
|
|
||||||
|
// Get fresh captcha token for match action
|
||||||
|
if (!(window.grecaptcha && reCaptchaSiteKey)) {
|
||||||
|
throw new Error(t('form.captchaFailed'));
|
||||||
|
}
|
||||||
|
var matchToken = await new Promise(function (resolve, reject) {
|
||||||
|
try {
|
||||||
|
grecaptcha.ready(function () {
|
||||||
|
grecaptcha.execute(reCaptchaSiteKey, { action: 'match_job' }).then(resolve).catch(reject);
|
||||||
|
});
|
||||||
|
} catch (e) { reject(e); }
|
||||||
|
});
|
||||||
|
|
||||||
|
// Request match
|
||||||
|
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,
|
||||||
|
email: matchEmail,
|
||||||
|
gdprConsent: consent,
|
||||||
|
captchaToken: matchToken,
|
||||||
|
language: currentLang()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (!matchResponse.ok) {
|
||||||
|
var matchErrBody = null;
|
||||||
|
try { matchErrBody = await matchResponse.json(); } catch (_) {}
|
||||||
|
throw new Error(extractApiError(matchErrBody, matchResponse.status, 'cv.matchFailed', 'cv.rateLimited'));
|
||||||
|
}
|
||||||
|
var match = await matchResponse.json();
|
||||||
|
renderMatchResult(match);
|
||||||
|
$msg.removeClass().addClass('form-message text-success').text(t('cv.completed'));
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
var isRateLimited = err && err.message === t('cv.rateLimited');
|
||||||
|
var tone = isRateLimited ? 'text-warning' : 'text-danger';
|
||||||
|
$msg.removeClass().addClass('form-message ' + tone).text(err.message || t('cv.matchFailed'));
|
||||||
|
$result.html('<div class="empty-result">' + escapeHtml(isRateLimited ? t('cv.rateLimited') : t('cv.backendMissing')) + '</div>');
|
||||||
|
} finally {
|
||||||
|
$cvLoader.removeClass('loader-visible');
|
||||||
|
$button.prop('disabled', false).text(t('cv.submit'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render CV match result into #matchResult panel.
|
||||||
|
*/
|
||||||
|
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 || [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render list of items (strengths, gaps, evidence).
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Escape HTML special characters to prevent XSS.
|
||||||
|
*/
|
||||||
|
function escapeHtml(value) {
|
||||||
|
return String(value).replace(/[&<>'"]/g, function (char) {
|
||||||
|
return ({
|
||||||
|
'&': '&',
|
||||||
|
'<': '<',
|
||||||
|
'>': '>',
|
||||||
|
"'": ''',
|
||||||
|
'"': '"'
|
||||||
|
})[char];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract user-facing error message from failed API response.
|
||||||
|
* For 4xx: show server's error field (intentional user feedback).
|
||||||
|
* For 5xx or missing body: show generic i18n fallback.
|
||||||
|
*/
|
||||||
|
function extractApiError(body, status, fallbackKey, rateLimitKey) {
|
||||||
|
if (status === 429) return t(rateLimitKey || 'form.rateLimited');
|
||||||
|
var msg = body && (body.error || body.Error || body.title);
|
||||||
|
return (status >= 400 && status < 500 && msg) ? msg : t(fallbackKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load reCaptcha site key on page load (needed for CV upload).
|
||||||
|
*/
|
||||||
|
$(window).on('load', function () {
|
||||||
|
$.get('/api/captcha').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/captcha');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
/**
|
||||||
|
* MyAi Translation Dictionary
|
||||||
|
*
|
||||||
|
* Exposes window.MyAi.i18n with EN/RO translation keys.
|
||||||
|
* Main.js accesses these via the t(key) helper function.
|
||||||
|
*/
|
||||||
|
(function () {
|
||||||
|
"use strict";
|
||||||
|
window.MyAi = window.MyAi || {};
|
||||||
|
window.MyAi.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, add a job link or description, and get 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 and we'll get back to 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.",
|
||||||
|
"form.rateLimited": "Too many requests from your network. Please wait a moment and try again.",
|
||||||
|
"form.required.name": "Please enter your name.",
|
||||||
|
"form.required.email": "Please enter your email address.",
|
||||||
|
"form.required.emailInvalid": "Please enter a valid email address.",
|
||||||
|
"form.required.message": "Please write a message.",
|
||||||
|
"subscribe.title": "Stay in the loop",
|
||||||
|
"subscribe.text": "Get a short note when a new AI demo is published. One email at most every few weeks.",
|
||||||
|
"subscribe.emailPlaceholder": "name@company.com",
|
||||||
|
"subscribe.gdpr": "I agree to receive occasional emails about new demos.",
|
||||||
|
"subscribe.submit": "Subscribe",
|
||||||
|
"subscribe.thanks": "Thanks! You are subscribed.",
|
||||||
|
"subscribe.failed": "Could not subscribe right now. Please try again later.",
|
||||||
|
"subscribe.noConsent": "Please confirm your consent first.",
|
||||||
|
"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": "We read your CV, find the parts most relevant to the job, then produce a match score with strengths, gaps and suggested next steps.",
|
||||||
|
"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.",
|
||||||
|
"cv.jobLink": "Job link",
|
||||||
|
"cv.jobDescription": "Or paste job description",
|
||||||
|
"cv.jobPlaceholder": "Paste the job description if the page can't be read automatically.",
|
||||||
|
"cv.gdpr": "I agree that my CV is processed and stored.",
|
||||||
|
"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": "Send a quick note and we'll get back to you.",
|
||||||
|
"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.",
|
||||||
|
"cv.cvFailed": "CV extraction failed",
|
||||||
|
"cv.matchFailed": "Job matching failed",
|
||||||
|
"cv.rateLimited": "Too many CV matcher requests from your network. Please try again in a few minutes.",
|
||||||
|
"cv.completed": "Match completed.",
|
||||||
|
"cv.backendMissing": "There was an error while processing the CV.",
|
||||||
|
"cv.loaderTitle": "Working on your CV",
|
||||||
|
"cv.loaderText": "Extracting text, retrieving context and scoring the match. This can take a moment.",
|
||||||
|
"cv.noSummary": "No summary available.",
|
||||||
|
"cv.noItems": "No items yet.",
|
||||||
|
"cv.strengths": "Strengths",
|
||||||
|
"cv.gaps": "Gaps",
|
||||||
|
"cv.evidence": "Supporting CV excerpts"
|
||||||
|
},
|
||||||
|
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 proiecte.",
|
||||||
|
"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 și primește 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, ordonare și notificări.",
|
||||||
|
"contact.title": "Discută o integrare AI sau un proiect software custom",
|
||||||
|
"contact.text": "Completează formularul și 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.",
|
||||||
|
"form.rateLimited": "Prea multe cereri din rețeaua ta. Te rugăm să aștepți câteva momente și să încerci din nou.",
|
||||||
|
"form.required.name": "Te rugăm să introduci numele.",
|
||||||
|
"form.required.email": "Te rugăm să introduci adresa de email.",
|
||||||
|
"form.required.emailInvalid": "Te rugăm să introduci o adresă de email validă.",
|
||||||
|
"form.required.message": "Te rugăm să scrii un mesaj.",
|
||||||
|
"subscribe.title": "Rămâi la curent",
|
||||||
|
"subscribe.text": "Primești o notă scurtă când publicăm un nou demo AI. Cel mult un email la câteva săptămâni.",
|
||||||
|
"subscribe.emailPlaceholder": "nume@companie.ro",
|
||||||
|
"subscribe.gdpr": "Sunt de acord să primesc ocazional emailuri despre noile demo-uri.",
|
||||||
|
"subscribe.submit": "Abonează-mă",
|
||||||
|
"subscribe.thanks": "Mulțumesc! Ești abonat.",
|
||||||
|
"subscribe.failed": "Nu am putut realiza abonarea acum. Te rugăm să încerci mai târziu.",
|
||||||
|
"subscribe.noConsent": "Te rugăm să confirmi întâi consimțământul.",
|
||||||
|
"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": "Îți citim CV-ul, găsim părțile cele mai relevante pentru job și calculăm un scor de potrivire cu puncte forte, lipsuri și pași următori sugerați.",
|
||||||
|
"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.",
|
||||||
|
"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 și 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 o variantă adaptată fluxului tău de lucru?",
|
||||||
|
"cv.contactText": "Lasă-ne un mesaj și revenim cu detalii.",
|
||||||
|
"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.",
|
||||||
|
"cv.cvFailed": "Extragerea CV-ului a eșuat",
|
||||||
|
"cv.matchFailed": "Potrivirea jobului a eșuat",
|
||||||
|
"cv.rateLimited": "Prea multe cereri către CV matcher din rețeaua ta. Te rugăm să încerci din nou peste câteva minute.",
|
||||||
|
"cv.completed": "Matching finalizat.",
|
||||||
|
"cv.backendMissing": "A apărut o eroare la procesarea CV-ului.",
|
||||||
|
"cv.loaderTitle": "Procesăm CV-ul tău",
|
||||||
|
"cv.loaderText": "Extragem textul, recuperăm contextul și calculăm scorul potrivirii. Poate dura câteva momente.",
|
||||||
|
"cv.noSummary": "Niciun sumar disponibil.",
|
||||||
|
"cv.noItems": "Niciun element.",
|
||||||
|
"cv.strengths": "Puncte forte",
|
||||||
|
"cv.gaps": "Lipsuri",
|
||||||
|
"cv.evidence": "Fragmente relevante din CV"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
+317
-499
@@ -1,245 +1,66 @@
|
|||||||
|
/**
|
||||||
|
* MyAi Main Application Logic
|
||||||
|
*
|
||||||
|
* Core responsibilities:
|
||||||
|
* - i18n initialization and language switching
|
||||||
|
* - Header/nav behavior
|
||||||
|
* - Cookie consent management
|
||||||
|
* - Contact and subscribe forms (with reCaptcha)
|
||||||
|
* - API health checks and configuration loading
|
||||||
|
*
|
||||||
|
* Depends on: jQuery, i18n.js (translation dict)
|
||||||
|
* Shared utilities exposed on window.MyAi for use by other scripts.
|
||||||
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
INITIALIZATION & STATE
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
var reCaptchaSiteKey = null;
|
var reCaptchaSiteKey = null;
|
||||||
var gTagManagerId = null;
|
var gTagManagerId = null;
|
||||||
var CONSENT_KEY = "myai_cookie_consent";
|
var CONSENT_KEY = "myai_cookie_consent";
|
||||||
var LANG_KEY = "myai_lang";
|
var LANG_KEY = "myai_lang";
|
||||||
|
|
||||||
var i18n = {
|
window.MyAi = window.MyAi || {};
|
||||||
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, add a job link or description, and get 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 and we'll get back to 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.",
|
|
||||||
"form.rateLimited": "Too many requests from your network. Please wait a moment and try again.",
|
|
||||||
"form.required.name": "Please enter your name.",
|
|
||||||
"form.required.email": "Please enter your email address.",
|
|
||||||
"form.required.emailInvalid": "Please enter a valid email address.",
|
|
||||||
"form.required.message": "Please write a message.",
|
|
||||||
"subscribe.title": "Stay in the loop",
|
|
||||||
"subscribe.text": "Get a short note when a new AI demo is published. One email at most every few weeks.",
|
|
||||||
"subscribe.emailPlaceholder": "name@company.com",
|
|
||||||
"subscribe.gdpr": "I agree to receive occasional emails about new demos.",
|
|
||||||
"subscribe.submit": "Subscribe",
|
|
||||||
"subscribe.thanks": "Thanks! You are subscribed.",
|
|
||||||
"subscribe.failed": "Could not subscribe right now. Please try again later.",
|
|
||||||
"subscribe.noConsent": "Please confirm your consent first.",
|
|
||||||
"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": "We read your CV, find the parts most relevant to the job, then produce a match score with strengths, gaps and suggested next steps.",
|
|
||||||
"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.",
|
|
||||||
"cv.jobLink": "Job link",
|
|
||||||
"cv.jobDescription": "Or paste job description",
|
|
||||||
"cv.jobPlaceholder": "Paste the job description if the page can't be read automatically.",
|
|
||||||
"cv.gdpr": "I agree that my CV is processed and stored.",
|
|
||||||
"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": "Send a quick note and we'll get back to you.",
|
|
||||||
"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.",
|
|
||||||
"cv.cvFailed": "CV extraction failed",
|
|
||||||
"cv.matchFailed": "Job matching failed",
|
|
||||||
"cv.rateLimited": "Too many CV matcher requests from your network. Please try again in a few minutes.",
|
|
||||||
"cv.completed": "Match completed.",
|
|
||||||
"cv.backendMissing": "There was an error while processing the CV.",
|
|
||||||
"cv.loaderTitle": "Working on your CV",
|
|
||||||
"cv.loaderText": "Extracting text, retrieving context and scoring the match. This can take a moment.",
|
|
||||||
"cv.noSummary": "No summary available.",
|
|
||||||
"cv.noItems": "No items yet.",
|
|
||||||
"cv.strengths": "Strengths",
|
|
||||||
"cv.gaps": "Gaps",
|
|
||||||
"cv.evidence": "Supporting CV excerpts"
|
|
||||||
},
|
|
||||||
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 proiecte.",
|
|
||||||
"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 și primește 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, ordonare și notificări.",
|
|
||||||
"contact.title": "Discută o integrare AI sau un proiect software custom",
|
|
||||||
"contact.text": "Completează formularul și 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.",
|
|
||||||
"form.rateLimited": "Prea multe cereri din rețeaua ta. Te rugăm să aștepți câteva momente și să încerci din nou.",
|
|
||||||
"form.required.name": "Te rugăm să introduci numele.",
|
|
||||||
"form.required.email": "Te rugăm să introduci adresa de email.",
|
|
||||||
"form.required.emailInvalid": "Te rugăm să introduci o adresă de email validă.",
|
|
||||||
"form.required.message": "Te rugăm să scrii un mesaj.",
|
|
||||||
"subscribe.title": "Rămâi la curent",
|
|
||||||
"subscribe.text": "Primești o notă scurtă când publicăm un nou demo AI. Cel mult un email la câteva săptămâni.",
|
|
||||||
"subscribe.emailPlaceholder": "nume@companie.ro",
|
|
||||||
"subscribe.gdpr": "Sunt de acord să primesc ocazional emailuri despre noile demo-uri.",
|
|
||||||
"subscribe.submit": "Abonează-mă",
|
|
||||||
"subscribe.thanks": "Mulțumesc! Ești abonat.",
|
|
||||||
"subscribe.failed": "Nu am putut realiza abonarea acum. Te rugăm să încerci mai târziu.",
|
|
||||||
"subscribe.noConsent": "Te rugăm să confirmi întâi consimțământul.",
|
|
||||||
"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": "Îți citim CV-ul, găsim părțile cele mai relevante pentru job și calculăm un scor de potrivire cu puncte forte, lipsuri și pași următori sugerați.",
|
|
||||||
"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.",
|
|
||||||
"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 și 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 o variantă adaptată fluxului tău de lucru?",
|
|
||||||
"cv.contactText": "Lasă-ne un mesaj și revenim cu detalii.",
|
|
||||||
"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.",
|
|
||||||
"cv.cvFailed": "Extragerea CV-ului a eșuat",
|
|
||||||
"cv.matchFailed": "Potrivirea jobului a eșuat",
|
|
||||||
"cv.rateLimited": "Prea multe cereri către CV matcher din rețeaua ta. Te rugăm să încerci din nou peste câteva minute.",
|
|
||||||
"cv.completed": "Matching finalizat.",
|
|
||||||
"cv.backendMissing": "A apărut o eroare la procesarea CV-ului.",
|
|
||||||
"cv.loaderTitle": "Procesăm CV-ul tău",
|
|
||||||
"cv.loaderText": "Extragem textul, recuperăm contextul și calculăm scorul potrivirii. Poate dura câteva momente.",
|
|
||||||
"cv.noSummary": "Niciun sumar disponibil.",
|
|
||||||
"cv.noItems": "Niciun element.",
|
|
||||||
"cv.strengths": "Puncte forte",
|
|
||||||
"cv.gaps": "Lipsuri",
|
|
||||||
"cv.evidence": "Fragmente relevante din CV"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
TRANSLATION HELPERS
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current language preference from localStorage or browser detection.
|
||||||
|
* Defaults to English.
|
||||||
|
*/
|
||||||
function browserLang() {
|
function browserLang() {
|
||||||
return ((navigator.language || navigator.userLanguage || 'en').toLowerCase().indexOf('ro') === 0) ? 'ro' : 'en';
|
return ((navigator.language || navigator.userLanguage || 'en').toLowerCase().indexOf('ro') === 0) ? 'ro' : 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the active language (localStorage takes precedence).
|
||||||
|
*/
|
||||||
function currentLang() {
|
function currentLang() {
|
||||||
return localStorage.getItem(LANG_KEY) || browserLang();
|
return localStorage.getItem(LANG_KEY) || browserLang();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translate a key into the current language.
|
||||||
|
* Falls back to English if key not found in the current language.
|
||||||
|
*/
|
||||||
function t(key) {
|
function t(key) {
|
||||||
var lang = currentLang();
|
var lang = currentLang();
|
||||||
return (i18n[lang] && i18n[lang][key]) || i18n.en[key] || key;
|
return (window.MyAi.i18n[lang] && window.MyAi.i18n[lang][key]) ||
|
||||||
|
window.MyAi.i18n.en[key] || key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expose shared translation helpers for other scripts
|
||||||
|
window.MyAi.currentLang = currentLang;
|
||||||
|
window.MyAi.t = t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update all legal page links to point to the active language.
|
||||||
|
*/
|
||||||
function updateLegalLinks(lang) {
|
function updateLegalLinks(lang) {
|
||||||
$('[data-legal]').each(function () {
|
$('[data-legal]').each(function () {
|
||||||
var page = $(this).data('legal');
|
var page = $(this).data('legal');
|
||||||
@@ -247,6 +68,13 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply language across the entire page:
|
||||||
|
* - Update localStorage and <html lang> attribute
|
||||||
|
* - Translate all [data-i18n] and [data-i18n-placeholder] elements
|
||||||
|
* - Update legal page links
|
||||||
|
* - Update language button states
|
||||||
|
*/
|
||||||
function applyLanguage(lang) {
|
function applyLanguage(lang) {
|
||||||
localStorage.setItem(LANG_KEY, lang);
|
localStorage.setItem(LANG_KEY, lang);
|
||||||
document.documentElement.lang = lang;
|
document.documentElement.lang = lang;
|
||||||
@@ -261,173 +89,60 @@
|
|||||||
$('.lang-flag[data-lang="' + lang + '"]').attr('aria-pressed', 'true');
|
$('.lang-flag[data-lang="' + lang + '"]').attr('aria-pressed', 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
PAGE INITIALIZATION
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
// Set footer year
|
||||||
$('#year').text(new Date().getFullYear());
|
$('#year').text(new Date().getFullYear());
|
||||||
|
|
||||||
|
// Load and display app version
|
||||||
$.getJSON('/api/health/version').done(function (data) {
|
$.getJSON('/api/health/version').done(function (data) {
|
||||||
if (data && data.version) {
|
if (data && data.version) {
|
||||||
$('#app-version').text('v' + data.version);
|
$('#app-version').text('v' + data.version);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Initialize language
|
||||||
applyLanguage(currentLang());
|
applyLanguage(currentLang());
|
||||||
$('.lang-flag').on('click', function () {
|
$('.lang-flag').on('click', function () {
|
||||||
applyLanguage($(this).data('lang'));
|
applyLanguage($(this).data('lang'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
HEADER / NAVIGATION
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle mobile hamburger menu.
|
||||||
|
*/
|
||||||
$('#menuToggle').on('click', function () {
|
$('#menuToggle').on('click', function () {
|
||||||
var $nav = $('#mainNav');
|
var $nav = $('#mainNav');
|
||||||
var open = !$nav.hasClass('is-open');
|
var open = !$nav.hasClass('is-open');
|
||||||
$nav.toggleClass('is-open', open);
|
$nav.toggleClass('is-open', open);
|
||||||
$(this).attr('aria-expanded', open ? 'true' : 'false');
|
$(this).attr('aria-expanded', open ? 'true' : 'false');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close mobile menu when a nav link is clicked.
|
||||||
|
*/
|
||||||
$('.nav a').on('click', function () {
|
$('.nav a').on('click', function () {
|
||||||
$('#mainNav').removeClass('is-open');
|
$('#mainNav').removeClass('is-open');
|
||||||
$('#menuToggle').attr('aria-expanded', 'false');
|
$('#menuToggle').attr('aria-expanded', 'false');
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkApiLive() {
|
/* ============================================================
|
||||||
var $statusEl = $('#api-status');
|
SHARED FORM HELPERS
|
||||||
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/captcha').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/captcha');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getConsent() {
|
|
||||||
try {
|
|
||||||
return JSON.parse(localStorage.getItem(CONSENT_KEY));
|
|
||||||
} catch (e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function setConsent(consent) {
|
|
||||||
localStorage.setItem(CONSENT_KEY, JSON.stringify(consent));
|
|
||||||
}
|
|
||||||
|
|
||||||
function applyConsent(consent) {
|
|
||||||
if (consent && consent.analytics === true) loadGoogleTagManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showBanner() {
|
|
||||||
$('#cookieBanner').fadeIn(200);
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideBanner() {
|
|
||||||
$('#cookieBanner').fadeOut(200);
|
|
||||||
}
|
|
||||||
|
|
||||||
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();
|
|
||||||
});
|
|
||||||
|
|
||||||
function initConsent() {
|
|
||||||
var consent = getConsent();
|
|
||||||
if (!consent) showBanner();
|
|
||||||
else {
|
|
||||||
applyConsent(consent);
|
|
||||||
showManage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts a user-facing error message from a failed API response body.
|
* Display a field error and mark its container with is-invalid class.
|
||||||
* For 4xx responses the server's error field is shown directly (it is intentional user feedback).
|
* @param {string} errorId - ID of the error element
|
||||||
* For 5xx or missing body a generic i18n fallback is returned instead.
|
* @param {string} msg - Error message to display (or empty to clear)
|
||||||
* @param {object|null} body Parsed JSON response body, or null if unparseable.
|
|
||||||
* @param {number} status HTTP status code.
|
|
||||||
* @param {string} fallbackKey i18n key to use for 5xx / unknown errors.
|
|
||||||
* @param {string} [rateLimitKey] i18n key for 429 responses; defaults to 'form.rateLimited'.
|
|
||||||
*/
|
*/
|
||||||
function extractApiError(body, status, fallbackKey, rateLimitKey) {
|
|
||||||
if (status === 429) return t(rateLimitKey || 'form.rateLimited');
|
|
||||||
var msg = body && (body.error || body.Error || body.title);
|
|
||||||
return (status >= 400 && status < 500 && msg) ? msg : t(fallbackKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
function submitMSG(valid, msg, severity) {
|
|
||||||
var tone = valid ? 'text-success' : ('text-' + (severity || 'danger'));
|
|
||||||
$('#msgSubmit').removeClass().addClass('form-message ' + tone).text(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
function showFieldError(errorId, msg) {
|
function showFieldError(errorId, msg) {
|
||||||
var $el = $('#' + errorId);
|
var $el = $('#' + errorId);
|
||||||
$el.text(msg || '');
|
$el.text(msg || '');
|
||||||
// Look first at the parent (for errors nested inside a label),
|
|
||||||
// then at the previous sibling block (for errors after consent/file-drop/subscribe-row).
|
|
||||||
var $parent = $el.parent();
|
var $parent = $el.parent();
|
||||||
var $container = $parent.is('label, .consent-inline') ? $parent : $el.prev();
|
var $container = $parent.is('label, .consent-inline') ? $parent : $el.prev();
|
||||||
if (!$container.length || !$container.is('label, .consent-inline, .file-drop, .subscribe-row')) {
|
if (!$container.length || !$container.is('label, .consent-inline, .file-drop, .subscribe-row')) {
|
||||||
@@ -436,25 +151,80 @@
|
|||||||
$container.toggleClass('is-invalid', !!msg);
|
$container.toggleClass('is-invalid', !!msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear multiple field errors at once.
|
||||||
|
* @param {string[]} errorIds - Array of error element IDs
|
||||||
|
*/
|
||||||
function clearFieldErrors(errorIds) {
|
function clearFieldErrors(errorIds) {
|
||||||
for (var i = 0; i < errorIds.length; i++) showFieldError(errorIds[i], '');
|
for (var i = 0; i < errorIds.length; i++) showFieldError(errorIds[i], '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate email format with simple regex.
|
||||||
|
* @param {string} value - Email address to validate
|
||||||
|
* @returns {boolean} - True if email format is valid
|
||||||
|
*/
|
||||||
function isValidEmail(value) {
|
function isValidEmail(value) {
|
||||||
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value || '').trim());
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value || '').trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract a user-facing error message from a failed API response.
|
||||||
|
* For 4xx responses, the server's error field is shown (intentional feedback).
|
||||||
|
* For 5xx or missing body, a generic i18n fallback is returned.
|
||||||
|
* @param {object|null} body - Parsed JSON response body
|
||||||
|
* @param {number} status - HTTP status code
|
||||||
|
* @param {string} fallbackKey - i18n key for 5xx/unknown errors
|
||||||
|
* @param {string} [rateLimitKey] - i18n key for 429 responses
|
||||||
|
* @returns {string} - User-facing error message
|
||||||
|
*/
|
||||||
|
function extractApiError(body, status, fallbackKey, rateLimitKey) {
|
||||||
|
if (status === 429) return t(rateLimitKey || 'form.rateLimited');
|
||||||
|
var msg = body && (body.error || body.Error || body.title);
|
||||||
|
return (status >= 400 && status < 500 && msg) ? msg : t(fallbackKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Expose shared helpers for other scripts
|
||||||
|
window.MyAi.showFieldError = showFieldError;
|
||||||
|
window.MyAi.clearFieldErrors = clearFieldErrors;
|
||||||
|
window.MyAi.isValidEmail = isValidEmail;
|
||||||
|
window.MyAi.extractApiError = extractApiError;
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
CONTACT FORM
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display success message and reset form.
|
||||||
|
*/
|
||||||
function formSuccess() {
|
function formSuccess() {
|
||||||
$('#contactForm')[0].reset();
|
$('#contactForm')[0].reset();
|
||||||
submitMSG(true, t('form.thanks'));
|
submitMSG(true, t('form.thanks'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play shake animation on form error.
|
||||||
|
*/
|
||||||
function formError() {
|
function formError() {
|
||||||
$('#contactForm').removeClass().addClass('contact-form shake').one('animationend', function () {
|
$('#contactForm').removeClass().addClass('contact-form shake').one('animationend', function () {
|
||||||
$(this).removeClass('shake');
|
$(this).removeClass('shake');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update form message element with success/error state and message.
|
||||||
|
* @param {boolean} valid - True for success state, false for error
|
||||||
|
* @param {string} msg - Message to display
|
||||||
|
* @param {string} [severity] - CSS class suffix for color ('danger', 'warning', etc.)
|
||||||
|
*/
|
||||||
|
function submitMSG(valid, msg, severity) {
|
||||||
|
var tone = valid ? 'text-success' : ('text-' + (severity || 'danger'));
|
||||||
|
$('#msgSubmit').removeClass().addClass('form-message ' + tone).text(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle contact form submission.
|
||||||
|
*/
|
||||||
$('#contactForm').on('submit', function (event) {
|
$('#contactForm').on('submit', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var loader = $('#contactLoader'),
|
var loader = $('#contactLoader'),
|
||||||
@@ -466,6 +236,7 @@
|
|||||||
clearFieldErrors(['nameError', 'emailError', 'messageError']);
|
clearFieldErrors(['nameError', 'emailError', 'messageError']);
|
||||||
$('#msgSubmit').removeClass().addClass('form-message').text('');
|
$('#msgSubmit').removeClass().addClass('form-message').text('');
|
||||||
|
|
||||||
|
// Validate inputs
|
||||||
var hasError = false;
|
var hasError = false;
|
||||||
if (!name) { showFieldError('nameError', t('form.required.name')); hasError = true; }
|
if (!name) { showFieldError('nameError', t('form.required.name')); hasError = true; }
|
||||||
if (!email) { showFieldError('emailError', t('form.required.email')); hasError = true; }
|
if (!email) { showFieldError('emailError', t('form.required.email')); hasError = true; }
|
||||||
@@ -473,9 +244,12 @@
|
|||||||
if (!message) { showFieldError('messageError', t('form.required.message')); hasError = true; }
|
if (!message) { showFieldError('messageError', t('form.required.message')); hasError = true; }
|
||||||
if (hasError) return;
|
if (hasError) return;
|
||||||
|
|
||||||
loader.css('display', 'flex');
|
loader.addClass('loader-visible');
|
||||||
button.prop('disabled', true);
|
button.prop('disabled', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post contact form with captcha token.
|
||||||
|
*/
|
||||||
function postContact(token) {
|
function postContact(token) {
|
||||||
var payload = {
|
var payload = {
|
||||||
Name: name,
|
Name: name,
|
||||||
@@ -497,134 +271,30 @@
|
|||||||
submitMSG(false, extractApiError(jqXHR.responseJSON, jqXHR.status, 'form.failed'), jqXHR.status === 429 ? 'warning' : 'danger');
|
submitMSG(false, extractApiError(jqXHR.responseJSON, jqXHR.status, 'form.failed'), jqXHR.status === 429 ? 'warning' : 'danger');
|
||||||
formError();
|
formError();
|
||||||
}).always(function () {
|
}).always(function () {
|
||||||
loader.hide();
|
loader.removeClass('loader-visible');
|
||||||
button.prop('disabled', false);
|
button.prop('disabled', false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.grecaptcha && reCaptchaSiteKey) {
|
if (window.grecaptcha && reCaptchaSiteKey) {
|
||||||
grecaptcha.ready(function () {
|
grecaptcha.ready(function () {
|
||||||
grecaptcha.execute(reCaptchaSiteKey, {
|
grecaptcha.execute(reCaptchaSiteKey, { action: 'contact' }).then(postContact);
|
||||||
action: 'contact'
|
|
||||||
}).then(postContact);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Captcha unavailable: show clear error and restore UI
|
|
||||||
submitMSG(false, t('form.captchaFailed'));
|
submitMSG(false, t('form.captchaFailed'));
|
||||||
formError();
|
formError();
|
||||||
loader.hide();
|
loader.removeClass('loader-visible');
|
||||||
button.prop('disabled', false);
|
button.prop('disabled', false);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#cvFile').on('change', function () {
|
/* ============================================================
|
||||||
var file = this.files && this.files[0];
|
SUBSCRIBE FORM
|
||||||
$('#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 matchEmail = $('#matchEmail').val();
|
|
||||||
var consent = $('#gdprConsent').is(':checked');
|
|
||||||
var $msg = $('#matcherMsg'),
|
|
||||||
$button = $('#matchSubmit'),
|
|
||||||
$result = $('#matchResult');
|
|
||||||
|
|
||||||
clearFieldErrors(['cvFileError', 'cvJobError', 'cvConsentError']);
|
|
||||||
$msg.removeClass().addClass('form-message').text('');
|
|
||||||
|
|
||||||
var hasError = false;
|
|
||||||
if (!file) { showFieldError('cvFileError', t('cv.noFile')); hasError = true; }
|
|
||||||
if (!jobUrl && !jobDescription) { showFieldError('cvJobError', t('cv.noJob')); hasError = true; }
|
|
||||||
if (!consent) { showFieldError('cvConsentError', t('cv.noConsent')); hasError = true; }
|
|
||||||
if (hasError) return;
|
|
||||||
var $cvLoader = $('#cvLoader');
|
|
||||||
$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>');
|
|
||||||
$cvLoader.css('display', 'flex');
|
|
||||||
|
|
||||||
if (window.grecaptcha && reCaptchaSiteKey) {
|
|
||||||
grecaptcha.ready(function () {
|
|
||||||
grecaptcha.execute(reCaptchaSiteKey, {
|
|
||||||
action: 'cv_upload'
|
|
||||||
}).then(postCv);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$cvLoader.hide();
|
|
||||||
$msg.removeClass().addClass('form-message text-danger').text(t('form.captchaFailed'));
|
|
||||||
$button.prop('disabled', false).text(t('cv.submit'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
async function postCv(token) {
|
|
||||||
try {
|
|
||||||
var formData = new FormData();
|
|
||||||
formData.append('file', file);
|
|
||||||
formData.append('gdprConsent', String(consent));
|
|
||||||
formData.append('captchaToken', token || '');
|
|
||||||
var cvResponse = await fetch('/api/cv-matcher/upload', {
|
|
||||||
method: 'POST',
|
|
||||||
body: formData
|
|
||||||
});
|
|
||||||
if (!cvResponse.ok) {
|
|
||||||
var cvErrBody = null;
|
|
||||||
try { cvErrBody = await cvResponse.json(); } catch (_) {}
|
|
||||||
throw new Error(extractApiError(cvErrBody, cvResponse.status, 'cv.cvFailed', 'cv.rateLimited'));
|
|
||||||
}
|
|
||||||
var cvData = await cvResponse.json();
|
|
||||||
// Before calling match, obtain a fresh captcha token for the match action
|
|
||||||
if (!(window.grecaptcha && reCaptchaSiteKey)) {
|
|
||||||
throw new Error(t('form.captchaFailed'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// get match token
|
|
||||||
var matchToken = await new Promise(function (resolve, reject) {
|
|
||||||
try {
|
|
||||||
grecaptcha.ready(function () {
|
|
||||||
grecaptcha.execute(reCaptchaSiteKey, { action: 'match_job' }).then(resolve).catch(reject);
|
|
||||||
});
|
|
||||||
} catch (e) { reject(e); }
|
|
||||||
});
|
|
||||||
|
|
||||||
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,
|
|
||||||
email: matchEmail,
|
|
||||||
gdprConsent: consent,
|
|
||||||
captchaToken: matchToken,
|
|
||||||
language: currentLang()
|
|
||||||
})
|
|
||||||
});
|
|
||||||
if (!matchResponse.ok) {
|
|
||||||
var matchErrBody = null;
|
|
||||||
try { matchErrBody = await matchResponse.json(); } catch (_) {}
|
|
||||||
throw new Error(extractApiError(matchErrBody, matchResponse.status, 'cv.matchFailed', 'cv.rateLimited'));
|
|
||||||
}
|
|
||||||
var match = await matchResponse.json();
|
|
||||||
renderMatchResult(match);
|
|
||||||
$msg.removeClass().addClass('form-message text-success').text(t('cv.completed'));
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
var isRateLimited = err && err.message === t('cv.rateLimited');
|
|
||||||
var tone = isRateLimited ? 'text-warning' : 'text-danger';
|
|
||||||
$msg.removeClass().addClass('form-message ' + tone).text(err.message || t('cv.matchFailed'));
|
|
||||||
$result.html('<div class="empty-result">' + escapeHtml(isRateLimited ? t('cv.rateLimited') : t('cv.backendMissing')) + '</div>');
|
|
||||||
} finally {
|
|
||||||
$cvLoader.hide();
|
|
||||||
$button.prop('disabled', false).text(t('cv.submit'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle subscribe form submission.
|
||||||
|
*/
|
||||||
$('#subscribeForm').on('submit', function (event) {
|
$('#subscribeForm').on('submit', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var $msg = $('#subscribeMsg');
|
var $msg = $('#subscribeMsg');
|
||||||
@@ -633,6 +303,9 @@
|
|||||||
var email = $('#subscribeEmail').val().trim();
|
var email = $('#subscribeEmail').val().trim();
|
||||||
var consent = $('#subscribeConsent').is(':checked');
|
var consent = $('#subscribeConsent').is(':checked');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update subscribe form message.
|
||||||
|
*/
|
||||||
function setMsg(severity, key) {
|
function setMsg(severity, key) {
|
||||||
$msg.removeClass().addClass('form-message text-' + severity).text(t(key));
|
$msg.removeClass().addClass('form-message text-' + severity).text(t(key));
|
||||||
}
|
}
|
||||||
@@ -640,6 +313,7 @@
|
|||||||
clearFieldErrors(['subscribeEmailError', 'subscribeConsentError']);
|
clearFieldErrors(['subscribeEmailError', 'subscribeConsentError']);
|
||||||
$msg.removeClass().addClass('form-message').text('');
|
$msg.removeClass().addClass('form-message').text('');
|
||||||
|
|
||||||
|
// Validate inputs
|
||||||
var hasError = false;
|
var hasError = false;
|
||||||
if (!email) {
|
if (!email) {
|
||||||
showFieldError('subscribeEmailError', t('form.required.email'));
|
showFieldError('subscribeEmailError', t('form.required.email'));
|
||||||
@@ -654,9 +328,12 @@
|
|||||||
}
|
}
|
||||||
if (hasError) return;
|
if (hasError) return;
|
||||||
|
|
||||||
$loader.css('display', 'flex');
|
$loader.addClass('loader-visible');
|
||||||
$button.prop('disabled', true);
|
$button.prop('disabled', true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Post subscribe with captcha token.
|
||||||
|
*/
|
||||||
function postSubscribe(token) {
|
function postSubscribe(token) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -675,7 +352,7 @@
|
|||||||
$msg.removeClass().addClass('form-message text-' + (jqXHR.status === 429 ? 'warning' : 'danger'))
|
$msg.removeClass().addClass('form-message text-' + (jqXHR.status === 429 ? 'warning' : 'danger'))
|
||||||
.text(extractApiError(jqXHR.responseJSON, jqXHR.status, 'subscribe.failed'));
|
.text(extractApiError(jqXHR.responseJSON, jqXHR.status, 'subscribe.failed'));
|
||||||
}).always(function () {
|
}).always(function () {
|
||||||
$loader.hide();
|
$loader.removeClass('loader-visible');
|
||||||
$button.prop('disabled', false);
|
$button.prop('disabled', false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -685,41 +362,182 @@
|
|||||||
grecaptcha.execute(reCaptchaSiteKey, { action: 'subscribe' }).then(postSubscribe);
|
grecaptcha.execute(reCaptchaSiteKey, { action: 'subscribe' }).then(postSubscribe);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$loader.hide();
|
$loader.removeClass('loader-visible');
|
||||||
$button.prop('disabled', false);
|
$button.prop('disabled', false);
|
||||||
setMsg('danger', 'form.captchaFailed');
|
setMsg('danger', 'form.captchaFailed');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function renderMatchResult(match) {
|
/* ============================================================
|
||||||
var score = match.score || match.matchScore || 0;
|
COOKIE CONSENT
|
||||||
var summary = match.summary || t('cv.noSummary');
|
============================================================ */
|
||||||
var strengths = match.strengths || [];
|
|
||||||
var gaps = match.gaps || match.missingSkills || [];
|
|
||||||
var evidence = match.evidence || match.retrievedChunks || [];
|
|
||||||
|
|
||||||
function list(items) {
|
/**
|
||||||
if (!items || !items.length) return '<p class="empty-result">' + escapeHtml(t('cv.noItems')) + '</p>';
|
* Parse consent object from localStorage.
|
||||||
return '<ul class="result-list">' + items.map(function (x) {
|
* @returns {object|null} - Parsed consent object or null if not found
|
||||||
var text = typeof x === 'string' ? x : (x.text || x.title || JSON.stringify(x));
|
*/
|
||||||
return '<li>' + escapeHtml(text) + '</li>';
|
function getConsent() {
|
||||||
}).join('') + '</ul>';
|
try {
|
||||||
|
return JSON.parse(localStorage.getItem(CONSENT_KEY));
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
$('#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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function escapeHtml(value) {
|
/**
|
||||||
return String(value).replace(/[&<>'"]/g, function (char) {
|
* Persist consent object to localStorage.
|
||||||
return ({
|
*/
|
||||||
'&': '&',
|
function setConsent(consent) {
|
||||||
'<': '<',
|
localStorage.setItem(CONSENT_KEY, JSON.stringify(consent));
|
||||||
'>': '>',
|
}
|
||||||
"'": ''',
|
|
||||||
'"': '"'
|
/**
|
||||||
})[char];
|
* Apply stored consent preferences (e.g., load Google Tag Manager).
|
||||||
|
*/
|
||||||
|
function applyConsent(consent) {
|
||||||
|
if (consent && consent.analytics === true) loadGoogleTagManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show cookie banner.
|
||||||
|
*/
|
||||||
|
function showBanner() {
|
||||||
|
$('#cookieBanner').fadeIn(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide cookie banner.
|
||||||
|
*/
|
||||||
|
function hideBanner() {
|
||||||
|
$('#cookieBanner').fadeOut(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show "manage cookies" button.
|
||||||
|
*/
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize consent banner based on stored preferences.
|
||||||
|
*/
|
||||||
|
function initConsent() {
|
||||||
|
var consent = getConsent();
|
||||||
|
if (!consent) showBanner();
|
||||||
|
else {
|
||||||
|
applyConsent(consent);
|
||||||
|
showManage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
API & CONFIGURATION LOADING
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check API /health/live endpoint and update status indicator.
|
||||||
|
*/
|
||||||
|
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load reCaptcha public site key from API.
|
||||||
|
*/
|
||||||
|
function getRecaptchaWebKey() {
|
||||||
|
return $.get('/api/captcha').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/captcha');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Google Tag Manager ID from API.
|
||||||
|
*/
|
||||||
|
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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Google Tag Manager script if consent given and not already loaded.
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
STARTUP
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
$(window).on('load', function () {
|
$(window).on('load', function () {
|
||||||
$.when(checkApiLive(), getRecaptchaWebKey(), getGoogleTagManagerId()).always(initConsent);
|
$.when(checkApiLive(), getRecaptchaWebKey(), getGoogleTagManagerId()).always(initConsent);
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
})(jQuery);
|
||||||
|
|||||||
@@ -9,24 +9,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="topbar">
|
|
||||||
<a class="brand" href="/" aria-label="Back">
|
|
||||||
<span class="brand-mark">
|
|
||||||
<img src="/img/myai-logo.svg" alt="MyAi.ro">
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
<span class="brand-text">Back</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="switcher">
|
|
||||||
<a href="cookies-ro.html" class="lang-link " data-lang="ro" aria-label="Română">
|
|
||||||
<img src="img/flags/ro.svg" alt="Română">
|
|
||||||
</a>
|
|
||||||
<a href="cookies-en.html" class="lang-link active" data-lang="en" aria-label="English">
|
|
||||||
<img src="img/flags/en.svg" alt="English">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="kicker">Cookies</div>
|
<div class="kicker">Cookies</div>
|
||||||
@@ -71,16 +53,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<small>©2026 myAi. All rights reserved.</small>
|
|
||||||
<div class="footer-links">
|
|
||||||
<a href="terms-en.html">Terms and Conditions</a>
|
|
||||||
<a href="privacy-en.html">Privacy Policy</a>
|
|
||||||
<a href="cookies-en.html">Cookies Policy</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="js/legal.js"></script>
|
<script src="js/legal.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -9,24 +9,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="topbar">
|
|
||||||
<a class="brand" href="/" aria-label="Înapoi">
|
|
||||||
<span class="brand-mark">
|
|
||||||
<img src="/img/myai-logo.svg" alt="MyAi.ro">
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
<span class="brand-text">Înapoi</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="switcher">
|
|
||||||
<a href="cookies-ro.html" class="lang-link active" data-lang="ro" aria-label="Română">
|
|
||||||
<img src="img/flags/ro.svg" alt="Română">
|
|
||||||
</a>
|
|
||||||
<a href="cookies-en.html" class="lang-link " data-lang="en" aria-label="English">
|
|
||||||
<img src="img/flags/en.svg" alt="English">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="kicker">Cookies</div>
|
<div class="kicker">Cookies</div>
|
||||||
@@ -71,16 +53,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<small>©2026 myAi. Toate drepturile sunt rezervate.</small>
|
|
||||||
<div class="footer-links">
|
|
||||||
<a href="terms-ro.html">Termeni și condiții</a>
|
|
||||||
<a href="privacy-ro.html">Politica de confidențialitate</a>
|
|
||||||
<a href="cookies-ro.html">Politica de COOKIES</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="js/legal.js"></script>
|
<script src="js/legal.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
+132
-21
@@ -1,23 +1,134 @@
|
|||||||
|
/**
|
||||||
|
* Legal Pages Helper
|
||||||
|
*
|
||||||
|
* Dynamically injects a common header (topbar) and language-aware footer
|
||||||
|
* into all 6 legal pages to eliminate HTML duplication.
|
||||||
|
*
|
||||||
|
* Footer content depends on page language (EN vs RO).
|
||||||
|
* Language links use event delegation so they work on injected elements.
|
||||||
|
*/
|
||||||
(function(){
|
(function(){
|
||||||
function browserLang(){
|
"use strict";
|
||||||
var lang = (navigator.language || navigator.userLanguage || 'en').toLowerCase();
|
|
||||||
return lang.indexOf('ro') === 0 ? 'ro' : 'en';
|
var LANG_KEY = "legalLang";
|
||||||
}
|
|
||||||
function targetPage(current, lang){
|
/**
|
||||||
if(current.indexOf('-ro.html') !== -1) return current.replace('-ro.html', '-' + lang + '.html');
|
* Detect browser language preference (EN or RO).
|
||||||
if(current.indexOf('-en.html') !== -1) return current.replace('-en.html', '-' + lang + '.html');
|
*/
|
||||||
return current;
|
function browserLang(){
|
||||||
}
|
var lang = (navigator.language || navigator.userLanguage || 'en').toLowerCase();
|
||||||
var links = document.querySelectorAll('.lang-link');
|
return lang.indexOf('ro') === 0 ? 'ro' : 'en';
|
||||||
for(var i=0;i<links.length;i++){
|
}
|
||||||
links[i].addEventListener('click', function(e){
|
|
||||||
e.preventDefault();
|
/**
|
||||||
localStorage.setItem('legalLang', this.getAttribute('data-lang'));
|
* Get stored language preference, fall back to browser detection.
|
||||||
window.location.href = targetPage(window.location.pathname, this.getAttribute('data-lang'));
|
*/
|
||||||
});
|
function getLang(){
|
||||||
}
|
return localStorage.getItem(LANG_KEY) || browserLang();
|
||||||
if(!localStorage.getItem('legalLang')){
|
}
|
||||||
localStorage.setItem('legalLang', browserLang());
|
|
||||||
}
|
/**
|
||||||
|
* Build URL to alternate language page.
|
||||||
|
* Supports both -en.html and -ro.html naming patterns.
|
||||||
|
*/
|
||||||
|
function targetPage(current, lang){
|
||||||
|
if(current.indexOf('-ro.html') !== -1) return current.replace('-ro.html', '-' + lang + '.html');
|
||||||
|
if(current.indexOf('-en.html') !== -1) return current.replace('-en.html', '-' + lang + '.html');
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current page base name (terms, privacy, cookies).
|
||||||
|
*/
|
||||||
|
function basePage(){
|
||||||
|
var path = window.location.pathname;
|
||||||
|
if(path.indexOf('terms') !== -1) return 'terms';
|
||||||
|
if(path.indexOf('privacy') !== -1) return 'privacy';
|
||||||
|
if(path.indexOf('cookies') !== -1) return 'cookies';
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detect page language (EN or RO).
|
||||||
|
*/
|
||||||
|
function pageLang(){
|
||||||
|
return window.location.pathname.indexOf('-ro.html') !== -1 ? 'ro' : 'en';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inject topbar with logo and language switcher.
|
||||||
|
*/
|
||||||
|
function injectTopbar(){
|
||||||
|
var base = basePage();
|
||||||
|
var lang = pageLang();
|
||||||
|
var html = '<div class="topbar">' +
|
||||||
|
'<a class="brand" href="/" aria-label="' + (lang === 'ro' ? 'Înapoi' : 'Back') + '">' +
|
||||||
|
'<span class="brand-mark"><img src="/img/myai-logo.svg" alt="MyAi.ro"></span>' +
|
||||||
|
'<span><span class="brand-text">' + (lang === 'ro' ? 'Înapoi' : 'Back') + '</span></span>' +
|
||||||
|
'</a>' +
|
||||||
|
'<div class="switcher">' +
|
||||||
|
'<a href="' + base + '-ro.html" class="lang-link ' + (lang === 'ro' ? 'active' : '') + '" data-lang="ro" aria-label="Română">' +
|
||||||
|
'<img src="/img/flags/ro.svg" alt="Română">' +
|
||||||
|
'</a>' +
|
||||||
|
'<a href="' + base + '-en.html" class="lang-link ' + (lang === 'en' ? 'active' : '') + '" data-lang="en" aria-label="English">' +
|
||||||
|
'<img src="/img/flags/en.svg" alt="English">' +
|
||||||
|
'</a>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>';
|
||||||
|
$('.wrap').prepend(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inject language-aware footer.
|
||||||
|
* EN: "©2026 myAi. All rights reserved."
|
||||||
|
* RO: "©2026 myAi. Toate drepturile sunt rezervate."
|
||||||
|
*/
|
||||||
|
function injectFooter(){
|
||||||
|
var lang = pageLang();
|
||||||
|
var base = basePage();
|
||||||
|
var copyrightText = lang === 'ro' ? '©2026 myAi. Toate drepturile sunt rezervate.' : '©2026 myAi. All rights reserved.';
|
||||||
|
var linksHtml = '';
|
||||||
|
if(lang === 'ro'){
|
||||||
|
linksHtml = '<a href="terms-ro.html">Termeni și condiții</a>' +
|
||||||
|
'<a href="privacy-ro.html">Politica de confidențialitate</a>' +
|
||||||
|
'<a href="cookies-ro.html">Politica de COOKIES</a>';
|
||||||
|
} else {
|
||||||
|
linksHtml = '<a href="terms-en.html">Terms and Conditions</a>' +
|
||||||
|
'<a href="privacy-en.html">Privacy Policy</a>' +
|
||||||
|
'<a href="cookies-en.html">Cookies Policy</a>';
|
||||||
|
}
|
||||||
|
var html = '<div class="footer">' +
|
||||||
|
'<small>' + copyrightText + '</small>' +
|
||||||
|
'<div class="footer-links">' + linksHtml + '</div>' +
|
||||||
|
'</div>';
|
||||||
|
$('.wrap').append(html);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize language persistence and topbar injection.
|
||||||
|
*/
|
||||||
|
function init(){
|
||||||
|
localStorage.setItem(LANG_KEY, pageLang());
|
||||||
|
injectTopbar();
|
||||||
|
injectFooter();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle language link clicks with event delegation.
|
||||||
|
* Works on both static and injected links.
|
||||||
|
*/
|
||||||
|
document.addEventListener('click', function(e){
|
||||||
|
var link = e.target.closest('.lang-link');
|
||||||
|
if(!link) return;
|
||||||
|
e.preventDefault();
|
||||||
|
localStorage.setItem(LANG_KEY, link.getAttribute('data-lang'));
|
||||||
|
window.location.href = targetPage(window.location.pathname, link.getAttribute('data-lang'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Run on page load
|
||||||
|
if(document.readyState === 'loading'){
|
||||||
|
document.addEventListener('DOMContentLoaded', init);
|
||||||
|
} else {
|
||||||
|
init();
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -9,24 +9,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="topbar">
|
|
||||||
<a class="brand" href="/" aria-label="Back">
|
|
||||||
<span class="brand-mark">
|
|
||||||
<img src="/img/myai-logo.svg" alt="MyAi.ro">
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
<span class="brand-text">Back</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="switcher">
|
|
||||||
<a href="privacy-ro.html" class="lang-link " data-lang="ro" aria-label="Română">
|
|
||||||
<img src="img/flags/ro.svg" alt="Română">
|
|
||||||
</a>
|
|
||||||
<a href="privacy-en.html" class="lang-link active" data-lang="en" aria-label="English">
|
|
||||||
<img src="img/flags/en.svg" alt="English">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="kicker">Data protection</div>
|
<div class="kicker">Data protection</div>
|
||||||
@@ -109,16 +91,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<small>©2026 myAi. All rights reserved.</small>
|
|
||||||
<div class="footer-links">
|
|
||||||
<a href="terms-en.html">Terms and Conditions</a>
|
|
||||||
<a href="privacy-en.html">Privacy Policy</a>
|
|
||||||
<a href="cookies-en.html">Cookies Policy</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="js/legal.js"></script>
|
<script src="js/legal.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -9,24 +9,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="topbar">
|
|
||||||
<a class="brand" href="/" aria-label="Înapoi">
|
|
||||||
<span class="brand-mark">
|
|
||||||
<img src="/img/myai-logo.svg" alt="MyAi.ro">
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
<span class="brand-text">Înapoi</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="switcher">
|
|
||||||
<a href="privacy-ro.html" class="lang-link active" data-lang="ro" aria-label="Română">
|
|
||||||
<img src="img/flags/ro.svg" alt="Română">
|
|
||||||
</a>
|
|
||||||
<a href="privacy-en.html" class="lang-link " data-lang="en" aria-label="English">
|
|
||||||
<img src="img/flags/en.svg" alt="English">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="kicker">Protecția datelor</div>
|
<div class="kicker">Protecția datelor</div>
|
||||||
@@ -109,16 +91,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<small>©2026 myAi. Toate drepturile sunt rezervate.</small>
|
|
||||||
<div class="footer-links">
|
|
||||||
<a href="terms-ro.html">Termeni și condiții</a>
|
|
||||||
<a href="privacy-ro.html">Politica de confidențialitate</a>
|
|
||||||
<a href="cookies-ro.html">Politica de COOKIES</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="js/legal.js"></script>
|
<script src="js/legal.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -9,24 +9,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="topbar">
|
|
||||||
<a class="brand" href="/" aria-label="Back">
|
|
||||||
<span class="brand-mark">
|
|
||||||
<img src="/img/myai-logo.svg" alt="MyAi.ro">
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
<span class="brand-text">Back</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="switcher">
|
|
||||||
<a href="terms-ro.html" class="lang-link " data-lang="ro" aria-label="Română">
|
|
||||||
<img src="img/flags/ro.svg" alt="Română">
|
|
||||||
</a>
|
|
||||||
<a href="terms-en.html" class="lang-link active" data-lang="en" aria-label="English">
|
|
||||||
<img src="img/flags/en.svg" alt="English">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="kicker">Terms of use</div>
|
<div class="kicker">Terms of use</div>
|
||||||
@@ -69,16 +51,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<small>©2026 myAi. All rights reserved.</small>
|
|
||||||
<div class="footer-links">
|
|
||||||
<a href="terms-en.html">Terms and Conditions</a>
|
|
||||||
<a href="privacy-en.html">Privacy Policy</a>
|
|
||||||
<a href="cookies-en.html">Cookies Policy</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="js/legal.js"></script>
|
<script src="js/legal.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -9,24 +9,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="topbar">
|
|
||||||
<a class="brand" href="/" aria-label="Înapoi">
|
|
||||||
<span class="brand-mark">
|
|
||||||
<img src="/img/myai-logo.svg" alt="MyAi.ro">
|
|
||||||
</span>
|
|
||||||
<span>
|
|
||||||
<span class="brand-text">Înapoi</span>
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<div class="switcher">
|
|
||||||
<a href="terms-ro.html" class="lang-link active" data-lang="ro" aria-label="Română">
|
|
||||||
<img src="img/flags/ro.svg" alt="Română">
|
|
||||||
</a>
|
|
||||||
<a href="terms-en.html" class="lang-link " data-lang="en" aria-label="English">
|
|
||||||
<img src="img/flags/en.svg" alt="English">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<div class="kicker">Condiții de utilizare</div>
|
<div class="kicker">Condiții de utilizare</div>
|
||||||
@@ -69,16 +51,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<small>©2026 myAi. Toate drepturile sunt rezervate.</small>
|
|
||||||
<div class="footer-links">
|
|
||||||
<a href="terms-ro.html">Termeni și condiții</a>
|
|
||||||
<a href="privacy-ro.html">Politica de confidențialitate</a>
|
|
||||||
<a href="cookies-ro.html">Politica de COOKIES</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script src="js/legal.js"></script>
|
<script src="js/legal.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,784 +0,0 @@
|
|||||||
:root {
|
|
||||||
--bg: #041120;
|
|
||||||
--bg-soft: #0a1c34;
|
|
||||||
--panel: rgba(10, 22, 42, 0.82);
|
|
||||||
--panel-border: rgba(255, 255, 255, 0.1);
|
|
||||||
--text: #eaf1ff;
|
|
||||||
--muted: #9bb0d0;
|
|
||||||
--primary: #5fa0ff;
|
|
||||||
--primary-strong: #8b6cff;
|
|
||||||
--card-radius: 28px;
|
|
||||||
--shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
scroll-behavior: smooth;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: 'Inter', sans-serif;
|
|
||||||
background: radial-gradient(circle at top left, #12345d 0%, #071326 35%, #030915 100%);
|
|
||||||
color: var(--text);
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 1120px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.site-shell {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sr-only {
|
|
||||||
position: absolute;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
padding: 0;
|
|
||||||
margin: -1px;
|
|
||||||
overflow: hidden;
|
|
||||||
clip: rect(0, 0, 0, 0);
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 20;
|
|
||||||
background: rgba(3, 11, 23, 0.76);
|
|
||||||
backdrop-filter: blur(16px);
|
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-wrap {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 20px;
|
|
||||||
min-height: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand-mark {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand-mark img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand-text {
|
|
||||||
display: block;
|
|
||||||
font-size: 1.7rem;
|
|
||||||
font-weight: 800;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand small {
|
|
||||||
display: block;
|
|
||||||
color: var(--muted);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav a {
|
|
||||||
color: #d7e3fb;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav a:hover {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-actions {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-switch {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
padding: 6px;
|
|
||||||
border-radius: 18px;
|
|
||||||
background: rgba(255, 255, 255, 0.04);
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag {
|
|
||||||
width: 48px;
|
|
||||||
height: 34px;
|
|
||||||
padding: 3px;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
border-radius: 12px;
|
|
||||||
background: transparent;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
|
|
||||||
opacity: 0.82;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: block;
|
|
||||||
border-radius: 8px;
|
|
||||||
object-fit: cover;
|
|
||||||
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag:hover {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.lang-flag[aria-pressed="true"] {
|
|
||||||
opacity: 1;
|
|
||||||
border-color: rgba(95, 160, 255, 0.65);
|
|
||||||
background: rgba(95, 160, 255, 0.08);
|
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(95, 160, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-toggle {
|
|
||||||
display: none;
|
|
||||||
background: transparent;
|
|
||||||
border: 0;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-toggle span {
|
|
||||||
display: block;
|
|
||||||
width: 24px;
|
|
||||||
height: 2px;
|
|
||||||
background: #ffffff;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero {
|
|
||||||
padding: 72px 0 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1.05fr 0.95fr;
|
|
||||||
gap: 42px;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.eyebrow {
|
|
||||||
display: inline-flex;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
||||||
background: rgba(255, 255, 255, 0.04);
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 8px 14px;
|
|
||||||
color: #bfd1f0;
|
|
||||||
font-size: 0.92rem;
|
|
||||||
margin-bottom: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero h1 {
|
|
||||||
font-size: clamp(2.8rem, 6vw, 5.8rem);
|
|
||||||
line-height: 0.95;
|
|
||||||
margin: 0 0 20px;
|
|
||||||
letter-spacing: -0.06em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-text {
|
|
||||||
font-size: 1.14rem;
|
|
||||||
line-height: 1.7;
|
|
||||||
color: var(--muted);
|
|
||||||
max-width: 700px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-actions,
|
|
||||||
.product-actions {
|
|
||||||
display: flex;
|
|
||||||
gap: 14px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-top: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
||||||
border-radius: 999px;
|
|
||||||
padding: 14px 22px;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-weight: 700;
|
|
||||||
transition: 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:hover {
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background: linear-gradient(135deg, var(--primary), #7ac4ff);
|
|
||||||
color: #071326;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-secondary {
|
|
||||||
background: rgba(255, 255, 255, 0.04);
|
|
||||||
color: var(--text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-actions .btn {
|
|
||||||
min-width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-metrics {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 14px;
|
|
||||||
margin-top: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-metrics div,
|
|
||||||
.hero-badge,
|
|
||||||
.service-card,
|
|
||||||
.about-panel,
|
|
||||||
.contact-form,
|
|
||||||
.contact-list > div {
|
|
||||||
background: var(--panel);
|
|
||||||
border: 1px solid var(--panel-border);
|
|
||||||
box-shadow: var(--shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-metrics div {
|
|
||||||
border-radius: 22px;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-metrics strong {
|
|
||||||
display: block;
|
|
||||||
font-size: 1.7rem;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-metrics span {
|
|
||||||
color: var(--muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-card-inner {
|
|
||||||
position: relative;
|
|
||||||
min-height: 640px;
|
|
||||||
border-radius: 34px;
|
|
||||||
padding: 28px;
|
|
||||||
background: linear-gradient(180deg, rgba(18, 35, 66, 0.95), rgba(10, 20, 39, 0.9));
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
||||||
box-shadow: var(--shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-card-label {
|
|
||||||
margin: 0 0 14px;
|
|
||||||
color: #d8e5ff;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-main-shot {
|
|
||||||
width: 78%;
|
|
||||||
border-radius: 24px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
||||||
margin-top: 38px;
|
|
||||||
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-floating {
|
|
||||||
position: absolute;
|
|
||||||
width: 38%;
|
|
||||||
border-radius: 24px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
||||||
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
|
|
||||||
background: #d9e6ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-floating-top {
|
|
||||||
top: 72px;
|
|
||||||
right: -10px;
|
|
||||||
transform: rotate(9deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-floating-bottom {
|
|
||||||
right: 10px;
|
|
||||||
bottom: 90px;
|
|
||||||
transform: rotate(-8deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-badges {
|
|
||||||
position: absolute;
|
|
||||||
left: 18px;
|
|
||||||
right: 18px;
|
|
||||||
bottom: 18px;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
gap: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-badge {
|
|
||||||
border-radius: 20px;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-badge strong {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-badge span {
|
|
||||||
color: var(--muted);
|
|
||||||
font-size: 0.96rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section {
|
|
||||||
padding: 42px 0 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-heading {
|
|
||||||
max-width: 760px;
|
|
||||||
margin-bottom: 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-heading h2 {
|
|
||||||
font-size: clamp(2rem, 3.6vw, 3.2rem);
|
|
||||||
margin: 0 0 14px;
|
|
||||||
letter-spacing: -0.04em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-heading p {
|
|
||||||
color: var(--muted);
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-stack {
|
|
||||||
display: grid;
|
|
||||||
gap: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-card {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 24px;
|
|
||||||
align-items: center;
|
|
||||||
background: rgba(7, 18, 36, 0.66);
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
border-radius: var(--card-radius);
|
|
||||||
padding: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-card.reverse .product-carousel {
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-tag {
|
|
||||||
display: inline-flex;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border-radius: 999px;
|
|
||||||
background: rgba(95, 160, 255, 0.12);
|
|
||||||
color: #cfe0ff;
|
|
||||||
margin-bottom: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-body h3 {
|
|
||||||
font-size: 2rem;
|
|
||||||
margin: 0 0 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-body p,
|
|
||||||
.product-body li,
|
|
||||||
.service-card p,
|
|
||||||
.about-grid p,
|
|
||||||
.contact-grid p {
|
|
||||||
color: var(--muted);
|
|
||||||
line-height: 1.72;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-body ul {
|
|
||||||
padding-left: 20px;
|
|
||||||
margin: 18px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-carousel {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 24px;
|
|
||||||
min-height: 380px;
|
|
||||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-track {
|
|
||||||
position: relative;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 380px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-slide {
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.35s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-slide.active {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-btn {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
z-index: 2;
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
|
||||||
background: rgba(4, 17, 32, 0.68);
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 1.6rem;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-btn.prev {
|
|
||||||
left: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-btn.next {
|
|
||||||
right: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-dots {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 16px;
|
|
||||||
z-index: 2;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-dot {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: rgba(255, 255, 255, 0.34);
|
|
||||||
border: 0;
|
|
||||||
padding: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-dot.active {
|
|
||||||
background: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-grid,
|
|
||||||
.contact-grid,
|
|
||||||
.about-grid {
|
|
||||||
display: grid;
|
|
||||||
gap: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-grid {
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
.service-card {
|
|
||||||
padding: 24px;
|
|
||||||
border-radius: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-grid {
|
|
||||||
grid-template-columns: 1.1fr 0.9fr;
|
|
||||||
align-items: start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-panel {
|
|
||||||
border-radius: 28px;
|
|
||||||
padding: 24px;
|
|
||||||
display: grid;
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-panel strong {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-grid {
|
|
||||||
grid-template-columns: 0.95fr 1.05fr;
|
|
||||||
align-items: start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-list {
|
|
||||||
display: grid;
|
|
||||||
gap: 14px;
|
|
||||||
margin-top: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-list > div {
|
|
||||||
border-radius: 20px;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-list span {
|
|
||||||
display: block;
|
|
||||||
color: #bfd1f0;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
font-size: 0.94rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form {
|
|
||||||
border-radius: 28px;
|
|
||||||
padding: 24px;
|
|
||||||
display: grid;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form label span {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form input,
|
|
||||||
.contact-form textarea {
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
||||||
background: #0a1629;
|
|
||||||
color: #ffffff;
|
|
||||||
padding: 14px 16px;
|
|
||||||
font: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Footer */
|
|
||||||
.footer {
|
|
||||||
padding: 28px 0 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-wrap {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: auto 1fr auto;
|
|
||||||
align-items: center;
|
|
||||||
gap: 24px;
|
|
||||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
padding-top: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-wrap p {
|
|
||||||
margin: 0;
|
|
||||||
justify-self: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-to-top {
|
|
||||||
color: var(--muted);
|
|
||||||
white-space: nowrap;
|
|
||||||
transition: color 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-to-top:hover {
|
|
||||||
color: var(--text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-links,
|
|
||||||
.footer-legal {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-links a,
|
|
||||||
.footer-legal a {
|
|
||||||
text-decoration: none;
|
|
||||||
white-space: nowrap;
|
|
||||||
color: var(--muted);
|
|
||||||
transition: color 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-links a:hover,
|
|
||||||
.footer-legal a:hover {
|
|
||||||
color: var(--text);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------*/
|
|
||||||
/* 31. Cookie consent CSS
|
|
||||||
/*----------------------------------------*/
|
|
||||||
.cookie-overlay {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 99999;
|
|
||||||
padding: 16px;
|
|
||||||
background: rgba(0, 0, 0, 0.75);
|
|
||||||
backdrop-filter: blur(2px);
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cookie-box {
|
|
||||||
max-width: 1100px;
|
|
||||||
margin: 0 auto;
|
|
||||||
background: #212529;
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 14px 16px;
|
|
||||||
display: flex;
|
|
||||||
gap: 14px;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
|
|
||||||
}
|
|
||||||
|
|
||||||
.cookie-text a {
|
|
||||||
color: #ffffff;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cookie-actions {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cookie-manage {
|
|
||||||
position: fixed;
|
|
||||||
left: 16px;
|
|
||||||
bottom: 16px;
|
|
||||||
z-index: 99998;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 980px) {
|
|
||||||
.hero-grid,
|
|
||||||
.product-card,
|
|
||||||
.about-grid,
|
|
||||||
.contact-grid,
|
|
||||||
.service-grid {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.product-card.reverse .product-carousel {
|
|
||||||
order: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-card-inner {
|
|
||||||
min-height: 560px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 760px) {
|
|
||||||
.lang-switch {
|
|
||||||
order: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav {
|
|
||||||
position: absolute;
|
|
||||||
left: 16px;
|
|
||||||
right: 16px;
|
|
||||||
top: 84px;
|
|
||||||
display: none;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 14px;
|
|
||||||
padding: 18px;
|
|
||||||
border-radius: 20px;
|
|
||||||
background: #0a1629;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav.is-open {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-toggle {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero {
|
|
||||||
padding-top: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero h1 {
|
|
||||||
line-height: 1.02;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-metrics,
|
|
||||||
.hero-badges {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-card-inner {
|
|
||||||
min-height: 660px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-main-shot {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 56px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-floating {
|
|
||||||
width: 42%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-floating-top {
|
|
||||||
top: 88px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero-floating-bottom {
|
|
||||||
bottom: 180px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-wrap {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-wrap p {
|
|
||||||
justify-self: start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-links,
|
|
||||||
.footer-legal {
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user