Skip to content

Commit

Permalink
titres dashboard alignés
Browse files Browse the repository at this point in the history
  • Loading branch information
svilder committed Jun 14, 2019
1 parent fdb8f26 commit a2791f6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
9 changes: 9 additions & 0 deletions app/assets/stylesheets/pages/_dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

.title-stats,
.title-rewards {
padding-left: 30px;
}

.title-ongoing {
padding-left: 12px;
}

.titles {
display: flex;
justify-content: space-between;
Expand Down
14 changes: 8 additions & 6 deletions app/views/pages/dashboard.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<%= content_for(:page, "dashboard") %>

<div class="container" style="margin-top: 100px";>
<h4 class="title"><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 class="container">
<h4 class="title-stats"><em>Stats</em></h4>
<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>

<div class="container">
<h4><em>Rewards</em></h4>
<h4 class="title-rewards"><em>Rewards</em></h4>
<div class="rewards">
<% if @counter[:dailyactivities] >= 3 && @counter[:futureme] >= 3 && @counter[:interactions] >= 3 && @counter[:curiosity] >= 3 %>
<div class="reward">
Expand Down Expand Up @@ -82,9 +84,9 @@
<div class="dashboard-element">
<div class="titles">
<% if @undone_participations.length >= 2 %>
<h4><em>Ongoing challenges</em> (<%= @undone_participations.length %>)</h4>
<h4 class="title-ongoing"><em>Ongoing challenges</em> (<%= @undone_participations.length %>)</h4>
<% else %>
<h4><em>Ongoing challenge</em> (<%= @undone_participations.length %>)</h4>
<h4 class="title-ongoing"><em>Ongoing challenge</em> (<%= @undone_participations.length %>)</h4>
<% end %>
</div>
<br>
Expand Down

0 comments on commit a2791f6

Please sign in to comment.