-
Notifications
You must be signed in to change notification settings - Fork 71
/
index.html
80 lines (60 loc) · 1.91 KB
/
index.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
69
70
71
72
73
---
layout: layout
title: Rcpp Gallery
summary: Articles and code that illustrate the use of the Rcpp package
---
<div class="page-header">
<h1>Rcpp Gallery<small> Articles and code examples for the <a href="https://www.rcpp.org">Rcpp</a> package</small></h1>
<div style="margin-top: 1.5em; margin-bottom: -1em;" >
<gcse:searchbox newWindow="false">
</gcse:searchbox>
</div>
<gcse:searchresults linktarget="_parent"></gcse:searchresults>
{% for tag in site.tags %}
{% capture tag_name %}{{ tag | first }}{% endcapture %}
{% if tag_name != 'featured' %}
<a class="__{{ tag[0] }}"
style="margin: 5px; text-decoration: none;"
href="tags/{{ tag_name }}/">
{{ tag_name }}
</a>
{% endif %}
{% endfor %}
</div>
<!-- Tag cloud -->
<script type="text/javascript">
$(function() {
var minFont = 1.2,
maxFont = 2.4,
diffFont = maxFont - minFont,
size = 0;
{% assign max = 1.0 %}
{% for tag in site.tags %}
{% if tag[1].size > max %}
{% assign max = tag[1].size %}
{% endif %}
{% endfor %}
{% for tag in site.tags %}
size = (Math.log({{ tag[1].size }}) / Math.log({{ max }}))
* diffFont + minFont;
$(".__{{ tag[0] }}").css("font-size", size + "em");
{% endfor %}
});
</script>
<h3>Featured Articles</h3>
<ul class="unstyled">
{% for post in site.tags.featured limit:20 %}
{% include post_item.html %}
{% endfor %}
{% if site.tags.featured.size > 20 %}
<li><a href="tags/featured/">More »</a></li>
{% endif %}
</ul>
<h3>Published Articles</h3>
<ul class="unstyled">
{% for post in site.posts limit:150 %}
<li>
<span class="muted">{{ post.date | date: "%b %e, %Y" }}</span> » <a href="{{ post.url }}">{{ post.title }}</a> <span class="muted">— {{ post.author }}</span>
</li>
{% endfor %}
</ul>