Skip to content

Commit

Permalink
发布 1.0.0(萌典)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lete114 committed Dec 31, 2020
0 parents commit 5d12562
Show file tree
Hide file tree
Showing 36 changed files with 1,570 additions and 0 deletions.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<h1 align="center"><a href="https://github.com/lete114/hexo-theme-MengD" target="_blank">MengD(萌典)</a></h1>

<img src="https://cdn.jsdelivr.net/gh/lete114/CDN/MengD/Home.png" alt="MengD(萌典)">


## hexo-theme-MengD
一个崇尚简约优雅,以及极致的性能

把注意力集中到内容上

口号:禁止花里胡哨

## 快速开始

安装
``` powershell
git clone https://github.com/lete114/hexo-theme-MengD.git themes/MengD
```

打开根目录下的`_config.yml`修改`theme: MengD`

## 配置

``` yml
# 导航栏菜单
menu:
首页: /
标签: /tags
关于我: /about

## 个人信息配置
title: Lete乐特's Blog
author: Lete乐特
mail: [email protected]
avatar: https://www.lete114.top/img/avatar.png
description: 人生只有一次,大胆的生活!!

## 信息图标
social:
fab fa-github: https://github.com/lete114
fa fa-envelope: mailto:[email protected]

# 是否开启版权声明
copytight: true

# 页脚
footer:
custom_text: 我相信我可以,但我一直在路上,所以我有无限的可能!!
since: 2020

# 自动截取
post_content:
line: 3 # 内容超过多少行后出现省略号(...)
length: 500 # 截取字数

## 代码块样式
highlight_theme: mac # default / darker / pale night / light / ocean / mac / mac light
```
28 changes: 28 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
menu:
首页: /
标签: /tags
关于我: /about

title: Lete乐特's Blog
author: Lete乐特
mail: [email protected]
avatar: https://www.lete114.top/img/avatar.png
description: 人生只有一次,大胆的生活!!

social:
fab fa-github: https://github.com/lete114
fa fa-envelope: mailto:[email protected]

copytight: true

footer:
custom_text: 我相信我可以,但我一直在路上,所以我有无限的可能!!
since: 2020

# 自动截取
post_content:
line: 3 # 显示多少行后出现省略号(...)
length: 500 # 截取多少字

## 代码块样式
highlight_theme: mac # default / darker / pale night / light / ocean / mac / mac light
122 changes: 122 additions & 0 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<% if(index){ %>
<div class="post-item">
<div class="post-title">
<h2><a href="<%- url_for(post.path) %>"><%= post.title %></a></h2>
</div>
<div class="post-description">
<p style="-webkit-line-clamp: <%- theme.post_content.line %>">
<%- strip_html(post.content.substring(0, theme.post_content.length)) %>
</p>
</div>
<div class="post-footer">
<div class="post-meta">
<span class="post-date">
<i class="far fa-calendar-alt"></i>
<span>发表于</span>
<span><%- date(post.date, "YYYY-MM-DD") %></span>
</span>
</div>
<div class="post-tag">
<span>
<i class="fa fa-tag"></i>
<% post.tags.forEach(function(tag, i){ %>
<a href="<%= tag.path %>"><span><%-tag.name%></span></a>
<%if(post.tags.length-1 > i){%>
<i class="fas fa-angle-right"></i>
<%} %>
<% }) %>
</span>
</div>
</div>
</div>
<% }else{ %>
<%if(page.type==null || page.layout==null){%>
<article class="post">
<div class="post-title">
<h2 class="title"><%= page.title %></h2>
</div>
<%if(page.type==null){%>
<div class="post-meta">
<div class="meta-firstline">
<span class="post-meta-date">
<i class="far fa-calendar-alt fa-fw post-meta-icon"></i>
<span class="post-meta-label">发表于 <%- date(page.date, "YYYY-MM-DD") %> | </span>
<i class="fas fa-history fa-fw post-meta-icon"></i>
<span class="post-meta-label">更新于 <%- date(page.update, "YYYY-MM-DD") %></span>
</span>
</div>
<div class="meta-secondline">
<span class="post-meta-wordcount">
<i class="far fa-file-word fa-fw post-meta-icon"></i>
<span class="post-meta-label">字数总计:</span>
<span class="word-count"><%= wordcount(page.content) %> | </span>
<i class="far fa-clock fa-fw post-meta-icon"></i>
<span class="post-meta-label">阅读时长:</span>
<span><%= min2read(page.content) %>分钟 | </span>
<i class="far fa-eye fa-fw post-meta-icon"></i>
<span class="post-meta-label">阅读量:</span>
<span id="busuanzi_value_page_pv"></span>
</span>
</div>
</div>
<%}%>
<div class="post-content">
<%- page.content %>
</div>
<%- partial('copyright') %>
<div class="post-tag">
<span>
<i class="fa fa-tag"></i>
<% post.tags.forEach(function(tag, i){ %>
<a href="<%= tag.path %>"><span><%-tag.name%></span></a>
<%if(post.tags.length-1 > i){%>
<i class="fas fa-angle-right"></i>
<%} %>
<% }) %>
</span>
</div>
<%- partial('share') %>
<%- partial('reward') %>
</article>
<div class="pagination">
<% if (post.prev){ %>
<a href="<%- url_for(post.prev.path) %>" class="page-pre">
<i class="fas fa-arrow-alt-circle-left"></i>
<%= post.prev.title %>
</a>
<% } %>
<% if (post.next){ %>
<a href="<%- url_for(post.next.path) %>" class="page-next">
<%= post.next.title %>
<i class="fas fa-arrow-alt-circle-right"></i>
</a>
<% } %>
</div>
<%}else if(page.type=="tags" || page.layout=="tags"){%>
<div id="page-title" class="page-title">
<h2><%= page.title %> - <%= site.tags.length %></h2>
</div>
<%- partial('tag') %>
<%}else if(page.type=="archives" || page.layout=="archives"){%>
<%- partial('archive') %>
<%}else if(page.type!=null || page.layout!=null){%>
<div id="page-title" class="page-title">
<h2><%= page.title %></h2>
<span class="page-description"><%= page.description %></span>
</div>
<div class="post-content">
<%- page.content %>
</div>
<%}%>
<% } %>

27 changes: 27 additions & 0 deletions layout/_partial/copyright.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--版权-->
<% if (theme.copytight && !index){ %>
<% if (post.copytight==null||post.copytight){ %>
<div class="post-copyright">
<div class="post-copyright-icon"><a></a></div>
<div class="post-copyright__author">
<span class="post-copyright-meta">文章作者: </span>
<span class="post-copyright-info">
<a href="mailto:<%- theme.mail %>" one-link-mark="yes"><%- theme.author%></a>
</span>
</div>
<div class="post-copyright__type">
<span class="post-copyright-meta">文章链接: </span>
<span class="post-copyright-info">
<a href="<%= config.url %>/<%= post.path %>" one-link-mark="yes"><%= config.url %>/<%= post.path %></a>
</span>
</div><div class="post-copyright__notice">
<span class="post-copyright-meta">版权声明: </span>
<span class="post-copyright-info">本博客所有文章除特别声明外,均采用
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" one-link-mark="yes">
CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自
<a href="https://blog.lete114.top" target="_blank" one-link-mark="yes"><%- theme.title || config.title%></a>
</span>
</div>
</div>
<% } %>
<% } %>
16 changes: 16 additions & 0 deletions layout/_partial/footer.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<footer class="footer" id="footer">
<div class="copyright">
<% var now = new Date().getFullYear(); %>
&copy; <%- theme.footer.since === now ? theme.footer.since : (theme.footer.since + " - " + now) %>
<i class="fas fa-fan"></i>
<%= theme.author || config.author %>
</div>
<div class="framework-info">
<span>框架 </span>
<a href="https://hexo.io" target="_blank">Hexo</a>
<span class="footer-separator">|</span>
<span>主题 </span>
<a href="https://github.com/lete114/hexo-theme-MengD" target="_blank">MengD.(萌典) </a>
</div>
<div class="custom-text"><%= theme.footer.custom_text || config.subtitle %></div>
</footer>
7 changes: 7 additions & 0 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<title><%= theme.title || config.title %></title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script>
<%- css('css/index') %>
18 changes: 18 additions & 0 deletions layout/_partial/header.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<header>
<div class="card-content">
<div class="author-info">
<div>
<img src="<%= theme.avatar %>" alt="<%= theme.author || config.author %>" class="avatar">
<div class="author"><%= theme.author || config.author %></div>
</div>
</div>
<div id="description" class="description">
<p><%= theme.description || config.description %></p>
<div class="social-icon">
<% for (social in theme.social) { %>
<a href="<%- url_for(theme.social[social]) %>"><i class="<%= social %>"></i></a>
<% } %>
</div>
</div>
</div>
</header>
22 changes: 22 additions & 0 deletions layout/_partial/nav.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<nav class="site_nav" id="site_nav">
<i id="openNav" class="fas fa-bars fa-fw"></i>
<div id="mobileNav">
<div class="author-info">
<div>
<img src="<%= theme.avatar %>" alt="<%= theme.author || config.author %>" class="avatar">
<div class="author"><%= theme.author || config.author %></div>
</div>
<hr>
</div>
<ul>
<% for (name in theme.menu) { %>
<li><a href="<%- url_for(theme.menu[name]) %>"><%= name %></a></li>
<% } %>
</ul>
</div>
<ul>
<% for (name in theme.menu) { %>
<li><a href="<%- url_for(theme.menu[name]) %>"><%= name %></a></li>
<% } %>
</ul>
</nav>
10 changes: 10 additions & 0 deletions layout/_partial/pagination.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<% if (page.total > 1){ %>
<div class="pagination">
<%- paginator({
prev_text: "<i class='fas fa-chevron-left fa-fw'></i>",
next_text: "<i class='fas fa-chevron-right fa-fw'></i>",
mid_size: 1,
escape: false
}) %>
</div>
<%}%>
61 changes: 61 additions & 0 deletions layout/_partial/reward.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<style>
@keyframes donate_effcet {
0% {
opacity: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
-webkit-transform: translateY(-20px);
-moz-transform: translateY(-20px);
-o-transform: translateY(-20px);
-ms-transform: translateY(-20px);
transform: translateY(-20px);
}
100% {
opacity: 1;
-ms-filter: none;
filter: none;
-webkit-transform: translateY(0);
-moz-transform: translateY(0);
-o-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
.reward-all:after {
position: absolute;
right: 0;
bottom: 2px;
left: 0;
margin: 0 auto;
width: 0;
height: 0;
border-top: 13px solid #f5f5f5;
border-right: 13px solid transparent;
border-left: 13px solid transparent;
content: '';
}
</style>

<div class="post-reward">
<div class="reward-button">
<div class="reward-main">
<ul class="reward-all">
<li class="reward-item"><a href="https://cdn.jsdelivr.net/gh/lete114/[email protected]/Use/wzf.png"
target="_blank"><img class="post-qr-code-img entered loaded"
data-lazy-src="https://cdn.jsdelivr.net/gh/lete114/[email protected]/Use/wzf.png" alt="微信"
data-ll-status="loaded" src="https://cdn.jsdelivr.net/gh/lete114/[email protected]/Use/wzf.png"></a>
<div class="post-qr-code-desc">微信</div>
</li>
<li class="reward-item"><a href="https://cdn.jsdelivr.net/gh/lete114/[email protected]/Use/zfb.png"
target="_blank"><img class="post-qr-code-img entered loaded"
data-lazy-src="https://cdn.jsdelivr.net/gh/lete114/[email protected]/Use/zfb.png" alt="支付宝"
data-ll-status="loaded" src="https://cdn.jsdelivr.net/gh/lete114/[email protected]/Use/zfb.png"></a>
<div class="post-qr-code-desc">支付宝</div>
</li>
</ul>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions layout/_partial/script.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%- js('js/main') %>
Loading

1 comment on commit 5d12562

@vercel
Copy link

@vercel vercel bot commented on 5d12562 Jan 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hexo-theme-mengd – ./

hexo-theme-mengd.lete114.vercel.app
hexo-theme-mengd-git-master.lete114.vercel.app
hexo-theme-mengd.vercel.app

Please sign in to comment.