Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "staff-list"]
path = staff-list
url = https://github.com/CHTC/staff-list.git
[submodule "_events"]
path = _events
url = https://github.com/CHTC/Events.git
14 changes: 12 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ include:
- "nsdf/.well-known"
- "uwdf/researchdrive/.well-known"

exclude:
- _events/images

markdown_ext : "md,shtml"

highlighter: none
Expand All @@ -41,9 +44,13 @@ defaults:
layout: news-page
permalink: :title.html
- scope:
type: events
type: events_legacy
values:
layout: events
- scope:
type: events
values:
layout: events_modern
- scope:
type: redirects
values:
Expand All @@ -54,9 +61,12 @@ collections:
news:
permalink: /news/:path/
output: true
events_legacy:
output: true
permalink: /events/:year/:month/:title
events:
output: true
permalink: /:collection/:year/:month/:title
permalink: /events/:year/:month/:day/:title
redirects:
output: true
uw-research-computing:
Expand Down
1 change: 1 addition & 0 deletions _events
Submodule _events added at e71ba4
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 1 addition & 4 deletions _includes/event/event-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div>
{% if event.image %}
<a href="{{ event.url }}">
<img alt="" class="rounded w-100" src="{{ event.image | relative_url }}" style="max-height: 200px; object-fit: cover;">
<img alt="{{ event.image.alt }}" class="rounded w-100" src="{{ event.image.path | relative_url }}" style="max-height: 200px; object-fit: cover;">
</a>
{% endif %}
</div>
Expand All @@ -23,8 +23,5 @@ <h4 class="mt-0 text-muted">
{{ date }}
</h4>
{% endif %}
<h4 class="fw-normal mt-3">
{{ event.location }}
</h4>
</div>
</div>
4 changes: 2 additions & 2 deletions _includes/event/event-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ <h2 class="subtitle">
</div>
<div class="row">
<div class="col-12 image-container">
<img src="{{ page.header_image | relative_url }}"/>
<img alt="{{ page.banner.alt }}" src="{{ page.banner.path | relative_url }}"/>
</div>
<div class="col-12">
<div class="bg-light p-1">
<small class="text-muted">{{ page.header_credit }}</small>
<small class="text-muted">{{ page.banner.credit }}</small>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{% assign current_time = 'now' | date: '%Y-%m-%d' | date: '%s' | plus: 0 %}


{% assign all_events = site.events | where_exp: "event", "event.publish_on contains site.key" %}
{% assign future_events = "" | split : "" %}

{% for event in site.events %}

{% for event in all_events %}
{% assign event_end = event.end_date | append: "" | date: '%Y-%m-%d' | date: '%s' | plus: 0 %}

{% if event_end >= current_time %}
{% assign future_events = future_events | push: event %}
{% endif %}
{% endfor %}

{% assign future_events = future_events | sort: "end_date" %}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{% assign current_time = 'now' | date: '%Y-%m-%d' | date: '%s' | plus: 0 %}

{% assign all_events = site.events | where_exp: "event", "event.publish_on contains site.key" %}
{% assign past_events = "" | split : "" %}

{% for event in site.events %}

{% for event in all_events %}
{% assign event_end = event.end_date | append: "" | date: '%Y-%m-%d' | date: '%s' | plus: 0 %}

{% if event_end < current_time %}
{% assign past_events = past_events | push: event %}
{% endif %}
{% endfor %}

{% assign past_events = past_events | sort: "end_date" | reverse %}
{% assign past_events = past_events | sort: "end_date" | reverse %}
39 changes: 38 additions & 1 deletion _layouts/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,44 @@
---

<div class="event">
{% include event/event-header.html %}
<div class="event-header pt-4 pt-md-4">
<div class="row justify-content-end">
<div class="col-auto">
<h2 class="subtitle">
{% assign date = page.start_date | date: "%B %e" %}
{% if page.start_date != page.end_date %}
{% assign date = page.end_date | date: "-%e" | prepend: date %}
{% endif %}

{% assign current_time = 'now' | date: '%Y-%m-%d' | date: '%s' | plus: 0 %}
{% assign event_end = page.end_date | append: "" | date: '%Y-%m-%d' | date: '%s' | plus: 0 %}

{% if current_time > event_end %}
Past Event | {{ date }}
{% else %}
Upcoming Event | {{ date }}
{% endif %}
</h2>
</div>
</div>
<div class="row">
<div class="col-12 image-container">
<img src="{{ page.header_image | relative_url }}"/>
</div>
<div class="col-12">
<div class="bg-light p-1">
<small class="text-muted">{{ page.header_credit }}</small>
</div>
</div>
</div>
<div class="row mt-2">
<div class="col-12 col-md-8">
<h1 class="title">
{{ page.title }}
</h1>
</div>
</div>
</div>

{{ content }}
</div>
29 changes: 29 additions & 0 deletions _layouts/events_modern.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: container
---

<div class="event">
{% include event/event-header.html %}

<div class="row event pt-3">
<div class="main col-12 col-md-8 order-1 order-md-1" markdown="1">
{{ content }}
</div>

{% if page.sidebar %}
<div class="subsection col-12 col-md-4 order-2 order-md-2">
<div class="ms-md-4 bg-light p-3">
{{ page.sidebar | markdownify }}
</div>
</div>
{% endif %}
</div>

{% if page.endblock %}
<div class="row">
<div class="col-12">
{{ page.endblock | markdownify }}
</div>
</div>
{% endif %}
</div>
4 changes: 2 additions & 2 deletions events.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<div class="row justify-content-center">
<div class="col mw-1000 pb-5">
<div class="row mb-3">
{% include get/future_events.html %}
{% include get/future_events.liquid %}
{% for event in future_events %}
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
{% include event/event-card.html %}
</div>
{% endfor %}
</div>
{% include get/past_events.html %}
{% include get/past_events.liquid %}
{% if past_events.size > 0 %}
<h1 class="text-muted">Past Events</h1>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</p>

</div>
{% include get/future_events.html %}
{% include get/future_events.liquid %}
{% if future_events.size > 0 %}
<div class="col-12 col-lg-4">
<div class="rounded bg-light px-3 py-1">
Expand Down
Loading