@jjlmoya/utils-alcohol 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 +19 -0
- package/src/category/i18n/es.ts +28 -0
- package/src/category/i18n/fr.ts +19 -0
- package/src/category/index.ts +12 -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 +19 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +155 -0
- package/src/pages/[locale].astro +271 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/content_mandatory.test.ts +32 -0
- package/src/tests/faq_count.test.ts +17 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/seo_length.test.ts +39 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/alcoholClearance/component.astro +219 -0
- package/src/tool/alcoholClearance/component.css +369 -0
- package/src/tool/alcoholClearance/i18n/en.ts +172 -0
- package/src/tool/alcoholClearance/i18n/es.ts +181 -0
- package/src/tool/alcoholClearance/i18n/fr.ts +163 -0
- package/src/tool/alcoholClearance/index.ts +50 -0
- package/src/tool/alcoholClearance/logic.ts +59 -0
- package/src/tool/beerCooler/component.astro +236 -0
- package/src/tool/beerCooler/component.css +381 -0
- package/src/tool/beerCooler/i18n/en.ts +168 -0
- package/src/tool/beerCooler/i18n/es.ts +181 -0
- package/src/tool/beerCooler/i18n/fr.ts +168 -0
- package/src/tool/beerCooler/index.ts +49 -0
- package/src/tool/beerCooler/logic.ts +34 -0
- package/src/tool/carbonationCalculator/component.astro +225 -0
- package/src/tool/carbonationCalculator/component.css +483 -0
- package/src/tool/carbonationCalculator/i18n/en.ts +175 -0
- package/src/tool/carbonationCalculator/i18n/es.ts +179 -0
- package/src/tool/carbonationCalculator/i18n/fr.ts +175 -0
- package/src/tool/carbonationCalculator/index.ts +48 -0
- package/src/tool/carbonationCalculator/logic.ts +40 -0
- package/src/tool/cocktailBalancer/bibliography.astro +14 -0
- package/src/tool/cocktailBalancer/component.astro +396 -0
- package/src/tool/cocktailBalancer/component.css +1218 -0
- package/src/tool/cocktailBalancer/data/IngredientRepository.ts +83 -0
- package/src/tool/cocktailBalancer/data/Presets.ts +122 -0
- package/src/tool/cocktailBalancer/domain/Ingredient.ts +29 -0
- package/src/tool/cocktailBalancer/i18n/en.ts +193 -0
- package/src/tool/cocktailBalancer/i18n/es.ts +193 -0
- package/src/tool/cocktailBalancer/i18n/fr.ts +193 -0
- package/src/tool/cocktailBalancer/index.ts +68 -0
- package/src/tool/cocktailBalancer/logic.ts +118 -0
- package/src/tool/cocktailBalancer/seo.astro +53 -0
- package/src/tool/partyKeg/component.astro +269 -0
- package/src/tool/partyKeg/component.css +660 -0
- package/src/tool/partyKeg/i18n/en.ts +162 -0
- package/src/tool/partyKeg/i18n/es.ts +166 -0
- package/src/tool/partyKeg/i18n/fr.ts +162 -0
- package/src/tool/partyKeg/index.ts +46 -0
- package/src/tool/partyKeg/logic.ts +36 -0
- package/src/tools.ts +14 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { CarbonationUI, CarbonationLocaleContent } from '../index';
|
|
3
|
+
|
|
4
|
+
const slug = 'beer-carbonation-calculator';
|
|
5
|
+
const title = 'Beer Carbonation & Priming Calculator';
|
|
6
|
+
const description = 'Calculate the exact amount of sugar for bottling your homebrew beer based on volume, temperature and style.';
|
|
7
|
+
|
|
8
|
+
const ui: CarbonationUI = {
|
|
9
|
+
parametersTitle: 'Parameters',
|
|
10
|
+
metricBtn: 'Metric',
|
|
11
|
+
imperialBtn: 'Imperial',
|
|
12
|
+
volumeLabel: 'Beer Volume',
|
|
13
|
+
maxTempLabel: 'Maximum Temperature',
|
|
14
|
+
litersUnit: 'Liters',
|
|
15
|
+
celsiusUnit: '°C',
|
|
16
|
+
gallonsUnit: 'Gallons',
|
|
17
|
+
fahrenheitUnit: '°F',
|
|
18
|
+
desiredCo2Label: 'Desired Carbonation',
|
|
19
|
+
volUnit: 'CO2 Vol',
|
|
20
|
+
resultsTitle: 'Priming Results',
|
|
21
|
+
tableSugarLabel: 'Table Sugar',
|
|
22
|
+
cornSugarLabel: 'Corn Sugar (Dextrose)',
|
|
23
|
+
dmeLabel: 'Dry Malt Extract (DME)',
|
|
24
|
+
safetyTitle: 'EXPLOSION DANGER!',
|
|
25
|
+
lowCarbonation: 'LOW CARBONATION',
|
|
26
|
+
optimalCarbonation: 'OPTIMAL CARBONATION',
|
|
27
|
+
highEffervescence: 'HIGH EFFERVESCENCE',
|
|
28
|
+
bubblingVisualizationLabel: 'Approximate bubble visualization'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const faqTitle = 'Frequently Asked Questions';
|
|
32
|
+
const bibliographyTitle = 'Bibliography & Sources';
|
|
33
|
+
|
|
34
|
+
const faq: CarbonationLocaleContent['faq'] = [
|
|
35
|
+
{
|
|
36
|
+
question: "Why does temperature matter for carbonation?",
|
|
37
|
+
answer: "The residual CO2 in your beer depends on the highest temperature reached after fermentation. Cold liquid holds more dissolved gas than warm liquid.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
question: "What sugar is best for priming?",
|
|
41
|
+
answer: "Dextrose (corn sugar) is preferred because it is neutral and dissolves quickly. Table sugar works well but requires about 10% less weight.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
question: "What happens if I add too much priming sugar?",
|
|
45
|
+
answer: "Over-priming generates excess CO2 pressure inside the bottle. Standard glass bottles fail at approximately 3.5-4.0 volumes of CO2. Beyond this point, the bottle can rupture or the cap can blow off violently. This is why precision matters — even 5 extra grams per liter can push a batch into the danger zone.",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const howTo: CarbonationLocaleContent['howTo'] = [
|
|
50
|
+
{
|
|
51
|
+
name: "Measure real volume",
|
|
52
|
+
text: "Indicate how many liters (or gallons) of beer you have ready for bottling after fermentation is complete.",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Define fermentation temperature",
|
|
56
|
+
text: "Enter the highest temperature the beer reached during or after active fermentation.",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "Choose style or CO2 volume",
|
|
60
|
+
text: "Select the desired carbonation level. Styles vary from 1.5 (Stouts) to 4.5 (Wheat Beers).",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const bibliography: CarbonationLocaleContent['bibliography'] = [
|
|
65
|
+
{
|
|
66
|
+
name: "How to Brew: Carbonation Tables - John Palmer",
|
|
67
|
+
url: "http://howtobrew.com/book/section-1/priming-and-bottling/priming-solutions",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "BJCP Style Guidelines: Carbonation Levels",
|
|
71
|
+
url: "https://www.bjcp.org/stylecenter.php",
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
const seo: CarbonationLocaleContent['seo'] = [
|
|
76
|
+
{
|
|
77
|
+
type: 'title',
|
|
78
|
+
text: 'Ultimate Guide to Carbonation and Priming',
|
|
79
|
+
level: 2
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'paragraph',
|
|
83
|
+
html: 'Master the art of priming and transform your homebrew from a flat experiment into a professional effervescent experience. Priming involves adding a precise amount of sugar so residual yeast in the bottle generates natural CO2 during a secondary fermentation. Too little sugar yields flat beer; too much creates dangerous pressure that can shatter bottles. The difference between the two is a few grams — which is why this calculator exists.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'proscons',
|
|
87
|
+
title: 'Critical Success Factors',
|
|
88
|
+
items: [
|
|
89
|
+
{ pro: 'Temperature: Residual CO2 depends on the post-fermentation temperature peak.', con: '' },
|
|
90
|
+
{ pro: 'Precision: 5 extra grams per liter can be the difference between perfect carbonation and a geyser.', con: '' },
|
|
91
|
+
{ pro: '', con: 'Oxidation: Avoid splashing the liquid when transferring to mix the priming sugar.' }
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'title',
|
|
96
|
+
text: 'CO2 Volumes by Beer Style',
|
|
97
|
+
level: 2
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'stats',
|
|
101
|
+
items: [
|
|
102
|
+
{ label: 'British Stouts', value: '1.5 - 2.0 Vol', icon: 'mdi:beer' },
|
|
103
|
+
{ label: 'IPAs & Ales', value: '2.2 - 2.6 Vol', icon: 'mdi:hops' },
|
|
104
|
+
{ label: 'German Wheat', value: '3.3 - 4.5 Vol', icon: 'mdi:barley' }
|
|
105
|
+
],
|
|
106
|
+
columns: 3
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'card',
|
|
110
|
+
title: 'Which Sugar Should You Choose?',
|
|
111
|
+
icon: 'mdi:corn',
|
|
112
|
+
html: '<strong>Dextrose</strong> is neutral and professional — the industry standard. <strong>Table Sugar</strong> is economical and effective (use 10% less by weight than dextrose). <strong>DME (Dry Malt Extract)</strong> is the purist\'s choice but harder to predict accurately because its fermentability varies by brand and malt composition.'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'diagnostic',
|
|
116
|
+
title: 'Safety Warning',
|
|
117
|
+
icon: 'mdi:alert-decagram',
|
|
118
|
+
variant: 'error',
|
|
119
|
+
badge: 'Danger',
|
|
120
|
+
html: 'Standard glass bottles fail at 3.5-4.0 volumes of CO2. Do not attempt to carbonate Belgian-style or wheat beers in thin glass. Always use bottles rated for sparkling drinks, and never use recycled commercial bottles that may have microscopic structural damage from previous use.'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'tip',
|
|
124
|
+
title: 'Pro Tip: Dissolve the Sugar Properly',
|
|
125
|
+
html: 'Always boil your priming sugar solution (sugar dissolved in approximately 250ml of water per 20L batch) for 10 minutes before adding it to the beer. Boiling sanitizes the solution and ensures the sugar is fully dissolved and evenly distributed throughout the batch, preventing hot spots that cause uneven carbonation between bottles.'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'summary',
|
|
129
|
+
title: 'Who is this tool for?',
|
|
130
|
+
items: [
|
|
131
|
+
'Homebrewers: Get the exact priming sugar calculation for any batch size, style and fermentation temperature.',
|
|
132
|
+
'Craft Beer Enthusiasts: Understand the science behind why commercial beers have different carbonation levels.',
|
|
133
|
+
'Professional Brewers: Cross-check hand calculations before bottling large commercial batches.'
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'Carbonation Science: Henry\'s Law',
|
|
139
|
+
level: 2
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: 'At its core, carbonation is governed by <strong>Henry\'s Law</strong>: the amount of gas dissolved in a liquid is proportional to the partial pressure of that gas above the liquid. When you prime a bottle and seal it, the yeast consumes the sugar and produces CO2 in a sealed environment. As pressure builds, the gas is forced back into solution. The temperature at which this equilibrium occurs determines the final carbonation level — which is why the fermentation temperature is the most critical variable in this calculator.'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'paragraph',
|
|
147
|
+
html: 'The residual CO2 in your beer before priming is not zero. Every beer holds dissolved CO2 from the fermentation process, and the amount retained depends on the highest temperature the beer reached. A beer fermented at 22°C holds significantly less residual CO2 than one that fermented at 16°C, even if both are now chilled. Failing to account for this residual leads to systematic over-carbonation — one of the most common mistakes among beginning homebrewers.'
|
|
148
|
+
}
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
const schemas: CarbonationLocaleContent['schemas'] = [
|
|
152
|
+
{
|
|
153
|
+
'@context': 'https://schema.org',
|
|
154
|
+
'@type': 'SoftwareApplication',
|
|
155
|
+
name: title,
|
|
156
|
+
description: description,
|
|
157
|
+
applicationCategory: 'UtilityApplication',
|
|
158
|
+
operatingSystem: 'Web',
|
|
159
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
160
|
+
} as WithContext<SoftwareApplication>,
|
|
161
|
+
];
|
|
162
|
+
|
|
163
|
+
export const content: CarbonationLocaleContent = {
|
|
164
|
+
slug,
|
|
165
|
+
title,
|
|
166
|
+
description,
|
|
167
|
+
ui,
|
|
168
|
+
seo,
|
|
169
|
+
faqTitle,
|
|
170
|
+
faq,
|
|
171
|
+
bibliographyTitle,
|
|
172
|
+
bibliography,
|
|
173
|
+
howTo,
|
|
174
|
+
schemas,
|
|
175
|
+
};
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { CarbonationUI, CarbonationLocaleContent } from '../index';
|
|
3
|
+
|
|
4
|
+
const slug = 'calculadora-carbonatacion-cerveza';
|
|
5
|
+
const title = 'Calculadora de Carbonatación y Priming';
|
|
6
|
+
const description = 'Calcula la cantidad exacta de azúcar para embotellar tu cerveza casera según el volumen, la temperatura y el estilo.';
|
|
7
|
+
|
|
8
|
+
const ui: CarbonationUI = {
|
|
9
|
+
parametersTitle: 'Parámetros',
|
|
10
|
+
metricBtn: 'Métrico',
|
|
11
|
+
imperialBtn: 'Imperial',
|
|
12
|
+
volumeLabel: 'Volumen de Cerveza',
|
|
13
|
+
maxTempLabel: 'Temperatura Máxima',
|
|
14
|
+
litersUnit: 'Litros',
|
|
15
|
+
celsiusUnit: '°C',
|
|
16
|
+
gallonsUnit: 'Galones',
|
|
17
|
+
fahrenheitUnit: '°F',
|
|
18
|
+
desiredCo2Label: 'Carbonatación Deseada',
|
|
19
|
+
volUnit: 'Vol CO2',
|
|
20
|
+
resultsTitle: 'Resultados de Priming',
|
|
21
|
+
tableSugarLabel: 'Azúcar de Mesa',
|
|
22
|
+
cornSugarLabel: 'Dextrosa (Maíz)',
|
|
23
|
+
dmeLabel: 'Extracto Seco (DME)',
|
|
24
|
+
safetyTitle: '¡PELIGRO EXPLOSIÓN!',
|
|
25
|
+
lowCarbonation: 'BAJA CARBONATACIÓN',
|
|
26
|
+
optimalCarbonation: 'CARBONATACIÓN ÓPTIMA',
|
|
27
|
+
highEffervescence: 'ALTA EFERVESCENCIA',
|
|
28
|
+
bubblingVisualizationLabel: 'Visualización aproximada de burbujas'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const faqTitle = 'Preguntas Frecuentes';
|
|
32
|
+
const bibliographyTitle = 'Bibliografía y Fuentes';
|
|
33
|
+
|
|
34
|
+
const faq: CarbonationLocaleContent['faq'] = [
|
|
35
|
+
{
|
|
36
|
+
question: "¿Por qué influye la temperatura en el cálculo?",
|
|
37
|
+
answer: "El CO2 residual que ya tiene tu cerveza depende de la temperatura máxima alcanzada tras la fermentación. El líquido frío retiene más gas disuelto que el caliente.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
question: "¿Qué azúcar es mejor para el priming?",
|
|
41
|
+
answer: "La dextrosa (azúcar de maíz) es la preferida por ser neutra y disolverse rápido. El azúcar de mesa funciona bien pero requiere un 10% menos de peso.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
question: "¿Qué pasa si añado demasiado azúcar de priming?",
|
|
45
|
+
answer: "Un exceso de azúcar genera una presión de CO2 excesiva dentro de la botella. Las botellas de vidrio estándar fallan a partir de 3.5-4.0 volúmenes de CO2. Por encima de este punto, la botella puede romperse violentamente o el tapón puede saltar disparado. Por eso la precisión es crítica — incluso 5 gramos extra por litro pueden llevar un lote a la zona de peligro.",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const howTo: CarbonationLocaleContent['howTo'] = [
|
|
50
|
+
{
|
|
51
|
+
name: "Medir el volumen real",
|
|
52
|
+
text: "Indica cuántos litros (o galones) de cerveza tienes listos para embotellar una vez terminada la fermentación.",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Definir la temperatura de fermentación",
|
|
56
|
+
text: "Introduce la temperatura más alta que alcanzó la cerveza durante o después de la fermentación activa.",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "Elegir el estilo o volumen de CO2",
|
|
60
|
+
text: "Selecciona el nivel de carbonatación deseado. Los estilos varían desde 1.5 (Stouts) hasta 4.5 (Wheat Beers).",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const bibliography: CarbonationLocaleContent['bibliography'] = [
|
|
65
|
+
{
|
|
66
|
+
name: "How to Brew: Carbonation Tables - John Palmer",
|
|
67
|
+
url: "http://howtobrew.com/book/section-1/priming-and-bottling/priming-solutions",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "BJCP Style Guidelines: Carbonation Levels",
|
|
71
|
+
url: "https://www.bjcp.org/stylecenter.php",
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
const seo: CarbonationLocaleContent['seo'] = [
|
|
76
|
+
{
|
|
77
|
+
type: 'title',
|
|
78
|
+
text: 'Guía Definitiva de Carbonatación y Priming',
|
|
79
|
+
level: 2
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'paragraph',
|
|
83
|
+
html: 'Domina el arte del "priming" y transforma tu cerveza casera de un experimento plano a una experiencia profesional efervescente. El cebado consiste en añadir azúcar para que la levadura genere CO2 natural dentro de la botella.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'proscons',
|
|
87
|
+
title: 'Factores Críticos de Éxito',
|
|
88
|
+
items: [
|
|
89
|
+
{ pro: 'Temperatura: El CO2 residual depende del pico térmico post-fermentación.', con: '' },
|
|
90
|
+
{ pro: 'Precisión: 5 gramos pueden ser la diferencia entre una buena cerveza y un géiser.', con: '' },
|
|
91
|
+
{ pro: '', con: 'Oxidación: Evita chapotear el líquido al trasvasar para mezclar el azúcar.' }
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'title',
|
|
96
|
+
text: 'Volúmenes de CO2 por Estilo',
|
|
97
|
+
level: 2
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'stats',
|
|
101
|
+
items: [
|
|
102
|
+
{ label: 'British Stouts', value: '1.5 - 2.0 Vol', icon: 'mdi:beer' },
|
|
103
|
+
{ label: 'IPAs & Ales', value: '2.2 - 2.6 Vol', icon: 'mdi:hops' },
|
|
104
|
+
{ label: 'German Wheat', value: '3.3 - 4.5 Vol', icon: 'mdi:barley' }
|
|
105
|
+
],
|
|
106
|
+
columns: 3
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'card',
|
|
110
|
+
title: '¿Qué azúcar elegir?',
|
|
111
|
+
icon: 'mdi:corn',
|
|
112
|
+
html: 'La <strong>Dextrosa</strong> es neutra y profesional. El <strong>Azúcar de Mesa</strong> es económica y efectiva (usa un 10% menos). El <strong>DME</strong> es el purista pero más difícil de predecir.'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'diagnostic',
|
|
116
|
+
title: 'Advertencia de Seguridad',
|
|
117
|
+
icon: 'mdi:alert-decagram',
|
|
118
|
+
variant: 'error',
|
|
119
|
+
badge: 'Peligro',
|
|
120
|
+
html: 'Las botellas de vidrio estándar fallan a partir de 3.5-4.0 volúmenes de CO2. No intentes carbonatar estilos belgas o de trigo en vidrio fino. Utiliza siempre botellas homologadas para bebidas con gas, y nunca reutilices botellas comerciales que puedan tener daños estructurales microscópicos por usos anteriores.'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'tip',
|
|
124
|
+
title: 'Consejo Pro: Disuelve el Azúcar Correctamente',
|
|
125
|
+
html: 'Hierve siempre la solución de azúcar de priming (azúcar disuelto en unos 250ml de agua por cada 20L de lote) durante 10 minutos antes de añadirla a la cerveza. La ebullición sanea la solución y garantiza una distribución homogénea en todo el lote, evitando puntos calientes que causan una carbonatación desigual entre botellas.'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'summary',
|
|
129
|
+
title: '¿Para quién es esta herramienta?',
|
|
130
|
+
items: [
|
|
131
|
+
'Cerveceros Caseros: Obtén el cálculo exacto de azúcar de priming para cualquier volumen, estilo y temperatura.',
|
|
132
|
+
'Aficionados a la Cerveza Artesanal: Entiende la ciencia detrás de los distintos niveles de carbonatación.',
|
|
133
|
+
'Cerveceros Profesionales: Verifica cálculos manuales antes de embotellar lotes comerciales importantes.'
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'La Ciencia de la Carbonatación: Ley de Henry',
|
|
139
|
+
level: 2
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: 'En su esencia, la carbonatación está gobernada por la <strong>Ley de Henry</strong>: la cantidad de gas disuelto en un líquido es proporcional a la presión parcial de ese gas sobre el líquido. Cuando primeas una botella y la sellas, la levadura consume el azúcar y produce CO2 en un entorno cerrado. La presión aumenta y el gas es forzado a disolverse de nuevo en el líquido. La temperatura a la que se produce este equilibrio determina el nivel de carbonatación final — por eso la temperatura de fermentación es la variable más crítica en esta calculadora.'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'paragraph',
|
|
147
|
+
html: 'El CO2 residual en tu cerveza antes del priming no es cero. Cada cerveza retiene CO2 disuelto del proceso de fermentación, y la cantidad retenida depende de la temperatura más alta que alcanzó la cerveza. Una cerveza fermentada a 22°C retiene significativamente menos CO2 residual que una fermentada a 16°C, aunque ambas estén ahora frías. No tener en cuenta este residual lleva a una sobre-carbonatación sistemática — uno de los errores más comunes entre los cerveceros principiantes.'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: 'paragraph',
|
|
151
|
+
html: 'El tiempo de condicionamiento también importa. Tras el embotellado con azúcar de priming, la cerveza necesita entre 2 y 3 semanas a temperatura ambiente (18-22°C) para que la levadura fermente completamente el azúcar añadido y el CO2 se integre en el líquido. Una carbonatación prematura — probar la cerveza antes de que el proceso termine — siempre dará una falsa lectura de subida de carbonatación.'
|
|
152
|
+
}
|
|
153
|
+
];
|
|
154
|
+
|
|
155
|
+
const schemas: CarbonationLocaleContent['schemas'] = [
|
|
156
|
+
{
|
|
157
|
+
'@context': 'https://schema.org',
|
|
158
|
+
'@type': 'SoftwareApplication',
|
|
159
|
+
name: title,
|
|
160
|
+
description: description,
|
|
161
|
+
applicationCategory: 'UtilityApplication',
|
|
162
|
+
operatingSystem: 'Web',
|
|
163
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
164
|
+
} as WithContext<SoftwareApplication>,
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
export const content: CarbonationLocaleContent = {
|
|
168
|
+
slug,
|
|
169
|
+
title,
|
|
170
|
+
description,
|
|
171
|
+
ui,
|
|
172
|
+
seo,
|
|
173
|
+
faqTitle,
|
|
174
|
+
faq,
|
|
175
|
+
bibliographyTitle,
|
|
176
|
+
bibliography,
|
|
177
|
+
howTo,
|
|
178
|
+
schemas,
|
|
179
|
+
};
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { WithContext, SoftwareApplication } from 'schema-dts';
|
|
2
|
+
import type { CarbonationUI, CarbonationLocaleContent } from '../index';
|
|
3
|
+
|
|
4
|
+
const slug = 'calculateur-carbonatation-biere';
|
|
5
|
+
const title = 'Calculateur de Carbonatation et Priming';
|
|
6
|
+
const description = 'Calculez la quantité exacte de sucre pour embouteiller votre bière artisanale selon le volume, la température et le style.';
|
|
7
|
+
|
|
8
|
+
const ui: CarbonationUI = {
|
|
9
|
+
parametersTitle: 'Paramètres',
|
|
10
|
+
metricBtn: 'Métrique',
|
|
11
|
+
imperialBtn: 'Impérial',
|
|
12
|
+
volumeLabel: 'Volume de Bière',
|
|
13
|
+
maxTempLabel: 'Température Maximale',
|
|
14
|
+
litersUnit: 'Litres',
|
|
15
|
+
celsiusUnit: '°C',
|
|
16
|
+
gallonsUnit: 'Gallons',
|
|
17
|
+
fahrenheitUnit: '°F',
|
|
18
|
+
desiredCo2Label: 'Carbonatation Souhaitée',
|
|
19
|
+
volUnit: 'Vol CO2',
|
|
20
|
+
resultsTitle: 'Résultats de Priming',
|
|
21
|
+
tableSugarLabel: 'Sucre de Table',
|
|
22
|
+
cornSugarLabel: 'Dextrose (Maïs)',
|
|
23
|
+
dmeLabel: 'Extrait de Malt Sec (DME)',
|
|
24
|
+
safetyTitle: 'DANGER EXPLOSION !',
|
|
25
|
+
lowCarbonation: 'FAIBLE CARBONATATION',
|
|
26
|
+
optimalCarbonation: 'CARBONATATION OPTIMALE',
|
|
27
|
+
highEffervescence: 'HAUTE EFFERVESCENCE',
|
|
28
|
+
bubblingVisualizationLabel: 'Visualisation approximative des bulles'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const faqTitle = 'Foire Aux Questions';
|
|
32
|
+
const bibliographyTitle = 'Bibliographie & Sources';
|
|
33
|
+
|
|
34
|
+
const faq: CarbonationLocaleContent['faq'] = [
|
|
35
|
+
{
|
|
36
|
+
question: "Pourquoi la température influence-t-elle le calcul ?",
|
|
37
|
+
answer: "Le CO2 résiduel déjà présent dans votre bière dépend de la température maximale atteinte après la fermentation. Un liquide froid retient plus de gaz dissous qu'un liquide chaud.",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
question: "Quel sucre est le meilleur pour le priming ?",
|
|
41
|
+
answer: "Le dextrose (sucre de maïs) est préféré car il est neutre et se dissout rapidement. Le sucre de table fonctionne bien mais nécessite environ 10 % de poids en moins.",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
question: "Que se passe-t-il si j'ajoute trop de sucre de priming ?",
|
|
45
|
+
answer: "Un excès de sucre génère une pression de CO2 excessive à l'intérieur de la bouteille. Les bouteilles en verre standard cèdent à environ 3,5-4,0 volumes de CO2. Au-delà, la bouteille peut se rompre violemment ou le bouchon peut sauter. C'est pourquoi la précision est essentielle — même 5 grammes de plus par litre peuvent faire basculer un lot dans la zone de danger.",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const howTo: CarbonationLocaleContent['howTo'] = [
|
|
50
|
+
{
|
|
51
|
+
name: "Mesurer le volume réel",
|
|
52
|
+
text: "Indiquez combien de litres (ou gallons) de bière vous avez prêts à être embouteillés une fois la fermentation terminée.",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Définir la température de fermentation",
|
|
56
|
+
text: "Entrez la température la plus élevée atteinte par la bière pendant ou après la fermentation active.",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "Choisir le style ou le volume de CO2",
|
|
60
|
+
text: "Sélectionnez le niveau de carbonatation souhaité. Les styles varient de 1,5 (Stouts) à 4,5 (Wheat Beers).",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const bibliography: CarbonationLocaleContent['bibliography'] = [
|
|
65
|
+
{
|
|
66
|
+
name: "How to Brew: Carbonation Tables - John Palmer",
|
|
67
|
+
url: "http://howtobrew.com/book/section-1/priming-and-bottling/priming-solutions",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "BJCP Style Guidelines: Carbonation Levels",
|
|
71
|
+
url: "https://www.bjcp.org/stylecenter.php",
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
const seo: CarbonationLocaleContent['seo'] = [
|
|
76
|
+
{
|
|
77
|
+
type: 'title',
|
|
78
|
+
text: 'Guide Ultime de Carbonatation et Priming',
|
|
79
|
+
level: 2
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'paragraph',
|
|
83
|
+
html: 'Maîtrisez l\'art du "priming" et transformez votre bière artisanale d\'une expérience plate en une expérience effervescente professionnelle. Le priming consiste à ajouter une quantité précise de sucre pour que la levure résiduelle dans la bouteille génère du CO2 naturel lors d\'une fermentation secondaire. Trop peu de sucre donne une bière plate ; trop en génère une pression dangereuse qui peut briser les bouteilles. La différence tient à quelques grammes — voilà pourquoi ce calculateur existe.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'proscons',
|
|
87
|
+
title: 'Facteurs Critiques de Succès',
|
|
88
|
+
items: [
|
|
89
|
+
{ pro: 'Température : Le CO2 résiduel dépend du pic thermique post-fermentation.', con: '' },
|
|
90
|
+
{ pro: 'Précision : 5 grammes supplémentaires par litre peuvent faire la différence entre une bonne bière et un geyser.', con: '' },
|
|
91
|
+
{ pro: '', con: 'Oxydation : Évitez de faire gicler le liquide lors du transfert pour mélanger le sucre de priming.' }
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'title',
|
|
96
|
+
text: 'Volumes de CO2 par Style de Bière',
|
|
97
|
+
level: 2
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'stats',
|
|
101
|
+
items: [
|
|
102
|
+
{ label: 'British Stouts', value: '1,5 - 2,0 Vol', icon: 'mdi:beer' },
|
|
103
|
+
{ label: 'IPAs & Ales', value: '2,2 - 2,6 Vol', icon: 'mdi:hops' },
|
|
104
|
+
{ label: 'German Wheat', value: '3,3 - 4,5 Vol', icon: 'mdi:barley' }
|
|
105
|
+
],
|
|
106
|
+
columns: 3
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'card',
|
|
110
|
+
title: 'Quel Sucre Choisir ?',
|
|
111
|
+
icon: 'mdi:corn',
|
|
112
|
+
html: 'Le <strong>Dextrose</strong> est neutre et professionnel — le standard de l\'industrie. Le <strong>Sucre de Table</strong> est économique et efficace (utilisez 10% de moins en poids). Le <strong>DME (Extrait de Malt Sec)</strong> est le choix du puriste mais plus difficile à prédire avec précision car sa fermentabilité varie selon la marque et la composition du malt.'
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'diagnostic',
|
|
116
|
+
title: 'Avertissement de Sécurité',
|
|
117
|
+
icon: 'mdi:alert-decagram',
|
|
118
|
+
variant: 'error',
|
|
119
|
+
badge: 'Danger',
|
|
120
|
+
html: 'Les bouteilles en verre standard cèdent à 3,5-4,0 volumes de CO2. N\'essayez pas de carbonater des styles belges ou de blé dans du verre mince. Utilisez toujours des bouteilles homologuées pour les boissons pétillantes, et n\'utilisez jamais des bouteilles commerciales recyclées qui peuvent présenter des dommages structurels microscopiques.'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'tip',
|
|
124
|
+
title: 'Conseil Pro : Dissoudre Correctement le Sucre',
|
|
125
|
+
html: 'Faites toujours bouillir votre solution de sucre de priming (sucre dissous dans environ 250ml d\'eau pour 20L de bière) pendant 10 minutes avant de l\'ajouter à la bière. L\'ébullition assainit la solution et garantit une distribution homogène dans tout le lot, évitant les points chauds qui causent une carbonatation inégale entre les bouteilles.'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'summary',
|
|
129
|
+
title: 'À qui s\'adresse cet outil ?',
|
|
130
|
+
items: [
|
|
131
|
+
'Brasseurs Amateurs : Obtenez le calcul exact de sucre de priming pour toute taille de lot, style et température.',
|
|
132
|
+
'Passionnés de Bière Artisanale : Comprenez la science derrière les différents niveaux de carbonatation des bières commerciales.',
|
|
133
|
+
'Brasseurs Professionnels : Vérifiez les calculs manuels avant d\'embouteiller des lots commerciaux importants.'
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'La Science de la Carbonatation : Loi de Henry',
|
|
139
|
+
level: 2
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: 'Au fond, la carbonatation est régie par la <strong>Loi de Henry</strong> : la quantité de gaz dissous dans un liquide est proportionnelle à la pression partielle de ce gaz au-dessus du liquide. Quand vous primez une bouteille et la scellez, la levure consomme le sucre et produit du CO2 dans un environnement fermé. La pression augmente et le gaz est forcé de se redissoudre dans le liquide. La température à laquelle cet équilibre se produit détermine le niveau de carbonatation final — c\'est pourquoi la température de fermentation est la variable la plus critique dans ce calculateur.'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: 'paragraph',
|
|
147
|
+
html: 'Le CO2 résiduel dans votre bière avant le priming n\'est pas nul. Chaque bière retient du CO2 dissous issu de la fermentation, et la quantité retenue dépend de la température maximale atteinte par la bière. Une bière fermentée à 22°C retient beaucoup moins de CO2 résiduel qu\'une fermentée à 16°C, même si elles sont maintenant toutes deux refroidies. Ne pas en tenir compte entraîne une sur-carbonatation systématique — l\'une des erreurs les plus courantes des brasseurs débutants.'
|
|
148
|
+
}
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
const schemas: CarbonationLocaleContent['schemas'] = [
|
|
152
|
+
{
|
|
153
|
+
'@context': 'https://schema.org',
|
|
154
|
+
'@type': 'SoftwareApplication',
|
|
155
|
+
name: title,
|
|
156
|
+
description: description,
|
|
157
|
+
applicationCategory: 'UtilityApplication',
|
|
158
|
+
operatingSystem: 'Web',
|
|
159
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
|
|
160
|
+
} as WithContext<SoftwareApplication>,
|
|
161
|
+
];
|
|
162
|
+
|
|
163
|
+
export const content: CarbonationLocaleContent = {
|
|
164
|
+
slug,
|
|
165
|
+
title,
|
|
166
|
+
description,
|
|
167
|
+
ui,
|
|
168
|
+
seo,
|
|
169
|
+
faqTitle,
|
|
170
|
+
faq,
|
|
171
|
+
bibliographyTitle,
|
|
172
|
+
bibliography,
|
|
173
|
+
howTo,
|
|
174
|
+
schemas,
|
|
175
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AlcoholToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
+
import CarbonationCalculator from './component.astro';
|
|
3
|
+
|
|
4
|
+
export interface CarbonationUI {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
parametersTitle: string;
|
|
7
|
+
metricBtn: string;
|
|
8
|
+
imperialBtn: string;
|
|
9
|
+
volumeLabel: string;
|
|
10
|
+
maxTempLabel: string;
|
|
11
|
+
litersUnit: string;
|
|
12
|
+
celsiusUnit: string;
|
|
13
|
+
gallonsUnit: string;
|
|
14
|
+
fahrenheitUnit: string;
|
|
15
|
+
desiredCo2Label: string;
|
|
16
|
+
volUnit: string;
|
|
17
|
+
resultsTitle: string;
|
|
18
|
+
tableSugarLabel: string;
|
|
19
|
+
cornSugarLabel: string;
|
|
20
|
+
dmeLabel: string;
|
|
21
|
+
safetyTitle: string;
|
|
22
|
+
lowCarbonation: string;
|
|
23
|
+
optimalCarbonation: string;
|
|
24
|
+
highEffervescence: string;
|
|
25
|
+
bubblingVisualizationLabel: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type CarbonationLocaleContent = ToolLocaleContent<CarbonationUI>;
|
|
29
|
+
|
|
30
|
+
export const carbonationCalculator: AlcoholToolEntry<CarbonationUI> = {
|
|
31
|
+
id: 'carbonation-calculator',
|
|
32
|
+
icons: {
|
|
33
|
+
bg: 'mdi:bottle-soda-classic',
|
|
34
|
+
fg: 'mdi:water-opacity',
|
|
35
|
+
},
|
|
36
|
+
i18n: {
|
|
37
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
38
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
39
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { CarbonationCalculator };
|
|
44
|
+
|
|
45
|
+
export const CARBONATION_TOOL: ToolDefinition = {
|
|
46
|
+
entry: carbonationCalculator as AlcoholToolEntry<Record<string, string>>,
|
|
47
|
+
Component: CarbonationCalculator,
|
|
48
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface PrimingSugarResults {
|
|
2
|
+
tableSugar: number;
|
|
3
|
+
cornSugar: number;
|
|
4
|
+
dme: number;
|
|
5
|
+
residualCO2: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function calculatePrimingSugar(
|
|
9
|
+
volumeL: number,
|
|
10
|
+
co2Target: number,
|
|
11
|
+
tempC: number
|
|
12
|
+
): PrimingSugarResults {
|
|
13
|
+
const residualCO2 = 3.0378 - 0.050062 * tempC + 0.00026555 * Math.pow(tempC, 2);
|
|
14
|
+
const co2Needed = Math.max(0, co2Target - residualCO2);
|
|
15
|
+
|
|
16
|
+
const cornSugar = volumeL * co2Needed * 4.4;
|
|
17
|
+
const tableSugar = cornSugar * 0.91;
|
|
18
|
+
const dme = cornSugar * 1.5;
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
tableSugar: Math.round(tableSugar),
|
|
22
|
+
cornSugar: Math.round(cornSugar),
|
|
23
|
+
dme: Math.round(dme),
|
|
24
|
+
residualCO2
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function convertToImperial(liters: number, celsius: number) {
|
|
29
|
+
return {
|
|
30
|
+
gallons: liters * 0.264172,
|
|
31
|
+
fahrenheit: (celsius * 9) / 5 + 32
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function convertToMetric(gallons: number, fahrenheit: number) {
|
|
36
|
+
return {
|
|
37
|
+
liters: gallons / 0.264172,
|
|
38
|
+
celsius: ((fahrenheit - 32) * 5) / 9
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { cocktailBalancer } 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 cocktailBalancer.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && <SharedBibliography links={content.bibliography} />}
|