Skip to content

Commit

Permalink
working news post
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Oct 5, 2023
1 parent 9104a84 commit 5d67867
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
2 changes: 0 additions & 2 deletions _plugins/jekyll-topic-filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ def self.process_pages(site, pages)
p.data['redirect_from'].uniq!
end

pp materials
p site.data.keys
materials
end

Expand Down
29 changes: 24 additions & 5 deletions news/_posts/2023-10-05-wendi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "New Feature: Embeddable GTN Tutorial Lists and UseGalaxy.* Workflow List Widgets"
title: "New Feature: Embeddable GTN Tutorial Lists and UseGalaxy Workflow List Widgets"
contributions:
authorship: [hexylena]
testing: [nomadscientist]
Expand All @@ -9,25 +9,44 @@ layout: news

We at the GTN strive to bring you the most fun and fancy features we can in a completely static site! Today we're addressing the question of Wendi Bacon who needed a solution for keeping her [single cell](https://singlecell.usegalaxy.eu) subdomain up-to-date with all the latest happenings in the Single Cell world.


## Tutorial List

In order to help her keep her tutorial list updated, we turned every tag on the GTN into an embeddable widget

<iframe src="{{ site.baseurl }}/tags/10x/embed.html" height="300px" width="100%"></iframe>
<iframe src="{{ site.baseurl }}/tags/10x/embed.html" height="300px" width="100%" class="gtn-embed"></iframe>

You can embed a tag by using the url format

```html
{{ site.url }}{{ site.baseurl }}/tags/TAG/embed.html
<iframe src="{{ site.url }}{{ site.baseurl }}/tags/TAG/embed.html"
height="300px" width="100%" class="gtn-embed"></iframe>
```

## UseGalaxy.\* Workflow List

We also made a widget for the UseGalaxy.\* Workflow List so you can embed the latest and greatest workflows with any given tag/name from any of the UseGalaxy.\* servers!

<iframe src="{{ site.baseurl }}/workflows/embed.html?query=circos" height="100%" width="100%" style="height: 300px; width:100%;"></iframe>
<iframe src="{{ site.baseurl }}/workflows/embed.html?query=circos" height="300px" width="100%" class="gtn-embed"></iframe>

You can embed this workflow listing by using the following code, just swap out your search term!

```html
<iframe src="{{ site.url }}{{ site.baseurl }}/workflows/embed.html?query=circos"
height="100%" width="100%" style="height: 300px; width:100%;"></iframe>
height="300px" width="100%" class="gtn-embed"></iframe>
```

## Javascript

Do you not like how you have to scroll those `iframes` above? Well there's a
fix for that! Simply add the javascript snippet below somewhere in the page.

```html
<script>
document.querySelectorAll("iframe.gtn-embed").forEach(e => { e.height = e.contentWindow.document.body.scrollHeight + 60 });
</script>
```

<button class="btn btn-primary" onclick="javascript:document.querySelectorAll('iframe.gtn-embed').forEach(e => { e.height = e.contentWindow.document.body.scrollHeight + 60 });">Click to Try It</button>

If you have any ideas for new features or improvements, please [open an issue on GitHub](https://github.com/galaxyproject/training-material/issues/)

0 comments on commit 5d67867

Please sign in to comment.