config/views/index.erb

69 lines
1.1 KiB
Text
Raw Normal View History

2024-02-11 22:19:19 +01:00
<style>
2024-06-02 20:19:02 +02:00
main {
display: flex;
align-items: center;
justify-content: center;
}
2024-02-11 22:19:19 +01:00
.mode {
2024-06-02 20:19:02 +02:00
height: 100vh;
2024-02-11 22:19:19 +01:00
}
img {
width: auto;
height: 100%;
}
2024-06-02 20:19:02 +02:00
table {
empty-cells: hide;
border-collapse: collapse;
}
tbody tr td {
border: 1px solid black;
border-spacing: 3px;
min-width: 20px;
min-height: 20px;
border-radius: 50%;
margin: 5px;
}
.week {
display: flex;
}
.day {
background-color: white;
border: 1px;
margin: 1px;
min-width: 10px;
min-height: 10px;
}
.creatif {
background-color: purple;
}
.en-charge {
background-color: orange;
}
.frigo-vide {
background-color: brown;
}
.croisiere {
background-color: green;
}
2024-02-11 22:19:19 +01:00
</style>
2024-06-02 20:19:02 +02:00
<main>
<div class="mode">
<img src="<%= @last_mood.mode %>.png">
</div>
<div class="yearlog">
<% @mood_log.each do |week| %>
<div class="week">
<% week.each do |d| %>
<% if d[1] %>
<div title="<%= d[0] %> : <%= d[1] %>" class="day <%= d[1] %>"></div>
<% else %>
<div class="day"></div>
<% end %>
<% end %>
</div>
<% end %>
</div>
</main>