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

Commit

Permalink
Redoing the responsive setup for the blog view listing, taxonomy term…
Browse files Browse the repository at this point in the history
… page, featured blog posts paragraph
  • Loading branch information
david-hernandez committed Feb 7, 2017
1 parent 6853171 commit 9589035
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ display:
button_text: 'Load More'
automatically_load_content: false
style:
type: grid
type: default
options:
row_class: ''
default_row_class: true
uses_fields: false
row:
type: 'entity:node'
options:
Expand Down Expand Up @@ -324,6 +328,7 @@ display:
operator: AND
groups:
1: AND
css_class: blog-more-teaser
cache_metadata:
max-age: -1
contexts:
Expand Down
17 changes: 4 additions & 13 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.

16 changes: 3 additions & 13 deletions themes/openy_themes/openy_rose/scss/modules/_blog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,15 @@
}

&.node--view-mode-teaser {
margin: auto;
max-width: 373px;
width: 100%;
max-width: 100%;

.inner-wrapper {
margin: 15px 0;
position: relative;
overflow: hidden;
height: 250px;

@include breakpoint(0 $screen-sm) {
margin: 0 auto;
}
}

img {
Expand Down Expand Up @@ -180,18 +178,10 @@
.blog-more-teaser {
margin-top: 40px;

@media (min-width: 1024px) {

}

.h1 {
padding-bottom: 0;
}

h2 {

}

.views-view-grid {
text-align: center;

Expand Down
8 changes: 1 addition & 7 deletions themes/openy_themes/openy_rose/scss/modules/_paragraphs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,6 @@
}
}
@include breakpoint($screen-sm) {
.field-fblog-posts {
margin-bottom: 30px;
}
.description {
margin-left: -15px;
margin-right: -15px;
Expand All @@ -779,12 +776,9 @@
margin-bottom: 30px;
}
@include breakpoint($screen-sm) {
.views-view-grid > div {
.blog-more-teaser-results-wrapper {
margin-left: -15px;
margin-right: -15px;
}
.views-col {
margin-bottom: 30px;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
{% if multiple %}
<div{{ attributes.addClass('wrapper-' ~ field_name|clean_class, 'description', 'slick-mobile') }}>
{% for item in items %}
<div{{ attributes.addClass(field_name|clean_class, 'col-xs-12', 'col-sm-4', 'row-eq-height').removeClass('wrapper-' ~ field_name|clean_class, 'description', 'slick-mobile') }}>{{ item.content }}</div>
<div{{ attributes.addClass(field_name|clean_class, 'col-xs-12', 'col-sm-6', 'col-md-4', 'row-eq-height').removeClass('wrapper-' ~ field_name|clean_class, 'description', 'slick-mobile') }}>{{ item.content }}</div>
{% endfor %}
</div>
{% else %}
{% for item in items %}
<div{{ attributes.addClass(field_name|clean_class, 'col-xs-12', 'col-sm-4', 'row-eq-height') }}>{{ item.content }}</div>
<div{{ attributes.addClass(field_name|clean_class, 'col-xs-12', 'col-sm-6', 'col-md-4', 'row-eq-height') }}>{{ item.content }}</div>
{% endfor %}
{% endif %}
{% else %}
Expand All @@ -58,7 +58,7 @@
<div class="description slick-mobile">
{% endif %}
{% for item in items %}
<div{{ attributes.addClass(field_name|clean_class, 'col-xs-12', 'col-sm-4', 'row-eq-height').removeClass('wrapper-' ~ field_name|clean_class, 'description', 'slick-mobile') }}>{{ item.content }}</div>
<div{{ attributes.addClass(field_name|clean_class, 'col-xs-12', 'col-sm-6', 'col-md-4', 'row-eq-height').removeClass('wrapper-' ~ field_name|clean_class, 'description', 'slick-mobile') }}>{{ item.content }}</div>
{% endfor %}
{% if multiple %}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{#
/**
* @file
* The views infinite scroll pager template.
*/
#}

{% if items.next %}
<ul{{ attributes }}>
<li class="pager__item load_more_button">
<a class="button blue" href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next">{{ options.button_text }}</a>
</li>
</ul>
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{#
/**
* @file
* Default theme implementation to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.
* - view: The view object.
* - default_row_class: A flag indicating whether default classes should be
* used on rows.
*
* @see template_preprocess_views_view_unformatted()
*
* @ingroup themeable
*/
#}
{% if title %}
<h3>{{ title }}</h3>
{% endif %}
<div class="blog-more-teaser-results-wrapper clearfix">
{% for row in rows %}
{%
set row_classes = [
default_row_class ? 'views-row',
'col-xs-12',
'col-sm-6',
'col-md-4',
'row-eq-height',
]
%}
<div{{ row.attributes.addClass(row_classes) }}>
{{ row.content }}
</div>
{% endfor %}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
{%
set row_classes = [
default_row_class ? 'views-row',
'col-xs-12',
'col-sm-6',
'col-md-4',
'row-eq-height',
]
%}
<div{{ row.attributes.addClass(row_classes) }}>
Expand Down

0 comments on commit 9589035

Please sign in to comment.