@jjlmoya/utils-developer 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +64 -0
- package/src/category/i18n/en.ts +34 -0
- package/src/category/i18n/es.ts +34 -0
- package/src/category/i18n/fr.ts +34 -0
- package/src/category/index.ts +31 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +11 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +78 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +146 -0
- package/src/pages/[locale].astro +251 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/css_specificity_logic.test.ts +39 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/locale_completeness.test.ts +42 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/schemas_fulfillment.test.ts +23 -0
- package/src/tests/seo_length.test.ts +22 -0
- package/src/tests/title_quality.test.ts +55 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/aspectRatio/bibliography.astro +14 -0
- package/src/tool/aspectRatio/component.astro +468 -0
- package/src/tool/aspectRatio/i18n/en.ts +177 -0
- package/src/tool/aspectRatio/i18n/es.ts +177 -0
- package/src/tool/aspectRatio/i18n/fr.ts +177 -0
- package/src/tool/aspectRatio/index.ts +34 -0
- package/src/tool/aspectRatio/seo.astro +14 -0
- package/src/tool/aspectRatio/ui.ts +12 -0
- package/src/tool/calculadoraTiempoDatos/bibliography.astro +14 -0
- package/src/tool/calculadoraTiempoDatos/component.astro +829 -0
- package/src/tool/calculadoraTiempoDatos/i18n/en.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/i18n/es.ts +163 -0
- package/src/tool/calculadoraTiempoDatos/i18n/fr.ts +150 -0
- package/src/tool/calculadoraTiempoDatos/index.ts +33 -0
- package/src/tool/calculadoraTiempoDatos/seo.astro +14 -0
- package/src/tool/calculadoraTiempoDatos/ui.ts +24 -0
- package/src/tool/colorConverter/bibliography.astro +14 -0
- package/src/tool/colorConverter/component.astro +504 -0
- package/src/tool/colorConverter/i18n/en.ts +126 -0
- package/src/tool/colorConverter/i18n/es.ts +126 -0
- package/src/tool/colorConverter/i18n/fr.ts +126 -0
- package/src/tool/colorConverter/index.ts +33 -0
- package/src/tool/colorConverter/seo.astro +14 -0
- package/src/tool/colorConverter/ui.ts +16 -0
- package/src/tool/conversorExcelCsvHtml/bibliography.astro +14 -0
- package/src/tool/conversorExcelCsvHtml/component.astro +595 -0
- package/src/tool/conversorExcelCsvHtml/i18n/en.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/es.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/i18n/fr.ts +129 -0
- package/src/tool/conversorExcelCsvHtml/index.ts +33 -0
- package/src/tool/conversorExcelCsvHtml/seo.astro +14 -0
- package/src/tool/conversorExcelCsvHtml/ui.ts +14 -0
- package/src/tool/cronGenerator/bibliography.astro +14 -0
- package/src/tool/cronGenerator/component.astro +667 -0
- package/src/tool/cronGenerator/i18n/en.ts +191 -0
- package/src/tool/cronGenerator/i18n/es.ts +191 -0
- package/src/tool/cronGenerator/i18n/fr.ts +191 -0
- package/src/tool/cronGenerator/index.ts +34 -0
- package/src/tool/cronGenerator/seo.astro +14 -0
- package/src/tool/cronGenerator/ui.ts +45 -0
- package/src/tool/cssSpecificityCalculator/bibliography.astro +14 -0
- package/src/tool/cssSpecificityCalculator/component.astro +292 -0
- package/src/tool/cssSpecificityCalculator/i18n/en.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/es.ts +168 -0
- package/src/tool/cssSpecificityCalculator/i18n/fr.ts +168 -0
- package/src/tool/cssSpecificityCalculator/index.ts +34 -0
- package/src/tool/cssSpecificityCalculator/logic.ts +100 -0
- package/src/tool/cssSpecificityCalculator/seo.astro +14 -0
- package/src/tool/cssSpecificityCalculator/ui-controller.ts +57 -0
- package/src/tool/cssSpecificityCalculator/ui.ts +11 -0
- package/src/tool/cssToInlineConverter/bibliography.astro +14 -0
- package/src/tool/cssToInlineConverter/component.astro +308 -0
- package/src/tool/cssToInlineConverter/i18n/en.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/es.ts +160 -0
- package/src/tool/cssToInlineConverter/i18n/fr.ts +160 -0
- package/src/tool/cssToInlineConverter/index.ts +34 -0
- package/src/tool/cssToInlineConverter/seo.astro +14 -0
- package/src/tool/cssToInlineConverter/ui.ts +12 -0
- package/src/tool/duplicateCssRemover/bibliography.astro +14 -0
- package/src/tool/duplicateCssRemover/component.astro +353 -0
- package/src/tool/duplicateCssRemover/i18n/en.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/es.ts +167 -0
- package/src/tool/duplicateCssRemover/i18n/fr.ts +167 -0
- package/src/tool/duplicateCssRemover/index.ts +34 -0
- package/src/tool/duplicateCssRemover/seo.astro +14 -0
- package/src/tool/duplicateCssRemover/ui.ts +12 -0
- package/src/tool/generadorSecurityTxt/bibliography.astro +14 -0
- package/src/tool/generadorSecurityTxt/component.astro +473 -0
- package/src/tool/generadorSecurityTxt/i18n/en.ts +173 -0
- package/src/tool/generadorSecurityTxt/i18n/es.ts +173 -0
- package/src/tool/generadorSecurityTxt/i18n/fr.ts +173 -0
- package/src/tool/generadorSecurityTxt/index.ts +33 -0
- package/src/tool/generadorSecurityTxt/seo.astro +14 -0
- package/src/tool/generadorSecurityTxt/ui.ts +27 -0
- package/src/tool/hashGenerator/bibliography.astro +14 -0
- package/src/tool/hashGenerator/component.astro +367 -0
- package/src/tool/hashGenerator/i18n/en.ts +118 -0
- package/src/tool/hashGenerator/i18n/es.ts +118 -0
- package/src/tool/hashGenerator/i18n/fr.ts +118 -0
- package/src/tool/hashGenerator/index.ts +33 -0
- package/src/tool/hashGenerator/md5.ts +138 -0
- package/src/tool/hashGenerator/seo.astro +14 -0
- package/src/tool/hashGenerator/ui.ts +11 -0
- package/src/tool/inspectorCertificadosSsl/bibliography.astro +14 -0
- package/src/tool/inspectorCertificadosSsl/component.astro +580 -0
- package/src/tool/inspectorCertificadosSsl/i18n/en.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/es.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/i18n/fr.ts +214 -0
- package/src/tool/inspectorCertificadosSsl/index.ts +33 -0
- package/src/tool/inspectorCertificadosSsl/seo.astro +14 -0
- package/src/tool/inspectorCertificadosSsl/ui.ts +29 -0
- package/src/tool/jsonFormatter/bibliography.astro +14 -0
- package/src/tool/jsonFormatter/component.astro +590 -0
- package/src/tool/jsonFormatter/i18n/en.ts +156 -0
- package/src/tool/jsonFormatter/i18n/es.ts +156 -0
- package/src/tool/jsonFormatter/i18n/fr.ts +156 -0
- package/src/tool/jsonFormatter/index.ts +34 -0
- package/src/tool/jsonFormatter/seo.astro +14 -0
- package/src/tool/jsonFormatter/ui.ts +15 -0
- package/src/tool/keycode/bibliography.astro +14 -0
- package/src/tool/keycode/component.astro +540 -0
- package/src/tool/keycode/i18n/en.ts +160 -0
- package/src/tool/keycode/i18n/es.ts +160 -0
- package/src/tool/keycode/i18n/fr.ts +160 -0
- package/src/tool/keycode/index.ts +34 -0
- package/src/tool/keycode/seo.astro +14 -0
- package/src/tool/keycode/ui.ts +10 -0
- package/src/tool/llmCostCalculator/bibliography.astro +14 -0
- package/src/tool/llmCostCalculator/component.astro +488 -0
- package/src/tool/llmCostCalculator/data.ts +99 -0
- package/src/tool/llmCostCalculator/i18n/en.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/es.ts +165 -0
- package/src/tool/llmCostCalculator/i18n/fr.ts +165 -0
- package/src/tool/llmCostCalculator/index.ts +34 -0
- package/src/tool/llmCostCalculator/seo.astro +14 -0
- package/src/tool/llmCostCalculator/ui.ts +11 -0
- package/src/tool/mobileMockupGenerator/app.ts +614 -0
- package/src/tool/mobileMockupGenerator/bibliography.astro +14 -0
- package/src/tool/mobileMockupGenerator/component.astro +1044 -0
- package/src/tool/mobileMockupGenerator/constants.ts +48 -0
- package/src/tool/mobileMockupGenerator/i18n/en.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/es.ts +121 -0
- package/src/tool/mobileMockupGenerator/i18n/fr.ts +121 -0
- package/src/tool/mobileMockupGenerator/index.ts +33 -0
- package/src/tool/mobileMockupGenerator/rendering.ts +189 -0
- package/src/tool/mobileMockupGenerator/seo.astro +14 -0
- package/src/tool/mobileMockupGenerator/store.ts +145 -0
- package/src/tool/mobileMockupGenerator/types.ts +41 -0
- package/src/tool/mobileMockupGenerator/ui.ts +48 -0
- package/src/tool/musicalTypography/bibliography.astro +14 -0
- package/src/tool/musicalTypography/component.astro +480 -0
- package/src/tool/musicalTypography/i18n/en.ts +179 -0
- package/src/tool/musicalTypography/i18n/es.ts +179 -0
- package/src/tool/musicalTypography/i18n/fr.ts +179 -0
- package/src/tool/musicalTypography/index.ts +33 -0
- package/src/tool/musicalTypography/seo.astro +14 -0
- package/src/tool/musicalTypography/ui.ts +25 -0
- package/src/tool/placeholderGenerator/bibliography.astro +14 -0
- package/src/tool/placeholderGenerator/component.astro +499 -0
- package/src/tool/placeholderGenerator/i18n/en.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/es.ts +176 -0
- package/src/tool/placeholderGenerator/i18n/fr.ts +176 -0
- package/src/tool/placeholderGenerator/index.ts +34 -0
- package/src/tool/placeholderGenerator/seo.astro +14 -0
- package/src/tool/placeholderGenerator/ui.ts +14 -0
- package/src/tool/promptLibrary/bibliography.astro +14 -0
- package/src/tool/promptLibrary/component.astro +1131 -0
- package/src/tool/promptLibrary/controller.ts +49 -0
- package/src/tool/promptLibrary/i18n/en.ts +131 -0
- package/src/tool/promptLibrary/i18n/es.ts +131 -0
- package/src/tool/promptLibrary/i18n/fr.ts +126 -0
- package/src/tool/promptLibrary/index.ts +33 -0
- package/src/tool/promptLibrary/seo.astro +14 -0
- package/src/tool/promptLibrary/ui.ts +29 -0
- package/src/tool/readabilityCalculator/bibliography.astro +14 -0
- package/src/tool/readabilityCalculator/component.astro +534 -0
- package/src/tool/readabilityCalculator/i18n/en.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/es.ts +133 -0
- package/src/tool/readabilityCalculator/i18n/fr.ts +133 -0
- package/src/tool/readabilityCalculator/index.ts +33 -0
- package/src/tool/readabilityCalculator/seo.astro +14 -0
- package/src/tool/readabilityCalculator/ui.ts +27 -0
- package/src/tool/svgSanitizer/bibliography.astro +14 -0
- package/src/tool/svgSanitizer/component.astro +554 -0
- package/src/tool/svgSanitizer/i18n/en.ts +125 -0
- package/src/tool/svgSanitizer/i18n/es.ts +125 -0
- package/src/tool/svgSanitizer/i18n/fr.ts +125 -0
- package/src/tool/svgSanitizer/index.ts +33 -0
- package/src/tool/svgSanitizer/seo.astro +14 -0
- package/src/tool/svgSanitizer/ui.ts +18 -0
- package/src/tool/svgToCss/bibliography.astro +14 -0
- package/src/tool/svgToCss/component.astro +381 -0
- package/src/tool/svgToCss/i18n/en.ts +174 -0
- package/src/tool/svgToCss/i18n/es.ts +174 -0
- package/src/tool/svgToCss/i18n/fr.ts +174 -0
- package/src/tool/svgToCss/index.ts +34 -0
- package/src/tool/svgToCss/seo.astro +14 -0
- package/src/tool/svgToCss/ui.ts +13 -0
- package/src/tool/urlCleaner/bibliography.astro +14 -0
- package/src/tool/urlCleaner/component.astro +458 -0
- package/src/tool/urlCleaner/i18n/en.ts +116 -0
- package/src/tool/urlCleaner/i18n/es.ts +116 -0
- package/src/tool/urlCleaner/i18n/fr.ts +116 -0
- package/src/tool/urlCleaner/index.ts +33 -0
- package/src/tool/urlCleaner/seo.astro +14 -0
- package/src/tool/urlCleaner/ui.ts +12 -0
- package/src/tool/urlEncoderDecoder/bibliography.astro +14 -0
- package/src/tool/urlEncoderDecoder/component.astro +291 -0
- package/src/tool/urlEncoderDecoder/i18n/en.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/es.ts +162 -0
- package/src/tool/urlEncoderDecoder/i18n/fr.ts +162 -0
- package/src/tool/urlEncoderDecoder/index.ts +34 -0
- package/src/tool/urlEncoderDecoder/seo.astro +14 -0
- package/src/tool/urlEncoderDecoder/ui.ts +11 -0
- package/src/tool/utmGenerator/bibliography.astro +14 -0
- package/src/tool/utmGenerator/component.astro +270 -0
- package/src/tool/utmGenerator/i18n/en.ts +117 -0
- package/src/tool/utmGenerator/i18n/es.ts +117 -0
- package/src/tool/utmGenerator/i18n/fr.ts +117 -0
- package/src/tool/utmGenerator/index.ts +33 -0
- package/src/tool/utmGenerator/seo.astro +14 -0
- package/src/tool/utmGenerator/ui.ts +13 -0
- package/src/tools.ts +27 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { MusicalTypographyUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'tipografia-musical';
|
|
6
|
+
const title = 'Escalador de Tipografía Musical. Calculadora de Escala Modular';
|
|
7
|
+
const description =
|
|
8
|
+
'Herramienta online gratuita para crear jerarquías visuales armónicas con escalas modulares basadas en proporciones musicales. Genera variables CSS listas para tu diseño web.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: '¿Qué es una escala modular tipográfica?',
|
|
13
|
+
answer:
|
|
14
|
+
'Es un método para determinar tamaños de fuente basados en una proporción matemática constante. Al igual que en la música, donde las notas guardan relaciones armónicas, la escala modular crea una jerarquía visual equilibrada y predecible.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: '¿Por qué usar intervalos musicales para el diseño?',
|
|
18
|
+
answer:
|
|
19
|
+
'Los intervalos musicales son proporciones que el cerebro humano percibe como armónicas. Al aplicarlas al tamaño de los textos, logras una estructura visual que se siente correcta y profesional, sin elegir tamaños al azar.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: '¿Qué es el Número de Oro en tipografía?',
|
|
23
|
+
answer:
|
|
24
|
+
'Es la proporción 1.618, llamada Proporción Áurea. Se utiliza para crear escalas muy dramáticas y elegantes, donde cada paso en la jerarquía crece de forma exponencial. Perfecta para portafolios o sitios de arte.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: '¿Cómo implemento la escala en mi archivo CSS?',
|
|
28
|
+
answer:
|
|
29
|
+
'La herramienta genera variables CSS (tokens) con formato :root { --step-N: Xrem; }. Cópialos en tu archivo CSS principal y úsalos con var(--step-N) para mantener la consistencia tipográfica en todo el sitio.',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Definir tamaño base',
|
|
36
|
+
text: 'Introduce el tamaño de fuente para el cuerpo de texto (normalmente 16px) que servirá como nota fundamental de tu escala.',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Elegir el intervalo',
|
|
40
|
+
text: 'Selecciona una proporción musical para determinar cuánto espacio habrá entre los diferentes niveles de encabezados.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Previsualizar jerarquía',
|
|
44
|
+
text: 'Observa cómo se comportan los niveles tipográficos en tiempo real para verificar que la armonía visual encaja con tu proyecto.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Exportar código',
|
|
48
|
+
text: 'Pulsa Copiar Variables CSS para obtener el bloque listo para pegar directamente en tu flujo de trabajo.',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'DesignApplication',
|
|
81
|
+
operatingSystem: 'All',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
83
|
+
inLanguage: 'es',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const ui: MusicalTypographyUI = {
|
|
87
|
+
labelConfig: 'Configuración',
|
|
88
|
+
labelBaseSize: 'Tamaño Base (px)',
|
|
89
|
+
hintBaseSize: 'El tamaño de tu texto de párrafo (normalmente 16px).',
|
|
90
|
+
labelRatio: 'Escala Musical (Ratio)',
|
|
91
|
+
hintRatio: 'Determina cuánto crece el tamaño en cada paso.',
|
|
92
|
+
labelCalculated: 'Valores Calculados',
|
|
93
|
+
labelPreview: 'Previsualización',
|
|
94
|
+
btnCopyCss: 'Copiar Variables CSS',
|
|
95
|
+
feedbackCopied: '¡Variables copiadas al portapapeles!',
|
|
96
|
+
previewText: 'Tipografía Musical',
|
|
97
|
+
previewSubtext: 'Una escala armónica perfecta para tu diseño.',
|
|
98
|
+
ratioSecundaMenor: 'Segunda Menor',
|
|
99
|
+
ratioSegundaMayor: 'Segunda Mayor',
|
|
100
|
+
ratioTerceraMenor: 'Tercera Menor',
|
|
101
|
+
ratioTerceraMayor: 'Tercera Mayor',
|
|
102
|
+
ratioCuartaPerfecta: 'Cuarta Perfecta',
|
|
103
|
+
ratioCuartaAumentada: 'Cuarta Aumentada',
|
|
104
|
+
ratioQuintaPerfecta: 'Quinta Perfecta',
|
|
105
|
+
ratioProporcionAurea: 'Proporción Áurea',
|
|
106
|
+
ratioSextaMayor: 'Sexta Mayor',
|
|
107
|
+
ratioSeptimaMenor: 'Séptima Menor',
|
|
108
|
+
ratioSeptimaMayor: 'Séptima Mayor',
|
|
109
|
+
ratioOctava: 'Octava',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const content: ToolLocaleContent<MusicalTypographyUI> = {
|
|
113
|
+
slug,
|
|
114
|
+
title,
|
|
115
|
+
description,
|
|
116
|
+
ui,
|
|
117
|
+
faqTitle: 'Preguntas Frecuentes',
|
|
118
|
+
faq: faqData,
|
|
119
|
+
bibliographyTitle: 'Referencias',
|
|
120
|
+
bibliography: [
|
|
121
|
+
{
|
|
122
|
+
name: 'Bringhurst, R. The Elements of Typographic Style',
|
|
123
|
+
url: 'https://en.wikipedia.org/wiki/The_Elements_of_Typographic_Style',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'Brown, T. More Meaningful Typography. A List Apart',
|
|
127
|
+
url: 'https://alistapart.com/article/more-meaningful-typography/',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'Physics of Music. Musical Intervals and Scales',
|
|
131
|
+
url: 'https://es.scribd.com/document/199729396/Physics-of-Music-Notes',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
howTo: howToData,
|
|
135
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
136
|
+
seo: [
|
|
137
|
+
{
|
|
138
|
+
type: 'title',
|
|
139
|
+
text: 'La armonía invisible del diseño web',
|
|
140
|
+
level: 2,
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'paragraph',
|
|
144
|
+
html: 'El <strong>Escalador de Tipografía Musical</strong> aplica la matemática de los intervalos musicales al diseño tipográfico. Al igual que una composición musical se rige por proporciones precisas, un diseño sólido se beneficia de una estructura matemática que relaciona todos los tamaños entre sí.',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'title',
|
|
148
|
+
text: 'Cómo funciona la escala modular',
|
|
149
|
+
level: 3,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'grid',
|
|
153
|
+
columns: 2,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: 'card',
|
|
157
|
+
title: 'La fórmula',
|
|
158
|
+
html: '<p>La progresión es simple: <code>Tamaño = Base × Ratio<sup>n</sup></code>. El paso 0 es tu texto base. El paso 1 es un subtítulo pequeño. El paso 4 o 5 podría ser tu H1 principal. La misma constante multiplicativa (el ratio) garantiza que todas las relaciones sean consistentes.</p>',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'card',
|
|
162
|
+
title: 'Por qué "Musical"',
|
|
163
|
+
html: '<p>Los pitagóricos descubrieron que dividir una cuerda en proporciones simples (1:2, 2:3, 3:4) producía sonidos consonantes. Estos intervalos, octava, quinta perfecta y cuarta perfecta, son exactamente los ratios tipográficos. Estás componiendo música visual.</p>',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'title',
|
|
167
|
+
text: 'Eligiendo el ratio adecuado',
|
|
168
|
+
level: 3,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'tip',
|
|
172
|
+
html: 'Para interfaces densas (dashboards, tablas) usa ratios pequeños como <code>1.125</code> o <code>1.2</code>. Para sitios editoriales o portafolios, usa ratios más expresivos como <code>1.5</code> o <code>1.618</code>.',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'paragraph',
|
|
176
|
+
html: 'No uses la escala solo para <code>font-size</code>. Las mismas variables CSS funcionan para <code>margin</code>, <code>padding</code> y <code>gap</code>. Cuando el espacio en blanco sigue la misma progresión matemática que el texto, el diseño alcanza un nivel de cohesión que todos sienten pero pocos pueden explicar.',
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { WithContext, FAQPage, HowToThing, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
3
|
+
import type { MusicalTypographyUI } from '../ui';
|
|
4
|
+
|
|
5
|
+
const slug = 'typographie-musicale';
|
|
6
|
+
const title = 'Échelle de Typographie Musicale. Calculateur d\'Échelle Modulaire';
|
|
7
|
+
const description =
|
|
8
|
+
'Outil en ligne gratuit pour créer des hiérarchies visuelles harmonieuses avec des échelles modulaires basées sur des proportions musicales. Génère des variables CSS prêtes à l\'emploi.';
|
|
9
|
+
|
|
10
|
+
const faqData = [
|
|
11
|
+
{
|
|
12
|
+
question: "Qu'est-ce qu'une échelle modulaire typographique ?",
|
|
13
|
+
answer:
|
|
14
|
+
"C'est une méthode pour déterminer les tailles de police basées sur un ratio mathématique constant. Comme en musique, où les notes ont des relations harmoniques, l'échelle modulaire crée une hiérarchie visuelle équilibrée et prévisible.",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
question: 'Pourquoi utiliser des intervalles musicaux pour le design ?',
|
|
18
|
+
answer:
|
|
19
|
+
"Les intervalles musicaux sont des proportions que le cerveau humain perçoit comme harmonieuses. Les appliquer aux tailles de texte crée une structure visuelle qui semble correcte et professionnelle, plutôt que de choisir des tailles au hasard.",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
question: "Qu'est-ce que le Nombre d'Or en typographie ?",
|
|
23
|
+
answer:
|
|
24
|
+
"C'est la proportion 1,618, connue sous le nom de Section Dorée. Elle crée des échelles très dramatiques et élégantes où chaque étape de la hiérarchie croît de façon exponentielle. Parfaite pour les portfolios ou sites artistiques.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
question: 'Comment implémenter l\'échelle dans mon fichier CSS ?',
|
|
28
|
+
answer:
|
|
29
|
+
"L'outil génère des variables CSS (tokens) au format :root { --step-N: Xrem; }. Copiez-les dans votre fichier CSS principal et utilisez-les avec var(--step-N) pour maintenir la cohérence typographique sur tout votre site.",
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const howToData = [
|
|
34
|
+
{
|
|
35
|
+
name: 'Définir la taille de base',
|
|
36
|
+
text: "Entrez la taille de police pour votre corps de texte (généralement 16px) qui servira de note fondamentale de votre échelle.",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Choisir l'intervalle",
|
|
40
|
+
text: "Sélectionnez une proportion musicale pour déterminer l'espace entre les différents niveaux de titres.",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Prévisualiser la hiérarchie',
|
|
44
|
+
text: "Observez comment les niveaux typographiques se comportent en temps réel pour vérifier que l'harmonie visuelle convient à votre projet.",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Exporter le code',
|
|
48
|
+
text: "Cliquez sur Copier variables CSS pour obtenir le bloc prêt à coller directement dans votre flux de travail.",
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const faqSchema: WithContext<FAQPage> = {
|
|
53
|
+
'@context': 'https://schema.org',
|
|
54
|
+
'@type': 'FAQPage',
|
|
55
|
+
mainEntity: faqData.map((item) => ({
|
|
56
|
+
'@type': 'Question',
|
|
57
|
+
name: item.question,
|
|
58
|
+
acceptedAnswer: { '@type': 'Answer', text: item.answer },
|
|
59
|
+
})),
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const howToSchema: WithContext<HowToThing> = {
|
|
63
|
+
'@context': 'https://schema.org',
|
|
64
|
+
'@type': 'HowTo',
|
|
65
|
+
name: title,
|
|
66
|
+
description,
|
|
67
|
+
step: howToData.map((step, i) => ({
|
|
68
|
+
'@type': 'HowToStep',
|
|
69
|
+
position: i + 1,
|
|
70
|
+
name: step.name,
|
|
71
|
+
text: step.text,
|
|
72
|
+
})),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const appSchema: WithContext<SoftwareApplication> = {
|
|
76
|
+
'@context': 'https://schema.org',
|
|
77
|
+
'@type': 'SoftwareApplication',
|
|
78
|
+
name: title,
|
|
79
|
+
description,
|
|
80
|
+
applicationCategory: 'DesignApplication',
|
|
81
|
+
operatingSystem: 'All',
|
|
82
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
83
|
+
inLanguage: 'fr',
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const ui: MusicalTypographyUI = {
|
|
87
|
+
labelConfig: 'Configuration',
|
|
88
|
+
labelBaseSize: 'Taille de base (px)',
|
|
89
|
+
hintBaseSize: 'La taille de votre texte de paragraphe (généralement 16px).',
|
|
90
|
+
labelRatio: 'Échelle musicale (Ratio)',
|
|
91
|
+
hintRatio: "Détermine combien la taille augmente à chaque étape.",
|
|
92
|
+
labelCalculated: 'Valeurs calculées',
|
|
93
|
+
labelPreview: 'Aperçu',
|
|
94
|
+
btnCopyCss: 'Copier variables CSS',
|
|
95
|
+
feedbackCopied: 'Variables copiées dans le presse-papiers !',
|
|
96
|
+
previewText: 'Typographie Musicale',
|
|
97
|
+
previewSubtext: 'Une échelle harmonique parfaite pour votre design.',
|
|
98
|
+
ratioSecundaMenor: 'Seconde Mineure',
|
|
99
|
+
ratioSegundaMayor: 'Seconde Majeure',
|
|
100
|
+
ratioTerceraMenor: 'Tierce Mineure',
|
|
101
|
+
ratioTerceraMayor: 'Tierce Majeure',
|
|
102
|
+
ratioCuartaPerfecta: 'Quarte Juste',
|
|
103
|
+
ratioCuartaAumentada: 'Quarte Augmentée',
|
|
104
|
+
ratioQuintaPerfecta: 'Quinte Juste',
|
|
105
|
+
ratioProporcionAurea: 'Section Dorée',
|
|
106
|
+
ratioSextaMayor: 'Sixte Majeure',
|
|
107
|
+
ratioSeptimaMenor: 'Septième Mineure',
|
|
108
|
+
ratioSeptimaMayor: 'Septième Majeure',
|
|
109
|
+
ratioOctava: 'Octave',
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const content: ToolLocaleContent<MusicalTypographyUI> = {
|
|
113
|
+
slug,
|
|
114
|
+
title,
|
|
115
|
+
description,
|
|
116
|
+
ui,
|
|
117
|
+
faqTitle: 'Questions fréquentes',
|
|
118
|
+
faq: faqData,
|
|
119
|
+
bibliographyTitle: 'Références',
|
|
120
|
+
bibliography: [
|
|
121
|
+
{
|
|
122
|
+
name: 'Bringhurst, R. The Elements of Typographic Style',
|
|
123
|
+
url: 'https://en.wikipedia.org/wiki/The_Elements_of_Typographic_Style',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'Brown, T. More Meaningful Typography. A List Apart',
|
|
127
|
+
url: 'https://alistapart.com/article/more-meaningful-typography/',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'Physics of Music. Musical Intervals and Scales',
|
|
131
|
+
url: 'https://es.scribd.com/document/199729396/Physics-of-Music-Notes',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
howTo: howToData,
|
|
135
|
+
schemas: [faqSchema, howToSchema, appSchema],
|
|
136
|
+
seo: [
|
|
137
|
+
{
|
|
138
|
+
type: 'title',
|
|
139
|
+
text: "L'harmonie invisible du design web",
|
|
140
|
+
level: 2,
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: 'paragraph',
|
|
144
|
+
html: "L'<strong>Échelle de Typographie Musicale</strong> applique les mathématiques des intervalles musicaux au design typographique. Tout comme une composition musicale est régie par des proportions précises, un design visuel solide bénéficie d'une structure mathématique qui relie toutes les tailles entre elles.",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'title',
|
|
148
|
+
text: "Comment fonctionne l'échelle modulaire",
|
|
149
|
+
level: 3,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'grid',
|
|
153
|
+
columns: 2,
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: 'card',
|
|
157
|
+
title: 'La formule',
|
|
158
|
+
html: '<p>La progression est simple : <code>Taille = Base × Ratio<sup>n</sup></code>. L\'étape 0 est votre texte de base. L\'étape 1 est un petit sous-titre. L\'étape 4 ou 5 pourrait être votre H1 principal. La même constante multiplicative garantit que toutes les relations sont cohérentes.</p>',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'card',
|
|
162
|
+
title: 'Pourquoi "Musical"',
|
|
163
|
+
html: "<p>Les Pythagoriciens ont découvert que diviser une corde en proportions simples (1:2, 2:3, 3:4) produisait des sons consonants. Ces intervalles, octave, quinte juste et quarte juste, sont exactement les ratios typographiques. Vous composez de la musique visuelle.</p>",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'title',
|
|
167
|
+
text: 'Choisir le bon ratio',
|
|
168
|
+
level: 3,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: 'tip',
|
|
172
|
+
html: 'Pour les interfaces denses (tableaux de bord, tableaux), utilisez de petits ratios comme <code>1,125</code> ou <code>1,2</code>. Pour les sites éditoriaux ou portfolios, utilisez des ratios plus expressifs comme <code>1,5</code> ou <code>1,618</code>.',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'paragraph',
|
|
176
|
+
html: "Ne limitez pas l'échelle au seul <code>font-size</code>. Les mêmes variables CSS fonctionnent pour <code>margin</code>, <code>padding</code> et <code>gap</code>. Quand les espaces blancs suivent la même progression mathématique que le texte, le design atteint un niveau de cohésion que tout le monde ressent mais que peu peuvent expliquer.",
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DeveloperToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
+
import MusicalTypographyComponent from './component.astro';
|
|
3
|
+
import MusicalTypographySEO from './seo.astro';
|
|
4
|
+
import MusicalTypographyBibliography from './bibliography.astro';
|
|
5
|
+
import type { MusicalTypographyUI } from './ui';
|
|
6
|
+
|
|
7
|
+
export type MusicalTypographyLocaleContent = ToolLocaleContent<MusicalTypographyUI>;
|
|
8
|
+
|
|
9
|
+
import { content as es } from './i18n/es';
|
|
10
|
+
import { content as en } from './i18n/en';
|
|
11
|
+
import { content as fr } from './i18n/fr';
|
|
12
|
+
|
|
13
|
+
export const musicalTypography: DeveloperToolEntry<MusicalTypographyUI> = {
|
|
14
|
+
id: 'musical-typography',
|
|
15
|
+
icons: {
|
|
16
|
+
bg: 'mdi:music-note',
|
|
17
|
+
fg: 'mdi:format-size',
|
|
18
|
+
},
|
|
19
|
+
i18n: {
|
|
20
|
+
es: async () => es,
|
|
21
|
+
en: async () => en,
|
|
22
|
+
fr: async () => fr,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { MusicalTypographyComponent, MusicalTypographySEO, MusicalTypographyBibliography };
|
|
27
|
+
|
|
28
|
+
export const MUSICAL_TYPOGRAPHY_TOOL: ToolDefinition = {
|
|
29
|
+
entry: musicalTypography,
|
|
30
|
+
Component: MusicalTypographyComponent,
|
|
31
|
+
SEOComponent: MusicalTypographySEO,
|
|
32
|
+
BibliographyComponent: MusicalTypographyBibliography,
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { musicalTypography } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await musicalTypography.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface MusicalTypographyUI extends Record<string, string> {
|
|
2
|
+
labelConfig: string;
|
|
3
|
+
labelBaseSize: string;
|
|
4
|
+
hintBaseSize: string;
|
|
5
|
+
labelRatio: string;
|
|
6
|
+
hintRatio: string;
|
|
7
|
+
labelCalculated: string;
|
|
8
|
+
labelPreview: string;
|
|
9
|
+
btnCopyCss: string;
|
|
10
|
+
feedbackCopied: string;
|
|
11
|
+
previewText: string;
|
|
12
|
+
previewSubtext: string;
|
|
13
|
+
ratioSecundaMenor: string;
|
|
14
|
+
ratioSegundaMayor: string;
|
|
15
|
+
ratioTerceraMenor: string;
|
|
16
|
+
ratioTerceraMayor: string;
|
|
17
|
+
ratioCuartaPerfecta: string;
|
|
18
|
+
ratioCuartaAumentada: string;
|
|
19
|
+
ratioQuintaPerfecta: string;
|
|
20
|
+
ratioProporcionAurea: string;
|
|
21
|
+
ratioSextaMayor: string;
|
|
22
|
+
ratioSeptimaMenor: string;
|
|
23
|
+
ratioSeptimaMayor: string;
|
|
24
|
+
ratioOctava: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { placeholderGenerator } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await placeholderGenerator.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|