Skip to content

Commit

Permalink
reframe images in show role model
Browse files Browse the repository at this point in the history
  • Loading branch information
lordinatrice committed Jun 14, 2019
1 parent 19b562d commit 87a432b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 39 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/_card_role_model.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ hr {
object-fit: cover;
display: inline-block;
margin-bottom: 40px;
object-position: top;
}
.card_icon {
font-size: 20px;
Expand Down
82 changes: 43 additions & 39 deletions app/views/pages/dashboard.html.erb
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
<%= content_for(:page, "dashboard") %>

<div class="container" style="margin-top: 100px";>
<h4 class="titles"><em>Stats</em></h4>
<div class="bottom-dash">
<div class="chart-space">
<canvas id="polarChart" data-daily="<%= @counter[:dailyactivities] %>" data-future="<%= @counter[:futureme] %>" data-interactions="<%= @counter[:interactions] %>" data-curiosity="<%= @counter[:curiosity] %>"></canvas>
</div>

<div class="rewards">
<% @counter.each do |key, value| %>
<% if value >= 3 %>
<div class="reward">
<div class="reward-content">
<% if key == :futureme %>
<%= image_tag('medailles/dragon_3_future_me.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% elsif key == :dailyactivities %>
<%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% elsif key == :interactions %>
<%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% elsif key == :curiosity %>
<%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% end %>
<div class="container">
<h4><em>Rewards</em></h4>
<div class="rewards">
<% @counter.each do |key, value| %>
<% if value >= 3 %>
<div class="reward">
<div class="reward-content">
<% if key == :futureme %>
<%= image_tag('medailles/dragon_3_future_me.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% elsif key == :dailyactivities %>
<%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% elsif key == :interactions %>
<%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% elsif key == :curiosity %>
<%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<% end %>
</div>
</div>
</div>
<% end %>
<% end %>
<% if @counter[:dailyactivities] == @counter[:futureme] && @counter[:futureme] == @counter[:interactions] && @counter[:interactions] == @counter[:curiosity] %>
<% if @counter[:dailyactivities] >= 1 %>
<div class="reward">
<%= image_tag('medailles/dragon_1_all.png', size: "100") %> <!-- bébé dragon -->
<!-- <i class="bronze fas fa-trophy fa-lg"></i> -->
</div>
<% end %>
<% if @counter[:dailyactivities] >= 2 %>
<div class="reward">
<%= image_tag('medailles/dragon_2_all.png', size: "100") %> <!-- petit dragon -->
<!-- <i class="silver fas fa-trophy fa-lg"></i> -->
</div>
<% end %>
<% end %>
<% if @counter[:dailyactivities] >= 3 %>
<div class="reward">
<%= image_tag('medailles/dragon_3_all.png', size: "100") %> <!-- grand dragon -->
<!-- <i class="gold fas fa-trophy fa-lg"></i> -->
</div>
<% if @counter[:dailyactivities] == @counter[:futureme] && @counter[:futureme] == @counter[:interactions] && @counter[:interactions] == @counter[:curiosity] %>
<% if @counter[:dailyactivities] >= 1 %>
<div class="reward">
<%= image_tag('medailles/dragon_1_all.png', size: "100") %> <!-- bébé dragon -->
<!-- <i class="bronze fas fa-trophy fa-lg"></i> -->
</div>
<% end %>
<% if @counter[:dailyactivities] >= 2 %>
<div class="reward">
<%= image_tag('medailles/dragon_2_all.png', size: "100") %> <!-- petit dragon -->
<!-- <i class="silver fas fa-trophy fa-lg"></i> -->
</div>
<% end %>
<% if @counter[:dailyactivities] >= 3 %>
<div class="reward">
<%= image_tag('medailles/dragon_3_all.png', size: "100") %> <!-- grand dragon -->
<!-- <i class="gold fas fa-trophy fa-lg"></i> -->
</div>
<% end %>
<% end %>
<% end %>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 87a432b

Please sign in to comment.