Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Background image to adding proposal section
Browse files Browse the repository at this point in the history
  • Loading branch information
Eskilmar committed Feb 9, 2021
1 parent c193809 commit 23db92e
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 96 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions app/assets/stylesheets/decidim.scss
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,41 @@ $proposals: #238ff7;
padding: 4rem 0;
text-align: center;
}

.new-background{
background-image: url("/assets/proposal-background/add-idea.png");
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}

.compare-background{
background-image: url("/assets/proposal-background/compare.png");
background-repeat: no-repeat;
background-position: center;
background-size: contain;
min-height: 650px;
}

.publish-background{
background-image: url("/assets/proposal-background/publish.png");
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}

.add-image-background{
background-image: url("/assets/proposal-background/add-image.png");
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}

@media screen and (min-width: 1450px){
.add-image-background, .new-background, .compare-background, .publish-background{
background-size: 1250px auto;
}
}
}

@import "decidim/application";
38 changes: 20 additions & 18 deletions app/views/decidim/proposals/proposals/compare.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header", locals: { callout_step_help_text_class: "warning" } %>
<div class="compare-background">
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header", locals: { callout_step_help_text_class: "warning" } %>
<% if @similar_proposals.presence %>
<div class="row small-up-1 card-grid">
<% @similar_proposals.each do |proposal| %>
<%= render partial: "proposal_similar", locals: { proposal: proposal } %>
<% end %>
</div>
<% end %>
<% if @similar_proposals.presence %>
<div class="row small-up-1 card-grid">
<% @similar_proposals.each do |proposal| %>
<%= render partial: "proposal_similar", locals: { proposal: proposal } %>
<% end %>
</div>
<% end %>

<div class="row column text-center">
<%= link_to t(".continue"), complete_proposal_path(@proposal), class: "button small" %>
<div class="row column text-center">
<%= link_to t(".continue"), complete_proposal_path(@proposal), class: "button small" %>
</div>
</div>
<!-- div commented out
<div class="columns large-3"></div>
-->
</div>
<!-- div commented out
<div class="columns large-3"></div>
-->
</div>
37 changes: 19 additions & 18 deletions app/views/decidim/proposals/proposals/complete.html.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header" %>
<div class="add-image-background">
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header" %>

<div class="card">
<div class="card__content">
<%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %>
<%= render partial: "edit_form_fields", locals: { form: form } %>
<div class="card">
<div class="card__content">
<%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %>
<%= render partial: "edit_form_fields", locals: { form: form } %>

<div class="actions">
<%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %>
</div>
<% end %>
<div class="actions">
<%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %>
</div>
<% end %>
</div>
</div>
</div>
<!-- Div commented out
<div class="columns large-3"></div>
-->
</div>
<!-- Div commented out
<div class="columns large-3"></div>
-->
</div>

<%= javascript_include_tag "decidim/proposals/add_proposal" %>
38 changes: 20 additions & 18 deletions app/views/decidim/proposals/proposals/edit_draft.html.erb
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header" %>
<div class="compare-background">
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header" %>

<div class="card">
<div class="card__content">
<%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %>
<%= render partial: "edit_form_fields", locals: { form: form } %>
<div class="card">
<div class="card__content">
<%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %>
<%= render partial: "edit_form_fields", locals: { form: form } %>

<div class="row column flex-center">
<%= link_to t(".discard"), destroy_draft_proposal_path(@proposal), method: :delete, data: { confirm: t(".discard_confirmation") } %>
<div class="row column flex-center">
<%= link_to t(".discard"), destroy_draft_proposal_path(@proposal), method: :delete, data: { confirm: t(".discard_confirmation") } %>
<%= form.submit t(".send"), class: "button button--nomargin small", data: { disable: true } %>
</div>
<% end %>
<%= form.submit t(".send"), class: "button button--nomargin small", data: { disable: true } %>
</div>
<% end %>
</div>
</div>
</div>
<!-- div commented out
<div class="columns large-3"></div>
-->
</div>
<!-- div commented out
<div class="columns large-3"></div>
-->
</div>

<%= javascript_include_tag "decidim/proposals/add_proposal" %>
55 changes: 28 additions & 27 deletions app/views/decidim/proposals/proposals/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
<div class="row">
<!-- Side wizard commented out
<%= render partial: "decidim/proposals/proposals/wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "decidim/proposals/proposals/wizard_header" %>
<div class="new-background">
<div class="row">
<!-- Side wizard commented out
<%= render partial: "decidim/proposals/proposals/wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "decidim/proposals/proposals/wizard_header" %>

<div class="card">
<div class="card__content">
<%= decidim_form_for(@form) do |form| %>
<div class="field hashtags__container">
<%= form.text_field :title, class: "js-hashtags", hashtaggable: true %>
</div>
<div class="card">
<div class="card__content">
<%= decidim_form_for(@form) do |form| %>
<div class="field hashtags__container">
<%= form.text_field :title, class: "js-hashtags", hashtaggable: true %>
</div>

<div class="field hashtags__container">
<%= text_editor_for_proposal_body(form) %>
</div>

<div class="field hashtags__container">
<%= text_editor_for_proposal_body(form) %>
</div>
<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
<div class="field">
<%= user_group_select_field form, :user_group_id %>
</div>
<% end %>

<% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
<div class="field">
<%= user_group_select_field form, :user_group_id %>
<div class="actions">
<%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %>
</div>
<% end %>

<div class="actions">
<%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %>
</div>
<% end %>
</div>
</div>
</div>
<!-- No need for this div
<div class="columns large-3"></div>
-->
</div>
<!-- No need for this div
<div class="columns large-3"></div>
-->
</div>

<%= javascript_include_tag "decidim/proposals/add_proposal" %>
32 changes: 17 additions & 15 deletions app/views/decidim/proposals/proposals/preview.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header", locals: { callout_help_text_class: "warning" } %>
<div class="card">
<div class="p-l">
<%= render partial: "proposal_preview", locals: { proposal: @proposal } %>
<div class="row column flex-center">
<%= link_to t(".modify"), edit_draft_proposal_path(@proposal) %>
<div class="publish-background">
<div class="row">
<!-- Side wizard commented out
<%= render partial: "wizard_aside" %>
-->
<div class="columns large-6 small-centered">
<%= render partial: "wizard_header", locals: { callout_help_text_class: "warning" } %>
<div class="card">
<div class="p-l">
<%= render partial: "proposal_preview", locals: { proposal: @proposal } %>
<div class="row column flex-center">
<%= link_to t(".modify"), edit_draft_proposal_path(@proposal) %>
<%= button_to t(".publish"), publish_proposal_path(@proposal), method: :post, class: "button button--nomargin small" %>
<%= button_to t(".publish"), publish_proposal_path(@proposal), method: :post, class: "button button--nomargin small" %>
</div>
</div>
</div>
</div>
<!-- div commented out
<div class="columns large-3"></div>
-->
</div>
<!-- div commented out
<div class="columns large-3"></div>
-->
</div>

0 comments on commit 23db92e

Please sign in to comment.