Changing sidebar to deeplinks

Fixed up navigation, collection contents are now output on one page. CSS cleanup
This commit is contained in:
Tetsuro
2015-08-15 19:00:15 -04:00
parent d9b2d50045
commit 6028ddb189
12 changed files with 64 additions and 81 deletions

View File

@@ -17,12 +17,5 @@ defaults:
-
scope:
path: ""
type: "filters"
values:
layout: "default"
-
scope:
path: ""
type: "tags"
values:
layout: "default"

View File

@@ -1,3 +1,23 @@
---
title: split
---
The `split` filter takes on a substring as a parameter. The substring is used as a delimiter to divide a string into an array. You can output different parts of an array using [array filters](/themes/liquid-documentation/filters/array-filters).
<p class="input">Input</p>
{% highlight liquid %}{% raw %}
{% assign words = "Hi, how are you today?" | split: ' ' %}
{% for word in words %}
{{ word }}
{% endfor %}
{% endraw %}{% endhighlight %}
<p class="output">Output</p>
{% highlight text %}
Hi,
how
are
you
today?
{% endhighlight %}

View File

@@ -5,6 +5,14 @@ title: uniq
<p>Removes any duplicate instances of an element in an array.</p>
| Input | Output |
|:-------------------------------------------|:-------|
| {% raw %}`{% assign fruits = "orange apple banana apple orange" %} {{ fruits | split: ' ' | uniq | join: ' ' }}`{% endraw %} | orange apple banana |
<p class="input">Input</p>
<div>{% highlight html %}{% raw %}
{% assign fruits = "orange apple banana apple orange" %}
{{ fruits | split: ' ' | uniq | join: ' ' }}
{% endraw %}{% endhighlight %}</div>
<p class="output">Output</p>
<div>{% highlight html%}{% raw %}
orange apple banana
{% endraw %}{% endhighlight %}</div>

View File

@@ -29,7 +29,7 @@
<ul class="section__links">
{% for doc in site.collections[section_title].docs %}
<li>
<a href="{{ doc.url }}" class="section__link {% if doc.title == page.title %}section__link--is-active{% endif %}">{{ doc.title }}</a>
<a href="/{{ collection[0] }}#{{ doc.title }}" class="section__link">{{ doc.title }}</a>
</li>
{% endfor %}
</ul>
@@ -40,11 +40,8 @@
</div>
<div class="content__area">
<div class="content__wrapper">
<h1>{% unless page.url == "/index.html" %}{{ page.collection | capitalize }} &rarr; {% endunless %} {{ page.title }}</h1>
<div class="content">
{{ content }}
</div>
<div class="content__list">
{{ content }}
</div>
</div>

View File

@@ -1,14 +0,0 @@
---
layout: default
---
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<article class="post-content">
{{ content }}
</article>
</div>

View File

@@ -1,14 +0,0 @@
---
layout: default
---
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<article class="post-content">
{{ content }}
</article>
</div>

View File

@@ -1,34 +0,0 @@
---
layout: post
title: "Test Post"
date: 2015-01-26 17:50:59
categories: liquid docs yo
---
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
This is a dummy paragraph... find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
> Blockquote
Code snippet:
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekylls GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekylls dedicated Help repository][jekyll-help].
[jekyll]: http://jekyllrb.com
[jekyll-gh]: https://github.com/jekyll/jekyll
[jekyll-help]: https://github.com/jekyll/jekyll-help

View File

@@ -82,12 +82,11 @@ a {
}
h1 {
font-size: 2em;
font-size: 2.5em;
}
h2 {
font-size: 2em;
text-decoration: underline;
}
h3 {

View File

@@ -12,7 +12,7 @@ $wrapper-width: 800px;
width: 100%;
}
.content__wrapper {
.content__list {
max-width: $wrapper-width;
margin: 0 auto;
padding: 0 $spacing-unit;

View File

@@ -8,3 +8,7 @@ td {
p {
line-height: 1.8;
}
.content__item {
margin-bottom: $spacing-unit * 2;
}

12
filters/index.html Normal file
View File

@@ -0,0 +1,12 @@
---
layout: default
---
{% for doc in site.collections["filters"].docs %}
<div id="{{ doc.title }}" class="content__item">
<h2>{{ doc.title }}</h2>
<div class="content">
{{ doc.content }}
</div>
</div>
{% endfor %}

12
tags/index.html Normal file
View File

@@ -0,0 +1,12 @@
---
layout: default
---
{% for doc in site.collections["tags"].docs %}
<div id="{{ doc.title }}" class="content__item">
<h2>{{ doc.title }}</h2>
<div class="content">
{{ doc.content }}
</div>
</div>
{% endfor %}