membershipworks: Fix layout/use wordpress blocks in upcoming-events

This commit is contained in:
Adam Goldsmith 2023-12-24 00:20:23 -05:00
parent 7b20c784d5
commit 9a0d6012b9

View File

@ -4,87 +4,109 @@
{% block title %}Upcoming Events{% endblock %}
{% block content %}
<div id="preview">
<p>
<img class="aligncenter size-medium wp-image-2319"
src="https://claremontmakerspace.org/wp-content/uploads/2019/03/CMS-Logo-b-y-g-300x168.png"
alt=""
width="300"
height="168" />
</p>
<p>Greetings Upper Valley Makers:</p>
<p>We have an exciting list of upcoming classes at the Claremont MakerSpace that we think might interest you.</p>
<div>
<strong>For most classes and events, CMS MEMBERSHIP IS NOT REQUIRED.</strong> That said, members receive a discount
on registration and there are some classes/events that are for members only (this will be clearly noted in the event
description).
</div>
<div>
<strong>Class policies</strong> (liability waiver, withdrawal, cancellation, etc.) can be found <a href="https://claremontmakerspace.org/class-policies/"
data-wpel-link="internal">here</a>.
</div>
<div>
<strong>Instructors:</strong> Interested in teaching a class at CMS? Please fill out our <a href="https://claremontmakerspace.org/cms-class-proposal-form/"
data-wpel-link="internal">Class Proposal Form</a>.
</div>
<div>
<strong>Tours:</strong> Want to see what the Claremont MakerSpace is all about? Tours are by appointment only.
</div>
<a href="https://tickets.claremontmakerspace.org/open.php"
target="_blank"
rel="noreferrer noopener external"
data-wpel-link="external">Contact Us</a> to schedule your tour where you can learn about all the awesome tools that
the CMS offers access to, as well as how membership, classes, and studio spaces work.
<hr />
{% for section in event_sections %}
{% if section.events %}
<h1>{{ section.title }}</h1>
<h4>
<i>{{ section.blurb }}</i>
</h4>
{% for event in section.events %}
{% with url="https://claremontmakerspace.org/events/#!event/register/"|add:event.url %}
{% spaceless %}
<h2 style="text-align: center;">
<a href="{{ url }}">
{# djlint:off H006,H013 #}
{% if "lgo" in event %}<img class="alignleft" width="400" src="{{ event.lgo.l }}">{% endif %}
{# djlint:on #}
<span>{{ event.ttl|bleach }}</span>
</a>
</h2>
{% endspaceless %}
{% spaceless %}
<div>
{# wordpress is very annoying with spacing here #}
{# djlint:off #}
<i>
{% spaceless %}
<div id="preview">
<!-- wp:image {"align":"center","id":2319} -->
<figure class="wp-block-image aligncenter">
<img src="https://claremontmakerspace.org/wp-content/uploads/2019/03/CMS-Logo-b-y-g-300x168.png"
width="300"
height="168"
alt="CMS Logo"
class="wp-image-2319" />
</figure>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Greetings Upper Valley Makers:</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>We have an exciting list of upcoming classes at the Claremont MakerSpace that we think might interest you.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>
<strong>For most classes and events, CMS MEMBERSHIP IS NOT REQUIRED.</strong> That said, members receive a discount on registration and there are some classes/events that are for members only (this will be clearly noted in the event description).
<br>
<strong>Class policies</strong> (liability waiver, withdrawal, cancellation, etc.) can be found <a href="https://claremontmakerspace.org/class-policies/">here</a>.
<br>
<strong>Instructors:</strong> Interested in teaching a class at CMS? Please fill out our <a href="https://claremontmakerspace.org/cms-class-proposal-form/">Class Proposal Form</a>.
<br>
<strong>Tours:</strong> Want to see what the Claremont MakerSpace is all about? Tours are by appointment only.
<br>
<a data-wpel-link="external"
href="https://tickets.claremontmakerspace.org/open.php"
target="_blank"
rel="noreferrer noopener external">Contact Us</a> to schedule your tour where you can learn about all the awesome tools that the CMS offers access to, as well as how membership, classes, and studio spaces work.
</p>
<!-- /wp:paragraph -->
<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" />
<!-- /wp:separator -->
{% for section in event_sections %}
{% if section.events %}
<!-- wp:heading {"level":1} -->
<h1 class="wp-block-heading">{{ section.title }}</h1>
<!-- /wp:heading -->
<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">
<i>{{ section.blurb }}</i>
</h4>
<!-- /wp:heading -->
{% for event in section.events %}
{% with url="https://claremontmakerspace.org/events/#!event/register/"|add:event.url %}
<!-- wp:group {"tagName":"section","layout":{"type":"constrained"}} -->
<section class="wp-block-group">
<!-- wp:heading {"align":"center"} -->
<h2 class="wp-block-heading">
<a href="{{ url }}">
{% if "lgo" in event %}
{# djlint:off H006 #}
<img class="{% cycle 'alignleft' 'alignright' %}"
width="400"
alt="Image for {{ event.ttl|bleach }}"
src="{{ event.lgo.l }}">
{# djlint:on #}
{% endif %}
<span>{{ event.ttl|bleach }}</span>
</a>
</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>
{# wordpress is very annoying with spacing here #}
{# TODO: different dates probably implies multiple instances. Should read RRULE or similar from the event notes #}
{{ event.sdp_dt|date }} {{ event.sdp_dt|time }} &mdash; {% if event.sdp_dt.date != event.edp_dt.date %}{{ event.edp_dt|date }}{% endif %} {{ event.edp_dt|time }}
</i>
{# djlint:on #}
</div>
{% endspaceless %}
{% if not section.truncate %}
<div>{{ event.dtl|bleach:"a,abbr,acronym,b,blockquote,code,em,i,li,ol,strong,ul,p,span,br,div" }}</div>
<div>
<a href="{{ url }}">Register for this class now!</a>
</div>
{% endif %}
<hr />
{% endwith %}
{% endfor %}
{% endif %}
{% endfor %}
<div style="clear: both;">
<div>Happy Makin!</div>
<div>
We are grateful for all of the public support that our 501(c)(3), non-profit organization receives. If youd
like to make a donation,please visit the <a href="https://claremontmakerspace.org/support/"><strong>Support Us
page</strong></a> of our website.
</div>
{# djlint:off #}
<i>{{ event.sdp_dt|date }} {{ event.sdp_dt|time }} &mdash; {% if event.sdp_dt.date != event.edp_dt.date %}{{ event.edp_dt|date }}{% endif %} {{ event.edp_dt|time }}</i>
{# djlint:on #}
</p>
<!-- /wp:paragraph -->
{% if not section.truncate %}
<!-- wp:tadv/classic-paragraph -->
<div>{{ event.dtl|bleach:"a,abbr,acronym,b,blockquote,code,em,i,li,ol,strong,ul,p,span,br,div" }}</div>
<!-- /wp:tadv/classic-paragraph -->
<!-- wp:paragraph -->
<p>
<a href="{{ url }}">Register for this class now!</a>
</p>
<!-- /wp:paragraph -->
{% endif %}
</section>
<!-- /wp:group -->
<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide aligncenter" />
<!-- /wp:separator -->
{% endwith %}
{% endfor %}
{% endif %}
{% endfor %}
<!-- wp:paragraph -->
<p style="clear: both;">Happy Makin!</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>
We are grateful for all of the public support that our 501(c)(3), non-profit organization receives. If youd like to make a donation,please visit the <a href="https://claremontmakerspace.org/support/"><strong>Support Us page</strong></a> of our website.
</p>
<!-- /wp:paragraph -->
</div>
</div>
{% endspaceless %}
<div class="position-fixed end-0 bottom-0">
<button id="copy-button"
type="button"