From 3325e40d54e9de87af8a2832860b7f507013cdcc Mon Sep 17 00:00:00 2001 From: Clayton Dewey Date: Sat, 19 Jan 2019 15:17:08 -0700 Subject: [PATCH 1/3] Create teaser display for License terms --- ...ol--taxonomy-term-license-teaser.html.twig | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 agaric/templates/layout/layout--onecol--taxonomy-term-license-teaser.html.twig diff --git a/agaric/templates/layout/layout--onecol--taxonomy-term-license-teaser.html.twig b/agaric/templates/layout/layout--onecol--taxonomy-term-license-teaser.html.twig new file mode 100644 index 0000000..ec8a957 --- /dev/null +++ b/agaric/templates/layout/layout--onecol--taxonomy-term-license-teaser.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Override of default theme implementation to display a one-column layout. + * + * Available variables: + * - content: The content for this layout. + * - attributes: HTML attributes for the layout
. + * + * @ingroup themeable + */ +#} +{% + set classes = [ + 'layout', + 'layout--onecol', + ] +%} +{% if content %} + +
+ {{ content.field_license_icon }} + {{ content.description}} +
+
+{% endif %} From aa12ae38f455684957883a226d6b9a4731725861 Mon Sep 17 00:00:00 2001 From: Clayton Dewey Date: Sat, 19 Jan 2019 15:17:51 -0700 Subject: [PATCH 2/3] Move license field to right about case study stats --- agaric/templates/layout/node--case-study--full.html.twig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agaric/templates/layout/node--case-study--full.html.twig b/agaric/templates/layout/node--case-study--full.html.twig index 54267ba..d6e5747 100644 --- a/agaric/templates/layout/node--case-study--full.html.twig +++ b/agaric/templates/layout/node--case-study--full.html.twig @@ -111,6 +111,9 @@ {% endif %} {# No, i do not understand why content doesn't print the paragraphs but only content.content does that #} + {% if content.field_license %} + {{ content.field_license }} + {% endif %}
@@ -136,7 +139,7 @@ {{ content|without('content', 'field_body_paragraph', 'field_case_study_client', 'field_case_study_partners', 'field_case_study_status', 'field_case_study_team', 'field_case_study_year', 'field_technologies', - 'field_services', 'uid', 'created' + 'field_services', 'uid', 'created', 'field_license' ) }}
From 72d95f51599f1deb305804e6a47b51d01762bd1e Mon Sep 17 00:00:00 2001 From: Clayton Dewey Date: Sat, 19 Jan 2019 15:18:24 -0700 Subject: [PATCH 3/3] Add styles to license icon --- agaric/sass/agaric/_base.figure.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agaric/sass/agaric/_base.figure.scss b/agaric/sass/agaric/_base.figure.scss index 37177fc..5889a54 100644 --- a/agaric/sass/agaric/_base.figure.scss +++ b/agaric/sass/agaric/_base.figure.scss @@ -24,3 +24,8 @@ text-align: left; color: $dark; } + +.license img { + float: left; + margin-right: 10px; +}