diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index b3eae06c4..073dcde3e 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -403,18 +403,10 @@ button, vertical-align: top; } -.align-middle { - vertical-align: middle; -} - .table { display: table; } -.table-cell { - display: table-cell; -} - .uppercase { text-transform: uppercase; } diff --git a/app/assets/stylesheets/polls/poll.scss b/app/assets/stylesheets/polls/poll.scss index 338bdbc8c..3cf046f2d 100644 --- a/app/assets/stylesheets/polls/poll.scss +++ b/app/assets/stylesheets/polls/poll.scss @@ -2,7 +2,25 @@ &.with-image { @include breakpoint(medium) { + display: flex; padding: 0 calc($line-height / 2) 0 0; + + > * { + flex-basis: 25%; + } + + .poll-info { + flex-basis: 50%; + } + + > a { + align-self: center; + } + + > .poll-info, + > a { + margin-#{$global-left}: rem-calc(map-get($grid-column-gutter, medium)); + } } } diff --git a/app/components/polls/poll_component.html.erb b/app/components/polls/poll_component.html.erb index e290c9434..17002ba0c 100644 --- a/app/components/polls/poll_component.html.erb +++ b/app/components/polls/poll_component.html.erb @@ -1,39 +1,33 @@
<%= render Polls::AccessStatusComponent.new(poll) %> -
-
-
- <% if poll.image.present? %> - <%= image_tag poll.image.variant(:large), alt: poll.image.title.unicode_normalize %> - <% end %> -
-
-
- <% if poll.questions.one? %> -

<%= link_to_poll poll.questions.first.title, poll %>

-
<%= dates %>
- <% else %> -

<%= link_to_poll poll.name, poll %>

-
<%= dates %>
- -
    - <% poll.questions.sort_for_list.each do |question| %> -
  • <%= question.title %>
  • - <% end %> -
- <% end %> - <%= render Polls::GeozonesComponent.new(poll) %> - <%= render SDG::TagListComponent.new(poll, limit: 5, linkable: false) %> -
-
-
- <% if poll.expired? %> - <%= link_to_poll t("polls.index.participate_button_expired"), poll, class: "button hollow expanded" %> - <% else %> - <%= link_to_poll t("polls.index.participate_button"), poll, class: "button hollow expanded" %> - <% end %> -
-
+
+ <% if poll.image.present? %> + <%= image_tag poll.image.variant(:large), alt: poll.image.title.unicode_normalize %> + <% end %>
+ +
+ <% if poll.questions.one? %> +

<%= link_to_poll poll.questions.first.title, poll %>

+
<%= dates %>
+ <% else %> +

<%= link_to_poll poll.name, poll %>

+
<%= dates %>
+ +
    + <% poll.questions.sort_for_list.each do |question| %> +
  • <%= question.title %>
  • + <% end %> +
+ <% end %> + <%= render Polls::GeozonesComponent.new(poll) %> + <%= render SDG::TagListComponent.new(poll, limit: 5, linkable: false) %> +
+ + <% if poll.expired? %> + <%= link_to_poll t("polls.index.participate_button_expired"), poll, class: "button hollow expanded" %> + <% else %> + <%= link_to_poll t("polls.index.participate_button"), poll, class: "button hollow expanded" %> + <% end %>