Skip to content

Commit

Permalink
Merge pull request #2546 from dannon/fix-events
Browse files Browse the repository at this point in the history
Fix upcoming events on homepage.
  • Loading branch information
dannon committed May 14, 2024
2 parents 2d718f4 + eb12c8f commit 8479dfb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
17 changes: 0 additions & 17 deletions content/home/research.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@ research3:
- title: Quality Control
url: "https://training.galaxyproject.org/training-material/topics/sequence-analysis/tutorials/quality-control/tutorial.html"

research4:
title: Upcoming events
url: "/events/"
content: "The Galaxy community puts on a show every year with dozens of events around the world.<div class='mt-2'>Next up:</div>"
button:
title: Visit more
url: "https://galaxyproject.org/events/"
events:
- event: "Hackathon Image Analysis in Galaxy"
date: "Feb 26, 2024"
url: "https://galaxyproject.org/events/2024-02-26-hackathon-image-analysis-in-galaxy/"
- date: "Mar 4, 2024"
event: "Workshop on High-Throughput Data Analysis with Galaxy"
url: "https://galaxyproject.org/events/2024-03-04-galaxy-workshop-freiburg/"
- date: "Mar 5, 2024"
event: "Awareness in Data Management and Analysis for Industry and Research"
url: "https://www.cecam.org/workshop-details/1349"

research5:
title: "Research highlights"
Expand Down
63 changes: 40 additions & 23 deletions src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,36 +267,40 @@
</div>
</div>
<div class="area research events mt-3 h-40">
<a :href="this.$static.datasetResearch.research4.url">
<h3>{{ this.$static.datasetResearch.research4.title }}</h3>
<a href="/events/">
<h3>Upcoming events</h3>
</a>
<div v-html="this.$static.datasetResearch.research4.content" class="text-white mb-2"></div>
<div class="text-white mb-2">
The Galaxy community puts on a show every year with dozens of events around the world.
<div class="mt-2">Next up:</div>
</div>
<table style="padding: 0">
<tbody>
<tr v-for="t in this.$static.datasetResearch.research4.events" :key="t.event">
<tr v-for="event in events" :key="event.id">
<td>
<div>{{ t.date }}</div>
<div>{{ event.date }}</div>
</td>
<td>
<a
:href="t.url"
:href="event.path"
rel="noopener"
target="_blank"
class="text-white text-decoration-none"
>{{ t.event }}</a
>
{{ event.title }}
</a>
</td>
</tr>
</tbody>
</table>
<div class="d-flex justify-content-center">
<a
:href="this.$static.datasetResearch.research4.button.url"
href="/events/"
role="button"
rel="noopener"
target="_blank"
class="btn text-decoration-none mt-3 mb-3 w-50"
>{{ this.$static.datasetResearch.research4.button.title }}</a
>Visit more</a
>
</div>
</div>
Expand Down Expand Up @@ -336,6 +340,11 @@ export default {
prioritizedGalaxyLocales: [],
};
},
computed: {
events() {
return this.$page.events.edges.map((edge) => edge.node);
},
},
methods: {
slugify,
setPrioritizedGalaxyLocales() {
Expand Down Expand Up @@ -380,6 +389,28 @@ query {
url
}
}

events: allParentArticle(
limit: 3, sortBy: "date", order: ASC,
filter: {
category: {eq: "events"}, subsites: {contains: ["global"]}, has_date: {eq: true}, days_ago: {lte: 0},
draft: {ne: true}
}
) {
totalCount
edges {
node {
id
title
tease
external_url
path
date (format: "MMM D")
end (format: "MMM D")
}
}
}

}
</page-query>

Expand Down Expand Up @@ -442,20 +473,6 @@ query {
url
}
},
research4 {
title,
content,
url,
button {
title,
url
},
events {
event,
date,
url
}
},
research5 {
title,
content
Expand Down

0 comments on commit 8479dfb

Please sign in to comment.