Add flag to enable sidebar author profile or alternate info

This commit is contained in:
Michael Rose 2016-03-06 22:05:43 -05:00
parent 0665dccffb
commit cf2fbef815
2 changed files with 22 additions and 3 deletions

View file

@ -35,8 +35,24 @@ layout: compress
{% endif %}
<div id="main" role="main">
<div class="author-profile">
{% include author-profile.html %}
<div class="sidebar">
{% if page.author_profile %}{% include author-profile.html %}{% endif %}
{% if page.sidebar %}
{% for s in page.sidebar %}
{% if s.image %}
<img src=
{% if s.image contains "http" %}
"{{ s.image }}"
{% else %}
"{{ s.image | prepend: "/images/" | prepend: absurl }}"
{% endif %}
alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}">
{% endif %}
{% if s.title %}<h3>{{ s.title }}</h3>{% endif %}
{% if s.text %}{{ s.text | markdownify }}{% endif %}
{% endfor %}
{% endif %}
{% unless page.author_profile or page.sidebar %}&nbsp;{% endunless %}
</div>
{{ content }}
</div><!-- /#main -->

View file

@ -327,11 +327,14 @@ $button-size: 1.5rem;
}
/* Author profile */
.author-profile {
.sidebar {
display: none;
a, a:hover {
border-bottom: 0 solid transparent;
}
img {
width: 100%;
}
@media #{$small} {
display: block;
@include grid(12,2);