forked from pytorch/pytorch.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexplore-apps.html
68 lines (59 loc) · 2.34 KB
/
explore-apps.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
title: PyTorch | Explore Apps
id: apps
permalink: /explore-apps/
layout: default
---
<section class="content wrap">
<div class="container">
<h1>Apps</h1>
<p>PyTorch is a deep learning framework that's <br> fully integrated into Python.</p>
<div class="apps">
<div class="app-row apps-header">
<div class="app-cell img-cell"></div>
<div class="app-cell name-cell">Name</div>
<div class="app-cell desc-cell">Description</div>
<div class="app-cell rating-cell">Rating</div>
<div class="app-cell downloads-cell">Downloads</div>
<div class="app-cell tags-cell">Tags</div>
<div class="app-cell learn-cell"></div>
</div>
{% for app in site.data.apps %}
<div class="app-row">
<div class="app-cell img-cell">
<div style="background-image:url({{ app.image }});"></div>
</div>
<div class="app-cell name-cell"><div>{{ app.name }}</div></div>
<div class="app-cell desc-cell"><div>{{ app.desc }}</div></div>
<div class="app-cell rating-cell" data-rating="{{ app.rating }}">
<div class="stars clearfix"></div>
</div>
<div class="app-cell downloads-cell">
<div>{{ app.downloads }}</div>
</div>
<div class="app-cell tags-cell">
<div>{{ app.tags | array_to_sentence_string }}</div>
</div>
<div class="app-cell learn-cell">
<a class="btn" href="{{ app.url }}">View App</a>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
(function() {
var MAX_STARS = 5;
$('.rating-cell').each(function(i, elem) {
var rating = $(elem).data('rating');
var wrapper = $(elem).find('.stars');
if (rating !== null) {
for (var i=0; i<MAX_STARS; i++) {
wrapper.append('<span class="star ' + (i + 1 <= rating ? ' active' : '') + '">★</span>');
}
}
});
}());
</script>