<style>
main {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mode {
  height: 100vh;
}
img {
  width: auto;
  height: 100%;
}
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;
}
</style>
<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>
