generated from dxw/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from dxw/refactor-prediction-partial
Refactor temperature, UV and pollen predictions
- Loading branch information
Showing
9 changed files
with
55 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,5 @@ | ||
<dl class="predictions p-4"> | ||
<div class="prediction py-4 uv border-b border-gray-400"> | ||
<div class="summary flex flex-row"> | ||
<dt class="w-1/2">Ultravoilet rays (UV)</dd> | ||
<dd class="flex flex-row w-1/2"> | ||
<div class="daqi-indicator -mt-1 text-green-600 text-2xl">●</div> | ||
<div class="daqi-label font-bold ml-1 w-4/5">Low</div> | ||
<div class="control"><%= render partial: "shared/icons/chevron_down" %></div> | ||
</dd> | ||
</div> | ||
<div class="details hidden"> | ||
</div> | ||
</div> | ||
<div class="prediction py-4 pollen border-b border-gray-400"> | ||
<div class="summary flex flex-row"> | ||
<dt class="w-1/2">Pollen</dd> | ||
<dd class="flex flex-row w-1/2"> | ||
<div class=" -mt-1 daqi-indicator text-amber-300 text-2xl">●</div> | ||
<div class=" daqi-label font-bold ml-1 w-4/5">Moderate</div> | ||
<div class="control"><%= render partial: "shared/icons/chevron_down" %></div> | ||
</dd> | ||
</div> | ||
<div class="details visible bg-amber-50 p-4 mt-2"> | ||
<%= render partial: "details" %> | ||
</div> | ||
</div> | ||
<div class="prediction py-4 temperature border-b border-gray-400"> | ||
<div class="summary flex flex-row"> | ||
<dt class="w-1/2">Temperature</dd> | ||
<dd class="flex flex-row w-1/2"> | ||
<div class="daqi-indicator -mt-1 text-green-600 text-2xl">●</div> | ||
<div class="daqi-label font-bold ml-1 w-4/5">Low</div> | ||
<div class="control"><%= render partial: "shared/icons/chevron_down" %></div> | ||
</dd> | ||
</div> | ||
<div class="details hidden"> | ||
</div> | ||
</div> | ||
</div> | ||
<%= render(PredictionComponent.new(prediction: @forecasts.first.uv)) %> | ||
<%= render(PredictionComponent.new(prediction: @forecasts.first.pollen)) %> | ||
<%= render "temperature_prediction", prediction: @forecasts.first.temperature %> | ||
</dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="prediction py-4 temperature border-b border-gray-400"> | ||
<div class="summary flex flex-row"> | ||
<dt class="w-1/2"> <%= prediction.name %> </dt> | ||
<dd class="flex flex-row w-1/2"> | ||
<div class="font-bold"><%= "#{prediction.min.round}°C - #{prediction.max.round}" %>°C</div> | ||
</dd> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters