forked from greenelab/lab-website-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85069f9
commit 5f9c102
Showing
40 changed files
with
607 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Update research page | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "_data/research-input.yml" | ||
|
||
jobs: | ||
update_research: | ||
name: Update Manubot-generated citations on research page | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install Manubot | ||
run: pip install --upgrade manubot | ||
- name: Build updated research output file | ||
run: python _data/build-research.py | ||
- name: Commit new research output file | ||
uses: EndBug/add-and-commit@v4 | ||
with: | ||
add: "_data/research-output.yml" | ||
message: "update Manubot-generated citations on research page" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{%- assign byyear = site.posts | sort: "date" | reverse | group_by_exp: "post", "post.date | date: '%Y'" | sort: "name" | reverse -%} | ||
|
||
{%- for yeargroup in byyear -%} | ||
|
||
<hr /> | ||
|
||
<h3>{{ yeargroup.name }}</h3> | ||
|
||
{%- for post in yeargroup.items -%} | ||
|
||
<p> | ||
<a href="{{ post.url | relative_url }}">{{ post.title }}</a> | ||
</p> | ||
|
||
{%- include post-info.html post=post -%} | ||
|
||
{%- include tags.html tags=post.tags -%} | ||
|
||
{%- if forloop.index <= 3 -%} | ||
{{ post.content | strip_html | truncate: 500 }} | ||
<p class="center"> | ||
<a href="{{ post.url | relative_url }}">Read more →</a> | ||
</p> | ||
{%- else -%} | ||
{{ post.content | strip_html | truncate: 200 }} | ||
{%- endif -%} | ||
|
||
{%- if forloop.index < forloop.length -%} | ||
{%- endif -%} | ||
|
||
{%- endfor -%} | ||
|
||
{%- endfor -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="card_search"> | ||
<div class="card_search_box"> | ||
<input data-search-box /> | ||
<i class="fas fa-search"></i> | ||
</div> | ||
<div class="card_search_info"> | ||
Showing <span data-search-info>all</span> {{ include.subject }} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
{% comment %} | ||
{%- comment -%} | ||
Script to modify main content of page: | ||
- wrap each level 1 or 2 heading and its succeeding content in sections | ||
- wrap each table in div to allow for scrolling | ||
{% endcomment %} | ||
{%- endcomment -%} | ||
|
||
{% assign content = include.content %} | ||
{%- assign content = include.content -%} | ||
|
||
{% capture newContent %} | ||
{%- capture newContent -%} | ||
<section> | ||
{%- assign content = content | split: "<section" | join: "</section><section" -%} | ||
{%- assign content = content | split: "<h1" | join: "</section><section><h1" -%} | ||
{%- assign content = content | split: "<h2" | join: "</section><section><h2" -%} | ||
{{- content -}} | ||
</section> | ||
{% endcapture %} | ||
{%- endcapture -%} | ||
|
||
{% assign newContent = newContent | replace: "<section></section>", "" %} | ||
{% assign newContent = newContent | replace: "<section>", "<section><div class='section'>" %} | ||
{% assign newContent = newContent | replace: "</section>", "</div></section>" %} | ||
{%- assign newContent = newContent | replace: "<section></section>", "" -%} | ||
{%- assign newContent = newContent | replace: "<section>", "<section><div class='section'>" -%} | ||
{%- assign newContent = newContent | replace: "</section>", "</div></section>" -%} | ||
|
||
{% assign newContent = newContent | replace: "<table>", "<div class='table_wrapper'><table>" %} | ||
{% assign newContent = newContent | replace: "</table>", "</table></div>" %} | ||
{%- assign newContent = newContent | replace: "<table>", "<div class='table_wrapper'><table>" -%} | ||
{%- assign newContent = newContent | replace: "</table>", "</table></div>" -%} | ||
|
||
{{ newContent }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<footer> | ||
<div class="footer_row"> | ||
{% include social-link.html type="contact" large=true %} | ||
{% include social-link.html type="github" large=true %} | ||
{% include social-link.html type="twitter" large=true %} | ||
{% include social-link.html type="instagram" large=true %} | ||
{% comment %} | ||
{% include social-link.html type="rss" large=true %} | ||
{% endcomment %} | ||
{%- include social-link.html type="contact" large=true -%} | ||
{%- include social-link.html type="github" large=true -%} | ||
{%- include social-link.html type="twitter" large=true -%} | ||
{%- include social-link.html type="instagram" large=true -%} | ||
{%- comment -%} | ||
{%- include social-link.html type="rss" large=true -%} | ||
{%- endcomment -%} | ||
</div> | ||
<!-- © <script>document.write(new Date().getFullYear())</script> {{ site.title }} --> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
{% assign max = 0 %} | ||
{% for i in (1..100) %} | ||
{%- assign max = 0 -%} | ||
|
||
{%- for i in (1..100) -%} | ||
{% assign image = "image" | append: i %} | ||
{% assign image = include[image] %} | ||
{% if image %} | ||
{% assign max = i %} | ||
{% endif %} | ||
{% endfor %} | ||
{%- endfor -%} | ||
|
||
<div | ||
class="gallery" | ||
data-fit="{{ include.fit | default: true }}" | ||
data-flat="{{ include.flat | default: false }}" | ||
data-number="{{ max }}" | ||
> | ||
{% for i in (1..100) %} | ||
{% assign image = "image" | append: i %} | ||
{% assign image = include[image] %} | ||
{% assign tooltip = "tooltip" | append: i %} | ||
{% assign tooltip = include[tooltip] %} | ||
{% assign link = "link" | append: i %} | ||
{% assign link = include[link] %} | ||
{% if image %} | ||
{%- for i in (1..100) -%} | ||
|
||
{%- assign image = "image" | append: i -%} | ||
{%- assign image = include[image] -%} | ||
{%- assign tooltip = "tooltip" | append: i -%} | ||
{%- assign tooltip = include[tooltip] -%} | ||
{%- assign link = "link" | append: i -%} | ||
{%- assign link = include[link] -%} | ||
|
||
{%- if image -%} | ||
<a | ||
{% if link %}href="{{ link | relative_url }}"{% endif %} | ||
class="gallery_item" | ||
data-tooltip="{{ tooltip }}" | ||
> | ||
<img src="{{ image | relative_url }}"> | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
{%- endif -%} | ||
|
||
{%- endfor -%} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.