Lego2012
9/26/2016 - 9:14 PM

Different Layout for each Post

Different Layout for each Post

{% assign sorted = (site.notes | sort: 'date')%}

{% for item in sorted %}
  {% if item.category == "codes" %}
    <article class="code">
      <a href="{{ site.baseurl }}{{ item.url }}" title="{{ item.title }}">
        <h3>{{ item.title }}</h3>
        <p>{{ item.description }}</p>
      </a>
    </article>
    
    {% elsif item.category == "quotes" %}
    
    <article class="quote" style="color: #{{ item.color }};">
      <a href="{{ site.baseurl }}{{ item.url }}" title="{{ item.author }}">
        <div class="quote">
          <p class="quote-text">
            {{ item.quote }}
            {% if item.content %}
              {{ item.content }}
            {% endif %}
          </p>
          
          <p>
            {% if item.about %}
              <a href="{{ item.about }}" title="About {{ item.author }}">
            {% endif %}
          
            {{ item.author }}
          
            {% if item.about %}
              </a>
            {% endif %}
          </p>
        </div>
      </a>
    </article>
  {% endif %}
{% endfor %}