forked from kitian616/jekyll-TeXt-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
428 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,6 +182,4 @@ build-iPhoneSimulator/ | |
# jekyll | ||
_site/ | ||
.sass-cache/ | ||
.jekyll-metadata | ||
|
||
/_posts/ | ||
.jekyll-metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
--- | ||
layout: blog-default | ||
titles: | ||
en: Blog | ||
zh: 博客 | ||
zh-Hans: 博客 | ||
zh-Hant: 博客 | ||
--- | ||
<div class="m-home"> | ||
<div class="main"> | ||
<div class="m-post-list"> | ||
{% for post in paginator.posts %} | ||
<article> | ||
{% assign __path = post.url %} | ||
{% include snippets/prepend-baseurl.html %} | ||
{% assign href = __return %} | ||
<h1><a href="{{ href }}">{{ post.title }}</a></h1> | ||
<div class="m-article-content"> | ||
{% if site.excerpt_type == 'html' %} | ||
{{ post.excerpt }} | ||
{% else %} | ||
{{ post.excerpt | strip_html | truncate: 350 }} | ||
{% endif %} | ||
</div> | ||
{% assign __path = post.url %} | ||
{% include snippets/prepend-baseurl.html %} | ||
{% assign __locale = site.data.locale.READMORE %} | ||
{% include snippets/locale-to-string.html %} | ||
<a href="{{ href }}">{{ __return }}</a> | ||
{% include blog/article-data.html %} | ||
</article> | ||
{% endfor %} | ||
</div> | ||
{% if paginator.total_pages > 1 %} | ||
<nav class="m-pagination"> | ||
{% assign __locale = site.data.locale.STATISTICS %} | ||
{% include snippets/locale-to-string.html %} | ||
{% assign post_count = site.posts | size %} | ||
{% assign page_count = paginator.total_pages %} | ||
<p>{{ __return | replace: '[POST_COUNT]', post_count | replace: '[PAGE_COUNT]', page_count }}</p> | ||
<ul class="inline-list"> | ||
{% if paginator.previous_page %} | ||
{% assign __path = paginator.previous_page_path %} | ||
{% include snippets/prepend-baseurl.html %} | ||
{% assign href = __return %} | ||
<li><a class="round-button" href="{{ href }}"> | ||
<div class="icon icon--previous">{% include icon/previous.svg %}</div></a> | ||
</li> | ||
{% else %} | ||
<li><div class="round-button inactive"> | ||
<div class="icon icon--prrevious">{% include icon/previous.svg %}</div></div> | ||
</li> | ||
{% endif %} | ||
{% for page in (1..paginator.total_pages) %} | ||
{% if page == paginator.page %} | ||
<li> | ||
<div class="round-button cur"><span>{{ page }}</span></div> | ||
</li> | ||
{% elsif page == 1 %} | ||
{% if site.paths.home %} | ||
{% assign __path = site.paths.home %} | ||
{% else %} | ||
{% assign __path = '/' %} | ||
{% endif %} | ||
{% include snippets/prepend-baseurl.html %} | ||
{% assign href = __return %} | ||
<li> | ||
<a class="round-button" href="{{ href }}"><span>{{ page }}</span></a> | ||
</li> | ||
{% else %} | ||
{% assign __path = site.paginate_path %} | ||
{% include snippets/prepend-baseurl.html %} | ||
{% assign href = __return %} | ||
<li> | ||
<a class="round-button" href="{{ href | replace: ':num', page }}"><span>{{ page }}</span></a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if paginator.next_page %} | ||
{% assign __path = paginator.next_page_path %} | ||
{% include snippets/prepend-baseurl.html %} | ||
{% assign href = __return %} | ||
<li> | ||
<a class="round-button" href="{{ href }}"> | ||
<div class="icon icon--next">{% include icon/next.svg %}</div> | ||
</a> | ||
</li> | ||
{% else %} | ||
<li><div class="round-button inactive"> | ||
<div class="icon icon--next">{% include icon/next.svg %}</div> | ||
</div></li> | ||
{% endif %} | ||
</ul> | ||
</nav> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% if site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false %} | ||
<<<<<<< HEAD | ||
<script src="https://cdn1.lncld.net/static/js/av-min-1.2.1.js"></script> | ||
<script> | ||
$(function() { | ||
AV.init({ | ||
appId: '{{ site.leancloud.app_id }}', | ||
appKey: '{{ site.leancloud.app_key }}' | ||
}); | ||
$(".article-view").each(function() { | ||
var curId = this.id, | ||
query = new AV.Query('{{ site.leancloud.app_class }}'); | ||
query.equalTo('key', curId.substr(9)); | ||
query.first().then(function(result) { | ||
if (result) { | ||
$('#' + curId).text(result.attributes.views); | ||
} | ||
}, function(error) { | ||
if (error) { | ||
throw error; | ||
} | ||
======= | ||
<script src="https://cdn1.lncld.net/static/js/3.4.1/av-min.js"></script> | ||
<script> | ||
$(function() { | ||
AV.init({ | ||
appId: '{{ site.leancloud.app_id }}', | ||
appKey: '{{ site.leancloud.app_key }}' | ||
}); | ||
$(".article-view").each(function() { | ||
var curId = this.id; | ||
var query = new AV.Query('{{ site.leancloud.app_class }}'); | ||
query.equalTo('key', curId.substr(9)); | ||
query.first().then(function(result) { | ||
if (result) { | ||
$('#' + curId).text(result.attributes.views); | ||
} | ||
}, function(error) { | ||
if (error) { | ||
throw error; | ||
} | ||
}); | ||
}); | ||
>>>>>>> 6641e6bb1bd5093d0c71e190e49ef9fec4e1dd93 | ||
}); | ||
}); | ||
}); | ||
</script> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.