diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 613572e..69d2670 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -78,7 +78,7 @@ } .select-style { - @apply block w-full h-8 px-3 py-1.5 border border-default-slate/50 rounded-xs text-base-background + @apply block w-full px-3 py-1.5 border border-default-slate/50 rounded-xs text-base-background } .select-style option { @@ -86,12 +86,21 @@ } .input-style { - @apply block w-full h-8 px-3 py-1.5 border border-default-slate/50 rounded-xs + @apply block w-full px-3 py-1.5 border border-default-slate/50 rounded-xs } .textarea-style { @apply block w-full pl-4 flex-1 py-1.5 ring-1 ring-inset ring-default-slate/50 rounded-xs } + + /*Toggle Button*/ + .toggle_style { + @apply w-14 h-8 bg-danger rounded-full peer-checked:bg-notice transition-all duration-300 + } + + .toggle_btn { + @apply absolute left-1 top-1 w-6 h-6 bg-white rounded-full transition-all duration-300 peer-checked:translate-x-full shadow-sm + } } @layer utilities { diff --git a/app/views/schedules/schedule_edit.html.erb b/app/views/schedules/schedule_edit.html.erb index 2f4088c..9e39391 100644 --- a/app/views/schedules/schedule_edit.html.erb +++ b/app/views/schedules/schedule_edit.html.erb @@ -1,45 +1,62 @@ -
| 시간 | -분 | -사용여부 | -온도 | -삭제 | -
|---|---|---|---|---|
| - <%= select_tag "schedule[#{s.id}][hour]", - options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour), - class: "select-style text-white" %> - | -<%= number_field_tag "schedule[#{s.id}][minute]", s.minute, min: 0, max: 59, step: 1, inputmode: "decimal", class: "input-style" %> | -<%= check_box_tag "schedule[#{s.id}][is_active]", "1", s.is_active == true || s.is_active == 1 %> | -<%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, step: "0.1", inputmode: "decimal", class: "input-style" %> | -
+
+
+
+
+
+
+
+
+
+ 시간
+
+ <%= select_tag "schedule[#{s.id}][hour]",
+ options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour),
+ class: "select-style text-white" %>
+
+ :
+ <%= number_field_tag "schedule[#{s.id}][minute]", s.minute, min: 0, max: 59, step: 1, inputmode: "decimal", class: "input-style" %>
+
+
+ 온도
+
+
+
+ <%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, step: "0.1", inputmode: "decimal", class: "input-style" %>
+
+ °C
+
+
+
+
+ 사용여부
+
+
<%= link_to "삭제", schedule_path(s),
data: {
turbo_method: :delete,
turbo_confirm: "정말 삭제하시겠습니까?"
},
class: "btn bg-danger text-sm" %>
- |
-