Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #194 from hexo-theme-Acrylic/dev
Browse files Browse the repository at this point in the history
1.1.6版本发布
  • Loading branch information
adil-zhang committed Jul 24, 2023
2 parents 6a99c80 + 015873e commit 5933caf
Show file tree
Hide file tree
Showing 18 changed files with 252 additions and 25 deletions.
13 changes: 12 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ aside:
Sticky: "newestPost,allInfo"

card:
avatar:
content: 这有关于<b>开发</b>、<b>技术</b>相关的问题和看法,还有对于动漫的一些<b>杂评</b>。<br>相信你可以在这里找到对你有用的知识和教程。
information:
# Github:
Expand Down Expand Up @@ -211,6 +212,16 @@ footer:

randomlink: false

cdn:
url:
desc:
rss:
url:
license:
url: https://creativecommons.org/licenses/by/4.0/
icon: fas fa-closed-captioning


page:
error: true
tags: true
Expand Down Expand Up @@ -330,4 +341,4 @@ cdn:
busuanzijs: https://npm.elemecdn.com/[email protected]/bsz.js
aplayercss: https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.css
aplayerjs: https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.js
metingjs: https://cdn1.tianli0.top/npm/meting@2.0.1/dist/Meting.min.js
metingjs: lib/meting.min.js
16 changes: 8 additions & 8 deletions layout/album/album_detail.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@
<i class="fa-brands fa-instagram"></i>
<time class="datatime" datetime="<%= moment(iten.date).format() %>"></time>
</div>
<% if (item.link) { %>
<a class="album-content-link" target="_blank" title="跳转到短文指引的链接" href="<%= item.link %>" rel="external nofollow">
<% if (iten.link) { %>
<a class="album-content-link" target="_blank" title="跳转到短文指引的链接" href="<%= iten.link %>" rel="external nofollow">
<i class="fas fa-link"></i>
链接
</a>
<% } %>
<% if (item.address) { %>
<% if (iten.address) { %>
<div class="album-info-address">
<i class="far fa-location-dot"></i>
<span><%= item.address %></span>
<i class="fas fa-location-dot"></i>
<span><%= iten.address %></span>
</div>
<% } %>
<div class="album-info-from">
<i class="far fa-popsicle"></i>
<% if (item.from) { %>
<span><%= item.from %></span>
<% if (iten.from) { %>
<span><%= iten.from %></span>
<% } else { %>
<span>Acrylic</span>
<% } %>
Expand All @@ -67,4 +67,4 @@
</section>
<% } %>
<% } %>
</div>
</div>
3 changes: 3 additions & 0 deletions layout/page.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
case 'says': %>
<%- partial('page/says') %>
<% break;
case 'equipment': %>
<%- partial('page/equipment') %>
<% break;
case 'album': %>
<%- partial('album/album') %>
<% break;
Expand Down
2 changes: 2 additions & 0 deletions layout/page/equipment.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%- partial('partial/compoment/says/banner') %>
<%- partial('partial/compoment/equipment/list') %>
1 change: 1 addition & 0 deletions layout/partial/compoment/aside/asideInfoCard.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="card-info-avatar is-center">
<div class="author-info__sayhi" id="author-info__sayhi">
</div>
<img class="avatar-img entered loaded" data-lazy-src="<%- theme.lazyload.placeholder %>" onerror="this.onerror=null;this.src='<%- theme.lazyload.errorimg %>'" alt="avatar" data-ll-status="loaded" src="<%- theme.aside.card.avatar %>">
<div class="author-info__name">
<%= config.author %>
</div>
Expand Down
37 changes: 37 additions & 0 deletions layout/partial/compoment/equipment/list.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<div id="equipment">
<% if (site.data.equipment) { %>
<% site.data.equipment.forEach(function(i) { %>
<div class="equipment-item">
<h2 class="equipment-item-title"><%= i.class_name %></h2>
<div class="equipment-item-description"><%= i.description %></div>
<div class="equipment-item-content">
<% i.equipment_list.forEach(function(item) { %>
<div class="equipment-item-content-item">
<div class="equipment-item-content-item-cover">
<img class="equipment-item-content-item-image" src="<%= item.image %>" alt="<%= item.name %>">
</div>
<div class="equipment-item-content-item-info">
<div class="equipment-item-content-item-name"><%= item.name %></div>
<div class="equipment-item-content-item-specification"><%= item.specification %></div>
<div class="equipment-item-content-item-description"><%= item.description %></div>
<% if (item.link) { %>
<div class="equipment-item-content-item-toolbar">
<% if (item.link.includes('https://') || item.link.includes('http://')) { %>
<a class="equipment-item-content-item-link" href="<%= item.link %>" target="_blank">详情</a>
<% } else { %>
<a class="equipment-item-content-item-link" href="<%= item.link %>" target="_blank">查看文章</a>
<% } %>
<a class="bber-reply" onclick="acrylic.toTalk('<%- item.description %>')" >
<i class="fa-solid fa-comment" style="font-size: 1rem;">
</i>
</a>
</div>
<% } %>
</div>
</div>
<% }) %>
</div>
</div>
<% }) %>
<% } %>
</div>
4 changes: 2 additions & 2 deletions layout/partial/compoment/inject/body.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<%- js(cdn.swiperjs) %>
<% } %>
<div id="js-pjax">
<% if(page.type === 'says'){ %>
<% if(page.type === 'says' || page.type === 'album' || page.type === 'album_detail'){ %>
<%- js(cdn.waterfalljs) %>
<script>
window.addEventListener('resize', utils.throttle(function () {
Expand Down Expand Up @@ -44,4 +44,4 @@
<% } %>
<% if(theme.comment.enable){ %>
<%- js('/js/extend/console/comment') %>
<% } %>
<% } %>
2 changes: 1 addition & 1 deletion layout/partial/compoment/inject/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<% if(theme.thirdparty.search.algolia_search.enable){ %>
<%- js(cdn.instantsearch) %>
<%- js(cdn.algolia) %>
<% } %>
<% } %>
6 changes: 5 additions & 1 deletion layout/partial/compoment/says/saysBottom.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<a class="bber-content-link" href="<%= url_for(item.link) %>" title="跳转到短文指引的链接">
链接
</a>
<% } %>
<% } %>
</div>
<a class="bber-reply" onclick="acrylic.toTalk('<%- item.content %>')" >
<i class="fa-solid fa-comment" style="font-size: 1rem;">
</i>
</a>
</div>
9 changes: 8 additions & 1 deletion layout/partial/compoment/says/saysContent.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@
<% }); %>
</div>
<% } %>
</div>
</div>
<% if(item.music){ %>
<div class="bber-music">
<meting-js id="<%= item.music.id %>" server="<%= item.music.server %>" type="song" mutex="true"
preload="none" data-lrctype="0" theme="var(--heo-main)">
</meting-js>
</div>
<% } %>
7 changes: 4 additions & 3 deletions layout/partial/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,19 @@
<div class="copyright"<%= moment(theme.aside.siteinfo.runtime).year() %> - <%= new Date().getFullYear() %> By
<a class="footer-section-link" href="/" rel="external nofollow"><%= config.author %></a>
<a class="footer-section-link" href="https://github.com/hexo-theme-Acrylic/Hexo-Theme-Acrylic-Next" rel="external nofollow" target="_blank"> Theme By Acrylic-Next</a>
<a class="footer-section-link" href="<%- theme.footer.cdn.url %>" rel="external nofollow" target="_blank"><%- theme.footer.cdn.desc %></a>
</div>
</div>
</div>
<div class="footer-section-right">
<a class="footer-section-link" href="/rss/">订阅</a>
<a class="footer-section-link" href="<%- theme.footer.rss.url %>">订阅</a>
<% if(theme.site.icp){ %>
<a class="footer-section-link" target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index" rel="noopener external nofollow noreferrer noopener">
<%= theme.site.icp %>
</a>
<% } %>
<a class="footer-section-link cc" target="_blank" href="https://creativecommons.org/licenses/by/4.0/" title="cc协议">
<i class="fa-solid fa-closed-captioning"></i>
<a class="footer-section-link cc" target="_blank" href="<%- theme.footer.license.url %>" title="cc协议">
<i class="<%- theme.footer.license.icon %>"></i>
</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-acrylic",
"version": "1.1.5",
"version": "1.1.6",
"description": "A beautiful, powerful, and efficient Hexo theme developed by the hexo-theme-Acrylic team",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
9 changes: 8 additions & 1 deletion scripts/event/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
hexo.extend.filter.register('before_generate', () => {
// Get first two digits of the Hexo version number
const hexoVer = hexo.version.replace(/(^.*\..*)\..*/, '$1')
const nodeVer = process.version.replace(/^v/, '');
const [majorVer] = nodeVer.split('.');
const logger = hexo.log, config = hexo.config

if (hexoVer < 5.3) {
Expand All @@ -12,4 +14,9 @@ hexo.extend.filter.register('before_generate', () => {
logger.error('主题尚未支持 prismjs 请使用 highlightjs !')
process.exit(-1)
}
})
if (Number(majorVer) < 14) {
logger.error('请将 Node.js 升级到 v14.0.0 或更高的版本!');
process.exit(-1);
}
}
)
2 changes: 1 addition & 1 deletion scripts/helper/getArchiveLength.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hexo.extend.helper.register('getArchiveLength', function (type) {
const posts = this.site.posts.sort('-date').data
let archive = {}
posts.forEach(post => {
const postdate = type === 'year' ? moment(post.date).format('YYYY') : moment(post.date).format('YYYY-MM');
const postdate = type === 'year' ? moment(post.date).format('YYYY') : moment(post.date).format('YYYY/MM');
if(!archive[postdate]){
archive[postdate] = 1
} else {
Expand Down
125 changes: 124 additions & 1 deletion source/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -540,4 +540,127 @@ body[data-type="album_detail"] #page .author-content-item .card-content .banner-
width: 100%;
margin-right: 0px;
}
}
}

/* 我的装备 */
.equipment-item-content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin: 0 -8px;
}

.equipment-item-content-item {
width: calc(25% - 12px);
border-radius: 12px;
border: var(--style-border-always);
overflow: hidden;
margin: 8px 6px;
background: var(--heo-card-bg);
box-shadow: var(--heo-shadow-border);
min-height: 400px;
position: relative;
}

@media screen and (max-width: 1200px) {
.equipment-item-content-item {
width: calc(50% - 12px);
}
}

@media screen and (max-width: 768px) {
.equipment-item-content-item {
width: 100%;
}
}

.equipment-item-content-item-info {
padding: 8px 16px 16px 16px;
margin-top: 12px;
}

.equipment-item-content-item-name {
font-size: 18px;
font-weight: bold;
line-height: 1;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: fit-content;
}

.equipment-item-content-item-specification {
font-size: 12px;
color: var(--heo-secondtext);
line-height: 1;
margin-bottom: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.equipment-item-content-item-description {
line-height: 20px;
color: var(--heo-secondtext);
height: 60px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
font-size: 14px;
}

a.equipment-item-content-item-link {
font-size: 12px;
background: var(--heo-gray-op);
padding: 4px 8px;
border-radius: 8px;
cursor: pointer;
}

a.equipment-item-content-item-link:hover {
background: var(--heo-main);
color: var(--heo-white);
}

h2.equipment-item-title {
line-height: 1;
}

.equipment-item-description {
line-height: 1;
margin: 4px 0 8px 0;
color: var(--heo-secondtext);
}

.equipment-item-content-item-cover {
width: 100%;
height: 200px;
background: var(--heo-secondbg);
display: flex;
justify-content: center;
}

img.equipment-item-content-item-image {
object-fit: cover;
height: 100%;
}

div#equipment {
margin-top: 26px;
}

.equipment-item-content-item-toolbar {
display: flex;
justify-content: space-between;
position: absolute;
bottom: 12px;
left: 0;
width: 100%;
padding: 0 16px;
}

a.bber-reply {
cursor: pointer;
}
Loading

0 comments on commit 5933caf

Please sign in to comment.