mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Optimize post-reward style
This commit is contained in:
parent
7d25c16d21
commit
35355277f8
@ -1,9 +1,9 @@
|
||||
<div class="reward-container">
|
||||
<div>{{ page.reward_settings.comment }}</div>
|
||||
<button onclick="var qr = document.getElementById('qr'); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
|
||||
<button onclick="document.getElementById('post-reward').classList.toggle('active');">
|
||||
{{ __('reward.donate') }}
|
||||
</button>
|
||||
<div id="qr" style="display: none;">
|
||||
<div id="post-reward">
|
||||
|
||||
{%- for name, image in theme.reward %}
|
||||
{%- set builtin = ['wechatpay', 'alipay', 'paypal', 'bitcoin'] %}
|
||||
@ -12,7 +12,7 @@
|
||||
{% else %}
|
||||
{%- set translation = name %}
|
||||
{%- endif %}
|
||||
<div style="display: inline-block;">
|
||||
<div>
|
||||
<img src="{{ url_for(image) }}" alt="{{ author }} {{ translation }}">
|
||||
<p>{{ translation }}</p>
|
||||
</div>
|
||||
|
||||
@ -24,8 +24,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
#qr {
|
||||
#post-reward {
|
||||
padding-top: 20px;
|
||||
display: none;
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div {
|
||||
display: inline-block;
|
||||
|
||||
if (hexo-config('reward_settings.animation')) {
|
||||
&:hover p {
|
||||
animation: roll .1s infinite linear;
|
||||
// The animation may affect :hover of img in dark mode
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
@ -33,20 +50,14 @@
|
||||
max-width: 100%;
|
||||
width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
if (hexo-config('reward_settings.animation')) {
|
||||
div:hover p {
|
||||
animation: roll .1s infinite linear;
|
||||
}
|
||||
@keyframes roll {
|
||||
from {
|
||||
transform: rotateZ(30deg);
|
||||
}
|
||||
|
||||
@keyframes roll {
|
||||
from {
|
||||
transform: rotateZ(30deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotateZ(-30deg);
|
||||
}
|
||||
}
|
||||
to {
|
||||
transform: rotateZ(-30deg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
padding: 0;
|
||||
|
||||
.popular-posts-item {
|
||||
// list-style: none;
|
||||
margin-left: 2em;
|
||||
|
||||
.popular-posts-title {
|
||||
|
||||
@ -20,7 +20,6 @@
|
||||
line-height: 1.8;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
// text-align: justify;
|
||||
|
||||
if (!hexo-config('toc.wrap')) {
|
||||
white-space: nowrap;
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
text-align: left;
|
||||
|
||||
.btn {
|
||||
// color: $grey-dim;
|
||||
background: none;
|
||||
border: 0;
|
||||
border-bottom: 2px solid var(--btn-default-border-color);
|
||||
|
||||
@ -90,8 +90,6 @@
|
||||
}
|
||||
|
||||
.links-of-blogroll-item {
|
||||
//padding: 0;
|
||||
|
||||
if (hexo-config('links_settings.layout') == 'inline') {
|
||||
display: inline-block;
|
||||
sidebar-inline-links-item();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user