File tree 5 files changed +63
-21
lines changed 5 files changed +63
-21
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ markdown: redcarpet
16
16
react_version : 0.4.1
17
17
description : A JavaScript library for building user interfaces
18
18
relative_permalinks : true
19
+ paginate : 5
20
+ paginate_path : /blog/page:num
19
21
nav_docs_sections :
20
22
- title : Quick Start
21
23
items :
Original file line number Diff line number Diff line change @@ -248,6 +248,12 @@ li {
248
248
249
249
}
250
250
251
+ .nav-blog {
252
+ li {
253
+ margin-bottom : 5px ;
254
+ }
255
+ }
256
+
251
257
// Home Page specifics
252
258
253
259
.home-section {
@@ -285,14 +291,14 @@ li {
285
291
margin-right : 0 ;
286
292
}
287
293
288
- #examples {
289
- h3 {
290
- color : $darkColor ;
291
- font-size : 24px ;
292
- font-weight : normal ;
293
- margin-bottom : 5px ;
294
- }
294
+ #examples h3 , .home-presentation h3 {
295
+ color : $darkColor ;
296
+ font-size : 24px ;
297
+ font-weight : normal ;
298
+ margin-bottom : 5px ;
299
+ }
295
300
301
+ #examples {
296
302
p {
297
303
margin : 0 0 25px 0 ;
298
304
max-width : $twoColumnWidth ;
@@ -685,3 +691,15 @@ p code {
685
691
.post {
686
692
margin-bottom : 30px ;
687
693
}
694
+
695
+ .pagination {
696
+ margin-bottom : 30px ;
697
+
698
+ /* Trick to get the wrapper to expand to fit floating elements */
699
+ width : 100% ;
700
+ overflow : hidden ;
701
+
702
+ .next {
703
+ float : right ;
704
+ }
705
+ }
Original file line number Diff line number Diff line change 1
- < div class ="nav-docs ">
1
+ < div class ="nav-docs nav-blog ">
2
2
< div class ="nav-docs-section ">
3
3
< h3 > Recent posts</ h3 >
4
4
< ul >
5
- {% for post in site.posts %}
6
- < li > < a href ="/react{{ post.url }} "{% if page.title == post.title %} class ="active "{% endif %} > {{ post.title }}</ a > </ li >
7
- {% endfor %}
5
+ {% for post in site.posts limit:10 %}
6
+ < li > < a href ="/react{{ post.url }} "{% if page.title == post.title %} class ="active "{% endif %} > {{ post.title }}</ a > </ li >
7
+ {% endfor %}
8
+ < li > < a href ="/react/blog/all.html "> All posts ...</ a > </ li >
8
9
</ ul >
9
10
</ div >
10
11
</ div >
Original file line number Diff line number Diff line change
1
+ ---
2
+ title: Blog
3
+ layout: default
4
+ sectionid: blog
5
+ id: all-posts
6
+ ---
7
+
8
+ < section class ="content wrap documentationContent nosidebar ">
9
+ < div class ="inner-content ">
10
+ < h1 > All Posts</ h1 >
11
+ {% for page in site.posts %}
12
+ < p > < strong > < a href ="/react{{ page.url }} "> {{ page.title }}</ a > </ strong > on {{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</ p >
13
+ {% endfor %}
14
+ </ div >
15
+ </ section >
Original file line number Diff line number Diff line change 7
7
< section class ="content wrap blogContent ">
8
8
{% include nav_blog.html %}
9
9
< div class ="inner-content ">
10
- {% for page in site .posts %}
10
+ {% for page in paginator .posts %}
11
11
< div class ="post-list-item ">
12
12
< h1 > < a href ="/react{{ page.url }} "> {{ page.title }}</ a > </ h1 >
13
13
< p class ="meta "> {{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</ p >
14
-
15
- < hr >
16
-
14
+ < hr />
17
15
< div class ="post ">
18
- {{ page.excerpt }}
19
- {% if page.excerpt != page.content %}
20
- < p >
21
- < a href ="/react{{ page.url }} "> Continue Reading →</ a >
22
- </ p >
23
- {% endif %}
16
+ {{ page.content }}
24
17
</ div >
25
18
</ div >
26
19
{% endfor %}
20
+
21
+ < div class ="pagination ">
22
+ {% if paginator.previous_page %}
23
+ < a href ="/react/blog/{{ paginator.previous_page_path }} " class ="previous ">
24
+ « Previous Page
25
+ </ a >
26
+ {% endif %}
27
+ {% if paginator.next_page %}
28
+ < a href ="/react/blog/{{ paginator.next_page_path }} " class ="next ">
29
+ Next Page »
30
+ </ a >
31
+ {% endif %}
32
+ </ div >
27
33
</ div >
28
34
</ section >
You can’t perform that action at this time.
0 commit comments