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_external"]
path = _events
url = https://github.com/CHTC/events
12 changes: 10 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ permalink: pretty
title: 'PATh'
url: "https://path-cc.io"
key: path
future: true

google_analytics_id: G-0CCSDQV212
homepage:
Expand Down Expand Up @@ -38,9 +39,12 @@ collections:
news:
output: true
permalink: /news/:path/
events:
events_legacy:
output: true
permalink: /events/:path/
events:
output: true
permalink: /events/:year/:month/:day/:title/
gil:
output: true
permalink: /GIL/:path/
Expand Down Expand Up @@ -74,9 +78,13 @@ defaults:
layout: news
bodyClass: page-news-single
- scope:
type: events
type: events_legacy # Legacy events use the `events` layout for compatibility
values:
layout: events
- scope:
type: events # New events use the `events_modern` layout
values:
layout: events_modern
- scope:
path: 'images'
values:
Expand Down
1 change: 1 addition & 0 deletions _events
Submodule _events added at 62a61a
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion _includes/event/event-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h5 class=" m-0 text-dark">
</div>
{% endif %}
{% if event.image %}
<img alt="" class="card-img" src="{{ event.image | relative_url }}" >
<img alt="{{ event.image.alt }}" class="card-img" src="{{ event.image.path | relative_url }}" >
{% endif %}
<div class="card-body p-1">
<h3 class="text-decoration-none card-title text-dark m-0">
Expand Down
7 changes: 5 additions & 2 deletions _includes/event/event-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ <h2 class="subtitle">
</div>
<div class="row">
<div class="col-12 image-container">
<img src="{{ page.header_image | relative_url }}"/>
<img src="{{ page.banner.path | relataive_url }}" alt="{{ page.banner.alt }}" class="w-100 image-cover">
</div>

{% if page.banner.credit %}
<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>
{% endif %}
</div>
<div class="row mt-2">
<div class="col-12 col-xl-7 col-lg-8 col-md-8">
Expand Down
1 change: 0 additions & 1 deletion _includes/event/event-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@




4 changes: 2 additions & 2 deletions _includes/get/future_events.liquid
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% 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 %}
Expand Down
14 changes: 0 additions & 14 deletions _includes/get/past_events.html

This file was deleted.

14 changes: 14 additions & 0 deletions _includes/get/past_events.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +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 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 %}
41 changes: 39 additions & 2 deletions _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-xl-7 col-lg-8 col-md-8">
<h1 class="title">
{{ page.title }}
</h1>
</div>
</div>
</div>

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

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

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

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

{% if page.endblock %}
<div class="col-12">
{{ page.endblock | markdownify }}
</div>
{% endif %}
</div>
</div>
18 changes: 9 additions & 9 deletions events.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ <h1 class="mb-4">Events</h1>
<div class="col-12 col-md-6 mb-3">
<div class="news news-summary">
<div class="article-content">
{% if event.header_image %}
<a href="{{ event.url | relative_url }}" class="d-block">
<img class="w-100 image-card-cap rounded mb-3" style="aspect-ratio:3.5;" src="{{ event.header_image | relative_url }}">
{% if event.banner %}
<a href="{{ event.path | relative_url }}" class="d-block">
<img class="w-100 image-card-cap rounded mb-3" style="aspect-ratio:3.5;" src="{{ event.banner.path | relative_url }}" alt="{{ event.banner.alt }}">
</a>
{% endif %}
<h2 class="article-title">
Expand All @@ -36,25 +36,25 @@ <h2 class="article-title">
</div>
<div class="row">
<div class="col-12"><h1 class="text-muted mb-4">Past Events</h1></div>
{% include get/past_events.html %}
{% include get/past_events.liquid %}
{% for event in past_events %}
<div class="col-12 col-md-6 mb-3">
<div class="news news-summary">
<div class="article-content">
{% if event.header_image %}
{% if event.banner %}
<a href="{{ event.url | relative_url }}" class="d-block">
<img class="w-100 image-card-cap rounded mb-3" style="aspect-ratio:3.5;" src="{{ event.header_image | relative_url }}">
<img class="w-100 image-card-cap rounded mb-3" style="aspect-ratio:3.5;" src="{{ event.banner.path | relative_url }}" alt="{{ event.banner.alt }}">
</a>
{% endif %}
<h2 class="article-title">
<a href="{{ site.baseurl }}{{ event.url }}">{{ event.title }}</a>
</h2>
<h2 class="article-title">
{% if event.start_date != event.end_date %}
{% assign date = event.start_date | date: "%B %e" %}
{% assign date = event.end_date | date: "-%e, %Y" | prepend: date %}
{% assign date = event.start_date | date: "%B %e" %}
{% assign date = event.end_date | date: "-%e, %Y" | prepend: date %}
{% else %}
{% assign date = event.start_date | date: "%B %e, %Y" %}
{% assign date = event.start_date | date: "%B %e, %Y" %}
{% endif %}
<small class="text-muted">{{ date }}</small>
</h2>
Expand Down
Loading