vegan-prestwich/_includes/place-meta.html
2022-12-10 12:18:35 +00:00

69 lines
2.7 KiB
HTML

<div class="place-meta">
<ul>
{% if web %}
<li>
<strong>Web:</strong>
<a href="{{ web }}">
{{ web | replace: "https://", "" | replace: "http://", "" | replace: "www.", "" }}
</a>
</li>
{% endif %}
{% if address %}
<li><strong>Address:</strong> {{ address }}</li>
{% endif %}
{% if postcode %}
<li><strong>Postcode:</strong> {{ postcode }}</li>
{% endif %}
{% if phone %}
<li><strong>Phone:</strong> <a href="tel:{{ phone | replace: " ", "" }}">{{ phone }}</a></li>
{% endif %}
</ul>
{% if google or facebook or twitter or tripadvisor or instagram %}
<hr>
<ul>
{% if google %}
<li><strong>Google:</strong> <a href="{{ google }}">click here</a></li>
{% endif %}
{% if facebook %}
{% capture facebook_text %}
@{{ facebook | replace: "https://www.facebook.com/", "" }}
{% endcapture %}
{% assign stripped_facebook = facebook_text | replace: "/", "" %}
{% if stripped_facebook != facebook_text %}
{% assign facebook_text = "click here" %}
{% endif %}
<li><strong>Facebook:</strong> <a href="{{ facebook }}">{{ facebook_text | escape }}</a></li>
{% endif %}
{% if instagram %}
{% capture instagram_text %}
@{{ instagram | replace: "https://www.instagram.com/u/", "" | replace: "https://www.instagram.com/", "" }}
{% endcapture %}
{% assign stripped_instagram = instagram_text | replace: "/", "" %}
{% if stripped_instagram != instagram_text %}
{% assign instagram_text = "click here" %}
{% endif %}
<li><strong>Instagram:</strong> <a href="{{ instagram }}">{{ instagram_text | escape }}</a></li>
{% endif %}
{% if twitter %}
<li><strong>Twitter:</strong> <a href="{{ twitter }}">@{{ twitter | replace: "https://twitter.com/", "" }}</a></li>
{% endif %}
{% if tripadvisor %}
<li><strong>TripAdvisor:</strong> <a href="{{ tripadvisor }}">click here</a></li>
{% endif %}
</ul>
{% endif %}
{% if times %}
<hr>
<ul>
<li>
<strong>Times</strong>
<ul class="small">
{% for time in times %}
<li>{{ time }}</li>
{% endfor %}
</ul>
</li>
</ul>
{% endif %}
</div>