-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Metadata Info Bar #77
Comments
I actually figured out how to do this with the native EXIF parser. If you're accepting pull requests, happy to add it! I'm thinking it can be behind a config flag. |
You could add a section to <a class="gallery-item" href="{{ $image.RelPermalink }}" data-pswp-src="{{ $full.RelPermalink }}" data-pswp-width="{{ $full.Width }}" data-pswp-height="{{ $full.Height }}" title="{{ .Title }}" itemscope itemtype="https://schema.org/ImageObject" style="aspect-ratio: {{ $thumbnail.Width }} / {{ $thumbnail.Height }}">
<img loading="lazy" width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" src="{{ $thumbnail.RelPermalink }}" style="background-color: {{ $color }}" alt="{{ .Title }}" />
+ {{ if $image.Exif }}
+ <span class="pswp-caption-content">
+ {{ with .Title }}{{ . }}<br />{{ end }}
+ {{ with $image.Exif.Tags }}
+ {{ if .Model }}
+ {{ .Make }} {{ .Model }} ·
+ {{ end }}
+ {{ with .FocalLength }}{{ . }}mm · {{ end }}
+ {{ with .ApertureValue }}f/{{ div (math.Round (mul (float .) 10)) 10 }}{{ end }}
+ {{ with .ExposureTime }}{{ . }}s · {{ end }}
+ {{ with .ISO }}ISO {{ . }}{{ end }}
+ {{ end }}
+ </span>
+ {{ end }}
<meta itemprop="contentUrl" content="{{ $image.RelPermalink }}" />
{{ with site.Params.Author }}
<span itemprop="creator" itemtype="https://schema.org/Person" itemscope>
<meta itemprop="name" content="{{ site.Params.Author.name }}" />
</span>
{{ end }}
</a> … and remove the |
Thank you! That is perfect! Do you know if its possible to include a link in the caption? Whenever I add an Essentially I'm trying to add a Google Maps link based on the GPS data: {{ with $image.Exif.Long }}
· <a href="https://www.google.com/maps/place/{{ $image.Exif.Lat }},{{ $image.Exif.Long }}">Map</a>
{{ end }} |
it's an issue with the gallery lightbox configuration, to make it work there are at least 2 requirements:
I made a POC for this, because i wanted to share a local video link from params to the caption: 77bf36e I don't see others issue with the fix but maybe it broke something else. PS: The poc also synchronize title attribute value (visible on overlay) of the link/image and the caption, but of course, link in the title cannot be used. |
It would be awesome to have an option to display the photo metadata (Camera, exposure, aperture, focal length, etc) underneath the title/description text when the photo is expanded.
Here's an example:
Thanks for all your work on this awesome theme!
The text was updated successfully, but these errors were encountered: