-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore(theme/plugin): improve external links behavior and visibility #2054
Conversation
Theme name validation passed. |
themes/navy/layout/partial/theme.njk
Outdated
@@ -5,10 +5,15 @@ | |||
</noscript> | |||
<img data-src="{{ url_for('themes/screenshots/' + plugin.name + '.png') }}" data-sizes="auto" class="plugin-screenshot-img lazyload" alt="{{ plugin.name }}"> | |||
{% if plugin.preview %} | |||
<a href="{{ plugin.preview }}" class="plugin-preview-link" target="_blank"><i class="fa fa-eye"></i></a> | |||
<a href="{{ url_for('themes/screenshots/' + plugin.name + '.png') }}" class="plugin-preview-image" target="_blank"><i class="fa fa-eye"></i></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.
Open a new tab instead of transferred to external link when user clicks theme thumb.
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.
We can use components like Fancybox or Medium Zoom to support image zooming and display.
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.
Yes, however, to be honest, it was a little bit tedious, so I implemented it open with new tab 😓
I'll give it a try later.
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.
{% endif %} | ||
</div> | ||
<a href="{{ plugin.link }}" class="plugin-name" target="_blank">{{ plugin.name }}</a> | ||
<a href="{{ plugin.link }}" class="plugin-name" target="_blank">{{ plugin.name }} <i class="fa fa-external-link"></i></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.
add <i class="fa fa-external-link"></i>
to mark it as an external link explicitly.
<a href="{{ plugin.link }}" class="plugin-name" target="_blank">{{ plugin.name }} <i class="fa fa-external-link"></i></a> | ||
{% if plugin.preview %} | ||
<div class="plugin-preview-wrap"> | ||
<a href="{{ plugin.preview }}" class="plugin-preview-link" target="_blank"> Visit preview site <i class="fa fa-external-link"></i></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.
Add preview link site instead of line 8
This is a good idea, maybe it can be applied to |
Check List
What is for?
Current theme page has some issues.
After this PR (image)
This PR is temporary solution for these issues.
Othres
refs: https://github.com/orgs/hexojs/discussions/5267#discussioncomment-6716225
Thank you :)