Add flag to enable sidebar author profile or alternate info
This commit is contained in:
parent
0665dccffb
commit
cf2fbef815
2 changed files with 22 additions and 3 deletions
|
@ -35,8 +35,24 @@ layout: compress
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="main" role="main">
|
<div id="main" role="main">
|
||||||
<div class="author-profile">
|
<div class="sidebar">
|
||||||
{% include author-profile.html %}
|
{% 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 %} {% endunless %}
|
||||||
</div>
|
</div>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</div><!-- /#main -->
|
</div><!-- /#main -->
|
||||||
|
|
|
@ -327,11 +327,14 @@ $button-size: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Author profile */
|
/* Author profile */
|
||||||
.author-profile {
|
.sidebar {
|
||||||
display: none;
|
display: none;
|
||||||
a, a:hover {
|
a, a:hover {
|
||||||
border-bottom: 0 solid transparent;
|
border-bottom: 0 solid transparent;
|
||||||
}
|
}
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
@media #{$small} {
|
@media #{$small} {
|
||||||
display: block;
|
display: block;
|
||||||
@include grid(12,2);
|
@include grid(12,2);
|
||||||
|
|
Loading…
Reference in a new issue