mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-23 16:08:53 -05:00
updated to latest site index system, added liquid tests for haml (hint, if you indent under a tag block, it breaks). added fix for twitter.js
This commit is contained in:
parent
cc4e51db8b
commit
39052cdb1a
40
source/_includes/blog_index.html
Normal file
40
source/_includes/blog_index.html
Normal file
@ -0,0 +1,40 @@
|
||||
<div class="blog-index">
|
||||
{% assign index = true %}
|
||||
{% for post in paginator.posts %}
|
||||
{% assign content = post.content %}
|
||||
<article>
|
||||
{% include article.html %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
<nav role="pagination">
|
||||
<div>
|
||||
{% if paginator.next_page %}
|
||||
<a class="prev" href="/page{{paginator.next_page}}/">← Older</a>
|
||||
{% endif %}
|
||||
<a href="/blog/archives">Blog Archives</a>
|
||||
{% if paginator.previous_page and paginator.previous_page > 1 %}
|
||||
<a class="next" href="/page{{paginator.previous_page}}/">Newer →</a>
|
||||
{% elsif paginator.previous_page %}
|
||||
<a class="next" href="/">Newer →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
{% if site.disqus_short_name %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus_short_name }}';
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
{% endif %}
|
||||
</div>
|
||||
<aside role=sidebar>
|
||||
{% if site.blog_index_asides.size %}
|
||||
{% include_array blog_index_asides %}
|
||||
{% else %}
|
||||
{% include_array default_asides %}
|
||||
{% endif %}
|
||||
</aside>
|
3
source/blog/index.html
Normal file
3
source/blog/index.html
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
layout: blog_index
|
||||
---
|
@ -1,44 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
footer: false
|
||||
---
|
||||
<div class="blog-index">
|
||||
{% assign index = true %}
|
||||
{% for post in paginator.posts %}
|
||||
{% assign content = post.content %}
|
||||
<article>
|
||||
{% include article.html %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
<nav role="pagination">
|
||||
<div>
|
||||
{% if paginator.next_page %}
|
||||
<a class="prev" href="/page{{paginator.next_page}}/">← Older</a>
|
||||
{% endif %}
|
||||
<a href="/blog/archives">Blog Archives</a>
|
||||
{% if paginator.previous_page and paginator.previous_page > 1 %}
|
||||
<a class="next" href="/page{{paginator.previous_page}}/">Newer →</a>
|
||||
{% elsif paginator.previous_page %}
|
||||
<a class="next" href="/">Newer →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
{% if site.disqus_short_name %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ site.disqus_short_name }}';
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
{% endif %}
|
||||
</div>
|
||||
<aside role=sidebar>
|
||||
{% if site.blog_index_asides.size %}
|
||||
{% include_array blog_index_asides %}
|
||||
{% else %}
|
||||
{% include_array default_asides %}
|
||||
{% endif %}
|
||||
</aside>
|
||||
|
||||
{% include blog_index.html %}
|
||||
|
@ -1,13 +1,15 @@
|
||||
// JSON-P Twitter fetcher for Octopress
|
||||
// (c) Brandon Mathis // MIT Lisence
|
||||
function getTwitterFeed(user, count, replies) {
|
||||
feed = new jXHR();
|
||||
var feed = new jXHR();
|
||||
|
||||
feed.onerror = function (msg,url) {
|
||||
$('#tweets li.loading').addClass('error').text("Twitter's busted");
|
||||
}
|
||||
feed.onreadystatechange = function(data){
|
||||
if (feed.readyState === 4) {
|
||||
var tweets = new Array();
|
||||
var i = 0;
|
||||
for (i in data){
|
||||
if(tweets.length < count){
|
||||
if(replies || data[i].in_reply_to_user_id == null){
|
||||
|
1
source/test/haml/_partial.haml
Normal file
1
source/test/haml/_partial.haml
Normal file
@ -0,0 +1 @@
|
||||
%p will it work? {% img /images/logo.png %}
|
10
source/test/haml/index.haml
Normal file
10
source/test/haml/index.haml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Haml"
|
||||
date: 2011-08-02 11:48
|
||||
comments: true
|
||||
sharing: true
|
||||
footer: true
|
||||
---
|
||||
|
||||
{% render_partial test/haml/_partial.haml %}
|
Loading…
Reference in New Issue
Block a user