Skip to content

Commit

Permalink
Merge pull request #154 from eugeniecln1/fridaaaay
Browse files Browse the repository at this point in the history
Fridaaaay
  • Loading branch information
svilder authored Jun 14, 2019
2 parents 1c42b2b + 1042692 commit 10dae64
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 27 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/components/_card_role_model.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
text-decoration: none;
}
p {
font-size: 15px;
font-size: 12px;
}
}

Expand Down
71 changes: 45 additions & 26 deletions app/views/pages/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,63 @@
</div>

<div class="rewards">
<% if @counter[:dailyactivities] >= 3 && @counter[:futureme] >= 3 && @counter[:interactions] >= 3 && @counter[:curiosity] >= 3 %>
<div class="reward">
<%= image_tag('medailles/dragon_3_all.png', size: "100") %> <!-- bébé dragon -->

</div>
<% elsif @counter[:dailyactivities] >= 2 && @counter[:futureme] >= 2 && @counter[:interactions] >= 2 && @counter[:curiosity] >= 2 %>
<div class="reward">
<%= image_tag('medailles/dragon_2_all.png', size: "100") %> <!-- petit dragon -->

</div>
<% elsif @counter[:dailyactivities] >= 1 && @counter[:futureme] >= 1 && @counter[:interactions] >= 1 && @counter[:curiosity] >= 1 %>
<div class="reward">
<%= image_tag('medailles/dragon_1_all.png', size: "100") %> <!-- grand dragon -->
</div>
<% end %>
<% @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> -->
<%= image_tag('medailles/dragon_3_future_me.png', size: "100") %>
<% 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> -->
<%= image_tag('medailles/dragon_3_daily_activities.png', size: "100") %>
<% elsif key == :interactions %>
<%= image_tag('medailles/dragon_3_interactions.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<%= image_tag('medailles/dragon_3_interactions.png', size: "100") %>
<% elsif key == :curiosity %>
<%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %> <!-- dragon couleur cat -->
<!-- <i class=" <%= key %> fas fa-medal fa-lg"></i> -->
<%= image_tag('medailles/dragon_3_curiosity.png', size: "100") %>
<% end %>
</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 %>
<% elsif value >= 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 class="reward-content">
<% 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 %>
</div>
</div>
<% end %>
<% if @counter[:dailyactivities] >= 3 %>
<% elsif value >= 1 %>
<div class="reward">
<%= image_tag('medailles/dragon_3_all.png', size: "100") %> <!-- grand dragon -->
<!-- <i class="gold fas fa-trophy fa-lg"></i> -->
<div class="reward-content">
<% 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 %>
</div>
</div>
<% end %>
<% end %>
Expand Down Expand Up @@ -84,7 +103,7 @@
<!-- Modal -->
<% @participations.each do |participation| %>
<div class="modal fade" id="exampleModal<%= participation.id %>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-participation="<%= participation.id %>" >
<div class="modal-dialog" role="document">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Give your feedback</h5>
Expand All @@ -97,7 +116,7 @@
<%= f.input :feedback, as: :text, label: 'Description', error: 'Put a feedback !', placeholder: 'Really great challenge...' %>
<div class="d-flex justify-content-around">
<%= f.input :appreciation, collection: (1..5).to_a, label: content_tag(:i, "" , class: "fas fa-heart") + " LIKE", input_html: {class: "modal-rating"} %>
<%= f.input :difficulty, collection: (1..5).to_a, label: image_tag('dragon_logo.png', size: "20") + " DIFFICULTY", input_html: {class: "modal-rating"} %>
<%= f.input :difficulty, collection: (1..5).to_a, label: content_tag(:i, "" , class: "fas fa-dragon") + " DIFFICULTY", input_html: {class: "modal-rating"} %>
</div>

<div class="d-flex justify-content-left. align-items-center">
Expand Down

0 comments on commit 10dae64

Please sign in to comment.