image_tiles
An ingredient for displaying image documents from a specified eprint as a tile display on an xpage
Science Score: 31.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.9%) to scientific vocabulary
Keywords
Repository
An ingredient for displaying image documents from a specified eprint as a tile display on an xpage
Basic Info
- Host: GitHub
- Owner: eprints
- Language: JavaScript
- Default Branch: main
- Homepage: https://research.uca.ac.uk
- Size: 14.6 KB
Statistics
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
Display images from a hidden eprint in a tile within an xpage
Basic Config - Tile curation mode
This configuration allows you to curate the images shown in the tiles, you will need to create an item which contains images and then provide each document with a title and link. Instructions below.
- Make sure you have added this ingredient to the flavour/FLAVOURDIR/inc file as `ingredients/imagetiles`.
- Add the first XML markup example snippet (below instructions) to the xpage file where you would like the tile to be displayed.
- Create an item (of any type) and add 16 images (number configurable) to the eprint. Note that items are reduced to a square so you should optimize the image before upload if a specific portion of the image is desired.
- For each item add the title and the tile link split by an
@symbol into the format description field. Like this...Tile Title@5128if going to an eprint OR Like this...Tile Title@https://external.site.com/page.html. - Make the item live by depositing.
- Replace XXXX in the xpage code (eprint_id parameter) with the eprintid of the item containing the documents you wish to display. The following are all optionally configurable extras. If you wish to see the result, (when appropriate) reload apache.
- Optionally you can set a new limit if the amount of images is different. See example sippet below with an added argument. To show a random selection of images from a larger pool intentionally set the limit lower than the number of documents added.
- If you wish to make the documents display in a random order, add the random parameter equal to 1. Seen in the 3rd XML snippet.
XML
<div id="image-tile"></div>
<script type="text/javascript">
new Ajax.Updater('image-tile',"/cgi/image_tile", {method:"GET", parameters:"eprint_id=XXXX"});
</script>
XML
<div id="image-tile"></div>
<script type="text/javascript">
new Ajax.Updater('image-tile',"/cgi/image_tile", {method:"GET", parameters:"eprint_id=XXXX&limit=X"});
</script>
XML
<div id="image-tile"></div>
<script type="text/javascript">
new Ajax.Updater('image-tile',"/cgi/image_tile", {method:"GET", parameters:"eprint_id=XXXX&limit=21&random=1"});
</script>
Non-curated mode
XML
<style> .tile { --stagger-delay: 0ms; } </style>
<div id="image-tile"></div>
<script type="text/javascript">
new Ajax.Updater('image-tile',"/cgi/image_tile.all", {method:"GET", parameters:"limit=16&random=1"});
</script>
Parameters
| parameter | argument | outcome | | ----------- | ----------- | ----------- | | eprint_id | natural numeric | i.e. linking to your.repo.ac.uk/234 | | limit | natural numeric | sets the limit for the number of | | random | 0 or 1 | from the images attached to the item display them in a random order |
TODO
- Utilize caching of citations
- Non curated mode, where applicable documents are pulled from a recent selection of eprints
Authors:
- Edward Oakley, EPrints Services
- Justin Bradley, EPrints Services
Developed as part of UCA Research Online rebrand (2022). Example seen on their homepage.
EPrints 3.4 is supplied by EPrints Services.
The files contained within this directory are all Copyright 2022 University of Southampton.
Owner
- Name: EPrints.org
- Login: eprints
- Kind: organization
- Location: University of Southampton, UK
- Website: www.eprints.org
- Twitter: eprints
- Repositories: 50
- Profile: https://github.com/eprints
EPrints Repository Software
Citation (citations/document/render_image_tile.xml)
<?xml version="1.0" ?>
<cite:citation xmlns="http://www.w3.org/1999/xhtml" xmlns:cite="http://eprints.org/ep3/citation" xmlns:epc="http://eprints.org/ep3/control">
<div class="tile">
<a href="{$link}">
<img src="{$item.thumbnail_url('lightbox')}" />
<div class="tile-color-overlay">
</div>
<div class="tile-info">
<div class="tile-title">
<epc:print expr="$title"/>
</div>
<div class="tile-link">
<epc:phrase ref="image_tile:tile_link_description" />
<svg width="30" height="14" viewBox="0 0 30 14" xmlns="http://www.w3.org/2000/svg">
<path d="M23.414 14c-.2 0-.35-.048-.45-.145-.299-.29-.299-.58 0-.87l5.015-5.368H.6c-.4 0-.599-.194-.599-.58 0-.388.2-.581.599-.581h27.38l-5.014-5.368c-.3-.29-.3-.58 0-.87.3-.29.599-.29.898 0L29.85 6.6c.1.097.15.242.15.435 0 .194-.05.339-.15.436-.05.048-2.045 2.176-5.987 6.383-.1.097-.25.145-.45.145z" fill-rule="nonzero"></path>
</svg>
</div>
</div>
</a>
</div>
</cite:citation>
GitHub Events
Total
- Create event: 1
- Release event: 1
- Issues event: 4
- Issue comment event: 1
- Push event: 2
Last Year
- Create event: 1
- Release event: 1
- Issues event: 4
- Issue comment event: 1
- Push event: 2