Compare commits

8 Commits

5 changed files with 31 additions and 24 deletions

View File

@@ -49,7 +49,7 @@
@layer base { @layer base {
body { body {
@apply bg-base-background text-base-text @apply bg-base-background text-base-text font-['Pretendard-Regular']
} }
hr { hr {
@@ -75,7 +75,7 @@
} }
.btn { .btn {
@apply justify-center rounded-md bg-default-slate px-4 py-2 text-sm font-semibold leading-6 text-white @apply justify-center rounded-md bg-default-slate px-4 py-2 font-semibold leading-6 text-white
shadow-xs hover:opacity-80 cursor-pointer shadow-xs hover:opacity-80 cursor-pointer
} }
@@ -89,7 +89,7 @@
} }
.select-style { .select-style {
@apply block w-full px-2 py-1.5 border border-default-slate/50 rounded-xs text-base-background @apply block w-full px-2 py-1.5 border border-default-slate/50 rounded-xs text-base-background appearance-none
} }
.select-style option { .select-style option {
@@ -276,4 +276,11 @@
src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicLight.woff') format('woff'); src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-10@1.0/GongGothicLight.woff') format('woff');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
}
@font-face {
font-family: 'Pretendard-Regular';
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
} }

View File

@@ -85,8 +85,8 @@
<!-- pH --> <!-- pH -->
<div class="dashboard-group"> <div class="dashboard-group">
<div class="flex justify-between items-baseline"> <div class="flex justify-between items-baseline">
<div class="text-4xl font-['GongGothicMedium']">pH</div> <div class="text-4xl">pH</div>
<div class="text-3xl">7.1</div> <div class="text-3xl font-['GongGothicMedium']">7.1</div>
</div> </div>
<div class="flex justify-between items-baseline"> <div class="flex justify-between items-baseline">
<div class="text-2xl"> <div class="text-2xl">
@@ -99,8 +99,8 @@
<!-- EC --> <!-- EC -->
<div class="dashboard-group"> <div class="dashboard-group">
<div class="flex justify-between items-baseline"> <div class="flex justify-between items-baseline">
<div class="text-4xl font-['GongGothicMedium']">EC</div> <div class="text-4xl">EC</div>
<div class="text-3xl">0.1</div> <div class="text-3xl font-['GongGothicMedium']">0.1</div>
</div> </div>
<div class="flex justify-between items-baseline"> <div class="flex justify-between items-baseline">
<div class="text-2xl"> <div class="text-2xl">

View File

@@ -10,7 +10,7 @@
<ul class="divide-y divide-base-border whitespace-nowrap h-full relative"> <ul class="divide-y divide-base-border whitespace-nowrap h-full relative">
<% if @schedule.present? %> <% if @schedule.present? %>
<% @schedule.each do |s| %> <% @schedule.each do |s| %>
<li class="flex justify-between items-stretch px-4 py-2 space-x-4 h-full relative"> <li class="flex justify-between items-center px-4 py-2 space-x-4 h-full relative">
<div class="flex items-center space-x-4 basis-3/5 h-full"> <div class="flex items-center space-x-4 basis-3/5 h-full">
<!-- 시간 --> <!-- 시간 -->
<div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0"> <div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0">
@@ -18,11 +18,11 @@
<div class="text-xl flex items-center space-x-1 w-full h-full"> <div class="text-xl flex items-center space-x-1 w-full h-full">
<%= select_tag "schedule[#{s.id}][hour]", <%= select_tag "schedule[#{s.id}][hour]",
options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour), options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour),
class: "select-style text-white min-w-[60px] h-full" %> class: "select-style text-white min-w-[60px]" %>
<div>:</div> <div>:</div>
<%= number_field_tag "schedule[#{s.id}][minute]", <%= number_field_tag "schedule[#{s.id}][minute]",
s.minute, min: 0, max: 59, step: 1, inputmode: "decimal", s.minute, min: 0, max: 59, step: 1, inputmode: "decimal",
class: "input-style min-w-[60px] h-full" %> class: "input-style min-w-[60px]" %>
</div> </div>
</div> </div>
@@ -30,7 +30,7 @@
<div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0"> <div class="flex flex-col lg:flex-row h-full items-center space-x-0 space-y-2 lg:space-x-4 lg:space-y-0">
<div class="text-white text-left w-full lg:w-auto">온도 (°C)</div> <div class="text-white text-left w-full lg:w-auto">온도 (°C)</div>
<div class="text-xl flex items-center"> <div class="text-xl flex items-center">
<%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, min: -99, max: 99, step: "0.1", inputmode: "decimal", class: "input-style min-w-[68px] h-full" %> <%= number_field_tag "schedule[#{s.id}][temperature]", s.temperature, min: -99, max: 99, step: "0.1", inputmode: "decimal", class: "input-style min-w-[68px]" %>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -14,9 +14,9 @@
<div class="flex flex-col lg:flex-row items-baseline space-x-2"> <div class="flex flex-col lg:flex-row items-baseline space-x-2">
<div class="text-white">시간</div> <div class="text-white">시간</div>
<div class="text-3xl flex items-baseline space-x-1"> <div class="text-3xl flex items-baseline space-x-1">
<div><%= s.hour.to_s.rjust(2, '0') %></div> <div class="text-center w-[36px]"><%= s.hour.to_s.rjust(2, '0') %></div>
<div>:</div> <div>:</div>
<div><%= s.minute.to_s.rjust(2, '0') %></div> <div class="text-center w-[36px]"><%= s.minute.to_s.rjust(2, '0') %></div>
</div> </div>
</div> </div>
@@ -24,7 +24,7 @@
<div class="flex flex-col lg:flex-row items-baseline space-x-4"> <div class="flex flex-col lg:flex-row items-baseline space-x-4">
<div class="text-white">온도</div> <div class="text-white">온도</div>
<div class="text-3xl flex items-end space-x-2"> <div class="text-3xl flex items-end space-x-2">
<div><%= s.temperature %></div> <div class="text-left w-[50px]"><%= s.temperature %></div>
<div class="text-white text-base leading-7">°C</div> <div class="text-white text-base leading-7">°C</div>
</div> </div>
</div> </div>
@@ -33,7 +33,7 @@
<!-- 사용 여부 --> <!-- 사용 여부 -->
<div class="flex flex-col lg:flex-row items-baseline space-x-0 lg:space-x-4 items-end"> <div class="flex flex-col lg:flex-row items-baseline space-x-0 lg:space-x-4 items-end">
<div class="text-white mb-1">ON/OFF</div> <div class="text-white mb-1">ON/OFF</div>
<div class="text-3xl mr-0"> <div class="text-3xl w-8 mr-0">
<%#= s.is_active %> <%#= s.is_active %>
<% if s.is_active %> <% if s.is_active %>
<i class="fa-solid fa-check text-notice"></i> <i class="fa-solid fa-check text-notice"></i>

View File

@@ -22,13 +22,13 @@ begin
end end
end end
rescue rescue
# error_message = "[#{Time.now}] #{mode} 실행 실패 (station_id: #{controller_id}, value: #{value})" error_message = "[#{Time.now}] #{mode} 실행 실패 (station_id: #{controller_id}, value: #{value})"
# res = Sms.send_one( res = Sms.send_one(
# { {
# to: '01062619801', to: '01062619801',
# from: '01062619801', from: '01062619801',
# text: error_message text: error_message
# } }
# ) )
# puts res puts res
end end