@jjlmoya/utils-alcohol 1.6.0 → 1.7.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 +1 -1
- package/src/tool/alcoholClearance/bibliography.astro +14 -0
- package/src/tool/alcoholClearance/index.ts +4 -0
- package/src/tool/alcoholClearance/seo.astro +53 -0
- package/src/tool/beerCooler/bibliography.astro +14 -0
- package/src/tool/beerCooler/index.ts +4 -0
- package/src/tool/beerCooler/seo.astro +53 -0
- package/src/tool/carbonationCalculator/bibliography.astro +14 -0
- package/src/tool/carbonationCalculator/index.ts +4 -0
- package/src/tool/carbonationCalculator/seo.astro +53 -0
- package/src/tool/partyKeg/bibliography.astro +14 -0
- package/src/tool/partyKeg/index.ts +4 -0
- package/src/tool/partyKeg/seo.astro +53 -0
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { alcoholClearance } 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 alcoholClearance.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
2
|
import AlcoholClearanceCalculator from './component.astro';
|
|
3
|
+
import AlcoholClearanceSEO from './seo.astro';
|
|
4
|
+
import AlcoholClearanceBibliography from './bibliography.astro';
|
|
3
5
|
|
|
4
6
|
export interface AlcoholClearanceUI {
|
|
5
7
|
[key: string]: string;
|
|
@@ -47,4 +49,6 @@ export { AlcoholClearanceCalculator };
|
|
|
47
49
|
export const ALCOHOL_CLEARANCE_TOOL: ToolDefinition = {
|
|
48
50
|
entry: alcoholClearance as AlcoholToolEntry<Record<string, string>>,
|
|
49
51
|
Component: AlcoholClearanceCalculator,
|
|
52
|
+
SEOComponent: AlcoholClearanceSEO,
|
|
53
|
+
BibliographyComponent: AlcoholClearanceBibliography,
|
|
50
54
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
SEOTitle, SEOTable, SEOTip, SEOCard, SEOStats,
|
|
4
|
+
SEOGlossary, SEOProsCons, SEOSummary, SEODiagnostic, SEOArticle
|
|
5
|
+
} from '@jjlmoya/utils-shared';
|
|
6
|
+
import { alcoholClearance } from './index';
|
|
7
|
+
import type { KnownLocale } from '../../types';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
locale?: KnownLocale;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { locale = 'es' } = Astro.props;
|
|
14
|
+
const content = await alcoholClearance.i18n[locale]?.();
|
|
15
|
+
if (!content) return null;
|
|
16
|
+
|
|
17
|
+
const { seo } = content;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<SEOArticle>
|
|
21
|
+
{seo.map((section: any) => {
|
|
22
|
+
switch (section.type) {
|
|
23
|
+
case 'summary':
|
|
24
|
+
return <SEOSummary title={section.title} items={section.items} />;
|
|
25
|
+
case 'title':
|
|
26
|
+
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
27
|
+
case 'paragraph':
|
|
28
|
+
return <p set:html={section.html} />;
|
|
29
|
+
case 'stats':
|
|
30
|
+
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
31
|
+
case 'card':
|
|
32
|
+
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
33
|
+
case 'tip':
|
|
34
|
+
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
35
|
+
case 'table':
|
|
36
|
+
return (
|
|
37
|
+
<SEOTable headers={section.headers}>
|
|
38
|
+
{section.rows.map((row: string[]) => (
|
|
39
|
+
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
40
|
+
))}
|
|
41
|
+
</SEOTable>
|
|
42
|
+
);
|
|
43
|
+
case 'proscons':
|
|
44
|
+
return <SEOProsCons title={section.title} items={section.items} />;
|
|
45
|
+
case 'diagnostic':
|
|
46
|
+
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
47
|
+
case 'glossary':
|
|
48
|
+
return <SEOGlossary items={section.items} />;
|
|
49
|
+
default:
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
})}
|
|
53
|
+
</SEOArticle>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { beerCooler } 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 beerCooler.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
2
|
import BeerCoolerCalculator from './component.astro';
|
|
3
|
+
import BeerCoolerSEO from './seo.astro';
|
|
4
|
+
import BeerCoolerBibliography from './bibliography.astro';
|
|
3
5
|
|
|
4
6
|
export interface BeerCoolerUI {
|
|
5
7
|
[key: string]: string;
|
|
@@ -46,4 +48,6 @@ export { BeerCoolerCalculator };
|
|
|
46
48
|
export const BEER_COOLER_TOOL: ToolDefinition = {
|
|
47
49
|
entry: beerCooler as AlcoholToolEntry<Record<string, string>>,
|
|
48
50
|
Component: BeerCoolerCalculator,
|
|
51
|
+
SEOComponent: BeerCoolerSEO,
|
|
52
|
+
BibliographyComponent: BeerCoolerBibliography,
|
|
49
53
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
SEOTitle, SEOTable, SEOTip, SEOCard, SEOStats,
|
|
4
|
+
SEOGlossary, SEOProsCons, SEOSummary, SEODiagnostic, SEOArticle
|
|
5
|
+
} from '@jjlmoya/utils-shared';
|
|
6
|
+
import { beerCooler } from './index';
|
|
7
|
+
import type { KnownLocale } from '../../types';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
locale?: KnownLocale;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { locale = 'es' } = Astro.props;
|
|
14
|
+
const content = await beerCooler.i18n[locale]?.();
|
|
15
|
+
if (!content) return null;
|
|
16
|
+
|
|
17
|
+
const { seo } = content;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<SEOArticle>
|
|
21
|
+
{seo.map((section: any) => {
|
|
22
|
+
switch (section.type) {
|
|
23
|
+
case 'summary':
|
|
24
|
+
return <SEOSummary title={section.title} items={section.items} />;
|
|
25
|
+
case 'title':
|
|
26
|
+
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
27
|
+
case 'paragraph':
|
|
28
|
+
return <p set:html={section.html} />;
|
|
29
|
+
case 'stats':
|
|
30
|
+
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
31
|
+
case 'card':
|
|
32
|
+
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
33
|
+
case 'tip':
|
|
34
|
+
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
35
|
+
case 'table':
|
|
36
|
+
return (
|
|
37
|
+
<SEOTable headers={section.headers}>
|
|
38
|
+
{section.rows.map((row: string[]) => (
|
|
39
|
+
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
40
|
+
))}
|
|
41
|
+
</SEOTable>
|
|
42
|
+
);
|
|
43
|
+
case 'proscons':
|
|
44
|
+
return <SEOProsCons title={section.title} items={section.items} />;
|
|
45
|
+
case 'diagnostic':
|
|
46
|
+
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
47
|
+
case 'glossary':
|
|
48
|
+
return <SEOGlossary items={section.items} />;
|
|
49
|
+
default:
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
})}
|
|
53
|
+
</SEOArticle>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { carbonationCalculator } 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 carbonationCalculator.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
2
|
import CarbonationCalculator from './component.astro';
|
|
3
|
+
import CarbonationSEO from './seo.astro';
|
|
4
|
+
import CarbonationBibliography from './bibliography.astro';
|
|
3
5
|
|
|
4
6
|
export interface CarbonationUI {
|
|
5
7
|
[key: string]: string;
|
|
@@ -45,4 +47,6 @@ export { CarbonationCalculator };
|
|
|
45
47
|
export const CARBONATION_TOOL: ToolDefinition = {
|
|
46
48
|
entry: carbonationCalculator as AlcoholToolEntry<Record<string, string>>,
|
|
47
49
|
Component: CarbonationCalculator,
|
|
50
|
+
SEOComponent: CarbonationSEO,
|
|
51
|
+
BibliographyComponent: CarbonationBibliography,
|
|
48
52
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
SEOTitle, SEOTable, SEOTip, SEOCard, SEOStats,
|
|
4
|
+
SEOGlossary, SEOProsCons, SEOSummary, SEODiagnostic, SEOArticle
|
|
5
|
+
} from '@jjlmoya/utils-shared';
|
|
6
|
+
import { carbonationCalculator } from './index';
|
|
7
|
+
import type { KnownLocale } from '../../types';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
locale?: KnownLocale;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { locale = 'es' } = Astro.props;
|
|
14
|
+
const content = await carbonationCalculator.i18n[locale]?.();
|
|
15
|
+
if (!content) return null;
|
|
16
|
+
|
|
17
|
+
const { seo } = content;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<SEOArticle>
|
|
21
|
+
{seo.map((section: any) => {
|
|
22
|
+
switch (section.type) {
|
|
23
|
+
case 'summary':
|
|
24
|
+
return <SEOSummary title={section.title} items={section.items} />;
|
|
25
|
+
case 'title':
|
|
26
|
+
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
27
|
+
case 'paragraph':
|
|
28
|
+
return <p set:html={section.html} />;
|
|
29
|
+
case 'stats':
|
|
30
|
+
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
31
|
+
case 'card':
|
|
32
|
+
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
33
|
+
case 'tip':
|
|
34
|
+
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
35
|
+
case 'table':
|
|
36
|
+
return (
|
|
37
|
+
<SEOTable headers={section.headers}>
|
|
38
|
+
{section.rows.map((row: string[]) => (
|
|
39
|
+
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
40
|
+
))}
|
|
41
|
+
</SEOTable>
|
|
42
|
+
);
|
|
43
|
+
case 'proscons':
|
|
44
|
+
return <SEOProsCons title={section.title} items={section.items} />;
|
|
45
|
+
case 'diagnostic':
|
|
46
|
+
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
47
|
+
case 'glossary':
|
|
48
|
+
return <SEOGlossary items={section.items} />;
|
|
49
|
+
default:
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
})}
|
|
53
|
+
</SEOArticle>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { partyKeg } 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 partyKeg.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
2
|
import PartyKegCalculator from './component.astro';
|
|
3
|
+
import PartyKegSEO from './seo.astro';
|
|
4
|
+
import PartyKegBibliography from './bibliography.astro';
|
|
3
5
|
|
|
4
6
|
export interface PartyKegUI {
|
|
5
7
|
[key: string]: string;
|
|
@@ -43,4 +45,6 @@ export { PartyKegCalculator };
|
|
|
43
45
|
export const PARTY_KEG_TOOL: ToolDefinition = {
|
|
44
46
|
entry: partyKeg as AlcoholToolEntry<Record<string, string>>,
|
|
45
47
|
Component: PartyKegCalculator,
|
|
48
|
+
SEOComponent: PartyKegSEO,
|
|
49
|
+
BibliographyComponent: PartyKegBibliography,
|
|
46
50
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import {
|
|
3
|
+
SEOTitle, SEOTable, SEOTip, SEOCard, SEOStats,
|
|
4
|
+
SEOGlossary, SEOProsCons, SEOSummary, SEODiagnostic, SEOArticle
|
|
5
|
+
} from '@jjlmoya/utils-shared';
|
|
6
|
+
import { partyKeg } from './index';
|
|
7
|
+
import type { KnownLocale } from '../../types';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
locale?: KnownLocale;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { locale = 'es' } = Astro.props;
|
|
14
|
+
const content = await partyKeg.i18n[locale]?.();
|
|
15
|
+
if (!content) return null;
|
|
16
|
+
|
|
17
|
+
const { seo } = content;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<SEOArticle>
|
|
21
|
+
{seo.map((section: any) => {
|
|
22
|
+
switch (section.type) {
|
|
23
|
+
case 'summary':
|
|
24
|
+
return <SEOSummary title={section.title} items={section.items} />;
|
|
25
|
+
case 'title':
|
|
26
|
+
return <SEOTitle title={section.text} level={section.level || 2} />;
|
|
27
|
+
case 'paragraph':
|
|
28
|
+
return <p set:html={section.html} />;
|
|
29
|
+
case 'stats':
|
|
30
|
+
return <SEOStats stats={section.items} columns={section.columns} />;
|
|
31
|
+
case 'card':
|
|
32
|
+
return <SEOCard title={section.title} icon={section.icon}><Fragment set:html={section.html} /></SEOCard>;
|
|
33
|
+
case 'tip':
|
|
34
|
+
return <SEOTip title={section.title}><Fragment set:html={section.html} /></SEOTip>;
|
|
35
|
+
case 'table':
|
|
36
|
+
return (
|
|
37
|
+
<SEOTable headers={section.headers}>
|
|
38
|
+
{section.rows.map((row: string[]) => (
|
|
39
|
+
<tr>{row.map((cell: string) => <td set:html={cell} />)}</tr>
|
|
40
|
+
))}
|
|
41
|
+
</SEOTable>
|
|
42
|
+
);
|
|
43
|
+
case 'proscons':
|
|
44
|
+
return <SEOProsCons title={section.title} items={section.items} />;
|
|
45
|
+
case 'diagnostic':
|
|
46
|
+
return <SEODiagnostic title={section.title} icon={section.icon} type={section.variant} badge={section.badge}><Fragment set:html={section.html} /></SEODiagnostic>;
|
|
47
|
+
case 'glossary':
|
|
48
|
+
return <SEOGlossary items={section.items} />;
|
|
49
|
+
default:
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
})}
|
|
53
|
+
</SEOArticle>
|