@jjlmoya/utils-astronomy 1.1.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 +60 -0
- package/src/category/i18n/en.ts +57 -0
- package/src/category/i18n/es.ts +57 -0
- package/src/category/i18n/fr.ts +58 -0
- package/src/category/index.ts +16 -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 +19 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +22 -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/faq_count.test.ts +24 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/seo_length.test.ts +57 -0
- package/src/tests/tool_validation.test.ts +145 -0
- package/src/tool/bortleVisualizer/bibliography.astro +14 -0
- package/src/tool/bortleVisualizer/component.astro +491 -0
- package/src/tool/bortleVisualizer/i18n/en.ts +153 -0
- package/src/tool/bortleVisualizer/i18n/es.ts +161 -0
- package/src/tool/bortleVisualizer/i18n/fr.ts +153 -0
- package/src/tool/bortleVisualizer/index.ts +41 -0
- package/src/tool/bortleVisualizer/logic.ts +118 -0
- package/src/tool/bortleVisualizer/seo.astro +61 -0
- package/src/tool/bortleVisualizer/style.css +5 -0
- package/src/tool/deepSpaceScope/bibliography.astro +14 -0
- package/src/tool/deepSpaceScope/component.astro +849 -0
- package/src/tool/deepSpaceScope/i18n/en.ts +157 -0
- package/src/tool/deepSpaceScope/i18n/es.ts +157 -0
- package/src/tool/deepSpaceScope/i18n/fr.ts +157 -0
- package/src/tool/deepSpaceScope/index.ts +48 -0
- package/src/tool/deepSpaceScope/logic.ts +41 -0
- package/src/tool/deepSpaceScope/seo.astro +61 -0
- package/src/tool/deepSpaceScope/style.css +5 -0
- package/src/tool/starExposureCalculator/bibliography.astro +14 -0
- package/src/tool/starExposureCalculator/component.astro +562 -0
- package/src/tool/starExposureCalculator/i18n/en.ts +163 -0
- package/src/tool/starExposureCalculator/i18n/es.ts +163 -0
- package/src/tool/starExposureCalculator/i18n/fr.ts +158 -0
- package/src/tool/starExposureCalculator/index.ts +53 -0
- package/src/tool/starExposureCalculator/logic.ts +49 -0
- package/src/tool/starExposureCalculator/seo.astro +61 -0
- package/src/tool/starExposureCalculator/style.css +5 -0
- package/src/tool/telescopeResolution/bibliography.astro +14 -0
- package/src/tool/telescopeResolution/component.astro +556 -0
- package/src/tool/telescopeResolution/i18n/en.ts +168 -0
- package/src/tool/telescopeResolution/i18n/es.ts +163 -0
- package/src/tool/telescopeResolution/i18n/fr.ts +168 -0
- package/src/tool/telescopeResolution/index.ts +52 -0
- package/src/tool/telescopeResolution/logic.ts +39 -0
- package/src/tool/telescopeResolution/seo.astro +61 -0
- package/src/tool/telescopeResolution/style.css +5 -0
- package/src/tools.ts +19 -0
- package/src/types.ts +71 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
SEOTitle,
|
|
4
|
+
SEOTable,
|
|
5
|
+
SEOTip,
|
|
6
|
+
SEOCard,
|
|
7
|
+
SEOStats,
|
|
8
|
+
SEOGlossary,
|
|
9
|
+
SEOProsCons,
|
|
10
|
+
SEOSummary,
|
|
11
|
+
SEODiagnostic,
|
|
12
|
+
SEOArticle
|
|
13
|
+
} from '@jjlmoya/utils-shared';
|
|
14
|
+
import { bortleVisualizer } from './index';
|
|
15
|
+
import type { KnownLocale } from '../../types';
|
|
16
|
+
|
|
17
|
+
interface Props {
|
|
18
|
+
locale?: KnownLocale;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { locale = 'es' } = Astro.props;
|
|
22
|
+
const content = await bortleVisualizer.i18n[locale]?.();
|
|
23
|
+
if (!content) return null;
|
|
24
|
+
|
|
25
|
+
const { seo } = content;
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<SEOArticle>
|
|
29
|
+
{seo.map((section: any) => {
|
|
30
|
+
switch (section.type) {
|
|
31
|
+
case 'summary':
|
|
32
|
+
return <SEOSummary title={section.title} items={section.items} />;
|
|
33
|
+
case 'title':
|
|
34
|
+
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
35
|
+
case 'paragraph':
|
|
36
|
+
return <p set:html={section.html} />;
|
|
37
|
+
case 'stats':
|
|
38
|
+
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
39
|
+
case 'card':
|
|
40
|
+
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
41
|
+
case 'tip':
|
|
42
|
+
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
43
|
+
case 'table':
|
|
44
|
+
return (
|
|
45
|
+
<SEOTable headers={section.headers}>
|
|
46
|
+
{section.rows.map((row: string[]) => (
|
|
47
|
+
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
48
|
+
))}
|
|
49
|
+
</SEOTable>
|
|
50
|
+
);
|
|
51
|
+
case 'proscons':
|
|
52
|
+
return <SEOProsCons title={section.title} items={section.items} />;
|
|
53
|
+
case 'diagnostic':
|
|
54
|
+
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
55
|
+
case 'glossary':
|
|
56
|
+
return <SEOGlossary items={section.items} />;
|
|
57
|
+
default:
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
})}
|
|
61
|
+
</SEOArticle>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { deepSpaceScope } 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 deepSpaceScope.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|