Skip to content

Commit

Permalink
Improved layout of producers show
Browse files Browse the repository at this point in the history
  • Loading branch information
philschonholzer committed Oct 8, 2021
1 parent a7454ec commit eee5cc3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Web/Component/CommonConsumption.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ instance Component CommonConsumption CommonConsumptionController where
</p>

<p style="font-size: 2em;">
×&nbsp;<span class="producer-amount">{timesPerYear |> twoDec}</span>
<span style="font-size: 1.5em">×&ensp;</span>
<span class="producer-amount">{timesPerYear |> twoDec}</span> / year
</p>
<p style="font-size: 2em;">
=
<span style="font-size: 1.5em">=&ensp;</span>
<span class="co2-amount timesPerYear">{((calcCo2Factor gCo2 1.0 amount) * timesPerYear) |> renderWeight}</span>&nbsp;CO<sub>2</sub>e / year
</p>
{renderInput amount minAmount maxAmount "SetCommonConsumptionValue" "newAmount" "Single consumption"}
Expand Down
2 changes: 1 addition & 1 deletion Web/View/Co2Producers/Show.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ instance View ShowView where
where
renderCo2Value co2Producer sources = case averageCo2Value sources of
Just a -> [hsx|
<p style="font-size: 2em;">
<p style="font-size: 2em; margin: 0;">
<span class="producer-amount">1</span>
<span class="producer-unit">{get #unit co2Producer}</span>
{svg}
Expand Down
3 changes: 2 additions & 1 deletion static/styles/producer-common-consumption.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
}

.producer.show .common-consumption h2 {
font-size: 2em;
font-size: 3em;
margin: 0.1em 0 1em;
}

.producer.show .common-consumption h3 {
Expand Down
4 changes: 0 additions & 4 deletions static/styles/producer-show.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
overflow: hidden;
}

.producer.show section {
padding: 0;
}

.producer.show .fields a {
line-break: anywhere;
}
Expand Down

0 comments on commit eee5cc3

Please sign in to comment.