beta edits, version .5

This commit is contained in:
Nasir Anthony Montalvo
2026-01-18 14:45:06 -06:00
parent 150e95e0d1
commit 6678eb6de6
18 changed files with 207 additions and 117 deletions

View File

@@ -48,18 +48,12 @@
<option value="all">All Fields</option>
<option value="title">Title</option>
{% for f in site.data.config-browse %}{% assign cap-field = f.field | capitalize %}
<option value="{{ f.field }}">{{ f.facet_name | default: f.display_name | default: cap-field }}</option>
<option value="{{ f.field }}">{{ f.facet_name | default: f.display_name | default: cap-field }}</option>
{% endfor %}
</select>
</div>
<div class="col-10 col-md-6">
<input type="text" class="form-control form-control-sm search-input" placeholder="Enter search term">
<div class="date-range-inputs">
<div class="date-input-group">
<input type="text" class="form-control form-control-sm start-date" placeholder="Start Date">
<span class="date-separator">to</span>
<input type="text" class="form-control form-control-sm end-date" placeholder="End Date">
</div>
<div class="text-input-wrapper">
<input type="text" class="form-control form-control-sm search-input" placeholder="Enter search term">
</div>
</div>
<div class="col-2 col-md-1">

View File

@@ -1,6 +1,6 @@
<div class="container-fluid mt-4 mb-n3 bg-light p-4 " id="technical">
<div class="container mt-4 border rounded p-4 bg-white">
<h3>Technical Credits - CollectionBuilder</h3>
<h3>CollectionBuilder</h3>
<div class="row my-2 justify-content-center">
<div class="col-md-8 p-4">
<p>This digital collection is built with <a href="https://collectionbuilder.github.io/">CollectionBuilder</a>, an open source framework for creating digital collection and exhibit websites that is developed by faculty librarians at the University of Idaho Library following the <a href="https://lib-static.github.io">Lib-Static</a> methodology.</p>

View File

@@ -84,82 +84,79 @@
{% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
{% for node in nodes %}
{% if node == "" %}
{% continue %}
{% for node in nodes %}
{% if node == "" %}
{% continue %}
{% endif %}
{% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
{% if currLevel < minHeader or currLevel > maxHeader %}
{% continue %}
{% endif %}
{% assign _workspace = node | split: '</h' %}
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
{% assign htmlID = _idWorkspace[0] %}
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
{% assign htmlClass = _classWorkspace[0] %}
{% if htmlClass contains "no_toc" %}
{% continue %}
{% endif %}
{% if firstHeader %}
{% assign minHeader = currLevel %}
{% endif %}
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
{% if include.item_class and include.item_class != blank %}
{% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
{% endif %}
{% if include.submenu_class and include.submenu_class != blank %}
{% assign subMenuLevel = currLevel | minus: 1 %}
{% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
{% endif %}
{% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
{% if htmlID %}
{% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
{% if include.anchor_class %}
{% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
{% endif %}
{% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
{% elsif skipNoIDs == true %}
{% continue %}
{% else %}
{% capture listItem %}{{ anchorBody }}{% endcapture %}
{% endif %}
{% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
{% if currLevel > lastLevel %}
{% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
{% elsif currLevel < lastLevel %}
{% assign repeatCount = lastLevel | minus: currLevel %}
{% for i in (1..repeatCount) %}
{% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
{% endfor %}
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
{% else %}
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
{% endif %}
{% if currLevel < minHeader or currLevel > maxHeader %}
{% continue %}
{% endif %}
{% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
{% assign _workspace = node | split: '</h' %}
{% assign lastLevel = currLevel %}
{% assign firstHeader = false %}
{% endfor %}
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
{% assign htmlID = _idWorkspace[0] %}
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
{% assign htmlClass = _classWorkspace[0] %}
{% if htmlClass contains "no_toc" %}
{% continue %}
{% endif %}
{% if firstHeader %}
{% assign minHeader = currLevel %}
{% endif %}
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
{% if include.item_class and include.item_class != blank %}
{% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
{% endif %}
{% if include.submenu_class and include.submenu_class != blank %}
{% assign subMenuLevel = currLevel | minus: 1 %}
{% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
{% endif %}
{% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
{% if htmlID %}
{% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
{% if include.anchor_class %}
{% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
{% endif %}
{% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
{% elsif skipNoIDs == true %}
{% continue %}
{% else %}
{% capture listItem %}{{ anchorBody }}{% endcapture %}
{% endif %}
{% if currLevel > lastLevel %}
{% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
{% elsif currLevel < lastLevel %}
{% assign repeatCount = lastLevel | minus: currLevel %}
{% for i in (1..repeatCount) %}
{% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
{% endfor %}
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
{% else %}
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
{% endif %}
{% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
{% assign lastLevel = currLevel %}
{% assign firstHeader = false %}
{% endfor %}
{% assign repeatCount = minHeader | minus: 1 %}
{% assign repeatCount = lastLevel | minus: repeatCount %}

View File

@@ -12,17 +12,16 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title" id="dataModalLabel">Collection Data</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Download this collection's data in a variety of reusable formats. Beware of this archive's copyright information!</p>
<p class="no toc">Download this collection's data in a variety of reusable formats. Beware of this archive's copyright information!</p>
{% if site.data.theme.metadata-export-fields %}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">Complete Metadata</h2>
<h2 class="card-title h4 no toc">Complete Metadata</h2>
<p class="card-text">All metadata fields for all collection items, available as a CSV spreadsheet (usable in Excel, Google Sheets, and similar programs) or JSON file (often used with web applications).</p>
<a href="{{ '/assets/data/metadata.csv' | relative_url }}" class="btn btn-outline-dark" download>Metadata CSV</a>
<a href="{{ '/assets/data/metadata.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Metadata JSON</a>
@@ -32,8 +31,8 @@
{% if site.data.theme.metadata-facets-fields %}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">Metadata Facets</h2>
<p class="card-text">List of unique values and their count for specific metadata fields, useful for understanding content of the fields.</p>
<h2 class="card-title h4 no toc">Metadata Facets</h2>
<p class="card-text no toc">List of unique values and their count for specific metadata fields, useful for understanding content of the fields.</p>
<a href="{{ '/assets/data/facets.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Facets JSON</a>
</div>
</div>
@@ -41,8 +40,8 @@
{% if stubs contains "subject" %}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">Subject Metadata</h2>
<p class="card-text">Unique values and counts of subject metadata, useful for further analyzing the content of this collection.</p>
<h2 class="card-title h4 no toc">Subject Metadata</h2>
<p class="card-text no toc">Unique values and counts of subject metadata, useful for further analyzing the content of this collection.</p>
<a href="{{ '/assets/data/subjects.csv' | relative_url }}" class="btn btn-outline-dark" download>Subjects CSV</a>
<a href="{{ '/assets/data/subjects.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Subjects JSON</a>
</div>
@@ -51,8 +50,8 @@
{% if stubs contains "location" %}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">Locations</h2>
<p class="card-text">Unique values and counts of location metadata, useful for further visualization and analysis of this collection's place names.</p>
<h2 class="card-title h4 no toc">Locations</h2>
<p class="card-text no toc">Unique values and counts of location metadata, useful for further visualization and analysis of this collection's place names.</p>
<a href="{{ '/assets/data/locations.csv' | relative_url }}" class="btn btn-outline-dark" download>Locations CSV</a>
<a href="{{ '/assets/data/locations.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Locations JSON</a>
</div>
@@ -61,8 +60,8 @@
{% if stubs contains "map" %}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">GeoJSON</h2>
<p class="card-text">Metadata for all collection items that have geographic coordinates in <a href="https://en.wikipedia.org/wiki/GeoJSON">GeoJSON</a> format, useful for further exploration and analysis of this collection through a geographical lense.</p>
<h2 class="card-title h4 no toc">GeoJSON</h2>
<p class="card-text no toc">Metadata for all collection items that have geographic coordinates in <a href="https://en.wikipedia.org/wiki/GeoJSON">GeoJSON</a> format, useful for further exploration and analysis of this collection through a geographical lense.</p>
<a href="{{ '/assets/data/geodata.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Geodata JSON</a>
</div>
</div>
@@ -70,16 +69,16 @@
{% if stubs contains "timeline" %}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">Timeline</h2>
<p class="card-text">A time-focused JSON data export designed for use with <a href="https://timeline.knightlab.com/">TimelineJS</a>.</p>
<h2 class="card-title h4 no toc">Timeline</h2>
<p class="card-text no toc">A time-focused JSON data export designed for use with <a href="https://timeline.knightlab.com/">TimelineJS</a>.</p>
<a href="{{ '/assets/data/timelinejs.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">TimelineJS JSON</a>
</div>
</div>
{%- endif -%}
<div class="card my-3">
<div class="card-body">
<h2 class="card-title h4">Website Source Code</h2>
<p class="card-text">GitHub repository containing source code for this project built with <a href="https://github.com/CollectionBuilder/collectionbuilder-csv">CollectionBuilder-CSV</a>.</p>
<h2 class="card-title h4 no toc">Website Source Code</h2>
<p class="card-text no toc">GitHub repository containing source code for this project built with <a href="https://github.com/CollectionBuilder/collectionbuilder-csv">CollectionBuilder-CSV</a>.</p>
<a href="{{ site.source-code | default: 'https://github.com/CollectionBuilder/collectionbuilder-csv' }}" class="btn btn-outline-dark">Source Code</a>
</div>
</div>

View File

@@ -41,7 +41,7 @@
</div>
<div class="col-md-12 text-center pt-3 pb-1">
<p class="text-white">Last updated {{ site.time | date: "%Y-%m-%d" }} | Built with CollectionBuilder</p>
<p class="text-white">Last updated {{ site.time | date: "%Y-%m-%d" }} | Built with <a href="/data/">CollectionBuilder</a></p>
</div>
</footer>

View File

@@ -11,7 +11,11 @@
{%- endcomment -%}
{%- assign stubs = site.data.config-nav | map: 'stub' | join: ';' -%}
<div class="card mb-3">
{% if include.no_toc %}
<div class="card mb-3 no_toc">
{% else %}
<div class="card mb-3">
{% endif %}
<div class="card-body">
<p><small>Download this collection's metadata in a variety of reusable formats. Psst: <a href="/copyright/" target="_blank">check out this archive's copyright information before downloading!</a></small></p>
<p class="card-text text-center">
@@ -37,4 +41,5 @@
<a class="btn btn-sm btn-secondary m-1" href="{{ site.source-code }}" rel="noopener">Source Code</a>
</p>
</div>
</div>
</div>

View File

@@ -7,7 +7,7 @@
{%- endcomment -%}
<div class="text-center">
<a class="btn btn-secondary" href="{{ page.previous_item | relative_url }}" id="prev-page-button">&laquo; Previous</a>
<a class="btn btn-secondary" href="{{ '/browse/' | relative_url }}">Back to Browse</a>
<a class="btn btn-secondary" href="{{ '/browse/' | relative_url }}">Back to The Archive</a>
<a class="btn btn-secondary" href="{{ page.next_item | relative_url }}" id="next-page-button">Next &raquo;</a>
</div>
<div id="item-nav">

View File

@@ -3,12 +3,45 @@
Adds a basic citation box for child item with reference link to the child modal.
{%- endcomment -%}
<div class="card mb-2">
<div class="card">
<div class="card-header">Attribution</div>
<div class="card-body">
<dl>
<dt>Citation:</dt>
<dd>"{{ child.title | default: page.title }}", {{ site.title }}, {% if site.organization-name %}{{ site.organization-name }}, {% endif %}<a href="{{ page.url | absolute_url }}#{{ child.objectid }}">{{ page.url | absolute_url }}#{{ child.objectid }}</a></dd>
<dd id="citation-text">
{% if page.collection %}
"{{ page.title }}," *{{ page.collection }}*,
{% else %}
"{{ page.title }},"
{% endif %}
{% if page.date_created %}
{{ page.date_created }}.
{% endif %}
<a href="{{ page.url | absolute_url }}">{{ page.url | absolute_url }}</a>
</dd>
</dl>
<button id="copy-button" class="btn btn-primary">Copy Citation</button>
</div>
</div>
</div>
<script>
// Get the citation text and the button
const citationText = document.getElementById("citation-text").innerText;
const copyButton = document.getElementById("copy-button");
// When the button is clicked, copy the citation to the clipboard
copyButton.addEventListener("click", function () {
const textArea = document.createElement("textarea");
textArea.value = citationText;
document.body.appendChild(textArea);
textArea.select();
document.execCommand("copy");
document.body.removeChild(textArea);
// Optionally, provide feedback to the user
copyButton.innerText = "Copied!";
setTimeout(() => {
copyButton.innerText = "Copy Citation";
}, 2000);
});
</script>

View File

@@ -8,7 +8,40 @@
<div class="card-body">
<dl>
<dt>Citation:</dt>
<dd>"{{ page.title }}", {{ site.title }}, {% if site.organization-name %}{{ site.organization-name }}, {% endif %}<a href="{{ page.url | absolute_url }}">{{ page.url | absolute_url }}</a></dd>
<dd id="citation-text">
{% if page.collection %}
"{{ page.title }}," <i>{{ page.collection }}</i>, {{site.title}}.
{% else %}
"{{ page.title }},"
{% endif %}
{% if page.date_created %}
{{ page.date_created }}.
{% endif %}
<a href="{{ page.url | absolute_url }}">{{ page.url | absolute_url }}</a>
</dd>
</dl>
<button id="copy-button" class="btn btn-primary">Copy Citation</button>
</div>
</div>
</div>
<script>
// Get the citation text and the button
const citationText = document.getElementById("citation-text").innerText;
const copyButton = document.getElementById("copy-button");
// When the button is clicked, copy the citation to the clipboard
copyButton.addEventListener("click", function () {
const textArea = document.createElement("textarea");
textArea.value = citationText;
document.body.appendChild(textArea);
textArea.select();
document.execCommand("copy");
document.body.removeChild(textArea);
// Optionally, provide feedback to the user
copyButton.innerText = "Copied!";
setTimeout(() => {
copyButton.innerText = "Copy Citation";
}, 2000);
});
</script>

View File

@@ -8,9 +8,28 @@
}
}
</script>
<a href="#maincontent" id="scroll-to-top" class="btn btn-link" title="Back to Top">
<a href="javascript:void(0)" id="scroll-to-top" class="btn btn-link" title="Back to Top">
<span class="visually-hidden">Back to top</span>
<svg class="bi icon-sprite" role="img" aria-label="Up Arrow">
<use xlink:href="{{ '/assets/css/cb-icons.svg' | relative_url }}#icon-back-to-top"/>
</svg>
</a>
</a>
<script>
const scrollBtn = document.getElementById("scroll-to-top");
window.addEventListener("scroll", function () {
if (window.scrollY > 500) {
scrollBtn.style.display = "block";
} else {
scrollBtn.style.display = "none";
}
});
scrollBtn.addEventListener("click", function () {
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth"
});
});
</script>