Files
bqkc/_includes/item/child/download-buttons.html
Nasir Anthony Montalvo 16adda8c47 Update documentation and permalinks for consistency and clarity
- Changed references in markup.md to update "data.html" to "data/" for clarity.
- Updated metadata.md to correct the link to the general documentation.
- Modified navbar.md to ensure stub values match the new permalink structure.
- Adjusted tables.md to reflect the new permalink for the table visualization page.
- Updated about.md to change the permalink from "/about.html" to "/about/" and revised content for clarity and impact.
- Changed browse.md permalink from "/browse.html" to "/browse/" for consistency.
- Added copyright.md page with copyright information and terms of use.
- Updated data.md to change permalink from "/data.html" to "/data/" and added introductory content.
- Created donate.md page to facilitate donations and acknowledge supporters.
- Updated locations.md permalink from "/locations.html" to "/locations/" for consistency.
- Changed map.md permalink from "/map.html" to "/map/" for uniformity.
- Added erasure.md page discussing the historical context of Black queer Kansas Citians.
- Updated out-there.md to correct the link to Lea Hopkins' interview.
- Changed subjects.md permalink from "/subjects.html" to "/subjects/" for consistency.
- Updated timeline.md permalink from "/timeline.html" to "/timeline/" for uniformity.
2026-01-15 00:45:32 -06:00

35 lines
2.9 KiB
HTML

{% comment %}
Adds child modal button links, styled as a Bootstrap btn-group.
Features:
- View Transcript -- if the item has the field "object_transcript", this button is added along with a Bootstrap collapse containing the transcript content. If the value of "object_transcript" starts with objects/ it will look for the matching transcript file in the objects fold, otherwise it will use the value directly. Both will be rendered in Markdown.
- View on Timeline -- if the item has a "date" value, links to Timeline page.
- View on Map -- if item has "latitude" and "longitude" value, links to location on map.
- Download -- if the item has "object_location" value, adds a download button along with the item format, or if the value is a YouTube or Vimeo link adds a "View on" link.
{%- endcomment -%}
<div class="btn-group my-2" role="group" aria-label="Item options">
{% if child.object_transcript %}<button class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTranscript{{ child.objectid }}" aria-expanded="false" aria-controls="collapseTranscript{{ child.objectid }}">View Transcript</button>{% endif %}
{% if child.date %}{%- capture year -%}{% if child.date contains "-" %}{{ child.date | split: "-" | first }}{% elsif child.date contains "/" %}{{ child.date | split: "/" | last }}{% else %}{{ child.date }}{% endif %}{%- endcapture -%}
<a href="{{ year | strip | prepend: '/timeline.html#y' | relative_url }}" class="btn btn-outline-primary">View on Timeline</a>{% endif %}
{% if child.latitude and child.longitude %}
<a href="{{ '/map/?location=' | append: page.latitude | append: ',' | append: page.longitude | append: '&marker=' | append: page.objectid | relative_url }}" class="btn btn-outline-primary">View on Map</a>{% endif %}
{% if child.object_location %}<a target="_blank" rel="noopener" href="{{ child.object_location | relative_url }}" class="btn btn-outline-primary">
{% if child.display_template == 'video' and child.object_location contains 'vimeo' %}View on Vimeo{% elsif child.display_template == 'video' and child.object_location contains 'youtu' %}View on YouTube{% elsif child.display_template == 'record'%}Link to Object{% else %}Download {{ child.format | split: '/' | last | default: page.display_template | upcase }}{% endif %}
</a>{% endif %}
</div>
{% if child.object_transcript %}
<div class="collapse mt-3" id="collapseTranscript{{ child.objectid }}">
<div class="card card-body text-start">
{% assign transcript_type = child.object_transcript | slice: 0,1 %}
{% if transcript_type == '/' %}
{% assign transcript_location = child.object_transcript | remove_first: '/' %}
{% assign transcript = site.pages | where: 'path', transcript_location | first %}
{{ transcript.content | markdownify }}
{% else %}
{{ child.object_transcript | markdownify }}
{% endif %}
</div>
</div>
{% endif %}