~xdavidwu/xdavidwu.link

cf2fbef815e2699f82da0eab801c6859c45deb39 — Michael Rose 8 years ago 0665dcc
Add flag to enable sidebar author profile or alternate info
2 files changed, 22 insertions(+), 3 deletions(-)

M _layouts/default.html
M _sass/page.scss
M _layouts/default.html => _layouts/default.html +18 -2
@@ 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 -->

M _sass/page.scss => _sass/page.scss +4 -1
@@ 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);