@jjlmoya/utils-nautical 1.14.0 → 1.16.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.
Files changed (125) hide show
  1. package/package.json +1 -1
  2. package/src/pages/[locale]/[slug].astro +28 -12
  3. package/src/tests/locale_completeness.test.ts +1 -31
  4. package/src/tests/shared-test-helpers.ts +56 -0
  5. package/src/tests/tool_exports.test.ts +34 -0
  6. package/src/tool/endurance/bibliography.astro +1 -1
  7. package/src/tool/endurance/bibliography.ts +12 -0
  8. package/src/tool/endurance/entry.ts +2 -2
  9. package/src/tool/endurance/i18n/de.ts +1 -13
  10. package/src/tool/endurance/i18n/en.ts +1 -12
  11. package/src/tool/endurance/i18n/es.ts +1 -13
  12. package/src/tool/endurance/i18n/fr.ts +1 -13
  13. package/src/tool/endurance/i18n/id.ts +1 -13
  14. package/src/tool/endurance/i18n/it.ts +1 -13
  15. package/src/tool/endurance/i18n/ja.ts +1 -13
  16. package/src/tool/endurance/i18n/ko.ts +1 -13
  17. package/src/tool/endurance/i18n/nl.ts +1 -13
  18. package/src/tool/endurance/i18n/pl.ts +1 -13
  19. package/src/tool/endurance/i18n/pt.ts +1 -13
  20. package/src/tool/endurance/i18n/ru.ts +1 -13
  21. package/src/tool/endurance/i18n/sv.ts +1 -13
  22. package/src/tool/endurance/i18n/tr.ts +1 -13
  23. package/src/tool/endurance/i18n/zh.ts +1 -13
  24. package/src/tool/endurance/nautical-endurance-calculator.css +1 -1
  25. package/src/tool/endurance/seo.astro +2 -42
  26. package/src/tool/nauticalConverter/bibliography.astro +1 -1
  27. package/src/tool/nauticalConverter/bibliography.ts +12 -0
  28. package/src/tool/nauticalConverter/entry.ts +2 -2
  29. package/src/tool/nauticalConverter/i18n/de.ts +1 -13
  30. package/src/tool/nauticalConverter/i18n/en.ts +1 -13
  31. package/src/tool/nauticalConverter/i18n/es.ts +1 -13
  32. package/src/tool/nauticalConverter/i18n/fr.ts +1 -13
  33. package/src/tool/nauticalConverter/i18n/id.ts +1 -13
  34. package/src/tool/nauticalConverter/i18n/it.ts +1 -13
  35. package/src/tool/nauticalConverter/i18n/ja.ts +1 -13
  36. package/src/tool/nauticalConverter/i18n/ko.ts +1 -13
  37. package/src/tool/nauticalConverter/i18n/nl.ts +1 -13
  38. package/src/tool/nauticalConverter/i18n/pl.ts +1 -13
  39. package/src/tool/nauticalConverter/i18n/pt.ts +1 -13
  40. package/src/tool/nauticalConverter/i18n/ru.ts +1 -13
  41. package/src/tool/nauticalConverter/i18n/sv.ts +1 -13
  42. package/src/tool/nauticalConverter/i18n/tr.ts +1 -13
  43. package/src/tool/nauticalConverter/i18n/zh.ts +1 -13
  44. package/src/tool/nauticalConverter/nautical-units-converter.css +1 -1
  45. package/src/tool/nauticalConverter/seo.astro +2 -39
  46. package/src/tool/sailArea/bibliography.astro +1 -1
  47. package/src/tool/sailArea/bibliography.ts +16 -0
  48. package/src/tool/sailArea/entry.ts +2 -2
  49. package/src/tool/sailArea/i18n/de.ts +1 -17
  50. package/src/tool/sailArea/i18n/en.ts +1 -17
  51. package/src/tool/sailArea/i18n/es.ts +1 -17
  52. package/src/tool/sailArea/i18n/fr.ts +1 -17
  53. package/src/tool/sailArea/i18n/id.ts +1 -17
  54. package/src/tool/sailArea/i18n/it.ts +1 -17
  55. package/src/tool/sailArea/i18n/ja.ts +1 -17
  56. package/src/tool/sailArea/i18n/ko.ts +1 -17
  57. package/src/tool/sailArea/i18n/nl.ts +1 -17
  58. package/src/tool/sailArea/i18n/pl.ts +1 -17
  59. package/src/tool/sailArea/i18n/pt.ts +1 -17
  60. package/src/tool/sailArea/i18n/ru.ts +1 -17
  61. package/src/tool/sailArea/i18n/sv.ts +1 -17
  62. package/src/tool/sailArea/i18n/tr.ts +1 -17
  63. package/src/tool/sailArea/i18n/zh.ts +1 -17
  64. package/src/tool/sailArea/sail-area-calculator.css +2 -2
  65. package/src/tool/sailArea/seo.astro +2 -39
  66. package/src/tool/speedConverter/bibliography.astro +1 -1
  67. package/src/tool/speedConverter/bibliography.ts +12 -0
  68. package/src/tool/speedConverter/entry.ts +2 -2
  69. package/src/tool/speedConverter/i18n/de.ts +1 -13
  70. package/src/tool/speedConverter/i18n/en.ts +1 -13
  71. package/src/tool/speedConverter/i18n/es.ts +1 -13
  72. package/src/tool/speedConverter/i18n/fr.ts +1 -13
  73. package/src/tool/speedConverter/i18n/id.ts +1 -13
  74. package/src/tool/speedConverter/i18n/it.ts +1 -13
  75. package/src/tool/speedConverter/i18n/ja.ts +1 -13
  76. package/src/tool/speedConverter/i18n/ko.ts +1 -13
  77. package/src/tool/speedConverter/i18n/nl.ts +1 -13
  78. package/src/tool/speedConverter/i18n/pl.ts +1 -13
  79. package/src/tool/speedConverter/i18n/pt.ts +1 -13
  80. package/src/tool/speedConverter/i18n/ru.ts +1 -13
  81. package/src/tool/speedConverter/i18n/sv.ts +1 -13
  82. package/src/tool/speedConverter/i18n/tr.ts +1 -13
  83. package/src/tool/speedConverter/i18n/zh.ts +1 -13
  84. package/src/tool/speedConverter/nautical-speed-converter.css +1 -1
  85. package/src/tool/speedConverter/seo.astro +2 -30
  86. package/src/tool/tideCalculator/bibliography.astro +1 -1
  87. package/src/tool/tideCalculator/bibliography.ts +12 -0
  88. package/src/tool/tideCalculator/entry.ts +2 -2
  89. package/src/tool/tideCalculator/i18n/de.ts +1 -13
  90. package/src/tool/tideCalculator/i18n/en.ts +1 -13
  91. package/src/tool/tideCalculator/i18n/es.ts +1 -13
  92. package/src/tool/tideCalculator/i18n/fr.ts +1 -13
  93. package/src/tool/tideCalculator/i18n/id.ts +1 -13
  94. package/src/tool/tideCalculator/i18n/it.ts +1 -13
  95. package/src/tool/tideCalculator/i18n/ja.ts +1 -13
  96. package/src/tool/tideCalculator/i18n/ko.ts +1 -13
  97. package/src/tool/tideCalculator/i18n/nl.ts +1 -13
  98. package/src/tool/tideCalculator/i18n/pl.ts +1 -13
  99. package/src/tool/tideCalculator/i18n/pt.ts +1 -13
  100. package/src/tool/tideCalculator/i18n/ru.ts +1 -13
  101. package/src/tool/tideCalculator/i18n/sv.ts +1 -13
  102. package/src/tool/tideCalculator/i18n/tr.ts +1 -13
  103. package/src/tool/tideCalculator/i18n/zh.ts +1 -13
  104. package/src/tool/tideCalculator/seo.astro +2 -48
  105. package/src/tool/tideCalculator/tide-height-calculator.css +4 -4
  106. package/src/tool/underKeel/bibliography.astro +1 -1
  107. package/src/tool/underKeel/bibliography.ts +12 -0
  108. package/src/tool/underKeel/entry.ts +2 -2
  109. package/src/tool/underKeel/i18n/de.ts +1 -13
  110. package/src/tool/underKeel/i18n/en.ts +1 -13
  111. package/src/tool/underKeel/i18n/es.ts +1 -13
  112. package/src/tool/underKeel/i18n/fr.ts +1 -13
  113. package/src/tool/underKeel/i18n/id.ts +2 -14
  114. package/src/tool/underKeel/i18n/it.ts +2 -14
  115. package/src/tool/underKeel/i18n/ja.ts +2 -14
  116. package/src/tool/underKeel/i18n/ko.ts +2 -14
  117. package/src/tool/underKeel/i18n/nl.ts +2 -14
  118. package/src/tool/underKeel/i18n/pl.ts +2 -14
  119. package/src/tool/underKeel/i18n/pt.ts +2 -14
  120. package/src/tool/underKeel/i18n/ru.ts +2 -14
  121. package/src/tool/underKeel/i18n/sv.ts +2 -14
  122. package/src/tool/underKeel/i18n/tr.ts +2 -14
  123. package/src/tool/underKeel/i18n/zh.ts +2 -14
  124. package/src/tool/underKeel/seo.astro +2 -33
  125. package/src/tool/underKeel/under-keel-clearance-calculator.css +1 -1
@@ -1,13 +1,5 @@
1
1
  ---
2
- import {
3
- SEOTitle,
4
- SEOTable,
5
- SEOTip,
6
- SEOGlossary,
7
- SEOArticle,
8
- SEOStats,
9
- SEOComparative,
10
- } from '@jjlmoya/utils-shared';
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
11
3
  import { sailArea } from './index';
12
4
  import type { KnownLocale } from '../../types';
13
5
 
@@ -18,35 +10,6 @@ interface Props {
18
10
  const { locale = 'es' } = Astro.props;
19
11
  const content = await sailArea.i18n[locale]?.();
20
12
  if (!content) return null;
21
-
22
- const { seo } = content;
23
13
  ---
24
14
 
25
- <SEOArticle>
26
- {seo.map((section: any) => {
27
- switch (section.type) {
28
- case 'title':
29
- return <SEOTitle title={section.text} level={section.level || 2} />;
30
- case 'paragraph':
31
- return <p set:html={section.html} />;
32
- case 'tip':
33
- return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
34
- case 'table':
35
- return (
36
- <SEOTable headers={section.headers}>
37
- {section.rows.map((row: string[]) => (
38
- <tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
39
- ))}
40
- </SEOTable>
41
- );
42
- case 'glossary':
43
- return <SEOGlossary items={section.items} />;
44
- case 'stats':
45
- return <SEOStats stats={section.items} columns={section.columns} />;
46
- case 'comparative':
47
- return <SEOComparative items={section.items} columns={section.columns} />;
48
- default:
49
- return null;
50
- }
51
- })}
52
- </SEOArticle>
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -11,4 +11,4 @@ const { locale = 'es' } = Astro.props;
11
11
  const content = await speedConverter.i18n[locale]?.();
12
12
  ---
13
13
 
14
- {content && <SharedBibliography links={content.bibliography} title={content.ui.bibliographyTitle} />}
14
+ {content && <SharedBibliography links={content.bibliography} />}
@@ -0,0 +1,12 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export const bibliography: BibliographyEntry[] = [
4
+ {
5
+ name: 'Met Office - The Beaufort Scale',
6
+ url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
7
+ },
8
+ {
9
+ name: 'IMO - International Maritime Organization',
10
+ url: 'https://www.imo.org/',
11
+ },
12
+ ];
@@ -13,8 +13,6 @@ export interface SpeedConverterUI {
13
13
  effectLabel: string;
14
14
  seaStateLabel: string;
15
15
  windEffectLabel: string;
16
- faqTitle: string;
17
- bibliographyTitle: string;
18
16
  beaufortDataJson: string;
19
17
  }
20
18
 
@@ -44,3 +42,5 @@ export const speedConverter: NauticalToolEntry<SpeedConverterUI> = {
44
42
  zh: () => import('./i18n/zh').then((m) => m.content),
45
43
  },
46
44
  };
45
+
46
+ export { bibliography } from './bibliography';
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Visueller Effekt',
35
36
  seaStateLabel: 'Seegang',
36
37
  windEffectLabel: 'Effekt an Land',
37
- faqTitle: 'Häufig gestellte Fragen',
38
- bibliographyTitle: 'Bibliografie',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Visual Effect',
35
36
  seaStateLabel: 'Sea State',
36
37
  windEffectLabel: 'Land Effect',
37
- faqTitle: 'Frequently Asked Questions',
38
- bibliographyTitle: 'Bibliography',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Efecto Visual',
35
36
  seaStateLabel: 'Estado del Mar',
36
37
  windEffectLabel: 'Efecto en Tierra',
37
- faqTitle: 'Preguntas Frecuentes',
38
- bibliographyTitle: 'Referencias',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Effet Visuel',
35
36
  seaStateLabel: 'Etat de la Mer',
36
37
  windEffectLabel: 'Effet sur Terre',
37
- faqTitle: 'Questions Frequentes',
38
- bibliographyTitle: 'Bibliographie',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'OMI - Organisation Maritime Internationale',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Efek Visual',
35
36
  seaStateLabel: 'Kondisi Laut',
36
37
  windEffectLabel: 'Efek Darat',
37
- faqTitle: 'Pertanyaan yang Sering Diajukan',
38
- bibliographyTitle: 'Bibliografi',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Effetto Visivo',
35
36
  seaStateLabel: 'Stato del Mare',
36
37
  windEffectLabel: 'Effetto a Terra',
37
- faqTitle: 'Domande Frequenti',
38
- bibliographyTitle: 'Bibliografia',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: '視覚的影響',
35
36
  seaStateLabel: '海の状態',
36
37
  windEffectLabel: '陸上の影響',
37
- faqTitle: 'よくある質問',
38
- bibliographyTitle: '参考文献',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: '시각적 영향',
35
36
  seaStateLabel: '해상 상태',
36
37
  windEffectLabel: '육상 영향',
37
- faqTitle: '자주 묻는 질문',
38
- bibliographyTitle: '참고 문헌',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Visueel Effect',
35
36
  seaStateLabel: 'Zeetoestand',
36
37
  windEffectLabel: 'Effect op Land',
37
- faqTitle: 'Veelgestelde Vragen',
38
- bibliographyTitle: 'Bibliografie',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Efekt Wizualny',
35
36
  seaStateLabel: 'Stan Morza',
36
37
  windEffectLabel: 'Efekt na Lądzie',
37
- faqTitle: 'Często Zadawane Pytania',
38
- bibliographyTitle: 'Bibliografia',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Efeito Visual',
35
36
  seaStateLabel: 'Estado do Mar',
36
37
  windEffectLabel: 'Efeito em Terra',
37
- faqTitle: 'Perguntas Frequentes',
38
- bibliographyTitle: 'Bibliografia',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Визуальный эффект',
35
36
  seaStateLabel: 'Состояние моря',
36
37
  windEffectLabel: 'Эффект на суше',
37
- faqTitle: 'Часто задаваемые вопросы',
38
- bibliographyTitle: 'Библиография',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Visuell effekt',
35
36
  seaStateLabel: 'Sjötillstånd',
36
37
  windEffectLabel: 'Effekt på land',
37
- faqTitle: 'Vanliga frågor',
38
- bibliographyTitle: 'Bibliografi',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: 'Görsel Etki',
35
36
  seaStateLabel: 'Deniz Durumu',
36
37
  windEffectLabel: 'Karadaki Etki',
37
- faqTitle: 'Sıkça Sorulan Sorular',
38
- bibliographyTitle: 'Kaynakça',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -1,3 +1,4 @@
1
+ import { bibliography } from '../bibliography';
1
2
  import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
3
  import type { SpeedConverterUI, SpeedConverterLocaleContent } from '../index';
3
4
 
@@ -34,8 +35,6 @@ const ui: SpeedConverterUI = {
34
35
  effectLabel: '视觉影响',
35
36
  seaStateLabel: '海况',
36
37
  windEffectLabel: '陆地影响',
37
- faqTitle: '常见问题',
38
- bibliographyTitle: '参考文献统计',
39
38
  beaufortDataJson: JSON.stringify(beaufortData),
40
39
  };
41
40
 
@@ -77,17 +76,6 @@ const howTo: SpeedConverterLocaleContent['howTo'] = [
77
76
  },
78
77
  ];
79
78
 
80
- const bibliography: SpeedConverterLocaleContent['bibliography'] = [
81
- {
82
- name: 'Met Office - The Beaufort Scale',
83
- url: 'https://www.metoffice.gov.uk/weather/guides/coast-and-sea/beaufort-scale',
84
- },
85
- {
86
- name: 'IMO - International Maritime Organization',
87
- url: 'https://www.imo.org/',
88
- },
89
- ];
90
-
91
79
  const seo: SpeedConverterLocaleContent['seo'] = [
92
80
  {
93
81
  type: 'title',
@@ -21,7 +21,7 @@
21
21
  gap: 2rem;
22
22
  }
23
23
 
24
- :global(.theme-dark) .speed-converter {
24
+ .theme-dark .speed-converter {
25
25
  --n-bg: #0f172a;
26
26
  --n-bg-muted: #1e293b;
27
27
  --n-text: #f8fafc;
@@ -1,14 +1,5 @@
1
1
  ---
2
- import {
3
- SEOTitle,
4
- SEOTable,
5
- SEOTip,
6
- SEOGlossary,
7
- SEOStats,
8
- SEOComparative,
9
- SEOList,
10
- SEOArticle,
11
- } from '@jjlmoya/utils-shared';
2
+ import { SEORenderer } from '@jjlmoya/utils-shared';
12
3
  import { speedConverter } from './index';
13
4
  import type { KnownLocale } from '../../types';
14
5
 
@@ -19,25 +10,6 @@ interface Props {
19
10
  const { locale = 'es' } = Astro.props;
20
11
  const content = await speedConverter.i18n[locale]?.();
21
12
  if (!content) return null;
22
- const { seo } = content;
23
13
  ---
24
14
 
25
- <SEOArticle>
26
- {seo.map((section: any) => {
27
- switch (section.type) {
28
- case 'title': return <SEOTitle title={section.text} level={section.level || 2} />;
29
- case 'paragraph': return <p set:html={section.html} />;
30
- case 'tip': return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
31
- case 'table': return (
32
- <SEOTable headers={section.headers}>
33
- {section.rows.map((row: string[]) => <tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>)}
34
- </SEOTable>
35
- );
36
- case 'glossary': return <SEOGlossary items={section.items} />;
37
- case 'stats': return <SEOStats stats={section.items} columns={section.columns} />;
38
- case 'comparative': return <SEOComparative items={section.items} columns={section.columns} />;
39
- case 'list': return <SEOList items={section.items} icon={section.icon} />;
40
- default: return null;
41
- }
42
- })}
43
- </SEOArticle>
15
+ {content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
@@ -11,4 +11,4 @@ const { locale = 'es' } = Astro.props;
11
11
  const content = await tideCalculator.i18n[locale]?.();
12
12
  ---
13
13
 
14
- {content && <SharedBibliography links={content.bibliography} title={content.ui.bibliographyTitle} />}
14
+ {content && <SharedBibliography links={content.bibliography} />}
@@ -0,0 +1,12 @@
1
+ import type { BibliographyEntry } from '../../types';
2
+
3
+ export const bibliography: BibliographyEntry[] = [
4
+ {
5
+ name: 'Puertos del Estado - Tide Prediction',
6
+ url: 'https://portus.puertos.es/#/',
7
+ },
8
+ {
9
+ name: 'Instituto Hidrografico de la Marina',
10
+ url: 'https://armada.defensa.gob.es/ihm/',
11
+ },
12
+ ];
@@ -18,8 +18,6 @@ export interface TideCalculatorUI {
18
18
  statusUpLabel: string;
19
19
  statusDownLabel: string;
20
20
  statusOutOfRange: string;
21
- faqTitle: string;
22
- bibliographyTitle: string;
23
21
  }
24
22
 
25
23
  export type TideCalculatorLocaleContent = ToolLocaleContent<TideCalculatorUI>;
@@ -48,3 +46,5 @@ export const tideCalculator: NauticalToolEntry<TideCalculatorUI> = {
48
46
  zh: () => import('./i18n/zh').then((m) => m.content),
49
47
  },
50
48
  };
49
+
50
+ export { bibliography } from './bibliography';