{# directory sidebar module #}
<div class="d-block d-lg-none" style="padding:25px;"><hr></div>
<div class="module" id="connectwithus">
<div class="module-content" style="overflow-wrap: break-word;">
{% if customer is not empty %}
{% set media = customer.getMedia() %}
{% set media2 = customer.getLogo() %}
{% if media %}
{{ media.getImageTag("","display: block; margin: 0 auto;")|raw }}
<br>
{% elseif media2 %}
<img
src="/uploads/content/{{ media2.getName() }}"
style="display: block; margin: 0 auto;"
loading='lazy'
/>
<br>
{% endif %}
{% elseif content and content.getFeaturedImageTag() is not empty %}
{{ content.getFeaturedImageTag("d-block mx-auto my-auto","")|raw }}
<br />
{% endif %}
{% if customer is not empty %}
{% if customer.email is not empty or customer.youtube3 is not empty %}
<a
href="{{customer.youtube3 ? customer.youtube3 : "#" }}"
id="{{customer.youtube3 ? "external-request_info" : "request_info" }}"
class="button alt mb-3 no-track"
style="width: 100%; text-align: center; padding: 10px 0px 10px;"
>Request More Information</a>
<br><br>
{% endif %}
{% if customer.addresses is not empty %}
<div>
{% for address in customer.addresses %}
<div style="padding-bottom: 10px;">
{% if address.title is not empty %}<strong>{{ address.title }}:</strong><br>{% endif %}
{% if address.addressline1 is not empty %}{{ address.addressline1 }}<br>{% endif %}
{% if address.addressline2 is not empty %}{{ address.addressline2 }}<br>{% endif %}
{% if address.city is not empty %}{{ address.city }}, {% endif %}
{% if address.stateprovince is not empty %}{{ address.stateprovince }} {% endif %}
{% if address.postalcode is not empty %}{{ address.postalcode }} {% endif %}
{% if address.city is not empty or address.stateprovince is not empty or address.postalcode is not empty%}<br>{% endif %}
{% if address.country is not empty %}{{ address.country }}<br>{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% elseif content and content.getContentMetaValueByKey('_company_address') is not empty %}
<div class="mb-3">
{{ content.getContentMetaValueByKey('_company_address') }}
</div>
{% endif %}
{% if customer is not empty %}
{% if customer.phones is not empty %}
{% set hasphones = false %}
{% for phone in customer.phones %}
{% if phone.number is not empty %}
{% set hasphones = true %}
{% endif %}
{% endfor %}
<div {{ (hasphones) ? "style='padding-bottom: 10px;'": "" }}>
{% for phone in customer.phones %}
{% if phone.number is not empty %}
<strong>{{ phone.title }}: </strong> <br/> <a href="tel:{{ phone.number }}">{{ phone.number }}</a><br>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% elseif content and content.getContentMetaValueByKey('_company_phone') is not empty %}
<div class="mb-3">
<strong>Phone:</strong>
<a href="{{ content.getContentMetaValueByKey('_company_phone') }}">
{{ content.getContentMetaValueByKey('_company_phone') }}
</a>
</div>
{% endif %}
{% if customer is not empty %}
{% if customer.email is not empty %}
{% if emails_is_valid is not defined %}
{% set email_is_valid = false %}
{% endif %}
<div style="padding-bottom: 10px;">
<strong>Contact Us:</strong><br/> <a href="{{ customer.email|external_link }}" target={{ email_is_valid ? "_self" : "_blank" }}>{{ customer.email }}</a><br>
</div>
{% endif %}
{% elseif content and content.getContentMetaValueByKey('_company_email') is not empty %}
<div style="padding-bottom: 10px;">
<strong>Contact Us:</strong> <a href="mailto:{{ content.getContentMetaValueByKey('_company_email') }}">
{{ content.getContentMetaValueByKey('_company_email') }}
</a><br>
</div>
{% endif %}
{% if customer is not empty %}
{% if customer.websites is not empty %}
<strong>Websites:</strong><br>
<div style='padding-bottom: 10px;'>
<ul style="padding-left: 1em;">
{% for website in customer.websites %}
<li style="margin: 5px 0;"><a href="{{ website.getSiteUrl()|external_link }}">{{ website.getSiteDisplayText() }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% elseif content and content.getContentMetaValueByKey('_company_phone') is not empty %}
{# Old way with only one website: #}
{% if customer is not empty and customer.website is not empty %}
<div>
<strong>Website:</strong> <a href="{{ customer.website|external_link }}">{{ customer.getWebsiteTitleText() }}</a><br><br>
</div>
{% elseif content and content.getContentMetaValueByKey('_company_website') is not empty %}
<div>
<strong>Website:</strong> <a href="{{ content.getContentMetaValueByKey('_company_website')|external_link }}">
{{ content.getContentMetaValueByKey('_company_website') }}
</a><br><br>
</div>
{% endif %}
{% endif %}
{% if customer is not empty %}
{% if customer.facebook is not empty or customer.twitter is not empty or customer.linkedin is not empty or customer.instagram is not empty or customer.youtube is not empty%}
<div class="social">
<strong>Social Media:</strong><br>
{% if customer.facebook is not empty %}
<a href="{{ customer.facebook }}" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
{% endif %}
{% if customer.twitter is not empty %}
<a href="https://twitter.com/{{ customer.twitter }}" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
{% endif %}
{% if customer.linkedin is not empty %}
<a href="{{ customer.linkedin }}" aria-label="LinkedIn"><i class="fa fa-linkedin"></i></a>
{% endif %}
{% if customer.instagram is not empty %}
<a href="{{ customer.instagram }}" aria-label="Instagram"><i class="fa fa-instagram"></i></a>
{% endif %}
{% if customer.youtube2 is not empty %}
<a href="{{ customer.youtube2 }}" aria-label="Tiktok"><i class="fa-brands fa-tiktok"></i></a>
{% endif %}
{% if customer.youtube is not empty %}
<a href="{{ customer.youtube }}" aria-label="YouTube"><i class="fa fa-youtube"></i></a>
{% endif %}
{% if content is not empty %}
<a href="/rss/{{ content.getSlug() }}" aria-label="RSS" target="_blank"><i class="fa fa-rss"></i></a>
{% endif %}
</div><br>
{% endif %}
{% elseif content is not empty %}
{% set social_out = false %}
{% if content.getContentMetaValueByKey('_company_facebook') is not empty %}
{% if not social_out %}
<div class="social">
<strong>Social Media:</strong>
{% set social_out = true %}
{% endif %}
<a href="{{ content.getContentMetaValueByKey('_company_facebook') }}" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
{% endif %}
{% if content.getContentMetaValueByKey('_company_twitter') is not empty %}
{% if not social_out %}
<div class="social">
<strong>Social Media:</strong>
{% set social_out = true %}
{% endif %}
<a href="{{ content.getContentMetaValueByKey('_company_twitter') }}" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
{% endif %}
{% if content.getContentMetaValueByKey('_company_linkedin') is not empty %}
{% if not social_out %}
<div class="social">
<strong>Social Media:</strong>
{% set social_out = true %}
{% endif %}
<a href="{{ content.getContentMetaValueByKey('_company_linkedin') }}" aria-label="LinkedIn"><i class="fa fa-linkedin"></i></a>
{% endif %}
{% if content.getContentMetaValueByKey('_company_instagram') is not empty %}
{% if not social_out %}
<div class="social">
<strong>Social Media:</strong>
{% set social_out = true %}
{% endif %}
<a href="{{ content.getContentMetaValueByKey('_company_instagram') }}" aria-label="Instagram"><i class="fa fa-instagram"></i></a>
{% endif %}
{% if content.getContentMetaValueByKey('_company_youtube') is not empty %}
{% if not social_out %}
<div class="social">
<strong>Social Media:</strong>
{% set social_out = true %}
{% endif %}
<a href="{{ content.getContentMetaValueByKey('_company_youtube') }}" aria-label="YouTube"><i class="fa fa-youtube"></i></a>
{% endif %}
{% if social_out %}
</div>
{% endif %}
{% endif %}
{% if show_upcoming is defined and show_upcoming %}
{% if customer is not empty and customer.externalevents is not null and customer.externalevents.menuitems is not empty %}
{% for event in customer.externalevents.menuitems %}
{% if event.title is not empty and event.link is not empty and event.link.refexternal is not empty %}
<div>
<strong>Featured Event:</strong><br>
<ul style="padding-left: 1em;">
<li style="margin: 5px 0;"><a href="{{ event.link.refexternal|external_link }}">{{ event.title }}</a></li>
</ul>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% if upcoming_events is defined and upcoming_events is not empty %}
<div>
<strong>Upcoming Events:</strong><br>
<ul style="padding-left: 1em;">
{% for event in upcoming_events %}
<li style="margin: 5px 0;"><a href="/event/{{ event.slug }}">{{ event.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}
{% if customer is not empty and show_newsletters is defined and show_newsletters and customer.newsletters is not null and customer.newsletters.menuitems is not empty %}
<div>
<strong>Newsletters:</strong><br>
<ul style="padding-left: 1em;">
{% for newsletter in customer.newsletters.menuitems %}
{% if newsletter.link %}
<li style="margin: 5px 0;"><a href="{{ newsletter.link.refexternal|external_link }}">{{ newsletter.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% if show_coffeeblog is defined and show_coffeeblog and latest_news is defined and latest_news is not empty %}
<div>
<strong>Latest Coffee Shop News:</strong><br>
<ul style="padding-left: 1em;">
{% for post in latest_news %}
<li style="margin: 5px 0;"><a href="{{ post.getFullURL() }}">{{ post.title }}</a></li>
{% endfor %}
<a href="{{ meta.root }}/posts"><i class="fa fa-caret-right"></i><strong> Read More</strong></a>
</ul>
</div>
{% endif %}
{% if customer is not empty and show_literature is defined and show_literature and customer.literature is not null and customer.literature.mediagroupitems is not empty %}
<div>
<strong>Literature Downloads:</strong><br>
<ul style="padding-left: 1em;">
{% for literature in customer.literature.mediagroupitems %}
<li style="margin: 5px 0;">
{% if literature.media is not null %}
<a href="{{ literature.media.getURL() }}">
{{ literature.title }}
</a>
{% else %}
<a href="{{ literature.externalurl|external_link }}">
{{ literature.title }}
</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
{% if preview is not defined or not preview %}
<div id="modal" class="modal show" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<button class="close float-right" type="button"><i class="fa fa-times"></i></button>
{# include the directory lead form #}
{#
{% for sidebar in sidebars %}
{% if sidebar.id is defined and sidebar.id == 'directory_lead' %}
{{ show_module(sidebar) }}
{% endif %}
{% endfor %}
#}
{% include "forms/directory-lead.html.twig" %}
</div>
</div>
</div>
</div>
{% endif %}