feat: Adds capacitor calculations.

This commit is contained in:
2025-03-01 18:11:49 -05:00
parent eaf0387899
commit 3c7147ad0e
11 changed files with 622 additions and 39 deletions

View File

@@ -44,6 +44,7 @@ public struct SVGSize: Sendable {
public enum SVGType: Sendable, CaseIterable {
case calculator
case checkCircle
case droplets
case exclamation
case funnel
@@ -60,6 +61,7 @@ public enum SVGType: Sendable, CaseIterable {
public func html(_ size: SVGSize) -> some HTML {
switch self {
case .calculator: return calculatorSvg(size: size)
case .checkCircle: return checkCircleSvg(size: size)
case .droplets: return dropletsSvg(size: size)
case .exclamation: return exclamationSvg(size: size)
case .funnel: return funnelSvg(size: size)
@@ -80,6 +82,14 @@ public enum SVGType: Sendable, CaseIterable {
// swiftlint:disable line_length
private func checkCircleSvg(size: SVGSize) -> HTMLRaw {
HTMLRaw("""
<svg xmlns="http://www.w3.org/2000/svg" width="\(size.width)" height="\(size.height)" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check-big">
<path d="M21.801 10A10 10 0 1 1 17 3.335"/><path d="m9 11 3 3L22 4"/>
</svg>
""")
}
private func houseSvg(size: SVGSize) -> HTMLRaw {
HTMLRaw("""
<svg xmlns="http://www.w3.org/2000/svg" width="\(size.width)" height="\(size.height)" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-house">