-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fancybox for group-picture and post-gallery #667
Conversation
screenshot? never use this feature...😂 |
@stevenjoezhang I tested group pictures, it's fancybox now, good job. |
You can also try this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ!
@@ -271,11 +271,7 @@ | |||
{% set COLUMN_NUMBER = 3 %} | |||
{% for photo in post.photos %} | |||
{% 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why u remove http://schema.org/ImageObject
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivan-nginx Maybe the answer is no? See here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?