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 #117 from dxw/cleanup-2
Cleanup 2
- Loading branch information
Showing
26 changed files
with
190 additions
and
218 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.daqi-low-level { | ||
@apply text-black bg-lime-400; | ||
} | ||
|
||
.daqi-moderate-level { | ||
@apply text-black bg-yellow-300; | ||
} | ||
|
||
.daqi-high-level { | ||
@apply text-white bg-red-500; | ||
} | ||
|
||
.daqi-very-high-level { | ||
@apply text-white bg-red-800; | ||
} | ||
|
||
.daqi-level-1 { | ||
@apply text-black bg-lime-400; | ||
} | ||
|
||
.daqi-level-2 { | ||
@apply text-black bg-green-400; | ||
} | ||
|
||
.daqi-level-3 { | ||
@apply text-black bg-lime-600; | ||
} | ||
|
||
.daqi-level-4 { | ||
@apply text-black bg-yellow-300; | ||
} | ||
|
||
.daqi-level-5 { | ||
@apply text-black bg-amber-200; | ||
} | ||
|
||
.daqi-level-6 { | ||
@apply text-black bg-yellow-500; | ||
} | ||
|
||
.daqi-level-7 { | ||
@apply text-white bg-orange-500; | ||
} | ||
|
||
.daqi-level-8 { | ||
@apply text-white bg-red-500; | ||
} | ||
|
||
.daqi-level-9 { | ||
@apply text-white bg-red-800; | ||
} | ||
|
||
.daqi-level-10 { | ||
@apply text-white bg-stone-700; | ||
} |
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,12 +1,4 @@ | ||
// Entry point for the build script in your package.json | ||
import "@hotwired/turbo-rails"; | ||
|
||
document.addEventListener("DOMContentLoaded", function () { | ||
const hamburgerMenu = document.getElementById("hamburger-menu"); | ||
const menuList = document.getElementById("menu-list"); | ||
|
||
hamburgerMenu.addEventListener("click", function () { | ||
menuList.classList.toggle("hidden"); | ||
}); | ||
}); | ||
import "./controllers"; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Controller } from "@hotwired/stimulus"; | ||
|
||
export default class NavigationController extends Controller { | ||
static targets = ["menuList"]; | ||
|
||
toggleMenu() { | ||
this.menuListTarget.classList.toggle("hidden"); | ||
} | ||
} |
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,10 +1,10 @@ | ||
<% if air_pollution_prediction.air_quality_alert %> | ||
<div class="alert-guidance bg-<%= air_pollution_prediction.air_quality_alert.daqi_label.parameterize %>-alert-guidance-panel m-5 p-10"> | ||
<% if @day_forecast.air_quality_alert %> | ||
<div class="alert-guidance bg-<%= @day_forecast.air_quality_alert.daqi_label.parameterize %>-alert-guidance-panel m-5 p-10"> | ||
<p class="font-semibold mb-4"> | ||
<%= t("air_quality_alert.#{air_pollution_prediction.air_quality_alert.daqi_level}.guidance.title") %> | ||
<%= t("air_quality_alert.#{@day_forecast.air_quality_alert.daqi_level}.guidance.title") %> | ||
</p> | ||
<div class="text-xs"> | ||
<%= t("air_quality_alert.#{air_pollution_prediction.air_quality_alert.daqi_level}.guidance.detail_html") %> | ||
<%= t("air_quality_alert.#{@day_forecast.air_quality_alert.daqi_level}.guidance.detail_html") %> | ||
</div> | ||
</div> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
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,8 +1,8 @@ | ||
<div class="learning bg-gray-100 p-8 mt-12"> | ||
<header class="text-xl font-bold text-center w-full mb-8"> | ||
<div class="learning"> | ||
<header> | ||
Do you know how you can protect yourself and others in your community? | ||
</header> | ||
<a href="health_advice" class="block w-full py-4 px-8 rounded-md text-lg font-bold bg-gray-200 border border-gray-700 text-center mb-4"> | ||
<a href="health_advice"> | ||
Learn more about health effects | ||
</a> | ||
</div> |
This file was deleted.
Oops, something went wrong.
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,10 +1,7 @@ | ||
<div class="relative inline-block w-full text-left p-4"> | ||
<%= form_tag(false, method: :get) do %> | ||
<%= select_tag :zone, | ||
options_for_select(Zone.all.order(:name).map(&:name), @zone.name), | ||
class: "inline-flex flex-row w-full justify-left gap-x-1.5 rounded-md bg-white px-3 py-2 text-base font-semibold text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50", | ||
data: { controller: "prediction", "prediction-target": "zoneSelector", action: "change->prediction#changeZone" } | ||
%> | ||
<%= hidden_field_tag :day, @day, data: { "tab-target": "daySelector" } %> | ||
<% end %> | ||
</div> | ||
<%= form_tag(false, method: :get) do %> | ||
<%= select_tag :zone, | ||
options_for_select(Zone.all.order(:name).map(&:name), @zone.name), | ||
data: { controller: "prediction", "prediction-target": "zoneSelector", action: "change->prediction#changeZone" } | ||
%> | ||
<%= hidden_field_tag :day, @day, data: { "tab-target": "daySelector" } %> | ||
<% 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
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,15 +1,13 @@ | ||
<div class="relative inline-block w-full text-left p-4"> | ||
<%= form_tag do %> | ||
<%= select_tag :pollutant, | ||
options_for_select({ | ||
"All pollutants" => 'Total', | ||
"Nitrogen Dioxide" => 'NO2', | ||
"Particles < 2.5µm" => 'PM25', | ||
"Particles < 10µm" => 'PM10', | ||
"Ozone" => 'O3', | ||
}), | ||
data:{ action: "map#updateMap", "map-target": "pollutantSelector" }, | ||
class: "inline-flex flex-row w-full justify-left gap-x-1.5 rounded-md bg-white px-3 py-2 text-base font-semibold text-gray-500 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50" | ||
%> | ||
<% end %> | ||
</div> | ||
<%= form_tag do %> | ||
<%= select_tag :pollutant, | ||
options_for_select({ | ||
"All pollutants" => 'Total', | ||
"Nitrogen Dioxide" => 'NO2', | ||
"Particles < 2.5µm" => 'PM25', | ||
"Particles < 10µm" => 'PM10', | ||
"Ozone" => 'O3', | ||
}), | ||
class: "my-4", | ||
data: { action: "map#updateMap", "map-target": "pollutantSelector" } | ||
%> | ||
<% end %> |
Oops, something went wrong.