Skip to content

Commit f02a1ac

Browse files
committed
Update buttons in project pages
- Use same syntax as /publication - Update shiny app links to apps.gerkelab.com - Add Docker hub links
1 parent fd95538 commit f02a1ac

File tree

6 files changed

+71
-19
lines changed

6 files changed

+71
-19
lines changed

archetypes/project.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ toc: false
1010
callout: |
1111
**ProjectName** is a thing that does things well.
1212
13-
github_url: "#"
14-
app_url: "#"
13+
header_buttons:
14+
- text: "Run Demo App"
15+
url: "#"
16+
icon: "fas fa-rocket"
17+
class: "primary"
18+
- text: "View Source on GitHub"
19+
url: "#"
20+
icon: "fab fa-github"
21+
class: "secondary"
1522
---
1623

1724
```{r setup, include=FALSE}

content/project/2018-01-05-epitad.Rmd

+13-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,19 @@ weight: 30
1313
toc: FALSE
1414
callout: |
1515
Visualize Hi-C data alongside annotation relevant to genetic epidemiology studies
16-
github_url: 'https://github.com/tgerke/epiTAD'
17-
app_url: 'https://apps.gerkelab.com/epiTAD'
16+
header_buttons:
17+
- text: "Run Demo App"
18+
url: 'https://apps.gerkelab.com/epiTAD'
19+
icon: "fas fa-rocket"
20+
class: "primary"
21+
- text: "View Source on GitHub"
22+
url: 'https://github.com/tgerke/epiTAD'
23+
icon: "fab fa-github"
24+
class: "secondary"
25+
- text: "Docker Hub"
26+
url: "https://hub.docker.com/r/gerkelab/epitad"
27+
icon: "fab fa-docker"
28+
class: "info"
1829
---
1930

2031
```{r setup, include=FALSE}

content/project/2018-01-05-epitad.html

+13-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,19 @@
1313
toc: FALSE
1414
callout: |
1515
Visualize Hi-C data alongside annotation relevant to genetic epidemiology studies
16-
github_url: 'https://github.com/tgerke/epiTAD'
17-
app_url: 'https://apps.gerkelab.com/epiTAD'
16+
header_buttons:
17+
- text: "Run Demo App"
18+
url: 'https://apps.gerkelab.com/epiTAD'
19+
icon: "fas fa-rocket"
20+
class: "primary"
21+
- text: "View Source on GitHub"
22+
url: 'https://github.com/tgerke/epiTAD'
23+
icon: "fab fa-github"
24+
class: "secondary"
25+
- text: "Docker Hub"
26+
url: "https://hub.docker.com/r/gerkelab/epitad"
27+
icon: "fab fa-docker"
28+
class: "info"
1829
---
1930

2031

content/project/shinydag.Rmd

+13-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@ callout: |
1212
structures and identify appropriate adjustment sets for estimating causal
1313
effects.
1414
15-
github_url: "https://github.com/GerkeLab/ShinyDAG"
16-
app_url: "https://gerkelab.shinyapps.io/shinyDAG/"
15+
header_buttons:
16+
- text: "Run Demo App"
17+
url: "https://apps.gerkelab.com/shinyDAG/"
18+
icon: "fas fa-rocket"
19+
class: "primary"
20+
- text: "View Source on GitHub"
21+
url: "https://github.com/GerkeLab/ShinyDAG"
22+
icon: "fab fa-github"
23+
class: "secondary"
24+
- text: "Docker Hub"
25+
url: "https://hub.docker.com/r/gerkelab/shinydagd"
26+
icon: "fab fa-docker"
27+
class: "info"
1728
---
1829

1930
```{r setup, include=FALSE}

content/project/shinydag.html

+17-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,19 @@
1212
structures and identify appropriate adjustment sets for estimating causal
1313
effects.
1414

15-
github_url: "https://github.com/GerkeLab/ShinyDAG"
16-
app_url: "https://gerkelab.shinyapps.io/shinyDAG/"
15+
header_buttons:
16+
- text: "Run Demo App"
17+
url: "https://apps.gerkelab.com/shinyDAG/"
18+
icon: "fas fa-rocket"
19+
class: "primary"
20+
- text: "View Source on GitHub"
21+
url: "https://github.com/GerkeLab/ShinyDAG"
22+
icon: "fab fa-github"
23+
class: "secondary"
24+
- text: "Docker Hub"
25+
url: "https://hub.docker.com/r/gerkelab/shinydagd"
26+
icon: "fab fa-docker"
27+
class: "info"
1728
---
1829

1930

@@ -76,13 +87,13 @@ <h2>Citing shinyDAG</h2>
7687
<h2>References</h2>
7788
<ol style="list-style-type: decimal">
7889
<li>Richard Iannone (NA). DiagrammeR: Graph/Network Visualization. R package version 1.0.0.
79-
<a href="https://github.com/rich-iannone/DiagrammeR" class="uri">https://github.com/rich-iannone/DiagrammeR</a>.</li>
90+
<a href="https://github.com/rich-iannone/DiagrammeR">https://github.com/rich-iannone/DiagrammeR</a>.</li>
8091
<li>Johannes Textor and Benito van der Zander (2016). dagitty: Graphical Analysis of Structural Causal
81-
Models. R package version 0.2-2. <a href="https://CRAN.R-project.org/package=dagitty" class="uri">https://CRAN.R-project.org/package=dagitty</a>.</li>
92+
Models. R package version 0.2-2. <a href="https://CRAN.R-project.org/package=dagitty">https://CRAN.R-project.org/package=dagitty</a>.</li>
8293
<li>Malcolm Barrett (2018). ggdag: Analyze and Create Elegant Directed Acyclic Graphs. R package
83-
version 0.1.0. <a href="https://CRAN.R-project.org/package=ggdag" class="uri">https://CRAN.R-project.org/package=ggdag</a>.</li>
94+
version 0.1.0. <a href="https://CRAN.R-project.org/package=ggdag">https://CRAN.R-project.org/package=ggdag</a>.</li>
8495
<li>Csardi G, Nepusz T: The igraph software package for complex network research, InterJournal,
85-
Complex Systems 1695. 2006. <a href="http://igraph.org" class="uri">http://igraph.org</a>.</li>
96+
Complex Systems 1695. 2006. <a href="http://igraph.org">http://igraph.org</a>.</li>
8697
<li>Hernan MA, Hernandez-Díaz S, Robins JM. A structural approach to selection bias. Epidemiology 2004;15:615-625.</li>
8798
</ol>
8899
</div>

layouts/project/single.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ <h1> {{ .Title}} </h1>
99
{{ .Params.callout | markdownify }}
1010
</p>
1111
{{ end }}
12-
{{ if or (isset .Params "app_url") (isset .Params "github_url") }}
12+
{{ if isset .Params "header_buttons" }}
1313
<p>
14-
{{ if .Params.app_url }}
15-
<a href="{{.Params.app_url}}"><button class="button primary"><i class="fas fa-rocket"></i> Run Demo App</button></a>
16-
{{ end }}{{ if .Params.github_url }}
17-
<a href="{{.Params.github_url}}"><button class="button secondary"><i class="fab fa-github"></i> View Source on GitHub</button></a>
14+
{{ range .Params.header_buttons }}
15+
<a href="{{.url}}">
16+
<button class="button {{ .class }}">
17+
{{ if .icon }}<i class="{{ .icon }}"></i> {{ end }}{{ .text }}</button>
18+
</a>
1819
{{ end }}
1920
</p>
2021
{{ end }}

0 commit comments

Comments
 (0)