upcomingEvents: Yield header/footer directly for better code readability

This commit is contained in:
Adam Goldsmith 2023-05-25 23:08:18 -04:00
parent c0e43dd48e
commit e71fd48975

View File

@ -89,7 +89,8 @@ def generate_post():
) )
raise raise
header = """<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" /></a></p> # header
yield """<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" /></a></p>
<p>Greetings Upper Valley Makers:</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> <p>We have an exciting list of upcoming classes at the Claremont MakerSpace that we think might interest you.</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). <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).
@ -103,15 +104,6 @@ def generate_post():
<hr /> <hr />
""" """
footer = """<div style="clear: both;">
<hr />
<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>
</div>
"""
yield header
yield format_section( yield format_section(
"Upcoming Events", "Upcoming Events",
"Events that are currently open for registration.", "Events that are currently open for registration.",
@ -133,7 +125,14 @@ def generate_post():
truncate=True, truncate=True,
) )
yield (footer) # footer
yield """<div style="clear: both;">
<hr />
<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>
</div>
"""
def main(): def main():