summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Eskola2018-08-22 08:54:04 (GMT)
committerLauri Eskola2018-08-22 08:55:14 (GMT)
commitf51f707a87960d73f8367de579c258024d1bd62b (patch)
treea87e5a2f5d8c18d38c06072ba0a0c46ada10e2ba
parent57818db825dc22d9bc66ba8af2e07eb24e2615f4 (diff)
Issue #2943661 by dslobodyanik, BrightBold, lauriii, ckrina, dean-coakley, Eli-T, markconroy: Create the Recipe Collections element
(cherry picked from commit 74c323ff0965b73ffa076f7dad482b97badbdeb4)
-rw-r--r--core/profiles/demo_umami/config/install/block.block.views_block__recipe_collections_block.yml23
-rw-r--r--core/profiles/demo_umami/config/install/views.view.recipe_collections.yml169
-rw-r--r--core/profiles/demo_umami/themes/umami/css/components/blocks/recipe-collections/recipe-collections.css42
-rw-r--r--core/profiles/demo_umami/themes/umami/templates/components/recipe-collections/block--views-block--recipe-collections-block.html.twig13
-rw-r--r--core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig6
-rw-r--r--core/profiles/demo_umami/themes/umami/umami.info.yml1
-rw-r--r--core/profiles/demo_umami/themes/umami/umami.libraries.yml5
7 files changed, 259 insertions, 0 deletions
diff --git a/core/profiles/demo_umami/config/install/block.block.views_block__recipe_collections_block.yml b/core/profiles/demo_umami/config/install/block.block.views_block__recipe_collections_block.yml
new file mode 100644
index 0000000..243a382
--- /dev/null
+++ b/core/profiles/demo_umami/config/install/block.block.views_block__recipe_collections_block.yml
@@ -0,0 +1,23 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - views.view.recipe_collections
+ module:
+ - views
+ theme:
+ - umami
+id: views_block__recipe_collections_block
+theme: umami
+region: content_bottom
+weight: 0
+provider: null
+plugin: 'views_block:recipe_collections-block'
+settings:
+ id: 'views_block:recipe_collections-block'
+ label: ''
+ provider: views
+ label_display: visible
+ views_label: ''
+ items_per_page: none
+visibility: { }
diff --git a/core/profiles/demo_umami/config/install/views.view.recipe_collections.yml b/core/profiles/demo_umami/config/install/views.view.recipe_collections.yml
new file mode 100644
index 0000000..a0dfc9c
--- /dev/null
+++ b/core/profiles/demo_umami/config/install/views.view.recipe_collections.yml
@@ -0,0 +1,169 @@
+langcode: en
+status: true
+dependencies:
+ config:
+ - taxonomy.vocabulary.tags
+ module:
+ - taxonomy
+ - user
+id: recipe_collections
+label: 'Recipe Collections'
+module: views
+description: ''
+tag: ''
+base_table: taxonomy_term_field_data
+base_field: tid
+core: 8.x
+display:
+ default:
+ display_plugin: default
+ id: default
+ display_title: Master
+ position: 0
+ display_options:
+ access:
+ type: perm
+ options:
+ perm: 'access content'
+ cache:
+ type: tag
+ options: { }
+ query:
+ type: views_query
+ options:
+ disable_sql_rewrite: false
+ distinct: false
+ replica: false
+ query_comment: ''
+ query_tags: { }
+ exposed_form:
+ type: basic
+ options:
+ submit_button: Apply
+ reset_button: false
+ reset_button_label: Reset
+ exposed_sorts_label: 'Sort by'
+ expose_sort_order: true
+ sort_asc_label: Asc
+ sort_desc_label: Desc
+ pager:
+ type: some
+ options:
+ items_per_page: 16
+ offset: 0
+ style:
+ type: grid
+ options:
+ grouping: { }
+ columns: 4
+ automatic_width: false
+ alignment: vertical
+ col_class_default: true
+ col_class_custom: ''
+ row_class_default: true
+ row_class_custom: ''
+ row:
+ type: fields
+ fields:
+ name:
+ id: name
+ table: taxonomy_term_field_data
+ field: name
+ entity_type: taxonomy_term
+ entity_field: name
+ 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
+ type: string
+ settings:
+ link_to_entity: true
+ plugin_id: term_name
+ 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
+ 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
+ convert_spaces: false
+ filters:
+ vid:
+ id: vid
+ table: taxonomy_term_field_data
+ field: vid
+ value:
+ tags: tags
+ entity_type: taxonomy_term
+ entity_field: vid
+ plugin_id: bundle
+ sorts:
+ name:
+ id: name
+ table: taxonomy_term_field_data
+ field: name
+ relationship: none
+ group_type: group
+ admin_label: ''
+ order: ASC
+ exposed: false
+ expose:
+ label: ''
+ entity_type: taxonomy_term
+ entity_field: name
+ plugin_id: standard
+ title: 'Recipe collections'
+ header: { }
+ footer: { }
+ empty: { }
+ relationships: { }
+ arguments: { }
+ display_extenders: { }
+ cache_metadata:
+ max-age: -1
+ contexts:
+ - 'languages:language_content'
+ - 'languages:language_interface'
+ - user.permissions
+ tags: { }
+ block:
+ display_plugin: block
+ id: block
+ display_title: Block
+ position: 1
+ display_options:
+ display_extenders: { }
+ block_hide_empty: true
+ cache_metadata:
+ max-age: -1
+ contexts:
+ - 'languages:language_content'
+ - 'languages:language_interface'
+ - user.permissions
+ tags: { }
diff --git a/core/profiles/demo_umami/themes/umami/css/components/blocks/recipe-collections/recipe-collections.css b/core/profiles/demo_umami/themes/umami/css/components/blocks/recipe-collections/recipe-collections.css
new file mode 100644
index 0000000..06569f2
--- /dev/null
+++ b/core/profiles/demo_umami/themes/umami/css/components/blocks/recipe-collections/recipe-collections.css
@@ -0,0 +1,42 @@
+.block-views-blockrecipe-collections-block {
+ padding: 3rem 1rem;
+ color: #fff;
+ background: #767775;
+}
+.block-views-blockrecipe-collections-block .block__title {
+ margin-bottom: 1.5rem;
+ text-align: center;
+}
+.block-views-blockrecipe-collections-block .views-view-grid {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+}
+.block-views-blockrecipe-collections-block .views-col {
+ width: 100%;
+ padding: 0 14px;
+ text-align: center;
+}
+
+@media screen and (min-width: 48em) {
+ .block-views-blockrecipe-collections-block .views-col {
+ width: 25%;
+ max-width: 13rem;
+ text-align: left;
+ }
+}
+.block-views-blockrecipe-collections-block .views-row {
+ margin-bottom: 0.5rem;
+ font-size: 0.9rem;
+}
+.block-views-blockrecipe-collections-block .views-row a {
+ text-decoration: none;
+ color: #fff;
+ font-weight: bold;
+}
+.block-views-blockrecipe-collections-block .views-row a:focus,
+.block-views-blockrecipe-collections-block .views-row a:hover {
+ text-decoration: underline;
+ background: transparent;
+}
+
diff --git a/core/profiles/demo_umami/themes/umami/templates/components/recipe-collections/block--views-block--recipe-collections-block.html.twig b/core/profiles/demo_umami/themes/umami/templates/components/recipe-collections/block--views-block--recipe-collections-block.html.twig
new file mode 100644
index 0000000..23d9fbd
--- /dev/null
+++ b/core/profiles/demo_umami/themes/umami/templates/components/recipe-collections/block--views-block--recipe-collections-block.html.twig
@@ -0,0 +1,13 @@
+{% extends "block.html.twig" %}
+{#
+/**
+ * @file
+ * Theme override for recipe collections block.
+ */
+#}
+{% block content %}
+ {{ attach_library('umami/recipe-collections') }}
+ <div class="container">
+ {{ parent() }}
+ </div>
+{% endblock %}
diff --git a/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig b/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig
index 0d7ed3b..8735752 100644
--- a/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig
+++ b/core/profiles/demo_umami/themes/umami/templates/layout/page.html.twig
@@ -117,6 +117,12 @@
</main>
+ {% if page.content_bottom|render|striptags|trim is not empty %}
+ <div class="layout-content-bottom">
+ {{ page.content_bottom }}
+ </div>
+ {% endif %}
+
{% if page.footer|render|striptags|trim is not empty %}
<div class="layout-footer">
<footer class="footer" role="contentinfo">
diff --git a/core/profiles/demo_umami/themes/umami/umami.info.yml b/core/profiles/demo_umami/themes/umami/umami.info.yml
index c38daa7..783b161 100644
--- a/core/profiles/demo_umami/themes/umami/umami.info.yml
+++ b/core/profiles/demo_umami/themes/umami/umami.info.yml
@@ -22,6 +22,7 @@ regions:
page_title: 'Page Title'
content: Content
sidebar: Sidebar
+ content_bottom: 'Content Bottom'
footer: Footer
bottom: Bottom
page_top: 'Page top' # Needed by Drupal Core
diff --git a/core/profiles/demo_umami/themes/umami/umami.libraries.yml b/core/profiles/demo_umami/themes/umami/umami.libraries.yml
index 467b2bf..9f7fc58 100644
--- a/core/profiles/demo_umami/themes/umami/umami.libraries.yml
+++ b/core/profiles/demo_umami/themes/umami/umami.libraries.yml
@@ -57,6 +57,11 @@ quicklinks:
theme:
css/components/blocks/quicklinks/quicklinks.css: {}
+recipe-collections:
+ css:
+ theme:
+ css/components/blocks/recipe-collections/recipe-collections.css: {}
+
two-columns:
css:
layout: