From 9cfd60afc24920b3f8b9e459606c1e6560fee092 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 17 Jan 2018 20:08:02 +0100 Subject: [PATCH] adds styles to budgets homepage --- app/assets/stylesheets/participation.scss | 82 ++++++++--- app/views/budgets/index.html.erb | 161 ++++++++++++---------- 2 files changed, 148 insertions(+), 95 deletions(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 606de72f3..a8a593dab 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -5,7 +5,7 @@ // 03. Show participation // 04. List participation // 05. Featured -// 06. Budget +// 06. Budgets // 07. Proposals successful // 08. Polls // 09. Polls results and stats @@ -1096,31 +1096,39 @@ } } -// 06. Budget -// ---------- +// 06. Budgets +// ----------- -.expanded.budget { - background: $budget; +.expanded { - h1, - h2, - p, - .back, - .icon-angle-left { - color: #fff; - } + &.budget { + background: $budget; - .button { - background: #fff; - color: $budget; - } + h1, + h2, + p, + a, + .back, + .icon-angle-left { + color: #fff; + } - .info { - background: #6a2a72; + a { + text-decoration: underline; + } - p { - margin-bottom: 0; - text-transform: uppercase; + .button { + background: #fff; + color: $budget; + } + + .info { + background: #6a2a72; + + p { + margin-bottom: 0; + text-transform: uppercase; + } } } } @@ -1182,7 +1190,7 @@ a { text-decoration: underline; - } + } .button { background: #fff; @@ -1212,6 +1220,36 @@ } } +.groups-and-headings { + + .heading { + border: 1px solid $border; + border-radius: rem-calc(3); + display: inline-block; + margin-bottom: $line-height / 2; + + &:hover { + background: $highlight; + text-decoration: none; + } + + a { + display: block; + padding: $line-height / 2; + + &:hover { + text-decoration: none; + } + } + + span { + color: $text; + display: block; + font-size: $small-font-size; + } + } +} + .progress-votes { position: relative; diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index 366e33e2c..793ded774 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -57,92 +57,107 @@ -
-
+
+
+
-
- <% @budget.groups.each do |group| %> -

<%= group.name %>

-
- <% group.headings.each do |heading| %> -
- <%= link_to heading.name, - budget_investments_path(@budget.id, heading_id: heading.id) %> - <%= @budget.formatted_heading_price(heading) %> -
- <% end %> -
- <% end %> -
- -
-

<%= t("budgets.index.map") %>

- -
- -
- <%= link_to t("budgets.index.investment_proyects"), - budget_investments_path(@budget.id) %>
- <%= link_to t("budgets.index.unfeasible_investment_proyects"), - budget_investments_path(budget_id: @budget.id, filter: 'unfeasible') %>
- <%= link_to t("budgets.index.not_selected_investment_proyects"), - budget_investments_path(budget_id: @budget.id, filter: 'unselected') %> -
- -
-

<%= t("budgets.index.all_phases") %>

- -
- - -
-
-
-
    -
  • - <%= link_to "#other_budgets" do %> -

    - <%= t("budgets.index.finished_budgets") %> -

    - <% end %> -
  • +
    + <% @budget.groups.each do |group| %> +

    <%= group.name %>

    +
      + <% group.headings.each do |heading| %> +
    • + <%= link_to budget_investments_path(@budget.id, heading_id: heading.id) do %> + <%= heading.name %> + <%= @budget.formatted_heading_price(heading) %> + <% end %> +
    • + <% end %>
    -
    + <% end %>
-
+
+

<%= t("budgets.index.map") %>

+ +
+ +

+ <%= link_to budget_investments_path(@budget.id) do %> + <%= t("budgets.index.investment_proyects") %> + <% end %>
+ <%= link_to budget_investments_path(budget_id: @budget.id, filter: 'unfeasible') do %> + <%= t("budgets.index.unfeasible_investment_proyects") %> + <% end %>
+ <%= link_to budget_investments_path(budget_id: @budget.id, filter: 'unselected') do %> + <%= t("budgets.index.not_selected_investment_proyects") %> + <% end %> +

+ +
+

<%= t("budgets.index.all_phases") %>

+ +
+
+
+ +
+
+ + +
<% @budgets.each do |budget| %> <% if budget_published?(budget) %> -
-
- <%= budget.name %> - <%= budget.description %> -
-
- <%= link_to t("budgets.index.see_results"), budget_results_path(budget.id) %> +
+
+
+
+

<%= budget.name %>

+ <%= budget.description %> +
+
+
+ <%= link_to t("budgets.index.see_results"), + budget_results_path(budget.id), + class: "button expanded" %> +
+
+
<% end %> <% end %>
+
-
-

- <%= t("budgets.index.section_footer.title") %> -

-

<%= t("budgets.index.section_footer.description") %>

-

<%= t("budgets.index.section_footer.help_text_1") %>

-

<%= t("budgets.index.section_footer.help_text_2") %>

-

<%= t("budgets.index.section_footer.help_text_3", - org: link_to(setting['org_name'], new_user_registration_path)).html_safe %>

-

<%= t("budgets.index.section_footer.help_text_4") %>

+
+
+
+

+ <%= t("budgets.index.section_footer.title") %> +

+

<%= t("budgets.index.section_footer.description") %>

+

<%= t("budgets.index.section_footer.help_text_1") %>

+

<%= t("budgets.index.section_footer.help_text_2") %>

+

<%= t("budgets.index.section_footer.help_text_3", + org: link_to(setting['org_name'], new_user_registration_path)).html_safe %>

+

<%= t("budgets.index.section_footer.help_text_4") %>

+