File tree Expand file tree Collapse file tree 5 files changed +63
-21
lines changed
Expand file tree Collapse file tree 5 files changed +63
-21
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ markdown: redcarpet
1616react_version : 0.4.1
1717description : A JavaScript library for building user interfaces
1818relative_permalinks : true
19+ paginate : 5
20+ paginate_path : /blog/page:num
1921nav_docs_sections :
2022- title : Quick Start
2123 items :
Original file line number Diff line number Diff line change @@ -248,6 +248,12 @@ li {
248248
249249}
250250
251+ .nav-blog {
252+ li {
253+ margin-bottom : 5px ;
254+ }
255+ }
256+
251257// Home Page specifics
252258
253259.home-section {
@@ -285,14 +291,14 @@ li {
285291 margin-right : 0 ;
286292}
287293
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+ }
295300
301+ #examples {
296302 p {
297303 margin : 0 0 25px 0 ;
298304 max-width : $twoColumnWidth ;
@@ -685,3 +691,15 @@ p code {
685691.post {
686692 margin-bottom : 30px ;
687693}
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 ">
22 < div class ="nav-docs-section ">
33 < h3 > Recent posts</ h3 >
44 < 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 >
89 </ ul >
910 </ div >
1011</ 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 77< section class ="content wrap blogContent ">
88 {% include nav_blog.html %}
99 < div class ="inner-content ">
10- {% for page in site .posts %}
10+ {% for page in paginator .posts %}
1111 < div class ="post-list-item ">
1212 < h1 > < a href ="/react{{ page.url }} "> {{ page.title }}</ a > </ h1 >
1313 < p class ="meta "> {{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</ p >
14-
15- < hr >
16-
14+ < hr />
1715 < 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 }}
2417 </ div >
2518 </ div >
2619 {% 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 >
2733 </ div >
2834</ section >
You can’t perform that action at this time.
0 commit comments