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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SDG view with related content #4292

Merged
merged 15 commits into from
Dec 28, 2020
Merged
Prev Previous commit
Next Next commit
Use flex layout instead of data-equalizer in feeds
Using data-equalizer is always hard due to the JavaScript it uses, while
the flex layout works all the time.
  • Loading branch information
javierm committed Dec 27, 2020
commit be9fc226500d537634abd4d97ede3e0be017c414
30 changes: 20 additions & 10 deletions app/assets/stylesheets/widgets/feeds/participation.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
.feeds-participation {

.feed-debates,
.feed-proposals {
@include grid-col;
margin-top: $line-height;
}
@include breakpoint(medium) {
display: flex;

.feed-proposals:not(:only-child) {
@include breakpoint(medium) {
.feed-proposals:not(:only-child) {
width: 2 * 100% / 3;
}
}

.feed-debates:not(:only-child) {
@include breakpoint(medium) {
.feed-debates:not(:only-child) {
width: 1 * 100% / 3;
}

.feed-proposals,
.feed-debates {
display: flex;
flex-direction: column;

.feed-content {
flex: 1;
}
}
}

.feed-debates,
.feed-proposals {
@include grid-col;
margin-top: $line-height;
}
}
2 changes: 1 addition & 1 deletion app/components/widgets/feeds/debates_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="feed_debates" class="feed-debates">
<div class="feed-content" data-equalizer-watch>
<div class="feed-content">
<h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3>

<% feed.items.each do |item| %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="row margin-bottom feeds-list feeds-participation" data-equalizer data-equalize-on="medium">
<div class="row margin-bottom feeds-list feeds-participation">
<% feeds.each do |feed| %>
<% if feed_proposals?(feed) %>
<%= render Widgets::Feeds::ProposalsComponent.new(feed) %>
Expand Down
2 changes: 1 addition & 1 deletion app/components/widgets/feeds/proposals_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="feed_proposals" class="feed-proposals">
<div class="feed-content" data-equalizer-watch>
<div class="feed-content">
<h3 class="title"><%= t("welcome.feed.most_active.#{feed.kind}") %></h3>

<% feed.items.each do |item| %>
Expand Down