-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
157 lines (140 loc) · 6.16 KB
/
Copy pathscript.js
File metadata and controls
157 lines (140 loc) · 6.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/* ========================================
CONFIGURATION
======================================== */
const LANG_STORAGE_KEY = 'cupidexe-language';
const DEFAULT_LANG = 'en';
const TRANSLATIONS = {
en: {
eyebrow: 'Y2K control panel · v2.5',
title: 'Welcome!',
subtitle: "I'm Thiago",
lead: 'Game servers, VPN access, and tools wrapped in a retro-future shell.',
panelButton: 'Access Server Panel',
tag1: 'Minecraft + friends',
tag2: 'Network admin',
tag3: 'Multilingual mix',
scrollPrompt: 'Scroll down',
aboutTitle: 'About Me',
statusOnline: 'Status: Online',
aboutP1: "Hi there! I'm a 18-year-old tech enthusiast with a multicultural background. Born in the UK with Spanish and Portuguese heritage, I bring a diverse perspective to everything I do.",
aboutP2: 'Currently, I am studying an IT course, diving deep into technology and expanding my skills in systems administration and networking. This website serves as my hub for managing my Minecraft server panel and other game servers that I run for playing with friends.',
infoAgeLabel: 'Age',
infoAgeValue: '18',
infoLocationLabel: 'Location',
infoLocationValue: 'UK',
infoHeritageLabel: 'Heritage',
infoHeritageValue: 'UK ES PT',
infoStudiesLabel: 'Studies',
infoStudiesValue: 'IT Course',
footerText: 'Hosting and managing game servers since 2025'
},
es: {
eyebrow: 'Panel de control Y2K · v2.5',
title: 'Bienvenido!',
subtitle: 'Soy Thiago',
lead: 'Servidores de juego, acceso VPN y herramientas con una estetica retrofuturista.',
panelButton: 'Acceder al Panel del Servidor',
tag1: 'Minecraft + amigos',
tag2: 'Admin de red',
tag3: 'Mezcla multilingue',
scrollPrompt: 'Bajar',
aboutTitle: 'Sobre Mi',
statusOnline: 'Estado: En linea',
aboutP1: 'Hola! Soy un entusiasta de tecnologia de 18 anos con un contexto multicultural. Naci en el Reino Unido con herencia espanola y portuguesa, y aporto una perspectiva diversa a todo lo que hago.',
aboutP2: 'Actualmente estudio un curso de IT, profundizando en tecnologia y ampliando habilidades en administracion de sistemas y redes. Este sitio es mi centro para gestionar mi panel de Minecraft y otros servidores de juego para jugar con amigos.',
infoAgeLabel: 'Edad',
infoAgeValue: '18',
infoLocationLabel: 'Ubicacion',
infoLocationValue: 'Reino Unido',
infoHeritageLabel: 'Herencia',
infoHeritageValue: 'UK ES PT',
infoStudiesLabel: 'Estudios',
infoStudiesValue: 'Curso de IT',
footerText: 'Alojando y gestionando servidores de juego desde 2025'
},
pt: {
eyebrow: 'Painel de controle Y2K · v2.5',
title: 'Bem-vindo!',
subtitle: 'Sou o Thiago',
lead: 'Servidores de jogo, acesso VPN e ferramentas com visual retrofuturista.',
panelButton: 'Acessar Painel do Servidor',
tag1: 'Minecraft + amigos',
tag2: 'Admin de rede',
tag3: 'Mistura multilingue',
scrollPrompt: 'Descer',
aboutTitle: 'Sobre Mim',
statusOnline: 'Status: Online',
aboutP1: 'Oi! Sou um entusiasta de tecnologia de 18 anos com historico multicultural. Nascido no Reino Unido com heranca espanhola e portuguesa, trago uma perspectiva diversa para tudo o que faco.',
aboutP2: 'Atualmente estudo um curso de IT, aprofundando em tecnologia e ampliando habilidades em administracao de sistemas e redes. Este site e meu hub para gerenciar meu painel de Minecraft e outros servidores para jogar com amigos.',
infoAgeLabel: 'Idade',
infoAgeValue: '18',
infoLocationLabel: 'Local',
infoLocationValue: 'Reino Unido',
infoHeritageLabel: 'Heranca',
infoHeritageValue: 'UK ES PT',
infoStudiesLabel: 'Estudos',
infoStudiesValue: 'Curso de IT',
footerText: 'Hospedando e gerenciando servidores de jogo desde 2025'
}
};
/* ========================================
INITIALIZATION
======================================== */
document.addEventListener('DOMContentLoaded', () => {
addButtonAnimations();
initLanguageSwitcher();
});
/* ========================================
ADDITIONAL ANIMATIONS
======================================== */
function addButtonAnimations() {
const buttons = document.querySelectorAll('.panel-button');
buttons.forEach((button) => {
button.addEventListener('click', () => {
button.style.transform = 'scale(0.97)';
setTimeout(() => {
button.style.transform = '';
}, 100);
});
});
}
/* ========================================
LANGUAGE SWITCHER / TRANSLATION
======================================== */
function initLanguageSwitcher() {
const buttons = document.querySelectorAll('.lang-btn');
if (!buttons.length) return;
const saved = localStorage.getItem(LANG_STORAGE_KEY);
const initialLang = TRANSLATIONS[saved] ? saved : DEFAULT_LANG;
const setActive = (lang) => {
buttons.forEach((btn) => btn.classList.toggle('active', btn.dataset.lang === lang));
};
const applyLang = (lang) => {
applyTranslations(lang);
setActive(lang);
localStorage.setItem(LANG_STORAGE_KEY, lang);
};
buttons.forEach((btn) => {
btn.addEventListener('click', () => {
const lang = btn.dataset.lang;
if (!TRANSLATIONS[lang]) return;
applyLang(lang);
});
});
applyLang(initialLang);
}
function applyTranslations(lang) {
const pack = TRANSLATIONS[lang] || TRANSLATIONS[DEFAULT_LANG];
document.documentElement.lang = lang;
const container = document.querySelector('main.container');
if (container) {
container.classList.add('lang-transition');
setTimeout(() => container.classList.remove('lang-transition'), 500);
}
document.querySelectorAll('[data-l10n-key]').forEach((el) => {
const key = el.dataset.l10nKey;
if (pack[key]) {
el.textContent = pack[key];
}
});
}