Skip to content

Commit

Permalink
structure documentation collections
Browse files Browse the repository at this point in the history
  • Loading branch information
ottiker committed Apr 3, 2017
1 parent 711dc9e commit 4dab6ae
Show file tree
Hide file tree
Showing 24 changed files with 184 additions and 70 deletions.
11 changes: 9 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: Robottiker
markdown: redcarpet
pygments: true
highlighter: true
future: true
tagline: "Robottiker Documentation and Concepts"
tagline: "Documentations"
image: "img/app.png"
repo: "Robottiker"
collections:
space:
output: true
water:
output: true
power:
output: true
6 changes: 1 addition & 5 deletions _includes/footer-index.html → _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
<div class="container">
<div class="row">
<div class="span5 offset1">
<?php if (!empty($options['links'])) { ?>
<ul class="footer-nav">
<?php foreach($options['links'] as $name => $url) { ?>
<li><a href="<?php echo $url;?>" target="_blank"><?php echo $name;?></a></li>
<?php } ?>
<li><a href="" target="_blank"></a></li>
</ul>
<?php } ?>
</div>
<div class="span5">
<div class="pull-right">
Expand Down
14 changes: 0 additions & 14 deletions _includes/header-index.html

This file was deleted.

20 changes: 12 additions & 8 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<a class="brand pull-left" href="/">Robottiker</a>
<p class="navbar-text pull-right">
Powered by <a href="http://jekyllrb.com">Jekyll</a>
</p>
</div>
</div>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<a class="brand pull-left" href="/">Robottiker</a>
<ul class="nav">
<li><a href="license.html">License</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<p class="navbar-text pull-right">
Powered by <a href="http://jekyllrb.com">Jekyll</a>
</p>
</div>
</div>
7 changes: 0 additions & 7 deletions _includes/nav.html

This file was deleted.

18 changes: 18 additions & 0 deletions _includes/nav_docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<ul class="nav nav-list">
{% for project in site.collections %}
{% if project.label != "posts" %}
<li class="open">
<a href="/{{ project.label }}/index.html">{{ project.label }}</a>
<ul class="nav nav list">
{% for document in project.docs %}
{% if document.layout != "project_index" %}
<li>
<a href="{{ document.url }}">{{ document.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
9 changes: 9 additions & 0 deletions _includes/nav_posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<ul class="nav nav-list">
{% for post in site.posts %}
{% if post.title %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</button>
</div>
<div id="sub-nav-collapse" class="sub-nav-collapse">
{% include nav.html %}
{% include nav_docs.html %}
</div>
</div>
<div class="right-column content-area span9">
Expand Down
4 changes: 2 additions & 2 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<!-- Hompage -->
{% include header-index.html %}
{% include header.html %}

<div class="homepage-header container-fluid">
<div class="container">
Expand All @@ -32,6 +32,6 @@ <h1>{{page.title}}</h1>
</div>
</div>

{% include footer-index.html %}
{% include footer.html %}
</body>
</html>
13 changes: 8 additions & 5 deletions _layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<!-- Hompage -->
{% include header-index.html %}
{% include header.html %}

<div class="homepage-hero well container-fluid">
<div class="container">
Expand All @@ -30,10 +30,13 @@ <h2>{{site.tagline}}</h2>
<div class="row">
<div class="text-center span12">
<a href="https://github.com/{{site.repo}}" class="btn btn-secondary btn-hero">
View On GitHub
View On GitHub
</a>
<a href="posts.html" class="btn btn-primary btn-hero">
View Documentation
<a href="docs.html" class="btn btn-primary btn-hero">
View Documentation
</a>
<a href="posts.html" class="btn btn-secondary btn-hero">
Blog
</a>
</div>
</div>
Expand All @@ -50,6 +53,6 @@ <h2>{{site.tagline}}</h2>
</div>
</div>

{% include footer-index.html %}
{% include footer.html %}
</body>
</html>
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
</button>
</div>
<div id="sub-nav-collapse" class="sub-nav-collapse">
{% include nav.html %}
{% include nav_posts.html %}
</div>
</div>
<div class="right-column content-area span9">
<div class="content-page">
<article>
<div class="page-header sub-header clearfix">
<h1>{{page.title}}</h1>
<span style="float: left; font-size: 10px; color: gray;">{{ page.date | date_to_string }}</span>
<span style="float: left; font-size: 10px; color: gray;">{{ page.date }}</span>
</div>
{{ content }}
</article>
Expand Down
41 changes: 41 additions & 0 deletions _layouts/project_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
{% include includes.html %}
</head>
<body>
<!-- Docs -->
<div class="container-fluid fluid-height wrapper">
{% include header.html %}

<div class="row-fluid columns content">
<div class="left-column article-tree span3">
<!-- For Mobile -->
<div class="responsive-collapse">
<button type="button" class="btn btn-sidebar" id="menu-spinner-button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="sub-nav-collapse" class="sub-nav-collapse">
{% include nav_docs.html %}
</div>
</div>
<div class="right-column content-area span9">
<div class="content-page">
<article>
<div class="page-header sub-header clearfix">
<h1>{{page.title}}</h1>
</div>
{{ content }}
</article>
</div>
</div>
</div>
</div>
</body>
</html>
7 changes: 7 additions & 0 deletions _power/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: project_index
title: "Index"
categories: docs power
---

This is the content for Power.
7 changes: 7 additions & 0 deletions _power/schema.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
title: "Schema"
categories: docs power
---

Power grid schema.
7 changes: 7 additions & 0 deletions _space/base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
title: "Base structure"
categories: docs space
---

Explain the base structure.
7 changes: 7 additions & 0 deletions _space/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: project_index
title: "Index"
categories: space
---

This is the content for Space.
7 changes: 7 additions & 0 deletions _water/filtration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: default
title: "Filtration"
categories: docs water
---

Filtration!
7 changes: 7 additions & 0 deletions _water/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: project_index
title: "Index"
categories: docs water
---

This is the content for Water.
11 changes: 11 additions & 0 deletions docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: default
title: "Projects"
---
<ul class="posts">
{% for collection in site.collections %}
{% if collection.title %}
<li><span>{{ collection.title }}</span></li>
{% endif %}
{% endfor %}
</ul>
Binary file removed img/app-thumbs.png
Binary file not shown.
Binary file modified img/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 17 additions & 14 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
layout: index
title: "Robottiker"
---

<p class="lead">
<strong>Robottiker</strong> Documentations and Concepts.
<strong>Projects</strong> overview
</p>

<hr/>
<h3>Projects</h3>
<hr/>

<img src="img/app-thumbs.png" alt="alt text" class="pull-right" style="margin-bottom:20px;">

* Space
* Water
* Power
* Food

<div class="clear"></div>
{% for project in site.collections %}
{% if project.label != "posts" %}
<div>
<h3><a href="/{{ project.label }}/index.html">{{ project.label }}</a></h3>
<ul>
{% for document in project.docs %}
{% if document.layout != "project_index" %}
<li>
<a href="{{ document.url }}">{{ document.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% endfor %}
<hr/>
10 changes: 0 additions & 10 deletions posts.html

This file was deleted.

11 changes: 11 additions & 0 deletions posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
layout: post
title: "Blog"
---
<ul class="posts">
{% for post in site.posts %}
{% if post.title %}
<li><span>{{ post.title }}</span></li>
{% endif %}
{% endfor %}
</ul>

0 comments on commit 4dab6ae

Please sign in to comment.