Fancybox for group-picture and post-gallery#667
Fancybox for group-picture and post-gallery#667stevenjoezhang merged 4 commits intotheme-next:masterfrom PKUPI:fancybox
Conversation
|
screenshot? never use this feature...😂 |
|
@stevenjoezhang I tested group pictures, it's fancybox now, good job. |
|
You can also try this: |
| {% if loop.index0 % COLUMN_NUMBER === 0 %}<div class="post-gallery-row">{% endif %} | ||
| <a class="post-gallery-img fancybox" | ||
| href="{{ url_for(photo) }}" rel="gallery_{{ post._id }}" | ||
| itemscope itemtype="http://schema.org/ImageObject" itemprop="url"> |
There was a problem hiding this comment.
But why u remove http://schema.org/ImageObject here?
There was a problem hiding this comment.
This attribute belongs to the <a> tag which causes the bug, and that's why I removed it. I'll try to add it back, and test if fancybox still works fine.
|
I make some other big changes to fit both fancybox 2 and 3, you can check again |
|
@maple3142 What happened? |
|
@stevenjoezhang answer is here 😂 |
|
@1v9 Is it a mistake? |
|
@stevenjoezhang yeah i think so. merge upstream -> push to NexT? |
|
Done |
|
Sorry, I clone NexT theme from this repo to my site. |
|
@stevenjoezhang 👍 |
ivan-nginx
left a comment
There was a problem hiding this comment.
Check images on https://validator.w3.org ?
| itemscope itemtype="http://schema.org/ImageObject" itemprop="url"> | ||
| <img src="{{ url_for(photo) }}" itemprop="contentUrl"/> | ||
| </a> | ||
| <img src="{{ url_for(photo) }}" itemprop="contentUrl"/> |
There was a problem hiding this comment.
Maybe we must add itemscope itemtype="http://schema.org/ImageObject" here, before itemprop="contentUrl"? It's for schema.
| $imageWrapLink.addClass('fancybox fancybox.image'); | ||
| $imageWrapLink.attr('rel', 'group'); | ||
| var imageLink = $image.attr('data-original') || $image.attr('src'); | ||
| $imageWrapLink = $image.wrap('<a class="fancybox fancybox.image" href="' + imageLink + '" itemscope itemtype="http://schema.org/ImageObject" itemprop="url"></a>').parent('a'); |
There was a problem hiding this comment.
@ivan-nginx Maybe the answer is no? See here.
There was a problem hiding this comment.
Oh, ok ok. So long line there...
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue resolved: #296
See: iissnan/hexo-theme-next@6077877
What is the new behavior?
How to use?
In NexT
_config.yml:Does this PR introduce a breaking change?