Skip to content

Commit

Permalink
adds github badges
Browse files Browse the repository at this point in the history
  • Loading branch information
billbrod committed Nov 4, 2024
1 parent 56148b4 commit 63a6138
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion create_workshop_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
for workshop in glob('workshops/*'):
md_file = {}
md_file['base_url'] = workshop
with open(op.join(workshop, '.gh_path')) as f:
md_file['gh_repo'] = 'https://github.com/' + f.read().strip()
md_file['name'] = op.split(workshop)[-1].replace('-', ' ')
branches = glob(op.join(workshop, 'branch', '*'))
md_file['branches'] = []
md_file['main_url'] = ''
for branch in branches:
print(branch)
if 'main' in branch:
md_file['main_url'] = op.join(workshop, 'branch', 'main')
else:
Expand Down
3 changes: 3 additions & 0 deletions site/_includes/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ <h3>
{%- else -%}
{{ card.name }}
{%- endif -%}
<a href="{{ card.gh_repo }}">
<img alt="GitHub Repo" src="https://img.shields.io/badge/GitHub-gray?logo=github">
</a>
</h3>
{%- if card.releases.size > 0 or card.pulls.size > 0 or card.branches.size > 0 -%}
<hr>
Expand Down
5 changes: 4 additions & 1 deletion site/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,12 @@ footer img {
.grid.cards ul > li > h3 {
display: flex;
align-items: center;
justify-content: center;
justify-content: space-evenly;
text-align: center;
}
.grid.cards ul > li > h3 > a {
display: flex;
}

/* Add spacing between the icon and the title */
.grid.cards ul > li > p:first-of-type img {
Expand Down
1 change: 1 addition & 0 deletions site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: plenoptic
---

# plenoptic workshops
[![Github Repo](https://img.shields.io/badge/GitHub-gray?logo=github)](https://github.com/plenoptic-org/plenoptic-workshops)

This site has links to tutorials and examples used during in-person workshops for teaching how to use plenoptic, a python library for model-based synthesis of perceptual stimuli. Unless otherwise noted, these materials are independent of each other, and are intended as an introduction to the package.

Expand Down

0 comments on commit 63a6138

Please sign in to comment.