国际化
This commit is contained in:
parent
9fa331206c
commit
f1870b2ff8
@ -1,9 +0,0 @@
|
||||
---
|
||||
title: 关于
|
||||
date: 2016-01-31 22:10:28
|
||||
layout: about
|
||||
---
|
||||
|
||||
大家好,我是XXX。欢迎来到我的个人技术博客。
|
||||
|
||||
这里用markdown写下你的简介,就跟平时写md一样就可以了。
|
||||
@ -1,9 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
@ -1,2 +0,0 @@
|
||||
build/*.js
|
||||
config/*.js
|
||||
@ -1,39 +0,0 @@
|
||||
module.exports = {
|
||||
extends: ['eslint-config-airbnb'],
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
mocha: true,
|
||||
jest: true,
|
||||
es6: true
|
||||
},
|
||||
parser: 'babel-eslint',
|
||||
parserOptions: {
|
||||
ecmaVersion: 6,
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
experimentalObjectRestSpread: true
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
'react',
|
||||
'babel'
|
||||
],
|
||||
rules: {
|
||||
'curly': [2, 'all'],
|
||||
'func-names': 0,
|
||||
'prefer-const': 0,
|
||||
'arrow-body-style': 0,
|
||||
'react/sort-comp': 0,
|
||||
'react/prop-types': 0,
|
||||
'react/jsx-first-prop-new-line': 0,
|
||||
'import/no-unresolved': 0,
|
||||
'no-param-reassign': 0,
|
||||
'no-return-assign': 0,
|
||||
'max-len': [2, {
|
||||
'code': 120
|
||||
}],
|
||||
'consistent-return': 0,
|
||||
'comma-dangle': 0
|
||||
}
|
||||
}
|
||||
5
themes/yilia/.gitattributes
vendored
5
themes/yilia/.gitattributes
vendored
@ -1,5 +0,0 @@
|
||||
*.js linguist-language=JavaScript
|
||||
*.css linguist-language=JavaScript
|
||||
*.scss linguist-language=JavaScript
|
||||
*.ejs linguist-language=JavaScript
|
||||
*.html linguist-language=JavaScript
|
||||
@ -1,215 +0,0 @@
|
||||
hexo-theme-yilia
|
||||
================
|
||||
|
||||
Yilia 是为 [hexo](https://github.com/tommy351/hexo) 2.4+制作的主题。
|
||||
崇尚简约优雅,以及极致的性能。 你可以点击 [我的博客](http://litten.me/) 查看效果。
|
||||
|
||||
如果想体验手机浏览效果,可以扫一下二维码:
|
||||
|
||||

|
||||
|
||||
—————————————————————
|
||||
|
||||
**关于主题:**
|
||||
|
||||
1. 崇尚简约
|
||||
2. 追求移动端体验
|
||||
3. 希望把加载速度做到极致(努力中)
|
||||
4. 让大家把注意力放到内容上。这是本主题设计初衷
|
||||
5. 主题不支持IE6,7,8。以后也不会
|
||||
|
||||
**近期更新(2017.07.09):**
|
||||
|
||||
2017.07.09
|
||||
1. 返回顶部
|
||||
2. TOC目录
|
||||
|
||||
2016.12.04
|
||||
1. 打赏
|
||||
2. 搜索
|
||||
3. “更好的”标签云
|
||||
4. “更好的”分享
|
||||
5. 一些动画
|
||||
|
||||
**计划中:**
|
||||
|
||||
1. 移动端优化
|
||||
|
||||
## 一、外观
|
||||
|
||||
####**常规**
|
||||
|
||||

|
||||
|
||||
####**手机**
|
||||
|
||||

|
||||
|
||||
####**ipad横竖屏切换**
|
||||
|
||||

|
||||
|
||||
## 二、开发者
|
||||
|
||||
为了性能和开发工程化考虑,Yilia需要使用webpack进行构建生成。
|
||||
|
||||
如果您对主题有一些定制化的需求,请参考wiki[《Yilia源码目录结构及构建须知》](https://github.com/litten/hexo-theme-yilia/wiki/Yilia%E6%BA%90%E7%A0%81%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E5%8F%8A%E6%9E%84%E5%BB%BA%E9%A1%BB%E7%9F%A5)
|
||||
|
||||
## 三、使用
|
||||
|
||||
#### 安装
|
||||
|
||||
``` bash
|
||||
$ git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
|
||||
```
|
||||
|
||||
#### 配置
|
||||
|
||||
修改hexo根目录下的 `_config.yml` : `theme: yilia`
|
||||
|
||||
#### 更新
|
||||
|
||||
``` bash
|
||||
cd themes/yilia
|
||||
git pull
|
||||
```
|
||||
|
||||
## 四、配置
|
||||
|
||||
主题配置文件在主目录下的`_config.yml`,请根据自己需要修改使用。
|
||||
完整配置例子,可以参考[我的博客备份](https://github.com/litten/BlogBackup)
|
||||
|
||||
```
|
||||
# Header
|
||||
|
||||
menu:
|
||||
主页: /
|
||||
随笔: /tags/随笔/
|
||||
|
||||
# SubNav
|
||||
subnav:
|
||||
github: "#"
|
||||
weibo: "#"
|
||||
rss: "#"
|
||||
zhihu: "#"
|
||||
#qq: "#"
|
||||
#weixin: "#"
|
||||
#jianshu: "#"
|
||||
#douban: "#"
|
||||
#segmentfault: "#"
|
||||
#bilibili: "#"
|
||||
#acfun: "#"
|
||||
#mail: "mailto:litten225@qq.com"
|
||||
#facebook: "#"
|
||||
#google: "#"
|
||||
#twitter: "#"
|
||||
#linkedin: "#"
|
||||
|
||||
rss: /atom.xml
|
||||
|
||||
# 是否需要修改 root 路径
|
||||
# 如果您的网站存放在子目录中,例如 http://yoursite.com/blog,
|
||||
# 请将您的 url 设为 http://yoursite.com/blog 并把 root 设为 /blog/。
|
||||
root:
|
||||
|
||||
# Content
|
||||
|
||||
# 文章太长,截断按钮文字
|
||||
excerpt_link: more
|
||||
# 文章卡片右下角常驻链接,不需要请设置为false
|
||||
show_all_link: '展开全文'
|
||||
# 数学公式
|
||||
mathjax: false
|
||||
# 是否在新窗口打开链接
|
||||
open_in_new: false
|
||||
|
||||
# 打赏
|
||||
# 打赏type设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏
|
||||
reward_type: 2
|
||||
# 打赏wording
|
||||
reward_wording: '谢谢你请我吃糖果'
|
||||
# 支付宝二维码图片地址,跟你设置头像的方式一样。比如:/assets/img/alipay.jpg
|
||||
alipay:
|
||||
# 微信二维码图片地址
|
||||
weixin:
|
||||
|
||||
# 目录
|
||||
# 目录设定:0-不显示目录; 1-文章对应的md文件里有toc:true属性,才有目录; 2-所有文章均显示目录
|
||||
toc: 1
|
||||
# 根据自己的习惯来设置,如果你的目录标题习惯有标号,置为true即可隐藏hexo重复的序号;否则置为false
|
||||
toc_hide_index: true
|
||||
# 目录为空时的提示
|
||||
toc_empty_wording: '目录,不存在的…'
|
||||
|
||||
# 是否有快速回到顶部的按钮
|
||||
top: true
|
||||
|
||||
# Miscellaneous
|
||||
baidu_analytics: ''
|
||||
google_analytics: ''
|
||||
favicon: /favicon.png
|
||||
|
||||
#你的头像url
|
||||
avatar:
|
||||
|
||||
#是否开启分享
|
||||
share_jia: true
|
||||
|
||||
#评论:1、多说;2、网易云跟帖;3、畅言;4、Disqus;5、Gitment
|
||||
#不需要使用某项,直接设置值为false,或注释掉
|
||||
#具体请参考wiki:https://github.com/litten/hexo-theme-yilia/wiki/
|
||||
|
||||
#1、多说
|
||||
duoshuo: false
|
||||
|
||||
#2、网易云跟帖
|
||||
wangyiyun: false
|
||||
|
||||
#3、畅言
|
||||
changyan_appid: false
|
||||
changyan_conf: false
|
||||
|
||||
#4、Disqus 在hexo根目录的config里也有disqus_shortname字段,优先使用yilia的
|
||||
disqus: false
|
||||
|
||||
#5、Gitment
|
||||
gitment_owner: false #你的 GitHub ID
|
||||
gitment_repo: '' #存储评论的 repo
|
||||
gitment_oauth:
|
||||
client_id: '' #client ID
|
||||
client_secret: '' #client secret
|
||||
|
||||
# 样式定制 - 一般不需要修改,除非有很强的定制欲望…
|
||||
style:
|
||||
# 头像上面的背景颜色
|
||||
header: '#4d4d4d'
|
||||
# 右滑板块背景
|
||||
slider: 'linear-gradient(200deg,#a0cfe4,#e8c37e)'
|
||||
|
||||
# slider的设置
|
||||
slider:
|
||||
# 是否默认展开tags板块
|
||||
showTags: false
|
||||
|
||||
# 智能菜单
|
||||
# 如不需要,将该对应项置为false
|
||||
# 比如
|
||||
#smart_menu:
|
||||
# friends: false
|
||||
smart_menu:
|
||||
innerArchive: '所有文章'
|
||||
friends: '友链'
|
||||
aboutme: '关于我'
|
||||
|
||||
friends:
|
||||
友情链接1: http://localhost:4000/
|
||||
友情链接2: http://localhost:4000/
|
||||
友情链接3: http://localhost:4000/
|
||||
友情链接4: http://localhost:4000/
|
||||
友情链接5: http://localhost:4000/
|
||||
友情链接6: http://localhost:4000/
|
||||
|
||||
aboutme: 很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
|
||||
```
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Header
|
||||
|
||||
menu:
|
||||
主页: /
|
||||
随笔: /tags/随笔/
|
||||
home: /
|
||||
laboratory: /lab/
|
||||
|
||||
# SubNav
|
||||
subnav:
|
||||
@ -17,7 +17,7 @@ subnav:
|
||||
#segmentfault: "#"
|
||||
#bilibili: "#"
|
||||
#acfun: "#"
|
||||
#mail: "mailto:litten225@qq.com"
|
||||
mail: "mailto:colorfulsweet@gmail.com"
|
||||
#facebook: "#"
|
||||
#google: "#"
|
||||
#twitter: "#"
|
||||
@ -32,10 +32,6 @@ root: /
|
||||
|
||||
# Content
|
||||
|
||||
# 文章太长,截断按钮文字
|
||||
excerpt_link: more
|
||||
# 文章卡片右下角常驻链接,不需要请设置为false
|
||||
show_all_link: '展开全文'
|
||||
# 是否在新窗口打开链接
|
||||
open_in_new: false
|
||||
|
||||
@ -71,24 +67,19 @@ avatar: https://i.loli.net/2018/05/04/5aeb37415a0dc.jpg
|
||||
#是否开启分享
|
||||
share_jia: true
|
||||
|
||||
#评论:1、多说;2、网易云跟帖;3、畅言;4、Disqus;5、Gitment
|
||||
#评论:1、畅言;2、Disqus;3、Gitment
|
||||
#不需要使用某项,直接设置值为false,或注释掉
|
||||
#具体请参考wiki:https://github.com/litten/hexo-theme-yilia/wiki/
|
||||
|
||||
#1、多说
|
||||
duoshuo: false
|
||||
|
||||
#2、网易云跟帖
|
||||
wangyiyun: false
|
||||
|
||||
#3、畅言
|
||||
#1、畅言
|
||||
changyan_appid: false
|
||||
changyan_conf: false
|
||||
|
||||
#4、Disqus 在hexo根目录的config里也有disqus_shortname字段,优先使用yilia的
|
||||
#2、Disqus 在hexo根目录的config里也有disqus_shortname字段,优先使用yilia的
|
||||
disqus: false
|
||||
|
||||
#5、gitalk
|
||||
#3、gitalk
|
||||
gitalk:
|
||||
enable: true
|
||||
ClientID: bede8dd783185299d256
|
||||
@ -105,27 +96,22 @@ style:
|
||||
# 右滑板块背景
|
||||
slider: 'linear-gradient(200deg,#a0cfe4,#e8c37e)'
|
||||
|
||||
# slider的设置
|
||||
slider:
|
||||
# 是否默认展开tags板块
|
||||
showTags: false
|
||||
|
||||
# 智能菜单
|
||||
# 如不需要,将该对应项置为false
|
||||
# 比如
|
||||
#smart_menu:
|
||||
# friends: false
|
||||
smart_menu:
|
||||
innerArchive: '所有文章'
|
||||
friends: '友链'
|
||||
aboutme: '关于我'
|
||||
innerArchive: all_articles
|
||||
friends: false #friends_link
|
||||
aboutme: about_me
|
||||
|
||||
friends:
|
||||
友情链接1: http://localhost:4000/
|
||||
友情链接2: http://localhost:4000/
|
||||
友情链接3: http://localhost:4000/
|
||||
友情链接4: http://localhost:4000/
|
||||
友情链接5: http://localhost:4000/
|
||||
友情链接6: http://localhost:4000/
|
||||
friends:
|
||||
友情链接1: http://localhost:6603/
|
||||
友情链接2: http://localhost:6603/
|
||||
友情链接3: http://localhost:6603/
|
||||
友情链接4: http://localhost:6603/
|
||||
友情链接5: http://localhost:6603/
|
||||
友情链接6: http://localhost:6603/
|
||||
|
||||
aboutme: 很惭愧<br><br>只做了一点微小的工作<br>谢谢大家
|
||||
@ -1,11 +1,10 @@
|
||||
categories: Categories
|
||||
category: Category
|
||||
search: Search
|
||||
tags: Tags
|
||||
tagcloud: Tag Cloud
|
||||
tweets: Tweets
|
||||
tag: Tag
|
||||
prev: Prev
|
||||
next: Next
|
||||
comment: Comments
|
||||
archive_a: Archives
|
||||
archive_b: "Archives: %s"
|
||||
page: Page %d
|
||||
@ -13,7 +12,9 @@ recent_posts: Recent Posts
|
||||
newer: Newer
|
||||
older: Older
|
||||
share: Share
|
||||
powered_by: Powered by
|
||||
rss_feed: RSS Feed
|
||||
category: Category
|
||||
tag: Tag
|
||||
show_full_text: Show Full Text
|
||||
home: Homepage
|
||||
informal_essay: Informal Essay
|
||||
laboratory: Laboratory
|
||||
all_articles: All Articles
|
||||
about_me: About Me
|
||||
@ -1,11 +1,10 @@
|
||||
categories: Catégories
|
||||
category: Catégorie
|
||||
search: Rechercher
|
||||
tags: Mot-clés
|
||||
tagcloud: Nuage de mot-clés
|
||||
tweets: Tweets
|
||||
tag: Mot-clé
|
||||
prev: Précédent
|
||||
next: Suivant
|
||||
comment: Commentaires
|
||||
archive_a: Archives
|
||||
archive_b: "Archives: %s"
|
||||
page: Page %d
|
||||
@ -13,7 +12,9 @@ recent_posts: Articles récents
|
||||
newer: Récent
|
||||
older: Ancien
|
||||
share: Partager
|
||||
powered_by: Propulsé by
|
||||
rss_feed: Flux RSS
|
||||
category: Catégorie
|
||||
tag: Mot-clé
|
||||
show_full_text: Voir le texte intégral de la
|
||||
home: Homepage
|
||||
informal_essay: Essais
|
||||
laboratory: Laboratoires
|
||||
all_articles: Tous les articles
|
||||
about_me: À propos de moi
|
||||
20
themes/yilia/languages/ja.yml
Normal file
20
themes/yilia/languages/ja.yml
Normal file
@ -0,0 +1,20 @@
|
||||
categories: カテゴリー
|
||||
category: カテゴリー
|
||||
search: 検索
|
||||
tags: タグ
|
||||
tag: タグ
|
||||
prev: 前のページ
|
||||
next: 次のページ
|
||||
archive_a: アーカイブ
|
||||
archive_b: アーカイブ:%s
|
||||
page: ページ %d
|
||||
recent_posts: 最新の記事
|
||||
newer: new
|
||||
older: 古い
|
||||
share: シェア
|
||||
show_full_text: 記事全体を見る
|
||||
home: ホーム
|
||||
informal_essay: エッセイ
|
||||
laboratory: 研究室
|
||||
all_articles: すべての記事
|
||||
about_me: 私について
|
||||
@ -1,20 +0,0 @@
|
||||
|
||||
categories: Categorieën
|
||||
search: Zoeken
|
||||
tags: Labels
|
||||
tagcloud: Tag Cloud
|
||||
tweets: Tweets
|
||||
prev: Vorige
|
||||
next: Volgende
|
||||
comment: Commentaren
|
||||
archive_a: Archieven
|
||||
archive_b: "Archieven: %s"
|
||||
page: Pagina %d
|
||||
recent_posts: Recente berichten
|
||||
newer: Nieuwer
|
||||
older: Ouder
|
||||
share: Delen
|
||||
powered_by: Powered by
|
||||
rss_feed: RSS Feed
|
||||
category: Categorie
|
||||
tag: Label
|
||||
@ -1,19 +0,0 @@
|
||||
categories: Kategorier
|
||||
search: Søk
|
||||
tags: Tags
|
||||
tagcloud: Tag Cloud
|
||||
tweets: Tweets
|
||||
prev: Forrige
|
||||
next: Neste
|
||||
comment: Kommentarer
|
||||
archive_a: Arkiv
|
||||
archive_b: "Arkiv: %s"
|
||||
page: Side %d
|
||||
recent_posts: Siste innlegg
|
||||
newer: Newer
|
||||
older: Older
|
||||
share: Share
|
||||
powered_by: Powered by
|
||||
rss_feed: RSS Feed
|
||||
category: Category
|
||||
tag: Tag
|
||||
@ -1,11 +1,10 @@
|
||||
categories: Категории
|
||||
category: Категория
|
||||
search: Поиск
|
||||
tags: Метки
|
||||
tagcloud: Облако меток
|
||||
tweets: Твиты
|
||||
tag: Метка
|
||||
prev: Назад
|
||||
next: Вперед
|
||||
comment: Комментарии
|
||||
archive_a: Архив
|
||||
archive_b: "Архив: %s"
|
||||
page: Страница %d
|
||||
@ -13,7 +12,9 @@ recent_posts: Недавние записи
|
||||
newer: Следующий
|
||||
older: Предыдущий
|
||||
share: Поделиться
|
||||
powered_by: Создано с помощью
|
||||
rss_feed: RSS-каналы
|
||||
category: Категория
|
||||
tag: Метка
|
||||
show_full_text: просмотреть полный текст
|
||||
home: дома
|
||||
informal_essay: эссе
|
||||
laboratory: лаборатория
|
||||
all_articles: Все статьи
|
||||
about_me: Обо мне
|
||||
@ -1,19 +1,20 @@
|
||||
categories: 分类
|
||||
category: 分类
|
||||
search: 搜索
|
||||
tags: 标签
|
||||
tagcloud: 标签云
|
||||
tweets: 推文
|
||||
tag: 标签
|
||||
prev: 上一页
|
||||
next: 下一页
|
||||
comment: 留言
|
||||
archive_a: 归档
|
||||
archive_b: 归档:%s
|
||||
page: 第 %d 页
|
||||
recent_posts: 最新文章
|
||||
newer: Newer
|
||||
older: Older
|
||||
share: Share
|
||||
powered_by: Powered by
|
||||
rss_feed: RSS Feed
|
||||
category: Category
|
||||
tag: Tag
|
||||
newer: 新的
|
||||
older: 旧的
|
||||
share: 分享
|
||||
show_full_text: 查看全文
|
||||
home: 主页
|
||||
informal_essay: 随笔
|
||||
laboratory: 实验室
|
||||
all_articles: 所有文章
|
||||
about_me: 关于我
|
||||
@ -1,19 +1,20 @@
|
||||
categories: 分類
|
||||
category: 分類
|
||||
search: 搜尋
|
||||
tags: 標籤
|
||||
tagcloud: 標籤雲
|
||||
tweets: 推文
|
||||
tag: 標籤
|
||||
prev: 上一頁
|
||||
next: 下一頁
|
||||
comment: 留言
|
||||
archive_a: 彙整
|
||||
archive_b: 彙整:%s
|
||||
page: 第 %d 頁
|
||||
recent_posts: 最新文章
|
||||
newer: Newer
|
||||
older: Older
|
||||
share: Share
|
||||
powered_by: Powered by
|
||||
rss_feed: RSS Feed
|
||||
category: Category
|
||||
tag: Tag
|
||||
newer: 新的
|
||||
older: 舊的
|
||||
share: 分享
|
||||
show_full_text: 查看全文
|
||||
home: 主頁
|
||||
informal_essay: 隨筆
|
||||
laboratory: 實驗室
|
||||
all_articles: 所有文章
|
||||
about_me: 關於我
|
||||
@ -2,14 +2,6 @@
|
||||
<% page.posts.each(function(post){ %>
|
||||
<%- partial('article', {post: post, index: true}) %>
|
||||
<% }) %>
|
||||
<% if (page.total > 1){ %>
|
||||
<nav id="page-nav">
|
||||
<%- paginator({
|
||||
prev_text: '« Prev',
|
||||
next_text: 'Next »'
|
||||
}) %>
|
||||
</nav>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<% var last; %>
|
||||
<% page.posts.each(function(post, i){ %>
|
||||
@ -30,14 +22,12 @@
|
||||
<% if (page.posts.length){ %>
|
||||
</div></section>
|
||||
<% } %>
|
||||
|
||||
<% if (page.total > 1){ %>
|
||||
<nav id="page-nav">
|
||||
<%- paginator({
|
||||
prev_text: '« Prev',
|
||||
next_text: 'Next »'
|
||||
}) %>
|
||||
</nav>
|
||||
<% } %>
|
||||
|
||||
<% } %>
|
||||
<% if (page.total > 1){ %>
|
||||
<nav id="page-nav">
|
||||
<%- paginator({
|
||||
prev_text: '« '+__('prev'),
|
||||
next_text: __('next')+' »'
|
||||
}) %>
|
||||
</nav>
|
||||
<% } %>
|
||||
@ -57,9 +57,9 @@
|
||||
<% } %>
|
||||
<%- partial('post/tag') %>
|
||||
<%- partial('post/category') %>
|
||||
<% if (index && theme.show_all_link){ %>
|
||||
<% if (index){ %>
|
||||
<p class="article-more-link">
|
||||
<a class="article-more-a" href="<%- url_for(post.path) %>"><%= theme.show_all_link %> >></a>
|
||||
<a class="article-more-a" href="<%- url_for(post.path) %>"><%= __('show_full_text') %> >></a>
|
||||
</p>
|
||||
<% } %>
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
<div id="header-inner" class="inner">
|
||||
<nav id="main-nav">
|
||||
<a id="main-nav-toggle" class="nav-icon"></a>
|
||||
<% for (var i in theme.menu){ %>
|
||||
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
|
||||
<% for (let menuName in theme.menu){ %>
|
||||
<a class="main-nav-link" href="<%- url_for(theme.menu[menuName]) %>"><%= __(menuName) %></a>
|
||||
<% } %>
|
||||
</nav>
|
||||
<nav id="sub-nav">
|
||||
|
||||
@ -10,27 +10,27 @@
|
||||
</hgroup>
|
||||
<% if (theme.subtitle){ %>
|
||||
<p class="header-subtitle"><%=theme.subtitle%></p>
|
||||
<%}%>
|
||||
<% } %>
|
||||
|
||||
<nav class="header-menu">
|
||||
<ul>
|
||||
<% for (var i in theme.menu){ %>
|
||||
<li><a href="<%- url_for(theme.menu[i]) %>"><%= i %></a></li>
|
||||
<%}%>
|
||||
<% for (let menuName in theme.menu){ %>
|
||||
<li><a href="<%- url_for(theme.menu[menuName]) %>"><%= __(menuName) %></a></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="header-smart-menu">
|
||||
<% for (var i in theme.smart_menu){ %>
|
||||
<% if(theme.smart_menu[i]){ %>
|
||||
<a @click="openSlider($event, '<%-i%>')" href="javascript:void(0)"><%= theme.smart_menu[i] %></a>
|
||||
<% for (let menuName in theme.smart_menu){ %>
|
||||
<% if(theme.smart_menu[menuName]){ %>
|
||||
<a @click="openSlider($event, '<%-menuName%>')" href="javascript:void(0)"><%= __(theme.smart_menu[menuName]) %></a>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</nav>
|
||||
<nav class="header-nav">
|
||||
<div class="social">
|
||||
<% for (var i in theme.subnav){ %>
|
||||
<% for (let i in theme.subnav){ %>
|
||||
<a class="<%= i %>" target="_blank" href="<%- url_for(theme.subnav[i]) %>" title="<%= i %>"><i class="icon-<%= i %>"></i></a>
|
||||
<%}%>
|
||||
<% } %>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
<nav class="header-menu js-header-menu">
|
||||
<ul style="width: <%= ulWidth %>">
|
||||
<% var divide = 100 / count + '%' %>
|
||||
<% for (var i in theme.menu){ %>
|
||||
<li style="width: <%= divide %>"><a href="<%- url_for(theme.menu[i]) %>"><%= i %></a></li>
|
||||
<% for (let menuName in theme.menu){ %>
|
||||
<li style="width: <%= divide %>"><a href="<%- url_for(theme.menu[menuName]) %>"><%= __(menuName) %></a></li>
|
||||
<%}%>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<% var divide = 100 / count + '%' %>
|
||||
<% for (let menu_name in theme.smart_menu){ %>
|
||||
<% if(theme.smart_menu[menu_name]){ %>
|
||||
<li style="width: <%= divide %>" @click="openSlider($event, '<%-menu_name%>')"><a href="javascript:void(0)" :class="{active:<%-menu_name%>}"><%= theme.smart_menu[menu_name] %></a></li>
|
||||
<li style="width: <%= divide %>" @click="openSlider($event, '<%-menu_name%>')"><a href="javascript:void(0)" :class="{active:<%-menu_name%>}"><%= __(theme.smart_menu[menu_name]) %></a></li>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</ul>
|
||||
@ -24,18 +24,18 @@
|
||||
<%if(hasInnerArchive){%>
|
||||
<section class="tools-section tools-section-all" v-show="innerArchive">
|
||||
<div class="search-wrap">
|
||||
<input class="search-ipt" v-model="search" type="text" placeholder="文章搜索…">
|
||||
<input class="search-ipt" v-model="search" type="text" placeholder="<%=__('search') %>…">
|
||||
<i class="icon-search icon" v-show="!search"></i>
|
||||
<i class="icon-close icon" v-show="search" @click="clearChose"></i>
|
||||
</div>
|
||||
<div class="widget tagcloud search-tag">
|
||||
<div>
|
||||
<span >标签:</span>
|
||||
<span ><%=__('tags') %>:</span>
|
||||
<label class="bui-switch-label bui-switch-animbg">
|
||||
<input type="checkbox" name="s" @click="showTags=!showTags"/>
|
||||
<input type="checkbox" @click="showTags=!showTags"/>
|
||||
<i class="bui-switch"></i>
|
||||
</label>
|
||||
<span style="margin-left: 50px;">分类:</span>
|
||||
<span style="margin-left: 50px;"><%=__('categories') %>:</span>
|
||||
<label class="bui-switch-label bui-switch-animbg">
|
||||
<input type="checkbox" @click="showCategories=!showCategories"/>
|
||||
<i class="bui-switch"></i>
|
||||
|
||||
@ -1,66 +1,42 @@
|
||||
<!-- Root element of PhotoSwipe. Must have class pswp. -->
|
||||
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<!-- Background of PhotoSwipe.
|
||||
It's a separate element as animating opacity is faster than rgba(). -->
|
||||
<div class="pswp__bg"></div>
|
||||
|
||||
<!-- Slides wrapper with overflow:hidden. -->
|
||||
<div class="pswp__scroll-wrap">
|
||||
|
||||
<!-- Container that holds slides.
|
||||
PhotoSwipe keeps only 3 of them in the DOM to save memory.
|
||||
Don't modify these 3 pswp__item elements, data is added later on. -->
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
|
||||
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
|
||||
<div class="pswp__top-bar">
|
||||
|
||||
<!-- Controls are self-explanatory. Order can be changed. -->
|
||||
|
||||
<div class="pswp__counter"></div>
|
||||
|
||||
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
|
||||
|
||||
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
|
||||
|
||||
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
|
||||
<!-- element will get class pswp__preloader--active when preloader is running -->
|
||||
<div class="pswp__preloader">
|
||||
<div class="pswp__preloader__icn">
|
||||
<div class="pswp__preloader__cut">
|
||||
<div class="pswp__preloader__donut"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
|
||||
</button>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
|
||||
</button>
|
||||
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pswp__bg"></div>
|
||||
<div class="pswp__scroll-wrap">
|
||||
<div class="pswp__container">
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
<div class="pswp__item"></div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__ui pswp__ui--hidden">
|
||||
<div class="pswp__top-bar">
|
||||
<div class="pswp__counter"></div>
|
||||
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
|
||||
<button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>
|
||||
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
|
||||
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
|
||||
|
||||
<div class="pswp__preloader">
|
||||
<div class="pswp__preloader__icn">
|
||||
<div class="pswp__preloader__cut">
|
||||
<div class="pswp__preloader__donut"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||
<div class="pswp__share-tooltip"></div>
|
||||
</div>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
|
||||
</button>
|
||||
|
||||
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
|
||||
</button>
|
||||
|
||||
<div class="pswp__caption">
|
||||
<div class="pswp__caption__center"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -44,34 +44,17 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new ExtractTextPlugin('style.css'),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': '"production"'
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
inject: false,
|
||||
cache: false,
|
||||
minify: minifyHTML,
|
||||
template: './source-src/script.ejs',
|
||||
filename: '../layout/_partial/script.ejs'
|
||||
}),
|
||||
new CleanPlugin(['source/js/*.js'],{
|
||||
verbose: true,
|
||||
dry: false,
|
||||
})
|
||||
],
|
||||
watch: true
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports.devtool = '#source-map'
|
||||
module.exports.plugins = (module.exports.plugins || []).concat([
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new CleanPlugin('builds')
|
||||
])
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user