~xdavidwu/xdavidwu.link

ce32f30d3f03ce711c970f2393931c0b6be6cdec — Andrew Newhouse 6 years ago 1741c63
Feature: Adding linkback functionality Author avatar & Name (#1386)

* adding linkback funct to author avatar & nm

* rm author_class; change linkback var to home; updating config docs
2 files changed, 25 insertions(+), 3 deletions(-)

M _includes/author-profile.html
M _sass/minimal-mistakes/_sidebar.scss
M _includes/author-profile.html => _includes/author-profile.html +20 -3
@@ 9,15 9,32 @@
  {% if author.avatar %}
    <div class="author__avatar">
      {% if author.avatar contains "://" %}
        <img src="{{ author.avatar }}" alt="{{ author.name }}" itemprop="image">
        {% assign author_src = author.avatar %}
      {% else %}
        <img src="{{ author.avatar | absolute_url }}" class="author__avatar" alt="{{ author.name }}" itemprop="image">
        {% assign author_src = author.avatar | absolute_url %}
      {% endif %}

      {% if author.home %}
        {% if author.home contains "://" %}
          {% assign author_link = author.home %}
        {% else %}
          {% assign author_link = author.home | absolute_url %}
        {% endif %}
        <a href="{{ author_link }}">
          <img src="{{ author_src }}" alt="{{ author.name }}" itemprop="image">
        </a>
      {% else %}
        <img src="{{ author_src }}" alt="{{ author.name }}" itemprop="image">
      {% endif %}
    </div>
  {% endif %}

  <div class="author__content">
    <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
    {% if author.home %}
      <a href="{{ author_link }}"><h3 class="author__name" itemprop="name">{{ author.name }}</h3></a>
    {% else %}
      <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
    {% endif %}
    {% if author.bio %}
      <p class="author__bio" itemprop="description">
        {{ author.bio }}

M _sass/minimal-mistakes/_sidebar.scss => _sass/minimal-mistakes/_sidebar.scss +5 -0
@@ 128,6 128,11 @@
    padding-left: 0;
    padding-right: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

.author__name {