Skip to content

Commit

Permalink
Update 1.1 - Added new supported languages.
Browse files Browse the repository at this point in the history
- Revamped all the CSS for better user experience.
  • Loading branch information
Muhaddil committed Dec 3, 2024
1 parent 4d5af15 commit 7569a1f
Show file tree
Hide file tree
Showing 2 changed files with 181 additions and 43 deletions.
30 changes: 26 additions & 4 deletions JS/glyphgeneratorV3.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ const populateLanguageOptions = () => {
const languageNames = {
en: "English",
es: "Español",
// You can add more languages here
fr: "Français",
de: "Deutsch",
eu: "Euskara",
};
Object.keys(i18next.options.resources).forEach((lang) => {
const option = document.createElement("option");
Expand Down Expand Up @@ -92,12 +94,32 @@ i18next.init(
},
es: {
translation: {
title: "Generador de Glifos NMS",
header: "Generador de Glifos NMS",
title: "Generador de Glifos para NMS",
header: "Generador de Glifos para NMS",
button: "Generar Glifos",
},
},
// You can add more languages here
fr: {
translation: {
title: "Générateur de glyphes NMS",
header: "Générateur de glyphes NMS",
button: "Générer des glyphes",
},
},
de: {
translation: {
title: "NMS Glyph Generator",
header: "NMS Glyph Generator",
button: "Glyphs generieren",
},
},
eu: {
translation: {
title: "NMS Glifo Sortzailea",
header: "NMS Glifo Sortzailea",
button: "Sortu Glifoak",
},
},
},
},
(err, t) => {
Expand Down
194 changes: 155 additions & 39 deletions styles/generator.css
Original file line number Diff line number Diff line change
@@ -1,63 +1,179 @@
/* Asegurarse de que el texto se vea bien en todos los dispositivos */
@font-face {
font-family: 'NMS-Glyphs';
src: url('../public/assets/fonts/NMS-Glyphs-Mono.ttf') format('truetype');
font-family: 'NMS-Glyphs';
src: url('../public/assets/fonts/NMS-Glyphs-Mono.ttf') format('truetype');
}

/* Fondo dinámico con transición suave */
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
margin: 0;
padding: 2rem;
box-sizing: border-box;
overflow-y: auto;
background: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgba(20, 20, 20, 1) 100%);
background-size: 100% 100%;
color: #e0e0e0;
font-family: Arial, sans-serif;
text-align: center;
}

/* Estilo para el encabezado */
h1 {
font-family: 'NMS-Glyphs', sans-serif;
font-size: 3rem;
margin-bottom: 2rem;
color: #ffffff;
text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
animation: headerAnimation 2s ease-out; /* Animación de entrada para el encabezado */
}

@keyframes headerAnimation {
0% {
opacity: 0;
transform: translateY(-50px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}

/* Estilo para los glifos generados */
.glyph {
font-family: 'NMS-Glyphs', sans-serif;
font-size: 3em;
font-size: 5vw;
max-width: 90%;
word-wrap: break-word;
text-align: center;
margin: 20px 0;
color: #00ff00;
text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
transition: transform 0.3s ease-in-out, color 0.3s ease;
}

@media (max-width: 600px) {
.glyph {
font-size: 1.5em;
.glyph:hover {
transform: scale(1.1);
color: #00cc00;
text-shadow: 1px 1px 10px rgba(0, 255, 0, 0.7);
}

/* Animación de giro para los glifos */
@keyframes spin {
0% {
transform: rotateY(0deg);
}
50% {
transform: rotateY(180deg);
}
100% {
transform: rotateY(360deg);
}
}

.glyph.spin {
display: inline-block;
animation: spin 1s ease-out;
}

/* Contenedor del formulario de botones y select */
form {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
max-width: 400px;
}

/* Estilo para pantallas grandes */
/* Estilo para los botones y selectores */
button, select {
width: auto;
padding: 10px 20px;
font-size: 1rem;
padding: 0.6rem 1rem;
width: auto;
max-width: 100%;
border-radius: 6px;
border: 2px solid #444;
background-color: #333333;
color: white;
cursor: pointer;
transition: background-color 0.3s, transform 0.2s ease, box-shadow 0.3s;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
margin-bottom: 1.5rem;
}

/* Estilo para pantallas pequeñas */
@media (max-width: 600px) {
button, select {
padding: 20px 40px;
}
button:hover, select:hover {
background-color: #444444;
transform: translateY(-2px);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5);
}

button:disabled {
background-color: #555555;
cursor: not-allowed;
}

/* Estilo para el selector de idiomas */
select {
width: auto;
padding: 10px 20px;
font-size: 1rem;
padding: 0.6rem;
background-color: #333333;
color: white;
border-radius: 6px;
border: 2px solid #444;
transition: background-color 0.3s;
}

@keyframes spin {
0% {
transform: rotateY(0deg);
}
50% {
transform: rotateY(180deg);
}
100% {
transform: rotateY(360deg);
}
button {
font-size: 1rem;
padding: 0.6rem;
background-color: #333333;
color: white;
border-radius: 6px;
border: 2px solid #444;
transition: background-color 0.3s;
text-align: center;
display: flex;
justify-content: center;
}

/* Efecto de sombra flotante en el pie de página */
footer {
margin-top: 2rem;
font-size: 0.9rem;
color: #888;
text-align: center;
animation: footerAnimation 2s ease-out;
}

@keyframes footerAnimation {
0% {
opacity: 0;
transform: translateY(20px);
}

.glyph.spin {
display: inline-block;
animation: spin 1s ease-out;
100% {
opacity: 1;
transform: translateY(0);
}



}

/* Ajustes responsivos */
@media (max-width: 600px) {
h1 {
font-size: 2.5rem;
}

.glyph {
font-size: 8vw;
}

button, select {
font-size: 0.9rem;
padding: 0.5rem 1rem;
margin-bottom: 1rem;
}
}

0 comments on commit 7569a1f

Please sign in to comment.