From 87a432b58cc6e699f2ab13b63e19edf696f8a343 Mon Sep 17 00:00:00 2001 From: Camille Regnault Date: Fri, 14 Jun 2019 11:38:33 +0200 Subject: [PATCH] reframe images in show role model --- .../components/_card_role_model.scss | 1 + app/views/pages/dashboard.html.erb | 82 ++++++++++--------- 2 files changed, 44 insertions(+), 39 deletions(-) diff --git a/app/assets/stylesheets/components/_card_role_model.scss b/app/assets/stylesheets/components/_card_role_model.scss index 10bf487..d258362 100644 --- a/app/assets/stylesheets/components/_card_role_model.scss +++ b/app/assets/stylesheets/components/_card_role_model.scss @@ -71,6 +71,7 @@ hr { object-fit: cover; display: inline-block; margin-bottom: 40px; + object-position: top; } .card_icon { font-size: 20px; diff --git a/app/views/pages/dashboard.html.erb b/app/views/pages/dashboard.html.erb index d7a8f5a..22b5f8e 100644 --- a/app/views/pages/dashboard.html.erb +++ b/app/views/pages/dashboard.html.erb @@ -1,53 +1,57 @@ <%= content_for(:page, "dashboard") %>
+

Stats

-
- <% @counter.each do |key, value| %> - <% if value >= 3 %> -
-
- <% if key == :futureme %> - <%= image_tag('medailles/dragon_3_future_me.png', size: "100") %> - - <% elsif key == :dailyactivities %> - <%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %> - - <% elsif key == :interactions %> - <%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> - - <% elsif key == :curiosity %> - <%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %> - - <% end %> +
+

Rewards

+
+ <% @counter.each do |key, value| %> + <% if value >= 3 %> +
+
+ <% if key == :futureme %> + <%= image_tag('medailles/dragon_3_future_me.png', size: "100") %> + + <% elsif key == :dailyactivities %> + <%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %> + + <% elsif key == :interactions %> + <%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> + + <% elsif key == :curiosity %> + <%= 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 %> -
- <%= image_tag('medailles/dragon_2_all.png', size: "100") %> - -
+ <% end %> <% end %> - <% if @counter[:dailyactivities] >= 3 %> -
- <%= image_tag('medailles/dragon_3_all.png', size: "100") %> - -
+ <% 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 %> +
+ <%= image_tag('medailles/dragon_2_all.png', size: "100") %> + +
+ <% end %> + <% if @counter[:dailyactivities] >= 3 %> +
+ <%= image_tag('medailles/dragon_3_all.png', size: "100") %> + +
+ <% end %> <% end %> - <% end %> +