config/views/index.erb

111 lines
1.8 KiB
Text
Raw Normal View History

2024-02-11 22:19:19 +01:00
<style>
2024-09-22 20:50:55 +02:00
body {
margin: 0px;
font: 1.8rem "Fira Sans", sans-serif;
}
2024-06-02 20:19:02 +02:00
main {
display: flex;
align-items: center;
justify-content: center;
2024-09-22 20:50:55 +02:00
flex-wrap: wrap;
2024-06-02 20:19:02 +02:00
}
2024-09-22 20:50:55 +02:00
2024-02-11 22:19:19 +01:00
.mode {
2024-06-02 20:19:02 +02:00
height: 100vh;
2024-09-22 20:50:55 +02:00
flex: 1 527px;
2024-02-11 22:19:19 +01:00
}
img {
height: 100%;
2024-09-22 20:50:55 +02:00
width:100%;
// min-width: 527px;
object-fit: contain;
2024-02-11 22:19:19 +01:00
}
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;
}
2024-09-22 20:50:55 +02:00
.tracker {
display: flex;
flex: 1 527px;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
justify-content: center;
background-color: lightgoldenrodyellow;
height: 100vh;
width: 100%;
}
.info h1 {
margin-bottom: 40px;
font-weight: 350;
}
.tracks {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
margin: 30px;
}
2024-06-02 20:19:02 +02:00
.week {
display: flex;
2024-09-22 20:50:55 +02:00
flex-direction: column;
justify-items: start;
flex-wrap: wrap;
margin-bottom: 20px;
2024-06-02 20:19:02 +02:00
}
.day {
border: 1px;
2024-09-22 20:50:55 +02:00
margin: 4px;
min-width: 20px;
min-height: 20px;
2024-06-02 20:19:02 +02:00
}
.creatif {
2024-09-22 20:50:55 +02:00
background-color: red;
2024-06-02 20:19:02 +02:00
}
.en-charge {
background-color: orange;
}
.frigo-vide {
2024-09-22 20:50:55 +02:00
background-color: grey;
2024-06-02 20:19:02 +02:00
}
.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>
2024-09-22 20:50:55 +02:00
<div class="tracker">
<div class="info">
<h1>Humeurs 2024</h1>
</div>
<div class="tracks">
2024-06-02 20:19:02 +02:00
2024-09-22 20:50:55 +02:00
<% @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 %>
2024-06-02 20:19:02 +02:00
<% end %>
2024-09-22 20:50:55 +02:00
</div>
<% end %>
</div>
2024-06-02 20:19:02 +02:00
</div>
</main>