Skip to content

Commit

Permalink
Add result boxes: electricity
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Apr 29, 2024
1 parent 029a88d commit 41ec3ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
16 changes: 13 additions & 3 deletions digiplan/map/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,19 @@ def get_context_data(self, **kwargs) -> dict:

# TODO(Hendrik Huyskens): Replace result boxes with results after simulation run
# https://github.com/empowerplan/epp-app/issues/34
context["results_electricity"] = forms.ResultsBox(
"82,8 %",
"des <span>Stroms</span> aus erneuerbaren Quellen in 2040",
context["results_electricity_energy"] = forms.ResultsBox(
"4 TWh",
"<span>Strom</span> werden aus Wind und Photovoltaik erzeugt",
category="electricity",
)
context["results_electricity_autarky"] = forms.ResultsBox(
"50 %",
"<span>der Zeit wird der Strombedarf</span> komplett aus regionalen erneuerbaren Quellen gedeckt",
category="electricity",
)
context["results_electricity_area"] = forms.ResultsBox(
"4 %",
"der <span>Regionsfläche</span> werden für Windenergie und Photovoltaik verwendet",
category="electricity",
)
context["results_heat"] = forms.ResultsBox("50,0 %", "...", category="heat")
Expand Down
6 changes: 3 additions & 3 deletions digiplan/templates/components/results_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ <h2>{% translate "Aufdach-Photovoltaik" %}</h2>
<div class="main-results">
<div class="main-results__row">
<div class="main-results__col d-flex flex-column">
{{ results_electricity }}
{{ results_electricity_energy }}
</div>
<div class="main-results__col d-flex flex-column">
{{ results_electricity }}
{{ results_electricity_autarky }}
</div>
<div class="main-results__col d-flex flex-column">
{{ results_electricity }}
{{ results_electricity_area }}
</div>
</div>
</div>
Expand Down

0 comments on commit 41ec3ef

Please sign in to comment.