From 1c14cd6c8bd7fc6aeb88101cf147e7eab4d7825b Mon Sep 17 00:00:00 2001 From: Vjeux Date: Tue, 27 Aug 2013 01:30:46 +0200 Subject: [PATCH] Add pagination to blog - Add pagination - Display full content in /blog - Truncate Recent posts - Add permalink that lists all the blog posts - Add spacing and bullet around recent posts to make it more readable --- docs/_config.yml | 2 ++ docs/_css/react.scss | 32 +++++++++++++++++++++++++------- docs/_includes/nav_blog.html | 9 +++++---- docs/blog/all.html | 15 +++++++++++++++ docs/blog/index.html | 26 ++++++++++++++++---------- 5 files changed, 63 insertions(+), 21 deletions(-) create mode 100644 docs/blog/all.html diff --git a/docs/_config.yml b/docs/_config.yml index 4e51347ecc..3cd9eaf85f 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -16,6 +16,8 @@ markdown: redcarpet react_version: 0.4.0 description: A JavaScript library for building user interfaces relative_permalinks: true +paginate: 5 +paginate_path: /blog/page:num nav_docs_sections: - title: Quick Start items: diff --git a/docs/_css/react.scss b/docs/_css/react.scss index 68bfe87e81..8c79fbe0b0 100644 --- a/docs/_css/react.scss +++ b/docs/_css/react.scss @@ -248,6 +248,12 @@ li { } +.nav-blog { + li { + margin-bottom: 5px; + } +} + // Home Page specifics .home-section { @@ -285,14 +291,14 @@ li { margin-right: 0; } -#examples { - h3 { - color: $darkColor; - font-size: 24px; - font-weight: normal; - margin-bottom: 5px; - } +#examples h3, .home-presentation h3 { + color: $darkColor; + font-size: 24px; + font-weight: normal; + margin-bottom: 5px; +} +#examples { p { margin: 0 0 25px 0; max-width: $twoColumnWidth; @@ -685,3 +691,15 @@ p code { .post { margin-bottom: 30px; } + +.pagination { + margin-bottom: 30px; + + /* Trick to get the wrapper to expand to fit floating elements */ + width: 100%; + overflow: hidden; + + .next { + float: right; + } +} \ No newline at end of file diff --git a/docs/_includes/nav_blog.html b/docs/_includes/nav_blog.html index 3cc9ec8b18..75ff77e50e 100644 --- a/docs/_includes/nav_blog.html +++ b/docs/_includes/nav_blog.html @@ -1,10 +1,11 @@ -