Skip to content

Commit 04bb653

Browse files
author
Brandon Green
committed
Add conditional for button text
This commit adds the ability to change the button text per model
1 parent 94710c6 commit 04bb653

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

_layouts/hub_detail.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ <h1>
3030
<a href="{{ page.github-link }}"><button class="btn btn-lg with-right-white-arrow detail-github-link">View on Github</button></a>
3131
<a href="https://colab.research.google.com/github/pytorch/pytorch.github.io/blob/master/{{ page.path | replace: "_hub", "assets/hub" | replace: ".md", ".ipynb" }}"><button class="btn btn-lg with-right-white-arrow detail-colab-link">Open on Google Colab</button></a>
3232
{% if page.demo-model == true %}
33-
<a href="{{ page.demo-model-link }}"><button class="btn btn-lg with-right-white-arrow detail-web-demo-link">Demo Model Output</button></a>
33+
{% if page.demo-model-button-text == blank or page.demo-model-button-text == nil %}
34+
<a href="{{ page.demo-model-link }}"><button class="btn btn-lg with-right-white-arrow detail-web-demo-link">Demo Model Output</button></a>
35+
{% else %}
36+
<a href="{{ page.demo-model-link }}"><button class="btn btn-lg with-right-white-arrow detail-web-demo-link">{{ page.demo-model-button-text }}</button></a>
37+
{% endif %}
3438
{% endif %}
3539
</div>
3640
</div>

0 commit comments

Comments
 (0)