aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates/includes
diff options
context:
space:
mode:
authorJan Müller <jpmueller@gmx.net>2013-11-23 22:06:59 +0100
committerJan Müller <jpmueller@gmx.net>2013-11-23 22:06:59 +0100
commit18024acc4c3008e294d4301c39e20ca7c4f28919 (patch)
tree45736f21ad8ce50a4733635cab50e4d30c6ad735 /pelican-bootstrap3/templates/includes
parent7ef242b7580306f953756a7ea3d2632c70ef30b8 (diff)
downloadpelican-themes-18024acc4c3008e294d4301c39e20ca7c4f28919.tar.gz
github activity: allow sorting by an arbitrary attribute (GITHUB_SORT_ATTRIBUTE) and ascending/descending (GITHUB_SORT_DESCENDING)
Diffstat (limited to 'pelican-bootstrap3/templates/includes')
-rw-r--r--pelican-bootstrap3/templates/includes/github.html16
1 files changed, 15 insertions, 1 deletions
diff --git a/pelican-bootstrap3/templates/includes/github.html b/pelican-bootstrap3/templates/includes/github.html
index 1d1e7f2..f8542c5 100644
--- a/pelican-bootstrap3/templates/includes/github.html
+++ b/pelican-bootstrap3/templates/includes/github.html
@@ -12,6 +12,18 @@
{% set GITHUB_SKIP_FORK = "false" %}
{% endif %}
{% endif %}
+ {% if GITHUB_SORT_ATTRIBUTE is not defined %}
+ {% set GITHUB_SORT_ATTRIBUTE = "pushed_at" %}
+ {% endif %}
+ {% if GITHUB_SORT_DESCENDING is not defined %}
+ {% set GITHUB_SORT_DESCENDING = "true" %}
+ {% else %}
+ {% if GITHUB_SORT_DESCENDING %}
+ {% set GITHUB_SORT_DESCENDING = "true" %}
+ {% else %}
+ {% set GITHUB_SORT_DESCENDING = "false" %}
+ {% endif %}
+ {% endif %}
<section>
<ul class="list-group list-group-flush">
@@ -37,7 +49,9 @@
user: '{{ GITHUB_USER }}',
count: {{ GITHUB_REPO_COUNT }},
skip_forks: {{ GITHUB_SKIP_FORK }},
- target: '#gh_repos'
+ target: '#gh_repos',
+ sort_attribute: '{{ GITHUB_SORT_ATTRIBUTE }}',
+ sort_descending: {{ GITHUB_SORT_DESCENDING }}
});
});
</script>