Skip to content

Commit

Permalink
Merge pull request #7 from littleee/index-tag/lbc
Browse files Browse the repository at this point in the history
NO 1
  • Loading branch information
littleee authored Apr 1, 2018
2 parents 117e1a3 + 5470a2d commit a90d2c6
Show file tree
Hide file tree
Showing 28 changed files with 462 additions and 27 deletions.
30 changes: 29 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
custom_logo: #header logo
enabled: true
image: /images/logo.png
favicon: /images/favicon.ico
menu:
home: / || home
tags: /tags/ || tags
archives: /archives/ || file
github: https://github.com/littleee/ || github
about: /about/ || user
# about: /about/ || user

# Enable/Disable menu icons.
menu_icons: #菜单icon
Expand All @@ -17,3 +18,30 @@ head_title:
enable: true
title: HELLO, IM CORA
subtitle: 三流代码 & 一流Bug

#footer
footer:
# 指定网站设置的日期
# 如果没定义将会使用当前年份
since: 2015

# Icon between year and copyright info.
icon: user

# If not defined, will be used `author` from Hexo main config.
copyright:
# -------------------------------------------------------------
# Hexo link (Powered by Hexo).
powered: true

theme:
name: Corazon
enable: true
version: true
# -------------------------------------------------------------
# Any custom text can be defined here.
#custom_text: Hosted by <a target="_blank" href="https://pages.github.com">GitHub Pages</a>


# Theme version
version: 1.0.0
3 changes: 3 additions & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ rss_feed: RSS Feed
category: Category
tag: Tag
Archives: Archives
footer:
powered: "由 %s 强力驱动"
theme: 主题
7 changes: 7 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ tag: Tag
archives: 归档
home: 首页
about: 关于
#分页
paginator:
prev_text: 上一页
next_text: 下一页
footer:
powered: "由 %s 强力驱动"
theme: 主题
19 changes: 19 additions & 0 deletions layout/_common/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,23 @@
<%- page.more %>
</div>
</article>
<div class="post-nav">
<div class="post-nav-next post-nav-item">
<% if (post.next) {%>
<a href="<%- url_for(post.next.path) %>" rel="next" title="<%= post.next.title %>">
<i class="fa fa-chevron-left"></i> <%- post.next.title %>
</a>
<% } %>
</div>
<span class="post-nav-divider"></span>
<div class="post-nav-prev post-nav-item">
<% if (post.prev) {%>
<a href="<%- url_for(post.prev.path) %>" rel="prev" title="<%= post.prev.title %>">
<%- post.prev.title %> <i class="fa fa-chevron-right"></i>
</a>
<% } %>
</div>
</div>
<% } %>
File renamed without changes.
23 changes: 23 additions & 0 deletions layout/_common/footer.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="footer">
<div class="footer-wrapper">
<div class="copyright">
<% var current = date(Date.now(), "YYYY") %>
<span>&copy;</span>
<% if(!theme.footer.since || theme.footer.since == current){ %>
<span><%- current %></span>
<% }else{ %>
<span><%- theme.footer.since %> - <%- current %></span>
<%}%>
<span class="author"><i class="fa fa-<%= theme.footer.icon %>"></i><%= theme.footer.copyright || config.author %></span>
</div>
<% if(theme.footer.powered) { %>
<span><%- __('footer.powered','<a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a>') %></span>
<% } %>
<% if(theme.footer.theme.enable) {%>
<span>|</span> <span><%- __('footer.theme') %> - <a href="https://github.com/littleee/corazon"><%- theme.footer.theme.name %></a></span>
<% if(theme.footer.theme.version) {%>
<span>v<%- theme.version %></span>
<% } %>
<% } %>
</div>
</div>
3 changes: 3 additions & 0 deletions layout/_common/head.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<% if (theme.favicon){ %>
<link rel="icon" href="<%- theme.favicon %>">
<% } %>
<title><%= config.title %></title>
<%- css('css/styles.css') %>
<%- js('lib/jquery') %>
Expand Down
5 changes: 3 additions & 2 deletions layout/_common/paginator.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<% if (page.total > 1){ %>
<nav class="page-nav">
<%- paginator({
prev_text: "&laquo; __(Prev)",
next_text: "__(Next) &raquo;"
prev_text: __('paginator.prev_text'),
next_text: __('paginator.next_text'),
show_all: true
}) %>
</nav>
<% } %>
4 changes: 3 additions & 1 deletion layout/about.ejs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
guanyu
<div class="about">

</div>
4 changes: 2 additions & 2 deletions layout/archive.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<% lastyear = year %>
<% } %>
<div class="archive_item">
<span class="date"><%= post.date.format('MM-DD') %></span>
<a class="title" href="<%- url_for(post.path) %>"><%= post.title %></a>
<span class="date"><%= post.date.format('YYYY-MM-DD') %></span>
</div>
<% }) %>
<%- partial('_common/paginator') %>
</div>
<%- partial('_common/paginator') %>
2 changes: 1 addition & 1 deletion layout/index.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%- partial('banner') %>
<%- partial('_common/banner') %>
<section class="posts">
<% page.posts.each(function (post) { %>
<article class="post">
Expand Down
1 change: 1 addition & 0 deletions layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<div class="content">
<%- body %>
</div>
<%- partial('_common/footer') %>
</main>
</body>
</html>
2 changes: 1 addition & 1 deletion layout/tags.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tags">
<h3 class="tags-title"><%= __('tags') %></h3>
<h2 class="tags-title"><%= __('tags') %></h2>
<div class="tags-wrapper">
<%- list_tags({show_count: theme.show_count}) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "corazon",
"version": "1.0.0",
"description": "",
"description": "Elegant theme for Hexo",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
3 changes: 3 additions & 0 deletions source/css/_common/about.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.about{

}
8 changes: 3 additions & 5 deletions source/css/_common/archive.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@
background-color: #fff;
border: 1px solid #ddd;
box-shadow: 0 0 2px #ddd;

.post-archive {
list-style: none;
padding: 0;

.post-item {
margin: 5px 0;

.post-date {
display: inline-block;
margin-right: 10px;
color: #BABABA;
}

.post-title {
color: #368CCB;
font-weight: bold;
color: #ee1289;
text-shadow: #eee 2px 2px;
text-decoration: none;
}
}
Expand Down
39 changes: 39 additions & 0 deletions source/css/_common/footer.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.footer{
width: 100%
padding: 30px 20px
background-color: #333
color: #fff
position: absolute
left: 0
bottom: 0
text-align: center
span{
margin: 0 5px
}
i{
margin-right: 10px
}
a{
color: #24a5db
transition: color 0.5s ease
text-decoration: none
&:hover{
text-decoration: none
color: #97ffff
}
}
.copyright{
span{
margin: 2px
}
.author{
margin-left:15px
}
}

}
@media(max-width: 480px){
.footer{
padding: 30px 10px
}
}
2 changes: 1 addition & 1 deletion source/css/_common/header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
color: #ccc
text-decoration: none
transition: color 0.5s ease
line-height: 30px
line-height: 35px
i{
width: 30px
text-align: center
Expand Down
13 changes: 11 additions & 2 deletions source/css/_common/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ highlight-skyblue = #4f9fcf
highlight-purple = #cc99cc
color-border = #ddd

h2{
font-size:28px!important
}
h3{
font-size:20px!important
}
article
h2.title
margin-bottom: .25em;
Expand Down Expand Up @@ -47,7 +53,7 @@ article

$code-block
background: highlight-background
padding: 15px 20px
padding: 0 5px
border-style: solid
border-color: color-border
border-width: 1px
Expand All @@ -71,7 +77,9 @@ $line-numbers
@extend $line-numbers
text-align: right
padding-right: 20px

.highlight.bash{
margin: 10px 0
}
.highlight
@extend $code-block
pre
Expand All @@ -83,6 +91,7 @@ $line-numbers
word-wrap: normal;
border: 0
font-family: monospace
margin-bottom: 0
table
margin: 0
width: auto
Expand Down
Loading

0 comments on commit a90d2c6

Please sign in to comment.