Merge branch 'master' of gitlab.com:agaric/sites/geo

This commit is contained in:
David Valdez 2019-08-02 12:21:24 -05:00
commit ae79ef25e8
5 changed files with 77 additions and 3 deletions

View file

@ -14,6 +14,6 @@ Almost all the migration has already been done. These are some leftovers, which
As documented, *Review* should become a term in the `article_type` vocabulary. As documented, *Review* should become a term in the `article_type` vocabulary.
In addition, *Article* should also become a term in the `article_type` vocabulary (ideally with a name change to *GEO Original*). In addition, *Article* should also become a term in the `article_type` vocabulary (ideally with a name change to *GEO Original*). We undid this because many of these items did *not* have citations and at least some were not GEO Originals, see https://gitlab.com/agaric/sites/geo/issues/10#note_199134134
This is tricky, but ideally any story *without* a citation would get an `article_type` of *Repost* or similar. This is tricky, but ideally any story *without* a citation would get an `article_type` of *Repost* or similar.

View file

@ -3092,6 +3092,8 @@ a.tag:hover {
display: -ms-flexbox; display: -ms-flexbox;
display: flex; } display: flex; }
.slogan .title { .slogan .title {
position: relative;
top: 2px;
color: #8FB489; color: #8FB489;
font-size: 1.2rem; font-size: 1.2rem;
margin: auto; } margin: auto; }
@ -6010,6 +6012,16 @@ label.panel-block {
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; } } padding-right: 1rem; } }
.featured-image figure.image {
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw; }
.featured-image figure.image img {
width: 100%; }
.column { .column {
display: block; display: block;
-ms-flex-preferred-size: 0; -ms-flex-preferred-size: 0;

View file

@ -13,3 +13,16 @@
padding-right: 1rem; padding-right: 1rem;
} }
} }
.featured-image figure.image {
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
img {
width: 100%;
}
}

View file

@ -52,8 +52,7 @@
} }
.slogan { .slogan {
position: relative; margin-top: -36px;
top: -36px;
height: 36px; height: 36px;
z-index: 30; z-index: 30;
display: flex; display: flex;

View file

@ -0,0 +1,50 @@
{#
/**
* @file
* Theme override for a image fields on nodes, always a featured image.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - title_attributes, label, label_display: Not used; we force label_hidden.
* - multiple: TRUE if a field can contain multiple items.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
*
* @see template_preprocess_field()
*/
#}
{# Child templates can specify classes to be added to items. #}
{% set item_classes = item_classes ?? ['nadahuh'] %}
{# Child templates can specify whether items should be wrapped. #}
{% set use_item_wrapper = use_item_wrapper is defined ? use_item_wrapper : false %}
{% macro render_item(item, item_classes, use_item_wrapper) %}
{%
set item = item|merge({
'attributes': item.attributes.addClass(item_classes)
})
%}
{% if use_item_wrapper %}
<div{{ item.attributes }}>{{ item.content }}</div>
{% else %}
{% import "@bulma/macros/renderables.html.twig" as renderables %}
{{ renderables.merge_attributes(item.attributes, item, 'content') }}
{% endif %}
{% endmacro render_item %}
{% import _self as helpers %}
{% if multiple %}
<div{{ attributes.addClass('featured-image') }}>
{% for item in items %}
{{ helpers.render_item(item, item_classes, use_item_wrapper) }}
{% endfor %}
</div>
{% else %}
{% for item in items %}
<div{{ attributes.addClass('featured-image') }}>{{ helpers.render_item(item, item_classes, use_item_wrapper) }}</div>
{% endfor %}
{% endif %}