diff --git a/source/_patterns/04-components/contact/contact.twig b/source/_patterns/04-components/contact/contact.twig new file mode 100644 index 0000000000000000000000000000000000000000..d707236c651320c494bfb79ae1cc34d5e552c142 --- /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 0000000000000000000000000000000000000000..fcac776a7536bc3e867f94e1f12f28b5691ea9cb --- /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