-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
白云苍狗
committed
Sep 20, 2022
1 parent
39331d0
commit 6f9c009
Showing
9 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<article class="trm-card trm-publication"> | ||
<article class="trm-publication"> | ||
<%- page.content %> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<% if(theme.reward.enable || page.reward){ %> | ||
<div class="trm-reward"> | ||
<% if(theme.reward.url){ %> | ||
<a rel="noopener" href='<%- theme.reward.url %>' target='_blank' class="trm-reward-btn trm-glow"> | ||
<%- icon(theme.icons.reward) %> | ||
</a> | ||
<% } else { %> | ||
<span class="trm-reward-btn trm-glow" onclick='var qr = document.getElementById("qr"); qr.style.display = (qr.style.display === "none") ? "block" : "none";'> | ||
<%- icon(theme.icons.reward) %> | ||
</span> | ||
<% } %> | ||
<p class="trm-reward-comment"><%- __(theme.reward.comment) %></p> | ||
<div id="qr" style="display:none;"> | ||
<% if(Array.isArray(theme.reward.methods)) { | ||
theme.reward.methods.forEach(method =>{ %> | ||
<div style="display:inline-block"> | ||
<a rel="noopener" href='<%- method.link ? method.link : method.path %>' target='_blank' > | ||
<img src="<%- url_for(method.path) %>" alt="<%- method.name %>" loading="lazy"> | ||
</a> | ||
</div> | ||
<% }) | ||
} %> | ||
</div> | ||
</div> | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
package/hexo-theme-async/source/css/_components/reward.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.trm-reward { | ||
padding : 2rem 0 0 0; | ||
text-align: center; | ||
margin : auto; | ||
|
||
.trm-reward-btn { | ||
border-radius : 50%; | ||
display : inline-flex; | ||
justify-content: center; | ||
align-items : center; | ||
width : 2.5rem; | ||
height : 2.5rem; | ||
color : @primary; | ||
border-radius : 100%; | ||
cursor : pointer; | ||
} | ||
|
||
.trm-reward-comment { | ||
margin-top: 1rem; | ||
color : @theme-color ; | ||
} | ||
|
||
#qr img { | ||
width : 10rem; | ||
height : 10rem; | ||
display : inline-block; | ||
margin : 1rem 1rem 0 1rem; | ||
padding : 5px; | ||
border-radius : 5px; | ||
transition-property: all; | ||
transition-duration: .3s; | ||
transition-delay : 0s; | ||
box-shadow : @box-shadow; | ||
} | ||
} |