@jjlmoya/utils-drones 1.30.0 → 1.32.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/category/i18n/en.ts +1 -1
- package/src/category/i18n/fr.ts +1 -1
- package/src/category/index.ts +2 -0
- package/src/components/PreviewNavSidebar.astro +116 -116
- package/src/components/PreviewToolbar.astro +143 -143
- package/src/data.ts +1 -1
- package/src/entries.ts +4 -0
- package/src/env.d.ts +1 -1
- package/src/index.ts +1 -1
- package/src/layouts/PreviewLayout.astro +118 -118
- package/src/pages/[locale].astro +251 -251
- package/src/pages/index.astro +4 -4
- package/src/tests/faq_count.test.ts +1 -1
- package/src/tests/locale_completeness.test.ts +1 -2
- package/src/tests/mocks/astro_mock.js +1 -1
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/tool_validation.test.ts +17 -17
- package/src/tool/antenna-length-calculator/bibliography.astro +6 -6
- package/src/tool/antenna-length-calculator/component.astro +329 -329
- package/src/tool/antenna-length-calculator/seo.astro +15 -15
- package/src/tool/drone-battery-c-rating-calculator/i18n/de.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/en.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/es.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/id.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/ja.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/ko.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/nl.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/pl.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/ru.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/sv.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/tr.ts +192 -192
- package/src/tool/drone-battery-c-rating-calculator/i18n/zh.ts +192 -192
- package/src/tool/drone-flight-time/component.astro +187 -187
- package/src/tool/drone-flight-time/seo.astro +15 -15
- package/src/tool/drone-motor-propeller-calculator/bibliography.astro +6 -0
- package/src/tool/drone-motor-propeller-calculator/bibliography.ts +12 -0
- package/src/tool/drone-motor-propeller-calculator/component.astro +109 -0
- package/src/tool/drone-motor-propeller-calculator/controller.ts +174 -0
- package/src/tool/drone-motor-propeller-calculator/dom-views.ts +78 -0
- package/src/tool/drone-motor-propeller-calculator/drone-motor-propeller-calculator.css +562 -0
- package/src/tool/drone-motor-propeller-calculator/entry.ts +27 -0
- package/src/tool/drone-motor-propeller-calculator/evaluator.ts +14 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/de.ts +202 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/en.ts +202 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/es.ts +202 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/fr.ts +202 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/id.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/it.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/ja.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/ko.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/nl.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/pl.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/pt.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/ru.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/sv.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/tr.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/i18n/zh.ts +192 -0
- package/src/tool/drone-motor-propeller-calculator/index.ts +11 -0
- package/src/tool/drone-motor-propeller-calculator/logic.test.ts +56 -0
- package/src/tool/drone-motor-propeller-calculator/logic.ts +108 -0
- package/src/tool/drone-motor-propeller-calculator/seo.astro +15 -0
- package/src/tool/drone-motor-propeller-calculator/storage.ts +26 -0
- package/src/tool/drone-motor-propeller-calculator/ui.ts +55 -0
- package/src/tool/gps-coordinates-converter/component.astro +275 -275
- package/src/tool/gps-coordinates-converter/seo.astro +15 -15
- package/src/tools.ts +3 -0
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
---
|
|
2
|
-
import "@jjlmoya/utils-shared/theme.css";
|
|
3
|
-
import PreviewToolbar from "../components/PreviewToolbar.astro";
|
|
4
|
-
import type { KnownLocale } from "../types";
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
title: string;
|
|
8
|
-
currentLocale?: KnownLocale;
|
|
9
|
-
localeUrls?: Partial<Record<KnownLocale, string>>;
|
|
10
|
-
hasSidebar?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const { title, currentLocale = "es", localeUrls = {}, hasSidebar = false } = Astro.props;
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<!doctype html>
|
|
17
|
-
<html lang={currentLocale}>
|
|
18
|
-
<head>
|
|
19
|
-
<meta charset="UTF-8" />
|
|
20
|
-
<meta name="viewport" content="width=device-width" />
|
|
21
|
-
<title>{title} · preview</title>
|
|
22
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
23
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
24
|
-
<link
|
|
25
|
-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap"
|
|
26
|
-
rel="stylesheet"
|
|
27
|
-
/>
|
|
28
|
-
|
|
29
|
-
<script is:inline>
|
|
30
|
-
(function () {
|
|
31
|
-
const saved = localStorage.getItem("theme") || "theme-dark";
|
|
32
|
-
document.documentElement.classList.add(saved);
|
|
33
|
-
})();
|
|
34
|
-
</script>
|
|
35
|
-
<slot name="head" />
|
|
36
|
-
</head>
|
|
37
|
-
<body>
|
|
38
|
-
<PreviewToolbar currentLocale={currentLocale} localeUrls={localeUrls} />
|
|
39
|
-
<div class:list={["page-wrapper", { "with-sidebar": hasSidebar }]}>
|
|
40
|
-
{
|
|
41
|
-
hasSidebar && (
|
|
42
|
-
<aside class="sidebar-area">
|
|
43
|
-
<slot name="sidebar" />
|
|
44
|
-
</aside>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
<main>
|
|
48
|
-
<slot />
|
|
49
|
-
</main>
|
|
50
|
-
</div>
|
|
51
|
-
</body>
|
|
52
|
-
</html>
|
|
53
|
-
|
|
54
|
-
<style is:global>
|
|
55
|
-
:root {
|
|
56
|
-
--accent: #f43f5e;
|
|
57
|
-
--primary-base: #9f1239;
|
|
58
|
-
--cyan: #06b6d4;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.theme-dark,
|
|
62
|
-
.theme-light {
|
|
63
|
-
--text-main: var(--text-base);
|
|
64
|
-
--border-color: var(--border-base);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
*,
|
|
68
|
-
*::before,
|
|
69
|
-
*::after {
|
|
70
|
-
box-sizing: border-box;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
body {
|
|
74
|
-
background-color: var(--bg-page);
|
|
75
|
-
color: var(--text-base);
|
|
76
|
-
margin: 0;
|
|
77
|
-
min-height: 100vh;
|
|
78
|
-
transition:
|
|
79
|
-
background-color 0.3s ease,
|
|
80
|
-
color 0.3s ease;
|
|
81
|
-
font-family: Inter, sans-serif;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
main {
|
|
85
|
-
padding: 0 2rem;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.page-wrapper {
|
|
89
|
-
display: flex;
|
|
90
|
-
flex-direction: column;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.page-wrapper.with-sidebar {
|
|
94
|
-
display: grid;
|
|
95
|
-
grid-template-columns: 240px 1fr;
|
|
96
|
-
min-height: 100vh;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.sidebar-area {
|
|
100
|
-
position: sticky;
|
|
101
|
-
top: 0;
|
|
102
|
-
height: 100vh;
|
|
103
|
-
overflow-y: auto;
|
|
104
|
-
border-right: 1px solid var(--border-color);
|
|
105
|
-
background: var(--bg-page);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@media (max-width: 768px) {
|
|
109
|
-
.page-wrapper.with-sidebar {
|
|
110
|
-
grid-template-columns: 1fr;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.sidebar-area {
|
|
114
|
-
display: none;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
118
|
-
|
|
1
|
+
---
|
|
2
|
+
import "@jjlmoya/utils-shared/theme.css";
|
|
3
|
+
import PreviewToolbar from "../components/PreviewToolbar.astro";
|
|
4
|
+
import type { KnownLocale } from "../types";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
title: string;
|
|
8
|
+
currentLocale?: KnownLocale;
|
|
9
|
+
localeUrls?: Partial<Record<KnownLocale, string>>;
|
|
10
|
+
hasSidebar?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { title, currentLocale = "es", localeUrls = {}, hasSidebar = false } = Astro.props;
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<!doctype html>
|
|
17
|
+
<html lang={currentLocale}>
|
|
18
|
+
<head>
|
|
19
|
+
<meta charset="UTF-8" />
|
|
20
|
+
<meta name="viewport" content="width=device-width" />
|
|
21
|
+
<title>{title} · preview</title>
|
|
22
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
23
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
24
|
+
<link
|
|
25
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<script is:inline>
|
|
30
|
+
(function () {
|
|
31
|
+
const saved = localStorage.getItem("theme") || "theme-dark";
|
|
32
|
+
document.documentElement.classList.add(saved);
|
|
33
|
+
})();
|
|
34
|
+
</script>
|
|
35
|
+
<slot name="head" />
|
|
36
|
+
</head>
|
|
37
|
+
<body>
|
|
38
|
+
<PreviewToolbar currentLocale={currentLocale} localeUrls={localeUrls} />
|
|
39
|
+
<div class:list={["page-wrapper", { "with-sidebar": hasSidebar }]}>
|
|
40
|
+
{
|
|
41
|
+
hasSidebar && (
|
|
42
|
+
<aside class="sidebar-area">
|
|
43
|
+
<slot name="sidebar" />
|
|
44
|
+
</aside>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
<main>
|
|
48
|
+
<slot />
|
|
49
|
+
</main>
|
|
50
|
+
</div>
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
|
53
|
+
|
|
54
|
+
<style is:global>
|
|
55
|
+
:root {
|
|
56
|
+
--accent: #f43f5e;
|
|
57
|
+
--primary-base: #9f1239;
|
|
58
|
+
--cyan: #06b6d4;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.theme-dark,
|
|
62
|
+
.theme-light {
|
|
63
|
+
--text-main: var(--text-base);
|
|
64
|
+
--border-color: var(--border-base);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
*,
|
|
68
|
+
*::before,
|
|
69
|
+
*::after {
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
body {
|
|
74
|
+
background-color: var(--bg-page);
|
|
75
|
+
color: var(--text-base);
|
|
76
|
+
margin: 0;
|
|
77
|
+
min-height: 100vh;
|
|
78
|
+
transition:
|
|
79
|
+
background-color 0.3s ease,
|
|
80
|
+
color 0.3s ease;
|
|
81
|
+
font-family: Inter, sans-serif;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
main {
|
|
85
|
+
padding: 0 2rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.page-wrapper {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.page-wrapper.with-sidebar {
|
|
94
|
+
display: grid;
|
|
95
|
+
grid-template-columns: 240px 1fr;
|
|
96
|
+
min-height: 100vh;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.sidebar-area {
|
|
100
|
+
position: sticky;
|
|
101
|
+
top: 0;
|
|
102
|
+
height: 100vh;
|
|
103
|
+
overflow-y: auto;
|
|
104
|
+
border-right: 1px solid var(--border-color);
|
|
105
|
+
background: var(--bg-page);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (max-width: 768px) {
|
|
109
|
+
.page-wrapper.with-sidebar {
|
|
110
|
+
grid-template-columns: 1fr;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.sidebar-area {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
118
|
+
|