Files
bqkc/_includes/item/child/compound-item-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

47 lines
2.8 KiB
HTML

{% comment %}
Adds button links for compound object parent item page.
If item has date to Timeline, if item has lat/long to Map, if item has child objects with object_location it adds Download options for each.
Styled as a Bootstrap btn-group.
{%- endcomment -%}
<div class="btn-group my-3" role="group" aria-label="Item options">
{% if page.object_transcript %}<button class="btn btn-outline-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTranscript" aria-expanded="false" aria-controls="collapseTranscript">View Transcript</button>{% endif %}
{% if page.date %}{%- capture year -%}{% if page.date contains "-" %}{{ page.date | split: "-" | first }}{% elsif page.date contains "/" %}{{ page.date | split: "/" | last }}{% else %}{{ page.date }}{% endif %}{%- endcapture -%}
<a href="{{ year | strip | prepend: '/timeline.html#y' | relative_url }}" class="btn btn-outline-primary">View on Timeline</a>{% endif %}
{% if page.latitude and page.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 %}
<div class="btn-group" role="group">
<button class="btn btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Download
</button>
<ul class="dropdown-menu">
{% if page.object_location %}<li><a target="_blank" rel="noopener" href="{{ page.object_location | relative_url }}" class="dropdown-item">{{ page.title }} ({{ page.format | split: '/' | last | upcase }})</a></li>{% endif %}
{% for child in children %}
{% unless child.object_location == nil %}
<li>
<a target="_blank" rel="noopener" href="{{ child.object_location | relative_url }}" class="dropdown-item">
{% if page.title != child.title and child.title != nil %}{{ child.title | truncatewords: 3 }}{% else %}Item {{ forloop.index }}{% endif %}
{% if child.format %}({{ child.format | split: '/' | last | upcase }}){% endif %}
</a>
</li>
{% endunless %}
{% endfor %}
</ul>
</div>
</div>
{% if page.object_transcript %}
<div class="collapse mt-3" id="collapseTranscript">
<div class="card card-body text-start">
{% assign transcript_type = page.object_transcript | slice: 0,1 %}
{% if transcript_type == '/' %}
{% assign transcript_location = page.object_transcript | remove_first: '/' %}
{% assign transcript = site.pages | where: 'path', transcript_location | first %}
{{ transcript.content | markdownify }}
{% else %}
{{ page.object_transcript | markdownify }}
{% endif %}
</div>
</div>
{% endif %}