Skip to content

Commit

Permalink
Update for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Chorer committed May 29, 2019
1 parent 2873af7 commit d337e8f
Show file tree
Hide file tree
Showing 25 changed files with 1,155 additions and 170 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Screenshot

![](https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pb.png)
![](https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/rwadme.png)


## Install the theme
Expand Down Expand Up @@ -51,17 +51,20 @@ And then install the [hexo-prism-plugin](https://github.com/ele828/hexo-prism-pl
- [x] Support TOC
- [x] Support fancybox
- [x] Support the third-party comment plugin
- [ ] Support the third-party share plugin
- [ ] Support website statistics
- [x] Support the third-party share plugin
- [x] Support website statistics
- [ ] Completely using vanilla JavaScript instead of jQuery
- [ ] Support responsive design
- [ ] Mobile adaptation
- [x] Mobile adaptation
- [ ] Support styling the codequote highlight



## Change Log

2019.5.29
* Totally change the css styling

2019.3.31
* Rewirte the paginator and optimize the code
* Add some icons with font-awesome
Expand Down
20 changes: 15 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,22 @@ color:
# ---------------------------------------------------------------
# Header
# ---------------------------------------------------------------


# random banner
banner:
enable: true

# menu---------------------------------------------------------------
menu:
Home: /
Categories: /categories
Archives: /archives
Tags: /tags
About: /about
HOME: /
CATEGORIES: /categories
ARCHIVES: /archives
TAGS: /tags
ABOUT: /about
# search
local_search:
enable: true #search siwtch

# ---------------------------------------------------------------
# Content
Expand Down
3 changes: 2 additions & 1 deletion layout/_partial/about.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<div class="about">
<%- page.content %>
</div>
</div>
</div>

10 changes: 9 additions & 1 deletion layout/_partial/after-footer.ejs
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<%- js('js/navbar.js') %>
<%- js('js/BgPic.js') %>
<%- js('js/code.js') %>
<%- js('js/load.js') %>
<%- js('js/search.js') %>
<%- js('js/jquery.fancybox.js') %>
<%- js('js/jquery.fancyboxStart.js') %>
<% if(is_post()){ %>
<%- js('js/toc.js') %>
<%- js('js/jquery.toTop.js') %>
<% } %>
<% if(is_home()|| is_archive()){ %>
<script src="https://unpkg.com/vanilla-back-to-top@7.2.0/dist/vanilla-back-to-top.min.js"></script>
<%- js('js/IndexToTop.js') %>
<% } %>
<% if(theme.Addthis.enable){ %>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<%- theme.Addthis.pubid %>"></script>
<% } %>
<% if(theme.banner.enable){ %>
<%- js('js/BgPic.js') %>
<% } %>



Expand Down
6 changes: 4 additions & 2 deletions layout/_partial/archive.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<% posts.sort((l, r) => r.date - l.date) %>
<% posts.forEach(post => { %>
<div class="section-list-item">
<a href="<%= url_for(post.path) %>" class="archive-title"><%= post.title %></a>
<p class="archive-date"><%-date(post.date, "MM-DD")%></p>
<a href="<%= url_for(post.path) %>" class="archive-title"><%= post.title %>
<span class="circle"></span>
</a>
<p class="archive-date"><%-date(post.date, "YYYY-MM-DD")%></p>
</div>
<% }) %>
</div>
Expand Down
80 changes: 40 additions & 40 deletions layout/_partial/article-excerpt.ejs
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
<article class="post">
<div class="post-title">
<a class="post-title-link" href="<%- config.root %>
<%- item.path %>"><%- item.title || 'Untitled' %>
</a>
</div>
<% if(item.subtitle){ %>
<div class="post-sub_title">
<%- item.subtitle %>
</div>
<% } %>
<div class="post-date">
<span class="date-text">
<i class="fa fa-calendar"></i><%= __('Post-info.Date') %>:&nbsp&nbsp<%= item.date.format(config.date_format) %>
</span>
<div class="post-title">
<a class="post-title-link" href="<%- config.root %>
<%- item.path %>"><%- item.title || 'Untitled' %>
</a>
</div>
<% if(item.subtitle){ %>
<div class="post-sub_title">
<%- item.subtitle %>
</div>
<div class="post-tags">
<%- partial('article-tags') %>
<% } %>
<div class="post-date">
<span class="date-text">
<i class="fa fa-calendar"></i><%= __('Post-info.Date') %>:&nbsp&nbsp<%= item.date.format(config.date_format) %>
</span>
</div>
<div class="post-tags">
<%- partial('article-tags') %>
</div>
<% if(theme.word_count){ %>
<div class="post-statistic">
<span class="post-words">
<i class="fa fa-pencil-square-o"></i>
<span class="text_words"><%= __('Post-info.Count') %>: </span>
<span><%= wordcount(item.content) %> <%= __('Post-info.Count_unit') %></span>
</span>&nbsp|
&nbsp<span class="post-time">
<i class="fa fa-clock-o"></i>
<span class="text_time"><%= __('Post-info.Time') %>: </span>
<span><%= min2read(item.content) %> <%= __('Post-info.Time_unit') %></span>
</span>
</div>
<% if(theme.word_count){ %>
<div class="post-statistic">
<span class="post-words">
<i class="fa fa-pencil-square-o"></i>
<span class="text_words"><%= __('Post-info.Count') %>: </span>
<span><%= wordcount(item.content) %> <%= __('Post-info.Count_unit') %></span>
</span>&nbsp|
&nbsp<span class="post-time">
<i class="fa fa-clock-o"></i>
<span class="text_time"><%= __('Post-info.Time') %>: </span>
<span><%= min2read(item.content) %> <%= __('Post-info.Time_unit') %></span>
</span>
</div>
<% } %>
<div class="post-content">
<%- item.excerpt || item.content %>
</div>
<% if(item.excerpt){ %>
<p class="more-btn">
<a href="<%- config.root%><%- item.path %>">
<%= __('Readmore.Text') %>&nbsp»
</a>
</p>
<% } %>
<% } %>
<div class="post-content">
<%- item.excerpt || item.content %>
</div>
<% if(item.excerpt){ %>
<button class="more-btn">
<a href="<%- config.root%><%- item.path %>">
<%= __('Readmore.Text') %>
</a>
</button>
<% } %>
</article>
2 changes: 1 addition & 1 deletion layout/_partial/paginator.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%- paginator({
prev_text: '&laquo; Prev',
next_text: 'Next &raquo;',
mid_size: 1
mid_size: 2
}) %>
</nav>
<% } %>
Expand Down
7 changes: 7 additions & 0 deletions layout/_partial/search.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% if(theme.local_search.enable) { %>
<span class="local-search local-search-plugin">
<i class="fa fa-search"></i>
<input type="search" placeholder="Search here......" id="local-search-input" class="local-search-input-cls">
<div id="local-search-result" class="local-search-result-cls"></div>
</span>
<% } %>
4 changes: 3 additions & 1 deletion layout/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
<%- partial('_partial/article-excerpt',{item: item}) %>
<% })%>
</section>
<%- partial('_partial/paginator') %>
<%- partial('_partial/search') %>
<%- partial('_partial/paginator') %>

4 changes: 3 additions & 1 deletion layout/page.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
<% } %>
<% if('categories' === page.type){ %>
<%- partial('_partial/categories') %>
<% } %>
<% } %>


Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
appKey: '<%- theme.valine.appkey %>',
notify: <%- theme.valine.notify %>,
verify: <%- theme.valine.verify %>,
placeholder: '<%- theme.valine.placeholder %>'
placeholder: '<%- theme.valine.placeholder %>',
avatar: '<%- theme.valine.avatar %>',
pageSize: <%- theme.valine.pageSize %>,
visitor: <%- theme.valine.visitor %>
Expand Down
52 changes: 33 additions & 19 deletions source/css/_partial/archive.styl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
background-color: $color;
}
.time-section{
padding-left: 30px
padding-left: 40px
position: relative
.section-year{
cursor: pointer
Expand All @@ -31,7 +31,7 @@
&:before{
position: absolute
left: 8px
top: 16px
top: 20px
content: ''
background-color: white
width: 12px
Expand All @@ -46,35 +46,49 @@
}
.section-list{
.section-list-item{
margin: 20px 0 20px 10px
margin: 20px 0 45px 10px
position: relative
&:before{
position: absolute
left: -29px
top: 7px
content: ''
background-color: $color
width: 10px
height: 10px
border-radius: 50%
}
.archive-title{
transition: all .3s ease
font-size: 17px;
font-weight: bold;
color: #34495e;
text-decoration: none;
}
.archive-title:hover{
&:hover{
color: $color
padding-left: 10px
}
.circle:after{
position: absolute
left: -2.33em
top: 3.2em
content: ''
background-color: $color
border: 1px solid #53b3fa;
width: 10px
height: 10px
border-radius: 50%
transition: all 0.3s;
}
&:hover .circle:after{
background-color:white;
}
}
.archive-date{
color: gray
font-size: 0.6em
margin: 5px 0
color: #999;
font-size: 14px;
margin: 5px 0
position:absolute;
top:45px;
left:-160px;
transition: all .2s;
&:hover{
opacity: 0.6;
transform: translate(-10px, 0);
}
}
}
}
}
}
}

54 changes: 38 additions & 16 deletions source/css/_partial/footer.styl
Original file line number Diff line number Diff line change
@@ -1,29 +1,51 @@
.footer1{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/Blog%20bgPic/bg1.jpg) -20px 300px;
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg1.jpg) -20px 300px;
}
.footer2{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/Blog%20bgPic/bg2.jpg);
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg2.jpg) 0px -350px;
}
.footer3{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/Blog%20bgPic/bg3.jpg);
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg3.jpg) -20px 230px;
}
.footer4{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg4.jpg) -230px 530px;
}
.footer5{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg5.jpg) -20px 330px;
}
.footer6{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg6.jpg) -260px 500px;
}
.footer7{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg7.jpg) -80px 860px;
}
.footer8{
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg8.jpg) -20px 330px;
}
.footer{
@media screen and (max-width:1024px){
width: 1030px;
}
@media screen and (max-width:970px){
width: 970px;
}
text-align: center;
font-family: "Times New Roman";
font-size: 20px;
font-family: "-apple-system";
background: url(https://myblog-1258623898.cos.ap-chengdu.myqcloud.com/pic/bg8.jpg) -20px 330px;
font-size: 16px;
font-weight: bold;
color: white;
height: 150px;
margin-top: 60px;
padding-top: 40px;
.footer-info p a{
text-decoration-style: dotted;
color: white;
}
padding-top: 54px;
p a{
text-decoration-style: dotted;
color: white;
}
p:last-child{
margin-top:0;
}
p:first-child{
margin-bottom:0;
}
}
#back-to-top{
z-index:99;
}
#back-to-top:hover{
background-color: #f47466;
}
Loading

0 comments on commit d337e8f

Please sign in to comment.