Permalink
Browse files

undate to 4.0

  • Loading branch information...
litten committed Dec 4, 2016
1 parent 3520d48 commit 72dbdc22de4a54e08d41c320b248969dd3a6ae29
Showing with 946 additions and 17,090 deletions.
  1. +7 −0 .babelrc
  2. +2 −0 .eslintignore
  3. +39 −0 .eslintrc.js
  4. +2 −1 _config.yml
  5. +2 −2 layout/_partial/article.ejs
  6. +1 −1 layout/_partial/header.ejs
  7. +1 −1 layout/_partial/left-col.ejs
  8. +3 −0 layout/_partial/mobile-nav.ejs
  9. +7 −1 layout/_partial/post/share.ejs
  10. +67 −32 layout/_partial/tools.ejs
  11. +13 −5 layout/layout.ejs
  12. +14 −2 package.json
  13. +0 −68 source-src/css/archive-inner.scss
  14. +2 −0 source-src/css/article-main.scss
  15. +0 −1 source-src/css/article.scss
  16. +130 −0 source-src/css/core/_animation.scss
  17. +11 −2 source-src/css/core/_mixin.scss
  18. +2 −0 source-src/css/fonts.scss
  19. BIN source-src/css/fonts/iconfont.eot
  20. +4 −1 source-src/css/fonts/iconfont.svg
  21. BIN source-src/css/fonts/iconfont.ttf
  22. BIN source-src/css/fonts/iconfont.woff
  23. +22 −2 source-src/css/grid.scss
  24. BIN source-src/css/img/black-paper.png
  25. BIN source-src/css/img/black-scales.png
  26. BIN source-src/css/img/coderwall.png
  27. BIN source-src/css/img/facebook.png
  28. BIN source-src/css/img/github.png
  29. BIN source-src/css/img/google.png
  30. BIN source-src/css/img/linkedin.png
  31. BIN source-src/css/img/mail.png
  32. BIN source-src/css/img/pinboard.png
  33. BIN source-src/css/img/pinterest.png
  34. BIN source-src/css/img/rss.png
  35. BIN source-src/css/img/stackoverflow.png
  36. BIN source-src/css/img/twitter.png
  37. BIN source-src/css/img/weibo.png
  38. BIN source-src/css/img/zhihu.png
  39. +3 −0 source-src/css/left.scss
  40. +0 −2 source-src/css/main.scss
  41. +3 −0 source-src/css/share.scss
  42. +0 −52 source-src/css/switch.scss
  43. +4 −4 source-src/css/tags.scss
  44. +159 −80 source-src/css/tools.scss
  45. +95 −0 source-src/js/anm.js
  46. +0 −45 source-src/js/archive-inner.js
  47. +15 −15 source-src/js/browser.js
  48. +0 −15 source-src/js/fix-page.js
  49. +38 −0 source-src/js/fix.js
  50. +0 −9,555 source-src/js/jquery.js
  51. +0 −148 source-src/js/jquery.lazyload.js
  52. +28 −34 source-src/js/main.js
  53. +18 −18 source-src/js/mobile.js
  54. +0 −1,242 source-src/js/qrcode.js
  55. +44 −359 source-src/js/share.js
  56. +133 −0 source-src/js/slider.js
  57. +0 −13 source-src/js/tags.js
  58. +0 −54 source-src/js/tools.js
  59. +24 −45 source-src/js/viewer.js
  60. +0 −483 source-src/photoSwipe/default-skin/default-skin.scss
  61. +0 −1 source-src/photoSwipe/default-skin/default-skin.svg
  62. +0 −861 source-src/photoSwipe/photoswipe-ui-default.js
  63. +0 −4 source-src/photoSwipe/photoswipe-ui-default.min.js
  64. +0 −3,718 source-src/photoSwipe/photoswipe.js
  65. +0 −4 source-src/photoSwipe/photoswipe.min.js
  66. +0 −178 source-src/photoSwipe/photoswipe.scss
  67. BIN source/fonts/iconfont.eot
  68. +4 −1 source/fonts/iconfont.svg
  69. BIN source/fonts/iconfont.ttf
  70. BIN source/fonts/iconfont.woff
  71. BIN {source-src/photoSwipe/default-skin → source/img}/default-skin.png
  72. BIN {source-src/photoSwipe/default-skin → source/img}/preloader.gif
  73. BIN source-src/css/img/douban.png → source/img/scrollbar_arrow.png
  74. +1 −1 source/main.css
  75. +11 −36 source/main.js
  76. +37 −3 webpack.config.js
View
@@ -0,0 +1,7 @@
{
"presets": ["es2015", "stage-2"],
"plugins": [
"transform-class-properties",
"transform-runtime"
]
}
View
@@ -0,0 +1,2 @@
build/*.js
config/*.js
View
@@ -0,0 +1,39 @@
module.exports = {
extends: ['eslint-config-airbnb'],
env: {
browser: true,
node: true,
mocha: true,
jest: true,
es6: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
experimentalObjectRestSpread: true
}
},
plugins: [
'react',
'babel'
],
rules: {
'curly': [2, 'all'],
'func-names': 0,
'prefer-const': 0,
'arrow-body-style': 0,
'react/sort-comp': 0,
'react/prop-types': 0,
'react/jsx-first-prop-new-line': 0,
'import/no-unresolved': 0,
'no-param-reassign': 0,
'no-return-assign': 0,
'max-len': [2, {
'code': 120
}],
'consistent-return': 0,
'comma-dangle': 0
}
}
View
@@ -40,6 +40,8 @@ open_in_new: false
# 打赏
# 请在需要打赏的文章的md文件头部,设置属性reward: true
# 打赏基础设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏
reward_type: 2
# 打赏wording
reward_wording: '谢谢你请我吃糖果'
# 支付宝二维码图片地址,跟你设置头像的方式一样。比如:/assets/img/alipay.jpg
@@ -68,7 +70,6 @@ duoshuo: false
# friends: false
smart_menu:
innerArchive: '所有文章'
tagcloud: '标签'
friends: '友链'
aboutme: '关于我'
@@ -1,4 +1,4 @@
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope itemprop="blogPost">
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %> <%if(index){%> article-index<%}%>" itemscope itemprop="blogPost">
<div class="article-inner">
<% if (post.link || post.title){ %>
<header class="article-header">
@@ -14,7 +14,7 @@
<%- post.content %>
<% } %>
<% if (post.reward && !index){ %>
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index){ %>
<div class="page-reward">
<a href="javascript:;" class="page-reward-btn tooltip-top">
<div class="tooltip tooltip-east">
@@ -2,7 +2,7 @@
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">123123
<h1 id="logo-wrap">
<a href="<%- url_for() %>" id="logo"><%= config.title %></a>
</h1>
<% if (theme.subtitle){ %>
@@ -28,7 +28,7 @@
<% var count = 0 %>
<% for (var i in theme.smart_menu){ %>
<% if(theme.smart_menu[i]){ %>
<a class="js-smart-menu" data-idx="<%-count%>" href="javascript:void(0)"><%= theme.smart_menu[i] %></a>
<a data-idx="<%-count%>" v-on:click="openSlider($event, '<%-i%>')" href="javascript:void(0)"><%= theme.smart_menu[i] %></a>
<% count++ %>
<% } %>
<%}%>
@@ -23,6 +23,9 @@
<% for (var i in theme.menu){ %>
<li><a href="<%- url_for(theme.menu[i]) %>"><%= i %></a></li>
<%}%>
<% if (theme.smart_menu.innerArchive) { %>
<li><a href="/archives"><%= theme.smart_menu.innerArchive %></a></li>
<% } %>
</ul>
</nav>
<nav class="header-nav">
@@ -1,3 +1,7 @@
<%
var sUrl = url.replace(/index\.html$/, '');
sUrl = /^(http:|https:)\/\//.test(sUrl) ? sUrl : 'http:' + sUrl;
%>
<div class="share-btn share-icons tooltip-left">
<div class="tooltip tooltip-east">
<span class="tooltip-item">
@@ -41,7 +45,9 @@
<div class="page-modal wx-share js-wx-box">
<a class="close js-modal-close" href="javascript:;"><i class="icon icon-close"></i></a>
<p>扫一扫,分享到微信</p>
<div class="wx-qrcode"></div>
<div class="wx-qrcode">
<img src="<%- 'qrcode' in locals ? qrcode(sUrl) : 'http://s.jiathis.com/qrcode.php?url=' + sUrl %>" alt="微信分享二维码">
</div>
</div>
<div class="mask js-mask"></div>
View
@@ -1,52 +1,87 @@
<%
var hasInnerArchive = theme.smart_menu.innerArchive
var hasTagcloud = theme.smart_menu.tagcloud
var hasFriends = theme.smart_menu.friends
var hasAboutme = theme.smart_menu.aboutme
%>
<div class="tools-col">
<ul class="btn-wrap">
<%if(hasInnerArchive){%>
<li class="chose" data-hook="tools-section-all"><span class="text">全部</span><i class="icon-book"></i></li>
<%}%>
<%if(hasTagcloud){%>
<li data-hook="tools-section-tag"><span class="text">标签</span><i class="icon-price-tags"></i></li>
<%}%>
<%if(hasFriends){%>
<li data-hook="tools-section-friends"><span class="text">友链</span><i class="icon-link"></i></li>
<%}%>
<%if(hasAboutme){%>
<li data-hook="tools-section-me"><span class="text"></span><i class="icon-smile"></i></li>
<%}%>
</ul>
<div class="tools-col" v-bind:class="{ show: isShow, hide: isShow === false }" v-on:click="stop($event)">
<div class="tools-wrap">
<%if(hasInnerArchive){%>
<section class="tools-section tools-section-all chose">
</section>
<%}%>
<%if(hasTagcloud){%>
<section class="tools-section tools-section-tag">
<div class="widget tagcloud" id="js-tagcloud">
<%- tagcloud() %>
</div>
<section class="tools-section tools-section-all" v-show="innerArchive">
<div class="search-wrap">
<input class="search-ipt" v-model="search" type="text" placeholder="find something…">
<i class="icon-search icon" v-show="search===''"></i>
<i class="icon-close icon" v-show="search!==''" v-on:click="clearChose($event)"></i>
</div>
<div class="widget tagcloud search-tag">
<p class="search-tag-wording">tag:</p>
<label class="search-switch">
<input type="checkbox" v-on:click="toggleTag($event)" v-bind:checked="showTags">
</label>
<ul class="article-tag-list" v-bind:class="{ show: showTags }">
<% site.tags.forEach(function(tag, i){ %>
<li class="article-tag-list-item">
<a href="javascript:void(0)" v-on:click="choseTag($event)" class="color3" style="font-size: 12px;"><%-tag.name%></a>
</li>
<% }) %>
<div class="clearfix"></div>
</ul>
</div>
<ul class="search-ul">
<p v-show="jsonFail" style="padding: 20px; font-size: 12px;">
缺失模块。<br/>1、在博客根目录(注意不是yilia根目录)执行以下命令:<br/> npm i hexo-generator-json-content --save<br/><br/>
2、在根目录_config.yml里添加配置:
<pre style="font-size: 12px;" v-show="jsonFail">
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: true
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true
</pre>
</p>
<li class="search-li" v-for="item in items" v-show="!item.isHide">
<a v-bind:href="item.path|urlformat" class="search-title"><i class="icon-quo-left icon"></i>{{ item.title }}</a>
<p class="search-time">
<i class="icon-calendar icon"></i>
<span>{{ item.date|dateformat }}</span>
</p>
<p class="search-tag">
<i class="icon-price-tags icon"></i>
<span v-for="tag in item.tags" v-on:click="choseTag($event, tag.name)">#{{ tag.name }}</span>
</p>
</li>
</ul>
</section>
<%}%>
<%if(hasFriends){%>
<section class="tools-section tools-section-friends">
<section class="tools-section tools-section-friends" v-show="friends">
<%if(theme.friends && theme.friends.length != 0){%>
<div class="friends-wrap" id="js-friends">
<% for (var i in theme.friends){ %>
<a target="_blank" class="main-nav-link switch-friends-link" href="<%- url_for(theme.friends[i]) %>"><%= i %></a>
<% } %>
</div>
<ul class="search-ul">
<% for (var i in theme.friends){ %>
<li class="search-li">
<a href="<%- url_for(theme.friends[i]) %>" target="_blank" class="search-title"><i class="icon-quo-left icon"></i><%= i %></a>
</li>
<% } %>
</ul>
<%}%>
</section>
<%}%>
<%if(hasAboutme){%>
<section class="tools-section tools-section-me">
<section class="tools-section tools-section-me" v-show="aboutme">
<%if(theme.aboutme){%>
<div class="aboutme-wrap" id="js-aboutme"><%=theme.aboutme%></div>
<%}%>
View
@@ -1,13 +1,21 @@
<%- partial('_partial/head') %>
<body>
<div id="container">
<div class="left-col">
<div id="container" v-bind:class="{ show: isCtnShow }">
<canvas id="anm-canvas" class="anm-canvas"></canvas>
<div class="left-col" v-bind:class="{ show: isShow }">
<%- partial('_partial/left-col', null, {cache: !config.relative_link}) %>
</div>
<div class="mid-col">
<div class="mid-col" v-bind:class="{ show: isShow, hide: isShow === false }">
<%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %>
<div class="body-wrap">
<%- body %>
<div id="wrapper" class="body-wrap">
<div class="menu-l">
<div class="canvas-wrap">
<canvas data-colors="#eaeaea" data-sectionHeight="100" data-contentId="js-content" id="myCanvas1" class="anm-canvas"></canvas>
</div>
<div id="js-content" class="content-ll">
<%- body %>
</div>
</div>
</div>
<%- partial('_partial/footer') %>
</div>
View
@@ -1,6 +1,6 @@
{
"name": "yilia",
"version": "3.0.0",
"version": "4.0.0",
"description": "a theme for hexo",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
@@ -24,7 +24,15 @@
"homepage": "https://github.com/litten/hexo-theme-yilia#readme",
"devDependencies": {
"autoprefixer": "^6.5.1",
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-runtime": "^6.0.0",
"cross-env": "^1.0.6",
"css-loader": "^0.25.0",
"dom101": "^1.3.0",
"extract-text-webpack-plugin": "^1.0.1",
"node-sass": "^3.9.3",
"postcss-loader": "^1.0.0",
@@ -35,7 +43,11 @@
},
"dependencies": {
"badjs-report": "^1.2.2",
"fetch": "^1.1.0",
"fetch-ie8": "^1.4.3",
"file-loader": "^0.9.0",
"js-cookie": "^2.1.3"
"js-cookie": "^2.1.3",
"photoswipe": "^4.1.1",
"vue": "^2.1.4"
}
}

This file was deleted.

Oops, something went wrong.
@@ -58,6 +58,8 @@
margin: 30px;
position: relative;
border: 1px solid #ddd;
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
background: #fff;
transition: all 0.2s ease-in;
/* &.show{
Oops, something went wrong.

0 comments on commit 72dbdc2

Please sign in to comment.