Skip to content
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

Thumbnails on Pedigree Map page rather small and without CSS class #29

Closed
reteP-riS opened this issue Jul 17, 2022 · 2 comments
Closed

Comments

@reteP-riS
Copy link

I like the thumbnails on the right side of the Pedigree Map page, but (from my point of view) they are rather small (height:40px; width:50px) and cannot be styled via the CSS and JS module with a different size because they are missing a CSS class (while the icon-silhouettes have a CSS class). It seems to me the _buildMapData function produces this code, but I couldn't find the respective module code.

Example for a person with a thumbnail:

<div class="d-none d-lg-block">
<a class="gallery"
   type="image/jpeg"
   href="https://webtrees.example.com/tree/myTree/media-download?xref=M416&fact_id=3427656abf64cb7024bbe451f008ac&disposition=inline&mark=0"
   data-title="Portrait Grandma">
<img dir="auto"
     src="https://webtrees.example.com/tree/myTree/media-thumbnail?xref=M416&fact_id=3427656abf64cb7024bbe451f008ac&w=40&h=50&fit=crop&mark=0&s=743a657a1ef7c4da6d1fd9ec7faf70"
  srcset="https://webtrees.example.com/tree/myTree/media-thumbnail?xref=M416&fact_id=3427656abf64cb7024bbe451f008ac&w=80&h=100&fit=crop&mark=0&s=95b97f477f485ecbefdac0cf06952d 2x,
          https://webtrees.example.com/tree/myTree/media-thumbnail?xref=M416&fact_id=3427656abf64cb7024bbe451f008ac&w=120&h=150&fit=crop&mark=0&s=5211aa53822d97160e9e94a89b8e17 3x,
          https://webtrees.example.com/tree/myTree/media-thumbnail?xref=M416&fact_id=3427656abf64cb7024bbe451f008ac&w=160&h=200&fit=crop&mark=0&s=2689e659aeda8a680c4ab4072cd7f4 4x"
          alt="Portrait Grandma"></a>
</div>

Example for a person without thumbnail and consequently a silhouette:

<div class="d-none d-lg-block">
  <i class="icon-silhouette icon-silhouette-m wt-icon-flip-rtl">
  </i>
</div>

The first example results in a 40x50 pixel thumbnail that cannot be styled and doesn't use the different sizes suggested by the srcset.

It would be great if you could add a CCS class to this line
<img dir="auto" src="https://webtrees.example.com/tree/myTree/media-thumbnail ...
with something like this:
<img class="wt-chart-box-thumbnail" dir="auto" src="https://webtrees.example.com/tree/myTree/media-thumbnail ...

@ric2016
Copy link
Contributor

ric2016 commented Jul 21, 2022

The custom module re-uses code from the original webtrees PedigreeMapModule module, which I'm reluctant to drill down into.

The images (or silhouettes) are created here. I think the missing css class should be added by webtrees core code (this may be useful elsewhere). I suggest creating a webtrees issue for this. I'll reconsider in case webtrees refuses to address this.

@reteP-riS
Copy link
Author

Thanks for your reply and the time you spent on this!
I'll create a new issue with webtrees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants