From 4a49210bbe81a6ad19d2e54d96d9a3b203dfd219 Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Wed, 17 Nov 2021 03:49:41 +0000 Subject: [PATCH] ISTWCMS-5128: adding services theming --- .../card/card-elements/_footer-elements.twig | 18 +++++ .../card/card-elements/_service-details.twig | 72 +++++++++++++++++++ .../card/card-elements/_service-hours.twig | 17 +++++ .../card-elements/_service-information.twig | 29 ++++++++ .../_patterns/04-components/label/label.twig | 1 + 5 files changed, 137 insertions(+) create mode 100644 source/_patterns/04-components/card/card-elements/_service-details.twig create mode 100644 source/_patterns/04-components/card/card-elements/_service-hours.twig create mode 100644 source/_patterns/04-components/card/card-elements/_service-information.twig create mode 100644 source/_patterns/04-components/label/label.twig diff --git a/source/_patterns/04-components/card/card-elements/_footer-elements.twig b/source/_patterns/04-components/card/card-elements/_footer-elements.twig index 0ac071a2..2ac8c034 100644 --- a/source/_patterns/04-components/card/card-elements/_footer-elements.twig +++ b/source/_patterns/04-components/card/card-elements/_footer-elements.twig @@ -4,6 +4,24 @@ } %} {% endif %} +{% if footer.service_information %} + {% include '@components/card/card-elements/_service-information.twig' with { + 'info': footer.service_information + } %} +{% endif %} + +{% if footer.service_details %} + {% include '@components/card/card-elements/_service-details.twig' with { + 'service_details': footer.service_details + } %} +{% endif %} + +{% if footer.service_hours %} + {% include '@components/card/card-elements/_service-hours.twig' with { + 'hours': footer.service_hours + } %} +{% endif %} + {% if footer.contact_info %} {% include '@components/card/card-elements/_contact-info.twig' with { 'contact_info': footer.contact_info diff --git a/source/_patterns/04-components/card/card-elements/_service-details.twig b/source/_patterns/04-components/card/card-elements/_service-details.twig new file mode 100644 index 00000000..160b6c0d --- /dev/null +++ b/source/_patterns/04-components/card/card-elements/_service-details.twig @@ -0,0 +1,72 @@ +<div class="card__service-details"> + {% embed '@components/details/details.twig' with { + 'is_open': TRUE + } %} + {% block details_summary %} + Service Details + {% endblock %} + + {% block details_content %} + {% if service_details.popularity %} + {% include '@components/label/label.twig' with { + 'label': 'Popularity' + } %} + {{ service_details.popularity }} + {% endif %} + + {% if service_details.use_service %} + {% include '@components/label/label.twig' with { + 'label': 'What can use this service' + } %} + {% include "@components/tag-list/tag-list.twig" with { + items: service_details.use_service + } %} + {% endif %} + + {% if service_details.whats_available %} + {% include '@components/label/label.twig' with { + 'label': 'What\'s available' + } %} + {% for wa in service_details.whats_available %} + {{ wa }}<br /> + {% endfor %} + {% endif %} + + {% if service_details.request_service %} + {% include '@components/label/label.twig' with { + 'label': 'How to request this service' + } %} + {{ service_details.request_service }} + {% endif %} + + {% if service_details.minimum_notice %} + {% include '@components/label/label.twig' with { + 'label': 'Minimum notice to use this service' + } %} + {{ service_details.minimum_notice }} + {% endif %} + + {% if service_details.average_length %} + {% include '@components/label/label.twig' with { + 'label': 'Average length of time to complete request' + } %} + {{ service_details.average_length }} + {% endif %} + + {% if service_details.pricing_cost %} + {% include '@components/label/label.twig' with { + 'label': 'Pricing/Cost' + } %} + {{ service_details.pricing_cost }} + {% endif %} + + {% if service_details.support %} + {% include '@components/label/label.twig' with { + 'label': 'Support for this service' + } %} + {{ service_details.support }} + {% endif %} + + {% endblock %} + {% endembed %} +</div> diff --git a/source/_patterns/04-components/card/card-elements/_service-hours.twig b/source/_patterns/04-components/card/card-elements/_service-hours.twig new file mode 100644 index 00000000..4575f4c0 --- /dev/null +++ b/source/_patterns/04-components/card/card-elements/_service-hours.twig @@ -0,0 +1,17 @@ +<div class="card__service-details"> + {% embed '@components/details/details.twig' with { + 'is_open': TRUE + } %} + {% block details_summary %} + Service Hours + {% endblock %} + + {% block details_content %} + + {% if hours %} + {{ hours }} + {% endif %} + + {% endblock %} + {% endembed %} +</div> diff --git a/source/_patterns/04-components/card/card-elements/_service-information.twig b/source/_patterns/04-components/card/card-elements/_service-information.twig new file mode 100644 index 00000000..9105935d --- /dev/null +++ b/source/_patterns/04-components/card/card-elements/_service-information.twig @@ -0,0 +1,29 @@ +<div class="card__service-information"> + {% embed '@components/details/details.twig' with { + 'is_open': TRUE + } %} + {% block details_summary %} + Service Information + {% endblock %} + + {% block details_content %} + + {% if info.status %} + {% include '@components/label/label.twig' with { + 'label': 'Status' + } %} + {{ info.status }} + {% endif %} + + {% if info.categories %} + {% include '@components/label/label.twig' with { + 'label': 'Categories' + } %} + {% include "@components/tag-list/tag-list.twig" with { + items: info.categories + } %} + {% endif %} + + {% endblock %} + {% endembed %} +</div> diff --git a/source/_patterns/04-components/label/label.twig b/source/_patterns/04-components/label/label.twig new file mode 100644 index 00000000..787662a9 --- /dev/null +++ b/source/_patterns/04-components/label/label.twig @@ -0,0 +1 @@ +<span class="uw-label">{{ label }}:</span> -- GitLab