Skip to content

Commit

Permalink
Adjusted try and try example to new layout
Browse files Browse the repository at this point in the history
  • Loading branch information
sebasguts committed Aug 8, 2018
1 parent 42918f4 commit e347437
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 108 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ menu:
- title: 'Blog'
link: '/tag/blogpost'
- title: 'Try'
folder: 'try'
slug: 'try'
19 changes: 19 additions & 0 deletions _data/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- title: Example notebooks from OpenDreamKit
author: Sebastian Gutsche
repository: oscar-system/OSCARBinder
filename: Singular
thumbnail: singular.png

- layout: tryexample
title: Example notebooks from OpenDreamKit
author: Sebastian Gutsche
notebook_url: https://nbviewer.jupyter.org/github/oscar-system/OSCARBinder/blob/master/Singular.ipynb
binderrepo_url: https://mybinder.org/v2/gh/oscar-system/OSCARBinder/master?filepath=Singular.ipynb
thumbnail: singular.png

- layout: tryexample
title: Example notebooks from OpenDreamKit
author: Sebastian Gutsche
repository: oscar-system/OSCARBinder
filename: Singular
thumbnail: singular.png
11 changes: 11 additions & 0 deletions _data/try.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: SageMath
binder_url: http://mybinder.org
thumbnail: /try/thumbnails/sage.png

- name: SageMath
binder_url: http://mybinder.org
thumbnail: /try/thumbnails/sage.png

- name: SageMath
binder_url: http://mybinder.org
thumbnail: /try/thumbnails/sage.png
54 changes: 0 additions & 54 deletions _layouts/tryexample.html

This file was deleted.

19 changes: 19 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1187,3 +1187,22 @@ table th[class*="col-"] {
display: block;
}
}

.static_try_block {
width: 30%;
border-radius: 15px;
border: 2px solid #5D7CF9;
float: left;
margin-right: 2%;
margin-bottom: 2%;
margin-top: 2%;
padding: 2%;
align-content: center;
text-align: center;
}

.static_try_block_image {
text-align: center;
width: 200px;
height: 200px;
}
8 changes: 0 additions & 8 deletions try/_posts/2018-06-11-Test.md

This file was deleted.

8 changes: 0 additions & 8 deletions try/_posts/2018-06-11-Test1.md

This file was deleted.

8 changes: 0 additions & 8 deletions try/_posts/2018-06-11-Test2.md

This file was deleted.

25 changes: 12 additions & 13 deletions try/examples.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
layout: page
title: Example notebooks from OpenDreamKit
menu_title: Examples
menu_order: 2
layout: page
menu: try
menu_title: Examples
redirect_from: "/try/examples"
---

<span>Click on one of the examples below to open the example <a href="http://jupyter.org">Jupyter</a> notebook statically.
Expand All @@ -12,9 +14,13 @@
<!-- Setup a basic two-column box setting, static this time :) -->

<div id="example_gallery">
{% for post in site.categories.try %}
{% for post in site.data.examples %}
<div class="static_try_block">
<a href="{{ post.url }}">
{% if post.binderrepo_url != null %}
<a href="{{ post.binderrepo_url }}">
{% else %}
<a href="https://mybinder.org/v2/gh/{{ post.repository }}/master?filepath={{ post.filename }}.ipynb">
{% endif %}

{% if post.thumbnail_url != null %}
<img class="static_try_block_image" src="{{ post.thumbnail_url }}"/>
Expand All @@ -24,16 +30,9 @@

<div>{{ post.title }}</div>
<div>{{ post.author }}</div>
<img src="https://mybinder.org/badge.svg" alt="Run on Binder"/>
</a>
{% if post.binderrepo_url != null %}
<a href="{{ post. binderrepo_url }}">
<img src="https://mybinder.org/badge.svg" alt="Run on Binder"/>
</a>
{% else %}
<a href="https://mybinder.org/v2/gh/{{ post.repository }}/master?filepath={{ post.filename }}.ipynb">
<img src="https://mybinder.org/badge.svg" alt="Run on Binder"/>
</a>
{% endif %}

</div>
{% endfor %}
</div>
Expand Down
26 changes: 10 additions & 16 deletions try/try.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: page
title: Try our software
menu_title: Try
menu_order: 1
layout: page
menu: try
menu_title: Try
redirect_from: "/try/"
---

Expand All @@ -11,22 +12,15 @@

<!-- Setup a basic two-column box setting, static this time :) -->

<div>
<div class="static_try_block">
<img class="static_try_block_image" src="{{ site.baseurl }}/try/thumbnails/sage.png"/>
<br/>
<span><h2><a href="http://mybinder.org">Try SageMath</a></h2></span>
</div>
{% for try in site.data.try %}

<div>
<div class="static_try_block">
<img class="static_try_block_image" src="{{ site.baseurl }}/try/thumbnails/sage.png"/>
<a href="{{ try.binder_url }}">
<img class="static_try_block_image" src="{{ site.baseurl }}{{ try.thumbnail }}"/>
<br/>
<span><h2><a href="http://mybinder.org">Try SageMath</a></h2></span>
<span><h2>Try {{ try.name }}</h2></span>
</a>
</div>

<div class="static_try_block">
<img class="static_try_block_image" src="{{ site.baseurl }}/try/thumbnails/sage.png"/>
<br/>
<span><h2><a href="http://mybinder.org">Try SageMath</a></h2></span>
</div>
</div>
{% endfor %}

0 comments on commit e347437

Please sign in to comment.