From 4fa515a28ef66aedf8fb5951510f0e12b768c5b5 Mon Sep 17 00:00:00 2001 From: ebremner <ebremner@uwaterloo.ca> Date: Tue, 15 Jun 2021 11:51:02 -0400 Subject: [PATCH] ISTWCMS-4704: adding contact component --- .../04-components/contact/contact.twig | 48 +++++++++++++++++++ .../04-components/contact/contact.yml | 8 ++++ 2 files changed, 56 insertions(+) create mode 100644 source/_patterns/04-components/contact/contact.twig create mode 100644 source/_patterns/04-components/contact/contact.yml diff --git a/source/_patterns/04-components/contact/contact.twig b/source/_patterns/04-components/contact/contact.twig new file mode 100644 index 00000000..d707236c --- /dev/null +++ b/source/_patterns/04-components/contact/contact.twig @@ -0,0 +1,48 @@ +<div class="uw-contact"> + <details class="uw-contact__details"> + <summary class="uw-contact__summary"> + <h2 class="uw-contact__h2"> + {% if contact.link_profile %} + <a href="{{ contact.link_profile }}" class="uw-contact__link-profile"> + {% endif %} + {{ contact.title }} + {% if contact.link_profile %} + </a> + {% endif %} + </h2> + {% if contact.position %} + <div class="uw-contact__position"> + {{ contact.position }} + </div> + {% endif %} + </summary> + <div class="uw-contact__info"> + {% if contact.email or contact.phone %} + <div class="uw-contact__phone-email"> + {% if contact.email %} + <div class="uw-contact__email"> + <a href="mailto:{{ contact.email }}">{{ contact.email }}</a> + </div> + {% endif %} + {% if contact.phone %} + <div class="uw-contact__phone"> + {{ contact.phone }} + </div> + {% endif %} + </div> + {% endif %} + {% if contact.location %} + <div class="uw-contact__location"> + <strong>Location:</strong><br /> + {{ contact.location }} + </div> + {% endif %} + {% if contact.link_profile %} + <div class="uw-contact__profile"> + <strong>Link to profile:</strong><br /> + <a href="{{ contact.link_profile }}">{{ contact.title }}</a> + </div> + {% endif %} + </div> + </details> +</div> \ No newline at end of file diff --git a/source/_patterns/04-components/contact/contact.yml b/source/_patterns/04-components/contact/contact.yml new file mode 100644 index 00000000..fcac776a --- /dev/null +++ b/source/_patterns/04-components/contact/contact.yml @@ -0,0 +1,8 @@ +contact: + title: 'Contact Name' + position: 'Position' + image: 'http://fpoimg.com/140x105?text=Thumbnail 4:3' + email: 'someone@uwaterloo.ca' + phone: '519-888-4567 ex. 3333' + location: 'EC2 4444' + link_profile: 'https://google.ca' \ No newline at end of file -- GitLab