From afa8bf8dbad8ad7fe2e9544e685f1e53c9a4c506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 12 Dec 2018 18:01:34 +0100 Subject: [PATCH] Add basic headings and navigaton styles for stats --- app/assets/stylesheets/application.scss | 1 + app/assets/stylesheets/stats.scss | 34 +++++++++++++++++++++++++ app/views/polls/_poll_header.html.erb | 2 +- app/views/polls/_poll_subnav.html.erb | 2 +- app/views/polls/stats.html.erb | 16 ++++++++---- 5 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 app/assets/stylesheets/stats.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 85a9ed041..ad1a0dd0b 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -12,6 +12,7 @@ @import "legislation"; @import "legislation_process"; @import "community"; +@import "stats"; @import "custom"; @import "c3"; @import "annotator.min"; diff --git a/app/assets/stylesheets/stats.scss b/app/assets/stylesheets/stats.scss new file mode 100644 index 000000000..97004acb4 --- /dev/null +++ b/app/assets/stylesheets/stats.scss @@ -0,0 +1,34 @@ +.polls-results-stats { + + .sidebar { + border-right: 1px solid $border; + + > ul { + display: block; + font-size: rem-calc(20); + padding: 0; + + ul { + font-size: rem-calc(15); + list-style-type: none; + margin-left: 0.8rem; + margin-top: 1rem; + } + + li a { + color: $link; + padding: 0; + } + } + } + + h2 { + border-bottom: 1px solid $border; + } + + h3 { + font-size: rem-calc(20); + margin-bottom: 0; + margin-top: rem-calc(30); + } +} diff --git a/app/views/polls/_poll_header.html.erb b/app/views/polls/_poll_header.html.erb index 93f41f9d1..d241e455c 100644 --- a/app/views/polls/_poll_header.html.erb +++ b/app/views/polls/_poll_header.html.erb @@ -7,7 +7,7 @@ <%= link_to t("polls.poll_header.back_to_proposal"), [@poll.related] %> <% end %> -

<%= @poll.name %>

+

<%= @poll.name %>

<%= safe_html_with_links simple_format(@poll.summary) %> diff --git a/app/views/polls/_poll_subnav.html.erb b/app/views/polls/_poll_subnav.html.erb index e50d64e0a..1fec98bdb 100644 --- a/app/views/polls/_poll_subnav.html.erb +++ b/app/views/polls/_poll_subnav.html.erb @@ -15,7 +15,7 @@ <% if @poll.stats_enabled? %> <% if stats_menu? %>
  • -

    <%= t("polls.show.stats_menu") %>

    + <%= t("polls.show.stats_menu") %>
  • <% else %>
  • <%= link_to t("polls.show.stats_menu"), stats_poll_path(id: @poll.slug || @poll.id) %>
  • diff --git a/app/views/polls/stats.html.erb b/app/views/polls/stats.html.erb index d472ebc3d..98767e2b6 100644 --- a/app/views/polls/stats.html.erb +++ b/app/views/polls/stats.html.erb @@ -7,15 +7,21 @@
    -

    <%= t("polls.show.stats.total_participation") %>

    +

    <%= t("polls.show.stats.title") %>

    +

    <%= t("polls.show.stats.total_participation") %>

    <%= t("polls.show.stats.total_votes") %>