Skip to content
12 changes: 10 additions & 2 deletions _includes/content_filelinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
<div class="the-links">
{% if include.content.external_url %}{% assign linkfmt = "" %}
{%- capture linkbody -%}<i class="fa{% if include.content.external_url contains "youtu" %}{% assign linkfmt = "YouTube (link)" %}b fa-youtube"></i> YouTube{% elsif include.content.external_url contains "//www.academia.edu/" %}c-academia"></i>cademia.edu{% assign linkfmt = "Academia.edu" %}{% else %}s fa-{% assign ext = include.content.external_url | slice: -4, 4 %}{% if ext == ".mp3" %}{% assign linkfmt = "mp3" %}file-audio"></i> mp3{% elsif ext == ".zip" %}{% assign linkfmt = "zip" %}file-archive"></i> zip{% elsif ext == "epub" %}{% assign linkfmt = "epub" %}tablet-screen-button"></i> epub{% elsif ext == ".htm" or ext == "html" %}{% assign linkfmt = "html" %}globe"></i> Online{% elsif include.content.external_url contains "download" or include.content.external_url contains "viewcontent.cgi" or include.content.external_url contains "pdf" %}{% assign linkfmt = "pdf" %}file-pdf"></i> pdf{% else %}{% case include.content.category %}{% when "av" %}{% if page.subcat == "film" %}video{% else %}volume-up{% endif %}{% when "booklets" %}book-open{% when "monographs" %}book-open{% else %}globe{% endcase %}"></i> Online{% endif %}{% endif %}{%- endcapture -%}
<div class="a-link"><a class="btn" {% if include.newtab %}target="_blank"{% endif %} {% include content_link_data_attributes.html content=include.content linktype="Main External URL" linkfmt=linkfmt %} href="{{ include.content.external_url }}"{% for nrh in site.data.content.noreferrerhosts %}{% if include.content.external_url contains nrh %} rel="noreferrer"{% break %}{% endif %}{% endfor %}>{{ linkbody }}</a></div>
{%- assign is_archive_borrow = false -%}
{%- if include.content.external_url contains "archive.org" and include.content.external_url contains "/mode/" and include.content.category == "monographs" -%}
{%- assign is_archive_borrow = true -%}
{%- endif -%}
<div class="a-link">{% if is_archive_borrow %}<details class="copyright details-reset"><summary>{% endif %}<a class="btn" {% if include.newtab %}target="_blank"{% endif %} {% include content_link_data_attributes.html content=include.content linktype="Main External URL" linkfmt=linkfmt %} href="{{ include.content.external_url }}"{% for nrh in site.data.content.noreferrerhosts %}{% if include.content.external_url contains nrh %} rel="noreferrer"{% break %}{% endif %}{% endfor %}>{{ linkbody }}</a>{% if is_archive_borrow %}
<i class="far fa-question-circle"></i>
</summary><div>
Reading this book on Archive.org may require a free account. <a href="https://help.archive.org/help/borrowing-from-the-lending-library/" target="_blank">Learn more</a>
</div></details>{% endif %}</div>
{% endif %}
{%- if include.content.drive_links.size > 0 -%}
{%- for link in include.content.drive_links -%}
Expand Down Expand Up @@ -44,4 +52,4 @@
</div></details></div>
{%- endif -%}
</div>
</div>
</div>
7 changes: 6 additions & 1 deletion _sass/nimitta.scss
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ h1.overlay-into-banner {
a {
font-family: $ui-font-family;
}
.copyright div a {
font-family: inherit;
text-decoration: underline;
color: inherit;
}
}

main header.post-header {
Expand Down Expand Up @@ -636,4 +641,4 @@ ol {
font-size: 14px;
}
}
}
}
4 changes: 1 addition & 3 deletions assets/css/content-perma.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,4 @@ div.similar_content_footer {
padding-bottom: 8px;
}
}
}


}