diff --git a/device/environmental_impact/__init__.py b/device/environmental_impact/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/device/environmental_impact/calculator.py b/device/environmental_impact/calculator.py new file mode 100644 index 0000000..dd79432 --- /dev/null +++ b/device/environmental_impact/calculator.py @@ -0,0 +1,10 @@ +from dataclasses import dataclass + + +@dataclass +class EnvironmentalImpact: + carbon_saved: float + + +def get_device_environmental_impact() -> EnvironmentalImpact: + return EnvironmentalImpact(carbon_saved=225.0) diff --git a/device/templates/details.html b/device/templates/details.html index 331c857..6af4e86 100644 --- a/device/templates/details.html +++ b/device/templates/details.html @@ -32,6 +32,9 @@
kg CO₂e saved
+whatever
+Manufacturing Impact Avoided | +
+ {{ impact.carbon_saved }} kg CO₂e
+ + Based on average laptop manufacturing emissions + |
+
---|