-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Han Support https://hanzi.pro/ #1558 #1222 #698 #1598
Conversation
layout/_partials/head.swig
Outdated
@@ -3,6 +3,11 @@ | |||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> | |||
|
|||
|
|||
{% if theme.han %} | |||
<link rel="stylesheet" media="all" href="//cdnjs.cloudflare.com/ajax/libs/Han/3.2.7/han.min.css"> |
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.
cloudflare的CDN在国内很慢吧?
建议不要直接引用CDN,直接将资源文件放在主题里,同时提供CDN选项,可以参考其他资源文件。
Thanks. 👍 |
@@ -249,7 +249,7 @@ | |||
{% endif %} | |||
|
|||
|
|||
<div class="post-body" itemprop="articleBody"> | |||
<div class="post-body han-init-context" itemprop="articleBody"> |
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.
Where is the switch for han-init-context
?
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.
It's just a hook. When Han is not enabled, it will not have any effect.
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 it's will be in default class style. It was hard to do this?
<div class="post-body{% if theme.han %} han-init-context{% endif %}" itemprop="articleBody">
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.
Thanks for your suggestion. :) 756c49c
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.
In ideal, this switches must be anywhere on any custom options.
No description provided.