diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot index 5f29191f7..5564a5c62 100644 Binary files a/app/assets/fonts/icons.eot and b/app/assets/fonts/icons.eot differ diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg index 2b884a912..0d94e5751 100644 --- a/app/assets/fonts/icons.svg +++ b/app/assets/fonts/icons.svg @@ -63,4 +63,6 @@ + + diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf index 252457611..6af0797fb 100644 Binary files a/app/assets/fonts/icons.ttf and b/app/assets/fonts/icons.ttf differ diff --git a/app/assets/fonts/icons.woff b/app/assets/fonts/icons.woff index 2cf6dc4b7..7f8f3c95e 100644 Binary files a/app/assets/fonts/icons.woff and b/app/assets/fonts/icons.woff differ diff --git a/app/assets/images/custom/example_horizontal.jpg b/app/assets/images/custom/example_horizontal.jpg new file mode 100644 index 000000000..634e432ac Binary files /dev/null and b/app/assets/images/custom/example_horizontal.jpg differ diff --git a/app/assets/images/custom/example_vertical.jpg b/app/assets/images/custom/example_vertical.jpg new file mode 100644 index 000000000..11743cc18 Binary files /dev/null and b/app/assets/images/custom/example_vertical.jpg differ diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss index 0bead10ae..66640f3f2 100644 --- a/app/assets/stylesheets/foundation_and_overrides.scss +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -4,6 +4,7 @@ @import 'consul_settings'; @import 'custom_settings'; @import 'foundation'; +@import 'motion-ui/motion-ui'; @include foundation-global-styles; @include foundation-grid; @@ -37,3 +38,7 @@ @include foundation-title-bar; @include foundation-top-bar; @include foundation-menu-icon; +@include foundation-orbit; + +@include motion-ui-transitions; +@include motion-ui-animations; diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss index 135b9fe12..96eb10a0d 100644 --- a/app/assets/stylesheets/icons.scss +++ b/app/assets/stylesheets/icons.scss @@ -260,3 +260,11 @@ .icon-image::before { content: '\33'; } + +.icon-search-plus::before { + content: '\34'; +} + +.icon-search-minus::before { + content: '\35'; +} diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index b9f79430e..efa0454db 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -303,6 +303,10 @@ a { float: left; } +.back:not([class^="icon-"]) { + text-decoration: underline; +} + .tabs-content { border: 0; } diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 8877eb02e..15b984f17 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -310,10 +310,7 @@ .budget-investment-new, .proposal-form, .proposal-edit, -.new_poll_question, -.edit_poll_question, -.new_poll, -.edit_poll, +.polls-form, .poll-question-form { @include direct-uploads; } @@ -1548,18 +1545,8 @@ // 08. Polls // ---------------------- -.dark-heading { - background: #2d3e50; - color: #fff; - - .title { - color: #92ba48; - } - - .button { - background: #fff; - color: $brand; - } +.polls-show-header { + background: #fafafa; .callout { @@ -1575,29 +1562,86 @@ color: $color-alert; } } +} - .info { - background: #314253; - padding: $line-height; +.poll-more-info, +.poll-more-info-answers { + border-top: 1px solid #eee; +} - @include breakpoint(medium) { - border-top: rem-calc(6) solid #92ba48; +.poll-more-info-answers { + background: #fafafa; + border-bottom: 1px solid #eee; + + .column:nth-child(odd) { + border-right: 1px solid #eee; + } +} + +.orbit-bullets button { + background-color: #ccc; + height: $line-height / 2; + width: $line-height / 2; + + &.is-active { + background-color: $brand; + } +} + +.orbit-container { + height: 100% !important; + max-height: none !important; +} + +.orbit-slide { + max-height: none !important; +} + +.orbit-caption { + background: #eee; + color: $text; +} + +.zoom-link { + background: #fff; + border-radius: rem-calc(48); + color: #000; + font-size: rem-calc(24); + font-weight: bold; + height: rem-calc(48); + line-height: rem-calc(48); + right: 12px; + padding-top: rem-calc(4); + position: absolute; + text-align: center; + top: 24px; + width: rem-calc(48); + z-index: 9; + + &:hover { + background: $dark; + color: #fff; + text-decoration: none; + } +} + +.image-container { + background: #fafafa; + overflow: hidden; + position: relative; +} + +.poll { + + &.with-image { + padding: 0 $line-height / 2 0 0; + + img { + height: 100%; + max-width: none; + position: absolute; } } - - a:not(.button) { - color: #fff; - text-decoration: underline; - } - - .back, - .icon-angle-left { - color: #fff; - } - - &.polls-show-header { - min-height: $line-height * 8; - } } .poll, diff --git a/app/views/admin/poll/polls/edit.html.erb b/app/views/admin/poll/polls/edit.html.erb index 1ba88359e..f7bd93212 100644 --- a/app/views/admin/poll/polls/edit.html.erb +++ b/app/views/admin/poll/polls/edit.html.erb @@ -2,4 +2,6 @@

<%= t("admin.polls.edit.title") %>

-<%= render "form" %> \ No newline at end of file +
+ <%= render "form" %> +
diff --git a/app/views/admin/poll/polls/new.html.erb b/app/views/admin/poll/polls/new.html.erb index 1203688d5..ac3ba5a4d 100644 --- a/app/views/admin/poll/polls/new.html.erb +++ b/app/views/admin/poll/polls/new.html.erb @@ -2,4 +2,6 @@

<%= t("admin.polls.new.title") %>

-<%= render "form" %> \ No newline at end of file +
+ <%= render "form" %> +
diff --git a/app/views/polls/_gallery.html.erb b/app/views/polls/_gallery.html.erb new file mode 100644 index 000000000..3354c4de7 --- /dev/null +++ b/app/views/polls/_gallery.html.erb @@ -0,0 +1,46 @@ +
+ + + <%= t("polls.show.zoom_plus") %> + + +
    +
  • + +
  • +
  • + +
  • + +
  • + <%= link_to "/assets/example_vertical.jpg", target: "_blank" do %> + <%= image_tag "example_horizontal.jpg", class: "orbit-image" %> + <% end %> + + Image title 1 + +
  • + +
  • + <%= link_to "/assets/example_vertical.jpg", target: "_blank" do %> + <%= image_tag "example_vertical.jpg", class: "orbit-image" %> + <% end %> + Image title 2 +
  • +
+ + +
diff --git a/app/views/polls/_poll_group.html.erb b/app/views/polls/_poll_group.html.erb index fe12c341b..f8c105d90 100644 --- a/app/views/polls/_poll_group.html.erb +++ b/app/views/polls/_poll_group.html.erb @@ -1,5 +1,5 @@ <% poll_group.each do |poll| %> -
+
<% if poll.answerable_by?(current_user) && poll.votable_by?(current_user) %> <%= link_to poll, class: "icon-poll-answer can-answer", @@ -34,10 +34,14 @@
<% end %>
-
- -
 
- +
+
+ <% if poll.image.present? %> + <%= image_tag poll.image_url(:large), alt: poll.image.title %> + <% else %> +
+ <% end %> +
diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 6895397de..b3a78e402 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -1,36 +1,38 @@ <% provide :title do %><%= @poll.name %><% end %>
-
+
- <%= back_link_to polls_path %> + <%= back_link_to polls_path, t("polls.show.back") %>

<%= @poll.name %>

-
    - <% @poll.geozones.each do |g| %> -
  • <%= g.name %>
  • - <% end %> -
- <%= render "callout" %> -
-
-
-

- - <%= t("polls.show.dates_title") %> - -
- <%= poll_dates(@poll) %> -

-
+ <%= safe_html_with_links simple_format(@poll.summary) %> + + <% if @poll.geozones.any? %> +
    + <% @poll.geozones.each do |g| %> +
  • <%= g.name %>
  • + <% end %> +
+ <% end %>
+ +
-
+
+ <%= render "callout" %> + <% if @poll.voted_in_booth?(current_user) %>
<%= t("polls.show.already_voted_in_booth") %> @@ -41,13 +43,46 @@ <% end %> <% end %>
+
+ +
+
+
+

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

+ <%= safe_html_with_links simple_format(@poll.description) %> +
+ + +
+
+ +
+
+ + +
+ + +

Answer 1

+ + + + <%= render "gallery" %> + + + +
+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + +
+
+ -
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index fbaa3e4d0..c06fe78aa 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -482,7 +482,7 @@ en: help_text_2: "To participate in the next vote you have to sign up on %{org} and verify your account. All registered voters in the city over 16 years old can vote. The results of all votes are binding on the government." show: already_voted_in_booth: "You have already participated in a booth for this poll." - dates_title: "Participation dates" + back: Back to voting cant_answer_not_logged_in: "You must %{signin} or %{signup} to participate." signin: Sign in signup: Sign up @@ -490,6 +490,9 @@ en: verify_link: "verify your account" cant_answer_incoming: "This poll has not yet started." cant_answer_expired: "This poll has finished." + more_info_title: "More information" + documents: Documents + zoom_plus: Expand image poll_questions: create_question: "Create question" default_valid_answers: "Yes, No" @@ -598,6 +601,10 @@ en: budget: Participatory budget searcher: Searcher go_to_page: "Go to page of " + share: Share + orbit: + previous_slide: Previous Slide + next_slide: Next Slide social: blog: "%{org} Blog" facebook: "%{org} Facebook" diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 898826c0e..77dcdc3f7 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -482,7 +482,7 @@ es: help_text_2: "Para participar en la próxima votación tienes que registrarte en %{org} y verificar tu cuenta. Pueden votar todas las personas empadronadas en la ciudad mayores de 16 años. Los resultados de todas las votaciones serán vinculantes para el gobierno." show: already_voted_in_booth: "Ya has participado en esta votación en una urna." - dates_title: "Fechas de participación" + back: Volver a votaciones cant_answer_not_logged_in: "Necesitas %{signin} o %{signup} para participar." signin: iniciar sesión signup: registrarte @@ -490,6 +490,9 @@ es: verify_link: "verifica tu cuenta" cant_answer_incoming: "Esta votación todavía no ha comenzado." cant_answer_expired: "Esta votación ha terminado." + more_info_title: "Más información" + documents: Documentación + zoom_plus: Ampliar imagen poll_questions: create_question: "Crear pregunta para votación" default_valid_answers: "Sí, No" @@ -598,6 +601,10 @@ es: budget: Presupuestos participativos searcher: Buscador go_to_page: "Ir a la página de " + share: Compartir + orbit: + previous_slide: Imagen anterior + next_slide: Siguiente imagen social: blog: "Blog de %{org}" facebook: "Facebook de %{org}"