Skip to content

Commit

Permalink
🐛 v0.8.2 public
Browse files Browse the repository at this point in the history
V0.8.2
  • Loading branch information
FoxerLee authored Oct 1, 2020
2 parents 9604cd7 + 0f37306 commit b34427f
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 47 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 更新日志

## v0.8.2 (Sep-30-2020)

- 修复了主页文章顺序错误的 bug
- 更新了 category 界面的 button 样式,使其和主题一致
- 修复了 category,tag 详细界面的样式错误
- 更新了 README,添加了更新日志、之后更新计划、完善了 demo 界面、添加了一些 icons
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Yuan Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
57 changes: 41 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,56 @@
# Terran
[![](https://img.shields.io/badge/author-Foxerlee-blue)](https://github.com/FoxerLee) ![](https://img.shields.io/github/issues/Foxerlee/hexo-theme-terran) ![](https://img.shields.io/github/v/release/foxerlee/hexo-theme-terran) ![](https://img.shields.io/github/release-date/foxerlee/hexo-theme-terran) ![](https://img.shields.io/badge/Hexo-4.0.0%20or%20later-blue) ![](https://img.shields.io/badge/license-MIT-green)

轻量、简洁的 Hexo 主题:Terran(名字源自:星际争霸,虽然和主题一点无关233)

## Demo

<details>
<summary><mark>主页</mark></summary>

![home](assets/home.png)
</details>

<details>
<summary><mark>归档</mark></summary>

![friends](assets/archive.png)
</details>

<details>
<summary><mark>友链</mark></summary>

![friends](assets/friends.png)
</details>

<details>
<summary><mark>关于</mark></summary>

<summary><mark>更多</mark></summary>

![friends](assets/archive.png)

![friends](assets/about.png)
</details>

## 使用方法

### 安装

1. 下载基本代码

```bash
git clone https://github.com/FoxerLee/hexo-theme-terran.git themes/terran
```

2. 安装必要扩展

```bash
npm i --save hexo-wordcount
```

### 设置

修改博客本身的 `_config.yml`

```yaml
# 修改为
theme: terran
```
### 更新
```bash
cd themes/terran
git pull origin master
```

本主题支持动态更新而不需重新替换原始主题配置文件。使用方法为:在 `source/_data/` 中创建 `temp.yml` 文件,该文件与主题的 `_config.yml` 文件等效,且优先级更高,也不会在 `git pull` 之后被更新。如果你希望经常更新主题,建议使用该文件。

## 主题配置

``` yaml
Expand Down Expand Up @@ -152,4 +175,6 @@ about:
### 鼓励
![](https://img.shields.io/github/stars/foxerlee/hexo-theme-terran?style=social)
主题宗旨:轻量简洁,开箱即用,如果觉得本主题还不错,欢迎 **[Star](https://github.com/FoxerLee/hexo-theme-terran/stargazers)**,您的支持是我继续更新的动力~
Binary file modified assets/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/archive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/friends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 6 additions & 11 deletions layout/_page/category.ejs
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<div class="container archive">
<div class="container category archive">
<h1 class="archive-title"><span class="iconfont icon-icon-goodscategory category-icon"></span>&nbsp;<%=page.category%></h1>
<div class="archive-subtitle">
<%= page.posts.length %> <%- __('posts') %>
</div>
<% var cur_date = ''; %>
<% page.posts.each(function (post) { %>
<% var post_date = date(post.date, theme.date.month); %>

<% if(post_date !== cur_date){ %>
<h4 class="archive-date"><%- post_date %></h3>
<% cur_date = post_date; } %>
<% page.posts.each(function (post) { %>
<li class="archive-post">
<a class="archive-post-link" href="<%- url_for(post.path) %>">
<span class="archive-post-title"><%= post.title %></span>
<span class="archive-post-date"><%= date(post.date, theme.date.day) %></span>
<li class="category-post">
<a href="<%- url_for(post.path) %>">
<span class="category-post-name"><%= post.title %></span>
<span class="category-post-date"><%= date(post.date, theme.date.day) %></span>
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions layout/_page/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
</div>

<div class="profile-posts">
<% site.posts.map((post, index) => { %>
<% site.posts.sort('date', -1).map((post, index) => { %>
<% if (index < 5) { %>
<div class="profile-post">
<h4 class="profile-post-title">
<a href="<%-url_for(post.path)%>"><%= post.title %></a>
</h4>
<p>
<% if ( post.excerpt){ %>
<% if (post.excerpt){ %>
<%- post.excerpt %>
<% } else { %>
<%- post.content.replace(/<(?:.|\n)*?>/gm, '').substr(0, 250) %>
Expand Down
20 changes: 7 additions & 13 deletions layout/_page/tag.ejs
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
<div class="container tag archive">
<h1 class="tag-title"><span class="iconfont icon-tags tag-icon"></span>&nbsp;<%=page.tag%></h1>
<div class="tag-subtitle">
<div class="container category archive">
<h1 class="archive-title"><span class="iconfont icon-tags tag-icon"></span>&nbsp;<%=page.tag%></h1>
<div class="archive-subtitle">
<%= page.posts.length %> <%- __('posts') %>
</div>
<% var cur_date = ''; %>
<% page.posts.each(function (post) { %>
<% var post_date = date(post.date, theme.date.month); %>
<% if(post_date !== cur_date){ %>
<h4 class="archive-date"><%- post_date %></h3>
<% cur_date = post_date; } %>
<li class="archive-post">
<a class="archive-post-link" href="<%- url_for(post.path) %>">
<span class="archive-post-title"><%= post.title %></span>
<span class="archive-post-date"><%= date(post.date, theme.date.day) %></span>
<li class="category-post">
<a href="<%- url_for(post.path) %>">
<span class="category-post-name"><%= post.title %></span>
<span class="category-post-date"><%= date(post.date, theme.date.day) %></span>
</a>
</li>
Expand Down
21 changes: 16 additions & 5 deletions source/css/_page/category.styl
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,35 @@
.category-post-name
font-size 15px

.category-post-date
font-size 15px
float right

.category-post-count
font-size 15px
float right
.category-name
margin-top 30px
margin-top 2.2em
text-align center
.category-more-button
margin 10px auto 0 auto
display block
.page-link
padding 0.5em 1.5em
font-size 1.1em
font-weight bold
a
border none
color #17141f
transition-property transform
transition-timing-function ease-out
transition-duration 0.2s
&:hover
background-color rgb(249, 248, 252)
transform scale(1.1, 1.1)
background-color #fff
color #9966FF
-webkit-transition all .2s
-moz-transition all .2s
-ms-transition all .2s
-o-transition all .2s
transition all .2s
transition all .2s
.page-link
padding 0.75em 2.25em

0 comments on commit b34427f

Please sign in to comment.