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 #61 from dxw/80-update-forecast-predictions-on-tab…
…-click 80 update forecast predictions on tab click
- Loading branch information
Showing
16 changed files
with
334 additions
and
77 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,17 +1,19 @@ | ||
<div class="tab py-4 flex-1 today mx-2 px-1 text-center daqi-low border-b-0 border-l-2 border-r-2 border-t-2 border-gray-300" data-date="<%= forecast.date %>" > | ||
<div class="day"> | ||
<%= forecast.date == Date.today ? 'Today' : forecast.date.strftime('%A') %> | ||
</div> | ||
<div class="date"> | ||
<%= forecast.date.strftime("%d %B") %> | ||
</div> | ||
<div class="daqi-marker text-4xl py-2 text-green-600"> | ||
● | ||
</div> | ||
<div class="daqi-label text-base"> | ||
<%= forecast.air_pollution.label.capitalize %> | ||
</div> | ||
<div class="daqi-value font-normal"> | ||
Index <%= forecast.air_pollution.value %>/10 | ||
</div> | ||
<div class="tab py-4 flex-1 <%= day %> mx-2 px-1 text-center daqi-low border-b-0 border-l-2 border-r-2 border-t-2 border-gray-300" data-date="<%= forecast.date %>" > | ||
<%= link_to update_styled_forecast_path(day: day), data: { turbo_frame: "day_predictions" } do %> | ||
<div class="day"> | ||
<%= forecast.date == Date.today ? 'Today' : forecast.date.strftime('%A') %> | ||
</div> | ||
<div class="date"> | ||
<%= forecast.date.strftime("%d %B") %> | ||
</div> | ||
<div class="daqi-marker text-4xl py-2 text-green-600"> | ||
● | ||
</div> | ||
<div class="daqi-label text-base"> | ||
<%= forecast.air_pollution.label.capitalize %> | ||
</div> | ||
<div class="daqi-value font-normal"> | ||
Index <%= forecast.air_pollution.value %>/10 | ||
</div> | ||
<% end %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<dl class="predictions p-4"> | ||
<%= render(PredictionComponent.new(prediction: @forecasts.first.uv)) %> | ||
<%= render(PredictionComponent.new(prediction: @forecasts.first.pollen)) %> | ||
<%= render "temperature_prediction", prediction: @forecasts.first.temperature %> | ||
</dl> | ||
<%= turbo_frame_tag "day_predictions" do %> | ||
<dl class="predictions p-4"> | ||
<%= render(PredictionComponent.new(prediction: forecast.uv)) %> | ||
<%= render(PredictionComponent.new(prediction: forecast.pollen)) %> | ||
<%= render "temperature_prediction", prediction: forecast.temperature %> | ||
</dl> | ||
<% end %> |
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,6 +1,6 @@ | ||
<%= render partial: "styled_forecasts/location" %> | ||
<%= render partial: "styled_forecasts/forecast_tabs", forecasts: @forecasts %> | ||
<%= render partial: "styled_forecasts/predictions" %> | ||
<%= render partial: "styled_forecasts/predictions", locals: { forecast: @forecasts.first } %> | ||
<%= render partial: "sharing" %> | ||
<%= render partial: "learning" %> | ||
<%= render partial: "subscribe" %> |
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
Oops, something went wrong.