Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Csv style #22

Open
wants to merge 89 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
5e0621f
add data with img links
evanwill Oct 22, 2020
4bab9a7
remove item download include
evanwill Oct 22, 2020
14ae7e0
remove img includes
evanwill Oct 22, 2020
d2fb3c3
fix download var
evanwill Oct 22, 2020
6a80a15
csv img in js
evanwill Oct 22, 2020
4310e30
clean up img includes
evanwill Oct 22, 2020
6c8c0e9
fix up data links
evanwill Oct 22, 2020
ab4c535
absolute url in data links
evanwill Oct 22, 2020
f987f68
fix featured image
evanwill Oct 22, 2020
fba3e6c
set up new metadata template
evanwill Nov 13, 2020
3ec914e
swap out img varibles
evanwill Nov 13, 2020
0b394df
start documenting new metadata set up
evanwill Nov 13, 2020
6bf211d
add custom foot option
evanwill Nov 13, 2020
0472551
update timeline layout
evanwill Nov 13, 2020
8d6e28d
update map feature
evanwill Nov 13, 2020
9f50333
update data layout
evanwill Nov 13, 2020
9963849
update browse js
evanwill Nov 13, 2020
991b721
update bootstrap
evanwill Nov 13, 2020
89d1e68
tweak bootstrap icons
evanwill Nov 13, 2020
3ff9b6f
update browse js icons
evanwill Nov 13, 2020
b199fe4
timeline to svg sprite icons
evanwill Nov 13, 2020
69b7014
featured img fix
evanwill Nov 13, 2020
e4f8db1
carousel quick fix
evanwill Nov 13, 2020
6346984
docing metadata stuff
evanwill Nov 13, 2020
9da0c85
icon styles
evanwill Nov 14, 2020
f7bebd8
scroll to top icon
evanwill Nov 14, 2020
740e838
doc icons and add icon include
evanwill Nov 14, 2020
43f56d3
objects icons
evanwill Nov 16, 2020
ce19273
browse icons
evanwill Nov 16, 2020
a2d30d2
clean up icons
evanwill Nov 16, 2020
fd38e3f
icons docs
evanwill Nov 17, 2020
f3103ea
icon include to oneline
evanwill Nov 17, 2020
c060ef9
fix feature include links
evanwill Nov 17, 2020
bff2477
set default icons
evanwill Dec 10, 2020
52fb514
tweak analytics set up
evanwill Dec 10, 2020
f67429c
fix dupe id in lunr search elements
evanwill Dec 18, 2020
08d9517
use relative_url on image_small
evanwill Dec 18, 2020
2ad1942
use relative_url on image_thumb
evanwill Dec 18, 2020
3362329
use relative_url with object_download
evanwill Dec 18, 2020
a21af92
clarify metadata relative url in docs
evanwill Dec 18, 2020
06f5c34
readme note
evanwill Dec 18, 2020
9c93f33
emphasis metadata template changes
evanwill Dec 23, 2020
44a7b0c
fix index carousel
evanwill Dec 23, 2020
3e60089
fix extra loop in timeline layout
evanwill Dec 23, 2020
8733108
clean up in browsejs
evanwill Dec 23, 2020
cc635a9
implement icon theme option
evanwill Jan 6, 2021
34e066b
fix objects count icons
evanwill Jan 15, 2021
a441c21
template doc
evanwill Jan 15, 2021
eb3fa50
new CollectionBuilder Page Generator,
evanwill Jan 15, 2021
f57ee91
comment out page_gen config,
evanwill Jan 15, 2021
b7d99a4
remove unnecessary layout
evanwill Jan 15, 2021
6dca265
Merge pull request #19 from CollectionBuilder/csv-style-page-gen
evanwill Jan 15, 2021
4e9b33e
add layout choice to cb_page_gen
evanwill Jan 20, 2021
9f17b32
doc plugins
evanwill Jan 20, 2021
e4e7614
update plugin docs
evanwill Jan 20, 2021
f66f1a1
add color to cb_page_gen error messages
evanwill Jan 28, 2021
9d270a4
doc error messages
evanwill Jan 28, 2021
7113f74
add next and previous item to cb page gen
evanwill Jan 28, 2021
4c60cca
doc new item page approach
evanwill Jan 28, 2021
7936ccc
draft object_template approach
evanwill Jan 28, 2021
b4f9a7c
update head and foot
evanwill Jan 28, 2021
e3067fd
relative url in js feet
evanwill Jan 28, 2021
2fdc7c3
item thumb icons
evanwill Jan 28, 2021
9d0a2ce
clean up classes
evanwill Jan 28, 2021
2577d98
tweak layouts
evanwill Jan 28, 2021
f775d2f
chelsea caught this bad link
dcnb Jan 28, 2021
9921913
data link fix
evanwill Jan 28, 2021
b244fdc
better item page comments
evanwill Feb 3, 2021
bbd58ca
video embed layout
evanwill Feb 3, 2021
d818f2f
default item layout
evanwill Feb 3, 2021
c6056ff
record layout template
evanwill Feb 3, 2021
3c6be98
clean up demo-metadata to new template
evanwill Feb 3, 2021
78509c1
remove objects option in config
evanwill Feb 3, 2021
77de811
add example record item
evanwill Feb 3, 2021
1e3dc44
draft migrate to new sa doc
evanwill Feb 4, 2021
579d67b
docs updates and draft index
evanwill Feb 4, 2021
9667b00
remove absolute_url and site.url
evanwill Feb 12, 2021
40c0449
clean up featured image liquid
evanwill Feb 12, 2021
9023085
little fixes
evanwill Feb 25, 2021
7cb5797
little clean up
evanwill Feb 25, 2021
671c926
fix about jumbotron
evanwill Feb 26, 2021
37987d0
clean up timeline layout
evanwill Mar 5, 2021
a10cc00
ensure skip nav stays above top
evanwill Mar 5, 2021
f7bc063
tweak lunr search to submit form
evanwill Mar 9, 2021
fc9ec25
update lunr search options
evanwill Mar 9, 2021
9886ecd
change about credits to opt in to make easier to use layout
evanwill Apr 8, 2021
52086ed
fix docs
evanwill Apr 12, 2021
2b583ce
rearrange ifs in lunr search
evanwill Apr 25, 2021
65f9301
remove demo analytics values
evanwill Jun 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CollectionBuilder-SA

**Note: CollectionBuilder-SA is currently in an active development phase and my differ significantly from the main CollectionBuilder documentation, including the metadata template. Please check "docs" folder in this project for up to date information.**

CollectionBuilder-SA ("Stand Alone") is a template for creating digital collection and exhibit websites using Jekyll, given:

- a CSV of collection metadata
Expand Down
25 changes: 11 additions & 14 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,25 @@ organization-logo-nav: https://www.lib.uidaho.edu/media/digital/bannerlogo_allwh
##########
# COLLECTION SETTINGS
#
# provide location of the digital objects folder,
# If using local folder, dir name with proceeding slash. If using external web location, provide full URL
objects: /objects
# choose metadata: this is the name of the csv file in your _data directory that describes the objects in your collection
metadata: demo-metadata
# page generation settings
# "data" value must be the name of the metadata file (other values should be not be changed)
page_gen:
- data: 'demo-metadata'
template: 'items'
name: 'objectid'
dir: 'items'
extension: 'html'
filter: 'objectid'
# page generation settings [optional!]
# [optional: only used if you need to tweak CB defaults or generate from more than one data file]
# page_gen:
# - data: 'demo-metadata'
# template: 'item'
# name: 'objectid'
# dir: 'items'
# extension: 'html'
# filter: 'objectid'

##########
# GOOGLE SERVICES [optional!]
#
# leave these blank or comment out to NOT include google code
# if present, used to add analytics during "production" build only
# google-analytics-id: "UA-74844011-1"
# google-cse-id: "002151703305773322890:1pu3smhw1t8"
# google-analytics-id:
# google-cse-id:

##########
# ROBOTS EXCLUDE
Expand Down
14 changes: 8 additions & 6 deletions _data/demo-metadata.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
objectid,filename,youtubeid,title,creator,date,description,subject,location,latitude,longitude,source,identifier,type,format,language,rights,rightsstatement
demo001,demo_001.jpg,,"Administration Building, University of Idaho, No. 30",Pacific Photo Co.,1910,"Photographic postcard of the University of Idaho administration building in Moscow, Idaho.",universities; buildings; campuses; picture postcards,"Moscow, Idaho",46.725562,-117.009633,"PG 9, Postcard Collection, University of Idaho Library Special Collections and Archives",pg_9_12_01bl,Image;StillImage,image/jpeg,eng,,http://rightsstatements.org/vocab/NoC-US/1.0/
demo002,demo_002.pdf,,"Spokane County Court House, Spokane, Washington",Spokane Post Card Co.,1912-09-08,"Postcard is of the Spokane County Courthouse in Spokane, Washington. Postmark 9/8/1912, Spokane, WA. Destination San Francisco, CA.",public buildings; county courthouses; trees; picture postcards,"Spokane, Washington",47.66432,-117.428031,"PG 107, Knowles Postcard Collection, University of Idaho Library Special Collections and Archives",Postcard_032,Image;StillImage,application/pdf,eng,,http://rightsstatements.org/vocab/NoC-US/1.0/
demo003,demo_003.mp3,,"Good News - Power",Frank B. Robinson,1947,"Psychiana radio program episode begins with assurance that there is a Power that can get people what they desire. Robinson then discusses his early life failures and childhood seeking of some force that could turn his failures into success. He asserts the God-Power can turn our failures into success and bring us material and spiritual abundance.","Frank B. Robinson; Failure; Success; Material Abundance",,46.733001,-116.991779,"Psychiana Digital Collection, Digital Initiatives, University of Idaho Library",Good_News_08,Audio,audio/mp3,eng,,https://rightsstatements.org/page/InC-EDU/1.0/?language=en
demo004,,CVXQ3X6Q8oU,"University of Idaho vs. University of Southern California (Football), 10/30/1925",Vandal Athletics,1925-10-30,"Idaho Football vs. University of Southern California 10/30/1925 at Neale Stadium in Moscow, ID. Score: 7 - 51 (L).",American Football,"Moscow, Idaho",46.726113 , -117.015671,"Vandal Video Collection, Digital Initiatives, University of Idaho Library","MG 23, Item 29",Image;MovingImage,video/mp4,eng,"CC - Attribution 4.0 International. Digital reproduction rights assigned to the University of Idaho Library by donor/contributing institution/source (as applicable). For more information, please contact University of Idaho Library Special Collections and Archives Department at [email protected].",https://creativecommons.org/licenses/by/4.0/
demo005,https://digital.lib.uidaho.edu/digital/iiif/expforsav/390/full/pct:50/0/default.jpg,,Ford pumper used for slash burning control,,1932-09-01,Ford pumper used for slash burning control. September 1932. From the photo series depicting the broadcast burn at the mouth of Benton Creek.,,"Bonner County;Priest River Experimental Forest;Benton Creek","48.34472222","-116.8483333","The sources for the photos in this collection were as follows: Priest River Experimental Forest, Moscow Foresty Sciences Lab, USDA-Forest Service Region 1 archive, University of Montana Library Gisborne Collection, and Ms. Susan Marsh","FirePump1","Image;StillImage","image/jpeg",eng,"Material produced by the United States Forest Service and is in Public Domain. For more information, please contact University of Idaho Library Special Collections and Archives Department at [email protected].","https://creativecommons.org/publicdomain/mark/1.0/"
objectid,title,creator,date,description,subject,location,latitude,longitude,source,identifier,type,format,language,rights,rightsstatement,object_template,object_download,image_small,image_thumb
demo_001,"Administration Building, University of Idaho, No. 30",Pacific Photo Co.,1910,"Example locally hosted image item. Photographic postcard of the University of Idaho administration building in Moscow, Idaho.",universities; buildings; campuses; picture postcards,"Moscow, Idaho",46.725562,-117.009633,"PG 9, Postcard Collection, Special Collections and Archives, University of Idaho Library",pg_9_12_01bl,Image;StillImage,image/jpeg,eng,,http://rightsstatements.org/vocab/NoC-US/1.0/,image,/objects/demo_001.jpg,/objects/small/demo_001_sm.jpg,/objects/thumbs/demo_001_th.jpg
demo_002,"Spokane County Court House, Spokane, Washington",Spokane Post Card Co.,1912-09-08,"Example locally hosted PDF item. Postcard is of the Spokane County Courthouse in Spokane, Washington. Postmark 9/8/1912, Spokane, WA. Destination San Francisco, CA.",public buildings; county courthouses; trees; picture postcards,"Spokane, Washington",47.66432,-117.428031,"PG 107, Knowles Postcard Collection, Special Collections and Archives, University of Idaho Library",Postcard_032,Image;StillImage,application/pdf,eng,,http://rightsstatements.org/vocab/NoC-US/1.0/,pdf,/objects/demo_002.pdf,/objects/small/demo_002_sm.jpg,/objects/thumbs/demo_002_th.jpg
demo_003,Good News – Power (radio episode),Frank B. Robinson,1947,Example locally hosted audio item. Psychiana radio program episode begins with assurance that there is a Power that can get people what they desire. Robinson then discusses his early life failures and childhood seeking of some force that could turn his failures into success. He asserts the God-Power can turn our failures into success and bring us material and spiritual abundance.,Frank B. Robinson; Failure; Success; Material Abundance,"Moscow, Idaho",46.733001,-116.991779,"Psychiana Digital Collection, Digital Initiatives, University of Idaho Library, https://www.lib.uidaho.edu/digital/psychiana/",Good_News_08,Audio,audio/mpeg,eng,,http://rightsstatements.org/vocab/InC-EDU/1.0/,audio,/objects/demo_003.mp3,/objects/small/demo_003_sm.jpg,/objects/thumbs/demo_003_th.jpg
demo_004,"University of Idaho vs. University of Southern California (Football), 10/30/1925",Vandal Athletics,1925-10-30,"Example YouTube video item. Idaho Football vs. University of Southern California 10/30/1925 at Neale Stadium in Moscow, ID. Score: 7 - 51 (L).",American Football,"Moscow, Idaho",46.726113,-117.015671,"Vandal Video Collection, Digital Initiatives, University of Idaho Library, https://www.lib.uidaho.edu/digital/vandalvideo/","MG 23, Item 29",Image;MovingImage,video/mp4,eng,"In Copyright - Educational Use Permitted. For more information, please contact University of Idaho Library Special Collections and Archives Department at [email protected].",http://rightsstatements.org/vocab/InC-EDU/1.0/,video-embed,https://youtu.be/CVXQ3X6Q8oU,https://img.youtube.com/vi/CVXQ3X6Q8oU/mqdefault.jpg,https://img.youtube.com/vi/CVXQ3X6Q8oU/default.jpg
demo_005,Interview with K. Silem Mohammad,Devin Becker,2014-06-16,Example Vimeo video item. Oral history interview with poet K. Silem Mohammad discussing recent changes in writing practices that occurred due to the advent of the computer and the arrival of the digital age.,Poetry,"Ashland, OR",42.1916714,-122.728533,"CTRL+Shift, Center for Digital Inquiry and Learning, University of Idaho Library, https://ctrl-shift.org/",,Image;MovingImage,video/mp4,eng,"In Copyright - Educational Use Permitted. For more information, please contact University of Idaho Library Special Collections and Archives Department at [email protected].",http://rightsstatements.org/vocab/InC-EDU/1.0/,video-embed,https://vimeo.com/464555587,,
demo_006,Ford pumper used for slash burning control,"Thompson, J. B.",1932-09-01,Example image item externally hosted on CONTENTdm. Ford pumper used for slash burning control. September 1932. From the photo series depicting the broadcast burn at the mouth of Benton Creek.,forestry,Bonner County;Priest River Experimental Forest;Benton Creek,48.34472222,-116.8483333,"Experimental Forest and Savenac Nursery Archive, Digital Initiatives, University of Idaho Library, https://www.lib.uidaho.edu/digital/expforest/",FirePump1,Image;StillImage,image/jpg,eng,"Material produced by the United States Forest Service and is in Public Domain. For more information, please contact University of Idaho Library Special Collections and Archives Department at [email protected].",http://rightsstatements.org/vocab/NoC-US/1.0/,image,https://digital.lib.uidaho.edu/digital/iiif/expforsav/390/full/max/0/default.jpg,https://digital.lib.uidaho.edu/digital/iiif/expforsav/390/full/pct:20/0/default.jpg,https://digital.lib.uidaho.edu/utils/getthumbnail/collection/expforsav/id/390
demo_007,"Influence of Fishway Placement on Fallback of Adult Salmon at the Bonneville Dam on the Columbia River","Reischel, T.S.; Bjornn, T.C.",2003,"Example metadata only record with link to external source. Journal article.",fisheries management,Bonneville Dam,45.6442837,-121.9428256,"North American Journal of Fisheries Management, vol. 23, issue 4, p. 1215-1224. DOI: 10.1577/M02-113",DOI:10.1577/M02-113,Text,application/pdf,eng,"Metadata only record, please check publication for rights",,record,https://www.doi.org/10.1577/M02-113,,
13 changes: 12 additions & 1 deletion _data/theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# featured image is used in home page banner and in meta markup to represent the collection
# use either an objectid (from an item in this collect), a relative location of an image in this repo, or a full url to an image elsewhere
featured-image: demo001
featured-image: demo_001
# optional: add extra padding around collection title for a larger image feature.
home-title-y-padding: 12em # the margin from the top your title portion will appear.
# optional: change position of background image, center, top, bottom
Expand Down Expand Up @@ -72,6 +72,7 @@ map-cluster-radius: 25 # size of clusters, from ~ 10 to 80
##########
# TIMELINE PAGE
#
# set either year-navigation or year-nav-increment to generate a year nav dropdown
year-navigation: #"1900;1905;1910;1915;1920" # manually set years to appear in dropdown nav
year-nav-increment: 5 # set increments to auto gen nav years

Expand Down Expand Up @@ -107,3 +108,13 @@ text-color: "#191919"
link-color: "#17a2b8"
base-font-family: # comment out for bootstrap defaults. e.g. Roboto
font-cdn: # add font stylesheet, e.g. <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">

# THEME ICONS
# the template uses Bootstrap Icons, https://icons.getbootstrap.com/
# find the names on the BI icons page, e.g. file-image
icon-image: image
icon-audio: file-play
icon-video: film
icon-pdf: file-richtext
icon-default: file-earmark # fall back icon
icon-scroll-to-top: arrow-up-square # icon for scroll to top button
18 changes: 9 additions & 9 deletions _includes/data-download-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h5 class="modal-title" id="dataModalLabel">Collection Data</h5>
<div class="card-body">
<h5 class="card-title">Complete Metadata</h5>
<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' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Metadata CSV</a>
<a href="{{ '/assets/data/metadata.json' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Metadata JSON</a>
<a href="{{ '/assets/data/metadata.csv' | relative_url }}" class="btn btn-outline-dark" target="_blank">Metadata CSV</a>
<a href="{{ '/assets/data/metadata.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Metadata JSON</a>
</div>
</div>
{%- endif -%}
Expand All @@ -36,7 +36,7 @@ <h5 class="card-title">Complete Metadata</h5>
<div class="card-body">
<h5 class="card-title">Metadata Facets</h5>
<p class="card-text">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' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Facets JSON</a>
<a href="{{ '/assets/data/facets.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Facets JSON</a>
</div>
</div>
{%- endif -%}
Expand All @@ -45,8 +45,8 @@ <h5 class="card-title">Metadata Facets</h5>
<div class="card-body">
<h5 class="card-title">Subject Metadata</h5>
<p class="card-text">Unique values and counts of subject metadata, useful for further analyzing the content of this collection.</p>
<a href="{{ '/assets/data/subjects.csv' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Subjects CSV</a>
<a href="{{ '/assets/data/subjects.json' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Subjects JSON</a>
<a href="{{ '/assets/data/subjects.csv' | relative_url }}" class="btn btn-outline-dark" target="_blank">Subjects CSV</a>
<a href="{{ '/assets/data/subjects.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Subjects JSON</a>
</div>
</div>
{% endif %}
Expand All @@ -55,8 +55,8 @@ <h5 class="card-title">Subject Metadata</h5>
<div class="card-body">
<h5 class="card-title">Locations</h5>
<p class="card-text">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' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Locations CSV</a>
<a href="{{ '/assets/data/locations.json' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Locations JSON</a>
<a href="{{ '/assets/data/locations.csv' | relative_url }}" class="btn btn-outline-dark" target="_blank">Locations CSV</a>
<a href="{{ '/assets/data/locations.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Locations JSON</a>
</div>
</div>
{%- endif -%}
Expand All @@ -65,7 +65,7 @@ <h5 class="card-title">Locations</h5>
<div class="card-body">
<h5 class="card-title">GeoJSON</h5>
<p class="card-text">Metadata for all collection items that have geographic coordinates in <a href="https://en.wikipedia.org/wiki/GeoJSON" target="_blank" rel="noopener">GeoJSON</a> format, useful for further exploration and analysis of this collection through a geographical lense.</p>
<a href="{{ '/assets/data/geodata.json' | absolute_url }}" class="btn btn-outline-dark" target="_blank">Geodata JSON</a>
<a href="{{ '/assets/data/geodata.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">Geodata JSON</a>
</div>
</div>
{%- endif -%}
Expand All @@ -74,7 +74,7 @@ <h5 class="card-title">GeoJSON</h5>
<div class="card-body">
<h5 class="card-title">Timeline</h5>
<p class="card-text">A time-focused JSON data export designed for use with <a href="https://timeline.knightlab.com/" target="_blank" rel="noopener">TimelineJS</a>.</p>
<a href="{{ '/assets/data/timelinejs.json' | absolute_url }}" class="btn btn-outline-dark" target="_blank">TimelineJS JSON</a>
<a href="{{ '/assets/data/timelinejs.json' | relative_url }}" class="btn btn-outline-dark" target="_blank">TimelineJS JSON</a>
</div>
</div>
{%- endif -%}
Expand Down
1 change: 0 additions & 1 deletion _includes/download/item.html

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/feature/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="card mb-3{% if include.float %} feature-float-{{ include.float }}{% endif %}{% if include.width %} feature-w-{{ include.width }}{% endif %}{% if include.centered %} mx-auto{% endif %}">
{% if include.objectid %}
{% assign item = site.data[site.metadata] | where: "objectid", include.objectid | first %}
<img class="card-img-top" src="{% include image/small.html %}" alt="{{ item.title | escape }}">
<img class="card-img-top" src="{% if item.image_small %}{{ item.image_small | relative_url }}{% elsif item.image_thumb %}{{ item.image_thumb | relative_url }}{% else %}{{ item.object_download | relative_url }}{% endif %}" alt="{{ item.title | escape }}">
{%- endif -%}
{% if include.header %}<h5 class="card-header">{{ include.header }}</h5>{% endif %}
<div class="card-body">
Expand Down
15 changes: 15 additions & 0 deletions _includes/feature/icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{%- comment -%}

Bootstrap Icons, https://icons.getbootstrap.com/

This include adds a bootstrap icon using the SVG Sprite approach. This works similar to Icon Fonts. The svg will inherit font size and color from the parent, so can be used with other text.

E.G. --> {% include feature/icon.html icon="file-play" label="Audio file" %}

Options:
- "icon" = a Bootstrap Icon name, e.g. "file-image", "file-play"
- "label" = a label for accessibility (optional)
- "class" = extra classes to add directly to the svg element (optional)

{%- endcomment -%}
<svg class="bi icon-sprite {% if include.class %}{{ include.class }}{% endif %}" aria-hidden="true"><use xlink:href="{{ '/assets/lib/bootstrap-icons.svg' | relative_url }}#{{ include.icon }}" href="{{ '/assets/lib/bootstrap-icons.svg' | relative_url }}#{{ include.icon }}"></use></svg>{% if include.label %}<span class="sr-only">{{ include.label }}</span>{% endif %}
Loading