From ffb5fc176f2925f68b1a39e2f23fe8db18a06061 Mon Sep 17 00:00:00 2001 From: Jamie Mason Date: Mon, 11 Nov 2013 13:40:31 +0000 Subject: [PATCH] Add reusable view components. Issue #10627 https://github.com/ariya/phantomjs/issues/10627 --- _includes/category-list.md | 11 ++++++ _includes/community.html | 8 +++++ _includes/header.html | 12 +++++++ _includes/nav-api.html | 66 +++++++++++++++++++++++++++++++++++ _includes/nav-docs.html | 30 ++++++++++++++++ _includes/nav-list-group.html | 24 +++++++++++++ _includes/nav-list.md | 23 ++++++++++++ _includes/nav-module.html | 17 +++++++++ 8 files changed, 191 insertions(+) create mode 100644 _includes/category-list.md create mode 100644 _includes/community.html create mode 100644 _includes/header.html create mode 100644 _includes/nav-api.html create mode 100644 _includes/nav-docs.html create mode 100644 _includes/nav-list-group.html create mode 100644 _includes/nav-list.md create mode 100644 _includes/nav-module.html diff --git a/_includes/category-list.md b/_includes/category-list.md new file mode 100644 index 00000000..d56cebb7 --- /dev/null +++ b/_includes/category-list.md @@ -0,0 +1,11 @@ +{% if category_path %} + +### {{ category_title }} + + + +{% endif %} diff --git a/_includes/community.html b/_includes/community.html new file mode 100644 index 00000000..1ad5468a --- /dev/null +++ b/_includes/community.html @@ -0,0 +1,8 @@ +
+

Community:

+ +
diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 00000000..72e5a5dc --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,12 @@ +
+ + PhantomJS + + +
diff --git a/_includes/nav-api.html b/_includes/nav-api.html new file mode 100644 index 00000000..cf4b28eb --- /dev/null +++ b/_includes/nav-api.html @@ -0,0 +1,66 @@ +{% if page.title == 'API' %} + + + + + +{% else %} + + {% assign category_name = 'phantom' %} + {% assign category_label = 'phantom Object' %} + {% assign category_properties = site.categories.phantom-property %} + {% assign category_methods = site.categories.phantom-method %} + {% assign category_handlers = site.categories.phantom-handler %} + {% include nav-module.html %} + + {% assign category_name = 'webpage' %} + {% assign category_label = 'Web Page Module' %} + {% assign category_properties = site.categories.webpage-property %} + {% assign category_methods = site.categories.webpage-method %} + {% assign category_handlers = site.categories.webpage-handler %} + {% include nav-module.html %} + + {% assign category_name = 'child_process' %} + {% assign category_label = 'Child Process Module' %} + {% assign category_properties = site.categories.child_process-property %} + {% assign category_methods = site.categories.child_process-method %} + {% assign category_handlers = site.categories.child_process-handler %} + {% include nav-module.html %} + + {% assign category_name = 'fs' %} + {% assign category_label = 'File System Module' %} + {% assign category_properties = site.categories.fs-property %} + {% assign category_methods = site.categories.fs-method %} + {% assign category_handlers = site.categories.fs-handler %} + {% include nav-module.html %} + + {% assign category_name = 'stream' %} + {% assign category_label = 'Stream Objects' %} + {% assign category_properties = site.categories.stream-property %} + {% assign category_methods = site.categories.stream-method %} + {% assign category_handlers = site.categories.stream-handler %} + {% include nav-module.html %} + + {% assign category_name = 'system' %} + {% assign category_label = 'System Module' %} + {% assign category_properties = site.categories.system-property %} + {% assign category_methods = site.categories.system-method %} + {% assign category_handlers = site.categories.system-handler %} + {% include nav-module.html %} + + {% assign category_name = 'webserver' %} + {% assign category_label = 'Web Server Module' %} + {% assign category_properties = site.categories.webserver-property %} + {% assign category_methods = site.categories.webserver-method %} + {% assign category_handlers = site.categories.webserver-handler %} + {% include nav-module.html %} + +{% endif %} diff --git a/_includes/nav-docs.html b/_includes/nav-docs.html new file mode 100644 index 00000000..fd9c61c8 --- /dev/null +++ b/_includes/nav-docs.html @@ -0,0 +1,30 @@ + + + + diff --git a/_includes/nav-list-group.html b/_includes/nav-list-group.html new file mode 100644 index 00000000..539ce45c --- /dev/null +++ b/_includes/nav-list-group.html @@ -0,0 +1,24 @@ +{% if category_items %} + {% for post in category_items reversed sort_by:title %} + + {% assign current_class = nil %} + {% assign last_item_class = nil %} + + {% if page.url == post.url %} + {% assign current_class = ' current' %} + {% endif %} + + {% if forloop.last %} + {% assign last_item_class = ' nav-group-end' %} + {% endif %} + + + {% endfor %} +{% endif %} diff --git a/_includes/nav-list.md b/_includes/nav-list.md new file mode 100644 index 00000000..5fb0b6b0 --- /dev/null +++ b/_includes/nav-list.md @@ -0,0 +1,23 @@ + diff --git a/_includes/nav-module.html b/_includes/nav-module.html new file mode 100644 index 00000000..94296e8f --- /dev/null +++ b/_includes/nav-module.html @@ -0,0 +1,17 @@ +{% if page.categories contains category_name %} + + + + + + {% include nav-list.md %} + +{% endif %}