Skip to content

Commit

Permalink
🎉Update Version 1.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ITJoker233 committed Jan 12, 2020
1 parent dc6cdd1 commit 5767399
Show file tree
Hide file tree
Showing 9 changed files with 298 additions and 49 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@
- [ ] 增加相关的Web特效~
- More...

## 📌当前版本:1.5.7
## 📌当前版本:1.5.8

1. (刚开始使用这个主题的请忽略这句话)
2. 由于Gridea客户端不支持直接获取主题版本,所以换了一个方法获取当前主题的版本号,(如果Gridea的客户端一直不支持获取的话,那么就采用这个方法,如果支持了就不必这一步。)
3. 因此在旧版本的基础上的解决方法:```请重新启动Gridea客户端,然后点击下主题->自定义配置->主题版本->选择最新版本->保存```
4. 音乐插件------(详细教程见:https://blog.itjoker.cn/post/azQ6rNbFG/)
5. 文章列表------在菜单里面添加的link为:```/posts```

## 🌈下载地址
- [v1.5.7(当前版本)](https://github.com/ITJoker233/Gridea-theme-Chic/releases/tag/1.5.7)
- [v1.5.8(当前版本)](https://github.com/ITJoker233/Gridea-theme-Chic/releases/tag/1.5.8)
- [v1.5.7](https://github.com/ITJoker233/Gridea-theme-Chic/releases/tag/1.5.7)
- [v1.5.6](https://github.com/ITJoker233/Gridea-theme-Chic/releases/tag/1.5.6)
- [v1.5.5](https://github.com/ITJoker233/Gridea-theme-Chic/releases/tag/1.5.5)
- [v1.5.4](https://github.com/ITJoker233/Gridea-theme-Chic/releases/tag/1.5.4)
Expand All @@ -70,9 +72,9 @@

## 🔖本次更新日志
### 本次更新了以下内容:
1. 在文章目录支持显示阅读时间和文章字数,以及显示目录
1. 增加了显示文章列表
2. 下次更新未知....
3. 本次更新时间为:2020.01.12 01:26
3. 本次更新时间为:2020.01.12 15:30

## 📢作者留言

Expand Down
3 changes: 3 additions & 0 deletions assets/media/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,9 @@ a.toc-link {
}

@media screen and (max-width: 479px) {
.post-main {
padding-top: 40pt;
}
.main {
padding-top: 40pt;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/media/css/style.min.css

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions assets/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,154 @@
transform: translate(-50%, -.2rem)
}

/*Posts*/
.post-main {
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
margin-top: 80px;
}

.post-list {
border-radius: 5px;
max-width: 800px;
padding: 0 10px;
margin-left: auto;
margin-right: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

.dark-theme {
.post-item {
background-color: #424242;
box-shadow: 1px 5px 10px -5px #444;

&:hover {
background-color: #e0e0e0;
box-shadow: 1px 5px 10px -5px #888;
-webkit-transform: translateY(-8px);
transform: translateY(-8px);

span {
color: #161209;
}

a {
color: #161209;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;

&:hover {
color: #2d96bd;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
}
}
}
}

.post-item {
display: flex;
border-radius: 5px;
justify-content: space-between;
margin-top: 25px;
padding: 32px 10px;
max-height: 200px;
box-shadow: 1px 5px 10px -5px #444;
position:relative;
.content {
flex: 1;

.post-abstract {
font-size: 14px;
margin: 16px 0 8px;
flex: 1;
color: #4E616C;
overflow: hidden;
line-height: 24px;
position: relative;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;

strong {
font-weight: bolder;
}

a {
font-weight: 600;
background-color: transparent;
color: #161209;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
cursor: pointer;

&:hover {
color: #2d96bd;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
}

code {
padding: 0 3px;
margin: 0 2px;
background: rgba(195, 195, 195, 0.41);
font-size: 0.9em;
border-radius: 2px;
}

}
}

.feature-container {
margin-left: 16px;
flex-shrink: 0;
width: 240px;
height: 135px;
position: relative;
overflow: hidden;
background-size: cover;
background-position: center;
border-radius: 5px;
}

@media screen and (max-width: 479px) {
.feature-container {
width: 160px;
height: 90px;
margin-top: 25%;
}
}

&:hover {
background-color: #424242;
box-shadow: 1px 5px 10px -5px #888;
-webkit-transform: translateY(-8px);
transform: translateY(-8px);

span {
color: #bdbdbd;
}

a {
color: #bdbdbd;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;

&:hover {
color: #fafafa;
text-decoration: none;
transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
}
}
}

/*Friends*/
.friend-box {
float: left;
Expand Down
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Chic-给我的主题来个Star呗!🎉",
"version": "1.5.7",
"version": "1.5.8",
"author": "@ITJoker (原作者:@Bentham)",
"repository": "https://github.com/ITJoker233/Gridea-theme-Chic",
"customConfig": [{
Expand Down Expand Up @@ -60,11 +60,11 @@
"name": "version",
"label": "主题版本",
"group": "网站信息",
"value": "1.5.7",
"value": "1.5.8",
"type": "select",
"options": [{
"label": "最新版本",
"value": "1.5.7"
"value": "1.5.8"
}]
},
{
Expand Down
85 changes: 44 additions & 41 deletions templates/friends.ejs
Original file line number Diff line number Diff line change
@@ -1,54 +1,57 @@
<!DOCTYPE html>
<html>

<head>
<% if(site.customConfig.language == "zh"){%>
<%- include('./include/head', { siteTitle: `友链 | ${themeConfig.siteName}` }) %>
<% }else{%>
<%- include('./include/head', { siteTitle: `Friends | ${themeConfig.siteName}` }) %>
<%}%>
<%- include('./include/head', { siteTitle: `\u53CB\u94FE | ${themeConfig.siteName}` }) %>
<% }else{%>
<%- include('./include/head', { siteTitle: `Friends | ${themeConfig.siteName}` }) %>
<%}%>
</head>

<body>
<div class="wrapper">
<%- include('./include/header') %>
<div class="main">
<div class="container">
<article class="post-wrap">
<header class="post-header">
<h1 class="post-title zh">
&#x53CB;&#x94FE;
</h1>
<h1 class="post-title en">
Friends
</h1>
</header>
<div class="post-content">
<% if (site.customConfig.friends) { %>
<% site.customConfig.friends.forEach(function(friend) { %>
<div class="friend-box">
<img class="friend-avatar" src="<%= friend.siteLogo %>">
<div class="flink-info">
<a href="<%= friend.siteLink %>" target="_blank">
<%= friend.siteName %>
</a>
<br />
<%= friend.description %>
<div class="main">
<div class="container">
<article class="post-wrap">
<header class="post-header">
<h1 class="post-title zh">
&#x53CB;&#x94FE;
</h1>
<h1 class="post-title en">
Friends
</h1>
</header>
<div class="post-content">
<% if (site.customConfig.friends) { %>
<% site.customConfig.friends.forEach(function(friend) { %>
<div class="friend-box">
<img class="friend-avatar" src="<%= friend.siteLogo %>">
<div class="flink-info">
<a href="<%= friend.siteLink %>" target="_blank">
<%= friend.siteName %>
</a>
<br />
<%= friend.description %>
</div>
</div>
<% }); %>
<% } %>
</div>
</div>
<% }); %>
<% } %>
</article>
</div>
</article>
</div>
</div>
<% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
<% if (commentSetting.commentPlatform === 'gitalk') { %>
<%- include('./include/gitalk') %>
<% } %>
<% if (commentSetting.commentPlatform === 'disqus') { %>
<%- include('./include/disqus') %>
<% } %>
<% } %>
</div>
<% if (typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
<% if (commentSetting.commentPlatform === 'gitalk') { %>
<%- include('./include/gitalk') %>
<% } %>
<% if (commentSetting.commentPlatform === 'disqus') { %>
<%- include('./include/disqus') %>
<% } %>
<% } %>
</div>
<%- include('./include/footer') %>
</body>
</body>

</html>
69 changes: 69 additions & 0 deletions templates/include/post-list.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<% site.posts.forEach(function(post) { %>
<% if(!post.hideInList){%>
<%if(post.isTop){ %>
<section class="post-item">
<div class="content">
<a href="<%= post.link %>">
<h2 class="post-title">
<%= post.title %>
</h2>
</a>
<div class="post-abstract">
<%- post.abstract %>
</div>
<div class="post-info">
<span><i class="fa fa-calendar" aria-hidden="true"></i> <%= post.dateFormat %></span>
<% if (post.tags.length > 0) { %><span><i class="fa fa-tags"
aria-hidden="true"></i><% post.tags.forEach(function(tag, index) { %><a
href="<%= tag.link %>"><%= tag.name %><% if (index !== post.tags.length - 1) { %>,<% } %></a><% }); %></span>
<% } %>
</div>
</div>
<% if (themeConfig.showFeatureImage && post.feature) { %>
<a href="<%= post.link %>">
<div class="feature-container" style="background-image: url('<%= post.feature %>')">
</div>
</a>
<% } %>
</section>
<% } %>
<% } %>
<% }); %>
<% site.posts.forEach(function(post) { %>
<% if(!post.hideInList){%>
<section class="post-item">
<div class="content">
<a href="<%= post.link %>">
<h2 class="post-title">
<%= post.title %>
</h2>
</a>
<div class="post-abstract">
<%- post.abstract %>
</div>
<div class="post-info">
<span><i class="fa fa-calendar" aria-hidden="true"></i> <%= post.dateFormat %></span>
<% if (post.tags.length > 0) { %>
<span>
<i class="fa fa-tags" aria-hidden="true"></i>
<% post.tags.forEach(function(tag, index) { %>
<a href="<%= tag.link %>">
<%= tag.name %>
<% if (index !== post.tags.length - 1) { %>
,
<% } %>
</a>
<% }); %>
</span>
<% } %>
</div>
</div>
<% if (themeConfig.showFeatureImage && post.feature) { %>
<a href="<%= post.link %>">
<div class="feature-container" style="background-image: url('<%= post.feature %>')">
</div>
</a>
<% } %>
</section>
<% } %>
<% }); %>

0 comments on commit 5767399

Please sign in to comment.