Skip to content

Commit

Permalink
flatten layouts/shortcodes/home/calendar.html
Browse files Browse the repository at this point in the history
In order to use the shortcode in the external-imports, we need to avoid
having parts of it converted into <pre> sections. Hugo does this I guess
(it's an annoying change, but this is the only external-import with any
shortcode that I'm aware of, and shortcodes aren't very big)

Other changes will also be needed like some text changes and formatting.
The CSS rules to put the calendar into dark mode need to be revisited.

Signed-off-by: Kingdon Barrett <kingdon+github@tuesdaystudios.com>
  • Loading branch information
kingdonb committed May 2, 2024
1 parent 4c1ae4d commit 130926a
Showing 1 changed file with 32 additions and 36 deletions.
68 changes: 32 additions & 36 deletions layouts/shortcodes/home/calendar.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<div class="team-calendar" data-controller="calendar">
<h3 id="calendar">Our Team Calendar</h3>
<p class="caption">The upcoming meetings, talks and community events in the next month are listed<br/>
below. (All times are <span data-calendar-target="localtz">UTC</span>.)</p>

<ul class="calendar-list">
{{ range $.Site.Data.calendar }}
<li>
<div class="calendar-row" data-controller="calrow">
<div class="date" data-calrow-target="date">{{ .date }}</div><span>&nbsp;</span>
<div class="time" data-calrow-target="time">{{ .time }}</div><span>&nbsp;</span>
<div class="origtz" aria-hidden="true" data-calrow-target="timestamp">{{ .timestamp }}</div>
<div class="label">{{ .label }}</div>
</div>
<div class="calendar-card">
<ul class="details-list">
<li>
<dt>Where</dt>
<dd>{{ .where }}</dd>
</li>

{{ if and .org_email .org_name }}
<li>
<dt>Organizer</dt>
<dd><a href="mailto:{{ .org_email }}">{{ .org_name }}</a></dd>
</li>
{{ end }}
</ul>

<span class="description">{{ .description | safeHTML }}</span>
</div>
</li>
{{ end }}
</ul>

<p class="details">See <a href="/community/#meetings">this page</a>
for more detail and subscription options.</p>
<h3 id="calendar">Our Team Calendar</h3>
<p class="caption">The upcoming meetings, talks and community events in the next month are listed<br/>
below. (All times are <span data-calendar-target="localtz">UTC</span>.)</p>
<ul class="calendar-list">
{{ range $.Site.Data.calendar }}
<li>
<div class="calendar-row" data-controller="calrow">
<div class="date" data-calrow-target="date">{{ .date }}</div><span>&nbsp;</span>
<div class="time" data-calrow-target="time">{{ .time }}</div><span>&nbsp;</span>
<div class="origtz" aria-hidden="true" data-calrow-target="timestamp">{{ .timestamp }}</div>
<div class="label">{{ .label }}</div>
</div>
<div class="calendar-card">
<ul class="details-list">
<li>
<dt>Where</dt>
<dd>{{ .where }}</dd>
</li>
{{ if and .org_email .org_name }}
<li>
<dt>Organizer</dt>
<dd><a href="mailto:{{ .org_email }}">{{ .org_name }}</a></dd>
</li>
{{ end }}
</ul>
<span class="description">{{ .description | safeHTML }}</span>
</div>
</li>
{{ end }}
</ul>
<p class="details">See <a href="/community/#meetings">this page</a>
for more detail and subscription options.</p>
</div>

0 comments on commit 130926a

Please sign in to comment.