diff options
author | lxf <sng@luxagraf.net> | 2020-12-23 12:00:51 -0500 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2020-12-23 12:00:51 -0500 |
commit | 233168576fcee317c068cd6e68a307682a109559 (patch) | |
tree | 11f405143a5d6d5bbf18cd29290d9b7a36060427 | |
parent | 31a9231e7f38553c086784294ccbe4a0a3992279 (diff) |
added related posts to src
-rw-r--r-- | app/posts/templates/posts/src_detail.html | 41 | ||||
-rw-r--r-- | design/sass/_src.scss | 6 |
2 files changed, 46 insertions, 1 deletions
diff --git a/app/posts/templates/posts/src_detail.html b/app/posts/templates/posts/src_detail.html index 664db36..0257598 100644 --- a/app/posts/templates/posts/src_detail.html +++ b/app/posts/templates/posts/src_detail.html @@ -53,6 +53,22 @@ {{object.body_html|safe|smartypants|widont}} </div> </article> + <div class="entry-footer"> + <aside id="donate"> + <h3>Donate</h3> + <p>I've had several people ask about tipping for the articles here. That's not necessary, but if this article saved you some time and you feel like that's worth some money, I won't turn it down. You can donate here:</p> + <div class="donate-btn"> + <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> + <input type="hidden" name="cmd" value="_s-xclick"> + <input type="hidden" name="hosted_button_id" value="HYJFZQSBGJ8QQ"> + <input type="submit" name="submit" title="Donate to luxagraf via PayPal"> + </form> + </div> + <div class="donate-btn"> + <a class="liberapay-btn" href="https://liberapay.com/luxagraf/donate"><span>Donate</span></a> + </div> + </aside> + </div> {% if object.slug != 'about' %} {% with object.get_next_published as next %} {% with object.get_previous_published as prev %} @@ -67,6 +83,31 @@ </ul> </nav>{%endwith%}{%endwith%} {%endif%} + + {% if object.related.all %}<div class="article-afterward related"> + <div class="related-bottom"> + <h6 class="hedtinycaps">You might also enjoy</h6> + <ul class="article-card-list">{% for object in object.related.all %} + <li class="article-card-mini"><a href="{{object.get_absolute_url}}" title="{{object.title}}"> + <div class="post-image post-mini-image"> + {% if object.featured_image %} + {% include "lib/img_archive.html" with image=object.featured_image nolightbox=True %} + {%endif%} + </div> + <h4 class="p-name entry-title post-title" itemprop="headline">{% if object.title %}{{object.title|safe|smartypants|widont}}{% else %}{{object.common_name}}{%endif%}</h4> + <p class="p-author author hide" itemprop="author"><span class="byline-author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Scott Gilbertson</span></span></p> + <p class="post-summary"> + {% if object.location %}<span class="p-location h-adr adr post-location" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place"> + {% if object.location.country_name == "United States" %}{{object.location.state_name}}{%else%}{{object.location.country_name}}{%endif%} + </span>{%endif%} + {% if object.location and object.model_name.model != 'page' %}–{%endif%} + {% if object.model_name.model != 'page' %}<time class="dt-published published dt-updated post-date" datetime="{{object.pub_date|date:'c'}}"><span>{{object.pub_date|date:"F Y"}}</span></time>{%endif%} + </p> + </a> + </li> + {% endfor %}</ul> + </div> + </div>{%endif%} </main> {% if object.slug != 'about' %} {% if object.enable_comments %} diff --git a/design/sass/_src.scss b/design/sass/_src.scss index f627a49..1896979 100644 --- a/design/sass/_src.scss +++ b/design/sass/_src.scss @@ -179,4 +179,8 @@ code > .comment::after { line-height: 1.6; } } - +#donate p { + @include fancy_sans; + @include fontsize(18); + line-height: 1.4; +} |