Skip to content

Commit

Permalink
Merge pull request #4890 from shiltemann/eventpages
Browse files Browse the repository at this point in the history
Add GTN Event pages
  • Loading branch information
hexylena authored May 23, 2024
2 parents 408fd00 + 67ba7ef commit 3817a21
Show file tree
Hide file tree
Showing 62 changed files with 3,232 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
run: |
bundle exec ruby bin/check-indent.rb
- name: Ensure no unexpected jekyll in output
- name: Ensure no unexpected jekyll in output. If this fails, generally it means you should add a page.description to the front matter.
run: |
! fgrep -R 'site.pages' _site
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GEM
fastimage (2.2.7)
ffi (1.16.2)
forwardable-extended (2.6.0)
google-protobuf (3.24.3-x86_64-darwin)
google-protobuf (3.24.3-x86_64-linux)
highline (2.0.3)
html-proofer (4.4.3)
Expand Down Expand Up @@ -80,6 +81,8 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
namae (1.1.1)
nokogiri (1.16.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
parallel (1.20.1)
Expand All @@ -97,6 +100,8 @@ GEM
rouge (4.1.3)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sass-embedded (1.69.5-x86_64-darwin)
google-protobuf (~> 3.23)
sass-embedded (1.69.5-x86_64-linux-gnu)
google-protobuf (~> 3.23)
strscan (3.1.0)
Expand All @@ -110,6 +115,7 @@ GEM
zeitwerk (2.6.12)

PLATFORMS
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
Expand Down
10 changes: 8 additions & 2 deletions ORGANISATIONS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,14 @@ vib:
url: https://vib.be/
avatar: "/training-material/shared/images/logo-vib.png"
github: false

qiime2:
name: QIIME2
url: https://qiime2.org/
avatar: https://avatars.githubusercontent.com/u/18176583?s=200&v=4
avatar: https://avatars.githubusercontent.com/u/18176583?s=200&v=4

jetstream2:
name: JetStream
url: https://jetstream-cloud.org/
avatar: https://jetstream-cloud.org/images/home/jetstream-2.png
github: false
10 changes: 10 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ abbreviate:
- tutorial_slides
- base_slides

# for event pages, invite link expires after 400 uses :s
slack:
invite: https://join.slack.com/t/gtnsmrgsbord/shared_invite/zt-1vuywk2t2-5FFAfFU1JImaulNGz4DMcw
general_channel: https://gtnsmrgsbord.slack.com/archives/C01MNM98X9V
social_channel: https://gtnsmrgsbord.slack.com/archives/C01EDBVMHBQ


# Icon tag config
icon-tag:
announcement: fas fa-bullhorn
Expand All @@ -106,6 +113,9 @@ icon-tag:
external-link: fas fa-external-link-alt
switch-histories: fas fa-exchange-alt
event: far fa-calendar
event-date: far fa-calendar
event-location: fas fa-location-dot
event-cost: fas fa-tag
feedback: far fa-comments
galaxy-advanced-search: fas fa-angle-double-down
galaxy-show-active: fa fa-map-marker
Expand Down
11 changes: 11 additions & 0 deletions _includes/calendar-buttons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% assign startdate = include.start | default: page.date_start %}
{% assign enddate = include.end | default: page.date_end | default: page.date_start %}
{% assign eventurl = include.url | default: page.url | prepend: site.baseurl | prepend: site.url %}
{% assign eventname = include.name | default: page.title | default: ""%}
{% assign location = include.location | default: page.location | format_location_simple %}

<a href="https://calendar.google.com/calendar/render?action=TEMPLATE&dates={{startdate | date: '%Y%m%d'}}%2F{{enddate | date: '%Y%m%d'}}&details=Event%20Information%20{{eventurl}}&location={{location}}&text={{eventname}}" class="btn btn-info btn-sm" alt="Add to Google Calendar">Google</a>

<a href="https://outlook.live.com/calendar/0/deeplink/compose?body=Event%20Information%20{{eventurl}}&enddt={{enddate | date: '%Y-%m-%d'}}&location={{location}}&path=%2Fcalendar%2Faction%2Fcompose&rru=addevent&startdt={{startdate | date: '%Y-%m-%d'}}&subject={{eventname}}" class="btn btn-info btn-sm">Outlook</a>

<a href="https://outlook.office.com/calendar/0/deeplink/compose/?body=Event%20Information%20{{eventurl}}&enddt={{enddate | date: '%Y-%m-%d'}}&allday=true&location={{location}}&path=%2fcalendar%2faction%2fcompose&rru=addevent&startdt={{startdate | date: '%Y-%m-%d'}}&subject={{eventname}}" class="btn btn-info btn-sm">Office 365</a>
21 changes: 21 additions & 0 deletions _includes/contributor-list2.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,26 @@
{% endif %}


{% if include.contributors.organisers %}
<tr>
<td><abbr title="These were responsible for organisation of this event">Organisers(s)</abbr></td>
<td>
{% for id in include.contributors.organisers %}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id=id %}{% else %}{% assign name = contributors[id].name | default: id -%}{{ name -}}{% endif %}{%- endfor -%}
{%- if include.newcontributors -%}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id='newcontributors' %}{% endif %}{% endif %}
</td>
</tr>
{% endif %}

{% if include.contributors.instructors %}
<tr>
<td><abbr title="These folks either taught at the event or supported its instruction">Instructor(s)</abbr></td>
<td>
{% for id in include.contributors.instructors %}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id=id %}{% else %}{% assign name = contributors[id].name | default: id -%}{{ name -}}{% endif %}{%- endfor -%}
{%- if include.newcontributors -%}{{ include.sep }}{% if include.badge %}{% include _includes/contributor-badge.html id='newcontributors' %}{% endif %}{% endif %}
</td>
</tr>
{% endif %}

{% if include.contributors.translation %}
<tr>
<td><abbr title="These people did the translation and localisation of this text.">Translation</abbr></td>
Expand Down Expand Up @@ -69,5 +89,6 @@
</td>
</tr>
{% endif %}

</table>
{% endif %}
6 changes: 6 additions & 0 deletions _includes/default-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,15 @@
</li>

<li class="nav-item">
{% if page.layout == "event" %}
<a class="nav-link" href="{% link events/index.md %}" title="Events">
{% icon curriculum %} GTN Events
</a>
{% else %}
<a class="nav-link" href="{{ site.baseurl }}/learning-pathways" title="Learning Pathways">
{% icon curriculum %} Learning Pathways
</a>
{% endif %}
</li>

{% include _includes/help.html %}
Expand Down
30 changes: 30 additions & 0 deletions _includes/event-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<table class="eventtable table table-striped">
<thead>
<tr>
<th>Date</th>
<th>Event</th>
<th>Location</th>
<th>Contact</th>
</tr>
</thead>
<tbody>
{% for event in include.events %}
{% unless event.draft and jekyll.environment == "production" %}
<tr>
<td class="eventtable-date"> {{event | collapse_date_pretty }} </td>
<td>

<a class="eventtable-title" href="{% if event.external %}{{event.external}}{% else %}{{site.baseurl}}{{event.url}}{% endif %}">{{event.title}}{% if event.draft %} (draft, will be hidden) {% endif %}</a>
<div class="eventtable-description"> {{event.description}} </div>
</td>
<td> {{event.location | format_location_short }} </td>
<td> {% for org in event.contributions.organisers %}
{% include _includes/contributor-badge-inline.html id=org %}
{% endfor %}
</td>
</tr>
{% endunless %}
{% endfor %}
</tbody>
</table>

32 changes: 20 additions & 12 deletions _includes/funding-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@
<h2 id="funding">{{locale['references']| default: "Funding" }}</h2>
<p>These individuals or organisations provided funding support for the development of this resource</p>

<div class="row">
<div class="d-flex flex-wrap">
{% for id in include.contributions.funding %}
{% assign name = site.data.contributors[id].name | default: id -%}
<div class="col-md-3 col-xs-12">
{% if site.data.contributors[id].avatar %}
<img class="funder-avatar" src="{{ site.data.contributors[id].avatar }}" alt="Logo">
{% else %}
<img class="funder-avatar" src="https://avatars.githubusercontent.com/{{ id }}" alt="Logo">
{% endif %}
<a href="{{ site.baseurl }}/hall-of-fame/{{ id }}/" class="btn btn-secondary">See Funder Profile</a>
</div>
<div class="col-md-9 col-xs-12">
{{ site.data.contributors[id].funding_statement | markdownify }}
</div>
<a href="{{ site.baseurl }}/hall-of-fame/{{ id }}/" class="funder-badge">
{% assign pfo = site.data.funders[id] | default: site.data.organisations[id] | default: site.data.contributors[id] | default: nil %}
<div class="avatar">
{% if pfo.avatar %}
<img class="funder-avatar" src="{{ pfo.avatar }}" alt="Logo">
{% else %}
{% unless pfo.github %}
<img class="funder-avatar" src="https://avatars.githubusercontent.com/{{ id }}" alt="Logo">
{% endunless %}
{% endif %}
</div>

<div class="info">
<div class="name">{{ pfo.short_name | default: pfo.name | default: id }}</div>
<div class="description">
{{ site.data.funders[id].funding_statement | markdownify | strip_html }}
</div>
</div>
</a>
{% endfor %}
</div>
</div>
Expand Down
16 changes: 15 additions & 1 deletion _includes/tutorial_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{% assign page = include.page %}

<table class="table table-responsive table-striped">
<thead>
<tr>
{% if page.layout == 'event' and page.async != true %}
<th scope="col">Time</th>
{% endif %}
<th scope="col">Lesson</th>
<th scope="col" title="Lecture for this training. May include a video version using automated text-to-speech.">Slides</th>
<th scope="col" title="Practical tutorial guiding you through an analysis step by step.">Hands-on</th>
Expand All @@ -16,7 +21,7 @@
{% endif %}
</tr>
</thead>
<tbody class="list">
<tbody class="list tutorials-list">

{% assign subtopic_materials = include.sub[1].materials | default: include.sub %}
{% for material in subtopic_materials %}
Expand All @@ -25,6 +30,14 @@
<!-- show materials that are not in draft mode, unless we are in a dev environment or on a draft page such as a learning pathway or topic -->

<tr>
{% if page.layout == 'event' and page.async != true %}
<td>{{material.time}}</td>
{% endif %}

{% if material.layout == 'custom' %} <!-- e.g. for events -->
<td> {{material.title}} </td>
<td colspan="3"> {{material.description | markdownify }}</td>
{% else %}
<td class="tutorial_title">
{% assign default_resource_url = material | get_default_link %}
{% if default_resource_url %}
Expand Down Expand Up @@ -81,6 +94,7 @@
{% if instances[topic.name].supported %}
<td> {% include _includes/instance-dropdown.html instances=instances topic=topic.name tuto=material.tutorial_name %} </td>
{% endif %}
{% endif %} <!-- not custom session -->
</tr>
{% endif %}
{% endfor %}
Expand Down
18 changes: 9 additions & 9 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
{% endif %}

{{ page | generate_dublin_core: site }}
{%- assign og_desc = page.description | default: page.excerpt | default:topic.summary | default: page.content | default: "Collection of tutorials developed and maintained by the worldwide Galaxy community" -%}
<meta name="description" content="{{ og_desc | strip_html | regex_replace:'[\n\r\s]',' ' | truncate: 1000 }}">
{%- assign og_desc = page.description | default: page.excerpt | default:topic.summary | default: page.content | default: "Collection of tutorials developed and maintained by the worldwide Galaxy community" | strip_html | regex_replace:'[\n\r\s"]',' ' | truncate: 1000 -%}
<meta name="description" content="{{ og_desc }}">
<meta property="og:site_name" content="Galaxy Training Network">
<meta property="og:title" content="{{ og_title | default: page.title }}">
<meta property="og:description" content="{{ og_desc | strip_html | regex_replace:'[\n\r\s]',' ' | truncate: 1000 }}">
<meta property="og:description" content="{{ og_desc }}">

{%- if page.cover %}{% assign coverimage = page.cover %}
{%- elsif page.tags contains "cofest" %}{% assign coverimage = "/assets/images/cofest.png" %}
{%- elsif page.tags contains "galaxy" %}{% assign coverimage = "/assets/images/GalaxyNews.png" %}
{%- elsif page.tags contains "gat" %}{% assign coverimage = "/assets/images/gat.png" %}
{%- else %}{% assign coverimage = "/assets/images/GTNLogo1000.png" %}{% endif %}
{% assign og_image = page.og_image | default: coverimage | default: topic.og_image | default: "/assets/images/GTNLogo1000.png" %}
<meta property="og:image" content="{{ og_image | prepend: site.baseurl }}">
{%- elsif page.tags contains "cofest" %}{% assign coverimage = "assets/images/cofest.png" %}
{%- elsif page.tags contains "galaxy" %}{% assign coverimage = "assets/images/GalaxyNews.png" %}
{%- elsif page.tags contains "gat" %}{% assign coverimage = "assets/images/gat.png" %}
{%- else %}{% assign coverimage = "assets/images/GTNLogo1000.png" %}{% endif %}
{% assign og_image = page.og_image | default: page['cover-image'] | default: topic.og_image | default: coverimage | default: "assets/images/GTNLogo1000.png" %}
<meta property="og:image" content="{% if og_image contains 'https://' %}{{ og_image }}{% else %}{{ site.baseurl }}/{{ og_image }}{% endif %}">

{%- if page.layout == "tutorial_hands_on" -%}
<script type="application/ld+json">
Expand Down
3 changes: 3 additions & 0 deletions _layouts/event-external.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
layout: event
---
Loading

0 comments on commit 3817a21

Please sign in to comment.