diff --git a/app/assets/images/medal-test.png b/app/assets/images/medal-test.png new file mode 100644 index 0000000..a00835c Binary files /dev/null and b/app/assets/images/medal-test.png differ diff --git a/app/assets/stylesheets/pages/_dashboard.scss b/app/assets/stylesheets/pages/_dashboard.scss index 202b06c..d5c5a70 100644 --- a/app/assets/stylesheets/pages/_dashboard.scss +++ b/app/assets/stylesheets/pages/_dashboard.scss @@ -18,6 +18,12 @@ padding: 20px; } +.rewards { + display: grid; + grid-template-columns: repeat(4, 1fr); + grid-gap: 15px; +} + .follow { margin-bottom: 8px; diff --git a/app/javascript/components/dashboard.js b/app/javascript/components/dashboard.js index 3166260..dfade58 100644 --- a/app/javascript/components/dashboard.js +++ b/app/javascript/components/dashboard.js @@ -25,6 +25,8 @@ const initPolar = () => { position: 'left', labels: { fontFamily: 'Comfortaa', + fontSize: 16, + fontColor: 'black', } } } diff --git a/app/views/pages/dashboard.html.erb b/app/views/pages/dashboard.html.erb index 29dd9e6..8d04518 100644 --- a/app/views/pages/dashboard.html.erb +++ b/app/views/pages/dashboard.html.erb @@ -12,13 +12,17 @@
<% if key == :futureme %> - + <%= image_tag('medal-test', size: "100") %> + <% elsif key == :dailyactivities %> - + <%= image_tag('medal-test', size: "100") %> + <% elsif key == :interactions %> - + <%= image_tag('medal-test', size: "100") %> + <% elsif key == :curiosity %> - + <%= image_tag('medal-test', size: "100") %> + <% end %>
@@ -27,17 +31,20 @@ <% if @counter[:dailyactivities] == @counter[:futureme] && @counter[:futureme] == @counter[:interactions] && @counter[:interactions] == @counter[:curiosity] %> <% if @counter[:dailyactivities] >= 1 %>
- + <%= image_tag('medal-test', size: "100") %> +
<% end %> <% if @counter[:dailyactivities] >= 2 %>
- + <%= image_tag('medal-test', size: "100") %> +
<% end %> <% if @counter[:dailyactivities] >= 3 %>
- + <%= image_tag('medal-test', size: "100") %> +
<% end %> <% end %> @@ -46,35 +53,29 @@
-
-
-
Ongoing challenges (<%= @undone_participations.length %>)
+ <% if @undone_participations.length >= 2 %> +
Ongoing challenges (<%= @undone_participations.length %>)
+ <% else %> +
Ongoing challenge (<%= @undone_participations.length %>)
+ <% end %>
<% if @undone_participations.empty? %>
<%= link_to "Challenge me", challenges_home_path, class:"newchallenge" %> <%= image_tag "emoji/026-grinning.png", size: 50 %> - - - <%else%> -
-
-
- <% if @undone_participations.empty? %> -
- <%= link_to "Challenge me", challenges_home_path, id:"newchallenge" %> - <%= image_tag "emoji/026-grinning.png", size: 50 %> +
+ <% else %> +
+
+ <% @undone_participations.each do |participation| %> + <%= render 'non_done_card', participation: participation %> + <% end %>
- <% else %> - <% @undone_participations.each do |participation| %> - <%= render 'non_done_card', participation: participation %> - <% end %> - <% end %> - <% end %> -
+
+ <% end %>
diff --git a/app/views/participations/index.html.erb b/app/views/participations/index.html.erb index 888b248..664c484 100644 --- a/app/views/participations/index.html.erb +++ b/app/views/participations/index.html.erb @@ -5,7 +5,6 @@

Challenges completed

-