Skip to content

Instantly share code, notes, and snippets.

@narthur
Last active January 10, 2020 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save narthur/86620431952346435d2092e9aad537f7 to your computer and use it in GitHub Desktop.
Save narthur/86620431952346435d2092e9aad537f7 to your computer and use it in GitHub Desktop.
{% set announcements = su.collection( "announcements" )
.activationDate( "now"|date( 'Y-m-d' ), "<=" )
.deactivationDate( "now"|date( 'Y-m-d' ), ">" ).or().deactivationDate( "", "=" )
.find() %}
<ul class='custom-announcements'>
{% for announcement in announcements %}
<li>
<h5>{{ announcement.title }}</h5>
{{ announcement.details|markdown }}
</li>
{% endfor %}
</ul>
<style>
.custom-announcements {
padding-left: 0 !important;
}
.custom-announcements li {
list-style-type: none;
padding-bottom: 1em;
padding-top: 1em;
border-bottom: 1px solid rgba(0,0,0,.2);
}
.custom-announcements li:last-child {
border-bottom: 0;
}
.custom-announcements li h5 {
padding-bottom: .25em;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment