-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
127 lines (123 loc) · 4.96 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
layout: default
class: home
css: ['pages/index.css']
comments: false
---
<!-- redir /?p=123 url -->
<script language='javascript'>
var posts_map = {};
{% for page in site.posts %}{% if page.wordpress_postid %}posts_map[{{ page.wordpress_postid }}] = '{{ page.url }}';
{% endif %}{% endfor %}
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var id = getParameterByName('p');
var url = posts_map[id];
if (url) {
window.location.replace(url);
}
</script>
<section class="banner">
<div class="collection-head">
<div class="container">
<div class="collection-title">
<h1 class="collection-header" id="sub-title"><span>{{ site.subtitle }}</span></h1>
<div class="collection-info">
<span class="meta-info mobile-hidden">
<span class="octicon octicon-location"></span>
{{ site.location }}
</span>
<span class="meta-info">
<span class="octicon octicon-organization"></span>
<a href="{{ site.organization_url }}" target="_blank">{{ site.organization }}</a>
</span>
<span class="meta-info">
<span class="octicon octicon-mark-github"></span>
<a href="https://github.com/{{ site.github_username }}" target="_blank">{{ site.github_username }}</a>
</span>
</div>
</div>
</div>
</div>
</section>
<!-- /.banner -->
<section class="container content">
<div class="columns">
<div class="column two-thirds" >
<ol class="repo-list">
{% for post in paginator.posts %}
<li class="repo-list-item">
<h1 class="repo-list-name">
<a href="{{ post.url }}">{{ post.title }}</a>
</h1>
<div class="share">
{% include sns-share.html url=post.url %}
</div>
<p class="repo-list-description">
{{ post.excerpt }}
</p>
<p class="repo-list-meta">
<span class="meta-info">
<span class="octicon octicon-calendar"></span> {{ post.date | date: "%Y/%m/%d" }}
</span>
{% for cat in post.categories %}
<span class="meta-info">
<span class="octicon octicon-file-directory"></span>
<a href="/categories/#{{ cat }}" title="{{ cat }}">{{ cat }}</a>
</span>
{% endfor %}
{% for tag in post.tags %}
<span class="meta-info">
<span class="octicon octicon-tag"></span>
<a href="/tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a>
</span>
{% endfor %}
</p>
</li>
{% endfor %}
</ol>
</div>
<div class="column one-third">
{% include sidebar-search.html %}
{% include sidebar-mvp.html %}
{% include sidebar-facebook.html %}
{% include sidebar-ads.html %}
</div>
</div>
<div class="pagination text-align">
<div class="btn-group">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="/" class="btn btn-outline">«</a>
{% else %}
<a href="/page{{paginator.previous_page}}" class="btn btn-outline">«</a>
{% endif %}
{% else %}
<button disabled="disabled" href="javascript:;" class="btn btn-outline">«</button>
{% endif %}
{% if paginator.page == 1 %}
<a href="javascript:;" class="active btn btn-outline">1</a>
{% else %}
<a href="/" class="btn btn-outline">1</a>
{% endif %}
{% for count in (2..paginator.total_pages) %}
{% if count == paginator.page %}
<a href="javascript:;" class="active btn btn-outline">{{count}}</a>
{% else %}
<a href="/page{{count}}" class="btn btn-outline">{{count}}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="/page{{paginator.next_page}}" class="btn btn-outline">»</a>
{% else %}
<button disabled="disabled" href="javascript:;" class="btn btn-outline">»</button>
{% endif %}
</div>
</div>
<!-- /pagination -->
</section>
<!-- /section.content -->