diff --git a/app/assets/stylesheets/components/_card_role_model.scss b/app/assets/stylesheets/components/_card_role_model.scss index 10bf487..f8d8bdd 100644 --- a/app/assets/stylesheets/components/_card_role_model.scss +++ b/app/assets/stylesheets/components/_card_role_model.scss @@ -25,7 +25,7 @@ text-decoration: none; } p { - font-size: 15px; + font-size: 12px; } } diff --git a/app/views/pages/dashboard.html.erb b/app/views/pages/dashboard.html.erb index d7a8f5a..c45951d 100644 --- a/app/views/pages/dashboard.html.erb +++ b/app/views/pages/dashboard.html.erb @@ -7,44 +7,63 @@
+ <% if @counter[:dailyactivities] >= 3 && @counter[:futureme] >= 3 && @counter[:interactions] >= 3 && @counter[:curiosity] >= 3 %> +
+ <%= image_tag('medailles/dragon_3_all.png', size: "100") %> + +
+ <% elsif @counter[:dailyactivities] >= 2 && @counter[:futureme] >= 2 && @counter[:interactions] >= 2 && @counter[:curiosity] >= 2 %> +
+ <%= image_tag('medailles/dragon_2_all.png', size: "100") %> + +
+ <% elsif @counter[:dailyactivities] >= 1 && @counter[:futureme] >= 1 && @counter[:interactions] >= 1 && @counter[:curiosity] >= 1 %> +
+ <%= image_tag('medailles/dragon_1_all.png', size: "100") %> +
+ <% end %> <% @counter.each do |key, value| %> <% if value >= 3 %>
<% if key == :futureme %> - <%= image_tag('medailles/dragon_3_future_me.png', size: "100") %> - + <%= image_tag('medailles/dragon_3_future_me.png', size: "100") %> <% elsif key == :dailyactivities %> - <%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %> - + <%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %> <% elsif key == :interactions %> - <%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> - + <%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> <% elsif key == :curiosity %> - <%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %> - + <%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %> <% end %>
- <% end %> - <% end %> - <% if @counter[:dailyactivities] == @counter[:futureme] && @counter[:futureme] == @counter[:interactions] && @counter[:interactions] == @counter[:curiosity] %> - <% if @counter[:dailyactivities] >= 1 %> -
- <%= image_tag('medailles/dragon_1_all.png', size: "100") %> - -
- <% end %> - <% if @counter[:dailyactivities] >= 2 %> + <% elsif value >= 2 %>
- <%= image_tag('medailles/dragon_2_all.png', size: "100") %> - +
+ <% if key == :futureme %> + <%= image_tag('medailles/dragon_2_future_me.png', size: "100") %> + <% elsif key == :dailyactivities %> + <%= image_tag('medailles/dragon_2_daily_activities.png', size: "100") %> + <% elsif key == :interactions %> + <%= image_tag('medailles/dragon_2_interactions.png', size: "100") %> + <% elsif key == :curiosity %> + <%= image_tag('medailles/dragon_2_curiosity.png', size: "100") %> + <% end %> +
- <% end %> - <% if @counter[:dailyactivities] >= 3 %> + <% elsif value >= 1 %>
- <%= image_tag('medailles/dragon_3_all.png', size: "100") %> - +
+ <% if key == :futureme %> + <%= image_tag('medailles/dragon_1_future_me.png', size: "100") %> + <% elsif key == :dailyactivities %> + <%= image_tag('medailles/dragon_1_daily_activities.png', size: "100") %> + <% elsif key == :interactions %> + <%= image_tag('medailles/dragon_1_interactions.png', size: "100") %> + <% elsif key == :curiosity %> + <%= image_tag('medailles/dragon_1_curiosity.png', size: "100") %> + <% end %> +
<% end %> <% end %> @@ -84,7 +103,7 @@ <% @participations.each do |participation| %>