show when day log for current day
This commit is contained in:
parent
1a6d60943a
commit
dacd850493
3 changed files with 20 additions and 3 deletions
|
|
@ -54,6 +54,21 @@ main {
|
|||
height: 15px;
|
||||
}
|
||||
|
||||
.day.has-day-log {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.day.has-day-log::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 1px;
|
||||
right: 1px;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 50%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.selected-day {
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 3px white, 0 0 0 5px black;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ module MoodsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def css_class_for_day(status)
|
||||
status == :empty ? "day empty-day" : "day"
|
||||
def css_class_for_day(status, day_log)
|
||||
css_class = status == :empty ? "day empty-day" : "day"
|
||||
css_class += " has-day-log" if day_log
|
||||
css_class
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
data-info="<%= mood[:day_log]&.info %>"
|
||||
data-action="click->mood#updateDayInfo"
|
||||
title="<%= l(mood[:recorded_at].to_date) %> : <%= mode.label %>"
|
||||
class="<%= css_class_for_day(status) %>"
|
||||
class="<%= css_class_for_day(status, mood[:day_log]) %>"
|
||||
style="<%= style_for_mode(mode, status) %>">
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue