Comments (6)
Ksenia has some images that are too detailed and difficult to read — it would be great if we could click on them to see them enlarged. I think we used to have this in the original design, but I don't think we ever implemented it. Or am I missing it?
from dariah-campus.
Hi @stefanprobst, I haven't heard from you about this one. Do you think you'll be able to help out? It affects our published resources so it would be great if we didn't have to wait until you start working on the more long-term issues that we discussed on Zoom.
from dariah-campus.
we could
- either with a component similar to the video lightbox component (=> https://github.com/DARIAH-ERIC/dariah-campus/compare/feat/lightbox) -- if this should be default we could auto-wrap images with this via mdxprovider
- or by using an option for
gatsby-remark-image
which would make images in markdown clickable links to the original image (set this totrue
). unfortunately this hasn't been working for me so far. EDIT: works, i've for now enabled this as default
from dariah-campus.
Very cool! Many thanks.
I will probably prefer the lightbox version to be the default one, but let me test it first. When I do, I'll let you know.
from dariah-campus.
Ok, I tested the ImageLightbox, but I have two questions:
- can we add alt and title parameters to the ImageLightbox? And then use title (with a fallback to alt) to create a caption a là #53?
- can you please explain the difference between "image" and "images" in
const ImageLightbox = ({ image, images, ...props })
and how to useimgHigh
andimgLow
?
Many thanks in advance!
from dariah-campus.
* can we add alt and title parameters to the ImageLightbox? And then use title (with a fallback to alt) to create a caption a là #53?
not yet, but a caption
prop would be easy to add.
* can you please explain the difference between "image" and "images" in `const ImageLightbox = ({ image, images, ...props })` and how to use `imgHigh` and `imgLow`?
the ImageLightbox
component works similarly to our current VideoCard
component: it takes an image
prop with the relative path of the image. the images
(plural) prop of both the VideoCard
and ImageLightbox
are not public API (maybe we should prefix with underscore to make this clearer). what does it do and why is it there? gatsby will automatically optimize images for us and produce a srcset
for different viewports. we can hook into this pipeline via a graphql query. unfortunately, we cannot export queries from mdx files, so we query for the images in the images
subfolder of a resource in our posts template:
https://github.com/DARIAH-ERIC/dariah-campus/blob/master/src/templates/post.js#L163-L172
and then inject the result via the images
prop:
https://github.com/DARIAH-ERIC/dariah-campus/blob/master/src/templates/post.js#L69-L71
similarly:
in the component itself we can then just look up the filename passed via image
prop.
regarding imgLow/imgHigh -- this is an implementation detail, and we might not even want to do this. my thinking was that the image needs to be in high resolution to look good in a fullscreen lightbox. so we produce a new image set with higher maxWidth and quality/compression. however, we should first try if just bumping the quality
setting to 100 for all images is a good compromise (images would be a bit bigger, but we don't have to produce to image sets at build time and could save a request)
from dariah-campus.
Related Issues (20)
- Moving 'Events' from Sources to the top main menu
- [new resource]: Why Space is Special: An Introduction into GIS and Geospatial History HOT 1
- [new resource]: A Non-Technical Guide to Technical GIS Methods
- [new resource]: Here There be Monsters: Maps as a Narrative Tool
- [new resource]: Google My Maps for Everyday Use: A Tutorial
- [new resource]: Data and Databases: An Introduction HOT 2
- [new resource]: Data and Databases: From Source to Data
- [new resource]: Data and Databases: Entities and Relationships
- [new resource]: Data and Databases: Scoping a Database
- [new resource]: Data and Databases: Data Ethics
- [new resource]: Data and Databases: Data Management and Storage
- 503 Service Temporarily Unavailable for "Digital Scholarly Editions: Manuscripts, Texts and TEI Encoding" resource HOT 5
- Alt Text and Caption not displaying for images HOT 1
- [new resource]: Automatic Text Recognition (ATR) - How To Get Started HOT 1
- [new resource]: Automatic Text Recognition - Video 2: Get images HOT 1
- [new resource]: Automatic Text Recognition (ATR) - Video 3: Image Optimisation HOT 1
- [new resource]: Automatic Text Recognition (ATR) - Video 4: Layout Analysis HOT 1
- [new resource]: Automatic Text Recognition (ATR) - Video 5: Text Recognition and Model Training HOT 1
- [new resource]: Automatic Text Recognition (ATR) - Video 6: End formats and Reusability HOT 1
- Adding exportable citation data to resources
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dariah-campus.