Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2dc49c

Browse files
committed
final version v1.0.0
1 parentd4505ab commite2dc49c

28 files changed

+2296
-4075
lines changed

‎README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33

44
**[在线预览 | PREVIEW](http://tridiamond.tech)**
55

6-
⚫️一款优雅而高尚的黑色主题, 响应式, 高质量, 有趣, 优雅, 简约但不简单。
6+
⚫️ 一款优雅而高尚的黑色主题, 响应式, 高质量, 有趣, 优雅, 简约但不简单。
7+
78
---
9+
810
⚫️ A noble dark obsidian style Hexo theme, it's responsive, hight quality, fancy, high class.
911

12+
![preview](https://s2.ax1x.com/2019/10/01/uNBcND.png)
1013

1114
###安装主题
1215

‎_config.yml‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# 头部菜单,title: link
22
menu:
3-
关于我:/whoami
4-
分类:/categories
5-
标签:/tags
6-
归档:/archives
3+
ABOUT:/whoami
4+
CATEGORY:/categories
5+
TAGS:/tags
6+
ARCHIVES:/archives
77

88
# 是否显示目录
99
TOC:false
@@ -29,15 +29,15 @@ gitalk:
2929
# 是否自动展开评论框
3030
autoExpand:false
3131
# 应用编号
32-
clientID:'ec894e2b66f752e8b7fb'
32+
clientID:ec894e2b66f752e8b7fb
3333
# 应用秘钥
34-
clientSecret:'3ccc2e92bb350688fe2c2dc2930189b62622bfb1'
34+
clientSecret:3ccc2e92bb350688fe2c2dc2930189b62622bfb1
3535
# issue仓库名
36-
repo:'TriDiamondBlog'
36+
repo:TriDiamondBlog
3737
# Github名
38-
owner:'TriDiamond'
38+
owner:TriDiamond
3939
# Github名
40-
admin:'TriDiamond'
40+
admin:TriDiamond
4141
# Ensure uniqueness and length less than 50
4242
id:location.pathname
4343
# Facebook-like distraction free mode
@@ -46,6 +46,10 @@ gitalk:
4646
# 网站关键字
4747
keywords:TriDiamond Blog 三钻 PHP博客 Laravel Ionic Frontend Backend
4848

49+
#
50+
descriptionOne:"Think like an artist, develop like an artisan"
51+
descriptionTwo:"艺术家思维去思考问题,工匠创造精神去开发"
52+
4953
# 要使用google_analytics进行统计的话,这里需要配置ID
5054
google_analytics:
5155

‎layout/_partial/categories.ejs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<linkrel="stylesheet"type="text/css"href="/css/obsidianise.css">
21
<divclass="set">
32
<%-list_categories({orderby:"length", order:-1})%>
43
</div>

‎layout/_partial/head.ejs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ var description = '';
3333
<%if (config.author){%><meta name="author" content="<%= config.author %>"><% }%>
3434
<%if (theme.rss){%><link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml"><% }%>
3535
<%if (theme.favicon){%><link rel="icon" href="<%- url_for(theme.favicon) %>"><% }%>
36-
<%-css(['//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css'])%>
36+
<linkhref="/font/Rubik-Bold-kern-latin.woff2"as="font"type="font/woff2"crossorigin="">
37+
<linkhref="/font/Rubik-Regular-kern-latin.woff2"as="font"type="font/woff2"crossorigin="">
38+
<%-css(['//cdn.bootcss.com/gitalk/1.5.0/gitalk.min.css'])%>
3739
<%-css(['//at.alicdn.com/t/font_1429596_2c4p9wqp87z.css'])%>
3840
<%-css(['css/obsidian.css'])%>
39-
<%-css(['css/tridiamond.css'])%>
40-
<%-css(['css/animate.css'])%>
41+
<%-css(['//cdn.bootcss.com/animate.css/3.7.2/animate.min.css'])%>
4142
</head>

‎layout/_partial/menu.ejs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<divclass="nav">
22
<ulid="menu-menu"class="menu">
33
<%for (var iintheme.menu){%>
4-
<liclass="<%- theme.menu[i].indexOf('http') > -1 ?"" :"pview" %> menu-item menu-item-type-post_type menu-item-object-page">
5-
<%-link_to(theme.menu[i].lastIndexOf('/')>0?theme.menu[i]:theme.menu[i]+'/', i, {external:true})%>
4+
<liclass="animated fadeInDown menu-item menu-item-type-post_type menu-item-object-page">
5+
<%-link_to(theme.menu[i].lastIndexOf('/')>0?theme.menu[i]:theme.menu[i]+'/', i, {external:false})%>
66
</li>
77
<%}%>
88
</ul>
99
<pclass="copyright"id="copyright">
1010
&copy;<%=date(newDate(),'YYYY')%><%=config.author||config.title%>.
11-
💎Powered by<%-link_to("http://hexo.io/","Hexo", {external:true})%>
11+
Powered by<%-link_to("http://hexo.io/","Hexo", {external:true})%>
1212
Theme<%-link_to("https://github.com/TriDiamond/hexo-theme-obsidian","Obsidian", {external:true})%>
1313
</p>
1414
</div>

‎layout/_partial/post/article.ejs‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
<divclass=article-header-wrapper>
22
<divclass="article-header">
3-
<divclass="article-cover animatedbounceIn"style="
3+
<divclass="article-cover animatedfadeIn"style="
44
animation-delay:600ms;
5-
animation-duration:800ms;
5+
animation-duration:1.2s;
66
background-image:
77
radial-gradient(ellipseclosest-side,rgba(0, 0, 0, 0.65), #100e17),
88
url(<%-page.cover ||theme.welcome_cover %>);">
99
</div>
1010
<divclass="else">
1111
<pclass="animated fadeInDown"><%-page.date.locale("zh-cn").format("MMMM DD, YYYY")%></p>
1212
<h3class="animated fadeInDown"><%-link_to(page.path,page.title||"Untitled", {class:""})%></h3>
13-
<pclass="animated fadeInDown"><%-truncate(strip_html(page.content), {length:100, omission:'...'})%></p>
14-
<%if (page.tags&&page.tags.length){%>
15-
<%-list_tags(page.tags, {
16-
show_count:false,
17-
class:'animated fadeInDown post-tags'
18-
})%>
19-
<% }%>
2013
<pclass="article-count animated fadeInDown">
2114
<span>
2215
<bclass="iconfont icon-text2"></b>
@@ -27,6 +20,12 @@
2720
<%=min2read(page.content)%>分钟
2821
</span>
2922
</p>
23+
<%if (page.tags&&page.tags.length){%>
24+
<%-list_tags(page.tags, {
25+
show_count:false,
26+
class:'animated fadeInDown post-tags'
27+
})%>
28+
<% }%>
3029
</div>
3130
</div>
3231
</div>
@@ -36,14 +35,14 @@
3635
<divclass="screen-gradient-content-inside">
3736
<divclass="bold-underline-links screen-gradient-sponsor">
3837
<p>
39-
<%=config.subtitle||config.description%>
38+
<span></span>
4039
</p>
4140
</div>
4241
</div>
4342
</div>
4443
</div>
4544

46-
<divclass="article">
45+
<divclass="article animated fadeIn">
4746
<divclass='main'>
4847
<divclass="content markdown">
4948
<%-page.content%>

‎layout/_partial/post/item.ejs‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
<divclass="else">
88
<p><%-post.date.locale("zh-cn").format("MMMM DD, YYYY")%></p>
99
<h3><%-link_to(post.path,post.title||"Untitled", {class:"posttitle"})%></h3>
10-
<p><%-truncate(strip_html(post.content), {length:100, omission:'...'})%></p>
11-
<%if (post.tags&&post.tags.length){%>
12-
<%-list_tags(post.tags, {
13-
show_count:false,
14-
class:'post-tags'
15-
})%>
16-
<% }%>
1710
<pclass="post-count">
1811
<span>
1912
<bclass="iconfont icon-text2"></b>
@@ -24,6 +17,20 @@
2417
<%=min2read(post.content)%>分钟
2518
</span>
2619
</p>
20+
<divclass="md-content">
21+
<%-htmlTruncate(post.content,500, {
22+
ellipsis:'...',
23+
excludes: ['img'],
24+
keepWhitespaces:true,
25+
reserveLastWord:true
26+
})%>
27+
</div>
28+
<%if (post.tags&&post.tags.length){%>
29+
<%-list_tags(post.tags, {
30+
show_count:false,
31+
class:'post-tags'
32+
})%>
33+
<% }%>
2734
</div>
2835
</div>
2936

‎layout/_partial/screen.ejs‎

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,30 @@
22
<divid="header">
33
<div>
44
<aclass="image-logo animated fadeInDown"href="/"></a>
5-
<ulid="menu-menu"class="menu">
5+
<ulid="menu-menu"class="menu text-menu">
66
<%for (var iintheme.menu){%>
77
<liclass="animated fadeInDown menu-item menu-item-type-post_type menu-item-object-page">
8-
<%-link_to(theme.menu[i].lastIndexOf('/')>0?theme.menu[i]:theme.menu[i]+'/', i, {external:false})%>
8+
<%-link_to(theme.menu[i].lastIndexOf('/')>0?theme.menu[i]:theme.menu[i]+'/', i, {external:false, class:"menu-link"})%>
99
</li>
1010
<%}%>
1111
</ul>
12-
<!-- <div></div>-->
12+
<divclass="icon-menu switchmenu gradient-text animated fadeInDown"></div>
1313
</div>
1414
</div>
1515
<divid="screen">
1616
<divid="mark">
17-
<divclass="layer"data-depth="0.4">
18-
<%-image_tag(theme.welcome_cover||first.cover||"/img/welcome-cover.jpg", {id:"cover", width:1920, height:1080})%>
17+
<divclass="cover animated fadeIn"style="
18+
animation-delay:900ms;
19+
animation-duration:2.8s;
20+
background-image:
21+
radial-gradient(ellipseclosest-side,rgba(0, 0, 0, 0.56), #100e17),
22+
url(<%=first.cover ||"/img/cover.jpg" %>);">
1923
</div>
2024
</div>
21-
<divid="vibrant">
22-
<svgviewBox="0 0 2880 1620"height="100%"preserveAspectRatio="xMaxYMax slice">
23-
<polygonopacity="0.7"fill="#000"points="2000,1620 0,1620 0,0 600,0"/>
24-
</svg>
25-
<div></div>
26-
</div>
2725
<%if ( first ) {%>
2826
<div id="post0">
2927
<pclass="animated fadeInDown"><%-first.date.locale("zh-cn").format("MMMM DD, YYYY")%></p>
30-
<h2class="animated fadeInDown"><%-link_to(first.path,first.title||config.title, {class:"posttitle"})%></h2>
31-
<pclass="summary animated fadeInDown"><%-truncate(strip_html(first.content), {length:60, omission:'...'})%></p>
32-
<%if (first.tags&&first.tags.length){%>
33-
<%-list_tags(first.tags, {
34-
show_count:false,
35-
class:'animated fadeInDown post-tags'
36-
})%>
37-
<% }%>
28+
<h1class="animated fadeInDown"><%-link_to(first.path,first.title||config.title, {class:"posttitle"})%></h1>
3829
<pclass="post-count animated fadeInDown">
3930
<span>
4031
<bclass="iconfont icon-text2"></b>
@@ -45,6 +36,20 @@
4536
<%=min2read(first.content)%>分钟
4637
</span>
4738
</p>
39+
<divclass="md-content animated fadeIn">
40+
<%-htmlTruncate(first.content,100, {
41+
ellipsis:'...',
42+
excludes: ['img'],
43+
keepWhitespaces:true,
44+
reserveLastWord:true
45+
})%>
46+
</div>
47+
<%if (first.tags&&first.tags.length){%>
48+
<%-list_tags(first.tags, {
49+
show_count:false,
50+
class:'animated fadeInDown post-tags'
51+
})%>
52+
<% }%>
4853
</div>
4954
<% }%>
5055
</div>
@@ -54,7 +59,7 @@
5459
<divclass="screen-gradient-content-inside">
5560
<divclass="bold-underline-links screen-gradient-sponsor">
5661
<p>
57-
<%=config.subtitle||config.description%>
62+
<spanclass="typed-text"></span>
5863
</p>
5964
</div>
6065
</div>

‎layout/_partial/scripts.ejs‎

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
<%-js(['//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js'])%>
2-
<%-js(['//lib.baomitu.com/jquery/1.8.3/jquery.min.js','js/plugin.js','js/obsidian.js'])%>
1+
<%-js(['//cdn.bootcss.com/gitalk/1.5.0/gitalk.min.js'])%>
2+
<%-js(['//lib.baomitu.com/jquery/1.8.3/jquery.min.js','js/plugin.js','js/obsidian.js','js/jquery.truncate.js'])%>
3+
<%-js(['//cdn.bootcss.com/typed.js/2.0.10/typed.min.js'])%>
34
<%-partial('photoswipe')%>
45

56
<%if (!config.highlightjs) {%>
67
<!--Highlight.js-->
78
<%-css(['css/dracula.css'])%>
8-
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.10/build/highlight.min.js">
9+
<script src="//cdn.bootcss.com/highlight.js/9.15.10/highlight.min.js">
910
</script>
1011
<script>
1112
document.addEventListener('DOMContentLoaded', (event)=> {
@@ -14,4 +15,25 @@
1415
});
1516
});
1617
</script>
17-
<% }%>
18+
<% }%>
19+
20+
<script>
21+
functioninitialTyped () {
22+
var typedTextEl=$('.typed-text');
23+
if (typedTextEl&&typedTextEl.length>0) {
24+
var typed=newTyped('.typed-text', {
25+
strings: ["<%= theme.descriptionOne %>","<%= theme.descriptionTwo %>"],
26+
typeSpeed:90,
27+
loop:true,
28+
loopCount:Infinity,
29+
backSpeed:20,
30+
});
31+
}
32+
}
33+
34+
if ($('.article-header')&&$('.article-header').length) {
35+
$(document).ready(function () {
36+
initialTyped();
37+
});
38+
}
39+
</script>

‎layout/_partial/tags.ejs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<linkrel="stylesheet"type="text/css"href="/css/obsidianise.css">
21
<divclass="set">
32
<%-tagcloud({min_font:14, max_font:36, amount:200, color:true, start_color:'#9E9E9E', end_color:'#212121'})%>
43
</div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp