Dev schedule config and styling

This commit is contained in:
Rob Davies 2017-06-20 12:26:26 +01:00
parent 62b33791d0
commit f522a186c1
7 changed files with 422 additions and 20 deletions

View file

@ -26,14 +26,14 @@ content:
body:
label: hidden
type: text_summary_or_trimmed
weight: 0
weight: 2
settings:
trim_length: 600
trim_length: 400
third_party_settings: { }
region: content
field_category:
type: entity_reference_label
weight: 3
weight: 1
region: content
label: hidden
settings:
@ -41,7 +41,7 @@ content:
third_party_settings: { }
field_level:
type: entity_reference_label
weight: 2
weight: 0
region: content
label: hidden
settings:
@ -49,25 +49,18 @@ content:
third_party_settings: { }
field_speaker_s_:
type: entity_reference_entity_view
weight: 1
weight: 3
region: content
label: hidden
settings:
view_mode: speaker_profile_schedule
link: false
third_party_settings: { }
field_venue_location:
type: entity_reference_label
weight: 4
region: content
label: hidden
settings:
link: false
third_party_settings: { }
hidden:
field_keynote: true
field_length: true
field_session_type: true
field_slides: true
field_time_slot: true
field_venue_location: true
links: true

View file

@ -5,6 +5,7 @@ dependencies:
config:
- core.entity_view_mode.node.teaser
- field.storage.node.field_time_slot
- field.storage.node.field_venue_location
- node.type.session
module:
- datetime_range
@ -59,14 +60,14 @@ display:
type: default
options:
grouping:
-
field: field_session_type
rendered: true
rendered_strip: false
-
field: field_time_slot
rendered: true
rendered_strip: false
-
field: field_venue_location
rendered: true
rendered_strip: true
row_class: ''
default_row_class: true
uses_fields: true
@ -296,3 +297,294 @@ display:
- user.permissions
tags:
- 'config:field.storage.node.field_time_slot'
page_2:
display_plugin: page
id: page_2
display_title: 'Dev day'
position: 2
display_options:
display_extenders: { }
display_description: ''
title: 'Developers'' Day Schedule'
defaults:
title: false
fields: false
filters: false
filter_groups: false
sorts: false
path: schedule-dev
fields:
title:
id: title
table: node_field_data
field: title
entity_type: node
entity_field: title
label: ''
alter:
alter_text: false
make_link: false
absolute: false
trim: false
word_boundary: false
ellipsis: false
strip_tags: false
html: false
hide_empty: false
empty_zero: false
settings:
link_to_entity: true
plugin_id: field
relationship: none
group_type: group
admin_label: ''
exclude: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_alter_empty: true
click_sort_column: value
type: string
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
field_time_slot:
id: field_time_slot
table: node__field_time_slot
field: field_time_slot
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: daterange_default
settings:
timezone_override: ''
format_type: time_only
separator: to
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
plugin_id: field
field_venue_location:
id: field_venue_location
table: node__field_venue_location
field: field_venue_location
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: true
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: false
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
plugin_id: field
filters:
status:
value: '1'
table: node_field_data
field: status
plugin_id: boolean
entity_type: node
entity_field: status
id: status
expose:
operator: ''
group: 1
type:
id: type
table: node_field_data
field: type
value:
session: session
entity_type: node
entity_field: type
plugin_id: bundle
field_session_type_value:
id: field_session_type_value
table: node__field_session_type
field: field_session_type_value
relationship: none
group_type: group
admin_label: ''
operator: or
value:
Saturday: Saturday
group: 1
exposed: false
expose:
operator_id: ''
label: ''
description: ''
use_operator: false
operator: ''
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
reduce_duplicates: false
plugin_id: list_field
filter_groups:
operator: AND
groups:
1: AND
sorts:
field_time_slot_value:
id: field_time_slot_value
table: node__field_time_slot
field: field_time_slot_value
relationship: none
group_type: group
admin_label: ''
order: ASC
exposed: false
expose:
label: ''
plugin_id: standard
field_venue_location_target_id:
id: field_venue_location_target_id
table: node__field_venue_location
field: field_venue_location_target_id
relationship: none
group_type: group
admin_label: ''
order: ASC
exposed: false
expose:
label: ''
plugin_id: standard
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- 'user.node_grants:view'
- user.permissions
tags:
- 'config:field.storage.node.field_time_slot'
- 'config:field.storage.node.field_venue_location'

View file

@ -362,7 +362,7 @@ nav.menu--main {
padding: 0.5em 1.5em;
vertical-align: middle; }
.view-schedule h3 {
.view-schedule .view-grouping-header {
background: #0fa877;
color: white;
font-size: 1.5em;
@ -378,6 +378,30 @@ nav.menu--main {
.view-schedule p {
margin: 0.5em 0; }
.view-schedule .node--type-session {
margin-bottom: 3em; }
@media screen and (min-width: 56.25rem) {
.view-schedule .group-wrapper {
box-sizing: border-box;
float: left;
padding-right: 2em; }
.view-schedule .group-wrapper h2 {
font-size: 1.2em;
line-height: 1.4; } }
.view-schedule .group-wrapper h3 {
color: #666; }
.view-schedule .view-grouping-content {
overflow: hidden; }
@media screen and (min-width: 56.25rem) {
.view-schedule .view-grouping-content.col-2 .group-wrapper {
width: 50%; } }
@media screen and (min-width: 56.25rem) {
.view-schedule .view-grouping-content.col-3 .group-wrapper {
width: 33.33%; } }
.node--type-session .field--name-field-category,
.node--type-session .field--name-field-level,
.node--type-session .field--name-field-length {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
.view-schedule {
h3 {
.view-grouping-header {
background: $dcb-green;
color: white;
font-size: 1.5em;
@ -18,4 +18,41 @@
p {
margin: 0.5em 0;
}
.node--type-session {
margin-bottom: 3em;
}
.group-wrapper {
@include media-large {
box-sizing: border-box;
float: left;
padding-right: 2em;
h2 {
font-size: 1.2em;
line-height: 1.4;
}
}
h3 {
color: $dcb-grey;
}
}
.view-grouping-content {
overflow: hidden;
&.col-2 .group-wrapper {
@include media-large {
width: 50%;
}
}
&.col-3 .group-wrapper {
@include media-large {
width: 33.33%;
}
}
}
}

View file

@ -0,0 +1,20 @@
{#
/**
* @file
* Theme override to display a single views grouping.
*
* Available variables:
* - view: The view object.
* - grouping: The grouping instruction.
* - grouping_level: A number indicating the hierarchical level of the grouping.
* - title: The group heading.
* - content: The content to be grouped.
* - rows: The rows returned from the view.
*
* @see template_preprocess_views_view_grouping()
*/
#}
<div class="view-grouping">
<div class="view-grouping-header">{{ title }}</div>
<div class="view-grouping-content col-{{ rows|length }}">{{ content }}</div>
</div>

View file

@ -0,0 +1,36 @@
{#
/**
* @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|trim %}
<div class="group-wrapper">
<h3>{{ title }}</h3>
{% endif %}
{% for row in rows %}
{%
set row_classes = [
default_row_class ? 'views-row',
]
%}
<div{{ row.attributes.addClass(row_classes) }}>
{{ row.content }}
</div>
{% endfor %}
{% if title|trim %}
</div>
{% endif %}