initial
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
db.json
|
||||
*.log
|
||||
node_modules/
|
||||
public/
|
||||
.deploy*/
|
||||
87
_config.yml
Normal file
@ -0,0 +1,87 @@
|
||||
# Hexo Configuration
|
||||
## Docs: https://hexo.io/docs/configuration.html
|
||||
## Source: https://github.com/hexojs/hexo/
|
||||
server:
|
||||
port: 6603
|
||||
compress: true
|
||||
header: true
|
||||
|
||||
# Site
|
||||
title: 日月追影俯河山
|
||||
subtitle: 世上有条唯一的路,除了你无人能走
|
||||
description:
|
||||
keywords:
|
||||
author: 柠烟夏季
|
||||
language: zh-CN
|
||||
timezone:
|
||||
|
||||
# URL
|
||||
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
|
||||
url: https://www.colorfulsweet.site
|
||||
root: /
|
||||
permalink: :year/:month/:day/:title/
|
||||
permalink_defaults:
|
||||
|
||||
# Directory
|
||||
source_dir: source
|
||||
public_dir: public
|
||||
tag_dir: tags
|
||||
archive_dir: archives
|
||||
category_dir: categories
|
||||
code_dir: downloads/code
|
||||
i18n_dir: :lang
|
||||
skip_render:
|
||||
|
||||
# Writing
|
||||
new_post_name: :title.md # File name of new posts
|
||||
default_layout: post
|
||||
titlecase: false # Transform title into titlecase
|
||||
external_link: true # Open external links in new tab
|
||||
filename_case: 0
|
||||
render_drafts: false
|
||||
post_asset_folder: false
|
||||
relative_link: false
|
||||
future: true
|
||||
highlight:
|
||||
enable: true
|
||||
line_number: true
|
||||
auto_detect: false
|
||||
tab_replace:
|
||||
|
||||
# Home page setting
|
||||
# path: Root path for your blogs index page. (default = '')
|
||||
# per_page: Posts displayed per page. (0 = disable pagination)
|
||||
# order_by: Posts order. (Order by date descending by default)
|
||||
index_generator:
|
||||
path: ''
|
||||
per_page: 10
|
||||
order_by: -date
|
||||
|
||||
# Category & Tag
|
||||
default_category: uncategorized
|
||||
category_map:
|
||||
tag_map:
|
||||
|
||||
# Date / Time format
|
||||
## Hexo uses Moment.js to parse and display date
|
||||
## You can customize the date format as defined in
|
||||
## http://momentjs.com/docs/#/displaying/format/
|
||||
date_format: YYYY-MM-DD
|
||||
time_format: HH:mm:ss
|
||||
|
||||
# Pagination
|
||||
## Set per_page to 0 to disable pagination
|
||||
per_page: 10
|
||||
pagination_dir: page
|
||||
|
||||
# Extensions
|
||||
## Plugins: https://hexo.io/plugins/
|
||||
## Themes: https://hexo.io/themes/
|
||||
theme: hexo-theme-xups
|
||||
|
||||
# Deployment
|
||||
## Docs: https://hexo.io/docs/deployment.html
|
||||
deploy:
|
||||
type: git
|
||||
repo: git@github.com:sookie2010/sookie2010.github.io.git
|
||||
branch: master
|
||||
2610
package-lock.json
generated
Normal file
20
package.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "hexo-site",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"hexo": {
|
||||
"version": "3.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"hexo": "^3.2.0",
|
||||
"hexo-deployer-git": "^0.3.1",
|
||||
"hexo-generator-archive": "^0.1.4",
|
||||
"hexo-generator-category": "^0.1.3",
|
||||
"hexo-generator-index": "^0.2.0",
|
||||
"hexo-generator-tag": "^0.2.0",
|
||||
"hexo-renderer-ejs": "^0.3.0",
|
||||
"hexo-renderer-marked": "^0.3.0",
|
||||
"hexo-renderer-stylus": "^0.3.1",
|
||||
"hexo-server": "^0.2.0"
|
||||
}
|
||||
}
|
||||
4
scaffolds/draft.md
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
tags:
|
||||
---
|
||||
4
scaffolds/page.md
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
---
|
||||
5
scaffolds/post.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
tags:
|
||||
---
|
||||
110
source/_posts/linux/1.1 linux常用命令与技巧(1).md
Normal file
@ -0,0 +1,110 @@
|
||||
---
|
||||
title: 1.1 linux常用命令与技巧(1)
|
||||
date: 2018-5-3 00:52:22
|
||||
tags: linux
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
### md5sum与sha1sum
|
||||
用于使用hash算法生成文件的摘要信息 , 常用于文件完整性的校验
|
||||
<!-- more -->
|
||||
```bash
|
||||
# 生成a.txt的md5摘要信息
|
||||
md5sum a.txt
|
||||
|
||||
# 生成当前目录下所有文件的sha1摘要信息
|
||||
sha1sum ./*
|
||||
```
|
||||
|
||||
### history
|
||||
显示在终端中执行过的所有命令的历史记录
|
||||
(按↑方向键快速找到执行过的命令也是利用的这个记录)
|
||||
如果使用`history -c`可以清空这个列表
|
||||
|
||||
### chown
|
||||
这个命令是用来改变文件拥有者和所在的组
|
||||
```
|
||||
chown <用户名>:<组> <文件名>
|
||||
```
|
||||
可以改变文件的所有权
|
||||
|
||||
### cal
|
||||
就是calendar(日历) , 可以用来显示当前月份或者任意年份中的某一月
|
||||
```
|
||||
# 显示当前月份日历
|
||||
cal
|
||||
|
||||
# 显示2018年2月的日历
|
||||
cal 2 2018
|
||||
|
||||
# 显示2018年全年日历
|
||||
cal -y 2018
|
||||
```
|
||||
|
||||
### cat
|
||||
代表了连结 , 通常也可以用它输出单个文件的内容
|
||||
```bash
|
||||
# 输出a.txt的内容(带行号)
|
||||
cat -n a.txt
|
||||
|
||||
# 将a.txt b.txt的内容连结输出
|
||||
cat a.txt b.txt
|
||||
```
|
||||
|
||||
### 输出重定向
|
||||
对于程序的输出 , 我们通常不能一直看着终端 , 而且终端也只能保留最近的内容
|
||||
除了程序本身可以有对于日志的处理之外
|
||||
我们也可以将程序向终端的输出重定向到指定的文件里面
|
||||
使用`>`和`>>`可以实现重定向
|
||||
前者表示始终覆盖目标文件 , 后者表示如果目标文件存在则执行追加操作 , 不会覆盖
|
||||
```bash
|
||||
# 执行java程序并将输出写入到当前目录的output.txt文件当中
|
||||
java -jar demo.jar > ./output.txt
|
||||
```
|
||||
当然有些程序会在终端打印大量无意义的内容
|
||||
我们如果想把这些输出直接丢弃
|
||||
可以使用`/dev/null`作为目标位置
|
||||
这是个并不存在的虚拟位置 , 定向到这里相当于是把输出内容直接丢弃 , 避免占用磁盘空间
|
||||
```bash
|
||||
command > /dev/null 2>&1
|
||||
# 1表示标准输出 2表示标准错误输出
|
||||
# 2>&1表示将标准错误输出重定向到标准输出, 这样两者都会被丢弃
|
||||
```
|
||||
|
||||
#### 与cat的配合使用
|
||||
cat既然表示连结 , 那么与输出重定向配合使用 , 就可以实现对于压缩分卷的结合了
|
||||
```bash
|
||||
# 注意分卷的顺序
|
||||
cat data.z01 data.z02 data.zip > xdata.zip
|
||||
# 将分卷结合成一个文件之后就可以执行解压了
|
||||
unzip xdata.zip
|
||||
```
|
||||
|
||||
### grep
|
||||
全称是Global Regular Expression Print, 全局正则表达式输出
|
||||
这个命令的作用是执行全文检索
|
||||
```
|
||||
# 在a.txt当中搜索str1字符串
|
||||
grep "str1" a.txt
|
||||
|
||||
# 在当前目录下递归检索所有文件搜索str1字符串
|
||||
grep -r "str1" ./
|
||||
```
|
||||
当然不限于固定的字符串, 也可以使用正则表达式
|
||||
|
||||
#### 管道符"|"
|
||||
格式 : 命令A|命令B
|
||||
作用是将命令A的输出结果作为命令B的操作对象
|
||||
比如结合`grep`可以对繁杂的输出结果进行过滤
|
||||
```bash
|
||||
# 查询当前运行的进程, 并过滤包含tomcat关键字的行
|
||||
ps ax | grep tomcat
|
||||
```
|
||||
比如`wc -l`可以用来统计行数
|
||||
```
|
||||
# 统计当前目录下总共有多少文件
|
||||
ls -l | wc -l
|
||||
```
|
||||
因为`ls -l`的输出是逐行输出当前目录下每个文件的详细信息 , 所以统计出的行数实际上就是文件数量了
|
||||
|
||||
126
source/_posts/linux/2.0 shell编程(1)-初见.md
Normal file
@ -0,0 +1,126 @@
|
||||
---
|
||||
title: 2.0 shell编程(1)-初见
|
||||
date: 2018-5-5 22:38:32
|
||||
tags:
|
||||
- linux
|
||||
- shell
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
`shell`俗称为**壳** , 是指提供使用者使用界面的软件
|
||||
也叫做命令解析器
|
||||
接收用户的命令 , 然后调用相应的应用程序
|
||||
(接收命令的方式可以是命令行 , 也可以是图形界面)
|
||||
<!-- more -->
|
||||
在linux发展过程中 , 出现过很多的shell
|
||||
+ `sh`(全称 Bourne Shell): 是UNIX最初使用的 shell,而且在每种 UNIX 上都可以使用。
|
||||
Bourne Shell 在 shell 编程方面相当优秀,但在处理与用户的交互方面做得不如其他几种 shell。
|
||||
+ `bash`(全称 Bourne Again Shell): LinuxOS 默认的,它是 Bourne Shell 的扩展。
|
||||
与 Bourne Shell 完全兼容,并且在 Bourne Shell 的基础上增加了很多特性。可以提供命令补全,命令编辑和命令历史等功能。它还包含了很多 C Shell 和 Korn Shell 中的优点,有灵活和强大的编辑接口,同时又很友好的用户界面。
|
||||
+ `csh`(全称 C Shell): 是一种比 Bourne Shell更适合的变种 Shell,它的语法与 C 语言很相似。
|
||||
Tcsh: 是 Linux 提供的 C Shell 的一个扩展版本。
|
||||
Tcsh 包括命令行编辑,可编程单词补全,拼写校正,历史命令替换,作业控制和类似 C 语言的语法,他不仅和 Bash Shell 提示符兼容,而且还提供比 Bash Shell 更多的提示符参数。
|
||||
+ `ksh` (全称 Korn Shell): 集合了 C Shell 和 Bourne Shell 的优点并且和 Bourne Shell 完全兼容。
|
||||
+ `pdksh`: 是 Linux 系统提供的 ksh 的扩展。
|
||||
+ `pdksh` 支持人物控制,可以在命令行上挂起,后台执行,唤醒或终止程序。
|
||||
|
||||
---
|
||||
+ **交互式shell** : 等待用户的命令 , 提交后就立即执行该命令
|
||||
+ **非交互式shell** : 不等待用户的输入 , 而是去读取写在文件中的命令代码 , 并且执行 , 这个文件就被称为shell脚本
|
||||
|
||||
> **脚本**其实就是短小的、用来让计算机自动化完成一系列工作的程序,这类程序可以用文本编辑器修改,不需要编译,通常是解释运行的。
|
||||
|
||||
### Hello World
|
||||
test.sh
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo "Hello World!"
|
||||
```
|
||||
echo就是对传入的参数直接进行输出的程序
|
||||
这个脚本的作用就是执行该命令
|
||||
`#!`是一个约定的标记 , 它告诉系统这个脚本要用什么解释器来执行
|
||||
|
||||
之后需要给这个文件加上可执行权限
|
||||
`chmod +x test.sh`
|
||||
然后就可以执行该脚本了
|
||||
`./test.sh`
|
||||
|
||||
当然如果这样执行 , 是根据脚本内容中指定的解释器运行
|
||||
如果没有指定 , 则使用系统默认的
|
||||
我们也可以在运行时指定使用某个解释器
|
||||
比如`sh test.sh`
|
||||
|
||||
### 变量
|
||||
命名规则是可以包含 字母 数字 下划线 , 且以字母或者数字开头
|
||||
使用变量则是在前面加`$`或者用`${}`
|
||||
( 当然如果在字符串内部使用 , 为了防止歧义, 必须用${} )
|
||||
```bash
|
||||
name="sookie"
|
||||
echo $name
|
||||
echo "my name is ${name}123"
|
||||
# 大括号是为了帮助解释器识别变量名称的边界
|
||||
|
||||
#将该变量设为只读, 之后若再赋值就会报错
|
||||
readonly name
|
||||
```
|
||||
**注意** : 等号的两端不能加空格
|
||||
|
||||
#### 删除变量
|
||||
使用`unset 变量名称`可以删除对应的变量
|
||||
|
||||
> 按照上面方式定义的变量实际上是这个shell脚本当中的**局部变量**
|
||||
在操作系统当中可以设置**环境变量** , 所有的shell脚本当中都可以直接使用
|
||||
|
||||
### 字符串
|
||||
字符串的边界可以是单引号也可以是双引号 也可以无引号 , 但是实际应用当中有一些区别
|
||||
+ `单引号`当中的内容都会原样输出 , 不可以使用转义字符 , 不可以使用字符串模板
|
||||
+ `双引号`当中的内容可以使用转义字符 , 也可以使用字符串模板
|
||||
+ `无引号`不可以使用转义字符 , 但是可以使用字符串模板
|
||||
```bash
|
||||
name="sookie"
|
||||
echo 'my name is ${name}1'
|
||||
# output: my name is ${name}1
|
||||
echo "my name is ${name}1"
|
||||
# output: my name is sookie1
|
||||
echo my name is ${name}1
|
||||
# output: my name is sookie1
|
||||
```
|
||||
#### 字符串操作
|
||||
shell当中字符串的拼接不需要用加号
|
||||
直接写在一起即可
|
||||
```bash
|
||||
name="sookie"
|
||||
echo 'my name is '${name}
|
||||
|
||||
#获取字符串长度
|
||||
echo ${#name}
|
||||
|
||||
#截取子串
|
||||
echo ${name:1:3} #输出 ook
|
||||
|
||||
#将字符串内容当做命令执行
|
||||
echo `ls /usr/local`
|
||||
```
|
||||
|
||||
### 数组
|
||||
同大多数解释型语言一样 , 对于数组并没有严格的越界限制
|
||||
```bash
|
||||
#数组定义, 元素之间用空白分割
|
||||
arr=(1 "aa" 2.6)
|
||||
|
||||
#超出当前数组边界的下标形式赋值, 会将元素追加至末尾
|
||||
arr[6]="bb" #当前数组当中有4个元素
|
||||
|
||||
#获取数组长度
|
||||
echo ${#arr[@]}
|
||||
|
||||
#遍历数组
|
||||
for item in ${arr[@]}
|
||||
do
|
||||
echo ${item}
|
||||
done
|
||||
|
||||
#删除数组元素
|
||||
unset arr[1]
|
||||
```
|
||||
219
source/_posts/linux/2.1 shell编程(2)-从入门到重新入门.md
Normal file
@ -0,0 +1,219 @@
|
||||
---
|
||||
title: 2.1 shell编程(2)-从入门到重新入门
|
||||
date: 2018-5-5 00:52:22
|
||||
tags:
|
||||
- linux
|
||||
- shell
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
### 传参
|
||||
在外部执行时可以给脚本传参
|
||||
在脚本当中获取时 , `$0`是执行的文件路径
|
||||
`$1`代表第一个参数 , `$2`代表第二个参数 , 以此类推
|
||||
<!-- more -->
|
||||
```bash
|
||||
echo "当前文件:$0"
|
||||
echo "第一个参数:$1"
|
||||
#参数个数
|
||||
echo "共传入$#个参数"
|
||||
|
||||
#遍历所有的参数
|
||||
for arg in $@
|
||||
do
|
||||
echo $arg
|
||||
done
|
||||
|
||||
#脚本运行进程的ID
|
||||
echo "PID:$$"
|
||||
```
|
||||
执行脚本
|
||||
```bash
|
||||
./test.sh aa bb
|
||||
|
||||
#如果参数内容包含空白, 要加引号才能作为一个参数传递
|
||||
./test.sh aa "bb cc"
|
||||
```
|
||||
#### 变量的判断
|
||||
对于shell脚本来说 , 传参通常是比较灵活的
|
||||
所以经常需要判断是否传入了这个参数
|
||||
```bash
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
echo "包含第一个参数"
|
||||
else
|
||||
echo "未包含第一个参数"
|
||||
fi
|
||||
```
|
||||
这是判断某个变量是否有值的方式
|
||||
因为解释型语言的语法比较松散 , 对于变量先定义后使用没有严格要求
|
||||
所以直接使用一个变量而不进行检查可能造成灾难性的后果
|
||||
|
||||
### 运算
|
||||
原生bash对数学运算的支持比较有限
|
||||
##### 方法1 `$((expression))`
|
||||
```bash
|
||||
num1=3
|
||||
num2=4
|
||||
echo $((num1+num2))
|
||||
echo $((num1**num2)) #乘方
|
||||
```
|
||||
变量的引用加不加$都可以 , 不能计算浮点数
|
||||
##### 方法2 `$[expression]`
|
||||
```bash
|
||||
num1=3
|
||||
num2=4
|
||||
echo $[num1+num2]
|
||||
```
|
||||
变量的引用加不加$都可以 , 不能计算浮点数
|
||||
##### 方法3 `let`关键字
|
||||
```bash
|
||||
num1=3
|
||||
num2=4
|
||||
let sum=$num1+$num2
|
||||
echo $sum
|
||||
```
|
||||
变量的引用加不加$都可以 , 不能计算浮点数 , 加号两端不能有空格
|
||||
|
||||
##### 方法4 使用`expr`
|
||||
这是一个内建的用于数学运算的命令
|
||||
需要注意的是运算符两边必须要有空格
|
||||
```bash
|
||||
expr 2 + 6
|
||||
expr 4 - 9
|
||||
#注意为了防止歧义 乘法要写 \* 而不能直接写 *
|
||||
expr 5 \* 4
|
||||
#除法保留整数
|
||||
expr 9 / 2
|
||||
#取余
|
||||
expr 9 % 2
|
||||
|
||||
#浮点数计算
|
||||
expr "3.9 + 1.8"|bc
|
||||
#scale表示保留到的小数位数
|
||||
expr "scale=3;1.2 * 8.73"|bc
|
||||
```
|
||||
|
||||
#### 关系运算
|
||||
bash当中原生支持关系运算
|
||||
|
||||
比较是否相等
|
||||
```bash
|
||||
if [ $a == $b ]
|
||||
then
|
||||
echo "相等"
|
||||
fi
|
||||
|
||||
if [ $a != $b ]
|
||||
then
|
||||
echo "不相等"
|
||||
fi
|
||||
```
|
||||
|
||||
|运算符|含义|其他表示方式|备注|
|
||||
|-----|---|---------|
|
||||
|-eq|是否相等|==|
|
||||
|-ne|是否不相等|!=|
|
||||
|-gt|大于|>|
|
||||
|-lt|小于|<|
|
||||
|-ge|大于等于|\>=|使用\>=需要使用(( ))|
|
||||
|-le|小于等于|<=|使用<=需要使用(( ))|
|
||||
```bash
|
||||
if [ $a -ge $b ]
|
||||
then
|
||||
echo "大于等于"
|
||||
fi
|
||||
# 等价于上面的写法, 注意用(( ))
|
||||
if (( $a >= $b ))
|
||||
then
|
||||
echo "大于等于"
|
||||
fi
|
||||
```
|
||||
> 关系运算符只能用于整数 , 或者能够解析为整数的字符串
|
||||
|
||||
#### 布尔运算
|
||||
|运算符|含义|其他表示方式|
|
||||
|-----|----|---------|
|
||||
|!|非||
|
||||
|-o|或|\|\||
|
||||
|-a|与|&&|
|
||||
```bash
|
||||
# a小于10 并且 b大于20
|
||||
if [ $a -lt 10 -a $b -gt 20 ]
|
||||
then
|
||||
echo "yes"
|
||||
else
|
||||
echo "no"
|
||||
fi
|
||||
# 与上面的含义相同, 但是注意使用[[ ]]
|
||||
if [[ $a -lt 10 && $b -gt 20 ]]
|
||||
then
|
||||
echo "yes"
|
||||
else
|
||||
echo "no"
|
||||
fi
|
||||
```
|
||||
> **说明**
|
||||
> 推荐使用 `[[ ... ]]` 条件判断结构,而不是 `[ ... ]`,能够防止脚本中的许多逻辑错误。比如,&&、|| 操作符能够正常存在于 [[ ]] 条件判断结构中,但是如果出现在 [ ] 结构中的话,会报错。
|
||||
|
||||
#### 字符串运算
|
||||
|运算符|含义|
|
||||
|----|-----|
|
||||
|=|两个字符串是否相同(区别于数字的比较)|
|
||||
|!=|两个字符串是否不相同|
|
||||
|-z|字符串长度为0返回true|
|
||||
|-n|字符串长度不为0返回true|
|
||||
```bash
|
||||
a="123"
|
||||
b="456"
|
||||
if [ $a = $b ]
|
||||
then
|
||||
echo "相同"
|
||||
else
|
||||
echo "不同"
|
||||
fi
|
||||
# 字符串本身也可以用作判断条件
|
||||
if [ ! $a ]
|
||||
then
|
||||
echo "字符串为空"
|
||||
fi
|
||||
```
|
||||
使用`-n`和`-z`的时候需要注意 , 需要在字符串变量引用上加双引号
|
||||
```bash
|
||||
if [ -n "$a"]
|
||||
then
|
||||
echo "OK"
|
||||
fi
|
||||
```
|
||||
如果不加双引号 , 当a为空的时候 , 相当于执行
|
||||
`if [ -n ]` , 这个时候会把里面的**-n**当做一个普通字符串来处理 , 而不是运算符
|
||||
自然每次都会是true , **-z** 同理
|
||||
### 文件测试运算符
|
||||
一个字符串也可以表示一个文件(目录)的路径
|
||||
使用这些方式可以获得这个文件的各种信息
|
||||
|运算符|含义|
|
||||
|------|----|
|
||||
|-b file |检测文件是否是块设备文件,如果是,则返回 true|
|
||||
|-c file |检测文件是否是字符设备文件,如果是,则返回 true|
|
||||
|-d file |检测文件是否是目录,如果是,则返回 true|
|
||||
|-f file |检测文件是否是普通文件(既不是目录,也不是设备文件),如果是,则返回 true|
|
||||
|-g file |检测文件是否设置了 SGID 位,如果是,则返回 true|
|
||||
|-k file |检测文件是否设置了粘着位(Sticky Bit),如果是,则返回 true|
|
||||
|-p file |检测文件是否是有名管道,如果是,则返回 true|
|
||||
|-u file |检测文件是否设置了 SUID 位,如果是,则返回 true|
|
||||
|-r file |检测文件是否可读,如果是,则返回 true|
|
||||
|-w file |检测文件是否可写,如果是,则返回 true|
|
||||
|-x file |检测文件是否可执行,如果是,则返回 true|
|
||||
|-s file |检测文件是否为空(文件大小是否大于0),不为空返回 true|
|
||||
|-e file |检测文件(包括目录)是否存在,如果是,则返回 true|
|
||||
|
||||
```bash
|
||||
filepath=/usr/local/test.txt
|
||||
if [ -e filepath ]
|
||||
then
|
||||
echo "文件存在"
|
||||
else
|
||||
echo "文件不存在"
|
||||
fi
|
||||
```
|
||||
162
source/_posts/linux/2.2 shell编程(3)-流程控制&函数.md
Normal file
@ -0,0 +1,162 @@
|
||||
---
|
||||
title: shell编程(3)-流程控制&函数
|
||||
date: 2018-5-6 00:52:22
|
||||
tags:
|
||||
- linux
|
||||
- shell
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
### 判断
|
||||
```bash
|
||||
if condition1
|
||||
then
|
||||
command1
|
||||
elif condition2
|
||||
then
|
||||
command2
|
||||
else
|
||||
command3
|
||||
fi
|
||||
```
|
||||
如果else没有语句执行
|
||||
则不能留空 , 最好直接不写这个else
|
||||
<!-- more -->
|
||||
举例
|
||||
```bash
|
||||
if [ `ps ax | grep -c "ssh"` -ge 1 ]
|
||||
then
|
||||
echo "RUNNING"
|
||||
fi
|
||||
# grep的-c参数代表对过滤后的行进行计数
|
||||
|
||||
# 也可以使用test命令做判断
|
||||
if test `ps ax | grep -c "ssh"` -ge 1
|
||||
then
|
||||
echo "RUNNING"
|
||||
fi
|
||||
```
|
||||
|
||||
### 循环
|
||||
#### for循环
|
||||
```bash
|
||||
for ((i=1 ; i<=10 ; i++))
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
# 注意使用(()), 里面的变量并不需要加$
|
||||
```
|
||||
`for (( ; ; ))` - 死循环
|
||||
|
||||
##### foreach
|
||||
bash支持对集合进行迭代的foreach类型语法
|
||||
使用`for ... in ...`
|
||||
```bash
|
||||
# seq命令可以生成一个序列
|
||||
for i in `seq 1 10`
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
|
||||
# 这样也是一个序列
|
||||
for i in {1..10}
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
|
||||
# 迭代遍历一个数组
|
||||
arr=("ab" "cd" "ef")
|
||||
for item in ${arr[@]}
|
||||
do
|
||||
echo $item
|
||||
done
|
||||
```
|
||||
如果一个命令返回的是一个集合 , 也可以执行循环迭代
|
||||
```bash
|
||||
for item in `ls /usr/local`
|
||||
do
|
||||
echo $item
|
||||
done
|
||||
```
|
||||
当然如果是找一个目录下的文件 , 也可以不用ls命令
|
||||
for循环自带路径查找功能
|
||||
```bash
|
||||
for item in /usr/local/*
|
||||
do
|
||||
echo $item
|
||||
done
|
||||
# 注意路径不要加引号
|
||||
```
|
||||
|
||||
#### while循环
|
||||
while循环是在判断条件为false的时候结束循环
|
||||
```bash
|
||||
cnt=1
|
||||
while (( $cnt<=5 ))
|
||||
do
|
||||
echo $cnt
|
||||
let "cnt++"
|
||||
done
|
||||
```
|
||||
`while :`或者`while true`表示死循环
|
||||
#### until循环
|
||||
格式与while循环基本一致 , 只不过是当判断条件为true的时候结束循环
|
||||
```bash
|
||||
cnt=1
|
||||
until (( $cnt>=5 ))
|
||||
do
|
||||
echo $cnt
|
||||
let "cnt++"
|
||||
done
|
||||
```
|
||||
|
||||
#### break与continue
|
||||
表示跳出循环以及继续下一次循环 , 与其他语言当中类似
|
||||
|
||||
### 多选择语句
|
||||
类似其他语言当中的switch , bash当中使用case关键字
|
||||
```bash
|
||||
echo "input a number:"
|
||||
# read表示从终端读取用户输入内容
|
||||
read num
|
||||
case $num in
|
||||
1) echo "数字1"
|
||||
;;
|
||||
2) echo "数字2"
|
||||
;;
|
||||
3|4) echo "3或者4"
|
||||
;;
|
||||
ok) echo "字符串ok"
|
||||
;;
|
||||
*) echo "其他内容"
|
||||
;;
|
||||
esac
|
||||
```
|
||||
|
||||
### 函数
|
||||
shell当中可以自定义函数
|
||||
```bash
|
||||
function myFunc() {
|
||||
echo "参数 $1,$2,$3"
|
||||
echo "所有参数:"
|
||||
for arg in $@
|
||||
do
|
||||
echo $arg
|
||||
done
|
||||
}
|
||||
myFunc "aa" "bb"
|
||||
```
|
||||
> **说明** :
|
||||
1. 与获取脚本的参数类似 , 使用`$序号`或者`${序号}`来获取
|
||||
但是如果到了10 , 就必须写作`${10}` , 否则会与$1产生歧义
|
||||
2. `function` 关键字也可以省略
|
||||
|
||||
### 文件包含
|
||||
一个shell脚本当中可以引入另一个shell脚本
|
||||
```bash
|
||||
. /home/sookie/test2.sh
|
||||
# 或者
|
||||
source /home/sookie/test2.sh
|
||||
```
|
||||
被引入的文件并不需要可执行权限
|
||||
29
source/_posts/linux/2.4 shell(4)-使用技巧.md
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
title: shell(4)-使用技巧
|
||||
date: 2018-5-6 00:52:25
|
||||
tags:
|
||||
- linux
|
||||
- shell
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
#### 判断上一条命令执行是否成功
|
||||
`$?`变量的值是上一条命令执行的返回值
|
||||
通过判断这个变量的值 , 可以知道上一条命令是否执行成功
|
||||
```bash
|
||||
if [ $? -eq 0 ];then
|
||||
echo "执行成功"
|
||||
else
|
||||
echo "执行失败"
|
||||
fi
|
||||
```
|
||||
<!-- more -->
|
||||
|
||||
#### 逐行读取文件
|
||||
```bash
|
||||
while read LINE
|
||||
do
|
||||
echo $LINE
|
||||
done < test.txt
|
||||
```
|
||||
247
source/_posts/linux/3.1 Docker(1)-初见.md
Normal file
@ -0,0 +1,247 @@
|
||||
---
|
||||
title: 3.1 Docker(1)-初见
|
||||
date: 2018-5-8 22:38:32
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
**程序部署运维的痛点**
|
||||
当今软件越发庞大复杂 , 在服务器部署运行一个软件之前通常需要完成:
|
||||
1. 操作系统的设置
|
||||
2. 各种库和组件的安装
|
||||
|
||||
只有他们都正确 , 软件才能正常运行
|
||||
当需要迁移的时候 , 这些事情都要重来一遍
|
||||
并且由于各种原因 , 还可能会产生不一样的问题 , 费时费力
|
||||
<!-- more -->
|
||||
于是就有了独立运行容器的需求 , 从根本上解决这个问题
|
||||
让软件带环境安装
|
||||
给软件一个独立的环境去运行 , 并且这个软件所有的依赖都在这个环境里面
|
||||
|
||||
|
||||
**虚拟机**
|
||||
虚拟机是一种针对上述问题的解决方案 , 在一个操作系统里面构造一个虚拟环境运行另一个操作系统
|
||||
但是通常会有以下缺陷
|
||||
1. 资源占用多
|
||||
虚拟机会独占一部分内存和硬盘空间。它运行的时候,其他程序就不能使用这些资源了。哪怕虚拟机里面的应用程序,真正使用的内存只有 1MB,虚拟机依然需要几百 MB 的内存才能运行。
|
||||
|
||||
2. 冗余步骤多
|
||||
虚拟机是完整的操作系统,一些系统级别的操作步骤,往往无法跳过,比如用户登录。
|
||||
|
||||
3. 启动慢
|
||||
启动操作系统需要多久,启动虚拟机就需要多久。可能要等几分钟,应用程序才能真正运行。
|
||||
|
||||
**Docker**
|
||||
由于虚拟机存在这些缺点,Linux 发展出了另一种虚拟化技术:Linux 容器
|
||||
Linux 容器不是模拟一个完整的操作系统,而是对进程进行隔离。或者说,在正常进程的外面套了一个保护层。对于容器里面的进程来说,它接触到的各种资源都是虚拟的,从而实现与底层系统的隔离。
|
||||
|
||||
Docker 属于 Linux 容器的一种封装,提供简单易用的容器使用接口。
|
||||
|
||||
Docker 将应用程序与该程序的依赖,打包在一个文件里面。运行这个文件,就会生成一个虚拟容器。程序在这个虚拟容器里运行
|
||||
|
||||
ubuntu系统直接使用apt安装即可
|
||||
```bash
|
||||
apt install docker.io
|
||||
```
|
||||
|
||||
### 镜像(image)
|
||||
docker把程序及其依赖 , 打包在image文件里面 , 称之为镜像文件
|
||||
它可以看做是生成容器的模板 , 一个镜像文件可以生成多个运行容器实例
|
||||
使用`docker image COMMAND`可以实现对镜像的相关操作
|
||||
|
||||
```bash
|
||||
# 查看本机所有的镜像
|
||||
docker image ls
|
||||
|
||||
# 删除指定镜像
|
||||
docker image rm [ImageId]
|
||||
```
|
||||

|
||||
每个镜像都有一个唯一ID , 是一串hash码
|
||||
我们可以根据这个ID来对指定的镜像进行操作
|
||||
当然也不需要必须写完整 , 只要能找到一个唯一的镜像就可以了
|
||||
比如执行`docker image rm 56a`就可以删除掉express-demo这个镜像了
|
||||
当然使用`docker image rm express-demo`也是可以的
|
||||
> docker中的操作大都是这种模式
|
||||
|
||||
### 容器(container)
|
||||
容器就是程序运行的独立虚拟环境了 , 容器由镜像生成
|
||||
( 镜像可以认为是一种存储的结构 , 而容器才是实际运行的实例 )
|
||||
```bash
|
||||
# 查看运行中的容器
|
||||
docker container ls
|
||||
|
||||
# 运行指定的镜像
|
||||
docker container run [ImageId]
|
||||
|
||||
# 运行指定的容器
|
||||
docker container start [ContainerId]
|
||||
|
||||
# 停止指定的镜像
|
||||
docker container stop [ContainerId]
|
||||
|
||||
# 强行终止指定的镜像
|
||||
docker container kill [ContainerId]
|
||||
```
|
||||
使用`run`每次都会生成一个新的容器文件 , 如果要复用指定的容器 , 可以使用`start`
|
||||
|
||||
|
||||
|
||||
### Hello World
|
||||
这是一个官方提供的最简单的镜像 , 可以用来熟悉docker的基本用法
|
||||
```bash
|
||||
# 从官方仓库拉取镜像
|
||||
docker image pull hello-world
|
||||
|
||||
# 运行这个image
|
||||
docker container run hello-world
|
||||
```
|
||||
> `docker container run`命令具有自动抓取 image 文件的功能。如果发现本地没有指定的 image 文件,就会从仓库自动抓取。因此,前面的`docker image pull`命令并不是必需的步骤
|
||||
|
||||
这个镜像当中的程序就是在控制台输出一段内容 , 是docker的一些基本介绍
|
||||
|
||||
> image文件生成的容器实例, 本身也是一个文件
|
||||
默认情况下即使容器停止运行 , 这个文件也还是在的 , 不会被删除
|
||||
可以使用`docker container ls -all`来查看所有容器文件
|
||||
使用`docker container rm [ContainerId]`来删除指定的容器文件
|
||||
|
||||
### 尝试制作自己的image并运行
|
||||
这里用一个简单的nodejs项目作为例子 , 尝试制作一个自己的image
|
||||
```bash
|
||||
mkdir express-demo
|
||||
cd express-demo
|
||||
npm init
|
||||
npm install express --save
|
||||
```
|
||||
index.js
|
||||
```javascript
|
||||
const express = require("express")
|
||||
|
||||
var port = 7001
|
||||
const app = express()
|
||||
|
||||
app.get("/", function(req, res){
|
||||
res.send("<h1>Hello World</h1>");
|
||||
})
|
||||
|
||||
const server = app.listen(port, function(){
|
||||
var port = server.address().port;
|
||||
console.log("在%s端口执行监听", port)
|
||||
})
|
||||
```
|
||||
|
||||
#### 编写Dockerfile
|
||||
在此之前 , 我们也可以在项目目录里面加一个`.dockerignore`
|
||||
这个文件表示打包image的时候需要排除在外的内容( 很类似.gitignore )
|
||||
比如
|
||||
```
|
||||
.git
|
||||
node_modules
|
||||
```
|
||||
创建Dockerfile文件
|
||||
```
|
||||
FROM node:9.11
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
EXPOSE 7001
|
||||
```
|
||||
+ `FORM node:9.11` 继承自官方的node镜像 , 冒号后面是标签(通常是版本号)
|
||||
+ `COPY . /app` 将当前目录下的所有文件(除了.dockerignore排除的)都拷贝到image文件的app目录下
|
||||
+ `WORKDIR /app` 工作路径为/app
|
||||
+ `RUN npm install` 在打包image的时候需要执行的 ( 所以这个nodejs项目的依赖包会被打包进image当中 )
|
||||
+ `EXPOSE 7001` 运行时暴露出的端口号
|
||||
|
||||
#### 打包与运行
|
||||
打包image
|
||||
```bash
|
||||
docker image build -t express-demo:1.0 .
|
||||
# -t参数是指定该image的名字 , 冒号后面是标签(默认是latest)
|
||||
# . 表示打包当前目录下的文件
|
||||
```
|
||||
运行
|
||||
```
|
||||
docker container run --rm -p 8000:7001 -it express-demo:1.0 /bin/bash
|
||||
```
|
||||
+ `--rm` 容器停止运行时自动删除容器文件
|
||||
+ `-p` 表示端口映射 , 这里是将容器的7001端口映射到本地的8000端口
|
||||
+ `-it` 容器的 Shell 映射到当前的 Shell,然后你在本机窗口输入的命令,就会传入容器
|
||||
+ **express-demo:1.0** image的名称和标签(当然直接用image的id也可以)
|
||||
+ **/bin/bash** 容器启动后第一个执行的命令 , 这里启动bash , 保证可以使用shell
|
||||
|
||||
执行之后会进入到命令提示符`root@2604657cb46c:/app#`
|
||||
在这里我们就可以执行**node index.js**来运行程序了
|
||||
|
||||
运行之后在外部当然是要通过8000端口来访问
|
||||
|
||||
#### 自动化运行
|
||||
上面的方式在启动容器之后还要手动运行程序 , 还是显得有些繁琐了
|
||||
我们可以在Dockerfile里面加一个CMD的选项
|
||||
```
|
||||
FROM node:9.11
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
EXPOSE 7001
|
||||
CMD node index.js
|
||||
```
|
||||
区别于RUN , CMD是在容器启动的时候执行的 , 而RUN是在打包image的时候执行的
|
||||
|
||||
> 当然 , 有了这个入口 , 就可以自由发挥了
|
||||
比如程序启动比较繁琐 , 完全可以在image里面编写一个shell脚本
|
||||
然后容器启动的时候运行这个脚本即可
|
||||
|
||||
|
||||
#### 其他常用命令
|
||||
查看指定容器的输出 , 即容器里面Shell的标准输出
|
||||
```bash
|
||||
docker container logs [ContainerId]
|
||||
```
|
||||
|
||||
进入一个正在运行的容器
|
||||
```bash
|
||||
docker container exec -it [ContainerID] /bin/bash
|
||||
```
|
||||
之后就可以在容器的shell当中执行命令了
|
||||
|
||||
有时候我们需要把容器当中运行产生的文件拷贝出来
|
||||
可以使用
|
||||
```
|
||||
docker container cp [ContainerId]:[/app/run.log] /home/sookie
|
||||
```
|
||||
上面的命令表示将指定容器的/app/run.log文件拷贝到本地的/home/sookie目录下
|
||||
|
||||
#### 使用国内镜像仓库
|
||||
出于众所周知的原因 , 官方仓库的速度比较慢
|
||||
所以可以把官方镜像的下载地址改为国内的镜像仓库
|
||||
|
||||
|
||||
Docker 官方中国区
|
||||
https://registry.docker-cn.com
|
||||
网易
|
||||
http://hub-mirror.c.163.com
|
||||
ustc
|
||||
https://docker.mirrors.ustc.edu.cn
|
||||
|
||||
##### 方法1 registry-mirror参数
|
||||
直接设置 –registry-mirror 参数,仅对当前的命令有效
|
||||
```bash
|
||||
docker run hello-world --registry-mirror=https://docker.mirrors.ustc.edu.cn
|
||||
```
|
||||
|
||||
##### 方法2 修改/etc/default/docker
|
||||
加入 DOCKER_OPTS=”镜像地址”,可以有多个
|
||||
```
|
||||
DOCKER_OPTS="--registry-mirror=https://docker.mirrors.ustc.edu.cn"
|
||||
```
|
||||
|
||||
##### 方法3 修改/etc/docker/daemon.json
|
||||
```json
|
||||
{
|
||||
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
|
||||
}
|
||||
```
|
||||
> 新版的docker比较推荐方法3
|
||||
42
source/_posts/linux/3.2 Docker(2)-使用技巧.md
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: 3.2 Docler(2)-使用技巧
|
||||
date: 2018-5-9 22:38:32
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
|
||||
### 与宿主机共享网络
|
||||
默认情况下 , 在宿主机可以根据容器暴露出的端口来访问容器中启动的服务
|
||||
但是由于容器的隔离 , 在容器内部是无法访问宿主机的服务的
|
||||
如果有这种需要 , 可以在启动容器的时候添加参数`--net=host`
|
||||
|
||||
作用就是使容器和宿主机共用网络
|
||||
<!-- more -->
|
||||
### 镜像的备份与恢复
|
||||
docker的一个重要目标就是方便实现迁移
|
||||
对于一个镜像 , 也可以打包出来作为备份 , 或者迁移到其他机器上
|
||||
|
||||
对于镜像的导出与导入操作 , 使用的是`save`和`load`
|
||||
```bash
|
||||
# 备份
|
||||
docker save -o dump.tar [ImageId]
|
||||
|
||||
# 恢复
|
||||
docker load < dump.tar
|
||||
```
|
||||
> 继承的镜像也会一同打包进去
|
||||
再次导入之后 , 该镜像就不再作为一个子镜像存在了
|
||||
比如该镜像继承jre镜像 , 那么打包之后的tar包当中直接包含jre镜像的内容
|
||||
|
||||
### 容器的导出与导入
|
||||
要将一个容器进行导出与导入 , 使用的是`export`和`import`
|
||||
```bash
|
||||
# 导出容器
|
||||
docker export [ContainerId] > demo.tar
|
||||
|
||||
# 导入容器
|
||||
docker import demo.tar [ImageName][:Tag]
|
||||
```
|
||||
127
source/_posts/linux/3.3 Docker(3)-WordPress部署实践.md
Normal file
@ -0,0 +1,127 @@
|
||||
---
|
||||
title: 3.3 Docker(3)-部署wordpress实践
|
||||
date: 2018-5-10 22:38:32
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
categories:
|
||||
- linux
|
||||
---
|
||||
站在 Docker 的角度,软件就是容器的组合:业务逻辑容器、数据库容器、储存容器、队列容器......Docker 使得软件可以拆分成若干个标准化容器,然后像搭积木一样组合起来。
|
||||
|
||||
这正是微服务(microservices)的思想:软件把任务外包出去,让各种外部服务完成这些任务,软件本身只是底层服务的调度中心和组装层。
|
||||
<!-- more -->
|
||||

|
||||
|
||||
微服务很适合用 Docker 容器实现,每个容器承载一个服务。一台计算机同时运行多个容器,从而就能很轻松地模拟出复杂的微服务架构。
|
||||
|
||||

|
||||
|
||||
|
||||
现在尝试实践搭建一个wordpress的服务
|
||||
这是一个php编写的博客系统
|
||||
|
||||
运行需要依赖的环境有 : mysql php apache
|
||||
当然也包括php的扩展包mysqli , 用于实现mysql数据库的连接
|
||||
|
||||
### 自建wordpress容器
|
||||
|
||||
#### 尝试启动一个php-apache容器
|
||||
创建应用目录 php-demo , 然后进入该目录执行
|
||||
```bash
|
||||
docker container run \
|
||||
-d \
|
||||
--rm \
|
||||
--name wordpress \
|
||||
--volume "$PWD/":/var/www/html \
|
||||
php:7.2-apache
|
||||
```
|
||||
> linux当中 , 命令末尾的`\`代表换行继续输入命令 , 而不立即执行
|
||||
|
||||
+ `-d` : 容器在后台运行 , 输出内容不会打印到终端(可以用docker logs [ContainerId]查看)
|
||||
+ `--rm` : 容器运行停止后 , 自动删除容器文件
|
||||
+ `--name` : 指定容器的名字
|
||||
+ `--volume` : 指定目录映射 , 这里表示把当前目录映射到容器内的/var/www/html目录
|
||||
这个目录是apache服务器对外访问的默认目录
|
||||
这样我们就可以直接在当前目录中添加php页面文件进行访问
|
||||
|
||||
成功从远程仓库下载**php:7.2-apache**镜像并启动容器之后
|
||||
会提示容器对外访问的IP地址 , 比如**172.17.0.2** , 可以直接访问这个地址
|
||||
|
||||
但是此时还没有在访问目录中添加php页面
|
||||
可以写个测试页面index.php
|
||||
```php
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
```
|
||||
此时再访问就可以看到php信息了
|
||||
|
||||
#### 安装wordpress
|
||||
删掉index.php
|
||||
官网下载wordpress安装包 , 直接解压到该目录下
|
||||
然后访问就可以看到wordpress的初始化页面了
|
||||

|
||||
但是目前还没有mysql的容器
|
||||
|
||||
#### 运行mysql容器
|
||||
```bash
|
||||
docker container run \
|
||||
-d \
|
||||
--rm \
|
||||
--name wordpressdb \
|
||||
--env MYSQL_ROOT_PASSWORD=123456 \
|
||||
--env MYSQL_DATABASE=wordpress \
|
||||
mysql:5.7
|
||||
```
|
||||
`env`代表向容器中传入的环境变量 , 容器中的mysql会根据环境变量创建数据库以及设置root用户的密码
|
||||
|
||||
#### 添加mysqli扩展
|
||||
PHP 的官方 image 不带有 mysqli 扩展,必须自己新建一个image
|
||||
|
||||
新建`Dockerfile`文件
|
||||
```
|
||||
FROM php:7.2-apache
|
||||
RUN docker-php-ext-install mysqli
|
||||
CMD apache2-foreground
|
||||
```
|
||||
打包镜像时安装mysqli的扩展 , 运行容器时启动apache
|
||||
之后构建image
|
||||
```bash
|
||||
docker build -t php-with-mysql .
|
||||
```
|
||||
|
||||
#### 运行php-with-mysql
|
||||
```bash
|
||||
docker container run \
|
||||
-d \
|
||||
--rm \
|
||||
--volume "$PWD/":/var/www/html \
|
||||
--link wordpressdb:mysqlhost \
|
||||
php-with-mysql
|
||||
```
|
||||
link是实现容器之间通信的一种机制 , 表示该容器要链接到**wordpressdb**容器 , 冒号表示该容器主机的名称是**mysqlhost**
|
||||
(之后配置数据库连接时 , 主机名称不是localhost , 而是**mysqlhost**)
|
||||
|
||||
由于wordpress在运行时需要写入配置文件( 也包括自身版本的更新 )
|
||||
我们可以给当前目录添加写权限
|
||||
```bash
|
||||
chmod -R 777 ./
|
||||
```
|
||||
|
||||
之后再访问172.17.0.2 , 填写数据库配置信息即可完成
|
||||
|
||||
### 使用wordpress官方镜像
|
||||
首先仍然是要启动mysql的容器 , 参考上面的**运行mysql容器**
|
||||
然后使用wordpress的官方镜像构建容器
|
||||
```bash
|
||||
docker container run \
|
||||
-d \
|
||||
--rm \
|
||||
--name wordpress \
|
||||
--env WORDPRESS_DB_PASSWORD=123456 \
|
||||
--link wordpressdb:mysqlhost \
|
||||
wordpress
|
||||
```
|
||||
环境变量`WORDPRESS_DB_PASSWORD`是 MySQL 容器的根密码
|
||||
运行之后的访问和初始化操作和前一种方式相同
|
||||
1
source/about/index.md
Normal file
@ -0,0 +1 @@
|
||||
个人介绍页面
|
||||
BIN
source/images/linux/20180505231057.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
source/images/linux/20180505231120.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
source/images/linux/wordpress_init.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
source/images/linux/查看所有镜像.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
1
themes/hexo-theme-xups/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
148
themes/hexo-theme-xups/README.md
Normal file
@ -0,0 +1,148 @@
|
||||
# Xups 主题安装及 Hexo 使用教程
|
||||

|
||||
|
||||
## 主题的一些特性
|
||||
|
||||
1. 扁平。思路源于大前端 WordPress 主题。
|
||||
2. 自带博客评论系统。博客主题自带评论系统,基于 github issues 实现,了解更多请点击[基于 github issues实现的评论框](http://jelon.top/posts/xups-comment-box/)。
|
||||
|
||||
## 使用指引
|
||||
|
||||
1. 安装hexo
|
||||
|
||||
```
|
||||
npm i hexo-cli -g
|
||||
hexo init blog
|
||||
cd blog
|
||||
npm install
|
||||
```
|
||||
|
||||
2. 将主题拉到本地,并解压
|
||||
|
||||
```
|
||||
cd themes
|
||||
git clone https://github.com/jangdelong/hexo-theme-xups.git
|
||||
```
|
||||
|
||||
3. 配置 _config.yml 的 theme 配置
|
||||
|
||||
```
|
||||
theme: hexo-theme-xups
|
||||
```
|
||||
|
||||
4. 运行 `hexo s --watch`
|
||||
|
||||
```
|
||||
cd ..
|
||||
hexo generate # 或者 hexo g
|
||||
hexo s --watch
|
||||
```
|
||||
|
||||
运行上述命令后,浏览器打开 [http://localhost:4000](http://localhost:4000) 即可本地访问我们的网站
|
||||
|
||||
## 创建文章
|
||||
|
||||
有两种方法创建文章,可任选其一:
|
||||
|
||||
> 注意:文件名不要出现中文!!!
|
||||
|
||||
1. 使用`hexo new` 命令
|
||||
|
||||
``` bash
|
||||
$ hexo new "My New Post"
|
||||
```
|
||||
|
||||
2. 拷贝现有的文章进行修改
|
||||
|
||||
hexo使用markdown来编辑文章,在source目录下,拷贝任意md文件进行创建新的文章。具体可参考下hexo的官方说明
|
||||
|
||||
## 文章规范
|
||||
|
||||
1. 使用markdown写博文
|
||||
2. 建议图片进行单独 cdn 存储
|
||||
3. 标准配图
|
||||
- xups主题现默认有0-9共10张博客配图
|
||||
- 博客封面配图:200x140,命名:xxx_thumbnail
|
||||
4. 指明文章的标题、作者信息、封面图片地址、博客摘要
|
||||
|
||||
```
|
||||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
author:
|
||||
tags:
|
||||
categories:
|
||||
- Web技术
|
||||
- 生活琐事
|
||||
thumbnail:
|
||||
blogexcerpt:
|
||||
|
||||
---
|
||||
|
||||
```
|
||||
> 另外, 如果您需保留原主题的关于页(about)、留言页面(comment)、实验室页(lab)的话, 请将 __source/ 目录下的 about/、comment/、lab/ 三个目录及里面的页面放到您的 Hexo 程序的 source 目录下(注意不是theme主题下的目录);将 __scaffolds 目录下的 draft.md、page.md、post.md 放到 Hexo 程序的 scaffolds 目录(注意不是theme主题下的目录)。
|
||||
|
||||
|
||||
5. 利用`<!-- more --> `或者`post.blogexcerpt`设置文章的摘要
|
||||
|
||||
示例:
|
||||
|
||||
```
|
||||
|
||||
---
|
||||
title: 文章标题
|
||||
blogexcerpt: 这里是自定义文章摘要
|
||||
...
|
||||
---
|
||||
|
||||
这里是文章正文内容
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
这部分是文章摘要,这部分是文章摘要。在hexo模版里可通过 `<%- post.blogexcerpt || post.excerpt || post.content %>` 来引用。
|
||||
- post.blogexcerpt:自定义摘要
|
||||
- post.excerpt:通过`<!-- more -->`分隔符来获取的文章摘要
|
||||
- post.content:如不设置摘要情况,则直接输出文章全部内容
|
||||
|
||||
## 评论系统
|
||||
|
||||
1. 创建 Github Application
|
||||
2. 创建仓库
|
||||
3. 主题 _config.yml 配置
|
||||
|
||||
```python
|
||||
#----------------------------
|
||||
# 是否开启评论
|
||||
#----------------------------
|
||||
comment:
|
||||
enable: false # 是否开启配置
|
||||
owner: jangdelong # 你的 github 账户名
|
||||
repo: blog_comments # github repository
|
||||
client_id: xxxxxxxxxx # github application client id
|
||||
client_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # github application secret
|
||||
```
|
||||
4. 评论框使用
|
||||
|
||||
```html
|
||||
<div id="comments" class="comment">
|
||||
</div>
|
||||
<script>
|
||||
JELON.Comment({
|
||||
container: 'comments', // 评论框容器id或对象,留空是默认为 comments
|
||||
label: '<%- post.slug %>' || '<%- post.path %>', // 文章标签
|
||||
owner: '<%- theme.comment.owner %>', // GitHub application 创建者
|
||||
repo: '<%- theme.comment.repo %>', // issue 所在仓库名
|
||||
clientId: '<%- theme.comment.client_id %>', // GitHub application client_id
|
||||
clientSecret: '<%- theme.comment.client_secret %>' // GitHub application client_secret
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
## 其他
|
||||
|
||||
- [Jelon前端小站](http://jelon.top)
|
||||
|
||||
## LICENCE
|
||||
|
||||
The MIT License (MIT)
|
||||
10
themes/hexo-theme-xups/__scaffolds/draft.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
author:
|
||||
tags:
|
||||
categories:
|
||||
- Web技术
|
||||
- 生活琐事
|
||||
thumbnail:
|
||||
blogexcerpt:
|
||||
---
|
||||
4
themes/hexo-theme-xups/__scaffolds/page.md
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
---
|
||||
10
themes/hexo-theme-xups/__scaffolds/post.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
author:
|
||||
tags:
|
||||
categories:
|
||||
- Web技术
|
||||
- 生活琐事
|
||||
thumbnail:
|
||||
blogexcerpt:
|
||||
---
|
||||
5
themes/hexo-theme-xups/__source/about/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 关于
|
||||
date: 2016-01-31 22:10:28
|
||||
pageid: about
|
||||
---
|
||||
5
themes/hexo-theme-xups/__source/comment/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 留言
|
||||
date: 2016-02-01 20:29:57
|
||||
pageid: comment
|
||||
---
|
||||
28
themes/hexo-theme-xups/__source/lab/index.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: 实验室
|
||||
date: 2016-02-01 20:29:57
|
||||
pageid: lab
|
||||
|
||||
projects:
|
||||
blog_demo:
|
||||
title: Blog Demo
|
||||
time: 2016-10-10
|
||||
content:
|
||||
1:
|
||||
name: 基于 vue + vuex + bootstrap 的 blog demo
|
||||
link: https://github.com/jangdelong/vue-blog-demo
|
||||
hexo_theme_xups:
|
||||
title: hexo-theme-xups 博客主题
|
||||
time: 2016-03-12
|
||||
content:
|
||||
1:
|
||||
name: 基于 hexo 静态博客系统的 博客主题 xups
|
||||
link: https://github.com/jangdelong/hexo-theme-xups
|
||||
typecho_theme_xups:
|
||||
title: Typecho 博客主题
|
||||
time: 2015-10-15
|
||||
content:
|
||||
1:
|
||||
name: 基于 php 博客系统 typecho 的主题 xups
|
||||
link: https://github.com/jangdelong/typecho-theme-xups
|
||||
---
|
||||
137
themes/hexo-theme-xups/_config.yml
Normal file
@ -0,0 +1,137 @@
|
||||
#############################
|
||||
# Xups for Hexo 主题配置文件
|
||||
# Jelon
|
||||
# http://jelon.top
|
||||
#############################
|
||||
|
||||
#----------------------------
|
||||
# 头部导航
|
||||
#----------------------------
|
||||
menu:
|
||||
home:
|
||||
name: 首页
|
||||
link: /
|
||||
icon: icon-home
|
||||
lab:
|
||||
name: 实验室
|
||||
link: /lab/
|
||||
icon: icon-lab
|
||||
about:
|
||||
name: 关于
|
||||
link: /about/
|
||||
icon: icon-about
|
||||
comment:
|
||||
name: 留言
|
||||
link: /comment/
|
||||
icon: icon-comment
|
||||
|
||||
#----------------------------
|
||||
# 副导航
|
||||
#----------------------------
|
||||
subnav:
|
||||
github: "#"
|
||||
weibo: "#"
|
||||
rss: "#"
|
||||
zhihu: "#"
|
||||
|
||||
#----------------------------
|
||||
# RSS
|
||||
#----------------------------
|
||||
rss: /atom.xml
|
||||
|
||||
#----------------------------
|
||||
# Favicon
|
||||
#----------------------------
|
||||
favicon: /favicon.ico
|
||||
|
||||
#----------------------------
|
||||
# 头像url
|
||||
#----------------------------
|
||||
avatar: https://i.loli.net/2018/05/04/5aeb37415a0dc.jpg
|
||||
|
||||
#----------------------------
|
||||
# 是否开启分享
|
||||
#----------------------------
|
||||
share: true
|
||||
|
||||
#----------------------------
|
||||
# 侧栏是否显示微博秀
|
||||
#----------------------------
|
||||
weibo_show:
|
||||
enable: false
|
||||
code: <iframe id="myWeibo" width="100%" height="550" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=0&skin=1&isTitle=0&noborder=0&isWeibo=1&isFans=0&uid=2376003112&verifier=796ea597&dpc=1"></iframe>
|
||||
|
||||
#----------------------------
|
||||
# 是否开启评论
|
||||
#----------------------------
|
||||
comment:
|
||||
enable: true
|
||||
owner: jangdelong
|
||||
repo: blog_comments
|
||||
client_id: b08ed25e52c57993e69c
|
||||
client_secret: 1cb9545488f0380904b87350e7c5a270ae03bab7
|
||||
|
||||
#----------------------------
|
||||
# 是否开启云标签
|
||||
#----------------------------
|
||||
tagcloud: true
|
||||
|
||||
#----------------------------
|
||||
# 友情链接
|
||||
#----------------------------
|
||||
friends:
|
||||
enable: true
|
||||
list:
|
||||
1:
|
||||
name: Haoren博客
|
||||
title: 网络安全博客
|
||||
link: http://blog.sina.com.cn/u/1825875765
|
||||
2:
|
||||
name: Maxwell博客
|
||||
title: 技术博客
|
||||
link: http://blog.csdn.net/yeweiouyang
|
||||
|
||||
#----------------------------
|
||||
# 头部链接
|
||||
#----------------------------
|
||||
head_links:
|
||||
enable: true
|
||||
list:
|
||||
sup:
|
||||
0:
|
||||
name: Github
|
||||
link: https://github.com/sookie2010
|
||||
last:
|
||||
name: Hosted by Coding Pages
|
||||
link: https://pages.coding.me
|
||||
sub:
|
||||
sinaweibo:
|
||||
name: 新浪微博
|
||||
link: https://weibo.com/2633013641
|
||||
qqweibo:
|
||||
name: Facebook
|
||||
link: https://www.facebook.com/profile.php?id=100016469831631
|
||||
#----------------------------
|
||||
# SEO
|
||||
#----------------------------
|
||||
SEO:
|
||||
keywords: 前端, Web, Java
|
||||
description: Jelon个人前端小站
|
||||
|
||||
#----------------------------
|
||||
# 百度分析
|
||||
#----------------------------
|
||||
baidu_analytics: true
|
||||
|
||||
#----------------------------
|
||||
# 高亮样式
|
||||
#----------------------------
|
||||
highlight_theme: normal
|
||||
#----------------------------
|
||||
# CDN
|
||||
# 如: //7xs305.com1.z0.glb.clouddn.com/
|
||||
# 主要以下两个目录进行 cdn 存储
|
||||
# - img 图片资源下的 thumbnail 目录
|
||||
# - css 样式资源下的 fonts 目录
|
||||
#----------------------------
|
||||
CDN:
|
||||
57
themes/hexo-theme-xups/layout/_custom/about.ejs
Normal file
@ -0,0 +1,57 @@
|
||||
<!-- 自定义关于页 -->
|
||||
|
||||
<p style="color: #444;">
|
||||
<span class="icon-cogs"></span>
|
||||
关于我
|
||||
</p>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
<li>
|
||||
<span class="icon-profile"></span>
|
||||
查看<a href="javascript: alert('更新中...');" target="_blank">个人介绍</a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon-office"></span>
|
||||
2014年7月,毕业于中南民族大学
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon-newspaper"></span>
|
||||
现工作于深圳,任职前端开发
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon-envelop"></span>
|
||||
联系邮箱 jangdelong#qq.com('#'改为'@')
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p style="color: #444;">
|
||||
<span class="icon-cogs"></span>
|
||||
关于博客
|
||||
</p>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
<li>
|
||||
<span class="icon-files-empty"></span>
|
||||
博客采用<a href="https://hexo.io/">Hexo</a>静态博客系统、主题为个人开发主题<a href="https://github.com/jangdelong/hexo-theme-xups" target="_blank">Xups</a> (<a href="https://hexo.io/themes/" target="_blank">Hexo 官网</a>已收录)
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon-files-empty"></span>
|
||||
博客内容主要是学习工作过程中的一些Web总结和日志琐事,除非特殊声明,博客内容皆为个人原创,转载烦请标注文章来源
|
||||
</li>
|
||||
<li>
|
||||
<span class="icon-files-empty"></span>
|
||||
为了提升博客的访问速度,博客的字体文件以及绝大部分图片采用了某 CDN 存储,代码托管采用 <a target="_blank" href="https://coding.net/">Coding</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p style="color: #444;">
|
||||
<span class="icon-cogs"></span>
|
||||
Github账号
|
||||
</p>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
<li>
|
||||
<span class="icon-github"></span>
|
||||
<a href="https://github.com/jangdelong" target="_blank">我的Github</a>
|
||||
</li>
|
||||
</ul>
|
||||
12
themes/hexo-theme-xups/layout/_custom/comment.ejs
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- 自定义留言页 -->
|
||||
|
||||
<p class="text-center">
|
||||
<img style="width: 258px; height: 258px; border: 1px solid #eee; padding: 0; border-radius: 3px;" src="<%- url_for('img/wechat_pay.png') %>">
|
||||
</p>
|
||||
|
||||
<p class="text-center">
|
||||
如果觉得博客对您有用,欢迎微信赞赏
|
||||
</p>
|
||||
<% if (theme.comment.enable) { %>
|
||||
<%- partial('../_partial/post/comment') %>
|
||||
<% } %>
|
||||
27
themes/hexo-theme-xups/layout/_custom/lab.ejs
Normal file
@ -0,0 +1,27 @@
|
||||
<!-- 自定义实验室页 -->
|
||||
|
||||
<section>
|
||||
<img title="图片摄于2017年1月1日深圳梧桐山 By iPhone 7。" src="<%- url_for('/img/lab/banner.jpg?v=3') %>" alt="Lab Banner" style="max-width: 100%;" alt="Banner" >
|
||||
</section>
|
||||
<%
|
||||
var projects = page.projects;
|
||||
for (var i in projects) {
|
||||
%>
|
||||
<p style="color: #444;">
|
||||
<!--
|
||||
<span class="icon-cogs"></span>
|
||||
-->
|
||||
<span class="icon-price-tags"></span>
|
||||
<%- date(projects[i].time, 'YYYY-MM-DD') %> <%- projects[i].title %>
|
||||
</p>
|
||||
|
||||
<ul style="list-style-type: none;">
|
||||
<% var content = projects[i].content; %>
|
||||
<% for (var j in content) { %>
|
||||
<li>
|
||||
<a href="<%- content[j].link %>" target="_blank" class="icon-lab fr" title="查看代码" style="color: #ff5e52; border-bottom: none; font-size: 16px; margin-top: 2.5px;"></a>
|
||||
<span><%- content[j].name %></span>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<% } %>
|
||||
2
themes/hexo-theme-xups/layout/_partial/after-footer.ejs
Normal file
@ -0,0 +1,2 @@
|
||||
<!-- 这里放网站js脚本 -->
|
||||
<%- js('js/main') %>
|
||||
56
themes/hexo-theme-xups/layout/_partial/archive-post.ejs
Normal file
@ -0,0 +1,56 @@
|
||||
<!-- 文章 -->
|
||||
<article class="post">
|
||||
<header>
|
||||
<!-- 标签这有且只能显示一个 -->
|
||||
<% if (post.categories && post.categories.length) { %>
|
||||
<%-
|
||||
list_categories(post.categories, {
|
||||
show_count: false,
|
||||
class: 'cat',
|
||||
style: 'none',
|
||||
separator: '|'
|
||||
}).split('|')[0]
|
||||
%>
|
||||
<% } else { %>
|
||||
<a href="javascript: void(0);" class="cat">未分类</a>
|
||||
<% } %>
|
||||
<!-- 文章标题 -->
|
||||
<%- partial('post/title', { class_name: 'post-title' }) %>
|
||||
</header>
|
||||
<p class="post-meta">
|
||||
<%- post.author || 'Jelon' %> 发表于
|
||||
<%- partial('post/date', { date_format: 'YYYY-MM-DD' }) %>
|
||||
|
||||
<span class="post-tags">
|
||||
标签:
|
||||
<%- partial('post/tag') %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div class="post-content">
|
||||
<div class="post-excerpt">
|
||||
<% if (index == true) { %>
|
||||
<%- post.blogexcerpt || post.excerpt || post.content %>
|
||||
<% } %>
|
||||
<p class="more">
|
||||
<a href="<%- url_for(post.permalink) %>">阅读全文</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="post-thumbnail" data-img="<%- post.photos[0] %>">
|
||||
<a href="<%= post.permalink %>" title="<%= post.title %>">
|
||||
<% if (post.thumbnail) { %>
|
||||
<!--
|
||||
<%- image_tag(post.thumbnail, { class: "thumbnail" }) %>
|
||||
-->
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%= post.thumbnail %>" alt="<%= post.title %>" >
|
||||
<% } else if (post.photos.length) { %>
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%= url_for(post.photos[0]) %>" alt="<%= post.title %>" >
|
||||
<% } else if (theme.CDN) { %>
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%- url_for(theme.CDN + 'thumbnail/' + date(post.date, 'YYYY-MM-DD').charAt(date(post.date, 'YYYY-MM-DD').length - 1) + '.jpg') %>" alt="默认配图" >
|
||||
<% } else { %>
|
||||
<img class="thumbnail" src="<%- url_for('img/default.png') %>" data-echo="<%- url_for('img/thumbnail/' + date(post.date, 'YYYY-MM-DD').charAt(date(post.date, 'YYYY-MM-DD').length - 1) + '.jpg') %>" alt="默认配图" >
|
||||
<% } %>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
27
themes/hexo-theme-xups/layout/_partial/archive.ejs
Normal file
@ -0,0 +1,27 @@
|
||||
<% if (index == true) { %>
|
||||
<h3 class="widget-hd">
|
||||
<strong>
|
||||
<% if (pagination == 2) { %>
|
||||
最近动态
|
||||
<% } else if (pagination == 3) { %>
|
||||
文章归档
|
||||
<% } else if (pagination == 4) { %>
|
||||
`<%- page.category %>`分类下的文章
|
||||
<% } else if (pagination == 5) { %>
|
||||
`<%- page.tag %>`标签下的文章
|
||||
<% } %>
|
||||
</strong>
|
||||
</h3>
|
||||
<% page.posts.each(function(post) { %>
|
||||
<%- partial('archive-post', { post: post }) %>
|
||||
<% }) %>
|
||||
|
||||
<% if (page.total >= 1){ %>
|
||||
<nav class="page-navigator">
|
||||
<%- paginator({
|
||||
prev_text: '前一页',
|
||||
next_text: '后一页'
|
||||
}) %>
|
||||
</nav>
|
||||
<% } %>
|
||||
<% } %>
|
||||
35
themes/hexo-theme-xups/layout/_partial/article.ejs
Normal file
@ -0,0 +1,35 @@
|
||||
<!-- 文章 -->
|
||||
<article class="post article">
|
||||
<header class="text-center">
|
||||
<h3 class="post-title"><span><%= post.title %></span></h3>
|
||||
</header>
|
||||
<p class="post-meta text-center">
|
||||
<%- post.author || 'Jelon' %> 发表于
|
||||
<%- partial('post/date', { date_format: 'YYYY-MM-DD' }) %>
|
||||
</p>
|
||||
<div class="post-content">
|
||||
<%- post.content %>
|
||||
</div>
|
||||
<p class="post-meta">
|
||||
<span class="post-cat">分类:
|
||||
<%-
|
||||
list_categories(post.categories, {
|
||||
show_count: false,
|
||||
class: 'cat',
|
||||
style: 'none',
|
||||
separator: '|'
|
||||
})
|
||||
%>
|
||||
</span>
|
||||
<span class="post-tags">
|
||||
标签:
|
||||
<%- partial('post/tag') %>
|
||||
</span>
|
||||
</p>
|
||||
</article>
|
||||
<!-- 分享按钮 -->
|
||||
<%- partial('post/share') %>
|
||||
|
||||
<%- partial('post/nav', { post: post }) %>
|
||||
<!-- 文章评论 -->
|
||||
<%- partial('post/comment') %>
|
||||
11
themes/hexo-theme-xups/layout/_partial/baidu-analytics.ejs
Normal file
@ -0,0 +1,11 @@
|
||||
<% if (theme.baidu_analytics) { %>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?fd459238242776d173cdc64918fb32f2";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
11
themes/hexo-theme-xups/layout/_partial/footer.ejs
Normal file
@ -0,0 +1,11 @@
|
||||
<footer class="footer">
|
||||
©
|
||||
<% if (new Date().getFullYear() == 2016) { %>
|
||||
<%- new Date().getFullYear() %>
|
||||
<% } else { %>
|
||||
2016-<%- new Date().getFullYear() %>
|
||||
<% } %>
|
||||
|
||||
<a href="<%- url_for() %>">Power By Hexo</a>
|
||||
</footer>
|
||||
<div class="back-to-top" id="JELON__backToTop" title="返回顶部">返回顶部</div>
|
||||
41
themes/hexo-theme-xups/layout/_partial/head.ejs
Normal file
@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" >
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11,IE=10,IE=9,IE=8" >
|
||||
<meta name="baidu-site-verification" content="dIcXMeY8Ya" />
|
||||
<%
|
||||
var title = page.title;
|
||||
|
||||
if (is_archive()) {
|
||||
title = '文章归档';
|
||||
if (is_month()){
|
||||
title += ': ' + page.year + '/' + page.month;
|
||||
} else if (is_year()) {
|
||||
title += ': ' + page.year;
|
||||
}
|
||||
} else if (is_category()) {
|
||||
title = '`' + page.category + '`分类下的文章';
|
||||
} else if (is_tag()) {
|
||||
title = '`' + page.tag + '`标签下的文章';
|
||||
}
|
||||
%>
|
||||
<title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" >
|
||||
<meta name="keywords" content="<%- theme.SEO.keywords %>" >
|
||||
<meta name="description" content="<%- theme.SEO.description %>" >
|
||||
|
||||
<% if (theme.rss) { %>
|
||||
<link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml" >
|
||||
<% } %>
|
||||
<% if (config.favicon) { %>
|
||||
<link rel="shortcut icon" href="<%- url_for(config.favicon) %>" >
|
||||
<% } else { %>
|
||||
<link rel="shortcut icon" href="<%- url_for(theme.favicon) %>" >
|
||||
<% } %>
|
||||
<%- css('css/style') %>
|
||||
<!--[if lt IE 9]>
|
||||
<%- js('js/html5') %>
|
||||
<![endif]-->
|
||||
<%- partial('baidu-analytics') %>
|
||||
</head>
|
||||
52
themes/hexo-theme-xups/layout/_partial/header.ejs
Normal file
@ -0,0 +1,52 @@
|
||||
<header class="header">
|
||||
<section class="container header-main">
|
||||
<div class="logo">
|
||||
<a href="<%- url_for() %>">
|
||||
<div class="cover">
|
||||
<span class="name"><%= config.title %></span>
|
||||
<span class="description"><%= config.subtitle %></span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="dropnav icon-paragraph-justify" id="JELON__btnDropNav"></div>
|
||||
<ul class="menu hidden" id="JELON__menu">
|
||||
<% for (var i in theme.menu) { %>
|
||||
<li rel="<%= url_for(path) %>" class="item <%= url_for(theme.menu[i].link) == url_for(path).substring(0, url_for(path).lastIndexOf('/') + 1) ? 'current' : '' %>">
|
||||
<a href="<%= url_for(theme.menu[i].link) %>" title="<%= theme.menu[i].name %>" class="<%= theme.menu[i].icon %>"> <%= theme.menu[i].name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<div class="profile clearfix">
|
||||
<div class="feeds fl">
|
||||
<% if (theme.head_links.enable) { %>
|
||||
<%
|
||||
var supList = theme.head_links.list.sup,
|
||||
subList = theme.head_links.list.sub;
|
||||
%>
|
||||
<p class="links">
|
||||
<% for (var i in supList) { %>
|
||||
<a href="<%= supList[i]['link'] %>" target="_blank"><%= supList[i]['name'] %></a>
|
||||
<% if (i != 'last') { %>|<% } %>
|
||||
<% } %>
|
||||
</p>
|
||||
<p class="sns">
|
||||
<% for (var j in subList) { %>
|
||||
<a href="<%= subList[j]['link'] %>" class="<%= j %>" target="_blank"><b>■</b> <%= subList[j]['name'] %></a>
|
||||
<% } %>
|
||||
<a href="javascript: void(0);" class="wechat">
|
||||
<b>■</b>
|
||||
公众号
|
||||
<span class="popover">
|
||||
<img src="<%= url_for('img/wechat_mp.jpg') %>" width="120" height="120" alt="我的微信订阅号">
|
||||
<i class="arrow"></i>
|
||||
</span>
|
||||
</a>
|
||||
</p>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="avatar fr">
|
||||
<img src="<%- theme.avatar %>" alt="avatar" title="Jelon" >
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</header>
|
||||
4
themes/hexo-theme-xups/layout/_partial/post/category.ejs
Normal file
@ -0,0 +1,4 @@
|
||||
<!-- 文档分类 -->
|
||||
<% if (post.categories && post.categories.length) { %>
|
||||
|
||||
<% } %>
|
||||
77
themes/hexo-theme-xups/layout/_partial/post/comment.ejs
Normal file
@ -0,0 +1,77 @@
|
||||
<% if (theme.comment.enable) { %>
|
||||
<%- js('js/comment') %>
|
||||
<div id="comments" class="comment">
|
||||
<!--
|
||||
<div class="sign-bar">
|
||||
GitHub 已登录!
|
||||
<span class="sign-link">登出</span>
|
||||
</div>
|
||||
<section class="box">
|
||||
<div class="com-avatar"><img src="/img/jelon.jpg" alt="avatar"></div>
|
||||
<div class="com-text">
|
||||
<div class="main">
|
||||
<textarea class="text-area-edited show" placeholder="欢迎评论!"></textarea>
|
||||
<div class="text-area-preview"></div>
|
||||
</div>
|
||||
<div class="switch">
|
||||
<div class="switch-item on">编辑</div>
|
||||
<div class="switch-item">预览</div>
|
||||
</div>
|
||||
<div class="button">提交</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tips">注:评论支持 markdown 语法!</section>
|
||||
<section class="list-wrap">
|
||||
<ul class="list">
|
||||
<li>
|
||||
<div class="user-avatar">
|
||||
<a href="/">
|
||||
<img src="/img/jelon.jpg" alt="user-avatar">
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-comment">
|
||||
<div class="user-comment-header">
|
||||
<span class="post-name">张德龙</span>
|
||||
<span class="post-time">2017年12月12日</span>
|
||||
<span class="like liked">已赞</span>
|
||||
<span class="like-num">2</span>
|
||||
</div>
|
||||
<div class="user-comment-body">333333</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="user-avatar">
|
||||
<a href="/">
|
||||
<img src="/img/jelon.jpg" alt="user-avatar">
|
||||
</a>
|
||||
</div>
|
||||
<div class="user-comment">
|
||||
<div class="user-comment-header">
|
||||
<span class="post-name">刘德华</span>
|
||||
<span class="post-time">2017年12月12日</span>
|
||||
<span class="like">点赞</span>
|
||||
<span class="like-num">2</span>
|
||||
</div>
|
||||
<div class="user-comment-body">vvvvv</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="page-nav">
|
||||
<a href="javascript: void(0);" class="item">1</a>
|
||||
<a href="javascript: void(0);" class="item">2</a>
|
||||
<a href="javascript: void(0);" class="item current">3</a>
|
||||
</div>
|
||||
</section>
|
||||
-->
|
||||
</div>
|
||||
<script>
|
||||
JELON.Comment({
|
||||
container: 'comments',
|
||||
label: '<%- post.slug %>' || '<%- post.path %>',
|
||||
owner: '<%- theme.comment.owner %>',
|
||||
repo: '<%- theme.comment.repo %>',
|
||||
clientId: '<%- theme.comment.client_id %>',
|
||||
clientSecret: '<%- theme.comment.client_secret %>'
|
||||
});
|
||||
</script>
|
||||
<% } %>
|
||||
1
themes/hexo-theme-xups/layout/_partial/post/date.ejs
Normal file
@ -0,0 +1 @@
|
||||
<time datetime="<%= date_xml(post.date) %>"><%= date(post.date, date_format) %></time>
|
||||
4
themes/hexo-theme-xups/layout/_partial/post/gallery.ejs
Normal file
@ -0,0 +1,4 @@
|
||||
<% if (post.photos && post.photos.length) { %>
|
||||
<!-- 相册 -->
|
||||
|
||||
<% } %>
|
||||
40
themes/hexo-theme-xups/layout/_partial/post/nav.ejs
Normal file
@ -0,0 +1,40 @@
|
||||
<!-- 上一篇/下一篇 -->
|
||||
<% if (post.prev || post.next) { %>
|
||||
<div class="article-nav clearfix">
|
||||
<% if (post.prev) { %>
|
||||
<span class="prev fl">
|
||||
上一篇<br >
|
||||
<a href="<%- url_for(post.prev.path) %>">
|
||||
<% if (post.prev.title) { %>
|
||||
<%= post.prev.title %>
|
||||
<% } else { %>
|
||||
无标题
|
||||
<% } %>
|
||||
</a>
|
||||
</span>
|
||||
<% } else { %>
|
||||
<span class="prev fl">
|
||||
上一篇<br >
|
||||
<a href="javascript: void(0);">没有上一篇了</a>
|
||||
</span>
|
||||
<% } %>
|
||||
|
||||
<% if (post.next) { %>
|
||||
<span class="next fr">
|
||||
下一篇<br >
|
||||
<a href="<%- url_for(post.next.path) %>">
|
||||
<% if (post.next.title) { %>
|
||||
<%= post.next.title %>
|
||||
<% } else { %>
|
||||
无标题
|
||||
<% } %>
|
||||
</a>
|
||||
</span>
|
||||
<% } else { %>
|
||||
<span class="next fr">
|
||||
下一篇<br >
|
||||
<a href="javascript: void(0);">没有下一篇了</a>
|
||||
</span>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
12
themes/hexo-theme-xups/layout/_partial/post/share.ejs
Normal file
@ -0,0 +1,12 @@
|
||||
<% if (theme.share) { %>
|
||||
<div class="article-share clearfix text-center">
|
||||
<div class="share-area">
|
||||
<span class="share-txt">分享到:</span>
|
||||
<a href="javascript: window.open('http://service.weibo.com/share/share.php?url=' + encodeURIComponent(location.href) + '&title=' + document.title + '&language=zh_cn');" class="share-icon weibo"></a>
|
||||
<a href="javascript: alert('请复制链接到微信并发送');" class="share-icon wechat"></a>
|
||||
<a href="javascript: window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + encodeURIComponent(location.href) + '&title=' + document.title);" class="share-icon qqzone"></a>
|
||||
<a href="javascript: window.open('http://connect.qq.com/widget/shareqq/index.html?url=' + encodeURIComponent(location.href) + '&desc=Jelon个人博客&title=' + document.title + '&callback=' + encodeURIComponent(location.href));" class="share-icon qq"></a>
|
||||
<a href="javascript: window.open('http://shuo.douban.com/!service/share?href=' + encodeURIComponent(location.href) + '&name=' + document.title + '&text=' + document.title);" class="share-icon douban"></a>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
5
themes/hexo-theme-xups/layout/_partial/post/tag.ejs
Normal file
@ -0,0 +1,5 @@
|
||||
<% if (post.tags && post.tags.length) { %>
|
||||
<% post.tags.forEach(function(tag, i) { %>
|
||||
<%- link_to(tag.path, tag.name) %><% if (i != post.tags.length - 1) { %> / <% } %>
|
||||
<% }); %>
|
||||
<% } %>
|
||||
13
themes/hexo-theme-xups/layout/_partial/post/title.ejs
Normal file
@ -0,0 +1,13 @@
|
||||
<% if (post.link) { %>
|
||||
<h3 class="<%= class_name || 'post-title' %>">
|
||||
<a href="<%= url_for(post.link) %>">
|
||||
<%= post.title || post.link %>
|
||||
</a>
|
||||
</h3>
|
||||
<% } else if (post.title) { %>
|
||||
<h3 class="<%= class_name || 'post-title' %>">
|
||||
<a href="<%= url_for(post.permalink) %>">
|
||||
<%= post.title %>
|
||||
</a>
|
||||
</h3>
|
||||
<% } %>
|
||||
31
themes/hexo-theme-xups/layout/_partial/sidebar.ejs
Normal file
@ -0,0 +1,31 @@
|
||||
<!-- 侧栏部分 -->
|
||||
<aside class="sidebar">
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>文章分类</strong></h3>
|
||||
<%- partial('_widget/categorys') %>
|
||||
</section>
|
||||
|
||||
<% if (theme.tagcloud) { %>
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>热门标签</strong></h3>
|
||||
<%- partial('_widget/tags') %>
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.weibo_show.enable) { %>
|
||||
<!-- 我的微博 -->
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>我的微博</strong></h3>
|
||||
<%- partial('_widget/weibo') %>
|
||||
</section>
|
||||
<% } %>
|
||||
|
||||
<% if (theme.friends.enable && theme.friends['list']) { %>
|
||||
<!-- 友情链接 -->
|
||||
<section class="widget">
|
||||
<h3 class="widget-hd"><strong>友情链接</strong></h3>
|
||||
<%- partial('_widget/friend_links') %>
|
||||
</section>
|
||||
<% } %>
|
||||
</aside>
|
||||
<!-- / 侧栏部分 -->
|
||||
9
themes/hexo-theme-xups/layout/_widget/categorys.ejs
Normal file
@ -0,0 +1,9 @@
|
||||
<!-- 文章分类 -->
|
||||
<ul class="widget-bd">
|
||||
<% site.categories.forEach(function(cat){ %>
|
||||
<li>
|
||||
<a href="<%= url_for(cat.path) %>"><%= cat.name %></a>
|
||||
<span class="badge">(<%= cat.length %>)</span>
|
||||
</li>
|
||||
<% }); %>
|
||||
</ul>
|
||||
11
themes/hexo-theme-xups/layout/_widget/friend_links.ejs
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- 文章分类 -->
|
||||
<ul class="widget-bd">
|
||||
<%
|
||||
var list = theme.friends['list'];
|
||||
for (var i in list) {
|
||||
%>
|
||||
<li>
|
||||
<a href="<%= list[i].link %>" target="_blank" title="<%= list[i].title %>"><%= list[i].name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
</ul>
|
||||
12
themes/hexo-theme-xups/layout/_widget/tags.ejs
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- 文章标签 -->
|
||||
<div class="widget-bd tag-wrap">
|
||||
<%
|
||||
site.tags.forEach(function (tag, index) {
|
||||
if (index < 39) {
|
||||
%>
|
||||
<a class="tag-item" href="<%= url_for(tag.path) %>" title="<%= tag.name %>"><%- tag.name %> (<%- tag.length %>)</a>
|
||||
<%
|
||||
}
|
||||
});
|
||||
%>
|
||||
</div>
|
||||
29
themes/hexo-theme-xups/layout/_widget/weibo.ejs
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="widget-bd" style="position: relative;">
|
||||
<div id="myWeiboLoading" class="text-center" style="position:absolute;top:0;left:0;right:0;bottom:0;line-height:50px;font-size:12px;background-color:#fff;z-index:9;">微博加载中...</div>
|
||||
<%- theme.weibo_show.code %>
|
||||
<script>
|
||||
(function () {
|
||||
var oMyWeibo = document.getElementById('myWeibo');
|
||||
var oMyWeiboLoading = document.getElementById('myWeiboLoading');
|
||||
var isIE = /msie/i.test(navigator.userAgent) && !window.opera;
|
||||
var timer = null;
|
||||
if (isIE) {
|
||||
oMyWeibo.onreadystatechange = function(){
|
||||
if(oMyWeibo.readyState === 'loaded' || oMyWeibo.readyState === 'complete'){
|
||||
timer = setTimeout(function () {
|
||||
oMyWeiboLoading.parentNode.removeChild(oMyWeiboLoading);
|
||||
timer = null;
|
||||
}, 300);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
oMyWeibo.onload = function () {
|
||||
timer = setTimeout(function () {
|
||||
oMyWeiboLoading.parentNode.removeChild(oMyWeiboLoading);
|
||||
timer = null;
|
||||
}, 300);
|
||||
};
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
2
themes/hexo-theme-xups/layout/archive.ejs
Normal file
@ -0,0 +1,2 @@
|
||||
<!-- 文章归档 -->
|
||||
<%- partial('_partial/archive', { pagination: 3, index: true }) %>
|
||||
2
themes/hexo-theme-xups/layout/category.ejs
Normal file
@ -0,0 +1,2 @@
|
||||
<!-- 文章分类 -->
|
||||
<%- partial('_partial/archive', { pagination: 4, index: true }) %>
|
||||
6
themes/hexo-theme-xups/layout/index.ejs
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- 首页 -->
|
||||
<% if (page.content) { %>
|
||||
<%- page.content %>
|
||||
<% } else { %>
|
||||
<%- partial('_partial/archive', { pagination: 2, index: true }) %>
|
||||
<% } %>
|
||||
29
themes/hexo-theme-xups/layout/layout.ejs
Normal file
@ -0,0 +1,29 @@
|
||||
<%- partial('_partial/head') %>
|
||||
<body class="home">
|
||||
<!--[if lt IE 9]>
|
||||
<div class="browsehappy">
|
||||
当前网页 <strong>不支持</strong>
|
||||
你正在使用的浏览器. 为了正常的访问, 请 <a href="http://browsehappy.com/">升级你的浏览器</a>.
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
<!-- 博客头部 -->
|
||||
<%- partial('_partial/header') %>
|
||||
|
||||
<!-- 博客正文 -->
|
||||
<div class="container body clearfix">
|
||||
<section class="content">
|
||||
<div class="content-main widget">
|
||||
<%- body %>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<%- partial('_partial/sidebar') %>
|
||||
</div>
|
||||
|
||||
<!-- 博客底部 -->
|
||||
<%- partial('_partial/footer') %>
|
||||
<!--博客js脚本 -->
|
||||
<%- partial('_partial/after-footer') %>
|
||||
</body>
|
||||
</html>
|
||||
17
themes/hexo-theme-xups/layout/page.ejs
Normal file
@ -0,0 +1,17 @@
|
||||
<!-- 独立页面 -->
|
||||
<article class="post article">
|
||||
<header class="text-center">
|
||||
<h4 class="post-title"><a href="javascript: void(0);"><%- page.title %></a></h4>
|
||||
</header>
|
||||
<div class="post-content">
|
||||
<% if (page.pageid && page.pageid == 'about') { %>
|
||||
<%- partial('_custom/about', { page: page, post: page }) %>
|
||||
<% } else if (page.pageid && page.pageid == 'lab') { %>
|
||||
<%- partial('_custom/lab', { page: page, post: page }) %>
|
||||
<% } else if (page.pageid && page.pageid == 'comment') { %>
|
||||
<%- partial('_custom/comment', { page: page, post: page }) %>
|
||||
<% } else { %>
|
||||
<%- page.content %>
|
||||
<% } %>
|
||||
</div>
|
||||
</article>
|
||||
2
themes/hexo-theme-xups/layout/post.ejs
Normal file
@ -0,0 +1,2 @@
|
||||
<!-- 文章页 -->
|
||||
<%- partial('_partial/article', { index: false, post: page }) %>
|
||||
2
themes/hexo-theme-xups/layout/tag.ejs
Normal file
@ -0,0 +1,2 @@
|
||||
<!-- 按标签分类 -->
|
||||
<%- partial('_partial/archive', { pagination: 5, index: true }) %>
|
||||
1
themes/hexo-theme-xups/layout/tags.ejs
Normal file
@ -0,0 +1 @@
|
||||
<!-- 文章按标签归档 -->
|
||||
77
themes/hexo-theme-xups/source/css/_base/font.styl
Normal file
@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* 网站字体及icon
|
||||
* $CDN = hexo-config("CDN") || '//7xs305.com1.z0.glb.clouddn.com/'
|
||||
*/
|
||||
$CDN = hexo-config("CDN") || './fonts/'
|
||||
|
||||
@font-face
|
||||
font-family "HomizioNova"
|
||||
src url($CDN + 'homizio-nova/light.ttf'),url($CDN + 'homizio-nova/light.otf')
|
||||
font-weight normal
|
||||
font-style normal
|
||||
@font-face
|
||||
font-family "HomizioNova"
|
||||
src url($CDN + 'homizio-nova/light_italic.ttf'),url($CDN + 'homizio-nova/light_italic.otf')
|
||||
font-weight normal
|
||||
font-style italic
|
||||
@font-face
|
||||
font-family "HomizioNova"
|
||||
src url($CDN + 'homizio-nova/regular.ttf'),url($CDN + 'homizio-nova/regular.otf')
|
||||
font-weight bold
|
||||
font-style normal
|
||||
@font-face
|
||||
font-family "HomizioNova"
|
||||
src url($CDN + 'homizio-nova/italic.ttf'),url($CDN + 'homizio-nova/italic.otf')
|
||||
font-weight bold
|
||||
font-style italic
|
||||
@font-face
|
||||
font-family 'icomoon'
|
||||
src url($CDN + 'icomoon/icomoon.eot?e2xg5y'), url('./fonts/icomoon/icomoon.eot?e2xg5y')
|
||||
src url($CDN + 'icomoon/icomoon.eot?#iefixe2xg5y') format('embedded-opentype'),
|
||||
url($CDN + 'icomoon/icomoon.woff?e2xg5y') format('woff'),
|
||||
url($CDN + 'icomoon/icomoon.ttf?e2xg5y') format('truetype'),
|
||||
url($CDN + 'icomoon/icomoon.svg?e2xg5y#icomoon') format('svg'),
|
||||
url('./fonts/icomoon/icomoon.eot?#iefixe2xg5y') format('embedded-opentype'),
|
||||
url('./fonts/icomoon/icomoon.woff?e2xg5y') format('woff'),
|
||||
url('./fonts/icomoon/icomoon.ttf?e2xg5y') format('truetype'),
|
||||
url('./fonts/icomoon/icomoon.svg?e2xg5y#icomoon') format('svg')
|
||||
font-weight normal
|
||||
font-style normal
|
||||
[class^="icon-"],[class*=" icon-"]
|
||||
font-family 'icomoon'
|
||||
speak none
|
||||
font-style normal
|
||||
font-weight normal
|
||||
font-variant normal
|
||||
text-transform none
|
||||
line-height 1
|
||||
-webkit-font-smoothing antialiased
|
||||
-moz-osx-font-smoothing grayscale
|
||||
.icon-home:before
|
||||
content "\e900"
|
||||
.icon-office:before
|
||||
content "\e903"
|
||||
.icon-newspaper:before
|
||||
content "\e904"
|
||||
.icon-profile:before
|
||||
content "\e923"
|
||||
.icon-files-empty:before
|
||||
content "\e925"
|
||||
.icon-price-tags:before
|
||||
content "\e936"
|
||||
.icon-envelop:before
|
||||
content "\e945"
|
||||
.icon-bubble:before
|
||||
content "\e96b"
|
||||
.icon-comment:before
|
||||
content "\e96d"
|
||||
.icon-about:before
|
||||
content "\e976"
|
||||
.icon-cogs:before
|
||||
content "\e995"
|
||||
.icon-paragraph-justify:before
|
||||
content "\ea7a"
|
||||
.icon-lab:before
|
||||
content "\ea80"
|
||||
.icon-github:before
|
||||
content "\eab1"
|
||||
51
themes/hexo-theme-xups/source/css/_base/global.styl
Normal file
@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* 全局样式
|
||||
*/
|
||||
.container
|
||||
max-width 1180px
|
||||
_width 1180px
|
||||
background-color c-fff
|
||||
margin 0 auto 10px
|
||||
text-left()
|
||||
.home
|
||||
//margin-top 78px
|
||||
background-color c-eee
|
||||
.btn
|
||||
background-color #ff5e52
|
||||
border 0
|
||||
color c-fff
|
||||
opacity .8
|
||||
box-sizing border-box
|
||||
&:hover
|
||||
opacity .75
|
||||
.btn-ok
|
||||
background-color #ff5e52
|
||||
.btn-cancel
|
||||
background-color #51cc87
|
||||
.form-control
|
||||
box-sizing border-box
|
||||
|
||||
.browsehappy
|
||||
padding 8px 0
|
||||
background #fbe3e4
|
||||
color #8a1f11
|
||||
text-align center
|
||||
.loading-mask
|
||||
position fixed
|
||||
top 0
|
||||
right 0
|
||||
left 0
|
||||
bottom 0
|
||||
display block
|
||||
width 100%
|
||||
height 100%
|
||||
background-color rgb(255, 255, 255)
|
||||
opacity .8
|
||||
.loading-icon
|
||||
position relative
|
||||
top 50%
|
||||
left 50%
|
||||
width 50px
|
||||
height 50px
|
||||
margin-top -25px
|
||||
margin-left -25px
|
||||
157
themes/hexo-theme-xups/source/css/_base/normalize.styl
vendored
Normal file
@ -0,0 +1,157 @@
|
||||
html
|
||||
font-family sans-serif
|
||||
-ms-text-size-adjust 100%
|
||||
-webkit-text-size-adjust 100%
|
||||
body
|
||||
margin: 0
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary
|
||||
display block
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video
|
||||
display inline-block
|
||||
vertical-align baseline
|
||||
|
||||
audio:not([controls])
|
||||
display none
|
||||
height 0
|
||||
[hidden],
|
||||
template
|
||||
display none
|
||||
a
|
||||
background-color transparent
|
||||
|
||||
a:active,
|
||||
a:hover
|
||||
outline: 0
|
||||
abbr[title]
|
||||
border-bottom 1px dotted
|
||||
|
||||
b,
|
||||
strong
|
||||
font-weight bold
|
||||
dfn
|
||||
font-style italic
|
||||
h1
|
||||
font-size 2em
|
||||
margin 0.67em 0
|
||||
|
||||
mark
|
||||
background #ff0
|
||||
color #000
|
||||
small
|
||||
font-size 80%
|
||||
sub,
|
||||
sup
|
||||
font-size 75%
|
||||
line-height 0
|
||||
position relative
|
||||
vertical-align baseline
|
||||
sup
|
||||
top -0.5em
|
||||
sub
|
||||
bottom -0.25em
|
||||
img
|
||||
border 0
|
||||
svg:not(:root)
|
||||
overflow hidden
|
||||
|
||||
figure
|
||||
margin 1em 40px
|
||||
|
||||
hr
|
||||
-moz-box-sizing content-box
|
||||
box-sizing content-box
|
||||
height 0
|
||||
pre
|
||||
overflow auto
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp
|
||||
font-family monospace, monospace
|
||||
font-size 1em
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea
|
||||
color inherit /* 1 */
|
||||
font inherit /* 2 */
|
||||
margin 0 /* 3 */
|
||||
|
||||
button
|
||||
overflow visible
|
||||
|
||||
button,
|
||||
select
|
||||
text-transform none
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"]
|
||||
-webkit-appearance button /* 2 */
|
||||
cursor pointer /* 3 */
|
||||
|
||||
button[disabled],
|
||||
html input[disabled]
|
||||
cursor default
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner
|
||||
border 0
|
||||
padding 0
|
||||
input
|
||||
line-height normal
|
||||
input[type="checkbox"],
|
||||
input[type="radio"]
|
||||
box-sizing border-box /* 1 */
|
||||
padding 0 /* 2 */
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button
|
||||
height auto
|
||||
|
||||
input[type="search"]
|
||||
-webkit-appearance textfield /* 1 */
|
||||
-moz-box-sizing content-box
|
||||
-webkit-box-sizing content-box /* 2 */
|
||||
box-sizing content-box
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration
|
||||
-webkit-appearance none
|
||||
|
||||
fieldset
|
||||
border 1px solid #c0c0c0
|
||||
margin 0 2px
|
||||
padding 0.35em 0.625em 0.75em
|
||||
legend
|
||||
border 0
|
||||
padding 0
|
||||
textarea
|
||||
overflow auto
|
||||
|
||||
optgroup
|
||||
font-weight: bold
|
||||
|
||||
table
|
||||
border-collapse collapse
|
||||
border-spacing 0
|
||||
td,
|
||||
th
|
||||
padding 0
|
||||
48
themes/hexo-theme-xups/source/css/_base/reset.styl
Normal file
@ -0,0 +1,48 @@
|
||||
/*!
|
||||
* Reset css
|
||||
*/
|
||||
::selection
|
||||
color c-fff
|
||||
background-color #f99
|
||||
opacity .8
|
||||
::-webkit-scrollbar
|
||||
width 7px
|
||||
height 4px
|
||||
::-webkit-scrollbar-thumb
|
||||
border-radius 4px
|
||||
background rgba(0, 0, 0, .15)
|
||||
::-webkit-scrollbar-track
|
||||
background rgba(0, 0, 0, .06)
|
||||
body
|
||||
font 14px/1.5 "Microsoft Yahei", "微软雅黑", Arial, "宋体"
|
||||
color c-666
|
||||
-webkit-overflow-scrolling touch // iOS下支持弹性滚动
|
||||
-webkit-font-smoothing antialiased // 优化字体渲染、让页面字体更精更清楚
|
||||
-webkit-text-size-adjust 100%
|
||||
-ms-text-size-adjust 100%
|
||||
text-rendering optimizelegibility
|
||||
a
|
||||
color c-666
|
||||
text-decoration none
|
||||
&:link,
|
||||
&:visited,
|
||||
&:active
|
||||
color c-666
|
||||
&:hover
|
||||
color #ff5e52
|
||||
hr
|
||||
border-top 1px solid c-eee
|
||||
.fl
|
||||
float left
|
||||
.fr
|
||||
float right
|
||||
.text-center
|
||||
text-center()
|
||||
.clearfix
|
||||
zoom 1
|
||||
&:after
|
||||
display block
|
||||
width 100%
|
||||
height 0
|
||||
content " "
|
||||
clear both
|
||||
65
themes/hexo-theme-xups/source/css/_extend.styl
Normal file
@ -0,0 +1,65 @@
|
||||
$base-style
|
||||
h1
|
||||
font-size: 2em
|
||||
h2
|
||||
font-size: 1.6em
|
||||
h3
|
||||
font-size: 1.4em
|
||||
h4
|
||||
font-size: 1.2em
|
||||
h5
|
||||
font-size: 1em
|
||||
h6
|
||||
font-size: 1em
|
||||
color: #999
|
||||
hr
|
||||
border: 1px dashed #ddd
|
||||
strong
|
||||
font-weight: bold
|
||||
em, cite
|
||||
font-style: italic
|
||||
sup, sub
|
||||
font-size: 0.75em
|
||||
line-height: 0
|
||||
position: relative
|
||||
vertical-align: baseline
|
||||
sup
|
||||
top: -0.5em
|
||||
sub
|
||||
bottom: -0.2em
|
||||
small
|
||||
font-size: 0.85em
|
||||
acronym, abbr
|
||||
border-bottom: 1px dotted
|
||||
ul, ol, dl
|
||||
margin: 0 20px
|
||||
padding: 0
|
||||
line-height: line-height
|
||||
ul, ol
|
||||
ul, ol
|
||||
margin-top: 0
|
||||
margin-bottom: 0
|
||||
ul
|
||||
list-style: disc
|
||||
ol
|
||||
list-style: decimal
|
||||
dt
|
||||
font-weight: bold
|
||||
table
|
||||
display: table;
|
||||
font-size: 12px;
|
||||
background-color: transparent;
|
||||
border: 1px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
word-wrap: break-word;
|
||||
th, td
|
||||
border-bottom: solid 1px #ddd;
|
||||
border-right: solid 1px #ddd;
|
||||
padding: 5px 10px;
|
||||
thead tr
|
||||
background-color: #f6f6f6;
|
||||
blockquote
|
||||
margin 1em 0
|
||||
padding 5px 10px
|
||||
color #666
|
||||
border-left 2px solid #eee
|
||||
699
themes/hexo-theme-xups/source/css/_markdown.styl
Normal file
@ -0,0 +1,699 @@
|
||||
@font-face {
|
||||
font-family: octicons-link;
|
||||
src: url("data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==") format('woff');
|
||||
}
|
||||
$markdown-style
|
||||
.markdown-body
|
||||
-ms-text-size-adjust 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
line-height: 1.5;
|
||||
color: #24292e;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word;
|
||||
|
||||
.markdown-body .pl-c {
|
||||
color: #6a737d;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c1,
|
||||
.markdown-body .pl-s .pl-v {
|
||||
color: #005cc5;
|
||||
}
|
||||
|
||||
.markdown-body .pl-e,
|
||||
.markdown-body .pl-en {
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.markdown-body .pl-smi,
|
||||
.markdown-body .pl-s .pl-s1 {
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ent {
|
||||
color: #22863a;
|
||||
}
|
||||
|
||||
.markdown-body .pl-k {
|
||||
color: #d73a49;
|
||||
}
|
||||
|
||||
.markdown-body .pl-s,
|
||||
.markdown-body .pl-pds,
|
||||
.markdown-body .pl-s .pl-pse .pl-s1,
|
||||
.markdown-body .pl-sr,
|
||||
.markdown-body .pl-sr .pl-cce,
|
||||
.markdown-body .pl-sr .pl-sre,
|
||||
.markdown-body .pl-sr .pl-sra {
|
||||
color: #032f62;
|
||||
}
|
||||
|
||||
.markdown-body .pl-v,
|
||||
.markdown-body .pl-smw {
|
||||
color: #e36209;
|
||||
}
|
||||
|
||||
.markdown-body .pl-bu {
|
||||
color: #b31d28;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ii {
|
||||
color: #fafbfc;
|
||||
background-color: #b31d28;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c2 {
|
||||
color: #fafbfc;
|
||||
background-color: #d73a49;
|
||||
}
|
||||
|
||||
.markdown-body .pl-c2::before {
|
||||
content: "^M";
|
||||
}
|
||||
|
||||
.markdown-body .pl-sr .pl-cce {
|
||||
font-weight: bold;
|
||||
color: #22863a;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ml {
|
||||
color: #735c0f;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mh,
|
||||
.markdown-body .pl-mh .pl-en,
|
||||
.markdown-body .pl-ms {
|
||||
font-weight: bold;
|
||||
color: #005cc5;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi {
|
||||
font-style: italic;
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mb {
|
||||
font-weight: bold;
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.markdown-body .pl-md {
|
||||
color: #b31d28;
|
||||
background-color: #ffeef0;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi1 {
|
||||
color: #22863a;
|
||||
background-color: #f0fff4;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mc {
|
||||
color: #e36209;
|
||||
background-color: #ffebda;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mi2 {
|
||||
color: #f6f8fa;
|
||||
background-color: #005cc5;
|
||||
}
|
||||
|
||||
.markdown-body .pl-mdr {
|
||||
font-weight: bold;
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.markdown-body .pl-ba {
|
||||
color: #586069;
|
||||
}
|
||||
|
||||
.markdown-body .pl-sg {
|
||||
color: #959da5;
|
||||
}
|
||||
|
||||
.markdown-body .pl-corl {
|
||||
text-decoration: underline;
|
||||
color: #032f62;
|
||||
}
|
||||
|
||||
.markdown-body .octicon {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.markdown-body a {
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
.markdown-body a:active,
|
||||
.markdown-body a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
.markdown-body img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.markdown-body svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.markdown-body code,
|
||||
.markdown-body kbd,
|
||||
.markdown-body pre {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.markdown-body [type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.markdown-body input {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.markdown-body a {
|
||||
color: #0366d6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.markdown-body strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
height: 0;
|
||||
margin: 15px 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-body hr::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body hr::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.markdown-body td,
|
||||
.markdown-body th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h4 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h5 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body h6 {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.markdown-body blockquote {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.markdown-body ul,
|
||||
.markdown-body ol {
|
||||
padding-left: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body ol ol,
|
||||
.markdown-body ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
.markdown-body ul ul ol,
|
||||
.markdown-body ul ol ol,
|
||||
.markdown-body ol ul ol,
|
||||
.markdown-body ol ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
.markdown-body dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.markdown-body code {
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.markdown-body pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font: 12px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
}
|
||||
|
||||
.markdown-body .octicon {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.markdown-body .pl-0 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-1 {
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-2 {
|
||||
padding-left: 8px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-3 {
|
||||
padding-left: 16px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-4 {
|
||||
padding-left: 24px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-5 {
|
||||
padding-left: 32px !important;
|
||||
}
|
||||
|
||||
.markdown-body .pl-6 {
|
||||
padding-left: 40px !important;
|
||||
}
|
||||
|
||||
.markdown-body::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.markdown-body>*:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body>*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.markdown-body a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body .anchor {
|
||||
float: left;
|
||||
padding-right: 4px;
|
||||
margin-left: -20px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.markdown-body .anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.markdown-body p,
|
||||
.markdown-body blockquote,
|
||||
.markdown-body ul,
|
||||
.markdown-body ol,
|
||||
.markdown-body dl,
|
||||
.markdown-body table,
|
||||
.markdown-body pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
height: 0.25em;
|
||||
padding: 0;
|
||||
margin: 24px 0;
|
||||
background-color: #e1e4e8;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.markdown-body blockquote {
|
||||
padding: 0 1em;
|
||||
color: #6a737d;
|
||||
border-left: 0.25em solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-body blockquote>:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.markdown-body blockquote>:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font-size: 11px;
|
||||
line-height: 10px;
|
||||
color: #444d56;
|
||||
vertical-align: middle;
|
||||
background-color: #fafbfc;
|
||||
border: solid 1px #c6cbd1;
|
||||
border-bottom-color: #959da5;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #959da5;
|
||||
}
|
||||
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.markdown-body h1 .octicon-link,
|
||||
.markdown-body h2 .octicon-link,
|
||||
.markdown-body h3 .octicon-link,
|
||||
.markdown-body h4 .octicon-link,
|
||||
.markdown-body h5 .octicon-link,
|
||||
.markdown-body h6 .octicon-link {
|
||||
color: #1b1f23;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.markdown-body h1:hover .anchor,
|
||||
.markdown-body h2:hover .anchor,
|
||||
.markdown-body h3:hover .anchor,
|
||||
.markdown-body h4:hover .anchor,
|
||||
.markdown-body h5:hover .anchor,
|
||||
.markdown-body h6:hover .anchor {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.markdown-body h1:hover .anchor .octicon-link,
|
||||
.markdown-body h2:hover .anchor .octicon-link,
|
||||
.markdown-body h3:hover .anchor .octicon-link,
|
||||
.markdown-body h4:hover .anchor .octicon-link,
|
||||
.markdown-body h5:hover .anchor .octicon-link,
|
||||
.markdown-body h6:hover .anchor .octicon-link {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.markdown-body h1 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.markdown-body h2 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 1.5em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.markdown-body h3 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.markdown-body h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.markdown-body h5 {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
.markdown-body h6 {
|
||||
font-size: 0.85em;
|
||||
color: #6a737d;
|
||||
}
|
||||
|
||||
.markdown-body ul,
|
||||
.markdown-body ol {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.markdown-body ul ul,
|
||||
.markdown-body ul ol,
|
||||
.markdown-body ol ol,
|
||||
.markdown-body ol ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.markdown-body li>p {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.markdown-body li+li {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
.markdown-body dl {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-body dl dt {
|
||||
padding: 0;
|
||||
margin-top: 16px;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body dl dd {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-body table {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.markdown-body table th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.markdown-body table th,
|
||||
.markdown-body table td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-body table tr {
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #c6cbd1;
|
||||
}
|
||||
|
||||
.markdown-body table tr:nth-child(2n) {
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
.markdown-body img {
|
||||
max-width: 100%;
|
||||
box-sizing: content-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.markdown-body code {
|
||||
padding: 0;
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
background-color: rgba(27,31,35,0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown-body code::before,
|
||||
.markdown-body code::after {
|
||||
letter-spacing: -0.2em;
|
||||
content: "\00a0";
|
||||
}
|
||||
|
||||
.markdown-body pre {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
.markdown-body pre>code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 100%;
|
||||
word-break: normal;
|
||||
white-space: pre;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.markdown-body .highlight {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-body .highlight pre {
|
||||
margin-bottom: 0;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.markdown-body .highlight pre,
|
||||
.markdown-body pre {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
font-size: 85%;
|
||||
line-height: 1.45;
|
||||
background-color: #f6f8fa;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.markdown-body pre code {
|
||||
display: inline;
|
||||
max-width: auto;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
line-height: inherit;
|
||||
word-wrap: normal;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.markdown-body pre code::before,
|
||||
.markdown-body pre code::after {
|
||||
content: normal;
|
||||
}
|
||||
|
||||
.markdown-body .full-commit .btn-outline:not(:disabled):hover {
|
||||
color: #005cc5;
|
||||
border-color: #005cc5;
|
||||
}
|
||||
|
||||
.markdown-body kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
line-height: 10px;
|
||||
color: #444d56;
|
||||
vertical-align: middle;
|
||||
background-color: #fafbfc;
|
||||
border: solid 1px #d1d5da;
|
||||
border-bottom-color: #c6cbd1;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #c6cbd1;
|
||||
}
|
||||
|
||||
.markdown-body :checked+.radio-label {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
border-color: #0366d6;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item+.task-list-item {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item input {
|
||||
margin: 0 0.2em 0.25em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.markdown-body hr {
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
75
themes/hexo-theme-xups/source/css/_partial/article.styl
Normal file
@ -0,0 +1,75 @@
|
||||
/*!
|
||||
* Article
|
||||
*/
|
||||
.article-nav
|
||||
padding-bottom 10px
|
||||
color #888
|
||||
.article-share
|
||||
padding 0 0 15px
|
||||
.share-area
|
||||
height 24px
|
||||
line-height 24px
|
||||
margin 0 auto
|
||||
padding-left 10px
|
||||
text-align left
|
||||
border-left 3px solid rgba(255, 153, 153, .8)
|
||||
.share-txt
|
||||
float left
|
||||
height 24px
|
||||
line-height 24px
|
||||
margin-right 5px
|
||||
font-size 12px
|
||||
color c-999
|
||||
.share-icon
|
||||
float left
|
||||
display inline-block
|
||||
width 24px
|
||||
height 24px
|
||||
margin-right 10px
|
||||
background url(../img/share.png) no-repeat 0 0
|
||||
opacity .9
|
||||
&:hover
|
||||
opacity .7
|
||||
&.weibo
|
||||
background-position 0 0
|
||||
&.wechat
|
||||
background-position 0 -32px
|
||||
&.qqzone
|
||||
background-position 0 -65px
|
||||
&.qq
|
||||
background-position 0 -98px
|
||||
&.douban
|
||||
background-position 0 -324px
|
||||
.body
|
||||
box-shadow 0 1px 5px rgba(0, 0, 0, .08)
|
||||
.article
|
||||
padding-top 0 !important
|
||||
padding-bottom 10px
|
||||
border-bottom 0
|
||||
.comments
|
||||
margin-top 20px
|
||||
.page-navigator
|
||||
margin 1em 0
|
||||
padding 0 20px
|
||||
list-style none
|
||||
.extend
|
||||
.page-number
|
||||
display inline-block
|
||||
margin-right 10px
|
||||
padding 3px 10px
|
||||
background-color c-eee
|
||||
opacity .8
|
||||
&.current
|
||||
color c-fff
|
||||
background-color #ff5e52
|
||||
cursor not-allowed
|
||||
.extend
|
||||
a.page-number
|
||||
transition .5s linear
|
||||
&:hover
|
||||
color c-444
|
||||
background-color c-ccc
|
||||
.space
|
||||
display inline-block
|
||||
margin-right 10px
|
||||
padding 3px 0
|
||||
203
themes/hexo-theme-xups/source/css/_partial/comment.styl
Normal file
@ -0,0 +1,203 @@
|
||||
.comment
|
||||
margin-top 10px
|
||||
box-sizing border-box
|
||||
.box
|
||||
position relative
|
||||
width 100%
|
||||
.com-avatar
|
||||
position absolute
|
||||
top 2px
|
||||
left 0
|
||||
width 40px
|
||||
height 40px
|
||||
img
|
||||
width 100%
|
||||
height 100%
|
||||
border none
|
||||
border-radius 50%
|
||||
.com-text
|
||||
position relative
|
||||
margin-left 45px
|
||||
height 120px
|
||||
border 2px solid c-eee
|
||||
box-sizing border-box
|
||||
border-radius 2px
|
||||
.switch
|
||||
position absolute
|
||||
right -2px
|
||||
top -2px
|
||||
width 81px
|
||||
height 10px
|
||||
line-height 10px
|
||||
padding 5px 0
|
||||
.switch-item
|
||||
float left
|
||||
width 40px
|
||||
height @height
|
||||
color c-999
|
||||
text-center()
|
||||
font-size 10px
|
||||
cursor pointer
|
||||
opacity .8
|
||||
:first-child
|
||||
border-right 1px solid c-ccc
|
||||
.on
|
||||
color #ff5e52
|
||||
.main
|
||||
margin 0
|
||||
padding 0
|
||||
.text-area-edited
|
||||
display none
|
||||
width 100%
|
||||
height 116px
|
||||
padding 10px
|
||||
border none
|
||||
box-sizing border-box
|
||||
outline none
|
||||
resize none
|
||||
.text-area-preview
|
||||
display none
|
||||
width 100%
|
||||
height 116px
|
||||
padding 10px
|
||||
border none
|
||||
box-sizing border-box
|
||||
overflow auto
|
||||
@extend $base-style
|
||||
p
|
||||
margin 0
|
||||
.show
|
||||
display block
|
||||
.button
|
||||
position absolute
|
||||
bottom -2px
|
||||
right -2px
|
||||
width 100px
|
||||
height 30px
|
||||
line-height @height
|
||||
border-radius 0 0 2px 0
|
||||
color c-fff
|
||||
background-color #ff5e52
|
||||
text-align center
|
||||
opacity .8
|
||||
cursor pointer
|
||||
.button:hover
|
||||
opacity .7
|
||||
.sign-bar
|
||||
height 30px
|
||||
line-height @height
|
||||
text-align right
|
||||
font-size 12px
|
||||
.sign-link
|
||||
margin-left 5px
|
||||
color #ff5e52
|
||||
cursor pointer
|
||||
border none
|
||||
.sign-txt
|
||||
color c-999
|
||||
.tips
|
||||
height 30px
|
||||
line-height @height
|
||||
margin-left 45px
|
||||
font-size 12px
|
||||
color c-999
|
||||
.init
|
||||
color c-999
|
||||
float right
|
||||
.list-wrap
|
||||
margin-top 10px
|
||||
.list-header
|
||||
margin 0
|
||||
padding 0 0 0 15px
|
||||
font-size 12px
|
||||
border-left 2px solid c-eee
|
||||
.comments-num
|
||||
color #ff5e52
|
||||
font-size 14px
|
||||
.list
|
||||
list-style-type none
|
||||
margin 0
|
||||
padding 0
|
||||
.item
|
||||
position relative
|
||||
margin 10px 0
|
||||
border-bottom 1px solid c-eee
|
||||
.user-avatar
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
width 40px
|
||||
height 40px
|
||||
img
|
||||
width 100%
|
||||
height 100%
|
||||
border none
|
||||
border-radius 50%
|
||||
a
|
||||
border none
|
||||
.user-comment
|
||||
min-height 50px
|
||||
margin-left 50px
|
||||
.user-comment-body
|
||||
margin 5px 0
|
||||
color c-666
|
||||
word-wrap break-word
|
||||
word-break normal
|
||||
@extend $base-style
|
||||
p
|
||||
margin 0
|
||||
a
|
||||
border none
|
||||
color #ff5e52
|
||||
.user-comment-header
|
||||
color c-aaa
|
||||
position relative
|
||||
span
|
||||
margin-right 5px
|
||||
.post-name
|
||||
font-size 12px
|
||||
.post-time
|
||||
font-size 10px
|
||||
.like
|
||||
font-size 10px
|
||||
color #ff5e52
|
||||
cursor pointer
|
||||
.like.liked
|
||||
color c-aaa
|
||||
.like-num
|
||||
font-size 10px
|
||||
.reply
|
||||
position absolute
|
||||
display none
|
||||
right 0
|
||||
top 3px
|
||||
font-size 10px
|
||||
cursor pointer
|
||||
&:hover
|
||||
.user-comment-header
|
||||
.reply
|
||||
display block
|
||||
.page-nav
|
||||
margin-top 10px
|
||||
text-align right
|
||||
.item
|
||||
display inline-block
|
||||
height 10px
|
||||
line-height @height
|
||||
margin 0 2px
|
||||
padding 8px 10px
|
||||
font-size 10px
|
||||
background-color c-eee
|
||||
opacity .8
|
||||
text-align center
|
||||
border none
|
||||
.item.current
|
||||
color c-fff
|
||||
background-color #ff5e52
|
||||
cursor not-allowed
|
||||
.more
|
||||
height 10px
|
||||
line-height @height
|
||||
padding 8px 5px
|
||||
font-size 10px
|
||||
text-align center
|
||||
31
themes/hexo-theme-xups/source/css/_partial/footer.styl
Normal file
@ -0,0 +1,31 @@
|
||||
/*!
|
||||
* 底部
|
||||
*/
|
||||
.footer
|
||||
padding 30px
|
||||
color c-aaa
|
||||
background-color c-444
|
||||
font-size 12px
|
||||
text-center()
|
||||
opacity .9
|
||||
a
|
||||
color c-aaa
|
||||
.back-to-top {
|
||||
display: none;
|
||||
width: 40px;
|
||||
height: 39px;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
background: #000 url(../img/scrolltoparrow.png) no-repeat center center;
|
||||
position: fixed;
|
||||
_position: absolute;
|
||||
right: 20px;
|
||||
bottom: 50px;
|
||||
cursor: pointer;
|
||||
opacity: .20;
|
||||
filter: Alpha(opacity=20) !important;
|
||||
text-indent: -9999px;
|
||||
overflow: hidden;
|
||||
z-index: 5
|
||||
}
|
||||
160
themes/hexo-theme-xups/source/css/_partial/header.styl
Normal file
@ -0,0 +1,160 @@
|
||||
/*!
|
||||
* 头部样式
|
||||
*/
|
||||
.header
|
||||
width 100%
|
||||
background-color c-fff
|
||||
box-shadow 1px 1px 5px rgba(0, 0, 0, .1)
|
||||
margin-bottom 10px
|
||||
.header-main
|
||||
position relative
|
||||
height 68px
|
||||
margin-bottom 0
|
||||
.header .logo
|
||||
float left
|
||||
width 260px
|
||||
.logo
|
||||
a
|
||||
position relative
|
||||
display block
|
||||
height 68px
|
||||
line-height @height
|
||||
color c-fff
|
||||
background-color #ff5e52
|
||||
opacity .85
|
||||
text-center()
|
||||
overflow hidden
|
||||
.cover
|
||||
position absolute
|
||||
display block
|
||||
top 0
|
||||
left 0
|
||||
width 100%
|
||||
transition top .5s
|
||||
.name
|
||||
display block
|
||||
height 100%
|
||||
font-size 28px
|
||||
font-family "HomizioNova", "Microsoft Yahei"
|
||||
font-style italic
|
||||
.description
|
||||
display block
|
||||
height 100%
|
||||
color c-fff
|
||||
background-color #51cc87
|
||||
opacity .85
|
||||
&:hover .cover
|
||||
top -100%
|
||||
.header .menu
|
||||
margin 0
|
||||
padding 10px
|
||||
float left
|
||||
list-style-type none
|
||||
.menu
|
||||
.item
|
||||
float left
|
||||
padding 0 20px
|
||||
height 48px
|
||||
line-height @height
|
||||
font-size 16px
|
||||
a
|
||||
color c-666
|
||||
&:hover
|
||||
color #ff5e52
|
||||
.current a
|
||||
color #ff5e52
|
||||
.header .profile
|
||||
position absolute
|
||||
right 0
|
||||
top 0
|
||||
height 68px
|
||||
.profile
|
||||
.avatar
|
||||
width 50px
|
||||
height 50px
|
||||
margin 8px 0
|
||||
border 1px solid c-ddd
|
||||
border-radius 3px
|
||||
> img
|
||||
width 46px
|
||||
height 46px
|
||||
margin 2px
|
||||
.feeds
|
||||
height 68px
|
||||
padding 0 10px
|
||||
color c-666
|
||||
font-size 12px
|
||||
text-right()
|
||||
.links
|
||||
margin 5px 0 0
|
||||
padding 10px 0 3px
|
||||
.sns
|
||||
margin 0 0 5px 0
|
||||
padding 2px 0 10px
|
||||
line-height 14px
|
||||
a
|
||||
margin-left 5px
|
||||
.sinaweibo
|
||||
b
|
||||
color #ff5e52
|
||||
font-size 14px
|
||||
&:hover
|
||||
color #ff5e52
|
||||
.qqweibo
|
||||
b
|
||||
color #1faeff
|
||||
font-size 14px
|
||||
&:hover
|
||||
color #1faeff
|
||||
.wechat
|
||||
position relative
|
||||
b
|
||||
color #4bc916
|
||||
font-size 14px
|
||||
.popover
|
||||
position absolute
|
||||
display none
|
||||
top 28px
|
||||
left 50%
|
||||
width 120px
|
||||
height @width
|
||||
margin-left -60px
|
||||
border 1px solid c-ddd
|
||||
background-color c-fff
|
||||
border-radius 5px
|
||||
z-index 9
|
||||
img
|
||||
width 120px
|
||||
height @width
|
||||
border 0
|
||||
border-radius 5px
|
||||
.arrow
|
||||
position absolute
|
||||
display block
|
||||
top -10px
|
||||
left 50%
|
||||
width 0
|
||||
height 0
|
||||
margin-left -10px
|
||||
border-width 10px
|
||||
border-color transparent
|
||||
border-style solid
|
||||
border-top-width 0
|
||||
border-bottom-color c-ddd
|
||||
&:after
|
||||
position absolute
|
||||
content " "
|
||||
top 1px
|
||||
left 50%
|
||||
margin-left -9px
|
||||
border-width 9px
|
||||
border-color transparent
|
||||
border-style solid
|
||||
border-top-width 0
|
||||
border-bottom-color c-fff
|
||||
&:hover
|
||||
color #4bc916
|
||||
.popover
|
||||
display block
|
||||
.dropnav
|
||||
display none
|
||||
140
themes/hexo-theme-xups/source/css/_partial/highlight.styl
Normal file
@ -0,0 +1,140 @@
|
||||
// https://github.com/chriskempson/tomorrow-theme
|
||||
$code-block
|
||||
background: highlight-background
|
||||
margin: 20px 0
|
||||
padding: 15px
|
||||
overflow: auto
|
||||
font-size: $code-font-size
|
||||
color: highlight-foreground
|
||||
line-height: $line-height-code-block
|
||||
|
||||
$line-numbers
|
||||
color: #666
|
||||
|
||||
pre, code
|
||||
font-family: $code-font-family
|
||||
code
|
||||
word-break: break-all
|
||||
background: $gainsboro
|
||||
text-shadow: 0 1px #fff
|
||||
padding: 0 0.3em
|
||||
pre
|
||||
@extend $code-block
|
||||
code
|
||||
background: none
|
||||
text-shadow: none
|
||||
padding: 0
|
||||
.highlight
|
||||
@extend $code-block
|
||||
pre
|
||||
border: none !important
|
||||
margin: 0
|
||||
padding: 1px
|
||||
table
|
||||
margin: 0 !important
|
||||
width: auto !important
|
||||
border: none !important
|
||||
td
|
||||
border: none !important
|
||||
padding: 0 !important
|
||||
figcaption
|
||||
clearfix()
|
||||
font-size: 0.85em
|
||||
color: highlight-comment
|
||||
line-height: 1em
|
||||
margin-bottom: 1em
|
||||
a
|
||||
float: right
|
||||
.gutter pre
|
||||
@extend $line-numbers
|
||||
text-align: right
|
||||
padding-right: 20px
|
||||
.line
|
||||
height: 20px
|
||||
.gist
|
||||
margin: 20px 0
|
||||
border-style: solid
|
||||
border-color: $border-color
|
||||
border-width: 1px 0
|
||||
background: highlight-background
|
||||
padding: 15px $content-desktop-padding 15px 15px
|
||||
.gist-file
|
||||
border: none
|
||||
font-family: $font-family-monospace
|
||||
margin: 0
|
||||
.gist-data
|
||||
background: none
|
||||
border: none
|
||||
.line-numbers
|
||||
@extend $line-numbers
|
||||
background: none
|
||||
border: none
|
||||
padding: 0 20px 0 0
|
||||
.line-data
|
||||
padding: 0 !important
|
||||
.highlight
|
||||
margin: 0
|
||||
padding: 0
|
||||
border: none
|
||||
.gist-meta
|
||||
background: highlight-background
|
||||
color: highlight-comment
|
||||
font: 13px $font-family-base
|
||||
text-shadow: 0 0
|
||||
padding: 0
|
||||
margin-top: 1em
|
||||
margin-left: $content-desktop-padding
|
||||
a
|
||||
color: color-link
|
||||
font-weight: normal
|
||||
&:hover
|
||||
text-decoration: underline
|
||||
|
||||
pre
|
||||
.comment
|
||||
color: highlight-comment
|
||||
.variable
|
||||
.attribute
|
||||
.tag
|
||||
.regexp
|
||||
.ruby .constant
|
||||
.xml .tag .title
|
||||
.xml .pi
|
||||
.xml .doctype
|
||||
.html .doctype
|
||||
.css .id
|
||||
.css .class
|
||||
.css .pseudo
|
||||
color: highlight-red
|
||||
.number
|
||||
.preprocessor
|
||||
.built_in
|
||||
.literal
|
||||
.params
|
||||
.constant
|
||||
color: highlight-orange
|
||||
.ruby .class .title
|
||||
.css .rules .attribute
|
||||
color: highlight-green
|
||||
.string
|
||||
.value
|
||||
.inheritance
|
||||
.header
|
||||
.ruby .symbol
|
||||
.xml .cdata
|
||||
color: highlight-green
|
||||
.title
|
||||
.css .hexcolor
|
||||
color: highlight-aqua
|
||||
.function
|
||||
.python .decorator
|
||||
.python .title
|
||||
.ruby .function .title
|
||||
.ruby .title .keyword
|
||||
.perl .sub
|
||||
.javascript .title
|
||||
.coffeescript .title
|
||||
color: highlight-blue
|
||||
.keyword
|
||||
.javascript .function
|
||||
color: highlight-purple
|
||||
117
themes/hexo-theme-xups/source/css/_partial/post.styl
Normal file
@ -0,0 +1,117 @@
|
||||
/*!
|
||||
* 正文内容
|
||||
*/
|
||||
.content
|
||||
float left
|
||||
width 100%
|
||||
min-height 689px
|
||||
.content-main
|
||||
margin-right 350px
|
||||
padding 20px
|
||||
/*!
|
||||
* Post
|
||||
*/
|
||||
.post
|
||||
padding 25px 0
|
||||
border-bottom 1px solid c-eee
|
||||
overflow hidden
|
||||
header
|
||||
margin 0 0 10px 0
|
||||
> a
|
||||
position relative
|
||||
display inline-block
|
||||
margin-right 6px
|
||||
padding 4px 7px
|
||||
top -3px
|
||||
color c-fff
|
||||
background-color #ff5e52
|
||||
font-size 12px
|
||||
vertical-align baseline
|
||||
opacity .85
|
||||
&:after
|
||||
position absolute
|
||||
display block
|
||||
top 9px
|
||||
right -4px
|
||||
width 0
|
||||
height 0
|
||||
content " "
|
||||
border-left 4px solid #ff5e52
|
||||
border-top 4px solid transparent
|
||||
border-bottom 4px solid transparent
|
||||
.post-title
|
||||
display inline
|
||||
font-size 20px
|
||||
font-weight normal
|
||||
a:hover
|
||||
border-bottom 1px dotted #ff5e52
|
||||
.post-meta
|
||||
color #888
|
||||
font-size 12px
|
||||
.post-views,
|
||||
.post-cat,
|
||||
.post-comments
|
||||
margin-right 15px
|
||||
.post-content
|
||||
position relative
|
||||
color c-666
|
||||
img
|
||||
max-width 100%
|
||||
.post-excerpt
|
||||
position relative
|
||||
min-height 140px
|
||||
margin-right 210px
|
||||
overflow hidden
|
||||
.post-thumbnail
|
||||
position absolute
|
||||
top 0
|
||||
right 0
|
||||
width 200px
|
||||
height 140px
|
||||
overflow hidden
|
||||
.thumbnail
|
||||
width 200px
|
||||
height 140px
|
||||
border 0
|
||||
transition .5s
|
||||
a:after
|
||||
content ""
|
||||
position absolute
|
||||
left -70px
|
||||
top 0
|
||||
width 140px
|
||||
height 140px
|
||||
background-image -moz-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0))
|
||||
background-image -webkit-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0))
|
||||
transform skewx(-25deg)
|
||||
-o-transform skewx(-25deg)
|
||||
-moz-transform skewx(-25deg)
|
||||
-webkit-transform skewx(-25deg)
|
||||
&:hover a:after
|
||||
left 130px
|
||||
-webkit-transition all .3s ease-in-out
|
||||
-moz-transition all .3s ease-in-out
|
||||
-o-transition all .3s ease-in-out
|
||||
transition all .3s ease-in-out
|
||||
@extend $base-style
|
||||
a
|
||||
border-bottom 1px dotted #ff5e52
|
||||
.more a
|
||||
position absolute
|
||||
display inline-block
|
||||
right 0
|
||||
bottom 0
|
||||
padding 3px 7px
|
||||
border none
|
||||
color c-fff
|
||||
background-color #51cc87
|
||||
opacity .8
|
||||
&:hover
|
||||
opacity .75
|
||||
blockquote
|
||||
margin 1em 0
|
||||
padding 5px 10px
|
||||
color c-666
|
||||
border-left 4px solid c-eee
|
||||
p
|
||||
margin 0
|
||||
104
themes/hexo-theme-xups/source/css/_partial/responsive.styl
Normal file
@ -0,0 +1,104 @@
|
||||
/*!
|
||||
* 响应式媒体查询
|
||||
*/
|
||||
@media screen and (min-width: 1440px)
|
||||
.container
|
||||
max-width 1340px
|
||||
.content
|
||||
min-height 500px
|
||||
@media screen and (max-width: 1000px) and (min-width: 960px)
|
||||
.container
|
||||
max-width 952px
|
||||
.content
|
||||
min-height 500px
|
||||
@media screen and (max-width: 959px)
|
||||
.container
|
||||
margin-bottom 10px
|
||||
padding 0 10px
|
||||
.content
|
||||
min-height 500px
|
||||
.sidebar
|
||||
display none
|
||||
.content-main
|
||||
margin-right 0
|
||||
padding 20px 10px
|
||||
.header
|
||||
.header-main
|
||||
height auto
|
||||
padding-bottom 10px
|
||||
.logo
|
||||
float none
|
||||
width auto
|
||||
.profile
|
||||
display none
|
||||
.menu
|
||||
float none
|
||||
padding 8px 10px
|
||||
border 1px solid rgba(0, 0, 0, .1)
|
||||
background-color #fff
|
||||
border-top 0
|
||||
overflow hidden
|
||||
.item
|
||||
width 50%
|
||||
height auto
|
||||
line-height 1
|
||||
padding 8px 0
|
||||
font-size 14px
|
||||
.hidden
|
||||
display none
|
||||
.dropnav
|
||||
position absolute
|
||||
display block
|
||||
top 12px
|
||||
right 20px
|
||||
width 40px
|
||||
height @width
|
||||
padding 0 2px
|
||||
line-height @height
|
||||
font-size @height
|
||||
color #efe0ce
|
||||
border 2px solid @color
|
||||
border-radius 2px
|
||||
z-index 3
|
||||
cursor pointer
|
||||
&:hover
|
||||
opacity .8
|
||||
.post
|
||||
header .post-title
|
||||
font-size 15px
|
||||
.post-meta
|
||||
text-center()
|
||||
.post-content
|
||||
.post-excerpt
|
||||
margin-right 0
|
||||
.post-thumbnail
|
||||
display none
|
||||
.more a
|
||||
position relative
|
||||
display block
|
||||
padding 6px
|
||||
text-center()
|
||||
.page-navigator
|
||||
padding-left 0
|
||||
.page-number
|
||||
.space
|
||||
.extend
|
||||
margin-right 6px
|
||||
.page-navigator li
|
||||
display inline-block
|
||||
margin-right 7px
|
||||
opacity .8
|
||||
|
||||
.page-navigator li a
|
||||
display block
|
||||
padding 2px 8px
|
||||
background-color #eee
|
||||
.comment
|
||||
.list-wrap
|
||||
.list
|
||||
.user-comment
|
||||
.user-comment-header
|
||||
.reply
|
||||
display block
|
||||
.page-nav .more
|
||||
display none
|
||||
22
themes/hexo-theme-xups/source/css/_partial/searchform.styl
Normal file
@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* 搜索框
|
||||
*/
|
||||
.search-form
|
||||
position relative
|
||||
padding 10px 70px 0 0
|
||||
.form-control
|
||||
display block
|
||||
width 100%
|
||||
padding 5px 5px 5px 10px
|
||||
border 2px solid c-ddd
|
||||
border-right 0
|
||||
outline 0
|
||||
box-shadow 2px 2px 4px rgba(0, 0, 0, .07) inset
|
||||
.btn
|
||||
position absolute
|
||||
top 10px
|
||||
right 0
|
||||
width 70px
|
||||
padding 7px 0
|
||||
&:hover
|
||||
opacity .75
|
||||
90
themes/hexo-theme-xups/source/css/_partial/sidebar.styl
Normal file
@ -0,0 +1,90 @@
|
||||
/*!
|
||||
* Sidebar
|
||||
*/
|
||||
.sidebar
|
||||
float left
|
||||
width 330px
|
||||
margin-left -350px
|
||||
padding-top 20px
|
||||
padding-bottom 20px
|
||||
.widget
|
||||
position relative
|
||||
margin-bottom 20px
|
||||
clear both
|
||||
.widget
|
||||
ul
|
||||
margin 0
|
||||
padding 0
|
||||
.widget-hd
|
||||
margin 0
|
||||
padding 0
|
||||
border-bottom 2px solid c-eee
|
||||
strong
|
||||
position relative
|
||||
display inline-block
|
||||
bottom -2px
|
||||
color #444
|
||||
border-bottom 2px solid #ff5e52
|
||||
font-weight normal
|
||||
.logout
|
||||
position relative
|
||||
bottom -2px
|
||||
font-size 14px
|
||||
font-weight normal
|
||||
text-decoration underline
|
||||
&:hover
|
||||
text-decoration none
|
||||
.widget-bd
|
||||
margin 0
|
||||
padding 0
|
||||
list-style none
|
||||
li
|
||||
display block
|
||||
padding 10px 0
|
||||
line-height 1.5
|
||||
border-bottom 1px solid c-eee
|
||||
font-size 12px
|
||||
overflow hidden
|
||||
text-overflow ellipsis
|
||||
white-space nowrap
|
||||
a .avatar
|
||||
float left
|
||||
width 36px
|
||||
height 36px
|
||||
margin-right 10px
|
||||
border-radius 50%
|
||||
transform rotate(0)
|
||||
transition .5s
|
||||
a:hover .avatar
|
||||
transform rotate(360deg)
|
||||
opacity .85
|
||||
p
|
||||
margin 0
|
||||
padding 0
|
||||
.tag-item
|
||||
float left
|
||||
width 32.6666%
|
||||
margin 0 1% 1% 0
|
||||
padding 0 8px
|
||||
line-height 29px
|
||||
font-size 12px
|
||||
color c-999
|
||||
background-color #f6f6f6
|
||||
-webkit-box-sizing border-box
|
||||
box-sizing border-box
|
||||
text-overflow ellipsis
|
||||
overflow hidden
|
||||
white-space nowrap
|
||||
-webkit-transition .5s
|
||||
-ms-transition .5s
|
||||
-moz-transition .5s
|
||||
transition .5s
|
||||
&:hover
|
||||
color #fff
|
||||
background-color #ff5e52
|
||||
opacity .85;
|
||||
.tag-item:nth-child(3n+0)
|
||||
margin-right 0
|
||||
.tag-wrap
|
||||
padding 10px 0 0
|
||||
overflow hidden
|
||||
74
themes/hexo-theme-xups/source/css/_partial/theme.styl
Normal file
@ -0,0 +1,74 @@
|
||||
$theme_config = hexo-config("highlight_theme")
|
||||
/*!
|
||||
* 高亮样式
|
||||
*/
|
||||
|
||||
if $theme_config == "normal"
|
||||
highlight-background = #f7f7f7
|
||||
highlight-current-line = #efefef
|
||||
highlight-selection = #d6d6d6
|
||||
highlight-foreground = #4d4d4c
|
||||
highlight-comment = #8e908c
|
||||
highlight-red = #c82829
|
||||
highlight-orange = #f5871f
|
||||
highlight-yellow = #eab700
|
||||
highlight-green = #718c00
|
||||
highlight-aqua = #3e999f
|
||||
highlight-blue = #4271ae
|
||||
highlight-purple = #8959a8
|
||||
|
||||
if $theme_config == "night"
|
||||
highlight-background = #1d1f21
|
||||
highlight-current-line = #282a2e
|
||||
highlight-selection = #373b41
|
||||
highlight-foreground = #c5c8c6
|
||||
highlight-comment = #969896
|
||||
highlight-red = #cc6666
|
||||
highlight-orange = #de935f
|
||||
highlight-yellow = #f0c674
|
||||
highlight-green = #b5bd68
|
||||
highlight-aqua = #8abeb7
|
||||
highlight-blue = #81a2be
|
||||
highlight-purple = #b294bb
|
||||
|
||||
if $theme_config == "night eighties"
|
||||
highlight-background = #2d2d2d
|
||||
highlight-current-line = #393939
|
||||
highlight-selection = #515151
|
||||
highlight-foreground = #cccccc
|
||||
highlight-comment = #999999
|
||||
highlight-red = #f2777a
|
||||
highlight-orange = #f99157
|
||||
highlight-yellow = #ffcc66
|
||||
highlight-green = #99cc99
|
||||
highlight-aqua = #66cccc
|
||||
highlight-blue = #6699cc
|
||||
highlight-purple = #cc99cc
|
||||
|
||||
if $theme_config == "night blue"
|
||||
highlight-background = #002451
|
||||
highlight-current-line = #00346e
|
||||
highlight-selection = #003f8e
|
||||
highlight-foreground = #ffffff
|
||||
highlight-comment = #7285b7
|
||||
highlight-red = #ff9da4
|
||||
highlight-orange = #ffc58f
|
||||
highlight-yellow = #ffeead
|
||||
highlight-green = #d1f1a9
|
||||
highlight-aqua = #99ffff
|
||||
highlight-blue = #bbdaff
|
||||
highlight-purple = #ebbbff
|
||||
|
||||
if $theme_config == "night bright"
|
||||
highlight-background = #000000
|
||||
highlight-current-line = #2a2a2a
|
||||
highlight-selection = #424242
|
||||
highlight-foreground = #eaeaea
|
||||
highlight-comment = #969896
|
||||
highlight-red = #d54e53
|
||||
highlight-orange = #e78c45
|
||||
highlight-yellow = #e7c547
|
||||
highlight-green = #b9ca4a
|
||||
highlight-aqua = #70c0b1
|
||||
highlight-blue = #7aa6da
|
||||
highlight-purple = #c397d8
|
||||
55
themes/hexo-theme-xups/source/css/_variables.styl
Normal file
@ -0,0 +1,55 @@
|
||||
// 公共变量
|
||||
c-333 = #333
|
||||
c-444 = #444
|
||||
c-555 = #555
|
||||
c-666 = #666
|
||||
c-999 = #999
|
||||
c-aaa = #aaa
|
||||
c-ccc = #ccc
|
||||
c-ddd = #ddd
|
||||
c-eee = #eee
|
||||
c-fff = #fff
|
||||
// 公共函数
|
||||
text-center()
|
||||
text-align center
|
||||
text-left()
|
||||
text-align left
|
||||
text-right()
|
||||
text-align right
|
||||
box-sizing()
|
||||
-ms-box-sizing arguments
|
||||
-moz-box-sizing arguments
|
||||
-webkit-box-sizing arguments
|
||||
-o-box-sizing arguments
|
||||
box-sizing arguments
|
||||
transition()
|
||||
-ms-transition: arguments
|
||||
-moz-transition arguments
|
||||
-webkit-transition arguments
|
||||
-o-transition arguments
|
||||
transition arguments
|
||||
border-radius()
|
||||
-ms-border-radius arguments
|
||||
-moz-border-radius arguments
|
||||
-webkit-border-radius arguments
|
||||
-o-border-radius arguments
|
||||
border-radius arguments
|
||||
transform()
|
||||
-ms-transform arguments
|
||||
-moz-transform arguments
|
||||
-webkit-transform arguments
|
||||
-o-transform arguments
|
||||
transform arguments
|
||||
clearfix()
|
||||
clear both
|
||||
zoom 1
|
||||
|
||||
// 高亮样式变量
|
||||
$code-font-size = 13px
|
||||
$line-height-code-block = 1.6
|
||||
$code-font-family = "Input Mono", "PT Mono", Consolas, Monaco, Menlo, monospace
|
||||
$gainsboro = #eee
|
||||
$border-color = #ccc
|
||||
$content-desktop-padding = 15px
|
||||
$font-family-base = Consolas, Monaco, Menlo, monospace
|
||||
$font-family-monospace = monospace
|
||||
BIN
themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.otf
Normal file
BIN
themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.ttf
Normal file
BIN
themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.otf
Normal file
BIN
themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.ttf
Normal file
BIN
themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.otf
Normal file
BIN
themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.ttf
Normal file
BIN
themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.eot
Normal file
24
themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.svg
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " d="" horiz-adv-x="512" />
|
||||
<glyph unicode="" d="M1024 369.556l-512 397.426-512-397.428v162.038l512 397.426 512-397.428zM896 384v-384h-256v256h-256v-256h-256v384l384 288z" />
|
||||
<glyph unicode="" d="M0-64h512v1024h-512v-1024zM320 832h128v-128h-128v128zM320 576h128v-128h-128v128zM320 320h128v-128h-128v128zM64 832h128v-128h-128v128zM64 576h128v-128h-128v128zM64 320h128v-128h-128v128zM576 640h448v-64h-448zM576-64h128v256h192v-256h128v576h-448z" />
|
||||
<glyph unicode="" d="M896 704v128h-896v-704c0-35.346 28.654-64 64-64h864c53.022 0 96 42.978 96 96v544h-128zM832 128h-768v640h768v-640zM128 640h640v-64h-640zM512 512h256v-64h-256zM512 384h256v-64h-256zM512 256h192v-64h-192zM128 512h320v-320h-320z" />
|
||||
<glyph unicode="" d="M864 960h-768c-52.8 0-96-43.2-96-96v-832c0-52.8 43.2-96 96-96h768c52.8 0 96 43.2 96 96v832c0 52.8-43.2 96-96 96zM832 64h-704v768h704v-768zM256 384h448v-64h-448zM256 256h448v-64h-448zM320 672c0 53.019 42.981 96 96 96s96-42.981 96-96c0-53.019-42.981-96-96-96s-96 42.981-96 96zM480 576h-128c-52.8 0-96-28.8-96-64v-64h320v64c0 35.2-43.2 64-96 64z" />
|
||||
<glyph unicode="" d="M917.806 602.924c-22.21 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-368c-44.114 0-80-35.888-80-80v-736c0-44.112 35.886-80 80-80h608c44.112 0 80 35.888 80 80v496c0 14.332-4.372 39.35-42.194 90.924zM785.374 657.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.982-17.78 50.678-41.878 81.374-72.572v0zM896 16c0-8.672-7.328-16-16-16h-608c-8.672 0-16 7.328-16 16v736c0 8.672 7.328 16 16 16 0 0 367.956 0.002 368 0v-224c0-17.672 14.324-32 32-32h224v-496zM602.924 917.804c-51.574 37.822-76.592 42.196-90.924 42.196h-368c-44.112 0-80-35.888-80-80v-736c0-38.632 27.528-70.958 64-78.39v814.39c0 8.672 7.328 16 16 16h486.876c-9.646 7.92-19.028 15.26-27.952 21.804z" />
|
||||
<glyph unicode="" d="M1232 960h-384c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l476.118 476.118c18.666 18.666 33.94 55.54 33.94 81.94v384c0 26.4-21.6 48-48 48zM992 576c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96zM128 416l544 544h-80c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l30.058 30.058-416 416z" horiz-adv-x="1280" />
|
||||
<glyph unicode="" d="M928 832h-832c-52.8 0-96-43.2-96-96v-640c0-52.8 43.2-96 96-96h832c52.8 0 96 43.2 96 96v640c0 52.8-43.2 96-96 96zM398.74 409.628l-270.74-210.892v501.642l270.74-290.75zM176.38 704h671.24l-335.62-252-335.62 252zM409.288 398.302l102.712-110.302 102.71 110.302 210.554-270.302h-626.528l210.552 270.302zM625.26 409.628l270.74 290.75v-501.642l-270.74 210.892z" />
|
||||
<glyph unicode="" d="M512 896c282.77 0 512-186.25 512-416 0-229.752-229.23-416-512-416-27.156 0-53.81 1.734-79.824 5.044-109.978-109.978-241.25-129.7-368.176-132.596v26.916c68.536 33.578 128 94.74 128 164.636 0 9.754-0.758 19.33-2.164 28.696-115.796 76.264-189.836 192.754-189.836 323.304 0 229.75 229.23 416 512 416z" />
|
||||
<glyph unicode="" d="M480 960v0c265.096 0 480-173.914 480-388.448s-214.904-388.448-480-388.448c-25.458 0-50.446 1.62-74.834 4.71-103.106-102.694-222.172-121.108-341.166-123.814v25.134c64.252 31.354 116 88.466 116 153.734 0 9.106-0.712 18.048-2.030 26.794-108.558 71.214-177.97 179.988-177.97 301.89 0 214.534 214.904 388.448 480 388.448zM996 89.314c0-55.942 36.314-104.898 92-131.772v-21.542c-103.126 2.318-197.786 18.102-287.142 106.126-21.14-2.65-42.794-4.040-64.858-4.040-95.47 0-183.408 25.758-253.614 69.040 144.674 0.506 281.26 46.854 384.834 130.672 52.208 42.252 93.394 91.826 122.414 147.348 30.766 58.866 46.366 121.582 46.366 186.406 0 10.448-0.45 20.836-1.258 31.168 72.57-59.934 117.258-141.622 117.258-231.676 0-104.488-60.158-197.722-154.24-258.764-1.142-7.496-1.76-15.16-1.76-22.966z" horiz-adv-x="1152" />
|
||||
<glyph unicode="" d="M320 768c0 106.039 85.961 192 192 192s192-85.961 192-192c0-106.039-85.961-192-192-192s-192 85.961-192 192zM768.078 512h-35.424l-199.104-404.244 74.45 372.244-96 96-96-96 74.45-372.244-199.102 404.244h-35.424c-127.924 0-127.924-85.986-127.924-192v-320h768v320c0 106.014 0 192-127.922 192z" />
|
||||
<glyph unicode="" d="M363.722 237.948l41.298 57.816-45.254 45.256-57.818-41.296c-10.722 5.994-22.204 10.774-34.266 14.192l-11.682 70.084h-64l-11.68-70.086c-12.062-3.418-23.544-8.198-34.266-14.192l-57.818 41.298-45.256-45.256 41.298-57.816c-5.994-10.72-10.774-22.206-14.192-34.266l-70.086-11.682v-64l70.086-11.682c3.418-12.060 8.198-23.544 14.192-34.266l-41.298-57.816 45.254-45.256 57.818 41.296c10.722-5.994 22.204-10.774 34.266-14.192l11.682-70.084h64l11.68 70.086c12.062 3.418 23.544 8.198 34.266 14.192l57.818-41.296 45.254 45.256-41.298 57.816c5.994 10.72 10.774 22.206 14.192 34.266l70.088 11.68v64l-70.086 11.682c-3.418 12.060-8.198 23.544-14.192 34.266zM224 96c-35.348 0-64 28.654-64 64s28.652 64 64 64 64-28.654 64-64-28.652-64-64-64zM1024 576v64l-67.382 12.25c-1.242 8.046-2.832 15.978-4.724 23.79l57.558 37.1-24.492 59.128-66.944-14.468c-4.214 6.91-8.726 13.62-13.492 20.13l39.006 56.342-45.256 45.254-56.342-39.006c-6.512 4.766-13.22 9.276-20.13 13.494l14.468 66.944-59.128 24.494-37.1-57.558c-7.812 1.892-15.744 3.482-23.79 4.724l-12.252 67.382h-64l-12.252-67.382c-8.046-1.242-15.976-2.832-23.79-4.724l-37.098 57.558-59.128-24.492 14.468-66.944c-6.91-4.216-13.62-8.728-20.13-13.494l-56.342 39.006-45.254-45.254 39.006-56.342c-4.766-6.51-9.278-13.22-13.494-20.13l-66.944 14.468-24.492-59.128 57.558-37.1c-1.892-7.812-3.482-15.742-4.724-23.79l-67.384-12.252v-64l67.382-12.25c1.242-8.046 2.832-15.978 4.724-23.79l-57.558-37.1 24.492-59.128 66.944 14.468c4.216-6.91 8.728-13.618 13.494-20.13l-39.006-56.342 45.254-45.256 56.342 39.006c6.51-4.766 13.22-9.276 20.13-13.492l-14.468-66.944 59.128-24.492 37.102 57.558c7.81-1.892 15.742-3.482 23.788-4.724l12.252-67.384h64l12.252 67.382c8.044 1.242 15.976 2.832 23.79 4.724l37.1-57.558 59.128 24.492-14.468 66.944c6.91 4.216 13.62 8.726 20.13 13.492l56.342-39.006 45.256 45.256-39.006 56.342c4.766 6.512 9.276 13.22 13.492 20.13l66.944-14.468 24.492 59.13-57.558 37.1c1.892 7.812 3.482 15.742 4.724 23.79l67.382 12.25zM672 468.8c-76.878 0-139.2 62.322-139.2 139.2s62.32 139.2 139.2 139.2 139.2-62.322 139.2-139.2c0-76.878-62.32-139.2-139.2-139.2z" />
|
||||
<glyph unicode="" d="M0 896h1024v-128h-1024zM0 704h1024v-128h-1024zM0 512h1024v-128h-1024zM0 320h1024v-128h-1024zM0 128h1024v-128h-1024z" />
|
||||
<glyph unicode="" d="M832 224l96-96 320 320-320 320-96-96 224-224zM448 672l-96 96-320-320 320-320 96 96-224 224zM701.298 809.481l69.468-18.944-191.987-704.026-69.468 18.944 191.987 704.026z" horiz-adv-x="1280" />
|
||||
<glyph unicode="" d="M512.008 947.358c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 8.0 KiB |
BIN
themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.woff
Normal file
58
themes/hexo-theme-xups/source/css/style.styl
Normal file
@ -0,0 +1,58 @@
|
||||
@charset "UTF-8"
|
||||
@import "_variables"
|
||||
@import "_extend"
|
||||
$comment_config = hexo-config("comment.enable")
|
||||
|
||||
// 字体样式
|
||||
//-----------------------------------------------
|
||||
@import "_base/font"
|
||||
|
||||
// Normalize
|
||||
//-----------------------------------------------
|
||||
@import "_base/normalize"
|
||||
|
||||
// Reset
|
||||
//-----------------------------------------------
|
||||
@import "_base/reset"
|
||||
|
||||
// Global
|
||||
//-----------------------------------------------
|
||||
@import "_base/global"
|
||||
|
||||
// 头部样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/header"
|
||||
|
||||
// 文章列表样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/post"
|
||||
|
||||
// 代码高亮样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/theme"
|
||||
@import "_partial/highlight"
|
||||
|
||||
// 搜索框样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/searchform"
|
||||
|
||||
// 侧栏样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/sidebar"
|
||||
|
||||
// 文章正文样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/article"
|
||||
|
||||
// 博客底部样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/footer"
|
||||
|
||||
// 评论框样式
|
||||
//-----------------------------------------------
|
||||
if $comment_config
|
||||
@import "_partial/comment"
|
||||
|
||||
// 响应式样式
|
||||
//-----------------------------------------------
|
||||
@import "_partial/responsive"
|
||||
BIN
themes/hexo-theme-xups/source/img/default.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
themes/hexo-theme-xups/source/img/jelon.jpg
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
themes/hexo-theme-xups/source/img/lab/banner.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
themes/hexo-theme-xups/source/img/loading.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
themes/hexo-theme-xups/source/img/no_found.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
themes/hexo-theme-xups/source/img/scrolltoparrow.png
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
themes/hexo-theme-xups/source/img/share.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
themes/hexo-theme-xups/source/img/thumbnail/0.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
themes/hexo-theme-xups/source/img/thumbnail/1.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |