From f20192d9d7c226fd1c9d8c4eab6e6704e81d23ad Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 3 Sep 2015 14:15:45 +0200 Subject: [PATCH] Improves styles for debates --- app/assets/stylesheets/debates.scss | 31 ++++++++++ app/assets/stylesheets/participacion.scss | 68 ++++++++++++++++++++- app/views/debates/_form.html.erb | 2 +- app/views/debates/edit.html.erb | 19 ++++-- app/views/welcome/_featured_debate.html.erb | 2 +- 5 files changed, 113 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index 2fe4a8383..518ccf5b1 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -383,6 +383,16 @@ .anonymous-votes, .organizations-votes { padding-top: rem-calc(24); } + + .divider { + display: none; + } + + @media (min-width: $medium-breakpoint) { + .divider { + display: inline-block; + } + } } } @@ -463,6 +473,23 @@ line-height: $line-height; padding: rem-calc(24); } + + @media (min-width: $small-breakpoint + em-calc(1)) and (max-width:$medium-breakpoint) { + .in-favor, .against { + text-align: left; + width: rem-calc(100); + } + } + + .divider { + display: none; + } + + @media (min-width: $medium-breakpoint) { + .divider { + display: inline-block; + } + } } .leave-comment { @@ -536,6 +563,10 @@ } } +.debate-edit { + @extend .debate-new; +} + // 05. Comments // - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index bd8759c98..d272042df 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -460,7 +460,10 @@ header { &:hover { background: none; - color: $link-hover; + // color: $link-hover; + color: white; + text-decoration: underline; + transition: text-decoration 275ms; } } @@ -488,6 +491,10 @@ header { a { color: white; + + &:hover { + text-decoration: underline; + } } } @@ -502,7 +509,15 @@ header { a { color: $link; + display: inline-block; font-size: rem-calc(14); + min-width: rem-calc(192); + position: relative; + + &:hover { + color: $text; + text-decoration: underline; + } &.active { color: $text; @@ -745,8 +760,7 @@ form { } .ckeditor { - margin-bottom: rem-calc(24); - min-height: rem-calc(336); + min-height: rem-calc(312); } .checkbox { @@ -1172,6 +1186,53 @@ table { } } } + + .more-information { + margin-top: rem-calc(24); + + ul { + list-style-type: none; + margin-left: 0; + + a:first-child { + border-top: 1px solid $border; + display: block; + padding-top: rem-calc(12); + } + + li { + border-bottom: 1px solid $border; + font-size: rem-calc(16); + padding-bottom: rem-calc(12); + padding-left: rem-calc(36); + position: relative; + + span { + color: $text-medium; + display: block; + font-size: rem-calc(13); + } + + &:before { + content: 'D'; + color: $link; + font-family: "icons" !important; + left: 0; + margin-right: rem-calc(12); + position: absolute; + } + + &:after { + content: 'c'; + color: $text-light; + font-family: "icons" !important; + position: absolute; + right: 0; + top: rem-calc(6); + } + } + } + } } // 17. Verification @@ -1259,6 +1320,7 @@ table { span { display: inline-block; + min-width: rem-calc(288); } } } diff --git a/app/views/debates/_form.html.erb b/app/views/debates/_form.html.erb index dd4ed2e29..334c444cf 100644 --- a/app/views/debates/_form.html.erb +++ b/app/views/debates/_form.html.erb @@ -34,7 +34,7 @@
- <%= f.submit(class: "button radius", value: t("debates.form.start_debate")) %> + <%= f.submit(class: "button radius", value: t("debates.#{action_name}.form.submit_button")) %>
<% end %> diff --git a/app/views/debates/edit.html.erb b/app/views/debates/edit.html.erb index dc90707b2..45499263f 100644 --- a/app/views/debates/edit.html.erb +++ b/app/views/debates/edit.html.erb @@ -1,6 +1,17 @@ -

<%= t("debates.edit.editing") %>

+
-<%= render 'form' %> +
+ <%= link_to debates_path, class: "left back clear" do %> + + <%= t("debates.edit.back_link") %> + <% end %> -<%= link_to t("debates.edit.show_link"), @debate %> | -<%= link_to t("debates.edit.back_link"), debates_path %> +
+ <%= link_to t("debates.edit.show_link"), @debate %> +
+ +

<%= t("debates.edit.editing") %>

+ + <%= render "form" %> +
+
diff --git a/app/views/welcome/_featured_debate.html.erb b/app/views/welcome/_featured_debate.html.erb index 00fe7ce73..b364f875c 100644 --- a/app/views/welcome/_featured_debate.html.erb +++ b/app/views/welcome/_featured_debate.html.erb @@ -1,5 +1,5 @@ <% cache [locale_and_user_status, featured_debate, 'featured'] do %> -
+