新主题改造
This commit is contained in:
parent
113825166a
commit
f59ea1ea62
11
_config.yml
11
_config.yml
@ -78,7 +78,7 @@ pagination_dir: page
|
||||
# Extensions
|
||||
## Plugins: https://hexo.io/plugins/
|
||||
## Themes: https://hexo.io/themes/
|
||||
theme: hexo-theme-xups
|
||||
theme: hexo-theme-raytaylorism
|
||||
|
||||
#----------------------------
|
||||
# 搜索
|
||||
@ -91,5 +91,12 @@ search:
|
||||
## Docs: https://hexo.io/docs/deployment.html
|
||||
deploy:
|
||||
type: git
|
||||
repo: https://github.com/sookie2010/sookie2010.github.io.git
|
||||
repo: https://git.coding.net/sookie2010/sookie2010.coding.me.git
|
||||
branch: master
|
||||
|
||||
archive_generator:
|
||||
per_page: 0
|
||||
tag_generator:
|
||||
per_page: 0
|
||||
category_generator:
|
||||
per_page: 0
|
||||
27
source/_data/about.json
Normal file
27
source/_data/about.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"avatar": "https://i.loli.net/2018/05/04/5aeb37415a0dc.jpg",
|
||||
"name": "Stacy Kara",
|
||||
"tag": "Web前端/Java/技术宅",
|
||||
"desc": "你的简介(建议一两句话)",
|
||||
"skills": {
|
||||
"Javascript": 8,
|
||||
"Python": 6,
|
||||
"invisible-split-line-1": -1,
|
||||
"Node.js": 4
|
||||
},
|
||||
"projects": [{
|
||||
"name": "你的项目A",
|
||||
"image": "https://d13yacurqjgara.cloudfront.net/users/138819/screenshots/2578899/dribbble_800x600_01_1x.png",
|
||||
"tags": ["2016年", "项目标签"],
|
||||
"description": "你的项目A的简介",
|
||||
"link_text": "网站链接",
|
||||
"link": "https://dribbble.com/"
|
||||
}, {
|
||||
"name": "你的作品B",
|
||||
"image": "https://d13yacurqjgara.cloudfront.net/users/4094/screenshots/2578885/time-lords-drib_1x.jpg",
|
||||
"description": "你的作品B的简介",
|
||||
"tags": ["Github", "设计"],
|
||||
"link_text": "Github地址",
|
||||
"link": "https://github.com/"
|
||||
}]
|
||||
}
|
||||
11
source/_data/link.json
Normal file
11
source/_data/link.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"social": {
|
||||
"weibo": "https://weibo.com/2633013641",
|
||||
"github": "https://github.com/sookie2010",
|
||||
"rss": "/atom.xml"
|
||||
},
|
||||
"extern": {
|
||||
"raytaylorism主题作者的技术博客": "http://raytaylorlin.com/",
|
||||
"Github地址(测试友情链接)": "https://github.com/raytaylorlin"
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,9 @@
|
||||
---
|
||||
title: 关于
|
||||
date: 2016-01-31 22:10:28
|
||||
pageid: about
|
||||
---
|
||||
layout: about
|
||||
---
|
||||
|
||||
大家好,我是XXX。欢迎来到我的个人技术博客。
|
||||
|
||||
这里用markdown写下你的简介,就跟平时写md一样就可以了。
|
||||
79
themes/hexo-theme-raytaylorism/_config.yml
Normal file
79
themes/hexo-theme-raytaylorism/_config.yml
Normal file
@ -0,0 +1,79 @@
|
||||
# 菜单配置(若不需要某项可直接删除)
|
||||
menu:
|
||||
# 首页
|
||||
- id: home
|
||||
link: /
|
||||
icon: home
|
||||
class: menu-home
|
||||
# 归档
|
||||
- id: archives
|
||||
link: /archives
|
||||
icon: archive
|
||||
class: menu-archive
|
||||
# 分类
|
||||
- id: category
|
||||
link: javascript:;
|
||||
type: category
|
||||
icon: bookmark
|
||||
class: menu-category
|
||||
# 标签
|
||||
- id: tag
|
||||
link: javascript:;
|
||||
type: tag
|
||||
icon: tags
|
||||
class: menu-tag
|
||||
# 关于
|
||||
- id: about
|
||||
link: /about
|
||||
icon: user
|
||||
class: menu-about
|
||||
# 搜索
|
||||
- id: search
|
||||
link: "#search"
|
||||
icon: search
|
||||
class: menu-search modal-trigger
|
||||
|
||||
# 颜色配置
|
||||
color:
|
||||
header: indigo
|
||||
footer: indigo
|
||||
page_nav: indigo
|
||||
side_nav: indigo darken-1
|
||||
tag: pink lighten-1
|
||||
article_title_link: indigo
|
||||
link: pink
|
||||
pagination: pink
|
||||
tab: pink
|
||||
archive_item: grey
|
||||
fab: pink
|
||||
fab_2: green
|
||||
fab_3: yellow darken-1
|
||||
new: pink
|
||||
about_header: indigo
|
||||
about_title: indigo
|
||||
|
||||
archive_yearly: true
|
||||
|
||||
# 版权信息
|
||||
copyright: © 2016 colorfulsweet.site, All rights reserved.
|
||||
|
||||
# Disqus评论shortname,若为空则不启用
|
||||
disqus_shortname:
|
||||
# 多说shortname,若为空则不启用
|
||||
duoshuo_shortname:
|
||||
# 网易云跟帖productKey,从通用代码中获取,若为空则不启用
|
||||
yungentie_product_key:
|
||||
|
||||
# Google分析track id,若为空则不启用
|
||||
google_analytics:
|
||||
# 腾讯分析sId,若为空则不启用
|
||||
tencent_analytics:
|
||||
|
||||
# 高亮的主题,若为空则使用默认主题
|
||||
google_code_prettify: prettify-tomorrow-night-eighties
|
||||
|
||||
# 是否启用MathJax数学公式渲染。如果你确认整个站点的博文都不会用到Latex数学公式,可以将其该项设为false提高页面加载速度
|
||||
mathjax: true
|
||||
|
||||
# 是否启用网页计数器(使用不蒜子插件)
|
||||
page_stat: false
|
||||
37
themes/hexo-theme-raytaylorism/languages/default.yml
Normal file
37
themes/hexo-theme-raytaylorism/languages/default.yml
Normal file
@ -0,0 +1,37 @@
|
||||
categories: Categories
|
||||
search: Search
|
||||
tags: Tags
|
||||
tagcloud: Tag Cloud
|
||||
prev: "Prev: %s"
|
||||
next: "Next: %s"
|
||||
comment: Comments
|
||||
archive_a: Archives
|
||||
archive_b: "Archives: %s"
|
||||
page: Page %d
|
||||
recent_posts: Recent Posts
|
||||
blogroll: Links
|
||||
returntop: Return to top
|
||||
readmore: READ MORE
|
||||
floatmenu: Menu
|
||||
|
||||
menu:
|
||||
home: Home
|
||||
archives: Archives
|
||||
tag: Tags
|
||||
category: Categories
|
||||
about: About
|
||||
search: Search
|
||||
social: Social
|
||||
current_page: Current page
|
||||
page_name:
|
||||
categories: (Categories)
|
||||
tags: (Tags)
|
||||
archives: (Archives)
|
||||
about:
|
||||
about: About
|
||||
skills: Skills
|
||||
works: Works & Projects
|
||||
construction: Page under construction...
|
||||
go_back_home: Go back home
|
||||
no_title: No title
|
||||
side_nav_paper: "%d"
|
||||
37
themes/hexo-theme-raytaylorism/languages/zh-CN.yml
Normal file
37
themes/hexo-theme-raytaylorism/languages/zh-CN.yml
Normal file
@ -0,0 +1,37 @@
|
||||
categories: 分类
|
||||
search: 搜索
|
||||
tags: 标签
|
||||
tagcloud: 标签云
|
||||
prev: 上一篇:%s
|
||||
next: 下一篇:%s
|
||||
comment: 留言
|
||||
archive_a: 归档
|
||||
archive_b: 归档:%s
|
||||
page: 第 %d 页
|
||||
recent_posts: 最近的文章
|
||||
blogroll: 友情链接
|
||||
returntop: 回到顶部
|
||||
readmore: 阅读全文
|
||||
floatmenu: 菜单
|
||||
|
||||
menu:
|
||||
home: 首页
|
||||
archives: 归档
|
||||
tag: 标签
|
||||
category: 分类
|
||||
about: 关于
|
||||
search: 搜索
|
||||
social: 社交
|
||||
current_page: 当前位置
|
||||
page_name:
|
||||
categories: (分类目录)
|
||||
tags: (标签)
|
||||
archives: (归档)
|
||||
about:
|
||||
about: 关于
|
||||
skills: 技能
|
||||
works: 作品与项目
|
||||
construction: 页面建设中...
|
||||
go_back_home: 返回首页
|
||||
no_title: 无题
|
||||
side_nav_paper: "%d 篇"
|
||||
37
themes/hexo-theme-raytaylorism/languages/zh-TW.yml
Normal file
37
themes/hexo-theme-raytaylorism/languages/zh-TW.yml
Normal file
@ -0,0 +1,37 @@
|
||||
categories: 分類
|
||||
search: 搜尋
|
||||
tags: 標籤
|
||||
tagcloud: 標籤雲
|
||||
prev: 上一篇:%s
|
||||
next: 下一篇:%score
|
||||
comment: 留言
|
||||
archive_a: 彙整
|
||||
archive_b: 彙整:%s
|
||||
page: 第 %d 頁
|
||||
recent_posts: 最新文章
|
||||
blogroll: 友情連結
|
||||
returntop: 回到頂部
|
||||
readmore: 閱讀全文
|
||||
floatmenu: 菜單
|
||||
|
||||
menu:
|
||||
home: 首頁
|
||||
archives: 彙整
|
||||
tag: 標籤
|
||||
category: 分類
|
||||
about: 關於
|
||||
search: 搜尋
|
||||
social: 社交
|
||||
current_page: 當前位置
|
||||
page_name:
|
||||
categories: (分類目錄)
|
||||
tags: (標籤)
|
||||
archives: (彙整)
|
||||
about:
|
||||
about: 關於
|
||||
skills: 技能
|
||||
works: 作品與項目
|
||||
construction: 頁面建設中...
|
||||
go_back_home: 返回首頁
|
||||
no_title: 無題
|
||||
side_nav_paper: "%d 篇"
|
||||
@ -0,0 +1,9 @@
|
||||
<%- partial('plugin/noscript') %>
|
||||
|
||||
<%- js('js/jquery.min.js') %>
|
||||
<%- js('js/materialize.min.js') %>
|
||||
<%- js('js/prettify.js') %>
|
||||
<%- js('js/main.js') %>
|
||||
|
||||
<%- partial('plugin/analytics') %>
|
||||
<%- partial('plugin/mathjax') %>
|
||||
79
themes/hexo-theme-raytaylorism/layout/_partial/archive.ejs
Normal file
79
themes/hexo-theme-raytaylorism/layout/_partial/archive.ejs
Normal file
@ -0,0 +1,79 @@
|
||||
<%
|
||||
var title = '';
|
||||
var archiveHtml = null;
|
||||
if (page.category) {
|
||||
titleKey = 'categories';
|
||||
archiveHtml = '<a class="breadcrumb" href="/' + page.base + '">' + page.category + '</a>';
|
||||
}
|
||||
if (page.tag) {
|
||||
titleKey = 'tags';
|
||||
archiveHtml = '<a class="breadcrumb" href="/' + page.base + '">' + page.tag + '</a>';
|
||||
}
|
||||
if (page.archive){
|
||||
if (page.year) {
|
||||
title = page.year + (page.month ? '/' + page.month : '');
|
||||
} else {
|
||||
titleKey = 'archives';
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
<%- partial('pagenav', {nav_head: __('current_page') + __('page_name.' + titleKey), partial_path: null, archive_html: archiveHtml}) %>
|
||||
|
||||
<% if (pagination == 2){ %>
|
||||
<% page.posts.each(function(item){ %>
|
||||
<%- partial('simple_article', {item: item, index: true, showEntry: false, showTags: false}) %>
|
||||
<% }); %>
|
||||
<%- partial('pagination') %>
|
||||
<% } else if (page.archive) { %>
|
||||
<ul class="collapsible mt-0" data-collapsible="accordion">
|
||||
<%
|
||||
// 将各年份的文章汇总,数据结构为
|
||||
// [{year: 2016, posts: [item1, item2]}, {year: 2015, posts: [item3, item4, item5]}]
|
||||
var activeFlag = true;
|
||||
var yearPosts = [];
|
||||
page.posts.each(function(item) {
|
||||
var y = item.date.year();
|
||||
var yp;
|
||||
if (yearPosts.length == 0 || yearPosts[yearPosts.length - 1].year != y) {
|
||||
yp = {
|
||||
year: y,
|
||||
posts: [item]
|
||||
};
|
||||
yearPosts.push(yp);
|
||||
} else {
|
||||
yp = yearPosts[yearPosts.length - 1];
|
||||
yp.posts.push(item);
|
||||
}
|
||||
});
|
||||
%>
|
||||
<% yearPosts.forEach(function(yearPost) { %>
|
||||
<li>
|
||||
<div class="collapsible-header <%= activeFlag ? 'active' : '' %><% activeFlag = false; %>">
|
||||
<i class="fa fa-archive"></i><%= yearPost.year %>
|
||||
</div>
|
||||
<div class="collapsible-body">
|
||||
<div class="collection">
|
||||
<% yearPost.posts.forEach(function(item) { %>
|
||||
<a href="<%- url_for(item.path) %>" class="collection-item <%= theme.color.archive_item %>-text text-darken-1">
|
||||
<time datetime="<%= item.date.toDate().toISOString() %>"><%= item.date.format(config.date_format) %></time>
|
||||
<span> </span>
|
||||
<%- item.title %>
|
||||
</a>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
<% } else { %>
|
||||
<div class="collection mt-0">
|
||||
<% page.posts.each(function(item) { %>
|
||||
<a href="<%- url_for(item.path) %>" class="collection-item <%= theme.color.archive_item %>-text text-darken-1">
|
||||
<time datetime="<%= item.date.toDate().toISOString() %>"><%= item.date.format(config.date_format) %></time>
|
||||
<span> </span>
|
||||
<%- item.title %>
|
||||
</a>
|
||||
<% }); %>
|
||||
</div>
|
||||
<% } %>
|
||||
@ -0,0 +1,15 @@
|
||||
<article class="<%= item.layout %>">
|
||||
<header>
|
||||
<div class="icon"></div>
|
||||
<time datetime="<%= item.date.toDate().toISOString() %>"><a href="<%- url_for(item.path) %>"><%= item.date.format(config.date_format) %></a></time>
|
||||
<% if (item.link){ %>
|
||||
<% if (item.title){ %>
|
||||
<h1 class="title link"><a href="<%- item.link %>" target="_blank"><%= item.title %></a></h1>
|
||||
<% } else { %>
|
||||
<h1 class="title link"><a href="<%- item.link %>" target="_blank"><%= item.link %></a></h1>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<h1 class="title"><a href="<%- url_for(item.path) %>"><%= item.title %></a></h1>
|
||||
<% } %>
|
||||
</header>
|
||||
</article>
|
||||
26
themes/hexo-theme-raytaylorism/layout/_partial/article.ejs
Normal file
26
themes/hexo-theme-raytaylorism/layout/_partial/article.ejs
Normal file
@ -0,0 +1,26 @@
|
||||
<%- partial('pagenav', {nav_head: __('current_page') + __('page_name.categories'), partial_path: 'post/category', archive_html: null}) %>
|
||||
<article>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<% if (item.photos && item.photos.length) { %>
|
||||
<%- partial('post/gallery') %>
|
||||
<% } %>
|
||||
|
||||
<div class="article-title">
|
||||
<%- partial('post/title') %>
|
||||
</div>
|
||||
<%- partial('post/time') %>
|
||||
<%- partial('post/readtimes') %>
|
||||
<%- partial('post/tag') %>
|
||||
<%- partial('post/tablecontents') %>
|
||||
|
||||
<div class="entry <%= theme.color.link %>-link-context">
|
||||
<%- item.content %>
|
||||
<%- partial('post/prevnext') %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<%- partial('plugin/comment') %>
|
||||
@ -0,0 +1,9 @@
|
||||
<div class="center-align">
|
||||
<div class="construction-container">
|
||||
<div class="center-align">
|
||||
<i class="fa fa-cog fa-spin" style="font-size: 8rem;"></i>
|
||||
</div>
|
||||
<h4><%= __('construction') %></h4>
|
||||
<a href="/" class="waves-effect waves-light btn green"><%= __('go_back_home') %></a>
|
||||
</div>
|
||||
</div>
|
||||
9
themes/hexo-theme-raytaylorism/layout/_partial/float.ejs
Normal file
9
themes/hexo-theme-raytaylorism/layout/_partial/float.ejs
Normal file
@ -0,0 +1,9 @@
|
||||
<div class="fixed-action-btn float-sitemap">
|
||||
<a class="btn-floating btn-large <%= theme.color.fab %>">
|
||||
<i class="fa fa-caret-square-o-up"></i>
|
||||
</a>
|
||||
<ul>
|
||||
<li><a class="btn-return-top btn-floating waves-effect <%= theme.color.fab_2 %>" title="<%- __('returntop') %>"><i class="fa fa-arrow-circle-o-up"></i></a></li>
|
||||
<li><a class="btn-floating waves-effect button-collapse <%= theme.color.fab_3 %>" data-activates="main-menu" title="<%- __('floatmenu') %>"><i class="fa fa-navicon"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
35
themes/hexo-theme-raytaylorism/layout/_partial/footer.ejs
Normal file
35
themes/hexo-theme-raytaylorism/layout/_partial/footer.ejs
Normal file
@ -0,0 +1,35 @@
|
||||
<footer class="page-footer <%= theme.color.footer %> darken-1">
|
||||
<% if (site.data.link) { %>
|
||||
<div class="footer-container container">
|
||||
<div class="row">
|
||||
<% if (site.data.link.social) { %>
|
||||
<div class="social-group col m4 s12">
|
||||
<h5 class="white-text"><%= __('social') %></h5>
|
||||
<% for (var type in site.data.link.social) { %>
|
||||
<a class="social-link" href="<%= site.data.link.social[type] %>" target="_blank">
|
||||
<i class="fa fa-2x fa-<%= type %>"></i>
|
||||
</a>
|
||||
<% } %>
|
||||
<%- partial('plugin/page_stat') %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (site.data.link && site.data.link.extern) { %>
|
||||
<div class="col m8 s12">
|
||||
<h5 class="white-text"><%= __('blogroll') %></h5>
|
||||
<% for (var name in site.data.link.extern) { %>
|
||||
<a class="social-link" href="<%= site.data.link.extern[name] %>" target="_blank"><%= name %></a>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<div class="footer-copyright <%= theme.color.link %>-link-context">
|
||||
<div class="container">
|
||||
<%= theme.copyright %>
|
||||
<p class="right" style="margin-top: 0;">Power By <a href="https://hexo.io">Hexo</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
68
themes/hexo-theme-raytaylorism/layout/_partial/head.ejs
Normal file
68
themes/hexo-theme-raytaylorism/layout/_partial/head.ejs
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
..
|
||||
.' @`._
|
||||
~ ...._.' ,__.-;
|
||||
_..------/` .-' ~
|
||||
: __./' , .'-'--.._
|
||||
~ `---(.-'''---. \`._ `. ~
|
||||
_.--'( .______.'.-' `-.` `.
|
||||
: `-..____`-. ;
|
||||
`. ```` 稻花香里说丰年, ; ~
|
||||
`-.__ 听取人生经验。 __.-'
|
||||
````-----.......-----''' ~
|
||||
~ ~
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<%
|
||||
var title = [];
|
||||
if (page.current > 1) title.push(__('page', page.current));
|
||||
if (page.title) title.push(page.title);
|
||||
if (page.category) title.push(page.category);
|
||||
if (page.tag) title.push(page.tag);
|
||||
if (page.archive){
|
||||
if (page.year) title.push(__('archive_b', page.year + (page.month ? '/' + page.month : '')));
|
||||
else title.push(__('archive_a'));
|
||||
}
|
||||
title.push(config.subtitle);
|
||||
%>
|
||||
<title><%= title.join(' | ') %></title>
|
||||
<% if (config.author){ %><meta name="author" content="<%= config.author %>"><% } %>
|
||||
<% if (page.description){ %>
|
||||
<meta name="description" content="<%= page.description %>">
|
||||
<% } else if (config.description){ %>
|
||||
<meta name="description" content="<%= config.description %>">
|
||||
<% } else if (page.excerpt){ %>
|
||||
<meta name="description" content="<%= strip_html(page.excerpt).replace(/^\s*/, '').replace(/\s*$/, '') %>">
|
||||
<% } else if (page.content){ %>
|
||||
<meta name="description" content="<%= strip_html(page.content).replace(/^\s*/, '').replace(/\s*$/, '').substring(0, 150) %>">
|
||||
<% } %>
|
||||
<% if (page.keywords){ %><meta name="keywords" content="<%= page.keywords %>"><% } %>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
|
||||
<% if (page.title){ %><meta property="og:title" content="<%= page.title %>"/><% } %>
|
||||
<meta property="og:site_name" content="<%= config.title %>"/>
|
||||
|
||||
<% if(page.cover) { %>
|
||||
<meta property="og:image" content="<%= page.cover %>" />
|
||||
<% } else { %>
|
||||
<meta property="og:image" content="<%= config.cover %>"/>
|
||||
<% } %>
|
||||
|
||||
<link rel="icon" type="image/png" href="<%- config.root %>favicon.ico">
|
||||
<link rel="alternate" href="<% if (theme.rss){ %><%- theme.rss %><% } else { %><%- config.root %>atom.xml<% } %>" title="<%= config.title %>" type="application/atom+xml">
|
||||
<link rel="stylesheet" href="<%- config.root %>css/lib/materialize.min.css">
|
||||
<link rel="stylesheet" href="<%- config.root %>css/lib/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="<%- config.root %>css/style.css" media="screen" type="text/css">
|
||||
|
||||
<% if (theme.google_code_prettify) { %>
|
||||
<link rel="stylesheet" href="<%- config.root %>css/lib/<%= theme.google_code_prettify %>.css" type="text/css">
|
||||
<% } else { %>
|
||||
<link rel="stylesheet" href="<%- config.root %>css/lib/prettify_default.css" type="text/css">
|
||||
<% } %>
|
||||
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
</head>
|
||||
23
themes/hexo-theme-raytaylorism/layout/_partial/header.ejs
Normal file
23
themes/hexo-theme-raytaylorism/layout/_partial/header.ejs
Normal file
@ -0,0 +1,23 @@
|
||||
<nav class="<%= theme.color.header %>">
|
||||
<div class="nav-wrapper">
|
||||
<a href="#" data-activates="main-menu" class="button-collapse">
|
||||
<i class="fa fa-navicon"></i>
|
||||
</a>
|
||||
<div class="">
|
||||
<a href="/" class="brand-logo hide-on-med-and-down"><%= config.title %></a>
|
||||
<ul class="right hide-on-med-and-down">
|
||||
<% for (var i in theme.menu){ %>
|
||||
<li>
|
||||
<a class="<%= theme.menu[i].class %> <%= theme.menu[i].type ? theme.menu[i].type+'-menu' : '' %>" href="<%= theme.menu[i].link %>" <% if (theme.menu[i].type) { %>data-activates="<%=theme.menu[i].type %>-menu" <% } %>>
|
||||
<i class="fa fa-<%= theme.menu[i].icon %> "></i>
|
||||
<%= __('menu.' + theme.menu[i].id) %>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<%- partial('side_nav') %>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<%- partial('search') %>
|
||||
@ -0,0 +1,11 @@
|
||||
<div class="mdl-layout__drawer">
|
||||
<span class="mdl-layout-title"><%= config.title %></span>
|
||||
<nav class="mdl-navigation">
|
||||
<% for (var i in theme.menu){ %>
|
||||
<a class="mdl-navigation__link" href="<%- theme.menu[i] %>">
|
||||
<i class="material-icons" role="presentation"><%= theme.menu_icon[i] %></i>
|
||||
<%= i %>
|
||||
</a>
|
||||
<% } %>
|
||||
</nav>
|
||||
</div>
|
||||
12
themes/hexo-theme-raytaylorism/layout/_partial/pagenav.ejs
Normal file
12
themes/hexo-theme-raytaylorism/layout/_partial/pagenav.ejs
Normal file
@ -0,0 +1,12 @@
|
||||
<nav class="page-nav hide-on-small-only">
|
||||
<div class="nav-wrapper <%= theme.color.page_nav %>">
|
||||
<span class="breadcrumb"><%= nav_head %></span>
|
||||
<% if (partial_path) { %>
|
||||
<%- partial(partial_path) %>
|
||||
<% } %>
|
||||
|
||||
<% if (archive_html) { %>
|
||||
<%- archive_html %>
|
||||
<% } %>
|
||||
</div>
|
||||
</nav>
|
||||
@ -0,0 +1,13 @@
|
||||
<ul class="pagination center-align">
|
||||
<li class="<%= page.current === 1 ? 'disabled' : '' %>">
|
||||
<a href="<%- config.root %><%- page.prev_link %>"><i class="fa fa-angle-left"></i></a>
|
||||
</li>
|
||||
|
||||
<% for (var i = 1; i <= page.total; i++) { %>
|
||||
<li class="<%= page.current == i ? 'active ' + theme.color.pagination : 'waves-effect' %>"><a href="<%= i == 1 ? '/' : '/page/' + i %>"><%= i %></a></li>
|
||||
<% } %>
|
||||
|
||||
<li class="<%= page.next_link === '' ? 'disabled' : '' %>">
|
||||
<a href="<%- config.root %><%- page.next_link %>"><i class="fa fa-angle-right"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
@ -0,0 +1,16 @@
|
||||
<% if (theme.google_analytics){ %>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '<%= theme.google_analytics %>', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.tencent_analytics){ %>
|
||||
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=<%= theme.tencent_analytics %>" charset="UTF-8"></script>
|
||||
<% } %>
|
||||
@ -0,0 +1,66 @@
|
||||
<%
|
||||
var pageId = page.path;
|
||||
var pageUrl = page.permalink;
|
||||
var pageTitle = page.title;
|
||||
%>
|
||||
|
||||
<% if (theme.disqus_shortname && page.comments){ %>
|
||||
<section id="comment">
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() {
|
||||
this.page.url = '<%= pageUrl %>';
|
||||
this.page.identifier = '<%= pageId %>';
|
||||
};
|
||||
(function() {
|
||||
var d = document,
|
||||
s = d.createElement('script');
|
||||
s.src = '//<%= theme.disqus_shortname %>.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', + new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the
|
||||
<a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
</section>
|
||||
<% } else if (theme.duoshuo_shortname && page.comments){ %>
|
||||
<section id="comment">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<!-- Duoshuo Comment BEGIN -->
|
||||
<div class="ds-thread" data-thread-key="<%= pageId %>" data-title="<%= pageTitle %>" data-url="<%= pageUrl %>"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
console.log(document.querySelector('.ds-thread'));
|
||||
var duoshuoQuery = {
|
||||
short_name: '<%= theme.duoshuo_shortname %>'
|
||||
};
|
||||
(function() {
|
||||
var ds = document.createElement('script');
|
||||
ds.type = 'text/javascript';
|
||||
ds.async = true;
|
||||
ds.src = (document.location.protocol == 'https:'
|
||||
? 'https:'
|
||||
: 'http:') + '//static.duoshuo.com/embed.js';
|
||||
ds.charset = 'UTF-8';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds);
|
||||
})();
|
||||
</script>
|
||||
<!-- Duoshuo Comment END -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<% } else if (theme.yungentie_product_key && page.comments){ %>
|
||||
<div id="cloud-tie-wrapper" class="cloud-tie-wrapper"></div>
|
||||
<script>
|
||||
var cloudTieConfig = {
|
||||
url: document.location.href,
|
||||
sourceId: "",
|
||||
productKey: "<%= theme.yungentie_product_key %>",
|
||||
target: "cloud-tie-wrapper"
|
||||
};
|
||||
</script>
|
||||
<script src="https://img1.cache.netease.com/f2e/tie/yun/sdk/loader.js"></script>
|
||||
<% } %>
|
||||
@ -0,0 +1,10 @@
|
||||
<% if (theme.mathjax) { %>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
|
||||
</script>
|
||||
<% } %>
|
||||
@ -0,0 +1,8 @@
|
||||
<noscript>
|
||||
<div class="noscript">
|
||||
<p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能,请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
|
||||
</div>
|
||||
</noscript>
|
||||
<div class="noscript">
|
||||
<p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能,请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
|
||||
</div>
|
||||
@ -0,0 +1,15 @@
|
||||
<% if (theme.page_stat) { %>
|
||||
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
|
||||
</script>
|
||||
<div class="site-visitors-container white-text">
|
||||
<span>
|
||||
<i class="fa fa-user"></i>
|
||||
<span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
|
||||
</span>
|
||||
<span> | </span>
|
||||
<span>
|
||||
<i class="fa fa-eye"></i>
|
||||
<span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
|
||||
</span>
|
||||
</div>
|
||||
<% } %>
|
||||
@ -0,0 +1,10 @@
|
||||
<% if (item.categories && item.categories.length > 0){ %>
|
||||
<%
|
||||
var cats = [];
|
||||
item.categories.forEach(function(cat){
|
||||
cats.push('<a class="breadcrumb" href="' + config.root + cat.path + '">' + cat.name + '</a>');
|
||||
});
|
||||
%>
|
||||
|
||||
<%- cats.join('') %>
|
||||
<% } %>
|
||||
@ -0,0 +1,18 @@
|
||||
<div class="gallery carousel carousel-slider">
|
||||
<% if (item.photos.length){ %>
|
||||
<% item.photos.forEach(function(photo){ %>
|
||||
<span class="carousel-item"><img class="carousel-image" src="<%- photo %>"></span>
|
||||
<% }); %>
|
||||
<% } else { %>
|
||||
<img class="carousel-item" src="<%- item.photos %>">
|
||||
<% } %>
|
||||
<div class="control">
|
||||
<div class="carousel-control prev">
|
||||
<i class="fa fa-left"></i>
|
||||
|
||||
</div>
|
||||
<div class="carousel-control next">
|
||||
<i class="fa fa-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,15 @@
|
||||
<% if (item.prev) { %>
|
||||
<p class="<%= theme.color.link %>-link-context">
|
||||
<a href="<%= url_for(item.prev.path) %>" rel="next" title="<%= item.prev.title %>">
|
||||
<%= __('prev', item.prev.title) %>
|
||||
</a>
|
||||
</p>
|
||||
<% } %>
|
||||
|
||||
<% if (item.next) { %>
|
||||
<p class="<%= theme.color.link %>-link-context">
|
||||
<a href="<%= url_for(item.next.path) %>" rel="next" title="<%= item.next.title %>">
|
||||
<%= __('next', item.next.title) %>
|
||||
</a>
|
||||
</p>
|
||||
<% } %>
|
||||
@ -0,0 +1,6 @@
|
||||
<% if (theme.page_stat) { %>
|
||||
<span id="busuanzi_container_page_pv" class="read-times-container">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span id="busuanzi_value_page_pv"></span>
|
||||
</span>
|
||||
<% } %>
|
||||
@ -0,0 +1,3 @@
|
||||
<div class="toc <%= theme.color.link %>-link-context hide-on-med-and-down">
|
||||
<%- toc(item.content, {class: 'section table-of-contents', list_number: false}) %>
|
||||
</div>
|
||||
@ -0,0 +1,7 @@
|
||||
<% if (item.tags && item.tags.length > 0){ %>
|
||||
<div class="tags-row">
|
||||
<% item.tags.forEach(function(tag) { %>
|
||||
<a href="<%= config.root + tag.path %>" class="chip <%= theme.color.tag %>"><%= tag.name %></a>
|
||||
<% }); %>
|
||||
</div>
|
||||
<% } %>
|
||||
@ -0,0 +1 @@
|
||||
<time class="<%= theme.color.link %>-link-context" datetime="<%= item.date.toDate().toISOString() %>"><a href="<%- url_for(item.path) %>"><%= item.date.format(config.date_format) %></a></time>
|
||||
@ -0,0 +1,13 @@
|
||||
<% if (item.link){ %>
|
||||
<% if (item.title){ %>
|
||||
<h1><a href="<%- item.link %>" target="_blank"><%= item.title || __('no_title') %></a></h1>
|
||||
<% } else { %>
|
||||
<h1><a href="<%- item.link %>" target="_blank"><%= item.link || __('no_title') %></a></h1>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<% if (index){ %>
|
||||
<h1 class="<%= theme.color.article_title_link %>-link-context"><a href="<%- url_for(item.path) %>"><%= item.title || __('no_title') %></a></h1>
|
||||
<% } else { %>
|
||||
<h1><%= item.title || __('no_title') %></h1>
|
||||
<% } %>
|
||||
<% } %>
|
||||
@ -0,0 +1,9 @@
|
||||
<div id="search" class="modal search-modal">
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<input id="search-input" type="text">
|
||||
<label for="search-input"><%= __('menu.search') %></label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="search-result" class="search-result col s12"></div>
|
||||
</div>
|
||||
79
themes/hexo-theme-raytaylorism/layout/_partial/side_nav.ejs
Normal file
79
themes/hexo-theme-raytaylorism/layout/_partial/side_nav.ejs
Normal file
@ -0,0 +1,79 @@
|
||||
<div>
|
||||
<ul class="side-nav <%= theme.color.side_nav %>" id="main-menu">
|
||||
<% if (site.data.about) { %>
|
||||
<li class="side-user">
|
||||
<div class="row">
|
||||
<div class="col s4 no-padding">
|
||||
<img class="avatar-image circle responsive-img" src="<%= site.data.about.avatar %>" alt="User Avatar">
|
||||
</div>
|
||||
<div class="info col s8 valign-wrapper no-padding">
|
||||
<div class="valign">
|
||||
<p class="name"><%= site.data.about.name %></p>
|
||||
<p class="desc"><%= site.data.about.tag %></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% } %>
|
||||
<% for (var i in theme.menu){ %>
|
||||
<li class="no-padding item">
|
||||
<a class="waves-effect <%= theme.menu[i].class %> <%= theme.menu[i].type ? theme.menu[i].type+'-menu' : '' %>" href="<%= theme.menu[i].link %>" <% if (theme.menu[i].type) { %>data-activates="<%=theme.menu[i].type %>-menu" <% } %>>
|
||||
<i class="fa fa-<%= theme.menu[i].icon %> "></i>
|
||||
<%= __('menu.' + theme.menu[i].id) %>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<ul class="side-nav <%= theme.color.side_nav %>" id="category-menu">
|
||||
<li><h4>分类</h4></li>
|
||||
<%
|
||||
var catTree = {};
|
||||
site.categories.forEach(function(item) {
|
||||
if(item.posts.length > 0) {
|
||||
var cats = item.path.split('/');
|
||||
var i, depth = 0;
|
||||
|
||||
var addTree = function(root, i) {
|
||||
if(i + 1 > cats.length) {
|
||||
return;
|
||||
} else if(!root.hasOwnProperty(cats[i])) {
|
||||
root[cats[i]] = {posts_num: item.posts.length};
|
||||
addTree(root[cats[i]], i + 1);
|
||||
} else {
|
||||
addTree(root[cats[i]], i + 1);
|
||||
}
|
||||
};
|
||||
addTree(catTree, 1);
|
||||
}
|
||||
});
|
||||
var walk = function(root, path, depth) {
|
||||
for(var item in root) {
|
||||
if(item.length > 0 && item != 'posts_num') {
|
||||
var space = '';
|
||||
for(i = 0; i < depth; i++) {
|
||||
space += '--';
|
||||
}
|
||||
%>
|
||||
<li class="collapse-level-<%= depth %> item" collapse-level="<%= depth %>">
|
||||
<a class="no-padding" href="<%- config.root %><%- path + item %>/">
|
||||
<%= item %> <span class="right"><%= __('side_nav_paper', root[item]['posts_num']) %></span></a>
|
||||
</a>
|
||||
</li>
|
||||
<%
|
||||
walk(root[item], path + item + '/', depth + 1);
|
||||
} // if
|
||||
} // for
|
||||
}; // function work
|
||||
|
||||
walk(catTree, 'categories/', 0);
|
||||
%>
|
||||
</ul>
|
||||
<div class="side-nav <%= theme.color.side_nav %>" id="tag-menu">
|
||||
<h4 style="padding:0 15px">标签</h4>
|
||||
<% site.tags.forEach(function (item, index) { %>
|
||||
<a href="<%= url_for(item.path) %>">
|
||||
<%= item.name %> <span class="right"><%= __('side_nav_paper', item.length) %></span></a>
|
||||
</a>
|
||||
<% }); %>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,22 @@
|
||||
<article class="simple-article">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="article-title">
|
||||
<%- partial('post/title') %>
|
||||
</div>
|
||||
<%- partial('post/time') %>
|
||||
<%- partial('post/tag') %>
|
||||
<% if (showEntry && item.excerpt && index) { %>
|
||||
<div class="entry <%= theme.color.link %>-link-context">
|
||||
<%- item.excerpt %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<% if (item.excerpt) { %>
|
||||
<div class="card-action <%= theme.color.link %>-link-context">
|
||||
<a href="<%= "/" + item.path %>"><%= __('readmore') %></a>
|
||||
</ div>
|
||||
<% } %>
|
||||
</div>
|
||||
</article>
|
||||
18
themes/hexo-theme-raytaylorism/layout/_partial/slider.ejs
Normal file
18
themes/hexo-theme-raytaylorism/layout/_partial/slider.ejs
Normal file
@ -0,0 +1,18 @@
|
||||
<% var sliders = site.data.slider; %>
|
||||
<% if (sliders) { %>
|
||||
<div class="slider">
|
||||
<ul class="slides">
|
||||
<% for (var i in sliders) { %>
|
||||
<li>
|
||||
<a href="<%= sliders[i].link || 'javascript:;' %>">
|
||||
<img class="slider-image" src="<%= sliders[i].image %>">
|
||||
<div class="caption <%= sliders[i].align %>-align">
|
||||
<h4><%= sliders[i].title %></h3>
|
||||
<h5 class="light grey-text text-lighten-3"><%= sliders[i].subtitle %></h5>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } %>
|
||||
28
themes/hexo-theme-raytaylorism/layout/_widget/blogroll.ejs
Normal file
28
themes/hexo-theme-raytaylorism/layout/_widget/blogroll.ejs
Normal file
@ -0,0 +1,28 @@
|
||||
<% if (theme.blogrolls && theme.blogrolls.length > 0) { %>
|
||||
<%
|
||||
var extraClass = '';
|
||||
if (idx.current % 3 === 0) {
|
||||
extraClass += ' first';
|
||||
if (idx.current >= 3) {
|
||||
extraClass += ' newline';
|
||||
}
|
||||
}
|
||||
%>
|
||||
<div class="widget blogroll<%= extraClass %>">
|
||||
<h3 class="title"><%= __('blogroll') %></h3>
|
||||
<ul class="entry">
|
||||
<% theme.blogrolls.forEach(function(item){ %>
|
||||
<%
|
||||
var description, linkURL
|
||||
for (var tmp in item) {
|
||||
description = tmp;
|
||||
linkURL = item[tmp];
|
||||
}
|
||||
%>
|
||||
<li><a href="<%- linkURL %>" target="_blank"><%= description %></a></li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } else {
|
||||
idx.current -= 1
|
||||
} %>
|
||||
65
themes/hexo-theme-raytaylorism/layout/_widget/category.ejs
Normal file
65
themes/hexo-theme-raytaylorism/layout/_widget/category.ejs
Normal file
@ -0,0 +1,65 @@
|
||||
<% if (site.categories.length){ %>
|
||||
<%
|
||||
var extraClass = '';
|
||||
if (idx.current % 3 === 0) {
|
||||
extraClass += ' first';
|
||||
if (idx.current >= 3) {
|
||||
extraClass += ' newline';
|
||||
}
|
||||
}
|
||||
%>
|
||||
<div class="widget tag<%= extraClass %>">
|
||||
<h3 class="title"><%= __('categories') %></h3>
|
||||
<div class="entry">
|
||||
<%
|
||||
var catTree = {};
|
||||
site.categories.each(function(item) {
|
||||
if(item.posts.length > 0) {
|
||||
var cats = item.path.split('/');
|
||||
var i, depth = 0;
|
||||
var addTree = function(root, i) {
|
||||
if(i + 1 > cats.length) {
|
||||
return;
|
||||
} else if(!root.hasOwnProperty(cats[i])) {
|
||||
root[cats[i]] = {posts_num: item.posts.length};
|
||||
addTree(root[cats[i]], i + 1);
|
||||
} else {
|
||||
//root[cats[i]]['posts_num'] += 1;
|
||||
addTree(root[cats[i]], i + 1);
|
||||
}
|
||||
};
|
||||
addTree(catTree, 1);
|
||||
}
|
||||
});
|
||||
%>
|
||||
|
||||
<%
|
||||
var walk = function(root, path, depth) {
|
||||
var item;
|
||||
%>
|
||||
<ul>
|
||||
|
||||
<%
|
||||
for(item in root) {
|
||||
if(item.length > 0 && item != 'posts_num'){
|
||||
var space = '';
|
||||
for(i = 0; i < depth; i++) {
|
||||
space += '--';
|
||||
}
|
||||
%>
|
||||
<li><a href="<%- config.root %><%- path + item + '/' %>"><%= item %></a><small><%= root[item]['posts_num'] %></small></li>
|
||||
<%
|
||||
walk(root[item], path + item + '/', depth + 1);
|
||||
}
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
<%
|
||||
};
|
||||
walk(catTree, 'categories/', 0);
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
<% } else {
|
||||
idx.current -= 1
|
||||
} %>
|
||||
@ -0,0 +1,23 @@
|
||||
<% if (site.posts.length){ %>
|
||||
<%
|
||||
var extraClass = '';
|
||||
if (idx.current % 3 === 0) {
|
||||
extraClass += ' first';
|
||||
if (idx.current >= 3) {
|
||||
extraClass += ' newline';
|
||||
}
|
||||
}
|
||||
%>
|
||||
<div class="widget recent-posts<%= extraClass %>">
|
||||
<h3 class="title"><%= __('recent_posts') %></h3>
|
||||
<ul class="entry">
|
||||
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
|
||||
<li>
|
||||
<a href="<%= config.root %><%= post.path %>"><%= post.title %></a>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } else {
|
||||
idx.current -= 1
|
||||
} %>
|
||||
21
themes/hexo-theme-raytaylorism/layout/_widget/tag.ejs
Normal file
21
themes/hexo-theme-raytaylorism/layout/_widget/tag.ejs
Normal file
@ -0,0 +1,21 @@
|
||||
<% if (site.tags.length){ %>
|
||||
<%
|
||||
var extraClass = '';
|
||||
if (idx.current % 3 === 0) {
|
||||
extraClass += ' first';
|
||||
if (idx.current >= 3) {
|
||||
extraClass += ' newline';
|
||||
}
|
||||
}
|
||||
%>
|
||||
<div class="widget tag<%= extraClass %>">
|
||||
<h3 class="title"><%= __('tags') %></h3>
|
||||
<ul class="entry">
|
||||
<% site.tags.sort('name').each(function(item){ %>
|
||||
<li><a href="<%- url_for(item.path) %>"><%= item.name %></a><small><%= item.posts.length %></small></li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } else {
|
||||
idx.current -= 1
|
||||
} %>
|
||||
19
themes/hexo-theme-raytaylorism/layout/_widget/tagcloud.ejs
Normal file
19
themes/hexo-theme-raytaylorism/layout/_widget/tagcloud.ejs
Normal file
@ -0,0 +1,19 @@
|
||||
<% if (site.tags.length){ %>
|
||||
<%
|
||||
var extraClass = '';
|
||||
if (idx.current % 3 === 0) {
|
||||
extraClass += ' first';
|
||||
if (idx.current >= 3) {
|
||||
extraClass += ' newline';
|
||||
}
|
||||
}
|
||||
%>
|
||||
<div class="widget tagcloud<%= extraClass %>">
|
||||
<h3 class="title"><%= __('tagcloud') %></h3>
|
||||
<div class="entry">
|
||||
<%- tagcloud(site.tags, {}) %>
|
||||
</div>
|
||||
</div>
|
||||
<% } else {
|
||||
idx.current -= 1
|
||||
} %>
|
||||
95
themes/hexo-theme-raytaylorism/layout/about.ejs
Normal file
95
themes/hexo-theme-raytaylorism/layout/about.ejs
Normal file
@ -0,0 +1,95 @@
|
||||
<% var item = page; %>
|
||||
<% var aboutData = site.data.about; %>
|
||||
<div class="container main-container">
|
||||
<div class="card about-page row">
|
||||
<div class="header <%= theme.color.about_header %>">
|
||||
<div class="avatar-wrapper center-align">
|
||||
<img class="avatar-image circle responsive-img" src="<%= aboutData.avatar %>" alt="User Avatar">
|
||||
</div>
|
||||
<div class="info center-align">
|
||||
<p class="name"><%= aboutData.name %></p>
|
||||
<p class="desc"><%= aboutData.desc %></p>
|
||||
</div>
|
||||
<% if (site.data.link && site.data.link.social) { %>
|
||||
<div class="social-group center-align">
|
||||
<% for (var type in site.data.link.social) { %>
|
||||
<a class="social-link" href="<%= site.data.link.social[type] %>" target="_blank">
|
||||
<i class="fa fa-2x fa-<%= type %>"></i>
|
||||
</a>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<div class="card-content">
|
||||
<section class="about-me">
|
||||
<h1 class="<%= theme.color.about_title %>-text">
|
||||
<i class="fa fa-street-view"></i><%= __('about.about') %></h1>
|
||||
<div class="entry <%= theme.color.link %>-link-context">
|
||||
<%- item.content %>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<% if (aboutData.skills) { %>
|
||||
<section class="skills">
|
||||
<h1 class="<%= theme.color.about_title %>-text">
|
||||
<i class="fa fa-tasks"></i> <%= __('about.skills') %></h1>
|
||||
<ul class="skill-list">
|
||||
<% for (var skill in aboutData.skills) { %>
|
||||
<% if (aboutData.skills[skill] > 0) { %>
|
||||
<li class="row">
|
||||
<div class="col s4 m3 l2"><%= skill %></div>
|
||||
<div class="col s8 m9 l10">
|
||||
<% for (var i = 1; i <= aboutData.skills[skill]; i++) { %>
|
||||
<i class="fa fa-star"></i>
|
||||
<% } %>
|
||||
<% for (; i <= 10; i++) { %>
|
||||
<i class="fa fa-star-o"></i>
|
||||
<% } %>
|
||||
</div>
|
||||
</li>
|
||||
<% } else { %>
|
||||
<li> </li>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</ul>
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (aboutData.projects && aboutData.projects.length > 0) { %>
|
||||
<section class="projects">
|
||||
<h1 class="<%= theme.color.about_title %>-text">
|
||||
<i class="fa fa-cubes"></i><%= __('about.works') %></h1>
|
||||
<div class="row">
|
||||
<% for (var i in aboutData.projects) { %>
|
||||
<div class="project-item col m6">
|
||||
<div class="">
|
||||
<div class="card medium <%= theme.color.link %>-link-context">
|
||||
<div class="card-image">
|
||||
<img class="card-cover-image" src="<%= aboutData.projects[i].image %>">
|
||||
<span class="card-title"><%= aboutData.projects[i].name %></span>
|
||||
<div class="card-tag">
|
||||
<% for (var j in aboutData.projects[i].tags) { %>
|
||||
<span class="chip white-text <%= theme.color.tag %>"><%= aboutData.projects[i].tags[j] %></span>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<%= aboutData.projects[i].description %>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a class="<%= theme.color.readmore %>-text" href="<%= aboutData.projects[i].link %>" target="_blank"><%= aboutData.projects[i].link_text %></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</section>
|
||||
<% } %>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<%- partial('_partial/plugin/comment', {page_id: 'about'}) %>
|
||||
</div>
|
||||
3
themes/hexo-theme-raytaylorism/layout/archive.ejs
Normal file
3
themes/hexo-theme-raytaylorism/layout/archive.ejs
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="container main-container">
|
||||
<%- partial('_partial/archive', {pagination: config.archive}) %>
|
||||
</div>
|
||||
6
themes/hexo-theme-raytaylorism/layout/index.ejs
Normal file
6
themes/hexo-theme-raytaylorism/layout/index.ejs
Normal file
@ -0,0 +1,6 @@
|
||||
<div id="article-list" class="container main-container">
|
||||
<% page.posts.each(function(item){ %>
|
||||
<%- partial('_partial/simple_article', {item: item, index: true, showEntry: true}) %>
|
||||
<% }); %>
|
||||
<%- partial('_partial/pagination') %>
|
||||
</div>
|
||||
11
themes/hexo-theme-raytaylorism/layout/layout.ejs
Normal file
11
themes/hexo-theme-raytaylorism/layout/layout.ejs
Normal file
@ -0,0 +1,11 @@
|
||||
<%- partial('_partial/head') %>
|
||||
<body>
|
||||
<%- partial('_partial/header') %>
|
||||
<main>
|
||||
<%- body %>
|
||||
<%- partial('_partial/float') %>
|
||||
</main>
|
||||
<%- partial('_partial/footer') %>
|
||||
<%- partial('_partial/after_footer') %>
|
||||
</body>
|
||||
</html>
|
||||
3
themes/hexo-theme-raytaylorism/layout/page.ejs
Normal file
3
themes/hexo-theme-raytaylorism/layout/page.ejs
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="container main-container">
|
||||
<%- partial('_partial/article', {item: page, index: false, extra: false}) %>
|
||||
</div>
|
||||
3
themes/hexo-theme-raytaylorism/layout/post.ejs
Normal file
3
themes/hexo-theme-raytaylorism/layout/post.ejs
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="container main-container">
|
||||
<%- partial('_partial/article', {item: page, index: false}) %>
|
||||
</div>
|
||||
3
themes/hexo-theme-raytaylorism/layout/tag.ejs
Normal file
3
themes/hexo-theme-raytaylorism/layout/tag.ejs
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="container main-container">
|
||||
<%- partial('_partial/archive', {pagination: config.tag}) %>
|
||||
</div>
|
||||
38
themes/hexo-theme-raytaylorism/source/css/_base/icons.css
Normal file
38
themes/hexo-theme-raytaylorism/source/css/_base/icons.css
Normal file
@ -0,0 +1,38 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(/css/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url(/css/fonts/MaterialIcons-Regular.woff2) format('woff2'),
|
||||
url(/css/fonts/MaterialIcons-Regular.woff) format('woff'),
|
||||
url(/css/fonts/MaterialIcons-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
11
themes/hexo-theme-raytaylorism/source/css/_base/layout.styl
Normal file
11
themes/hexo-theme-raytaylorism/source/css/_base/layout.styl
Normal file
@ -0,0 +1,11 @@
|
||||
html, body
|
||||
font-family "Roboto", "sans-serif", "微软雅黑", "Helvetica Neue"
|
||||
|
||||
body
|
||||
background-color #f5f5f5
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
flex-direction: column;
|
||||
|
||||
main
|
||||
flex: 1 0 auto;
|
||||
@ -0,0 +1,130 @@
|
||||
html
|
||||
color rgba(0, 0, 0, 0.8)
|
||||
|
||||
.container
|
||||
width 700px
|
||||
@media (max-width: 767px)
|
||||
width 90%
|
||||
.row
|
||||
margin-left auto
|
||||
margin-right auto
|
||||
.container.main-container
|
||||
@media (max-width: 767px)
|
||||
width 100%
|
||||
|
||||
// HTML标签样式
|
||||
// 重置materialize中的各种列表样式
|
||||
ul, ol
|
||||
padding-left 20px
|
||||
&.tabs
|
||||
padding-left 0
|
||||
|
||||
ul, ul li
|
||||
list-style-type disc
|
||||
word-break break-word
|
||||
|
||||
nav, .fixed-action-btn
|
||||
ul
|
||||
padding-left 0
|
||||
li
|
||||
list-style-type none
|
||||
|
||||
ul.pagination, ul.collapsible, ul.indicators
|
||||
padding-left 0
|
||||
li
|
||||
list-style-type none
|
||||
|
||||
img
|
||||
max-width 100%
|
||||
padding 4px
|
||||
background-color #F5F5F5
|
||||
border 1px solid #ddd
|
||||
border-radius 4px
|
||||
|
||||
strong
|
||||
font-weight bold
|
||||
|
||||
blockquote
|
||||
background-color rgba(0, 0, 0, 0.03)
|
||||
padding 0.6rem 0.6rem 0.6rem 1.2rem
|
||||
|
||||
// p
|
||||
// margin 0 !important
|
||||
|
||||
table
|
||||
margin-bottom 1.5em
|
||||
|
||||
nav ul
|
||||
a:hover
|
||||
background-color rgba(0, 0, 0, 0)
|
||||
|
||||
nav .brand-logo
|
||||
font-size 1.6rem
|
||||
|
||||
// 侧滑栏样式
|
||||
.side-nav
|
||||
li, a
|
||||
padding 0 15px
|
||||
|
||||
.card
|
||||
margin-top 0
|
||||
|
||||
&.medium
|
||||
height 440px
|
||||
|
||||
.card-content
|
||||
padding 25px 25px 30px
|
||||
|
||||
@media (max-width: 767px)
|
||||
padding-left 15px
|
||||
padding-right 15px
|
||||
|
||||
.card-action
|
||||
padding-left 25px
|
||||
padding-right 25px
|
||||
|
||||
// .card-content p
|
||||
// margin 0.5em 0
|
||||
|
||||
.chip
|
||||
height initial
|
||||
line-height 18px
|
||||
padding 4px 14px
|
||||
color white
|
||||
|
||||
.breadcrumb
|
||||
font-size 1em
|
||||
|
||||
// 图片lightbox点击缩放效果
|
||||
.materialboxed
|
||||
display initial
|
||||
margin-top 10px
|
||||
max-width 100%
|
||||
&.active
|
||||
max-width initial
|
||||
|
||||
.main-container
|
||||
margin-top 30px
|
||||
|
||||
.mt-0
|
||||
margin-top 0
|
||||
|
||||
.collection a.collection-item:not(.active):hover
|
||||
background-color #f5f5f5
|
||||
|
||||
// 撤销card-action中链接会强制变大写的效果
|
||||
.card .card-action a:not(.btn):not(.btn-large):not(.btn-floating)
|
||||
text-transform initial
|
||||
|
||||
// 将默认的图标字体换为FontAwesome
|
||||
.breadcrumb:before
|
||||
content "\f105"
|
||||
font-family: FontAwesome
|
||||
|
||||
// FontAwesome
|
||||
.fa
|
||||
margin-right 5px
|
||||
|
||||
// Footer
|
||||
footer.page-footer
|
||||
padding-top inherit
|
||||
@ -0,0 +1,55 @@
|
||||
/* 字体大小 */
|
||||
normal-font-size = 1em
|
||||
simple-title-font-size = 1.4em
|
||||
page-sub-title-font-size = 1.6em
|
||||
|
||||
/* 颜色 */
|
||||
|
||||
//头部背景颜色
|
||||
color-header-background = #00529c
|
||||
//头部按钮hover背景
|
||||
color-header-button-hover = #3498db
|
||||
//尾部背景颜色
|
||||
color-footer-background = #2c3e50
|
||||
|
||||
//背景
|
||||
color-body = #ecf8ff
|
||||
//正文字体
|
||||
color-font = #333333
|
||||
//文章标题颜色
|
||||
color-title = #1976d2
|
||||
color-title-hover = #42a5f5
|
||||
//文章子标题颜色(h3)
|
||||
color-entry-subtitle = #333
|
||||
//标签背景颜色
|
||||
color-tag = #16a085
|
||||
|
||||
//链接颜色
|
||||
color-a = #1976d2
|
||||
color-a-hover = #42a5f5
|
||||
|
||||
//页面的子标题(如留言,当前所在位置等等)
|
||||
color-page-sub-title = #9b59b6
|
||||
|
||||
//尾部文字颜色
|
||||
color-footer-text = #fff
|
||||
color-footer-a = #9fc9e9
|
||||
color-footer-a-hover = #16a085
|
||||
|
||||
color-link = #069
|
||||
color-strong = #333
|
||||
|
||||
// Font
|
||||
font-default = "Helvetica Neue", "Helvetica", Arial, sans-serif
|
||||
font-serif = "Georgia", serif
|
||||
font-mono = Consolas, "微软雅黑", Monaco, Menlo, Courier New, monospace
|
||||
font-title = "微软雅黑", "Droid Serif", Helvetica Neue, Helvetica, Arial, sans-serif
|
||||
|
||||
// 全局边距
|
||||
header-footer-height-padding = 10px
|
||||
page-padding = 200px
|
||||
body-padding-top = 50px
|
||||
|
||||
// 读书
|
||||
book-width = 150px
|
||||
book-height = 200px
|
||||
@ -0,0 +1,81 @@
|
||||
.about-page
|
||||
.header
|
||||
padding 40px 15px 30px
|
||||
|
||||
.avatar-wrapper
|
||||
.avatar-image
|
||||
width 160px
|
||||
|
||||
.info
|
||||
padding 0 20px
|
||||
p
|
||||
line-height 24px
|
||||
margin-top 25px
|
||||
margin-bottom 0
|
||||
color white
|
||||
text-shadow 1px 1px 1px #444
|
||||
.name
|
||||
font-size 1.8em
|
||||
.desc
|
||||
margin-top 15px
|
||||
font-size 1em
|
||||
|
||||
.social-group
|
||||
margin-top 15px
|
||||
|
||||
section
|
||||
margin-bottom 20px
|
||||
|
||||
h1
|
||||
font-size 1.6rem
|
||||
margin-top 10px
|
||||
margin-bottom 15px
|
||||
|
||||
// 技能
|
||||
ul.skill-list, ul.skill-list li
|
||||
list-style-type none
|
||||
|
||||
ul.skill-list
|
||||
padding-left 0
|
||||
|
||||
.skill-list li
|
||||
margin-bottom 0
|
||||
|
||||
.split
|
||||
margin-top 5px
|
||||
|
||||
.skills .fa
|
||||
margin-right 0
|
||||
|
||||
// 项目
|
||||
.project-item
|
||||
display inline-block
|
||||
// margin-right 20px
|
||||
width 100%
|
||||
|
||||
img
|
||||
padding 0
|
||||
|
||||
.card-title
|
||||
font-weight 400
|
||||
font-size 20px
|
||||
text-shadow 1px 1px 1px black
|
||||
line-height 30px
|
||||
|
||||
.card-tag
|
||||
position absolute
|
||||
top 15px
|
||||
right 10px
|
||||
|
||||
// 重置
|
||||
.about-page.row
|
||||
margin-left 0
|
||||
margin-right 0
|
||||
|
||||
.row
|
||||
margin-left 0
|
||||
margin-right 0
|
||||
|
||||
// .col
|
||||
// padding-left 0
|
||||
// padding-right 0
|
||||
@ -0,0 +1,38 @@
|
||||
.archive-title
|
||||
font-weight normal
|
||||
font-size 20px
|
||||
margin-bottom 10px
|
||||
text-shadow 0 0 1px #fff
|
||||
&:before
|
||||
font-family font-icon
|
||||
content '\f073'
|
||||
padding-right 15px
|
||||
|
||||
&.tag
|
||||
&:before
|
||||
content '\f02b'
|
||||
|
||||
&.category
|
||||
&:before
|
||||
content '\f07b'
|
||||
|
||||
.archive-year
|
||||
font-size 2.4em
|
||||
font-family Candara,arial
|
||||
font-style italic
|
||||
color #069
|
||||
text-shadow rgba(255,255,255,0.9) 0 1px 0
|
||||
padding 0 30px
|
||||
margin 0 0 10px 0
|
||||
@media screen and (max-width:580px)
|
||||
padding 0 20px
|
||||
|
||||
a:after
|
||||
content '\f08e'
|
||||
font 12px FontAwesome
|
||||
padding-left 10px
|
||||
vertical-align super
|
||||
|
||||
.sep
|
||||
border-bottom 1px solid #aaa
|
||||
box-shadow rgba(255,255,255,0.3) 0 1px 0
|
||||
151
themes/hexo-theme-raytaylorism/source/css/_partial/article.styl
Normal file
151
themes/hexo-theme-raytaylorism/source/css/_partial/article.styl
Normal file
@ -0,0 +1,151 @@
|
||||
.simple-article
|
||||
margin-bottom 30px
|
||||
|
||||
article
|
||||
.entry
|
||||
margin-top 20px
|
||||
|
||||
.article-title h1
|
||||
font-family "微软雅黑", "sans-serif", "Helvetica Neue"
|
||||
font-size 2em
|
||||
font-weight bold
|
||||
line-height 1.4
|
||||
margin-top 0
|
||||
margin-bottom 10px
|
||||
color color-entry-subtitle
|
||||
|
||||
a:not(.chip)
|
||||
color color-a
|
||||
&:hover
|
||||
color color-a-hover
|
||||
|
||||
.simple-article-title h1
|
||||
font-size simple-title-font-size
|
||||
padding 5px 0
|
||||
|
||||
.tags-row
|
||||
margin-top 10px
|
||||
|
||||
.article-tag
|
||||
display inline-block
|
||||
height 32px
|
||||
line-height 32px
|
||||
padding 0 12px
|
||||
border-radius 16px
|
||||
color white
|
||||
|
||||
header
|
||||
border-radius 0
|
||||
background none
|
||||
position relative
|
||||
padding 0
|
||||
border-bottom 0
|
||||
margin-bottom 10px
|
||||
|
||||
time
|
||||
font 0.9em font-title
|
||||
margin-bottom 5px
|
||||
display block
|
||||
line-height 1
|
||||
|
||||
&:hover
|
||||
color color-link
|
||||
|
||||
.card-content .entry
|
||||
font-size 16px
|
||||
line-height 1.7
|
||||
@media (max-width: 480px)
|
||||
line-height 1.5em
|
||||
|
||||
p
|
||||
margin-top 0
|
||||
margin-bottom 1em
|
||||
text-align justify
|
||||
text-justify inter-ideograph
|
||||
word-break initial
|
||||
word-break break-word
|
||||
|
||||
&:last-child
|
||||
margin-bottom 0
|
||||
|
||||
ul, ol
|
||||
margin-bottom 1em
|
||||
ul, ol
|
||||
margin-bottom 0
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
margin-top 0
|
||||
margin-bottom 0.5em
|
||||
|
||||
h1
|
||||
font-size 1.6em
|
||||
color color-entry-subtitle
|
||||
|
||||
h2
|
||||
font-size 1.4em
|
||||
color color-entry-subtitle
|
||||
|
||||
h3, h4, h5, h6
|
||||
font-size 1.2em
|
||||
color color-entry-subtitle
|
||||
|
||||
&.nstyle
|
||||
border-radius 0
|
||||
padding 0
|
||||
background none
|
||||
box-shadow none
|
||||
|
||||
iframe
|
||||
max-width 98%
|
||||
|
||||
.caption
|
||||
display block
|
||||
margin-top 5px
|
||||
color #aaa
|
||||
position relative
|
||||
font-size 0.9em
|
||||
padding-left 25px
|
||||
&:before
|
||||
content '\f040'
|
||||
position absolute
|
||||
font 1.3em font-icon
|
||||
position absolute
|
||||
left 0
|
||||
top 3px
|
||||
|
||||
.toc-wrap
|
||||
float right
|
||||
-webkit-border-radius 4px
|
||||
border-radius 4px
|
||||
background #eee
|
||||
border 1px solid #ddd
|
||||
margin-left 1.5em
|
||||
margin-bottom 2em
|
||||
padding 15px 20px
|
||||
line-height 1.6em
|
||||
|
||||
>ol
|
||||
margin-left 0
|
||||
|
||||
ol, ul
|
||||
list-style none
|
||||
|
||||
.toc-title
|
||||
font-weight bold
|
||||
font-size 1.2em
|
||||
margin-bottom 0.6em
|
||||
color #2c3e50
|
||||
|
||||
.toc-number
|
||||
display none
|
||||
|
||||
.toc-link
|
||||
color #0e83cd
|
||||
text-decoration none
|
||||
font-size 0.9em
|
||||
|
||||
.toc-link:hover
|
||||
text-decoration underline
|
||||
|
||||
.toc-child
|
||||
margin-left 1em
|
||||
@ -0,0 +1,6 @@
|
||||
#comment
|
||||
margin-top 40px
|
||||
.title
|
||||
font-size 40px
|
||||
font-weight bold
|
||||
color color-section-title
|
||||
@ -0,0 +1,10 @@
|
||||
a.social-link
|
||||
display inline-block
|
||||
color #f5f5f5
|
||||
margin-right 10px
|
||||
|
||||
&:hover
|
||||
color #e0e0e0
|
||||
|
||||
.footer-container
|
||||
padding-top 20px
|
||||
@ -0,0 +1,5 @@
|
||||
.nav-wrapper
|
||||
padding 0 25px
|
||||
|
||||
@media (max-width: 767px)
|
||||
padding 0 10px
|
||||
@ -0,0 +1,41 @@
|
||||
.jPanelMenu-panel
|
||||
overflow-y hidden
|
||||
|
||||
.btn-loadmore
|
||||
margin-top 20px
|
||||
opacity 0.9
|
||||
|
||||
.feature-guide-container
|
||||
display none
|
||||
position absolute
|
||||
left 0
|
||||
top 0
|
||||
z-index 100
|
||||
|
||||
.shadow
|
||||
overflow-y hidden
|
||||
position absolute
|
||||
background-color rgba(0, 0, 0, 0.6)
|
||||
|
||||
.shadow-light
|
||||
position absolute
|
||||
background-color rgba(0, 0, 0, 0)
|
||||
|
||||
.feature-box
|
||||
position relative
|
||||
max-width 300px
|
||||
background-color #ffebb5
|
||||
padding 16px
|
||||
color #ae2341
|
||||
|
||||
.btn-i-know
|
||||
background-color #f4867b
|
||||
transition background-color .5s
|
||||
margin-bottom 0
|
||||
|
||||
.btn-i-know:hover
|
||||
background-color #f5a69e
|
||||
transition background-color .5s
|
||||
|
||||
.feature-description
|
||||
font-size 1em
|
||||
@ -0,0 +1,94 @@
|
||||
.red-link-context a
|
||||
color #f44336 !important
|
||||
&:hover
|
||||
color #e57373 !important
|
||||
|
||||
.pink-link-context a
|
||||
color #E91E63 !important
|
||||
&:hover
|
||||
color #F06292 !important
|
||||
|
||||
.purple-link-context a
|
||||
color #9C27B0 !important
|
||||
&:hover
|
||||
color #BA68C8 !important
|
||||
|
||||
.deep-purple-link-context a
|
||||
color #673AB7 !important
|
||||
&:hover
|
||||
color #9575CD !important
|
||||
|
||||
.indigo-link-context a
|
||||
color #3F51B5 !important
|
||||
&:hover
|
||||
color #7986CB !important
|
||||
|
||||
.blue-link-context a
|
||||
color #2196F3 !important
|
||||
&:hover
|
||||
color #64B5F6 !important
|
||||
|
||||
.light-blue-link-context a
|
||||
color #03A9F4 !important
|
||||
&:hover
|
||||
color #4FC3F7 !important
|
||||
|
||||
.cyan-link-context a
|
||||
color #00BCD4 !important
|
||||
&:hover
|
||||
color #4DD0E1 !important
|
||||
|
||||
.teal-link-context a
|
||||
color #009688 !important
|
||||
&:hover
|
||||
color #4DB6AC !important
|
||||
|
||||
.green-link-context a
|
||||
color #4CAF50 !important
|
||||
&:hover
|
||||
color #81C784 !important
|
||||
|
||||
.light-green-link-context a
|
||||
color #8BC34A !important
|
||||
&:hover
|
||||
color #AED581 !important
|
||||
|
||||
.lime-link-context a
|
||||
color #CDDC39 !important
|
||||
&:hover
|
||||
color #DCE775 !important
|
||||
|
||||
.yellow-link-context a
|
||||
color #FFEB3B !important
|
||||
&:hover
|
||||
color #FFF176 !important
|
||||
|
||||
.amber-link-context a
|
||||
color #FFC107 !important
|
||||
&:hover
|
||||
color #FFD54F !important
|
||||
|
||||
.orange-link-context a
|
||||
color #FF9800 !important
|
||||
&:hover
|
||||
color #FFB74D !important
|
||||
|
||||
.deep-orange-link-context a
|
||||
color #FF5722 !important
|
||||
&:hover
|
||||
color #FF8A65 !important
|
||||
|
||||
.brown-link-context a
|
||||
color #795548 !important
|
||||
&:hover
|
||||
color #A1887F !important
|
||||
|
||||
.grey-link-context a
|
||||
color #9E9E9E !important
|
||||
&:hover
|
||||
color #E0E0E0 !important
|
||||
|
||||
.blue-grey-link-context a
|
||||
color #607D8B !important
|
||||
&:hover
|
||||
color #90A4AE !important
|
||||
108
themes/hexo-theme-raytaylorism/source/css/_partial/other.styl
Normal file
108
themes/hexo-theme-raytaylorism/source/css/_partial/other.styl
Normal file
@ -0,0 +1,108 @@
|
||||
.page-nav
|
||||
height 50px
|
||||
line-height 50px
|
||||
|
||||
.float-sitemap
|
||||
position fixed
|
||||
right 45px
|
||||
bottom 50px
|
||||
|
||||
@media only screen and (max-width: 600px)
|
||||
right 10px
|
||||
bottom 15px
|
||||
|
||||
.construction-container
|
||||
display inline-block
|
||||
margin-top 40px
|
||||
|
||||
.btn
|
||||
margin-top 20px
|
||||
|
||||
// 重置多说评论框中的checkbox被materialize库修改的样式
|
||||
.ds-sync input[type="checkbox"]
|
||||
position initial
|
||||
visibility initial
|
||||
+label:before
|
||||
display none
|
||||
|
||||
// gallery
|
||||
article .gallery .control {
|
||||
opacity: 0;
|
||||
transition: 0.3s;
|
||||
}
|
||||
article .gallery:hover .control {
|
||||
opacity: 1;
|
||||
-ms-filter: none;
|
||||
filter: none;
|
||||
}
|
||||
article .gallery .prev,
|
||||
article .gallery .next {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
article .gallery .prev:before,
|
||||
article .gallery .next:before {
|
||||
position: absolute;
|
||||
font: 24px/1 FontAwesome;
|
||||
text-align: center;
|
||||
width: 24px;
|
||||
text-shadow: 0 0 15px rgba(0,0,0,0.5);
|
||||
color: #fff;
|
||||
margin-top: -12px;
|
||||
top: 50%;
|
||||
}
|
||||
article .gallery .prev {
|
||||
left: 0;
|
||||
}
|
||||
article .gallery .prev:before {
|
||||
content: '\f053';
|
||||
left: 10px;
|
||||
}
|
||||
article .gallery .next {
|
||||
right: 0;
|
||||
}
|
||||
article .gallery .next:before {
|
||||
content: '\f054';
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
// 无JS(一般是微信页)的样式
|
||||
.noscript
|
||||
background rgba(0, 0, 0, 0.5)
|
||||
position fixed
|
||||
left 0
|
||||
top 0
|
||||
width 100%
|
||||
z-index 9999
|
||||
|
||||
animation-duration: 6s;
|
||||
animation-name: noscript-slide;
|
||||
|
||||
p
|
||||
margin 0
|
||||
padding 0 30px
|
||||
color white
|
||||
|
||||
@keyframes noscript-slide {
|
||||
0% {
|
||||
top: -100px;
|
||||
}
|
||||
50% {
|
||||
top: -100px;
|
||||
}
|
||||
100% {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 阅读计数与站点访客
|
||||
.read-times-container
|
||||
margin-left 15px
|
||||
.fa
|
||||
margin-right 0
|
||||
|
||||
.site-visitors-container
|
||||
margin-top 10px
|
||||
@ -0,0 +1,14 @@
|
||||
.search-modal
|
||||
padding 30px 20px
|
||||
max-height 80%
|
||||
|
||||
input[type=text]
|
||||
&:focus
|
||||
border-bottom-color #757575
|
||||
box-shadow 0 1px 0 0 #757575
|
||||
&+label
|
||||
color #212121
|
||||
|
||||
.search-result
|
||||
margin-top 5px
|
||||
margin-bottom 15px
|
||||
@ -0,0 +1,74 @@
|
||||
user-height = 100px
|
||||
item-height = 48px
|
||||
|
||||
.side-nav
|
||||
.row
|
||||
margin-bottom 0
|
||||
.col
|
||||
line-height user-height
|
||||
|
||||
a
|
||||
height item-height
|
||||
line-height item-height
|
||||
color white
|
||||
i
|
||||
height item-height
|
||||
line-height item-height
|
||||
width 1.5rem
|
||||
li
|
||||
line-height item-height
|
||||
|
||||
&.item:hover, &.item:active
|
||||
background-color rgba(0, 0, 0, 0.2)
|
||||
&.side-user
|
||||
background-color transparent
|
||||
|
||||
.avatar-image
|
||||
width 50px
|
||||
padding 0
|
||||
vertical-align middle
|
||||
|
||||
.info
|
||||
height user-height
|
||||
|
||||
p
|
||||
line-height 24px
|
||||
margin-top 5px
|
||||
margin-bottom 0
|
||||
text-shadow: 1px 1px 1px #444;
|
||||
|
||||
.name
|
||||
font-size 1.2em
|
||||
.desc
|
||||
font-size 0.9em
|
||||
|
||||
li.side-user
|
||||
height user-height
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
|
||||
// 分类目录
|
||||
collapse-base-padding = 15px
|
||||
collapse-step-padding = 15px
|
||||
.collapse-level-0
|
||||
padding-left collapse-base-padding
|
||||
.collapse-level-1
|
||||
padding-left collapse-base-padding + collapse-step-padding * 1
|
||||
.collapse-level-2
|
||||
padding-left collapse-base-padding + collapse-step-padding * 2
|
||||
|
||||
.collapse-space
|
||||
margin-bottom 10px
|
||||
|
||||
#category-menu.side-nav
|
||||
a
|
||||
height item-height * 0.75
|
||||
line-height item-height * 0.75
|
||||
i
|
||||
height item-height * 0.75
|
||||
line-height item-height * 0.75
|
||||
li
|
||||
line-height item-height * 0.75
|
||||
padding-right 15px
|
||||
123
themes/hexo-theme-raytaylorism/source/css/_partial/syntax.styl
Normal file
123
themes/hexo-theme-raytaylorism/source/css/_partial/syntax.styl
Normal file
@ -0,0 +1,123 @@
|
||||
color-code-background = #042029
|
||||
color-simple-code-background = #93AAAC
|
||||
|
||||
article
|
||||
pre
|
||||
padding 10px 16px
|
||||
|
||||
.line:after
|
||||
content: ''
|
||||
display: inline-block;
|
||||
|
||||
code, pre
|
||||
font-family font-mono
|
||||
color #333
|
||||
font-size 1em
|
||||
// white-space pre-wrap
|
||||
// word-wrap break-word
|
||||
|
||||
p code, li code
|
||||
margin 0 3px
|
||||
padding: 0 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #e0e0e0
|
||||
color: #212121;
|
||||
background-color #eeeeee
|
||||
|
||||
pre .keyword
|
||||
color #859900
|
||||
|
||||
pre .tag
|
||||
color #f8f8f2
|
||||
|
||||
pre
|
||||
// Theme: Monokai plus Solarized(Dark) from Sublime Text theme
|
||||
.comment
|
||||
.template_comment
|
||||
.diff .header
|
||||
.doctype
|
||||
.pi
|
||||
.lisp .string
|
||||
.javadoc
|
||||
color #75715c
|
||||
font-style italic
|
||||
|
||||
.doctype
|
||||
color #268bd2
|
||||
|
||||
.keyword
|
||||
.winutils
|
||||
.method
|
||||
.addition
|
||||
.css .tag
|
||||
.request
|
||||
.status
|
||||
.nginx .title
|
||||
color #66d9ef
|
||||
|
||||
.number
|
||||
.command
|
||||
.phpdoc
|
||||
.tex .formula
|
||||
.regexp
|
||||
.hexcolor
|
||||
color #ae81fc
|
||||
|
||||
.string
|
||||
.tag .value
|
||||
color #e6db6e
|
||||
|
||||
.title
|
||||
.localvars
|
||||
.chunk
|
||||
.decorator
|
||||
.built_in
|
||||
.identifier
|
||||
.vhdl
|
||||
.literal
|
||||
.id
|
||||
color #f22672
|
||||
|
||||
.attribute
|
||||
.variable
|
||||
.lisp .body
|
||||
.smalltalk .number
|
||||
.constant
|
||||
.class .title
|
||||
.parent
|
||||
.haskell .type
|
||||
color #a6e22e
|
||||
|
||||
.preprocessor
|
||||
.preprocessor .keyword
|
||||
.shebang
|
||||
.symbol
|
||||
.symbol .string
|
||||
.diff .change
|
||||
.special
|
||||
.attr_selector
|
||||
.important
|
||||
.subst
|
||||
.cdata
|
||||
.clojure .title
|
||||
color #cb4b16
|
||||
|
||||
.deletion
|
||||
color #dc322f
|
||||
|
||||
// 调整hexo默认的代码段(table)样式
|
||||
figure.highlight
|
||||
margin-left 0
|
||||
margin-right 0
|
||||
overflow auto
|
||||
|
||||
td
|
||||
padding 0
|
||||
pre
|
||||
margin 0
|
||||
overflow auto
|
||||
figcaption a
|
||||
position absolute
|
||||
right 25px
|
||||
.gutter
|
||||
width 5%
|
||||
@ -0,0 +1,21 @@
|
||||
.toc
|
||||
position fixed
|
||||
top 0px
|
||||
margin-top 15%
|
||||
left calc(50% + 350px)
|
||||
|
||||
ol
|
||||
list-style-type none
|
||||
padding-left 1em
|
||||
|
||||
.section
|
||||
margin 2px 0
|
||||
padding-top 0
|
||||
padding-bottom 0
|
||||
|
||||
.table-of-contents
|
||||
a.active
|
||||
border-left-color #2196f3
|
||||
font-weight bold
|
||||
a:hover
|
||||
border-left-color #2196f3
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4
themes/hexo-theme-raytaylorism/source/css/lib/font-awesome.min.css
vendored
Normal file
4
themes/hexo-theme-raytaylorism/source/css/lib/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
16
themes/hexo-theme-raytaylorism/source/css/lib/materialize.min.css
vendored
Normal file
16
themes/hexo-theme-raytaylorism/source/css/lib/materialize.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,141 @@
|
||||
/* Tomorrow Night Eighties Theme */
|
||||
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
||||
.prettyprint {
|
||||
background: #1D1F21;
|
||||
font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.pln {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
.str {
|
||||
color: #99cc99;
|
||||
}
|
||||
|
||||
.kwd {
|
||||
color: #cc99cc;
|
||||
}
|
||||
|
||||
.com {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.typ {
|
||||
color: #6699cc;
|
||||
}
|
||||
|
||||
.lit {
|
||||
color: #f99157;
|
||||
}
|
||||
|
||||
.pun {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.opn {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.clo {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.tag {
|
||||
color: #f2777a;
|
||||
}
|
||||
|
||||
.atn {
|
||||
color: #f99157;
|
||||
}
|
||||
|
||||
.atv {
|
||||
color: #66cccc;
|
||||
}
|
||||
|
||||
.dec {
|
||||
color: #f99157;
|
||||
}
|
||||
|
||||
.var {
|
||||
color: #f2777a;
|
||||
}
|
||||
|
||||
.fun {
|
||||
color: #6699cc;
|
||||
}
|
||||
}
|
||||
@media print, projection {
|
||||
.str {
|
||||
color: #006600;
|
||||
}
|
||||
|
||||
.kwd {
|
||||
color: #006;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.com {
|
||||
color: #600;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.typ {
|
||||
color: #404;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.lit {
|
||||
color: #004444;
|
||||
}
|
||||
|
||||
.pun, .opn, .clo {
|
||||
color: #444400;
|
||||
}
|
||||
|
||||
.tag {
|
||||
color: #006;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.atn {
|
||||
color: #440044;
|
||||
}
|
||||
|
||||
.atv {
|
||||
color: #006600;
|
||||
}
|
||||
}
|
||||
/* Specify class=linenums on a pre to get line numbering */
|
||||
ol.linenums {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* IE indents via margin-left */
|
||||
li.L0,
|
||||
li.L1,
|
||||
li.L2,
|
||||
li.L3,
|
||||
li.L4,
|
||||
li.L5,
|
||||
li.L6,
|
||||
li.L7,
|
||||
li.L8,
|
||||
li.L9 {
|
||||
/* */
|
||||
}
|
||||
|
||||
/* Alternate shading for lines */
|
||||
li.L1,
|
||||
li.L3,
|
||||
li.L5,
|
||||
li.L7,
|
||||
li.L9 {
|
||||
/* */
|
||||
}
|
||||
26
themes/hexo-theme-raytaylorism/source/css/style.styl
Normal file
26
themes/hexo-theme-raytaylorism/source/css/style.styl
Normal file
@ -0,0 +1,26 @@
|
||||
@import 'nib'
|
||||
|
||||
// 全局变量
|
||||
@import '_base/variable'
|
||||
@import '_base/icons.css'
|
||||
|
||||
// 重置基础库
|
||||
@import '_base/lib_customize'
|
||||
// 基本布局
|
||||
@import '_base/layout'
|
||||
|
||||
// 各组件布局
|
||||
@import '_partial/link_context'
|
||||
@import '_partial/header'
|
||||
@import '_partial/search'
|
||||
@import '_partial/article'
|
||||
@import '_partial/footer'
|
||||
@import '_partial/side_nav'
|
||||
@import '_partial/tablecontents'
|
||||
@import '_partial/other'
|
||||
|
||||
// 语法高亮
|
||||
@import '_partial/syntax'
|
||||
|
||||
// 关于页面
|
||||
@import '_partial/about'
|
||||
4
themes/hexo-theme-raytaylorism/source/js/jquery.min.js
vendored
Normal file
4
themes/hexo-theme-raytaylorism/source/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
174
themes/hexo-theme-raytaylorism/source/js/main.js
Normal file
174
themes/hexo-theme-raytaylorism/source/js/main.js
Normal file
@ -0,0 +1,174 @@
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$("pre").addClass("prettyprint");
|
||||
prettyPrint();
|
||||
// 隐藏禁用javascript(针对微信内置浏览器)的提示
|
||||
$('.noscript').hide();
|
||||
|
||||
// 图片缩放效果
|
||||
var $imgs = $('img').not('.avatar-image,.carousel-image,.card-cover-image,.qrcode');
|
||||
|
||||
// 给图片加上点击放大效果(materialbox插件)
|
||||
$imgs.addClass('materialboxed').each(function(i, el) {
|
||||
$(this).attr('data-caption', $(this).attr('alt') || ' ');
|
||||
}).materialbox();
|
||||
|
||||
// 优化表格的显示
|
||||
$('table').each(function() {
|
||||
var $table = $(this);
|
||||
// 除去多行代码的情况
|
||||
if ($table.find('pre').length == 0) {
|
||||
$table.addClass('responsive-table striped bordered');
|
||||
}
|
||||
});
|
||||
|
||||
$(".button-collapse").sideNav();
|
||||
$(".category-menu").sideNav();
|
||||
$(".tag-menu").sideNav();
|
||||
|
||||
// 针对gallery post
|
||||
$('.carousel').carousel({full_width: true});
|
||||
$('.carousel-control.prev').click(function() {
|
||||
$('.carousel').carousel('prev');
|
||||
});
|
||||
$('.carousel-control.next').click(function() {
|
||||
$('.carousel').carousel('next');
|
||||
});
|
||||
|
||||
// 文章目录
|
||||
$('article').not('.simple-article').find('h1').add('h2').add('h3').add('h4').add('h5').add('h6').scrollSpy();
|
||||
|
||||
// 目录随屏幕滚动(防止目录过长越过footer)
|
||||
var $toc = $('.toc');
|
||||
var scrollTargetTop = 0;
|
||||
$(window).scroll(function() {
|
||||
var $activeLink = $toc.find('a.active.section');
|
||||
if ($(window).scrollTop() < 100) {
|
||||
scrollTargetTop = 0;
|
||||
} else {
|
||||
if ($activeLink[0]) {
|
||||
scrollTargetTop = $activeLink.offset().top - $toc.offset().top;
|
||||
}
|
||||
}
|
||||
$toc.css('top', '-' + scrollTargetTop + 'px');
|
||||
});
|
||||
|
||||
// 修正文章目录的left-border颜色
|
||||
var color = $('.table-of-contents-text').css('color');
|
||||
$('.table-of-contents-link').css('border-left-color', color);
|
||||
|
||||
// 针对移动端做的优化:FAB按钮点击一下收回
|
||||
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
||||
$('.fixed-action-btn').addClass('click-to-toggle');
|
||||
}
|
||||
// 回到顶部
|
||||
$('.btn-return-top').click(function() {
|
||||
$('body, html').animate({
|
||||
scrollTop: 0
|
||||
}, 500);
|
||||
});
|
||||
|
||||
// 搜索功能
|
||||
$('.modal-trigger').leanModal({
|
||||
// 打开搜索框时自动聚焦
|
||||
ready: function() {
|
||||
if ($('#search').is(":visible")) {
|
||||
$('#search-input').focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
initSearch('/search.xml', 'search-input', 'search-result');
|
||||
});
|
||||
|
||||
// 初始化搜索与匹配函数
|
||||
var initSearch = function(path, search_id, content_id) {
|
||||
'use strict';
|
||||
$.ajax({
|
||||
url: path,
|
||||
dataType: "xml",
|
||||
success: function(xmlResponse) {
|
||||
// get the contents from search data
|
||||
var datas = $("entry", xmlResponse).map(function() {
|
||||
return {
|
||||
title: $("title", this).text(),
|
||||
content: $("content", this).text(),
|
||||
url: $("url", this).text()
|
||||
};
|
||||
}).get();
|
||||
var $input = document.getElementById(search_id);
|
||||
var $resultContent = document.getElementById(content_id);
|
||||
$input.addEventListener('input', function() {
|
||||
var str = '<ul class=\"search-result-list\">';
|
||||
var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
|
||||
$resultContent.innerHTML = "";
|
||||
if (this.value.trim().length <= 0) {
|
||||
return;
|
||||
}
|
||||
// perform local searching
|
||||
datas.forEach(function(data) {
|
||||
var isMatch = true;
|
||||
var content_index = [];
|
||||
var data_title = data.title.trim().toLowerCase();
|
||||
var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
|
||||
var data_url = data.url;
|
||||
var index_title = -1;
|
||||
var index_content = -1;
|
||||
var first_occur = -1;
|
||||
// only match artiles with not empty titles and contents
|
||||
if (data_title != '' && data_content != '') {
|
||||
keywords.forEach(function(keyword, i) {
|
||||
index_title = data_title.indexOf(keyword);
|
||||
index_content = data_content.indexOf(keyword);
|
||||
if (index_title < 0 && index_content < 0) {
|
||||
isMatch = false;
|
||||
} else {
|
||||
if (index_content < 0) {
|
||||
index_content = 0;
|
||||
}
|
||||
if (i == 0) {
|
||||
first_occur = index_content;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// show search results
|
||||
if (isMatch) {
|
||||
keywords.forEach(function(keyword) {
|
||||
var regS = new RegExp(keyword, "gi");
|
||||
data_title = data_title.replace(regS, "<span class=\"search-keyword pink lighten-2\">" + keyword + "</span>");
|
||||
});
|
||||
|
||||
str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
|
||||
var content = data.content.trim().replace(/<[^>]+>/g, "");
|
||||
if (first_occur >= 0) {
|
||||
// cut out 100 characters
|
||||
var start = first_occur - 20;
|
||||
var end = first_occur + 80;
|
||||
if (start < 0) {
|
||||
start = 0;
|
||||
}
|
||||
if (start == 0) {
|
||||
end = 100;
|
||||
}
|
||||
if (end > content.length) {
|
||||
end = content.length;
|
||||
}
|
||||
var match_content = content.substring(start, end);
|
||||
// highlight all keywords
|
||||
keywords.forEach(function(keyword) {
|
||||
var regS = new RegExp(keyword, "gi");
|
||||
match_content = match_content.replace(regS, "<span class=\"search-keyword pink lighten-2\">" + keyword + "</span>");
|
||||
});
|
||||
|
||||
str += "<p class=\"search-result\">..." + match_content + "...</p>"
|
||||
}
|
||||
str += "</li>";
|
||||
}
|
||||
});
|
||||
str += "</ul>";
|
||||
$resultContent.innerHTML = str;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
10
themes/hexo-theme-raytaylorism/source/js/materialize.min.js
vendored
Normal file
10
themes/hexo-theme-raytaylorism/source/js/materialize.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
30
themes/hexo-theme-raytaylorism/source/js/prettify.js
Normal file
30
themes/hexo-theme-raytaylorism/source/js/prettify.js
Normal file
@ -0,0 +1,30 @@
|
||||
!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
|
||||
b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
|
||||
h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
|
||||
(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
|
||||
f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
|
||||
a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
|
||||
if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
|
||||
g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
|
||||
/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
|
||||
s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
|
||||
q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
|
||||
c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
|
||||
r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
|
||||
a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
|
||||
t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||
O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||
Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
||||
V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
|
||||
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
|
||||
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
|
||||
["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
|
||||
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
|
||||
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
|
||||
return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
|
||||
o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
|
||||
{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
|
||||
h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
|
||||
Loading…
x
Reference in New Issue
Block a user