Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Updates to fix responsive styling for blog listing paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
david-hernandez committed Feb 3, 2017
1 parent 3204f13 commit aef1c2f
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 19 deletions.
25 changes: 16 additions & 9 deletions themes/openy_themes/openy_rose/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 19 additions & 10 deletions themes/openy_themes/openy_rose/scss/modules/_paragraphs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -756,26 +756,35 @@
@include breakpoint(0 $screen-sm) {
padding-left: 15px;
padding-right: 15px;
.slick-prev {
left: -17px;
}
.slick-next {
right: -17px;
}
}
@include breakpoint($screen-sm) {
.field-fblog-posts {
margin-bottom: 30px;
}
}
.description {
@include breakpoint($screen-sm) {
.description {
margin-left: -15px;
margin-right: -15px;
}
}
.slick-prev {
@include breakpoint(0 $screen-sm) {
left: -17px;
}
}

.paragraph--type--blog-posts-listing {
.views-exposed-form {
margin-bottom: 30px;
}
.slick-next {
@include breakpoint(0 $screen-sm) {
right: -17px;
@include breakpoint($screen-sm) {
.views-view-grid > div {
margin-left: -15px;
margin-right: -15px;
}
.views-col {
margin-bottom: 30px;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{#
/**
* @file
* Default theme implementation for views to display rows in a grid.
*
* Available variables:
* - attributes: HTML attributes for the wrapping element.
* - title: The title of this group of rows.
* - view: The view object.
* - rows: The rendered view results.
* - options: The view plugin style options.
* - row_class_default: A flag indicating whether default classes should be
* used on rows.
* - col_class_default: A flag indicating whether default classes should be
* used on columns.
* - items: A list of grid items. Each item contains a list of rows or columns.
* The order in what comes first (row or column) depends on which alignment
* type is chosen (horizontal or vertical).
* - attributes: HTML attributes for each row or column.
* - content: A list of columns or rows. Each row or column contains:
* - attributes: HTML attributes for each row or column.
* - content: The row or column contents.
*
* @see template_preprocess_views_view_grid()
*
* @ingroup themeable
*/
#}
{%
set classes = [
'views-view-grid',
options.alignment,
'cols-' ~ options.columns,
'clearfix',
]
%}
{% if options.row_class_default %}
{%
set row_classes = [
options.alignment == 'horizontal' ? 'clearfix',
]
%}
{% endif %}
{% if options.col_class_default %}
{%
set col_classes = [
'views-col',
options.alignment == 'vertical' ? 'clearfix',
'col-xs-12',
'col-sm-3',
'row-eq-height',
]
%}
{% endif %}
{% if title %}
<h3>{{ title }}</h3>
{% endif %}
<div{{ attributes.addClass(classes) }}>
{% if options.alignment == 'horizontal' %}
{% for row in items %}
<div{{ row.attributes.addClass(row_classes, options.row_class_default ? 'row-' ~ loop.index) }}>
{% for column in row.content %}
<div{{ column.attributes.addClass(col_classes, options.col_class_default ? 'col-' ~ loop.index).removeAttribute('style') }}>
{{ column.content }}
</div>
{% endfor %}
</div>
{% endfor %}
{% else %}
{% for column in items %}
<div{{ column.attributes.addClass(col_classes, options.col_class_default ? 'col-' ~ loop.index).removeAttribute('style') }}>
{% for row in column.content %}
<div{{ row.attributes.addClass(row_classes, options.row_class_default ? 'row-' ~ loop.index) }}>
{{ row.content }}
</div>
{% endfor %}
</div>
{% endfor %}
{% endif %}
</div>

0 comments on commit aef1c2f

Please sign in to comment.