Upgrade blog sidebar

This commit is contained in:
Paulus Schoutsen 2015-12-17 19:00:01 -08:00
parent 53a3209449
commit 8de91b31ee
11 changed files with 43 additions and 42 deletions

View File

@ -69,7 +69,7 @@ titlecase: true # Converts page and post titles to titlecase
# list each of the sidebar modules you want to include, in the order you want them to appear.
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
default_asides: [post/sharing.html, asides/recent_posts.html, asides/github.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html]
default_asides: [post/sharing.html, asides/recent_posts.html]
# Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below
# and add an array with the asides you want to use.

View File

@ -186,6 +186,10 @@ p.note {
}
#site-search .search {
width: calc(100% - 36px);
}
.install-instructions-container {
#normal-install, #raspberry-install, #docker-install, .install-instructions {
display: none;

View File

@ -0,0 +1,11 @@
<section class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">About Home Assistant</h1>
<ul class="divided">
<li>
Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control.
</li>
<li><a href='/getting-started/'>Get started with Home Assistant</a></li>
<li><a href='/demo/'>Open the online demo</a></li>
<li><a href='https://github.com/balloob/home-assistant/'>Browse code on GitHub</a></li>
</ul>
</section>

View File

@ -0,0 +1,9 @@
<section class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Categories</h1>
<ul class="divided">
{% assign categories = site.categories | sort %}
{% for category in categories %}
<li><a href="/blog/categories/{{ category | first }}/">{{ category | first | replace: '-', ' '}}</a></li>
{% endfor %}
</ul>
</section>

View File

@ -1,17 +0,0 @@
{% if site.delicious_user %}
<section class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">
Delicious
<small class="pull-right">
<a class="btn" href="//delicious.com/{{ site.delicious_user }}" title="@{{ site.delicious_user }} on Delicious" target="_blank">
<i class="icon-external-link"></i>
</a>
</small>
</h1>
<div id="delicious">
<span class="loading">
<i class="icon-spinner icon-spin"></i>
</span>
</div>
</section>
{% endif %}

View File

@ -1,3 +0,0 @@
{% comment %}
This section intentionally blank.
{% endcomment %}

View File

@ -1,17 +0,0 @@
{% if site.pinboard_user %}
<section id="pinboard" class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">
My Pinboard
<small class="pull-right">
<a class="btn" href="//pinboard.in/u:{{ site.pinboard_user }}" title="My Pinboard Bookmarks" target="_blank">
<i class="icon-external-link"></i>
</a>
</small>
</h1>
<ul class="divided" id="pinboard_linkroll">
<li class="loading">
<i class="icon-spinner icon-spin"></i>
</li>
</ul>
</section>
{% endif %}

View File

@ -1,5 +1,5 @@
<section id="recent-posts" class="aside-module grid__item one-whole lap-one-half">
<h1 class="title delta">Other Posts</h1>
<h1 class="title delta">Recent Posts</h1>
<ul class="divided">
{% for post in site.posts limit: site.recent_posts %}
{% if post.url != page.url %}

View File

@ -0,0 +1,7 @@
<section id="site-search" class="aside-module grid__item one-whole lap-one-half">
<form action="{{ site.simple_search }}" method="get">
<input type="hidden" name="q" value="site:{{ site.url | shorthand_url }}" />
<input class="search" type="text" name="q" results="0" placeholder="Search home-assistant.io"/>
<button type="submit"><i class="icon-search"></i></button>
</form>
</section>

View File

@ -7,7 +7,7 @@ Home Assistant is an open-source home automation platform running on Python 3. T
<div>hass --open-ui</div>
</code>
<p class='hero-buttons'>
<a href='{{ root_url }}/demo/' target='_blank'>View demo</a>
<a href='{{ root_url }}/getting-started/'>Get started</a>
<a href='{{ root_url }}/demo/' target='_blank'>View demo</a>
<a href='https://www.github.com/balloob/home-assistant'>Browse code on GitHub</a>
</p>

View File

@ -3,7 +3,14 @@
{% if url_parts[1] == 'components' %}
{% include asides/component_navigation.html | compact_newlines %}
{% else %}
{% include asides/social.html %}
{% include_array default_asides %}
{% include asides/search.html %}
{% include asides/about.html %}
{% if page.blog_index %}
{% include asides/categories.html %}
{% else %}
{% include asides/social.html %}
{% include_array default_asides %}
{% endif %}
{% endif %}
</div>