Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Budgets phase one #1700

Merged
merged 7 commits into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified app/assets/images/custom/budget_welcome/background_header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/custom/welcome/background_header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/custom/welcome/background_header_mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 43 additions & 17 deletions app/assets/stylesheets/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ $budget-2018-blue: #408ea2;
$budget-2018-pink: #e78573;
$budget-2018-yellow: #fef384;

$budget-2019-green: #d8e9d8;
$budget-2019-green-dark: #4a5e4c;
$budget-2019-blue: #d0e3e9;
$budget-2019-blue-dark: #425257;
$budget-2019-orange: #ffeed4;
$budget-2019-orange-dark: #726e4f;

// Madrid corporate identity manual

$madrid-black: #000;
Expand Down Expand Up @@ -2762,46 +2769,59 @@ ul {

// Overrides budgets default colors
// -------------------------------

.expanded.budget,
.jumbo-budget {
background: #000;
background: $budget-2019-green;

@include breakpoint(medium) {
background: $budget-2019-green image-url('budget_welcome/background_header.jpg');
background-position: 90% top;
background-repeat: no-repeat;
background-size: contain;
}

h1,
p,
a,
.back,
.icon-angle-left {
color: $budget-2019-green-dark;
}

h2 {
color: $budget-2018-pink;
font-family: "Souvenir" !important;
color: $budget-2019-green-dark;
font-size: rem-calc(30);
font-weight: 700;
line-height: rem-calc(30);
margin-bottom: $line-height / 2;
}

&.budget-heading {
min-height: $line-height * 11;

h3 {
color: $budget-2018-yellow;
font-family: "Souvenir" !important;
font-weight: 400;
color: $budget-2019-blue-dark;
}
}

&.budget-header {
background: #000;
background: $budget-2019-green;

@include breakpoint(medium) {
background: #000 image-url('budget_welcome/background_header.jpg');
background-position: 100% top;
background: $budget-2019-green image-url('budget_welcome/background_header.jpg');
background-position: 40% top;
background-repeat: no-repeat;
background-size: contain;
}
}

.info {
background: #fff;
border-bottom: 1px solid #000;
background: #fffde8;
border-bottom: 1px solid $budget-2019-orange;

@include breakpoint(medium) {
border-bottom: 0;
border-top: rem-calc(6) solid $budget-2018-pink;
border-top: 0;
}

h2,
Expand Down Expand Up @@ -2832,6 +2852,12 @@ ul {
}
}

.expanded.budget.button {
background: #000;
color: #fff;
text-decoration: none;
}

.budget-info {

.submenu .is-active {
Expand All @@ -2844,7 +2870,7 @@ ul {

.phase::before {
background: #fff;
border: 4px solid $budget-2018-blue;
border: 4px solid $budget-2019-green;
}
}

Expand All @@ -2859,12 +2885,12 @@ ul {
.budget-timeline .phase.is-active {

h3 {
background: #000;
color: $budget-2018-blue;
background: $budget-2019-blue;
color: $budget-2019-blue-dark;
}

&::before {
background: #000;
background: $budget-2019-blue-dark;
}
}

Expand Down
18 changes: 6 additions & 12 deletions app/assets/stylesheets/custom/_welcome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,18 @@ $budget-2018-yellow: #fef384;
}

.jumbo {
background: #ededed image-url('welcome/background_header_mobile.jpg');
background: #d8e9d8 image-url('welcome/background_header_mobile.jpg');
background-position: bottom;
background-repeat: no-repeat;
padding-bottom: rem-calc(100);
padding-bottom: rem-calc(72);

@include breakpoint(medium) {
background: #ededed image-url('welcome/background_header.jpg');
background: #d8e9d8 image-url('welcome/background_header.jpg');
background-size: cover;
}

h1,
span,
.lead {
font-family: 'Souvenir' !important;
}

h1 {
color: #1d4cd6;
color: #4a5e4c;
font-size: rem-calc(20);
font-weight: 300;
line-height: rem-calc(20);
Expand All @@ -200,7 +194,7 @@ $budget-2018-yellow: #fef384;
}

.lead {
color: #00245e;
color: #4a5e4c;
font-size: rem-calc(30);
font-weight: 700;
line-height: rem-calc(30);
Expand All @@ -224,7 +218,7 @@ $budget-2018-yellow: #fef384;
}

.button {
background: #1d4cd6;
background: #425257;
color: #fff;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/budgets/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<% if current_user %>
<% if current_user.level_two_or_three_verified? %>
<%= link_to t("budgets.investments.index.sidebar.create"),
new_budget_investment_guide,
new_budget_investment_path(current_budget),
class: "button margin-top expanded" %>
<% else %>
<div class="callout warning margin-top">
Expand Down
74 changes: 37 additions & 37 deletions app/views/budgets/investments/_investment_show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
social_url: budget_investment_url(investment.budget, investment),
social_title: investment.title,
social_description: investment.description,
twitter_image_url: (investment.image.present? ? investment.image_url(:thumb) : nil),
og_image_url: (investment.image.present? ? investment.image_url(:thumb) : nil) %>
twitter_image_url: (investment.image.present? ? investment.image_url(:thumb) : "social_media_budgets_2019_twitter.png"),
og_image_url: (investment.image.present? ? investment.image_url(:thumb) : "social_media_budgets_2019.png") %>
<% end %>

<% cache [locale_and_user_status(investment),
investment,
investment.author,
Expand Down Expand Up @@ -146,42 +145,43 @@
</div>
</div>
<% end %>
<% end %>

<% if investment.unfeasible? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_unfeasible_html") %>
</div>
<% elsif investment.winner? %>
<div class="callout success">
<strong><%= t("budgets.investments.show.project_winner") %></strong>
</div>
<% elsif investment.selected? %>
<div class="callout success">
<%= t("budgets.investments.show.project_selected_html") %>
</div>
<% elsif !investment.selected? && @budget.balloting_or_later? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_not_selected_html") %>
</div>
<% else %>
<% if investment.unfeasible? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_unfeasible_html") %>
</div>
<% elsif investment.winner? %>
<div class="callout success">
<strong><%= t("budgets.investments.show.project_winner") %></strong>
</div>
<% elsif investment.selected? %>
<div class="callout success">
<%= t("budgets.investments.show.project_selected_html") %>
</div>
<% elsif !investment.selected? %>
<div class="callout warning">
<%= t("budgets.investments.show.project_not_selected_html") %>
</div>
<% else %>
<br>
<div class="float-right">
<span class="label-budget-investment float-left">
<%= t("budgets.investments.show.title") %>
</span>
<span class="icon-budget"></span>
</div>
<% end %>
<% if investment.should_show_price? %>
<div class="sidebar-divider"></div>
<h2><%= t("budgets.investments.show.price") %></h2>
<div class="supports text-center">
<p class="investment-project-amount">
<%= investment.formatted_price %>
</p>
</div>
<% end %>
<br>
<div class="float-right">
<span class="label-budget-investment float-left">
<%= t("budgets.investments.show.title") %>
</span>
<span class="icon-budget"></span>
</div>
<% end %>
<% if investment.should_show_price? %>
<div class="sidebar-divider"></div>
<h2><%= t("budgets.investments.show.price") %></h2>
<div class="supports text-center">
<p class="investment-project-amount">
<%= investment.formatted_price %>
</p>
</div>
<% end %>

<%= render partial: 'shared/social_share', locals: {
share_title: t("budgets.investments.show.share"),
title: investment.title,
Expand Down
2 changes: 1 addition & 1 deletion app/views/budgets/investments/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="callout primary">
<%= t("budgets.investments.form.faq") %>
<br>
<%= link_to t("budgets.investments.form.faq_link"), more_info_budgets_path(anchor: "10") %>
<%= link_to t("budgets.investments.form.faq_link"), more_info_budgets_path %>
</div>

<%= render '/budgets/investments/form', form_url: budget_investments_path(@budget) %>
Expand Down
24 changes: 15 additions & 9 deletions app/views/custom/budgets/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% if current_budget.present? %>
<% provide :title, t("meta_tags.budget_2018.#{current_budget.phase}.title") %>
<% provide :meta_description, t("meta_tags.budget_2018.#{current_budget.phase}.description") %>
<% provide :title, t("meta_tags.budget_2019.#{current_budget.phase}.title") %>
<% provide :meta_description, t("meta_tags.budget_2019.#{current_budget.phase}.description") %>

<% content_for :canonical do %>
<%= render "shared/canonical", href: budgets_url %>
Expand All @@ -9,10 +9,10 @@
<% provide :social_media_meta_tags do %>
<%= render "shared/social_media_meta_tags",
social_url: budgets_url,
social_title: t("meta_tags.budget_2018.#{current_budget.phase}.title"),
social_description: t("meta_tags.budget_2018.#{current_budget.phase}.description"),
twitter_image_url: "social_media_budgets_2018_#{current_budget.phase}_twitter.png",
og_image_url: "social_media_budgets_2018_#{current_budget.phase}.png" %>
social_title: t("meta_tags.budget_2019.#{current_budget.phase}.title"),
social_description: t("meta_tags.budget_2019.#{current_budget.phase}.description"),
twitter_image_url: "social_media_budgets_2019_twitter.png",
og_image_url: "social_media_budgets_2019.png" %>
<% end %>

<% provide :tracking_page_number, "33" %>
Expand Down Expand Up @@ -40,9 +40,15 @@
<% if current_budget.accepting? %>
<% if current_user %>
<% if current_user.level_two_or_three_verified? %>
<%= link_to t("budgets.investments.index.sidebar.create"),
new_budget_investment_guide,
class: "button margin-top expanded" %>
<% if Setting['feature.guides'].present? %>
<%= link_to t("budgets.investments.index.sidebar.create"),
new_budget_investment_guide,
class: "button margin-top expanded" %>
<% else %>
<%= link_to t("budgets.investments.index.sidebar.create"),
new_budget_investment_path(current_budget),
class: "button margin-top expanded" %>
<% end %>
<% else %>
<div class="callout warning margin-top">
<%= t("budgets.investments.index.sidebar.verified_only",
Expand Down
Loading