diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0b0193f..0000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.DS_Store -Thumbs.db -db.json -*.log -node_modules/ -public/ -.deploy*/ -yarn.lock -package-lock.json diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a25f58f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -sudo: false -language: node_js -node_js: - - 10 # use nodejs v10 LTS -cache: npm -branches: - only: - - master # build master branch only -script: - - hexo generate # generate static files -deploy: - provider: pages - skip-cleanup: true - github-token: $GH_TOKEN - keep-history: true - on: - branch: master - local-dir: public diff --git a/2018/11/13/grid/index.html b/2018/11/13/grid/index.html new file mode 100644 index 0000000..f4399f6 --- /dev/null +++ b/2018/11/13/grid/index.html @@ -0,0 +1,1422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Grid 栅格组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Grid 栅格组件

+ + + +
+ + + + + +
+ + + + + +

学然后知不足

+
戴圣<<礼记·学记>>
+

声明


+

本篇文章是基于网上开源的UI库 vant、antd、element 等做的关于一个栅格组件的分析

+

组件分析


+
    +
  1. 首先,需要创建的是一个布局组件,基本的结构如下图所示:
  2. +
+

basic-layout

+

从上图可知,一个布局组件最少需要2个容器,一个父容器组件 <row>,多个子容器组件 <col>,当然,这个简单结构是不足以支持复杂场景的,我们继续往下走

+
    +
  1. 现代浏览器常用的布局方式为 flex布局,但是为了考虑到兼容性问题,得有个兼容性版的基础布局
  2. +
+

组件设计


+

为了考虑到实际情况,所以需要考虑,子容器 列元素 的占位 span、间距 gutter、 偏移 offset 问题, 且为了能更加细分和适应更多的场景,这里把 父容器 行元素 分为24栅栏,具体思路如下所示:

+
    +
  1. 考虑到组件的灵活性,把父子容器组件都设计为动态 <component> 组件,通过 is 属性指定具体标签

    +
  2. +
  3. 在父容器 <row> 上,设计 type,通过类型传递来选择开不开起 flex 布局

    +
  4. +
  5. 在父容器 <row> 上,传递 gutter,并在子容器 <col> 上,通过 this.$parent 对象,取到父容器上传递的 gutter 来设置列元素的间距,因为需要考虑到边界条件,容器2端的列元素应该没有padding,并且考虑到列元素应该被均匀拉伸,所以此时在父容器上通过 gutter 来计算并设置父容器的负边距,以此来处理这种情况,这也是为什么 gutter 传递到父容器而不是子容器的一个原因

    +
  6. +
  7. 在子容器 <col> 上,传递 offset,来设置列元素的偏移值,这里通过设置左外边距 margin-left 来实现,计算规则 (与计算 span 一样) 如下所示,这里采用的是stylus语法:

    +
  8. +
+
1
{ margin-left: "calc(%s * 100% / 24)" % $i }
+

容器具体的属性设计总结如下所示:

+

Row

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数说明默认值
type布局方式,可选值为flex-
gutter列元素之间的间距(单位为px)-
tag自定义元素标签div
justifyFlex 主轴对齐方式start
alignFlex 交叉轴对齐方式top
+

Col

+ + + + + + + + + + + + + + + + + + + + + + + + +
参数说明默认值
span列元素宽度-
offset列元素偏移距离-
tag自定义元素标签div
+

布局样式分析


+

完整代码,请→戳此处←

+
    +
  1. 为了方便使用循环,变量这些语法,采用stylus或其他预编译语言编写样式,下面所有的css代码片段都采用stylus书写
  2. +
  3. 为了考虑组件之后使用场景,需要良好的覆盖性和命名的独立性,这里采用BEM命名规范
  4. +
  5. 为了创建兼容性版本的布局,这里子容器采用 float 布局,并设置盒模型为 border-box (内边距和边框在以设定的宽高内进行绘制),更多盒模型知识自行搜索,如下所示:

    +

    {prefix}是stylus的插值语法,代表类名的前缀,表示设置了一个 prefix 变量,如:prefix = hips

    +
    1
    2
    3
    4
    .{prefix}-col {
    float: left
    box-sizing: border-box
    }
    +

    同时为了处理高度塌陷和margin无效等问题,需要我们在父容器上通过伪元素上的设置来清除浮动,如下所示:

    +
    1
    2
    3
    4
    5
    6
    7
    .{prefix}-row {
    &::after {
    content: ""
    display: table
    clear: both
    }
    }
    +

    在将 type 设为 flex 的时候,设为Flex布局以后,子元素的float、clear和vertical-align属性将失效,但还是需要将父容器上的伪元素清除如下所示:

    +
    1
    2
    3
    4
    5
    6
    7
    .{prefix}-row {
    &--flex {
    display: flex
    &::after {
    display: none
    }
    }
    +
  6. +
+

至于上面为什么要那么设计,这里有一篇分析Bootstrap和flex的文章,也是栅格布局概念精要,推荐阅读!!

+

这里是一个在线测试demo,做了float布局-处理高度塌陷和margin无效等问题的分析,有兴趣可以自己实际演练下。

+

✨ 这里是一个关于Grid组件的在线demo ,请点击→

+

附录:

+ + + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/02/26/i18n/index.html b/2019/02/26/i18n/index.html new file mode 100644 index 0000000..e933aba --- /dev/null +++ b/2019/02/26/i18n/index.html @@ -0,0 +1,1337 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 如何实现国际化(i18n) | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

如何实现国际化(i18n)

+ + + +
+ + + + + +
+ + + + + +

千里之行,始于足下

+
老子<<道德经>>
+

声明


+

本篇文章的源代码基于开源组件库 vant

+

需求分析


+

在开始实现功能之前我们先来看下,通用的i18n库的使用流程,如下所示:

+

i18n使用流程图

+

从上图可知,要想使用i18n得先导入这个包,然后使用Vue.use方法去install这个包,再进行初始化i18n实例,最后在new Vue的时候挂载到全局。

+

所以我们设计的时候需要提供一个 install 方法,用于初始化,也需要提供 localemessages 去标记当前语言类型和具体的语言对应的内容,最后挂载到Vue的全局实例上。继续往下走 -↓

+

设计实战


+

实现细节如下所示:

+
    +
  1. 定义一个 install 方法,用于初始化。在这个方法中我们创建2个挂载在Vue原型上的响应式对象,如下所示:
  2. +
+
1
2
3
4
5
6
7
8
9
10
11
12
13
import defaultMessages from './lang/zh-CN' // 对应的默认语言包
...

const proto = Vue.prototype
const defaultLang = 'zh-CN'
...
function install () {
...
Vue.util.defineReactive(proto, '$prefixLang', defaultLang)
Vue.util.defineReactive(proto, '$prefixMessages', {
[defaultLang]: defaultMessages,
})
}
+

从上可知,定义了2个私有属性 $prefixLang (对应locale) 和 $prefixMessages (对应messages) (注意为变量名带上自定义的 prefix) 在Vue的原型上,这样就达到了挂载到全局的目的,但是为了能够使之变为可响应式的对象,还需要利用 Vue.util.defineReactive 方法(这个方法没有在官网上暴露,需要通过分析源码时获知,更具体的解释见→附录←

+
    +
  1. 定义一个 use 方法进行语言的切换。如下所示:
  2. +
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import deepAssign from '../utils/deep-assign'
...

const proto = Vue.prototype

...

function use (lang, messages) {
proto.$prefixLang = lang
add({
[lang]: messages,
})
}

function add (messages = {}) {
// 将 messages 所有可枚举属性复制到 $prefixMessages 属性上
deepAssign(proto.$prefixMessages, messages)
}
+

从上可以,我们可以通过 use 方法并配合 deepAssign 方法 来进行当前语言和对应的内容的切换, deepAssign 的实现细节见 →附录←

+
    +
  1. 为了能够在Vue组件模板中使用,同样需要创建一个 $t 函数,如下所示:
  2. +
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

function get (object, path) {
const keys = path.split('.')
let result = object

keys.forEach(key => {
result = isDef(result[key]) ? result[key] : ''
})

return result
}

const camelizeRE = /-(\w)/g

function camelize (str) {
return str.replace(camelizeRE, (_, c) => c.toUpperCase())
}

// component mixin
export default {
computed: {
$t () {
const { name } = this.$options // 用于获取当前 Vue 实例的初始化选项
const prefix = name ? camelize(name) + '.' : ''

if (process.env.NODE_ENV !== 'production' && !this.$prefixMessages) {
console.warn('[XXX] Locale not correctly registered.')
return () => ''
}

const messages = this.$prefixMessages[this.$prefixLang]
return (path, ...args) => {
const message = get(messages, prefix + path) || get(messages, path)
return typeof message === 'function' ? message.apply(null, args) : message
}
},
},
}
+

从上可知,创建了一个可混入的 $t computed 属性, 然后在对应的Vue文件上使用 mixins 的方式混入(更多源码),这样我们就能在Vue组件模板上使用 $t 函数来做国际化了,如下所示:

+
1
2
3
<template>
<p>{{ $t('key') }}</p>
</template>
+

至此,如何实现国际化已经全部分析完毕。

+

附录:

+ + + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/01/bem/index.html b/2019/03/01/bem/index.html new file mode 100644 index 0000000..813e7ed --- /dev/null +++ b/2019/03/01/bem/index.html @@ -0,0 +1,1317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BEM | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

BEM

+ + + +
+ + + + + +
+ + + + + +

声明

原始代码出自vant组件库。 最新代码,点击这里

+

前言

在实际项目中,当我们需要覆盖某些开源组件库样式的时候,我们会发现会有一些奇怪的CSS命名方式,如下所示:

+
1
2
3
4
// 以下是CSS类名
.xx__xx
.xx__xx--xx
.xx--xx
+

为了搞清楚这种规则,通过查阅了解到这是一种叫做 BEM的命名方法。下面我就来了解下这个高大上的东西:

+

BEM是一种方法,可帮助我们在前端开发中创建可重用的组件和代码共享

+

更多中文解释见 https://www.cnblogs.com/dujishi/p/5862911.html
更全面详细的解释下 http://getbem.com

+

通过阅读上述文章,可知BEM命名是很重要的一种规范,但是纯手写起来,会有一些繁琐,为了将这些规则更好的和vue组件的HTML Class绑定相互结合,做如下封装:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* bem helper
* b函数内部,默认取当前组件名称做默认类名,如下,以'button'为例
* b() // 'button'
* b('text') // 'button__text'
* b({ disabled }) // 'button button--disabled'
* b('text', { disabled }) // 'button__text button__text--disabled'
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
*/

const ELEMENT = '__'
const MODS = '--'

const join = (name, el, symbol) => el ? name + symbol + el : name

const prefix = (name, mods) => {
if (typeof mods === 'string') {
return join(name, mods, MODS)
}

// 数组语法,传递一个数组
if (Array.isArray(mods)) {
return mods.map(item => prefix(name, item))
}

// 对象语法,传递对象
const ret = {}
Object.keys(mods).forEach(key => {
ret[name + MODS + key] = mods[key]
})
return ret
}

export default {
methods: {
b (el, mods) {
// 获取组件名称
const { name } = this.$options

if (el && typeof el !== 'string') {
mods = el
el = ''
}
el = join(name, el, ELEMENT)

return mods ? [el, prefix(el, mods)] : el
},
},
}
+

b (bem的简写) 方法混入到组件中后,我们就可以直接在HTML模板中使用它,如下所示:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<template>
<div :class="b([type])">
<div :class="[b('wrapper', { scrollable }), {'thinline--bottom': type=== 'line'}]">
...
</div>
</div>
</template>

<script>
expot default {
name: 'tabs',
data() {
return {
type: 'line',
scrollable: true,
}
}
}
</script>
+

如上所示代码,将渲染出如下类名:

1
2
3
4
.tabs--line
.tabs__wrapper
.tabs__wrapper--scrollable
.thinline--bottom

+
+

上述代码可以直接拷贝使用,可以在Vue项目中实际用起来看下效果啦。

+
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/01/util/index.html b/2019/03/01/util/index.html new file mode 100644 index 0000000..f8dbd5c --- /dev/null +++ b/2019/03/01/util/index.html @@ -0,0 +1,1317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 通用方法收集 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

通用方法收集

+ + + +
+ + + + + +
+ + + + + +

前言

以下源代码大部分收集于各个开源库和公开代码

+
+

# 常用辅助类函数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function isDef (value) {
return value !== undefined && value !== null
}

function isObj (x) {
const type = typeof x
return x !== null && (type === 'object' || type === 'function')
}

function isArray (val) {
return Object.prototype.toString.call(val) === '[object Array]'
}

// 将keba-case(短横线)的变量名转换为camelCase(驼峰式)
function camelize (str) {
return str.replace(/-(\w)/g, (_, c) => c.toUpperCase())
}

// 范围限制 ,确保当前值在最大值和最小值之间
function range (num, min, max) {
return Math.min(Math.max(num, min), max)
}

/* eslint-disable */
function isEmail(value: string): boolean {
const reg = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
return reg.test(value);
}

function isMobile(value: string): boolean {
value = value.replace(/[^-|\d]/g, '');
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
}

function isNumber(value: string): boolean {
return /^\d+$/.test(value);
}

// Is image source
export function isSrc(url: string): boolean {
return /^(https?:)?\/\/|data:image/.test(url);
}
+

# deepAssign

将所有可枚举属性的值从源对象复制到目标对象,返回目标对象

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const { hasOwnProperty } = Object.prototype

function assignKey (to, from, key) {
const val = from[key]

// 1.如果源对象的某个key对应的value是未定义的,直接返回
// 2.如果源对象的某个key对应的value不是未定义的,但是目标对象对应的key的value未定义 直接返回
if (!isDef(val) || (hasOwnProperty.call(to, key) && !isDef(to[key]))) {
return
}

if (!hasOwnProperty.call(to, key) || !isObj(val)) {
to[key] = val
} else {
to[key] = assign(Object(to[key]), from[key])
}
}

export default function assign (to, from) {
for (const key in from) {
if (hasOwnProperty.call(from, key)) {
assignKey(to, from, key)
}
}
return to
}
+
+

注意1✨: 该方法会跳过那些值为 null 或 undefined 的源对象和目标对象;该方法对于目标对象中没有的key会直接复制源对象对应的key和value,不会发生深拷贝

+
+
+

注意2✨: 当Object以非构造函数形式被调用时,Object() 等同于 new Object(),主要用于处理给定值是 null 和 undefined·时, 创建并返回一个空对象,否则,将返回一个与给定值对应类型的对象

+
+

点击查看最新源码

+

# raf

requestAnimationFrame官方介绍
下面是 requestAnimationFrame的 polyfill

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
let prev = Date.now()

/* istanbul ignore next */
function fallback (fn) {
const curr = Date.now()
const ms = Math.max(0, 16 - (curr - prev))
const id = setTimeout(fn, ms)
prev = curr + ms
return id
}

/* istanbul ignore next */
const root = Vue.prototype.$isServer ? global : window

/* istanbul ignore next */
const iRaf = root.requestAnimationFrame || root.webkitRequestAnimationFrame || fallback

/* istanbul ignore next */
const iCancel = root.cancelAnimationFrame || root.webkitCancelAnimationFrame || root.clearTimeout

export function raf (fn) {
return iRaf.call(root, fn)
}

export function cancel (id) {
iCancel.call(root, id)
}
+

点击查看最新源码

+

# scroll

获取html元素对应的一些位置信息的封装

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
export default {
// get nearest scroll element
getScrollEventTarget (element, rootParent = window) {
let currentNode = element
// bugfix, see http://w3help.org/zh-cn/causes/SD9013 and http://stackoverflow.com/questions/17016740/onscroll-function-is-not-working-for-chrome
while (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode.nodeType === 1 && currentNode !== rootParent) {
const overflowY = this.getComputedStyle(currentNode).overflowY
if (overflowY === 'scroll' || overflowY === 'auto') {
return currentNode
}
currentNode = currentNode.parentNode
}
return rootParent
},

getScrollTop (element) {
return 'scrollTop' in element ? element.scrollTop : element.pageYOffset
},

setScrollTop (element, value) {
'scrollTop' in element ? element.scrollTop = value : element.scrollTo(element.scrollX, value)
},

// get distance from element top to page top
getElementTop (element) {
return (element === window ? 0 : element.getBoundingClientRect().top) + this.getScrollTop(window)
},

getVisibleHeight (element) {
return element === window ? element.innerHeight : element.getBoundingClientRect().height
},

getComputedStyle: !Vue.prototype.$isServer && document.defaultView.getComputedStyle.bind(document.defaultView),
}
+

点击查看最新源码

+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/03/icon/index.html b/2019/03/03/icon/index.html new file mode 100644 index 0000000..f573eae --- /dev/null +++ b/2019/03/03/icon/index.html @@ -0,0 +1,1328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 自定义图标字体 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

自定义图标字体

+ + + +
+ + + + + +
+ + + + + +

前言

本篇文章将介绍如何和UI设计师配合,制定自定义的图标字体,最终生成自定义的ttf文件和样式。

+

实现

大致流程如下图所示:

+

icon-ttf

+

下面就针对它做具体的分析:

+
    +
  1. 首先需要在电脑中安装 sketch 软件,因为我们要用到该软件的 sketchtool (一个内置工具)命令,将 .sketch 源文件处理为svg文件,如下所示:
  2. +
+
1
shell.exec(`/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool export slices --formats=svg --overwriting=YES --save-for-web=YES ${sketch} --output=${svgDir}`)
+
    +
  1. 我们需要创建一个icon文件夹,用于处理sketch文件,目录结构如下所示:
    icon index
  2. +
+

从上图可知,最终我们会生成一个带 md5 标记的ttf文件(通过 [gulp-iconfont](https://www.npmjs.com/package/gulp-iconfont) 模块)和对应的样式文件index.styl (通过 [gulp-iconfont-css](https://www.npmjs.com/package/gulp-iconfont-css) 模块),这2个模块的更多解释请查看各自的npm包介绍

+

template.css 文件相识代码见: https://github.com/youzan/vant-icons/blob/master/build/template.tpl

+

template-local.js 文件代码如下所示:

+
1
2
3
4
5
6
7
8
9
module.exports = (fontName, ttf) => {
return `@font-face {
font-style: normal;
font-weight: normal;
font-family: '${fontName}';
src: url('./${ttf}') format('truetype');
}
`;
};
+

下面是config文件下 index.js文件内容,可以自定义图标的样式名,通过以下格式:

+
1
2
3
4
5
6
7
module.exports = {
name: 'xxx-icon',
glyphs: [{
src: 'search.svg',
css: 'search'
}, ...]
}
+

具体的 gulp 脚本代码如下所示:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* build iconfont from sketch
*/
const fs = require('fs-extra')
const gulp = require('gulp')
const path = require('path')
const glob = require('fast-glob')
const shell = require('shelljs')
const md5File = require('md5-file')
const iconfont = require('gulp-iconfont') // core module
const iconfontCss = require('gulp-iconfont-css') // core module
const config = require('../packages/icon/config')
const local = require('../packages/icon/config/template-local')

const iconDir = path.join(__dirname, '../packages/icon')
const svgDir = path.join(iconDir, 'svg')
const sketch = path.join(iconDir, 'assets/icons.sketch')
const template = path.join(iconDir, 'config/template.css')

// get md5 from sketch
const md5 = md5File
.sync(sketch)
.slice(0, 6)
const ttf = `${config.name}-${md5}.ttf`

// extract svg from sketch should install sketchtool first install guide:
// https://developer.sketchapp.com/guides/sketchtool/
shell.exec(`/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool export slices --formats=svg --overwriting=YES --save-for-web=YES ${sketch} --output=${svgDir}`)

// remove previous ttf
const prevTTFs = glob.sync(path.join(iconDir, '*.ttf'))
prevTTFs.forEach(ttf => fs.removeSync(ttf))

// rename svg
config
.glyphs
.forEach((icon, index) => {
const src = path.join(svgDir, icon.src)
if (fs.existsSync(src)) {
fs.renameSync(src, path.join(svgDir, icon.css + '.svg'))
}
})

// generate ttf from sketch && build icon.styl
gulp.task('ttf', () => {
return gulp
.src([`${svgDir}/*.svg`])
.pipe(iconfontCss({
fontName: config.name,
path: template,
targetPath: '../icon/index.styl',
normalize: true,
firstGlyph: 0xf000,
cssClass: ttf, // this is a trick to pass ttf to template
}))
.pipe(iconfont({
fontName: ttf.replace('.ttf', ''),
formats: ['ttf'],
}))
.pipe(gulp.dest(iconDir))
})

gulp.task('default', ['ttf'], () => {
// generate local.styl
fs.writeFileSync(path.join(iconDir, 'local.styl'), local(config.name, ttf))

// remove svg
fs.removeSync(svgDir)

// upload ttf to cdn /no cdn shell.exec(`superman cdn /xxx ${path.join(iconDir,
// ttf)}`)
})
+
+

✨下面是完整的自定义图标字体解决方案的项目地址:https://github.com/youzan/vant-icons

+
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/04/button/index.html b/2019/03/04/button/index.html new file mode 100644 index 0000000..b7d05bd --- /dev/null +++ b/2019/03/04/button/index.html @@ -0,0 +1,1372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Button 按钮组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Button 按钮组件

+ + + +
+ + + + + +
+ + + + + +

前言

在日常开发中,button组件是使用频率比较高的组件,原生的HTML button标签只能满足一部分的使用场景,所以需要对button标签进行二次封装,来满足更多的场景。

+

设计

对于一个button组件,我们对它做如下设计:

+
    +
  1. 保留原生HTML button标签的部分特性 (如:type, disabled等)
  2. +
  3. 通过传入type prop,来展示不同类型的button
  4. +
  5. 通过传入loading prop,来控制button的加载效果
  6. +
  7. 通过传入icon prop,实现button和icon的结合
  8. +
  9. 通过传入ripple prop,实现水波纹的点击效果
  10. +
  11. 通过传入block prop,来控制button的宽度是否继承父容器宽度
  12. +
  13. 提供自定义的click事件,来响应用户的点击
  14. +
+

具体设计如下所示:

+

button

+

实现

组件代码如下所示:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
<button
:class="[
b([type, size, {
loading,
icon,
block,
ripple
}])]"
:disabled="disabled"
:type="htmlType"
@click="handleClick"
>
<spin v-if="loading" size="16px"/>

<ripple v-if="ripple && !loading && !disabled" :ripple-opacity="rippleOpacity" :ripple-color="rippleColor"/>

<slot name="icon">
<icon v-if="icon" :name="icon" />
</slot>

<slot/>
</button>
</template>

<script>
import Spin from '../spin'
import Ripple from '../ripple'

export default {
name: 'button',
components: {
Ripple,
Spin
},
props: {
disabled: Boolean,
// 设置 button 原生的 type 值
htmlType: {
type: String,
default: 'button',
},
// 设置按钮类型
type: {
type: String,
default: 'default',
},
icon: String,
loading: Boolean,
// 支持large、default、small三种尺寸,默认为default, 当为默认时不需要设置
size: {
type: String,
default: '',
},
// 开启水波纹点击
ripple: Boolean,
// 设置波纹透明度
rippleOpacity: [String, Number],
// 设置波纹颜色,默认取字体颜色 (currentColor)
rippleColor: String,
// 将按钮宽度调整为其父宽度的选项
block: Boolean,
},
methods: {
handleClick (event) {
// loading 和 disabled 状态下不做click 事件处理
if (!this.loading && !this.disabled) {
this.$emit('click', event)
}
},
},
}
</script>
+
+

提示:不同的浏览器对 <button> 元素的 type 属性使用不同的默认值, 所以我们需要给自定义的button 组件的 htmlType 属性设置默认的值为 button

+
+

从上可知button组件提供了2个 slot

+
    +
  1. 默认插槽一般用于接收button组件的文本传入;
  2. +
  3. icon 插槽,提供给用户插入图片的途径(当icon图标不能够完全满足需求时,我们可以传入图片代替)
  4. +
+

由于它没有复杂的逻辑,基本上就是一个视图组件,接下来我们将重点分析它的样式,对应的css样式(stylus语法)代码 如下所示:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
$text-color = #4a4a4a
$border-color = #eee
$gray-darker = #666
$gray-dark = #999

.button
position: relative
display: inline-block
box-sizing: border-box
color: $text-color
background: $white
height: 34px
line-height: 32px
padding: 0 12px
border-radius: 4px
border: 1px solid $border-color
box-shadow: none
text-align: center
font-size: 14px
cursor: pointer
outline: none
touch-action: manipulation
white-space: nowrap
user-select: none
-webkit-appearance: none
-webkit-text-size-adjust: 100%

&::before
content: ""
position: absolute
z-index: 1
top: -1px
left: -1px
bottom: -1px
right: -1px
width: 100%
height: 100%
opacity: 0
border: inherit
border-radius: inherit
background-color: $gray-darker
pointer-events: none
transition: opacity .3s

&:active::before
opacity: 0.15

&[disabled]
&,
&:focus,
&:active
cursor: not-allowed
background-color: $border-color
color: $gray-dark
border: 1px solid $border-color
box-shadow: none
&::before,
&:active::before
display: none
+

分析上述重点样式代码:

+
    +
  1. 设置 -webkit-appearance: none 去除 button 标签默认的appearance样式,常用于IOS下移除原生样式
  2. +
  3. 设置 outline: none去除外边线样式
  4. +
  5. 设置 touch-action: manipulation 可减少浏览器在用户点击时延迟生成点击事件的情况
  6. +
  7. 设置 white-space: nowrap 禁止组件文本换行
  8. +
  9. 设置 user-select: none 阻止button组件文本被选择(复制)
  10. +
  11. 设置 -webkit-text-size-adjust: 100% 关闭字体大小自动调整功能
  12. +
+

还需要注意的是,当点击button组件时,需要设置active状态下的样式,如果直接在button上改变 background-color 或者其它样式的值,这样将会导致额外的 layout 和 paint, 如下所示:
background-color trigger

+

为了能够进行性能优化,做如下设计:

+
    +
  1. 将 button 组件 active 状态下的样式通过在 ‘::before’ 上设置绝对定位进行触发,这样点击button时就不会影响到其他dom的渲染
  2. +
  3. 为了不影响button的正常点击操作,需要在伪元素上设置 pointer-events: none 这样点击事件就会穿透到真正到button元素上
  4. +
  5. 通过改变 opacity 样式来反馈 active 状态
  6. +
  7. 为了做更近一步的优化,我们通过设置 transition 样式将伪元素提升为合成层 (元素提升为合成层后,transform 和 opacity 才不会触发 paint,如果不是合成层,则其依然会触发 paint
  8. +
+

提示:(这里是引用 justjavac 大神的回答)
在 Blink 和 WebKit 内核的浏览器中,对于应用了 transition 或者 animation的 opacity 元素,浏览器会将渲染层提升为合成层。也可以使用 translateZ(0) 或者 translate3d(0,0,0) 来人为地强制性地创建一个合成层。

+

可以通过使用 Chrome DevTools 工具来查看页面中合成层的情况,在 Rendering 标签下,勾选上 Show layer borders即可

+
+

请点击查看 DEMO 效果

+
+

附录 ✨

+ + + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/05/wave/index.html b/2019/03/05/wave/index.html new file mode 100644 index 0000000..2141e37 --- /dev/null +++ b/2019/03/05/wave/index.html @@ -0,0 +1,1355 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ripple 水波纹效果 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Ripple 水波纹效果

+ + + +
+ + + + + +
+ + + + + +

声明

代码借鉴了 keen-ui 和 material-ui 的实现方式

+

前言

在日常项目中,经常会看到点击button或某个元素块时,有水波纹效果,如下图所示:

+

ripple button

+

下面,我们将分析如何实现这个效果

+

设计

常见的波纹点击效果的实现方式是监听元素的 mousedown、 mouseup 事件(pc端), touchstart touchend 事件(mobile端),因为mouse事件和touch事件时优先于click事件的,并且有多个回调状态。

+

通过监听上述事件,在元素内部创建一个波纹元素,并调整元素的 transformopacity 属性,通过计算点击的位置来设置波纹元素的大小和位置,已达到波纹扩散的效果。

+

我们讲组件分为2个部分,circleRipple 子组件 和 ripple 父组件:

+
    +
  • circleRipple 为波纹扩散组件,由 transition 组件包裹来设置动画,实现波纹扩散效果
  • +
  • ripple 父组件,监听 mousetouch 相关事件来控制 circleRipple 的位置和显示
  • +
+

实现

CircleRipple

利用 vue 的 transition 组件的来完成 circleRipple 的动画效果,之所以设置为子组件,就是为了方便从外部通过传参来控制它的样式。实现代码如下:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<template>
<transition name="ripple">
<div :class="b()" :style="styles"/>
</transition>
</template>

<script>

export default {
name: 'ripple-circle',
props: {
styles: {
type: Object,
default () {
return {}
},
},
},
}
</script>
+

样式代码如下所示:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.ripple-circle
position: absolute
border-radius: 50%
opacity: .1
background-color: currentColor
background-clip: padding-box
pointer-events: none
user-select: none

.ripple-enter-active,
.ripple-leave-active
transform: translate(-50%, -50%) scale(1)
transition: opacity 1s ease-out, transform 0.25s ease-out

.ripple-enter
transform: translate(-50%, -50%) scale(0)

.ripple-leave-to
opacity: 0 !important
+

上述代码中有2个需要注意的属性:

+
    +
  1. 设置 background-color: currentColor, 使用该关键字的元素的(或其最近父元素)color属性的颜色值
  2. +
  3. 设置 background-clip: padding-box, 使背景被裁剪到内边距框,不包含border
  4. +
+

Ripple

Ripple 需要控制 circleRipple 的显示,如果频繁点击可能出现多个 circleRipple

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<template>
<div
:class="b()"
@contextmenu.prevent
@touchstart="start"
@touchend="end"
@touchcancel="end"
@mousedown="start"
@mouseup="end"
@mouseleave="end"
>
<!--多个波纹用 v-for 控制-->
<ripple-circle v-for="ripple in ripples" :key="ripple.key" :styles="ripple.style"/>
</div>
</template>

<script>
import RippleCircle from './ripple-circle'

const hasTouchEvent = 'ontouchstart' in document.documentElement
let rippleKey = 0

export default {
name: 'ripple',
components: {
RippleCircle,
},
props: {
rippleOpacity: {
type: [Number, String],
default: '0.15',
},
rippleColor: {
type: String,
default: '',
},
},
data () {
return {
ripples: [],
}
},
methods: {
start (e) {
if (hasTouchEvent && !e.touches) return
const ripple = {
key: rippleKey++,
style: this.__calcRippleStyle(e),
}

// 增加一个波纹元素只需要在 ripples 数组中push一个 ripple 对象即可
this.ripples.push(ripple)
},

end (e) {
if ((hasTouchEvent && !e.touches) || this.ripples.length === 0) return
// 删除数组中第一个一个波纹元素
this.ripples.splice(0, 1)
},

// 计算波纹样式并返回
__calcRippleStyle (e) {
const { target } = e
const rect = target.getBoundingClientRect()
const isTouchEvent = e.touches && e.touches.length

const pointerClientX = isTouchEvent ? Math.floor(e.touches[0].clientX) : e.clientX
const pointerClientY = isTouchEvent ? Math.floor(e.touches[0].clientY) : e.clientY

// 计算点击位置在当前点击块中,距离上下左右边框的距离
const left = pointerClientX - rect.left
const top = pointerClientY - rect.top
const right = rect.right - pointerClientX
const bottom = rect.bottom - pointerClientY

// 计算点击位置距离四周边框的四个斜边长度
const leftTopDiagLen = this.__calcDiagLen(left, top)
const rightTopDiagLen = this.__calcDiagLen(right, top)
const leftBottomDiagLen = this.__calcDiagLen(left, bottom)
const rightBottomDiagLen = this.__calcDiagLen(right, bottom)

// 获取上面计算四条斜边的最大边并向上取整,取得绘画波纹的半径
const rippleCircleRadius = Math.ceil(
Math.max(
leftTopDiagLen,
rightTopDiagLen,
leftBottomDiagLen,
rightBottomDiagLen,
),
)
const rippleCircleDiameter = rippleCircleRadius * 2

// 确定波纹绘制的颜色、透明度、大小、位置
return {
color: this.rippleColor,
opacity: this.rippleOpacity,
width: `${rippleCircleDiameter}px`,
height: `${rippleCircleDiameter}px`,
left: `${left}px`,
top: `${top}px`,
}
},

// 计算斜边长
__calcDiagLen (a, b) {
return Math.sqrt(a * a + b * b)
},
},
}
</script>
+
+

注意:@contextmenu.prevent 表示鼠标右击时阻止浏览器打开默认的菜单选项

+
+

针对上述代码的分析见下图所示:

+

ripple-circle

+

👇下面有一个在线的可操作水波纹示例(大家可以点击亵玩):👇
https://codepen.io/shellWolf/pen/vPyQJX?editors=1100

+

样式代码如下所示:

+
1
2
3
4
5
6
7
.ripple
position: absolute
overflow: hidden
top: 0
left: 0
width: 100%
height: 101%
+

该组件通常与 buttoncell 等组件结合使用。

+
+

使用注意事项:由于 Ripple 组件内部都是 position:absolute 布局,使用时,需要在外部加上 position:relative
请点击查看 DEMO 效果(滚动到水波纹点击效果那一栏)

+
+

附录 ✨

+ + + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/07/spin/index.html b/2019/03/07/spin/index.html new file mode 100644 index 0000000..93d0f49 --- /dev/null +++ b/2019/03/07/spin/index.html @@ -0,0 +1,1361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Spin 旋转提示组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Spin 旋转提示组件

+ + + +
+ + + + + +
+ + + + + +

前言

要实现一个spin效果,这里有2种实现实现方式:

+
    +
  1. imgembed 标签中,传入svg文件(loading效果的svg)地址到 src 特性中,就可以了

    +

    如下所示旋转效果(更多资源,查看附录):

    +
  2. +
+

                                                                  

+ +
    +
  1. 利用纯CSS3来绘制旋转效果 (下面将重点分析其绘制过程), 如下图所示:
  2. +
+

spin

+
+

DEMO效果展示,请点击 这里 查看

+
+

实现

代码如下所示:

+

模板代码

1
2
3
4
5
6
<template>
<img v-if="!!svgSrc" :src="svgSrc" :style="svgStyle">
<div v-else :class="b()" :style="sizeStyle">
<i v-for="i in 12" :class="b('item')" :style="colorStyle" :key="i"/>
</div>
</template>
+

从上可知,模板代码非常简单,就是循环出了12个元素在一个容器中,构成 Spin 组件的主体,重要的是样式的编写,我们继续往下走👇

+

CSS代码 (采用stylus语法)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@keyframes spin-fade {
0% {
opacity: .85
}
50% {
opacity: .25
}
100% {
opacity: .25
}
}

.spin {
position: relative
display: inline-block
width: 40px
height: 40px
&__item {
position: absolute
left: calc(50% - 1px)
top: 37.5%
width: 2px
height: 25%
border-radius: 50% / 20%
opacity: .25
background-color: currentColor
animation: spin-fade 1s linear infinite

for num in (1..12) {
&:nth-child({num}) {
animation-delay: ((num - 1) / 12) s
transform: rotate(30deg * (num - 6)) translateY(-150%)
}
}
}
}
+

针对上述样式的解释:

+
    +
  1. 创建一个行内块的父容器盒子,设置为相对定位
  2. +
  3. 创建12个绝对定位的子元素,并设置其透明度为 .25 为后面动画打铺垫
  4. +
  5. 给每个子元素的四个角设置水平半径为50%,垂直半径为20%的圆角
  6. +
  7. 给每个子元素设置固定宽度2px,高度相对父容器自适应(占父容器的25%)
  8. +
  9. 通过 top: 37.5%; left: calc(50% - 1px) 设置初始子元素为垂直居中的
  10. +
  11. 通过 transform: rotate(30deg * (num - 6)) translateY(-150%) 让第一个子元素旋转-150deg 改变正反向,然后向正方向移动(即向下(因为改变了正方向))1.5(37.5 / 25 = 1.5)个子元素高度的距离,确定第一个元素的初始位置,其它11个子元素按同样的规则进行排布,最后形成一个圆形排布
  12. +
  13. 最后给子元素设置动画,控制子元素的透明度,以 1/12 s 为间隔控制透明度的变化,形成视觉上的转动(其实只是子元素透明度的变化)
  14. +
+

下面几张图分解关键步骤解释:

+

spin
spin1
spin2

+

附录 ✨

+ + + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/08/border-radius/index.html b/2019/03/08/border-radius/index.html new file mode 100644 index 0000000..62d4234 --- /dev/null +++ b/2019/03/08/border-radius/index.html @@ -0,0 +1,1299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 你真的懂 border-radius 了吗? | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

你真的懂 border-radius 了吗?

+ + + +
+ + + + + +
+ + + + + +

声明

以下的截图文字说明,来源于 <<CSS揭秘>> 文章的片段

+

前言

在日常开发中 border-radius 属性是一个非常常用和简单的属性,但是他有一个鲜为人知的真相:它可以单独指定水平 和垂直半径,只要用一个斜杠(/)分隔这两个值即可

+

分析

为什么叫 border-radius?

border-radius-explain

+

border-radius 的更多用法

border-radius

+

下面还有一个图形化的解释,结合上面的文章截图理解:

+

border-radius1

+

在线测试DEMO

https://codepen.io/shellWolf/pen/MxpEGb?editors=1100

+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/11/collection/index.html b/2019/03/11/collection/index.html new file mode 100644 index 0000000..f84c344 --- /dev/null +++ b/2019/03/11/collection/index.html @@ -0,0 +1,1306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 超有价值文章收集 (链接) | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

超有价值文章收集 (链接)

+ + + +
+ + + + + +
+ + + + + +

CSS

+

EVENT

+

JS

+

BABEL

+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/12/rotate/index.html b/2019/03/12/rotate/index.html new file mode 100644 index 0000000..cc0fe46 --- /dev/null +++ b/2019/03/12/rotate/index.html @@ -0,0 +1,1314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 对于Rotate的图形解释 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

对于Rotate的图形解释

+ + + +
+ + + + + +
+ + + + + +

前言

开始本文之前,需要先对CSS的3d坐标轴有一定的概念,如下图所示:

+

3D坐标轴

+

分析

RotateZ

rotateZ

+

从上图可知,rotateZ旋转就是普通的rotate 2d 旋转,我们可以把一个图形压缩为一条线(图中蓝色虚线),然后按给定角度就行旋转,红色虚线和蓝色虚线的夹角就是旋转的角度

+
+

注意:rotate 采取就近转到目标的原则

+
    +
  • 小于180°,正常顺时针,但大于180°逆时针旋转
  • +
  • 设180°会逆时针转,-180°才顺时针
  • +
  • 设为360°的倍数值不会转
  • +
+
+

RotateX

rotateX

+

从上图可知,当绕X轴旋转时,图形的X边长不会变化,只有Y值发生改变,公式为: cos deg * Y = Y',意思就是,当前选择角度的cos值乘以原先Y边的值等于旋转后新边的值

+

RotateY

rotateY

+

从上图可知,当绕Y轴旋转时,图形的Y边长不会变化,只有X值发生改变,公式为: cos deg * X = X',意思就是,当前选择角度的cos值乘以原先X边的值等于旋转后新边的值

+
+

Tips:
我们可以通过与 perspective 透视属性 和 transform-style:preserve-3d 属性配合,观察图形的3D变化

+
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/12/star/index.html b/2019/03/12/star/index.html new file mode 100644 index 0000000..3ac6e06 --- /dev/null +++ b/2019/03/12/star/index.html @@ -0,0 +1,1326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 如何用CSS手绘一个5角星? | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

如何用CSS手绘一个5角星?

+ + + +
+ + + + + +
+ + + + + +

前言

前2天和同事聊天的时候,被问到如何利用CSS手绘一个 5角星 图形,简单思考了下,想出了个比较简易的办法,详细分析见下文

+

分析

我们先来观察下5角星,发现它有以下几个特征:

+
    +
  1. 有5个角,对应5个三角形
  2. +
  3. 每个三角形都是等边三角形
  4. +
  5. 每个三角形之间间隔同样的角度,并按圆形排列
  6. +
+

结合上述特征,就可以把问题进行切割,分解成下面几步:

+
    +
  1. 创建5个一样的等边三角形
  2. +
  3. 把每个三角形按(360°/5 = 72°)进行间隔排列
  4. +
  5. 给最后的中心空白区域位置填色
  6. +
+

实现

创建三角形

我们利用 border 法画三角形,进行三角形绘制之前,得先搞懂一个图,如下所示:

+

border

+

分析上图,蓝色三角形(bottom)其实从它的顶点垂直下来一条线为准,将蓝色三角形分为左右两个小三角形,左边小三角形底边受left值影响,右边小三角形底边受right值影响,其它三角形也一样。

+

根据上述规则, 我们可以很方便得到一个角度为60°的等边三角形:

+
    +
  1. 指定bottom border的宽度,举例我们设为100px
  2. +
  3. 由于要创建一个 角度为指定角度(60°)的等边三角形,我们把三角形对分,成为2个直角三角形,这样,我们就有了一个指定为 30°的角和一个给定的bottom 值,通过勾股定理公式: tan30°= X/(bottom值),很容易得到X的值,这样我们就确定了 left 和 right 的值为 √3/3*100px ≈ 58px
  4. +
+

具体的代码如下所示:

+
1
2
3
4
5
6
7
8
9
10
div{
position: absolute;
left: calc(50% - 58px);
top: calc(50% - 58px);
border-style: solid;
border-width: 0 58px 100px 58px;
border-color: red transparent currentcolor transparent;
width: 0px;
height: 0px;
}
+

按圆形排列三角形

上面我们得到了我们想要的三角形,接下来我们就把他们按72°间隔进行排列,具体代码如下所示

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#div1 {
transform: rotate(72deg) translateY(-120%)
}

#div2 {
transform: rotate(144deg) translateY(-120%)
}

#div3 {
transform: rotate(216deg) translateY(-120%)
}

#div4 {
transform: rotate(288deg) translateY(-120%)
}

#div5 {
transform: rotate(360deg) translateY(-120%)
}
+

填充图形中间位置颜色

多个三角形围城一圈会组成,一个空白的区域,我们需要把它填充为与边框同样的颜色

+
1
2
3
4
5
6
7
8
9
#fill {
width: 166px;
height: 158px;
border: none;
left: calc(50% - 83px);
top: calc(50% - 79px);
background: currentcolor;
border-radius: 10px;
}
+
+

注意: border 和 填充体的颜色都取 currentcolor

+
+

DEMO

DEMO链接地址(可在线测试): https://codepen.io/shellWolf/pen/YgxOVm

+

结语

增强自己的分解意识,还有更好的方法等待去探索。

+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/13/collapse/index.html b/2019/03/13/collapse/index.html new file mode 100644 index 0000000..f53eb29 --- /dev/null +++ b/2019/03/13/collapse/index.html @@ -0,0 +1,1352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Collapse 折叠面板组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Collapse 折叠面板组件

+ + + +
+ + + + + +
+ + + + + +

前言

折叠面板组件直观展示:

+

collapse

+

下面我们一起分析如何实现这个组件

+

分析

    +
  • 可以把组件拆分成父容器(collapse)和子组件(collapse-item)2个,然后在父组件上使用 v-model 进行双向绑定
  • +
  • 子组件折叠有2种方式,第一种是普通展开模式,第二种是accordion(手风琴)模式
  • +
  • 对折叠项内容展开和收起时运用动画,产生平滑过渡效果
  • +
+

实现

Collapse 父组件

模板代码如下:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<template>
<group :class="b()">
<slot />
</group>
</template>

<script>

import Group from './group'

export {
name: 'collapse',

components: {
Group,
},

props: {
// 控制手风琴效果
accordion: Boolean,
// 用于生成双向绑定
value: [String, Number, Array],
},

provide () {
return {
Collapse: this,
}
},

data () {
return {
items: [],
}
},

methods: {
switch (name, expanded) {
if (!this.accordion) {
name = expanded
? this.value.concat(name)
: this.value.filter(activeName => activeName !== name)
} else {
name = expanded
? name === this.value ? '' : name
: ''
}

this.$emit('input', name)
this.$emit('change', name)
},
},
}
</script>
+

上述代码有几点需要注意的地方:

+
    +
  1. provide / inject 允许一个祖先组件向其所有子孙后代注入一个依赖,不论组件层次有多深,并在起上下游关系成立的时间里始终生效
  2. +
  3. 通过属性 valueswitch 方法中发射 input 事件,让自定义组件实现双向绑定
  4. +
  5. accordion 属性为真时,展开的折叠项只有一个,记录到一个字符串中即可,当为假时,可以有多个折叠项同时是展开状态,这个时候我们需要用数组记录状态
  6. +
+

Collapse Item 子组件

模板代码如下:

+
+

raf, cancel 源码见 →附录←

+
+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<template>
<div
:class="[
b(),
{ 'thinline--top': index }
]"
>
<!-- 通过 $props 将父组件的 props 一起传给子组件 - -->
<cell :class="b('title', { expanded, disabled })" v-bind="$props" @click="onClick">
<slot slot="icon" name="icon" />
<slot slot="title" name="title" />
<slot slot="value" name="value" />
<slot slot="right-icon" name="right-icon" />
</cell>

<div
v-if="inited"
v-show="show"
ref="wrapper"
:class="b('wrapper')"
@transitionend="onTransitionEnd"
>
<div ref="content" :class="b('content')">
<slot />
</div>
</div>
</div>
</template>

<script>
import { raf, cancel } from '../utils/raf'

let rafID = null

export default create({
name: 'collapse-item',

props: {
name: [String, Number],
disabled: Boolean,
icon: String,
description: String,
title: [String, Number],
value: [String, Number],
border: {
type: Boolean,
default: true,
},
isLink: {
type: Boolean,
default: true,
},
},

inject: ['Collapse'],

data () {
return {
show: null,
inited: null,
}
},

computed: {
items () {
return this.parent.items
},

index () {
return this.items.indexOf(this)
},

currentName () {
return this.isDef(this.name) ? this.name : this.index
},

expanded () {
if (!this.parent) {
return null
}

const { value } = this.parent

return this.parent.accordion
? value === this.currentName
: value.some(name => name === this.currentName)
},
},

watch: {
expanded (expanded, prev) {
if (prev === null) {
return
}

if (expanded) {
this.show = true
this.inited = true
}

this.$nextTick(() => {
const { content, wrapper } = this.$refs
if (!content || !wrapper) {
return
}

const contentHeight = content.clientHeight + 'px'

// 处理第一次高度展开或收起来时的动画
wrapper.style.height = expanded ? 0 : contentHeight
rafID = raf(() => {
wrapper.style.height = expanded ? contentHeight : 0
})
})
},
},

created () {
if (!this.Collapse) {
console.error('CollapseItem needs to be child of Collapse')
} else {
this.parent = this.Collapse
}

this.items.push(this)
this.show = this.expanded
this.inited = this.expanded
},

destroyed () {
cancel(rafID)
this.items.splice(this.index, 1)
},

methods: {
onClick () {
if (this.disabled) {
return
}

this.parent.switch(this.currentName, !this.expanded)
},

onTransitionEnd () {
if (!this.expanded) {
this.show = false
}
},
},
})
</script>
+

分析代码:

+
    +
  1. 通过 inject 接收父组件的依赖,并在 created 生命周期中进行校验和初始化
  2. +
  3. 子组件内容容器上同时运用 v-ifv-show 这样保证了,第一次时不做全部渲染,又保证了后续切换时,不需要进行频繁的重新生成dom
  4. +
  5. 如果不显示设置 name, 默认值为当前组件在折叠列表中的索引值
  6. +
  7. 通过 currentName 与 父组件的 value 值进行比较判断确定当前子项的展开状态
  8. +
  9. 它点击改变子项的状态时,监听展开状态,并在里面对展开内容,进行第一帧的raf动画,其他帧是css动画
  10. +
  11. 通过 onTransitionEnd 捕捉过渡结束状态,并同时改变 show 变量的状态
  12. +
+

样式代码如下:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

.collapse-item {
&__title {
.cell__right-icon::before {
transition: .3s
transform: rotate(90deg)
}

&::after {
visibility: hidden
}

&--expanded {
.cell__right-icon::before {
transform: rotate(-90deg)
}

&::after {
visibility: visible
}
}

&--disabled {
&,
& .cell__right-icon {
color: $gray
}

&:active {
background-color: #fff
}
}
}

&__wrapper {
overflow: hidden
will-change: height
transition: height .3s ease-in-out
}

&__content {
padding: 15px
background-color: #fff
}
}
+

从上述代码可知,针对 height 做过渡,实现平滑折叠效果

+

DEMO展示

点击下方链接查看 👇:
http://wechat.hand-china.com/hippius-ui/#/zh-CN/collapse

+

附录:

+
    +
  • raf 源码分析见 raf
  • +
+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/13/switch/index.html b/2019/03/13/switch/index.html new file mode 100644 index 0000000..4299195 --- /dev/null +++ b/2019/03/13/switch/index.html @@ -0,0 +1,1335 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Switch 开关组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Switch 开关组件

+ + + +
+ + + + + +
+ + + + + +

前言

switch 组件是一个很常用的基础组件,如下图所示:

+

switch

+

下面我们来一起开发一个自定义的 switch 组件吧

+

分析

因为 switch 组件是一个开关组件,它的可操作状态就和 checkbox 一样,所以,我们可以基于 <input type="checkbox"> 标签为基础,对它进行改造封装

+

实现

组件逻辑代码

我们可以在 switch 组件上创建双向数据绑定, 当用户触发 input 元素的输入事件时,自动更新到 switch 的数据

+
+

注意:内部的 input 元素的数据也是双向绑定

+
+

大致操作流程如下所示:

+
    +
  1. 在 computed 的 get 中 给 currentValue 赋初值
  2. +
  3. 当用户触发 input 的 chang 事件时,input 元素自动更新数据,也就是下文的 currentValue 变量, 同时发送一个自定义的 change 事件,停供给外界使用
  4. +
  5. currentValue 发生变化时,会触发它 setter 方法,我们在 computed 的 set 中 发射默认的 input 事件
  6. +
  7. 在父组件中 用 v-model 自动接收上一步 发射事件的值,更新 switch 组件选择状态
  8. +
+

具体代码如下所示:

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<div
:class="b()"
>
<input
:class="b('input', { disabled })"
:disabled="disabled"
v-model="currentValue"
type="checkbox"
@change="onChange"
>
</div>
</template>

<script>

export default {
name: 'switch',

props: {
value: Boolean,
disabled: Boolean,
},

computed: {
currentValue: {
get () {
return this.value
},

set (val) {
this.$emit('input', val)
},
},
},

methods: {
onChange () {
this.$nextTick(() => {
this.$emit('change', this.currentValue)
})
},
},
})
</script>
+

组件样式代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.switch
position: relative
display: inline-flex
align-items: center
font-size: 14px

&__input
display: inline-block
box-sizing: border-box
appearance: none
-webkit-appearance: none
outline: none
width: 52px
height: 32px
border: 1px solid #eee
border-radius: 32px
transition: background-color 0.1s, border 0.1s
&--disabled
opacity: 0.4
pointer-events: none

&::before,
&::after
content: ""
position: absolute
border-radius: 16px
top: 0px
left: 0px
bottom: 0px
right: 0px
transition: transform .4s cubic-bezier(0.4, 0.4, 0.25, 1.35)
background: #eee

&::after
width: 30px
height: 30px
border-radius: 15px
background: #fff
box-shadow: 0 1px 3px rgba(0, 0, 0, .3)
margin-top: 1px

&:checked
background: #1f8ceb
&::before
transform: scale(0)
&::after
transform: translateX(100% - 30px)
+

上述代码有以下几点需要注意的地方:

+

1: 设置 -webkit-appearance: none 去除 input 的原始外观
2: 通过 before 和 after 伪元素 构造 switch的动画元素
3: 通过 input:checked 选择器控制当选中时, before 和 after 的变化,配合 transition形成点击的动画效果

+

DEMO展示

点击下方链接查看 👇:
http://wechat.hand-china.com/hippius-ui/#/zh-CN/switch

+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2019/03/14/tabbar/index.html b/2019/03/14/tabbar/index.html new file mode 100644 index 0000000..8c7a5bb --- /dev/null +++ b/2019/03/14/tabbar/index.html @@ -0,0 +1,1325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tabbar 标签栏组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + +
+ + + +

Tabbar 标签栏组件

+ + + +
+ + + + + +
+ + + + + +

前言

标签栏组件是什么样子的呢? 看下图:

+

tabbar

+

下面我将分析如何实现效果

+
+

本文将不会给出具体的代码实现,但是会绘画出设计流程

+
+

实现

布局

    +
  1. 首先我们来说说布局,父组件其实只是一个容器组件,我们对它进行flex布局,并用 flex = 1 根据子元素个数等分其宽度
  2. +
  3. 子组件内部有2个元素,一个图标,对应图标下方的文字(附加功能右上角徽章,这个不做分析),同样也采用flex布局,然后做居中处理,不过元素排列方向通过 flex-flow: column 改变为竖排,这样大致布局也就基本完成了
  4. +
+

逻辑

逻辑代码分析见下图:

+

tabbar-logic

+

DEMO

点击下面👇链接展示:

+

http://wechat.hand-china.com/hippius-ui/#/zh-CN/tab-bar

+ + +
+ + + + + + + + + + + +
+ + + +
+ + + +
+ + + + + +
+
+ + +
+ + + + +
+ +
+ +
+ + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..5074313 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +www.daiwenbb.top \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 650f22f..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# hexo-blog -CR 所见、所思、所得 diff --git a/_config.yml b/_config.yml deleted file mode 100644 index deb67db..0000000 --- a/_config.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Hexo Configuration -## Docs: https://hexo.io/docs/configuration.html -## Source: https://github.com/hexojs/hexo/ - -# Site -title: Wolf Whistling -subtitle: -description: 虽是凉风起~ -keywords: -author: ShellWolf -language: zh-Hans -timezone: - -# URL -## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' -url: http://yoursite.com -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: next - -# Deployment -## Docs: https://hexo.io/zh-cn/docs/one-command-deployment -deploy: - type: git - repo: https://github.com/ShellWolf/ShellWolf.github.io.git - branch: gh-pages - -# Local search -## 添加百度/谷歌/本地 自定义站点内容搜索 -search: - path: search.xml - field: post - format: html - limit: 10000 diff --git a/archives/2018/11/index.html b/archives/2018/11/index.html new file mode 100644 index 0000000..1f23114 --- /dev/null +++ b/archives/2018/11/index.html @@ -0,0 +1,1124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2018/index.html b/archives/2018/index.html new file mode 100644 index 0000000..1c181b1 --- /dev/null +++ b/archives/2018/index.html @@ -0,0 +1,1124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2019/02/index.html b/archives/2019/02/index.html new file mode 100644 index 0000000..9ac7fc8 --- /dev/null +++ b/archives/2019/02/index.html @@ -0,0 +1,1124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2019/03/index.html b/archives/2019/03/index.html new file mode 100644 index 0000000..b43773d --- /dev/null +++ b/archives/2019/03/index.html @@ -0,0 +1,1443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2019/03/page/2/index.html b/archives/2019/03/page/2/index.html new file mode 100644 index 0000000..2f4e633 --- /dev/null +++ b/archives/2019/03/page/2/index.html @@ -0,0 +1,1198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2019/index.html b/archives/2019/index.html new file mode 100644 index 0000000..5d5c3ec --- /dev/null +++ b/archives/2019/index.html @@ -0,0 +1,1443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2019/page/2/index.html b/archives/2019/page/2/index.html new file mode 100644 index 0000000..235cb54 --- /dev/null +++ b/archives/2019/page/2/index.html @@ -0,0 +1,1233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/index.html b/archives/index.html new file mode 100644 index 0000000..e46ae2b --- /dev/null +++ b/archives/index.html @@ -0,0 +1,1443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/page/2/index.html b/archives/page/2/index.html new file mode 100644 index 0000000..f742d83 --- /dev/null +++ b/archives/page/2/index.html @@ -0,0 +1,1273 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 归档 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/CSS/index.html b/categories/CSS/index.html new file mode 100644 index 0000000..7a5bec6 --- /dev/null +++ b/categories/CSS/index.html @@ -0,0 +1,1155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: CSS | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/CSS3/index.html b/categories/CSS3/index.html new file mode 100644 index 0000000..f149bca --- /dev/null +++ b/categories/CSS3/index.html @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: CSS3 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/Util/index.html b/categories/Util/index.html new file mode 100644 index 0000000..1d55ed1 --- /dev/null +++ b/categories/Util/index.html @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Util | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Util/\345\207\275\346\225\260/index.html" "b/categories/Util/\345\207\275\346\225\260/index.html" new file mode 100644 index 0000000..28e84e7 --- /dev/null +++ "b/categories/Util/\345\207\275\346\225\260/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: 函数 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/Vue/BEM/index.html b/categories/Vue/BEM/index.html new file mode 100644 index 0000000..23beb26 --- /dev/null +++ b/categories/Vue/BEM/index.html @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: BEM | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/Vue/Icon/index.html b/categories/Vue/Icon/index.html new file mode 100644 index 0000000..88beda3 --- /dev/null +++ b/categories/Vue/Icon/index.html @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Icon | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/Vue/index.html b/categories/Vue/index.html new file mode 100644 index 0000000..7fb8265 --- /dev/null +++ b/categories/Vue/index.html @@ -0,0 +1,1337 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Vue | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\345\233\275\351\231\205\345\214\226/index.html" "b/categories/Vue/\345\233\275\351\231\205\345\214\226/index.html" new file mode 100644 index 0000000..6c0b995 --- /dev/null +++ "b/categories/Vue/\345\233\275\351\231\205\345\214\226/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: 国际化 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\210\206\346\236\220/Tabbar/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\210\206\346\236\220/Tabbar/index.html" new file mode 100644 index 0000000..07b2639 --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\210\206\346\236\220/Tabbar/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Tabbar | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\210\206\346\236\220/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\210\206\346\236\220/index.html" new file mode 100644 index 0000000..2afe256 --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\210\206\346\236\220/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: 组件分析 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Button/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Button/index.html" new file mode 100644 index 0000000..a4cc147 --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Button/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Button | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Collapse/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Collapse/index.html" new file mode 100644 index 0000000..56cbdcd --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Collapse/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Collapse | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Grid/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Grid/index.html" new file mode 100644 index 0000000..6fcf11f --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Grid/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Grid | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Ripple/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Ripple/index.html" new file mode 100644 index 0000000..e7c25c6 --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Ripple/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Ripple | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Spin/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Spin/index.html" new file mode 100644 index 0000000..e8b2745 --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Spin/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Spin | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Switch/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Switch/index.html" new file mode 100644 index 0000000..a7d6228 --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/Switch/index.html" @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: Switch | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/index.html" "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/index.html" new file mode 100644 index 0000000..63f033c --- /dev/null +++ "b/categories/Vue/\347\273\204\344\273\266\345\274\200\345\217\221/index.html" @@ -0,0 +1,1233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分类: 组件开发 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/categories/index.html b/categories/index.html new file mode 100644 index 0000000..4416d5a --- /dev/null +++ b/categories/index.html @@ -0,0 +1,1094 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + categories | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + +
+ + + +
+
+ +

categories

+ + + +
+ + + + +
+ + + + +
+ + + +
+ + + +
+ + +
+ + + + + +
+ + + + + + + + + +
+
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..99d3a3e --- /dev/null +++ b/css/main.css @@ -0,0 +1,2986 @@ +/* normalize.css v3.0.2 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} +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; /* 1 */ + vertical-align: baseline; /* 2 */ +} +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"], +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; /* 1 */ + padding: 0; /* 2 */ +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} +::selection { + background: #262a30; + color: #fff; +} +body { + position: relative; + font-family: "Microsoft YaHei", Verdana, sans-serif; + font-size: 16px; + line-height: 2; + color: #555; + background: #eee; +} +@media (max-width: 767px) { + body { + padding-right: 0 !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + body { + padding-right: 0 !important; + } +} +@media (min-width: 1600px) { + body { + font-size: 16px; + } +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + padding: 0; + font-weight: bold; + line-height: 1.5; + font-family: Georgia, sans; +} +h2, +h3, +h4, +h5, +h6 { + margin: 20px 0 15px; +} +h1 { + font-size: 22px; +} +@media (max-width: 767px) { + h1 { + font-size: 18px; + } +} +h2 { + font-size: 20px; +} +@media (max-width: 767px) { + h2 { + font-size: 16px; + } +} +h3 { + font-size: 18px; +} +@media (max-width: 767px) { + h3 { + font-size: 14px; + } +} +h4 { + font-size: 16px; +} +@media (max-width: 767px) { + h4 { + font-size: 12px; + } +} +h5 { + font-size: 14px; +} +@media (max-width: 767px) { + h5 { + font-size: 10px; + } +} +h6 { + font-size: 12px; +} +@media (max-width: 767px) { + h6 { + font-size: 8px; + } +} +p { + margin: 0 0 20px 0; +} +a { + color: #555; + text-decoration: none; + border-bottom: 1px solid #999; + word-wrap: break-word; +} +a:hover { + color: #222; + border-bottom-color: #222; +} +blockquote { + margin: 0; + padding: 0; +} +img { + display: block; + margin: auto; + max-width: 100%; + height: auto; +} +hr { + margin: 40px 0; + height: 3px; + border: none; + background-color: #ddd; + background-image: repeating-linear-gradient(-45deg, #fff, #fff 4px, transparent 4px, transparent 8px); +} +blockquote { + padding: 0 15px; + color: #666; + border-left: 4px solid #ddd; +} +blockquote cite::before { + content: "-"; + padding: 0 5px; +} +dt { + font-weight: 700; +} +dd { + margin: 0; + padding: 0; +} +.text-left { + text-align: left; +} +.text-center { + text-align: center; +} +.text-right { + text-align: right; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.center-block { + display: block; + margin-left: auto; + margin-right: auto; +} +.clearfix:before, +.clearfix:after { + content: " "; + display: table; +} +.clearfix:after { + clear: both; +} +.pullquote { + width: 45%; +} +.pullquote.left { + float: left; + margin-left: 5px; + margin-right: 10px; +} +.pullquote.right { + float: right; + margin-left: 10px; + margin-right: 5px; +} +.affix.affix.affix { + position: fixed; +} +.translation { + margin-top: -20px; + font-size: 14px; + color: #999; +} +.scrollbar-measure { + width: 100px; + height: 100px; + overflow: scroll; + position: absolute; + top: -9999px; +} +.use-motion .motion-element { + opacity: 0; +} +table { + margin: 20px 0; + width: 100%; + border-collapse: collapse; + border-spacing: 0; + border: 1px solid #ddd; + font-size: 14px; + table-layout: fixed; + word-wrap: break-all; +} +table>tbody>tr:nth-of-type(odd) { + background-color: #f9f9f9; +} +table>tbody>tr:hover { + background-color: #f5f5f5; +} +caption, +th, +td { + padding: 8px; + text-align: left; + vertical-align: middle; + font-weight: normal; +} +th, +td { + border-bottom: 3px solid #ddd; + border-right: 1px solid #eee; +} +th { + padding-bottom: 10px; + font-weight: 700; +} +td { + border-bottom-width: 1px; +} +html, +body { + height: 100%; +} +.container { + position: relative; + min-height: 100%; +} +.header-inner { + margin: 0 auto; + padding: 100px 0 70px; + width: calc(100% - 252px); +} +@media (min-width: 1600px) { + .container .header-inner { + width: 900px; + } +} +.main { + padding-bottom: 150px; +} +.main-inner { + margin: 0 auto; + width: calc(100% - 252px); +} +@media (min-width: 1600px) { + .container .main-inner { + width: 900px; + } +} +.footer { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + min-height: 50px; +} +.footer-inner { + box-sizing: border-box; + margin: 20px auto; + width: calc(100% - 252px); +} +@media (min-width: 1600px) { + .container .footer-inner { + width: 900px; + } +} +pre, +.highlight { + overflow: auto; + margin: 20px 0; + padding: 0; + font-size: 13px; + color: #eaeaea; + background: #000; + line-height: 1.6; +} +pre, +code { + font-family: "Input Mono", "PT Mono", Consolas, Monaco, Menlo, monospace; +} +code { + padding: 2px 4px; + word-wrap: break-word; + color: #555; + background: #eee; + border-radius: 3px; + font-size: 13px; +} +pre code { + padding: 0; + color: #eaeaea; + background: none; + text-shadow: none; +} +.highlight { + border-radius: 1px; +} +.highlight pre { + border: none; + margin: 0; + padding: 10px 0; +} +.highlight table { + margin: 0; + width: auto; + border: none; +} +.highlight td { + border: none; + padding: 0; +} +.highlight figcaption { + font-size: 1em; + color: #eaeaea; + line-height: 1em; + margin-bottom: 1em; +} +.highlight figcaption:before, +.highlight figcaption:after { + content: " "; + display: table; +} +.highlight figcaption:after { + clear: both; +} +.highlight figcaption a { + float: right; + color: #eaeaea; +} +.highlight figcaption a:hover { + border-bottom-color: #eaeaea; +} +.highlight .gutter pre { + padding-left: 10px; + padding-right: 10px; + color: #666; + text-align: right; + background-color: #292929; +} +.highlight .code pre { + width: 100%; + padding-left: 10px; + padding-right: 10px; + background-color: #000; +} +.highlight .line { + height: 20px; +} +.gutter { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.gist table { + width: auto; +} +.gist table td { + border: none; +} +pre .deletion { + background: #008000; +} +pre .addition { + background: #800000; +} +pre .meta { + color: #c397d8; +} +pre .comment { + color: #969896; +} +pre .variable, +pre .attribute, +pre .tag, +pre .regexp, +pre .ruby .constant, +pre .xml .tag .title, +pre .xml .pi, +pre .xml .doctype, +pre .html .doctype, +pre .css .id, +pre .css .class, +pre .css .pseudo { + color: #d54e53; +} +pre .number, +pre .preprocessor, +pre .built_in, +pre .literal, +pre .params, +pre .constant, +pre .command { + color: #e78c45; +} +pre .ruby .class .title, +pre .css .rules .attribute, +pre .string, +pre .value, +pre .inheritance, +pre .header, +pre .ruby .symbol, +pre .xml .cdata, +pre .special, +pre .number, +pre .formula { + color: #b9ca4a; +} +pre .title, +pre .css .hexcolor { + color: #70c0b1; +} +pre .function, +pre .python .decorator, +pre .python .title, +pre .ruby .function .title, +pre .ruby .title .keyword, +pre .perl .sub, +pre .javascript .title, +pre .coffeescript .title { + color: #7aa6da; +} +pre .keyword, +pre .javascript .function { + color: #c397d8; +} +.full-image.full-image.full-image { + border: none; + max-width: 100%; + width: auto; + margin: 20px auto; +} +@media (min-width: 992px) { + .full-image.full-image.full-image { + max-width: none; + width: 118%; + margin: 0 -9%; + } +} +.blockquote-center, +.page-home .post-type-quote blockquote, +.page-post-detail .post-type-quote blockquote { + position: relative; + margin: 40px 0; + padding: 0; + border-left: none; + text-align: center; +} +.blockquote-center::before, +.page-home .post-type-quote blockquote::before, +.page-post-detail .post-type-quote blockquote::before, +.blockquote-center::after, +.page-home .post-type-quote blockquote::after, +.page-post-detail .post-type-quote blockquote::after { + position: absolute; + content: ' '; + display: block; + width: 100%; + height: 24px; + opacity: 0.2; + background-repeat: no-repeat; + background-position: 0 -6px; + background-size: 22px 22px; +} +.blockquote-center::before, +.page-home .post-type-quote blockquote::before, +.page-post-detail .post-type-quote blockquote::before { + top: -20px; + background-image: url("../images/quote-l.svg"); + border-top: 1px solid #ccc; +} +.blockquote-center::after, +.page-home .post-type-quote blockquote::after, +.page-post-detail .post-type-quote blockquote::after { + bottom: -20px; + background-image: url("../images/quote-r.svg"); + border-bottom: 1px solid #ccc; + background-position: 100% 8px; +} +.blockquote-center p, +.page-home .post-type-quote blockquote p, +.page-post-detail .post-type-quote blockquote p, +.blockquote-center div, +.page-home .post-type-quote blockquote div, +.page-post-detail .post-type-quote blockquote div { + text-align: center; +} +.post .post-body .group-picture img { + box-sizing: border-box; + padding: 0 3px; + border: none; +} +.post .group-picture-row { + overflow: hidden; + margin-top: 6px; +} +.post .group-picture-row:first-child { + margin-top: 0; +} +.post .group-picture-column { + float: left; +} +.page-post-detail .post-body .group-picture-column { + float: none; + margin-top: 10px; + width: auto !important; +} +.page-post-detail .post-body .group-picture-column img { + margin: 0 auto; +} +.page-archive .group-picture-container { + overflow: hidden; +} +.page-archive .group-picture-row { + float: left; +} +.page-archive .group-picture-row:first-child { + margin-top: 6px; +} +.page-archive .group-picture-column { + max-width: 150px; + max-height: 150px; +} +.post-body .note { + position: relative; + padding: 15px; + margin-bottom: 20px; + border: 1px solid #eee; + border-left-width: 5px; + border-radius: 3px; +} +.post-body .note h2, +.post-body .note h3, +.post-body .note h4, +.post-body .note h5, +.post-body .note h6 { + margin-top: 0; + margin-bottom: 0; + border-bottom: initial; + padding-top: 0 !important; +} +.post-body .note p:first-child, +.post-body .note ul:first-child, +.post-body .note ol:first-child, +.post-body .note table:first-child, +.post-body .note pre:first-child, +.post-body .note blockquote:first-child { + margin-top: 0; +} +.post-body .note p:last-child, +.post-body .note ul:last-child, +.post-body .note ol:last-child, +.post-body .note table:last-child, +.post-body .note pre:last-child, +.post-body .note blockquote:last-child { + margin-bottom: 0; +} +.post-body .note.default { + border-left-color: #777; +} +.post-body .note.default h2, +.post-body .note.default h3, +.post-body .note.default h4, +.post-body .note.default h5, +.post-body .note.default h6 { + color: #777; +} +.post-body .note.primary { + border-left-color: #6f42c1; +} +.post-body .note.primary h2, +.post-body .note.primary h3, +.post-body .note.primary h4, +.post-body .note.primary h5, +.post-body .note.primary h6 { + color: #6f42c1; +} +.post-body .note.info { + border-left-color: #428bca; +} +.post-body .note.info h2, +.post-body .note.info h3, +.post-body .note.info h4, +.post-body .note.info h5, +.post-body .note.info h6 { + color: #428bca; +} +.post-body .note.success { + border-left-color: #5cb85c; +} +.post-body .note.success h2, +.post-body .note.success h3, +.post-body .note.success h4, +.post-body .note.success h5, +.post-body .note.success h6 { + color: #5cb85c; +} +.post-body .note.warning { + border-left-color: #f0ad4e; +} +.post-body .note.warning h2, +.post-body .note.warning h3, +.post-body .note.warning h4, +.post-body .note.warning h5, +.post-body .note.warning h6 { + color: #f0ad4e; +} +.post-body .note.danger { + border-left-color: #d9534f; +} +.post-body .note.danger h2, +.post-body .note.danger h3, +.post-body .note.danger h4, +.post-body .note.danger h5, +.post-body .note.danger h6 { + color: #d9534f; +} +.post-body .label { + display: inline; + padding: 0 2px; + white-space: nowrap; +} +.post-body .label.default { + background-color: #f0f0f0; +} +.post-body .label.primary { + background-color: #efe6f7; +} +.post-body .label.info { + background-color: #e5f2f8; +} +.post-body .label.success { + background-color: #e7f4e9; +} +.post-body .label.warning { + background-color: #fcf6e1; +} +.post-body .label.danger { + background-color: #fae8eb; +} +.post-body .tabs { + position: relative; + display: block; + margin-bottom: 20px; + padding-top: 10px; +} +.post-body .tabs ul.nav-tabs { + margin: 0; + padding: 0; + display: flex; + margin-bottom: -1px; +} +@media (max-width: 413px) { + .post-body .tabs ul.nav-tabs { + display: block; + margin-bottom: 5px; + } +} +.post-body .tabs ul.nav-tabs li.tab { + list-style-type: none !important; + margin: 0 0.25em 0 0; + border-top: 3px solid transparent; + border-left: 1px solid transparent; + border-right: 1px solid transparent; +} +@media (max-width: 413px) { + .post-body .tabs ul.nav-tabs li.tab { + margin: initial; + border-top: 1px solid transparent; + border-left: 3px solid transparent; + border-right: 1px solid transparent; + border-bottom: 1px solid transparent; + } +} +.post-body .tabs ul.nav-tabs li.tab a { + outline: 0; + border-bottom: initial; + display: block; + line-height: 1.8em; + padding: 0.25em 0.75em; + transition-duration: 0.2s; + transition-timing-function: ease-out; + transition-delay: 0s; +} +.post-body .tabs ul.nav-tabs li.tab a i { + width: 1.285714285714286em; +} +.post-body .tabs ul.nav-tabs li.tab.active { + border-top: 3px solid #fc6423; + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; + background-color: #fff; +} +@media (max-width: 413px) { + .post-body .tabs ul.nav-tabs li.tab.active { + border-top: 1px solid #ddd; + border-left: 3px solid #fc6423; + border-right: 1px solid #ddd; + border-bottom: 1px solid #ddd; + } +} +.post-body .tabs ul.nav-tabs li.tab.active a { + cursor: default; + color: #555; +} +.post-body .tabs .tab-content { + background-color: #fff; +} +.post-body .tabs .tab-content .tab-pane { + border: 1px solid #ddd; + padding: 20px 20px 0 20px; +} +.post-body .tabs .tab-content .tab-pane:not(.active) { + display: none !important; +} +.post-body .tabs .tab-content .tab-pane.active { + display: block !important; +} +.btn { + display: inline-block; + padding: 0 20px; + font-size: 14px; + color: #fff; + background: #222; + border: 2px solid #555; + text-decoration: none; + border-radius: 0; + transition-property: background-color; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} +.btn:hover, +.post-button .btn:hover { + border-color: #222; + color: #fff; + background: #222; +} +.btn-bar { + display: block; + width: 22px; + height: 2px; + background: #555; + border-radius: 1px; +} +.btn-bar+.btn-bar { + margin-top: 4px; +} +.pagination { + margin: 120px 0 40px; + text-align: center; + border-top: 1px solid #eee; +} +.page-number-basic, +.pagination .prev, +.pagination .next, +.pagination .page-number, +.pagination .space { + display: inline-block; + position: relative; + top: -1px; + margin: 0 10px; + padding: 0 10px; + line-height: 30px; +} +@media (max-width: 767px) { + .page-number-basic, + .pagination .prev, + .pagination .next, + .pagination .page-number, + .pagination .space { + margin: 0 5px; + } +} +.pagination .prev, +.pagination .next, +.pagination .page-number { + border-bottom: 0; + border-top: 1px solid #eee; + transition-property: border-color; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} +.pagination .prev:hover, +.pagination .next:hover, +.pagination .page-number:hover { + border-top-color: #222; +} +.pagination .space { + padding: 0; + margin: 0; +} +.pagination .prev { + margin-left: 0; +} +.pagination .next { + margin-right: 0; +} +.pagination .page-number.current { + color: #fff; + background: #ccc; + border-top-color: #ccc; +} +@media (max-width: 767px) { + .pagination { + border-top: none; + } + .pagination .prev, + .pagination .next, + .pagination .page-number { + margin-bottom: 10px; + border-top: 0; + border-bottom: 1px solid #eee; + } + .pagination .prev:hover, + .pagination .next:hover, + .pagination .page-number:hover { + border-bottom-color: #222; + } +} +.comments { + margin: 60px 20px 0; +} +.tag-cloud { + text-align: center; +} +.tag-cloud a { + display: inline-block; + margin: 10px; +} +.back-to-top { + box-sizing: border-box; + position: fixed; + bottom: -100px; + right: 30px; + z-index: 1050; + padding: 0 6px; + width: 24px; + background: #222; + font-size: 12px; + opacity: 0.6; + color: #fff; + cursor: pointer; + text-align: center; + -webkit-transform: translateZ(0); + transition-property: bottom; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} +@media (min-width: 768px) and (max-width: 991px) { + .back-to-top { + display: none !important; + } +} +@media (max-width: 767px) { + .back-to-top { + display: none !important; + } +} +.back-to-top.back-to-top-on { + bottom: 30px; +} +.header { + background: transparent; +} +.header-inner { + position: relative; +} +.headband { + height: 3px; + background: #222; +} +.site-meta { + margin: 0; + text-align: center; +} +@media (max-width: 767px) { + .site-meta { + text-align: center; + } +} +.brand { + position: relative; + display: inline-block; + padding: 0 40px; + color: #fff; + background: #222; + border-bottom: none; +} +.brand:hover { + color: #fff; +} +.logo { + display: inline-block; + margin-right: 5px; + line-height: 36px; + vertical-align: top; +} +.site-title { + display: inline-block; + vertical-align: top; + line-height: 36px; + font-size: 24px; + font-weight: normal; + font-family: 'Lobster Two', 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; +} +.site-subtitle { + margin-top: 10px; + font-size: 13px; + color: #ddd; +} +.use-motion .brand { + opacity: 0; +} +.use-motion .logo, +.use-motion .site-title, +.use-motion .site-subtitle { + opacity: 0; + position: relative; + top: -10px; +} +.site-nav-toggle { + display: none; + position: absolute; + top: 10px; + left: 10px; +} +@media (max-width: 767px) { + .site-nav-toggle { + display: block; + } +} +.site-nav-toggle button { + margin-top: 2px; + padding: 9px 10px; + background: transparent; + border: none; +} +@media (max-width: 767px) { + .site-nav { + display: none; + margin: 0 -10px; + padding: 0 10px; + clear: both; + border-top: 1px solid #ddd; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .site-nav { + display: block !important; + } +} +@media (min-width: 992px) { + .site-nav { + display: block !important; + } +} +.menu { + margin-top: 20px; + padding-left: 0; + text-align: center; +} +.menu .menu-item { + display: inline-block; + margin: 0 10px; + list-style: none; +} +@media screen and (max-width: 767px) { + .menu .menu-item { + margin-top: 10px; + } +} +.menu .menu-item a { + display: block; + font-size: 13px; + line-height: inherit; + border-bottom: 1px solid transparent; + transition-property: border-color; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} +.menu .menu-item a:hover, +.menu-item-active a { + border-bottom-color: #222; +} +.menu .menu-item .fa { + margin-right: 5px; +} +.use-motion .menu-item { + opacity: 0; +} +.post-body { + font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; +} +@media (max-width: 767px) { + .post-body { + word-break: break-word; + } +} +.post-body .fancybox img { + display: block !important; + margin: 0 auto; + cursor: pointer; + cursor: zoom-in; + cursor: -webkit-zoom-in; +} +.post-body .image-caption, +.post-body .figure .caption { + margin: 10px auto 15px; + text-align: center; + font-size: 16px; + color: #999; + font-weight: bold; + line-height: 1; +} +.post-sticky-flag { + display: inline-block; + font-size: 16px; + -ms-transform: rotate(30deg); + -webkit-transform: rotate(30deg); + -moz-transform: rotate(30deg); + -ms-transform: rotate(30deg); + -o-transform: rotate(30deg); + transform: rotate(30deg); +} +.posts-expand { + padding-top: 40px; +} +@media (max-width: 767px) { + .posts-expand { + margin: 0 20px; + } + .post-body pre { + padding: 10px; + } + .post-body pre .gutter pre { + padding-right: 10px; + } + .post-body .highlight { + margin-left: 0px; + margin-right: 0px; + padding: 0; + } + .post-body .highlight .gutter pre { + padding-right: 10px; + } +} +@media (min-width: 992px) { + .posts-expand .post-body { + text-align: justify; + } +} +.posts-expand .post-body h2, +.posts-expand .post-body h3, +.posts-expand .post-body h4, +.posts-expand .post-body h5, +.posts-expand .post-body h6 { + padding-top: 10px; +} +.posts-expand .post-body h2 .header-anchor, +.posts-expand .post-body h3 .header-anchor, +.posts-expand .post-body h4 .header-anchor, +.posts-expand .post-body h5 .header-anchor, +.posts-expand .post-body h6 .header-anchor { + float: right; + margin-left: 10px; + color: #ccc; + border-bottom-style: none; + visibility: hidden; +} +.posts-expand .post-body h2 .header-anchor:hover, +.posts-expand .post-body h3 .header-anchor:hover, +.posts-expand .post-body h4 .header-anchor:hover, +.posts-expand .post-body h5 .header-anchor:hover, +.posts-expand .post-body h6 .header-anchor:hover { + color: inherit; +} +.posts-expand .post-body h2:hover .header-anchor, +.posts-expand .post-body h3:hover .header-anchor, +.posts-expand .post-body h4:hover .header-anchor, +.posts-expand .post-body h5:hover .header-anchor, +.posts-expand .post-body h6:hover .header-anchor { + visibility: visible; +} +.posts-expand .post-body ul li { + list-style: circle; +} +.posts-expand .post-body img { + box-sizing: border-box; + margin: auto; + padding: 3px; + border: 1px solid #ddd; +} +.posts-expand .fancybox img { + margin: 0 auto; +} +@media (max-width: 767px) { + .posts-collapse { + margin: 0 20px; + } + .posts-collapse .post-title, + .posts-collapse .post-meta { + display: block; + width: auto; + text-align: left; + } +} +.posts-collapse { + position: relative; + z-index: 1010; + margin-left: 55px; +} +.posts-collapse::after { + content: " "; + position: absolute; + top: 20px; + left: 0; + margin-left: -2px; + width: 4px; + height: 100%; + background: #f5f5f5; + z-index: -1; +} +@media (max-width: 767px) { + .posts-collapse { + margin: 0 20px; + } +} +.posts-collapse .collection-title { + position: relative; + margin: 60px 0; +} +.posts-collapse .collection-title h1, +.posts-collapse .collection-title h2 { + margin-left: 20px; +} +.posts-collapse .collection-title small { + color: #bbb; + margin-left: 5px; +} +.posts-collapse .collection-title::before { + content: " "; + position: absolute; + left: 0; + top: 50%; + margin-left: -4px; + margin-top: -4px; + width: 8px; + height: 8px; + background: #bbb; + border-radius: 50%; +} +.posts-collapse .post { + margin: 30px 0; +} +.posts-collapse .post-header { + position: relative; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; + transition-property: border; + border-bottom: 1px dashed #ccc; +} +.posts-collapse .post-header::before { + content: " "; + position: absolute; + left: 0; + top: 12px; + width: 6px; + height: 6px; + margin-left: -4px; + background: #bbb; + border-radius: 50%; + border: 1px solid #fff; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; + transition-property: background; +} +.posts-collapse .post-header:hover { + border-bottom-color: #666; +} +.posts-collapse .post-header:hover::before { + background: #222; +} +.posts-collapse .post-meta { + position: absolute; + font-size: 12px; + left: 20px; + top: 5px; +} +.posts-collapse .post-comments-count { + display: none; +} +.posts-collapse .post-title { + margin-left: 60px; + font-size: 16px; + font-weight: normal; + line-height: inherit; +} +.posts-collapse .post-title::after { + margin-left: 3px; + opacity: 0.6; +} +.posts-collapse .post-title a { + color: #666; + border-bottom: none; +} +.page-home .post-type-quote .post-header, +.page-post-detail .post-type-quote .post-header, +.page-home .post-type-quote .post-tags, +.page-post-detail .post-type-quote .post-tags { + display: none; +} +.posts-expand .post-title { + font-size: 26px; + text-align: center; + word-break: break-word; + font-weight: 400; +} +@media (max-width: 767px) { + .posts-expand .post-title { + font-size: 22px; + } +} +.posts-expand .post-title-link { + display: inline-block; + position: relative; + color: #555; + border-bottom: none; + line-height: 1.2; + vertical-align: top; +} +.posts-expand .post-title-link::before { + content: ""; + position: absolute; + width: 100%; + height: 2px; + bottom: 0; + left: 0; + background-color: #000; + visibility: hidden; + -webkit-transform: scaleX(0); + -moz-transform: scaleX(0); + -ms-transform: scaleX(0); + -o-transform: scaleX(0); + transform: scaleX(0); + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} +.posts-expand .post-title-link:hover::before { + visibility: visible; + -webkit-transform: scaleX(1); + -moz-transform: scaleX(1); + -ms-transform: scaleX(1); + -o-transform: scaleX(1); + transform: scaleX(1); +} +.posts-expand .post-title-link .fa { + font-size: 16px; +} +.posts-expand .post-meta { + margin: 3px 0 60px 0; + color: #999; + font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; + font-size: 12px; + text-align: center; +} +.posts-expand .post-meta .post-category-list { + display: inline-block; + margin: 0; + padding: 3px; +} +.posts-expand .post-meta .post-category-list-link { + color: #999; +} +.posts-expand .post-meta .post-description { + font-size: 14px; + margin-top: 2px; +} +.post-wordcount { + display: inline-block; +} +.post-meta-divider { + margin: 0 0.5em; +} +.post-meta-item-icon { + margin-right: 3px; +} +@media (min-width: 768px) and (max-width: 991px) { + .post-meta-item-icon { + display: inline-block; + } +} +@media (max-width: 767px) { + .post-meta-item-icon { + display: inline-block; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .post-meta-item-text { + display: none; + } +} +@media (max-width: 767px) { + .post-meta-item-text { + display: none; + } +} +@media (max-width: 767px) { + .posts-expand .post-comments-count { + display: none; + } +} +.post-button { + margin-top: 50px; +} +.post-button .btn { + color: #555; + font-size: 14px; + background: #fff; + border-radius: 2px; + line-height: 2; + margin: 0 4px 8px 4px; +} +.post-button .fa-fw { + width: 1.285714285714286em; + text-align: left; +} +.posts-expand .post-tags { + margin-top: 40px; + text-align: center; +} +.posts-expand .post-tags a { + display: inline-block; + margin-right: 10px; + font-size: 13px; +} +.post-nav { + display: table; + margin-top: 15px; + width: 100%; + border-top: 1px solid #eee; +} +.post-nav-divider { + display: table-cell; + width: 10%; +} +.post-nav-item { + display: table-cell; + padding: 10px 0 0 0; + width: 45%; + vertical-align: top; +} +.post-nav-item a { + position: relative; + display: block; + line-height: 25px; + font-size: 14px; + color: #555; + border-bottom: none; +} +.post-nav-item a:hover { + color: #222; + border-bottom: none; +} +.post-nav-item a:active { + top: 2px; +} +.post-nav-item .fa { + position: absolute; + top: 8px; + left: 0; + font-size: 12px; +} +.post-nav-next a { + padding-left: 15px; +} +.post-nav-prev { + text-align: right; +} +.post-nav-prev a { + padding-right: 15px; +} +.post-nav-prev .fa { + right: 0; + left: auto; +} +.posts-expand .post-eof { + display: block; + margin: 80px auto 60px; + width: 8%; + height: 1px; + background: #ccc; + text-align: center; +} +.post:last-child .post-eof.post-eof.post-eof { + display: none; +} +.post-gallery { + display: table; + table-layout: fixed; + width: 100%; + border-collapse: separate; +} +.post-gallery-row { + display: table-row; +} +.post-gallery .post-gallery-img { + display: table-cell; + text-align: center; + vertical-align: middle; + border: none; +} +.post-gallery .post-gallery-img img { + max-width: 100%; + max-height: 100%; + border: none; +} +.fancybox-close, +.fancybox-close:hover { + border: none; +} +.rtl.post-body p, +.rtl.post-body a, +.rtl.post-body h1, +.rtl.post-body h2, +.rtl.post-body h3, +.rtl.post-body h4, +.rtl.post-body h5, +.rtl.post-body h6, +.rtl.post-body li, +.rtl.post-body ul, +.rtl.post-body ol { + direction: rtl; + font-family: UKIJ Ekran; +} +.rtl.post-title { + font-family: UKIJ Ekran; +} +.sidebar { + position: fixed; + right: 0; + top: 0; + bottom: 0; + width: 0; + z-index: 1040; + box-shadow: inset 0 2px 6px #000; + background: #222; + -webkit-transform: translateZ(0); +} +.sidebar a { + color: #999; + border-bottom-color: #555; +} +.sidebar a:hover { + color: #eee; +} +@media (min-width: 768px) and (max-width: 991px) { + .sidebar { + display: none !important; + } +} +@media (max-width: 767px) { + .sidebar { + display: none !important; + } +} +.sidebar-inner { + position: relative; + padding: 20px 10px; + color: #999; + text-align: center; +} +.sidebar-toggle { + position: fixed; + right: 30px; + bottom: 45px; + width: 14px; + height: 14px; + padding: 5px; + background: #222; + line-height: 0; + z-index: 1050; + cursor: pointer; + -webkit-transform: translateZ(0); +} +@media (min-width: 768px) and (max-width: 991px) { + .sidebar-toggle { + display: none !important; + } +} +@media (max-width: 767px) { + .sidebar-toggle { + display: none !important; + } +} +.sidebar-toggle-line { + position: relative; + display: inline-block; + vertical-align: top; + height: 2px; + width: 100%; + background: #fff; + margin-top: 3px; +} +.sidebar-toggle-line:first-child { + margin-top: 0; +} +.site-author-image { + display: block; + margin: 0 auto; + padding: 2px; + max-width: 120px; + height: auto; + border: 1px solid #eee; +} +.site-author-name { + margin: 0; + text-align: center; + color: #222; + font-weight: 600; +} +.site-description { + margin-top: 0; + text-align: center; + font-size: 13px; + color: #999; +} +.site-state { + overflow: hidden; + line-height: 1.4; + white-space: nowrap; + text-align: center; +} +.site-state-item { + display: inline-block; + padding: 0 15px; + border-left: 1px solid #eee; +} +.site-state-item:first-child { + border-left: none; +} +.site-state-item a { + border-bottom: none; +} +.site-state-item-count { + display: block; + text-align: center; + color: inherit; + font-weight: 600; + font-size: 16px; +} +.site-state-item-name { + font-size: 13px; + color: #999; +} +.feed-link { + margin-top: 20px; +} +.feed-link a { + display: inline-block; + padding: 0 15px; + color: #fc6423; + border: 1px solid #fc6423; + border-radius: 4px; +} +.feed-link a i { + color: #fc6423; + font-size: 14px; +} +.feed-link a:hover { + color: #fff; + background: #fc6423; +} +.feed-link a:hover i { + color: #fff; +} +.links-of-author { + margin-top: 20px; + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.links-of-author a { + display: inline-block; + vertical-align: middle; + margin-right: 10px; + margin-bottom: 10px; + border-bottom-color: #555; + font-size: 13px; +} +.links-of-author a:before { + display: inline-block; + vertical-align: middle; + margin-right: 3px; + content: " "; + width: 4px; + height: 4px; + border-radius: 50%; + background: #2fdaff; +} +.links-of-blogroll { + font-size: 13px; +} +.links-of-blogroll-title { + margin-top: 20px; + font-size: 14px; + font-weight: 600; +} +.links-of-blogroll-list { + margin: 0; + padding: 0; + list-style: none; +} +.links-of-blogroll-item { + padding: 2px 10px; +} +.sidebar-nav { + margin: 0 0 20px; + padding-left: 0; +} +.sidebar-nav li { + display: inline-block; + cursor: pointer; + border-bottom: 1px solid transparent; + font-size: 14px; + color: #555; +} +.sidebar-nav li:hover { + color: #fc6423; +} +.page-post-detail .sidebar-nav-toc { + padding: 0 5px; +} +.page-post-detail .sidebar-nav-overview { + margin-left: 10px; +} +.sidebar-nav .sidebar-nav-active { + color: #fc6423; + border-bottom-color: #fc6423; +} +.sidebar-nav .sidebar-nav-active:hover { + color: #fc6423; +} +.sidebar-panel { + display: none; +} +.sidebar-panel-active { + display: block; +} +.post-toc-empty { + font-size: 14px; + color: #666; +} +.post-toc-wrap { + overflow: hidden; +} +.post-toc { + overflow: auto; +} +.post-toc ol { + margin: 0; + padding: 0 2px 5px 10px; + text-align: left; + list-style: none; + font-size: 14px; +} +.post-toc ol > ol { + padding-left: 0; +} +.post-toc ol a { + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; + transition-property: all; + color: #666; + border-bottom-color: #ccc; +} +.post-toc ol a:hover { + color: #000; + border-bottom-color: #000; +} +.post-toc .nav-item { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + line-height: 1.8; +} +.post-toc .nav .nav-child { + display: none; +} +.post-toc .nav .active > .nav-child { + display: block; +} +.post-toc .nav .active-current > .nav-child { + display: block; +} +.post-toc .nav .active-current > .nav-child > .nav-item { + display: block; +} +.post-toc .nav .active > a { + color: #fc6423; + border-bottom-color: #fc6423; +} +.post-toc .nav .active-current > a { + color: #fc6423; +} +.post-toc .nav .active-current > a:hover { + color: #fc6423; +} +.footer { + font-size: 14px; + color: #999; +} +.footer img { + border: none; +} +.footer-inner { + text-align: center; +} +.with-love { + display: inline-block; + margin: 0 5px; +} +.powered-by, +.theme-info { + display: inline-block; +} +.powered-by { + margin-right: 10px; +} +.powered-by::after { + content: "|"; + padding-left: 10px; +} +.cc-license { + margin-top: 10px; + text-align: center; +} +.cc-license .cc-opacity { + opacity: 0.7; + border-bottom: none; +} +.cc-license .cc-opacity:hover { + opacity: 0.9; +} +.cc-license img { + display: inline-block; +} +.theme-next #ds-thread #ds-reset { + color: #555; +} +.theme-next #ds-thread #ds-reset .ds-replybox { + margin-bottom: 30px; +} +.theme-next #ds-thread #ds-reset .ds-replybox .ds-avatar, +.theme-next #ds-reset .ds-avatar img { + box-shadow: none; +} +.theme-next #ds-thread #ds-reset .ds-textarea-wrapper { + border-color: #c7d4e1; + background: none; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.theme-next #ds-thread #ds-reset .ds-textarea-wrapper textarea { + height: 60px; +} +.theme-next #ds-reset .ds-rounded-top { + border-radius: 0; +} +.theme-next #ds-thread #ds-reset .ds-post-toolbar { + box-sizing: border-box; + border: 1px solid #c7d4e1; + background: #f6f8fa; +} +.theme-next #ds-thread #ds-reset .ds-post-options { + height: 40px; + border: none; + background: none; +} +.theme-next #ds-thread #ds-reset .ds-toolbar-buttons { + top: 11px; +} +.theme-next #ds-thread #ds-reset .ds-sync { + top: 5px; +} +.theme-next #ds-thread #ds-reset .ds-post-button { + top: 4px; + right: 5px; + width: 90px; + height: 30px; + border: 1px solid #c5ced7; + border-radius: 3px; + background-image: linear-gradient(#fbfbfc, #f5f7f9); + color: #60676d; +} +.theme-next #ds-thread #ds-reset .ds-post-button:hover { + background-position: 0 -30px; + color: #60676d; +} +.theme-next #ds-thread #ds-reset .ds-comments-info { + padding: 10px 0; +} +.theme-next #ds-thread #ds-reset .ds-sort { + display: none; +} +.theme-next #ds-thread #ds-reset li.ds-tab a.ds-current { + border: none; + background: #f6f8fa; + color: #60676d; +} +.theme-next #ds-thread #ds-reset li.ds-tab a.ds-current:hover { + background-color: #e9f0f7; + color: #60676d; +} +.theme-next #ds-thread #ds-reset li.ds-tab a { + border-radius: 2px; + padding: 5px; +} +.theme-next #ds-thread #ds-reset .ds-login-buttons p { + color: #999; + line-height: 36px; +} +.theme-next #ds-thread #ds-reset .ds-login-buttons .ds-service-list li { + height: 28px; +} +.theme-next #ds-thread #ds-reset .ds-service-list a { + background: none; + padding: 5px; + border: 1px solid; + border-radius: 3px; + text-align: center; +} +.theme-next #ds-thread #ds-reset .ds-service-list a:hover { + color: #fff; + background: #666; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-weibo { + color: #fc9b00; + border-color: #fc9b00; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-weibo:hover { + background: #fc9b00; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-qq { + color: #60a3ec; + border-color: #60a3ec; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-qq:hover { + background: #60a3ec; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-renren { + color: #2e7ac4; + border-color: #2e7ac4; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-renren:hover { + background: #2e7ac4; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-douban { + color: #37994c; + border-color: #37994c; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-douban:hover { + background: #37994c; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-kaixin { + color: #fef20d; + border-color: #fef20d; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-kaixin:hover { + background: #fef20d; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-netease { + color: #f00; + border-color: #f00; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-netease:hover { + background: #f00; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-sohu { + color: #ffcb05; + border-color: #ffcb05; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-sohu:hover { + background: #ffcb05; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-baidu { + color: #2831e0; + border-color: #2831e0; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-baidu:hover { + background: #2831e0; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-google { + color: #166bec; + border-color: #166bec; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-google:hover { + background: #166bec; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-weixin { + color: #00ce0d; + border-color: #00ce0d; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-weixin:hover { + background: #00ce0d; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-more-services { + border: none; +} +.theme-next #ds-thread #ds-reset .ds-service-list .ds-more-services:hover { + background: none; +} +.theme-next #ds-reset .duoshuo-ua-admin { + display: inline-block; + color: #f00; +} +.theme-next #ds-reset .duoshuo-ua-platform, +.theme-next #ds-reset .duoshuo-ua-browser { + color: #ccc; +} +.theme-next #ds-reset .duoshuo-ua-platform .fa, +.theme-next #ds-reset .duoshuo-ua-browser .fa { + display: inline-block; + margin-right: 3px; +} +.theme-next #ds-reset .duoshuo-ua-separator { + display: inline-block; + margin-left: 5px; +} +.theme-next .this_ua { + background-color: #ccc !important; + border-radius: 4px; + padding: 0 5px !important; + margin: 1px 1px !important; + border: 1px solid #bbb !important; + color: #fff; + display: inline-block !important; +} +.theme-next .this_ua.admin { + background-color: #d9534f !important; + border-color: #d9534f !important; +} +.theme-next .this_ua.platform.iOS, +.theme-next .this_ua.platform.Mac, +.theme-next .this_ua.platform.Windows { + background-color: #39b3d7 !important; + border-color: #46b8da !important; +} +.theme-next .this_ua.platform.Linux { + background-color: #3a3a3a !important; + border-color: #1f1f1f !important; +} +.theme-next .this_ua.platform.Android { + background-color: #00c47d !important; + border-color: #01b171 !important; +} +.theme-next .this_ua.browser.Mobile, +.theme-next .this_ua.browser.Chrome { + background-color: #5cb85c !important; + border-color: #4cae4c !important; +} +.theme-next .this_ua.browser.Firefox { + background-color: #f0ad4e !important; + border-color: #eea236 !important; +} +.theme-next .this_ua.browser.Maxthon, +.theme-next .this_ua.browser.IE { + background-color: #428bca !important; + border-color: #357ebd !important; +} +.theme-next .this_ua.browser.baidu, +.theme-next .this_ua.browser.UCBrowser, +.theme-next .this_ua.browser.Opera { + background-color: #d9534f !important; + border-color: #d43f3a !important; +} +.theme-next .this_ua.browser.Android, +.theme-next .this_ua.browser.QQBrowser { + background-color: #78ace9 !important; + border-color: #4cae4c !important; +} +.post-spread { + margin-top: 20px; + text-align: center; +} +.jiathis_style { + display: inline-block; +} +.jiathis_style a { + border: none; +} +.fa { + font-family: FontAwesome !important; +} +.post-spread { + margin-top: 20px; + text-align: center; +} +.bdshare-slide-button-box a { + border: none; +} +.bdsharebuttonbox { + display: inline-block; +} +.bdsharebuttonbox a { + border: none; +} +.local-search-pop-overlay { + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 2080; + background-color: rgba(0,0,0,0.3); +} +.local-search-popup { + display: none; + position: fixed; + top: 10%; + left: 50%; + margin-left: -350px; + width: 700px; + height: 80%; + padding: 0; + background: #fff; + color: #333; + z-index: 9999; + border-radius: 5px; +} +@media (max-width: 767px) { + .local-search-popup { + padding: 0; + top: 0; + left: 0; + margin: 0; + width: 100%; + height: 100%; + border-radius: 0; + } +} +.local-search-popup ul.search-result-list { + padding: 0; + margin: 0 5px; +} +.local-search-popup p.search-result { + border-bottom: 1px dashed #ccc; + padding: 5px 0; +} +.local-search-popup a.search-result-title { + font-weight: bold; + font-size: 16px; +} +.local-search-popup .search-keyword { + border-bottom: 1px dashed #f00; + font-weight: bold; + color: #f00; +} +.local-search-popup .local-search-header { + padding: 5px; + height: 36px; + background: #f5f5f5; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +.local-search-popup #local-search-result { + overflow: auto; + position: relative; + padding: 5px 25px; + height: calc(100% - 55px); +} +.local-search-popup .local-search-input-wrapper { + display: inline-block; + width: calc(100% - 90px); + height: 36px; + line-height: 36px; + padding: 0 5px; +} +.local-search-popup .local-search-input-wrapper input { + padding: 8px 0; + height: 20px; + display: block; + width: 100%; + outline: none; + border: none; + background: transparent; + vertical-align: middle; +} +.local-search-popup .search-icon, +.local-search-popup .popup-btn-close { + display: inline-block; + font-size: 18px; + color: #999; + height: 36px; + width: 18px; + padding-left: 10px; + padding-right: 10px; +} +.local-search-popup .search-icon { + float: left; +} +.local-search-popup .popup-btn-close { + border-left: 1px solid #eee; + float: right; + cursor: pointer; +} +.local-search-popup #no-result { + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%, -50%); + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + -o-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + color: #ccc; +} +.site-uv, +.site-pv, +.page-pv { + display: inline-block; +} +.site-uv .busuanzi-value, +.site-pv .busuanzi-value, +.page-pv .busuanzi-value { + margin: 0 5px; +} +.site-uv { + margin-right: 10px; +} +.site-uv::after { + content: "|"; + padding-left: 10px; +} +.use-motion .post { + opacity: 0; +} +.page-archive .archive-page-counter { + position: relative; + top: 3px; + left: 20px; +} +@media (max-width: 767px) { + .page-archive .archive-page-counter { + top: 5px; + } +} +.page-archive .posts-collapse .archive-move-on { + position: absolute; + top: 11px; + left: 0; + margin-left: -6px; + width: 10px; + height: 10px; + opacity: 0.5; + background: #555; + border: 1px solid #fff; + border-radius: 50%; +} +.category-all-page .category-all-title { + text-align: center; +} +.category-all-page .category-all { + margin-top: 20px; +} +.category-all-page .category-list { + margin: 0; + padding: 0; + list-style: none; +} +.category-all-page .category-list-item { + margin: 5px 10px; +} +.category-all-page .category-list-count { + color: #bbb; +} +.category-all-page .category-list-count:before { + display: inline; + content: " ("; +} +.category-all-page .category-list-count:after { + display: inline; + content: ") "; +} +.category-all-page .category-list-child { + padding-left: 10px; +} +#schedule ul#event-list { + padding-left: 30px; +} +#schedule ul#event-list hr { + margin: 20px 0 45px 0 !important; + background: #222; +} +#schedule ul#event-list hr:after { + display: inline-block; + content: 'NOW'; + background: #222; + color: #fff; + font-weight: bold; + text-align: right; + padding: 0 5px; +} +#schedule ul#event-list li.event { + margin: 20px 0px; + background: #f9f9f9; + padding-left: 10px; + min-height: 40px; +} +#schedule ul#event-list li.event h2.event-summary { + margin: 0; + padding-bottom: 3px; +} +#schedule ul#event-list li.event h2.event-summary:before { + display: inline-block; + font-family: FontAwesome; + font-size: 8px; + content: '\f111'; + vertical-align: middle; + margin-right: 25px; + color: #bbb; +} +#schedule ul#event-list li.event span.event-relative-time { + display: inline-block; + font-size: 12px; + font-weight: 400; + padding-left: 12px; + color: #bbb; +} +#schedule ul#event-list li.event span.event-details { + display: block; + color: #bbb; + margin-left: 56px; + padding-top: 3px; + padding-bottom: 6px; + text-indent: -24px; + line-height: 18px; +} +#schedule ul#event-list li.event span.event-details:before { + text-indent: 0; + display: inline-block; + width: 14px; + font-family: FontAwesome; + text-align: center; + margin-right: 9px; + color: #bbb; +} +#schedule ul#event-list li.event span.event-details.event-location:before { + content: '\f041'; +} +#schedule ul#event-list li.event span.event-details.event-duration:before { + content: '\f017'; +} +#schedule ul#event-list li.event-past { + background: #fcfcfc; +} +#schedule ul#event-list li.event-past > * { + opacity: 0.6; +} +#schedule ul#event-list li.event-past h2.event-summary { + color: #bbb; +} +#schedule ul#event-list li.event-past h2.event-summary:before { + color: #dfdfdf; +} +#schedule ul#event-list li.event-now { + background: #222; + color: #fff; + padding: 15px 0 15px 10px; +} +#schedule ul#event-list li.event-now h2.event-summary:before { + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -ms-transform: scale(1.2); + -o-transform: scale(1.2); + transform: scale(1.2); + color: #fff; + animation: dot-flash 1s alternate infinite ease-in-out; +} +#schedule ul#event-list li.event-now * { + color: #fff !important; +} +@-moz-keyframes dot-flash { + from { + opacity: 1; + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + to { + opacity: 0; + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } +} +@-webkit-keyframes dot-flash { + from { + opacity: 1; + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + to { + opacity: 0; + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } +} +@-o-keyframes dot-flash { + from { + opacity: 1; + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + to { + opacity: 0; + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } +} +@keyframes dot-flash { + from { + opacity: 1; + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); + } + to { + opacity: 0; + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } +} +.page-post-detail .sidebar-toggle-line { + background: #fc6423; +} +.page-post-detail .comments { + overflow: hidden; +} +.header { + position: relative; + margin: 0 auto; + width: 75%; +} +@media (min-width: 768px) and (max-width: 991px) { + .header { + width: auto; + } +} +@media (max-width: 767px) { + .header { + width: auto; + } +} +.header-inner { + position: absolute; + top: 0; + overflow: hidden; + padding: 0; + width: 240px; + background: #fff; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); + border-radius: initial; +} +@media (min-width: 1600px) { + .container .header-inner { + width: 240px; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .header-inner { + position: relative; + width: auto; + border-radius: initial; + } +} +@media (max-width: 767px) { + .header-inner { + position: relative; + width: auto; + border-radius: initial; + } +} +.main:before, +.main:after { + content: " "; + display: table; +} +.main:after { + clear: both; +} +@media (min-width: 768px) and (max-width: 991px) { + .main { + padding-bottom: 100px; + } +} +@media (max-width: 767px) { + .main { + padding-bottom: 100px; + } +} +.container .main-inner { + width: 75%; +} +@media (min-width: 768px) and (max-width: 991px) { + .container .main-inner { + width: auto; + } +} +@media (max-width: 767px) { + .container .main-inner { + width: auto; + } +} +.content-wrap { + float: right; + box-sizing: border-box; + padding: 40px; + width: calc(100% - 252px); + background: rgba(255,255,255,0.6); + min-height: 700px; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); + border-radius: initial; +} +@media (min-width: 768px) and (max-width: 991px) { + .content-wrap { + width: 100%; + padding: 20px; + border-radius: initial; + } +} +@media (max-width: 767px) { + .content-wrap { + width: 100%; + padding: 20px; + min-height: auto; + border-radius: initial; + } +} +.sidebar { + position: static; + float: left; + margin-top: 300px; + width: 240; + background: #eee; + box-shadow: none; +} +@media (min-width: 768px) and (max-width: 991px) { + .sidebar { + display: none; + } +} +@media (max-width: 767px) { + .sidebar { + display: none; + } +} +.sidebar-toggle { + display: none; +} +.footer-inner { + width: 75%; + padding-left: 260px; +} +@media (min-width: 768px) and (max-width: 991px) { + .footer-inner { + width: auto; + padding-left: 0 !important; + padding-right: 0 !important; + } +} +@media (max-width: 767px) { + .footer-inner { + width: auto; + padding-left: 0 !important; + padding-right: 0 !important; + } +} +.sidebar-position-right .header-inner { + right: 0; +} +.sidebar-position-right .content-wrap { + float: left; +} +.sidebar-position-right .sidebar { + float: right; +} +.sidebar-position-right .footer-inner { + padding-left: 0; + padding-right: 260px; +} +.site-brand-wrapper { + position: relative; +} +.site-meta { + padding: 20px 0; + color: #fff; + background: #222; +} +@media (min-width: 768px) and (max-width: 991px) { + .site-meta { + box-shadow: 0 0 16px rgba(0,0,0,0.5); + } +} +@media (max-width: 767px) { + .site-meta { + box-shadow: 0 0 16px rgba(0,0,0,0.5); + } +} +.brand { + padding: 0; + background: none; +} +.brand:hover { + color: #fff; +} +.site-subtitle { + margin: 10px 10px 0; + font-weight: initial; +} +.site-search form { + display: none; +} +.site-nav { + border-top: none; +} +@media (min-width: 768px) and (max-width: 991px) { + .site-nav { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .site-nav-on { + display: block !important; + } +} +.menu .menu-item { + display: block; + margin: 0; +} +.menu .menu-item a { + position: relative; + box-sizing: border-box; + padding: 5px 20px; + text-align: left; + line-height: inherit; + transition-property: background-color; + transition-duration: 0.2s; + transition-timing-function: ease-in-out; + transition-delay: 0s; +} +.menu .menu-item a:hover, +.menu-item-active a { + background: #f9f9f9; + border-bottom-color: #fff; +} +.menu .menu-item br { + display: none; +} +.menu-item-active a:after { + content: " "; + position: absolute; + top: 50%; + margin-top: -3px; + right: 15px; + width: 6px; + height: 6px; + border-radius: 50%; + background-color: #bbb; +} +.btn-bar { + background-color: #fff; +} +.site-nav-toggle { + left: 20px; + top: 50%; + -webkit-transform: translateY(-50%); + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); +} +@media (min-width: 768px) and (max-width: 991px) { + .site-nav-toggle { + display: block; + } +} +.use-motion .sidebar .motion-element { + opacity: 1; +} +.sidebar { + display: none; + right: auto; + bottom: auto; + -webkit-transform: none; +} +.sidebar-inner { + box-sizing: border-box; + width: 240px; + color: #555; + background: #fff; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12), 0 -1px 0.5px 0 rgba(0,0,0,0.09); + border-radius: initial; +} +.sidebar-inner.affix { + position: fixed; + top: 12px; +} +.site-overview { + margin: 0 2px; + text-align: left; +} +.site-author:before, +.site-author:after { + content: " "; + display: table; +} +.site-author:after { + clear: both; +} +.sidebar a { + color: #555; +} +.sidebar a:hover { + color: #222; +} +.links-of-author-item a:before { + display: none; +} +.links-of-author-item a { + border-bottom: none; + text-decoration: underline; +} +.feed-link { + border-top: 1px dotted #ccc; + border-bottom: 1px dotted #ccc; + text-align: center; +} +.feed-link a { + display: block; + color: #fc6423; + border: none; +} +.feed-link a:hover { + background: none; + color: #e34603; +} +.feed-link a:hover i { + color: #e34603; +} +.links-of-author:before, +.links-of-author:after { + content: " "; + display: table; +} +.links-of-author:after { + clear: both; +} +.links-of-author-item { + margin: 5px 0 0; + width: 50%; +} +.links-of-author-item a { + box-sizing: border-box; + display: inline-block; + margin-right: 0; + margin-bottom: 0; + padding: 0 5px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.links-of-author-item a { + display: block; + text-decoration: none; +} +.links-of-author-item a:hover { + border-radius: 4px; + background: #eee; +} +.links-of-author-item .fa { + margin-right: 2px; + font-size: 16px; +} +.links-of-author-item .fa-globe { + font-size: 15px; +} +.links-of-blogroll { + margin-top: 20px; + padding: 3px 0 0; + border-top: 1px dotted #ccc; +} +.links-of-blogroll-title { + margin-top: 0; +} +.links-of-blogroll-item { + padding: 0; +} +.links-of-blogroll-inline:before, +.links-of-blogroll-inline:after { + content: " "; + display: table; +} +.links-of-blogroll-inline:after { + clear: both; +} +.links-of-blogroll-inline .links-of-blogroll-item { + margin: 5px 0 0; + width: 50%; +} +.links-of-blogroll-inline .links-of-blogroll-item a { + box-sizing: border-box; + display: inline-block; + margin-right: 0; + margin-bottom: 0; + padding: 0 5px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +@media (max-width: 767px) { + .post-body { + text-align: justify; + } +} +.content-wrap { + padding: initial; + background: initial; + box-shadow: initial; + border-radius: initial; +} +.post-block { + margin-bottom: 12px; + background: #fff; + padding: 40px; + box-shadow: 0 2px 2px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.06), 0 1px 5px 0 rgba(0,0,0,0.12); + border-radius: initial; +} +.posts-expand { + padding-top: initial; +} +.post-eof { + display: none !important; +} +.main { + padding-bottom: initial; +} +.footer { + bottom: auto; +} diff --git a/source/favicon.ico b/favicon.ico similarity index 100% rename from source/favicon.ico rename to favicon.ico diff --git a/themes/next/source/images/algolia_logo.svg b/images/algolia_logo.svg similarity index 100% rename from themes/next/source/images/algolia_logo.svg rename to images/algolia_logo.svg diff --git a/themes/next/source/images/avatar.gif b/images/avatar.gif similarity index 100% rename from themes/next/source/images/avatar.gif rename to images/avatar.gif diff --git a/source/images/avatar.png b/images/avatar.png similarity index 100% rename from source/images/avatar.png rename to images/avatar.png diff --git a/source/images/border-radius1.png b/images/border-radius1.png similarity index 100% rename from source/images/border-radius1.png rename to images/border-radius1.png diff --git a/source/images/border-radius2.png b/images/border-radius2.png similarity index 100% rename from source/images/border-radius2.png rename to images/border-radius2.png diff --git a/source/images/border-radius3.png b/images/border-radius3.png similarity index 100% rename from source/images/border-radius3.png rename to images/border-radius3.png diff --git a/source/images/border.png b/images/border.png similarity index 100% rename from source/images/border.png rename to images/border.png diff --git a/source/images/button-bg.png b/images/button-bg.png similarity index 100% rename from source/images/button-bg.png rename to images/button-bg.png diff --git a/source/images/button.png b/images/button.png similarity index 100% rename from source/images/button.png rename to images/button.png diff --git a/themes/next/source/images/cc-by-nc-nd.svg b/images/cc-by-nc-nd.svg similarity index 100% rename from themes/next/source/images/cc-by-nc-nd.svg rename to images/cc-by-nc-nd.svg diff --git a/themes/next/source/images/cc-by-nc-sa.svg b/images/cc-by-nc-sa.svg similarity index 100% rename from themes/next/source/images/cc-by-nc-sa.svg rename to images/cc-by-nc-sa.svg diff --git a/themes/next/source/images/cc-by-nc.svg b/images/cc-by-nc.svg similarity index 100% rename from themes/next/source/images/cc-by-nc.svg rename to images/cc-by-nc.svg diff --git a/themes/next/source/images/cc-by-nd.svg b/images/cc-by-nd.svg similarity index 100% rename from themes/next/source/images/cc-by-nd.svg rename to images/cc-by-nd.svg diff --git a/themes/next/source/images/cc-by-sa.svg b/images/cc-by-sa.svg similarity index 100% rename from themes/next/source/images/cc-by-sa.svg rename to images/cc-by-sa.svg diff --git a/themes/next/source/images/cc-by.svg b/images/cc-by.svg similarity index 100% rename from themes/next/source/images/cc-by.svg rename to images/cc-by.svg diff --git a/themes/next/source/images/cc-zero.svg b/images/cc-zero.svg similarity index 100% rename from themes/next/source/images/cc-zero.svg rename to images/cc-zero.svg diff --git a/source/images/collapse.png b/images/collapse.png similarity index 100% rename from source/images/collapse.png rename to images/collapse.png diff --git a/source/images/i18n.gif b/images/i18n.gif similarity index 100% rename from source/images/i18n.gif rename to images/i18n.gif diff --git a/source/images/icon-ttf.gif b/images/icon-ttf.gif similarity index 100% rename from source/images/icon-ttf.gif rename to images/icon-ttf.gif diff --git a/source/images/icon.jpg b/images/icon.jpg similarity index 100% rename from source/images/icon.jpg rename to images/icon.jpg diff --git a/source/images/layout.png b/images/layout.png similarity index 100% rename from source/images/layout.png rename to images/layout.png diff --git a/themes/next/source/images/loading.gif b/images/loading.gif similarity index 100% rename from themes/next/source/images/loading.gif rename to images/loading.gif diff --git a/source/images/loading.png b/images/loading.png similarity index 100% rename from source/images/loading.png rename to images/loading.png diff --git a/themes/next/source/images/placeholder.gif b/images/placeholder.gif similarity index 100% rename from themes/next/source/images/placeholder.gif rename to images/placeholder.gif diff --git a/themes/next/source/images/quote-l.svg b/images/quote-l.svg similarity index 100% rename from themes/next/source/images/quote-l.svg rename to images/quote-l.svg diff --git a/themes/next/source/images/quote-r.svg b/images/quote-r.svg similarity index 100% rename from themes/next/source/images/quote-r.svg rename to images/quote-r.svg diff --git a/source/images/ripple-circle.gif b/images/ripple-circle.gif similarity index 100% rename from source/images/ripple-circle.gif rename to images/ripple-circle.gif diff --git a/source/images/ripple.png b/images/ripple.png similarity index 100% rename from source/images/ripple.png rename to images/ripple.png diff --git a/source/images/rotate.png b/images/rotate.png similarity index 100% rename from source/images/rotate.png rename to images/rotate.png diff --git a/source/images/rotate1.png b/images/rotate1.png similarity index 100% rename from source/images/rotate1.png rename to images/rotate1.png diff --git a/source/images/rotate3.png b/images/rotate3.png similarity index 100% rename from source/images/rotate3.png rename to images/rotate3.png diff --git a/themes/next/source/images/searchicon.png b/images/searchicon.png similarity index 100% rename from themes/next/source/images/searchicon.png rename to images/searchicon.png diff --git a/source/images/spin.png b/images/spin.png similarity index 100% rename from source/images/spin.png rename to images/spin.png diff --git a/source/images/spin1.png b/images/spin1.png similarity index 100% rename from source/images/spin1.png rename to images/spin1.png diff --git a/source/images/spin2.png b/images/spin2.png similarity index 100% rename from source/images/spin2.png rename to images/spin2.png diff --git a/source/images/switch.png b/images/switch.png similarity index 100% rename from source/images/switch.png rename to images/switch.png diff --git a/source/images/tabbar-logic.png b/images/tabbar-logic.png similarity index 100% rename from source/images/tabbar-logic.png rename to images/tabbar-logic.png diff --git a/source/images/tabbar.png b/images/tabbar.png similarity index 100% rename from source/images/tabbar.png rename to images/tabbar.png diff --git a/index.html b/index.html new file mode 100644 index 0000000..40bb538 --- /dev/null +++ b/index.html @@ -0,0 +1,2859 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/next/source/js/src/affix.js b/js/src/affix.js similarity index 100% rename from themes/next/source/js/src/affix.js rename to js/src/affix.js diff --git a/themes/next/source/js/src/algolia-search.js b/js/src/algolia-search.js similarity index 100% rename from themes/next/source/js/src/algolia-search.js rename to js/src/algolia-search.js diff --git a/themes/next/source/js/src/bootstrap.js b/js/src/bootstrap.js similarity index 100% rename from themes/next/source/js/src/bootstrap.js rename to js/src/bootstrap.js diff --git a/themes/next/source/js/src/exturl.js b/js/src/exturl.js similarity index 100% rename from themes/next/source/js/src/exturl.js rename to js/src/exturl.js diff --git a/themes/next/source/js/src/hook-duoshuo.js b/js/src/hook-duoshuo.js similarity index 100% rename from themes/next/source/js/src/hook-duoshuo.js rename to js/src/hook-duoshuo.js diff --git a/themes/next/source/js/src/js.cookie.js b/js/src/js.cookie.js similarity index 100% rename from themes/next/source/js/src/js.cookie.js rename to js/src/js.cookie.js diff --git a/themes/next/source/js/src/motion.js b/js/src/motion.js similarity index 100% rename from themes/next/source/js/src/motion.js rename to js/src/motion.js diff --git a/themes/next/source/js/src/post-details.js b/js/src/post-details.js similarity index 100% rename from themes/next/source/js/src/post-details.js rename to js/src/post-details.js diff --git a/themes/next/source/js/src/schemes/pisces.js b/js/src/schemes/pisces.js similarity index 100% rename from themes/next/source/js/src/schemes/pisces.js rename to js/src/schemes/pisces.js diff --git a/themes/next/source/js/src/scroll-cookie.js b/js/src/scroll-cookie.js similarity index 100% rename from themes/next/source/js/src/scroll-cookie.js rename to js/src/scroll-cookie.js diff --git a/themes/next/source/js/src/scrollspy.js b/js/src/scrollspy.js similarity index 100% rename from themes/next/source/js/src/scrollspy.js rename to js/src/scrollspy.js diff --git a/themes/next/source/js/src/utils.js b/js/src/utils.js similarity index 100% rename from themes/next/source/js/src/utils.js rename to js/src/utils.js diff --git a/themes/next/source/lib/Han/dist/font/han-space.otf b/lib/Han/dist/font/han-space.otf similarity index 100% rename from themes/next/source/lib/Han/dist/font/han-space.otf rename to lib/Han/dist/font/han-space.otf diff --git a/themes/next/source/lib/Han/dist/font/han-space.woff b/lib/Han/dist/font/han-space.woff old mode 100755 new mode 100644 similarity index 100% rename from themes/next/source/lib/Han/dist/font/han-space.woff rename to lib/Han/dist/font/han-space.woff diff --git a/themes/next/source/lib/Han/dist/font/han.otf b/lib/Han/dist/font/han.otf similarity index 100% rename from themes/next/source/lib/Han/dist/font/han.otf rename to lib/Han/dist/font/han.otf diff --git a/themes/next/source/lib/Han/dist/font/han.woff b/lib/Han/dist/font/han.woff similarity index 100% rename from themes/next/source/lib/Han/dist/font/han.woff rename to lib/Han/dist/font/han.woff diff --git a/themes/next/source/lib/Han/dist/han.css b/lib/Han/dist/han.css similarity index 100% rename from themes/next/source/lib/Han/dist/han.css rename to lib/Han/dist/han.css diff --git a/themes/next/source/lib/Han/dist/han.js b/lib/Han/dist/han.js similarity index 100% rename from themes/next/source/lib/Han/dist/han.js rename to lib/Han/dist/han.js diff --git a/themes/next/source/lib/Han/dist/han.min.css b/lib/Han/dist/han.min.css similarity index 100% rename from themes/next/source/lib/Han/dist/han.min.css rename to lib/Han/dist/han.min.css diff --git a/themes/next/source/lib/Han/dist/han.min.js b/lib/Han/dist/han.min.js similarity index 100% rename from themes/next/source/lib/Han/dist/han.min.js rename to lib/Han/dist/han.min.js diff --git a/themes/next/source/lib/algolia-instant-search/instantsearch.min.css b/lib/algolia-instant-search/instantsearch.min.css similarity index 100% rename from themes/next/source/lib/algolia-instant-search/instantsearch.min.css rename to lib/algolia-instant-search/instantsearch.min.css diff --git a/themes/next/source/lib/algolia-instant-search/instantsearch.min.js b/lib/algolia-instant-search/instantsearch.min.js similarity index 100% rename from themes/next/source/lib/algolia-instant-search/instantsearch.min.js rename to lib/algolia-instant-search/instantsearch.min.js diff --git a/themes/next/source/lib/canvas-nest/canvas-nest.min.js b/lib/canvas-nest/canvas-nest.min.js similarity index 100% rename from themes/next/source/lib/canvas-nest/canvas-nest.min.js rename to lib/canvas-nest/canvas-nest.min.js diff --git a/themes/next/source/lib/canvas-ribbon/canvas-ribbon.js b/lib/canvas-ribbon/canvas-ribbon.js similarity index 100% rename from themes/next/source/lib/canvas-ribbon/canvas-ribbon.js rename to lib/canvas-ribbon/canvas-ribbon.js diff --git a/themes/landscape/source/fancybox/blank.gif b/lib/fancybox/source/blank.gif similarity index 100% rename from themes/landscape/source/fancybox/blank.gif rename to lib/fancybox/source/blank.gif diff --git a/themes/landscape/source/fancybox/fancybox_loading.gif b/lib/fancybox/source/fancybox_loading.gif similarity index 100% rename from themes/landscape/source/fancybox/fancybox_loading.gif rename to lib/fancybox/source/fancybox_loading.gif diff --git a/themes/landscape/source/fancybox/fancybox_loading@2x.gif b/lib/fancybox/source/fancybox_loading@2x.gif similarity index 100% rename from themes/landscape/source/fancybox/fancybox_loading@2x.gif rename to lib/fancybox/source/fancybox_loading@2x.gif diff --git a/themes/landscape/source/fancybox/fancybox_overlay.png b/lib/fancybox/source/fancybox_overlay.png similarity index 100% rename from themes/landscape/source/fancybox/fancybox_overlay.png rename to lib/fancybox/source/fancybox_overlay.png diff --git a/themes/landscape/source/fancybox/fancybox_sprite.png b/lib/fancybox/source/fancybox_sprite.png similarity index 100% rename from themes/landscape/source/fancybox/fancybox_sprite.png rename to lib/fancybox/source/fancybox_sprite.png diff --git a/themes/landscape/source/fancybox/fancybox_sprite@2x.png b/lib/fancybox/source/fancybox_sprite@2x.png similarity index 100% rename from themes/landscape/source/fancybox/fancybox_sprite@2x.png rename to lib/fancybox/source/fancybox_sprite@2x.png diff --git a/themes/landscape/source/fancybox/helpers/fancybox_buttons.png b/lib/fancybox/source/helpers/fancybox_buttons.png similarity index 100% rename from themes/landscape/source/fancybox/helpers/fancybox_buttons.png rename to lib/fancybox/source/helpers/fancybox_buttons.png diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css b/lib/fancybox/source/helpers/jquery.fancybox-buttons.css similarity index 100% rename from themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css rename to lib/fancybox/source/helpers/jquery.fancybox-buttons.css diff --git a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-buttons.js b/lib/fancybox/source/helpers/jquery.fancybox-buttons.js similarity index 100% rename from themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-buttons.js rename to lib/fancybox/source/helpers/jquery.fancybox-buttons.js diff --git a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-media.js b/lib/fancybox/source/helpers/jquery.fancybox-media.js similarity index 100% rename from themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-media.js rename to lib/fancybox/source/helpers/jquery.fancybox-media.js diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css b/lib/fancybox/source/helpers/jquery.fancybox-thumbs.css similarity index 100% rename from themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css rename to lib/fancybox/source/helpers/jquery.fancybox-thumbs.css diff --git a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js b/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js similarity index 100% rename from themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js rename to lib/fancybox/source/helpers/jquery.fancybox-thumbs.js diff --git a/themes/next/source/lib/fancybox/source/jquery.fancybox.css b/lib/fancybox/source/jquery.fancybox.css similarity index 100% rename from themes/next/source/lib/fancybox/source/jquery.fancybox.css rename to lib/fancybox/source/jquery.fancybox.css diff --git a/themes/next/source/lib/fancybox/source/jquery.fancybox.js b/lib/fancybox/source/jquery.fancybox.js similarity index 100% rename from themes/next/source/lib/fancybox/source/jquery.fancybox.js rename to lib/fancybox/source/jquery.fancybox.js diff --git a/themes/next/source/lib/fancybox/source/jquery.fancybox.pack.js b/lib/fancybox/source/jquery.fancybox.pack.js similarity index 100% rename from themes/next/source/lib/fancybox/source/jquery.fancybox.pack.js rename to lib/fancybox/source/jquery.fancybox.pack.js diff --git a/themes/next/source/lib/fastclick/LICENSE b/lib/fastclick/LICENSE similarity index 100% rename from themes/next/source/lib/fastclick/LICENSE rename to lib/fastclick/LICENSE diff --git a/lib/fastclick/README.html b/lib/fastclick/README.html new file mode 100644 index 0000000..27501fe --- /dev/null +++ b/lib/fastclick/README.html @@ -0,0 +1,70 @@ +

FastClick

FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.

+

FastClick is developed by FT Labs, part of the Financial Times.

+

Explication en français.

+

日本語で説明

+

Why does the delay exist?

According to Google:

+
+

…mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

+
+

Compatibility

The library has been deployed as part of the FT Web App and is tried and tested on the following mobile browsers:

+ +

When it isn’t needed

FastClick doesn’t attach any listeners on desktop browsers.

+

Chrome 32+ on Android with width=device-width in the viewport meta tag doesn’t have a 300ms delay, therefore listeners aren’t attached.

+
<meta name="viewport" content="width=device-width, initial-scale=1">
+
+

Same goes for Chrome on Android (all versions) with user-scalable=no in the viewport meta tag. But be aware that user-scalable=no also disables pinch zooming, which may be an accessibility concern.

+

For IE11+, you can use touch-action: manipulation; to disable double-tap-to-zoom on certain elements (like links and buttons). For IE10 use -ms-touch-action: manipulation.

+

Usage

Include fastclick.js in your JavaScript bundle or add it to your HTML page like this:

+
<script type='application/javascript' src='/path/to/fastclick.js'></script>
+
+

The script must be loaded prior to instantiating FastClick on any element of the page.

+

To instantiate FastClick on the body, which is the recommended method of use:

+
if ('addEventListener' in document) {
+    document.addEventListener('DOMContentLoaded', function() {
+        FastClick.attach(document.body);
+    }, false);
+}
+
+

Or, if you’re using jQuery:

+
$(function() {
+    FastClick.attach(document.body);
+});
+
+

If you’re using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require('fastclick'). As a result, the easiest way to use FastClick with these loaders is as follows:

+
var attachFastClick = require('fastclick');
+attachFastClick(document.body);
+
+

Minified

Run make to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to build/fastclick.min.js or you can download a pre-minified version.

+

Note: the pre-minified version is built using our build service which exposes the FastClick object through Origami.fastclick and will have the Browserify/CommonJS API (see above).

+
var attachFastClick = Origami.fastclick;
+attachFastClick(document.body);
+
+

AMD

FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as RequireJS. Note that when using the AMD style require, the full FastClick object will be returned, not FastClick.attach

+
var FastClick = require('fastclick');
+FastClick.attach(document.body, options);
+
+

Package managers

You can install FastClick using Component, npm or Bower.

+

For Ruby, there’s a third-party gem called fastclick-rails. For .NET there’s a NuGet package.

+

Advanced

Ignore certain elements with needsclick

Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the needsclick class.

+
<a class="needsclick">Ignored by FastClick</a>
+
+

Use case 1: non-synthetic click required

Internally, FastClick uses document.createEvent to fire a synthetic click event as soon as touchend is fired by the browser. It then suppresses the additional click event created by the browser after that. In some cases, the non-synthetic click event created by the browser is required, as described in the triggering focus example.

+

This is where the needsclick class comes in. Add the class to any element that requires a non-synthetic click.

+

Use case 2: Twitter Bootstrap 2.2.2 dropdowns

Another example of when to use the needsclick class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own touchstart listener for dropdowns, so you want to tell FastClick to ignore those. If you don’t, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after.

+
<a class="dropdown-toggle needsclick" data-toggle="dropdown">Dropdown</a>
+
+

Examples

FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this:

+ +

Tests

There are no automated tests. The files in tests/ are manual reduced test cases. We’ve had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it’s not so trivial to test.

+

Credits and collaboration

FastClick is maintained by Rowan Beentje, Matthew Caruana Galizia and Matthew Andrews at FT Labs. All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request.

diff --git a/lib/fastclick/bower.json b/lib/fastclick/bower.json new file mode 100644 index 0000000..cdbbf93 --- /dev/null +++ b/lib/fastclick/bower.json @@ -0,0 +1 @@ +{"name":"fastclick","main":"lib/fastclick.js","ignore":["**/.*","component.json","package.json","Makefile","tests","examples"]} \ No newline at end of file diff --git a/themes/next/source/lib/fastclick/lib/fastclick.js b/lib/fastclick/lib/fastclick.js similarity index 100% rename from themes/next/source/lib/fastclick/lib/fastclick.js rename to lib/fastclick/lib/fastclick.js diff --git a/themes/next/source/lib/fastclick/lib/fastclick.min.js b/lib/fastclick/lib/fastclick.min.js similarity index 100% rename from themes/next/source/lib/fastclick/lib/fastclick.min.js rename to lib/fastclick/lib/fastclick.min.js diff --git a/themes/next/source/lib/font-awesome/HELP-US-OUT.txt b/lib/font-awesome/HELP-US-OUT.txt similarity index 100% rename from themes/next/source/lib/font-awesome/HELP-US-OUT.txt rename to lib/font-awesome/HELP-US-OUT.txt diff --git a/lib/font-awesome/bower.json b/lib/font-awesome/bower.json new file mode 100644 index 0000000..772570a --- /dev/null +++ b/lib/font-awesome/bower.json @@ -0,0 +1 @@ +{"name":"font-awesome","description":"Font Awesome","keywords":[],"homepage":"http://fontawesome.io","dependencies":{},"devDependencies":{},"license":["OFL-1.1","MIT","CC-BY-3.0"],"main":["less/font-awesome.less","scss/font-awesome.scss"],"ignore":["*/.*","*.json","src","*.yml","Gemfile","Gemfile.lock","*.md"]} \ No newline at end of file diff --git a/themes/next/source/lib/font-awesome/css/font-awesome.css b/lib/font-awesome/css/font-awesome.css similarity index 100% rename from themes/next/source/lib/font-awesome/css/font-awesome.css rename to lib/font-awesome/css/font-awesome.css diff --git a/themes/next/source/lib/font-awesome/css/font-awesome.css.map b/lib/font-awesome/css/font-awesome.css.map similarity index 100% rename from themes/next/source/lib/font-awesome/css/font-awesome.css.map rename to lib/font-awesome/css/font-awesome.css.map diff --git a/themes/next/source/lib/font-awesome/css/font-awesome.min.css b/lib/font-awesome/css/font-awesome.min.css similarity index 100% rename from themes/next/source/lib/font-awesome/css/font-awesome.min.css rename to lib/font-awesome/css/font-awesome.min.css diff --git a/themes/next/source/lib/font-awesome/fonts/FontAwesome.otf b/lib/font-awesome/fonts/FontAwesome.otf similarity index 100% rename from themes/next/source/lib/font-awesome/fonts/FontAwesome.otf rename to lib/font-awesome/fonts/FontAwesome.otf diff --git a/themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.eot b/lib/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.eot rename to lib/font-awesome/fonts/fontawesome-webfont.eot diff --git a/themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.svg b/lib/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.svg rename to lib/font-awesome/fonts/fontawesome-webfont.svg diff --git a/themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.ttf b/lib/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.ttf rename to lib/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.woff b/lib/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.woff rename to lib/font-awesome/fonts/fontawesome-webfont.woff diff --git a/themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.woff2 b/lib/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from themes/next/source/lib/font-awesome/fonts/fontawesome-webfont.woff2 rename to lib/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/themes/next/source/lib/jquery/index.js b/lib/jquery/index.js similarity index 100% rename from themes/next/source/lib/jquery/index.js rename to lib/jquery/index.js diff --git a/lib/jquery_lazyload/CONTRIBUTING.html b/lib/jquery_lazyload/CONTRIBUTING.html new file mode 100644 index 0000000..c732c08 --- /dev/null +++ b/lib/jquery_lazyload/CONTRIBUTING.html @@ -0,0 +1,22 @@ +

Contributing to Lazy Load

Only one feature or change per pull request

Make pull requests only one feature or change at the time. For example you have fixed a bug. You also have optimized some code. Optimization is not related to a bug. These should be submitted as separate pull requests. This way I can easily choose what to include. It is also easier to understand the code changes. Commit messages should be descriptive and full sentences.

+

Do not commit minified versions. Do not touch the version number. Make the pull requests against 1.9.x branch.

+

Write meaningful commit messages

Proper commit message is full sentence. It starts with capital letter but does not end with period. Headlines do not end with period. The GitHub default Update filename.js is not enough. When needed include also longer explanation what the commit does.

+
Capitalized, short (50 chars or less) summary
+
+More detailed explanatory text, if necessary.  Wrap it to about 72
+characters or so.  In some contexts, the first line is treated as the
+subject of an email and the rest of the text as the body.  The blank
+line separating the summary from the body is critical (unless you omit
+the body entirely); tools like rebase can get confused if you run the
+two together.
+

When in doubt see Tim Pope’s blogpost A Note About Git Commit Messages

+

Follow the existing coding standards

When contributing to open source project it is polite to follow the original authors coding standars. They might be different than yours. It is not a holy war. Just follow then original.

+
var snake_case = "something";
+
+function camelCase(options) {
+}
+
+if (true !== false) {
+    console.log("here be dragons");
+}
+
diff --git a/lib/jquery_lazyload/README.html b/lib/jquery_lazyload/README.html new file mode 100644 index 0000000..dbc6fcf --- /dev/null +++ b/lib/jquery_lazyload/README.html @@ -0,0 +1,20 @@ +

Lazy Load Plugin for jQuery

Lazy Load delays loading of images in long web pages. Images outside of viewport wont be loaded before user scrolls to them. This is opposite of image preloading.

+

Using Lazy Load on long web pages containing many large images makes the page load faster. Browser will be in ready state after loading visible images. In some cases it can also help to reduce server load.

+

Lazy Load is inspired by YUI ImageLoader Utility by Matt Mlinac.

+

How to Use?

Lazy Load depends on jQuery. Include them both in end of your HTML code:

+
<script src="jquery.js" type="text/javascript"></script>
+<script src="jquery.lazyload.js" type="text/javascript"></script>
+
+

You must alter your HTML code. URL of the real image must be put into data-original attribute. It is good idea to give Lazy Loaded image a specific class. This way you can easily control which images plugin is binded to. Note that you should have width and height attributes in your image tag.

+
<img class="lazy" data-original="img/example.jpg" width="640" height="480">
+
+

then in your code do:

+
$("img.lazy").lazyload();
+
+

This causes all images of class lazy to be lazy loaded.

+

More information on Lazy Load project page.

+

Install

You can install with bower or npm.

+
$ bower install jquery.lazyload
+$ npm install jquery-lazyload
+
+

License

All code licensed under the MIT License. All images licensed under Creative Commons Attribution 3.0 Unported License. In other words you are basically free to do whatever you want. Just don’t remove my name from the source.

diff --git a/lib/jquery_lazyload/bower.json b/lib/jquery_lazyload/bower.json new file mode 100644 index 0000000..6ffd9bc --- /dev/null +++ b/lib/jquery_lazyload/bower.json @@ -0,0 +1 @@ +{"name":"jquery_lazyload","version":"1.9.4","homepage":"http://www.appelsiini.net/projects/lazyload","authors":["Mika Tuupola "],"description":"jQuery plugin for lazy loading images","main":["jquery.lazyload.js","jquery.scrollstop.js"],"license":"MIT","ignore":["**/.*","**/*.min.js","**/*.html","**/*.textile","Gruntfile.js","lazyload.jquery.json","package.json","node_modules","bower_components","test","img"]} \ No newline at end of file diff --git a/themes/next/source/lib/jquery_lazyload/jquery.lazyload.js b/lib/jquery_lazyload/jquery.lazyload.js similarity index 100% rename from themes/next/source/lib/jquery_lazyload/jquery.lazyload.js rename to lib/jquery_lazyload/jquery.lazyload.js diff --git a/themes/next/source/lib/jquery_lazyload/jquery.scrollstop.js b/lib/jquery_lazyload/jquery.scrollstop.js similarity index 100% rename from themes/next/source/lib/jquery_lazyload/jquery.scrollstop.js rename to lib/jquery_lazyload/jquery.scrollstop.js diff --git a/themes/next/source/lib/pace/pace-theme-barber-shop.min.css b/lib/pace/pace-theme-barber-shop.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-barber-shop.min.css rename to lib/pace/pace-theme-barber-shop.min.css diff --git a/themes/next/source/lib/pace/pace-theme-big-counter.min.css b/lib/pace/pace-theme-big-counter.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-big-counter.min.css rename to lib/pace/pace-theme-big-counter.min.css diff --git a/themes/next/source/lib/pace/pace-theme-bounce.min.css b/lib/pace/pace-theme-bounce.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-bounce.min.css rename to lib/pace/pace-theme-bounce.min.css diff --git a/themes/next/source/lib/pace/pace-theme-center-atom.min.css b/lib/pace/pace-theme-center-atom.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-center-atom.min.css rename to lib/pace/pace-theme-center-atom.min.css diff --git a/themes/next/source/lib/pace/pace-theme-center-circle.min.css b/lib/pace/pace-theme-center-circle.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-center-circle.min.css rename to lib/pace/pace-theme-center-circle.min.css diff --git a/themes/next/source/lib/pace/pace-theme-center-radar.min.css b/lib/pace/pace-theme-center-radar.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-center-radar.min.css rename to lib/pace/pace-theme-center-radar.min.css diff --git a/themes/next/source/lib/pace/pace-theme-center-simple.min.css b/lib/pace/pace-theme-center-simple.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-center-simple.min.css rename to lib/pace/pace-theme-center-simple.min.css diff --git a/themes/next/source/lib/pace/pace-theme-corner-indicator.min.css b/lib/pace/pace-theme-corner-indicator.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-corner-indicator.min.css rename to lib/pace/pace-theme-corner-indicator.min.css diff --git a/themes/next/source/lib/pace/pace-theme-fill-left.min.css b/lib/pace/pace-theme-fill-left.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-fill-left.min.css rename to lib/pace/pace-theme-fill-left.min.css diff --git a/themes/next/source/lib/pace/pace-theme-flash.min.css b/lib/pace/pace-theme-flash.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-flash.min.css rename to lib/pace/pace-theme-flash.min.css diff --git a/themes/next/source/lib/pace/pace-theme-loading-bar.min.css b/lib/pace/pace-theme-loading-bar.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-loading-bar.min.css rename to lib/pace/pace-theme-loading-bar.min.css diff --git a/themes/next/source/lib/pace/pace-theme-mac-osx.min.css b/lib/pace/pace-theme-mac-osx.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-mac-osx.min.css rename to lib/pace/pace-theme-mac-osx.min.css diff --git a/themes/next/source/lib/pace/pace-theme-minimal.min.css b/lib/pace/pace-theme-minimal.min.css similarity index 100% rename from themes/next/source/lib/pace/pace-theme-minimal.min.css rename to lib/pace/pace-theme-minimal.min.css diff --git a/themes/next/source/lib/pace/pace.min.js b/lib/pace/pace.min.js similarity index 100% rename from themes/next/source/lib/pace/pace.min.js rename to lib/pace/pace.min.js diff --git a/themes/next/source/lib/three/canvas_lines.min.js b/lib/three/canvas_lines.min.js similarity index 100% rename from themes/next/source/lib/three/canvas_lines.min.js rename to lib/three/canvas_lines.min.js diff --git a/themes/next/source/lib/three/canvas_sphere.min.js b/lib/three/canvas_sphere.min.js similarity index 100% rename from themes/next/source/lib/three/canvas_sphere.min.js rename to lib/three/canvas_sphere.min.js diff --git a/themes/next/source/lib/three/three-waves.min.js b/lib/three/three-waves.min.js similarity index 100% rename from themes/next/source/lib/three/three-waves.min.js rename to lib/three/three-waves.min.js diff --git a/themes/next/source/lib/three/three.min.js b/lib/three/three.min.js old mode 100755 new mode 100644 similarity index 100% rename from themes/next/source/lib/three/three.min.js rename to lib/three/three.min.js diff --git a/themes/next/source/lib/ua-parser-js/dist/ua-parser.min.js b/lib/ua-parser-js/dist/ua-parser.min.js similarity index 100% rename from themes/next/source/lib/ua-parser-js/dist/ua-parser.min.js rename to lib/ua-parser-js/dist/ua-parser.min.js diff --git a/themes/next/source/lib/ua-parser-js/dist/ua-parser.pack.js b/lib/ua-parser-js/dist/ua-parser.pack.js similarity index 100% rename from themes/next/source/lib/ua-parser-js/dist/ua-parser.pack.js rename to lib/ua-parser-js/dist/ua-parser.pack.js diff --git a/lib/velocity/bower.json b/lib/velocity/bower.json new file mode 100644 index 0000000..bf66fe8 --- /dev/null +++ b/lib/velocity/bower.json @@ -0,0 +1 @@ +{"name":"velocity","version":"1.2.2","homepage":"http://velocityjs.org","authors":[{"name":"Julian Shapiro","homepage":"http://julian.com/"}],"description":"Accelerated JavaScript animation.","main":["./velocity.js","./velocity.ui.js"],"keywords":["animation","jquery","animate","lightweight","smooth","ui","velocity.js","velocityjs","javascript"],"license":"MIT","ignore":["*.json","!/bower.json","LICENSE","*.md"],"dependencies":{"jquery":"*"},"repository":{"type":"git","url":"http://github.com/julianshapiro/velocity.git"}} \ No newline at end of file diff --git a/themes/next/source/lib/velocity/velocity.js b/lib/velocity/velocity.js similarity index 100% rename from themes/next/source/lib/velocity/velocity.js rename to lib/velocity/velocity.js diff --git a/themes/next/source/lib/velocity/velocity.min.js b/lib/velocity/velocity.min.js similarity index 100% rename from themes/next/source/lib/velocity/velocity.min.js rename to lib/velocity/velocity.min.js diff --git a/themes/next/source/lib/velocity/velocity.ui.js b/lib/velocity/velocity.ui.js similarity index 100% rename from themes/next/source/lib/velocity/velocity.ui.js rename to lib/velocity/velocity.ui.js diff --git a/themes/next/source/lib/velocity/velocity.ui.min.js b/lib/velocity/velocity.ui.min.js similarity index 100% rename from themes/next/source/lib/velocity/velocity.ui.min.js rename to lib/velocity/velocity.ui.min.js diff --git a/package.json b/package.json deleted file mode 100644 index 6981e37..0000000 --- a/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "hexo-site", - "version": "0.0.0", - "private": true, - "hexo": { - "version": "3.8.0" - }, - "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-searchdb": "^1.0.8", - "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" - } -} \ No newline at end of file diff --git a/page/2/index.html b/page/2/index.html new file mode 100644 index 0000000..2d97fe3 --- /dev/null +++ b/page/2/index.html @@ -0,0 +1,1963 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scaffolds/draft.md b/scaffolds/draft.md deleted file mode 100644 index 498e95b..0000000 --- a/scaffolds/draft.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: {{ title }} -tags: ---- diff --git a/scaffolds/page.md b/scaffolds/page.md deleted file mode 100644 index f01ba3c..0000000 --- a/scaffolds/page.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: {{ title }} -date: {{ date }} ---- diff --git a/scaffolds/post.md b/scaffolds/post.md deleted file mode 100644 index 1f9b9a4..0000000 --- a/scaffolds/post.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: {{ title }} -date: {{ date }} -tags: ---- diff --git a/search.xml b/search.xml new file mode 100644 index 0000000..ff51b35 --- /dev/null +++ b/search.xml @@ -0,0 +1,685 @@ + + + + BEM + /2019/03/01/bem/ + 声明

原始代码出自vant组件库。 最新代码,点击这里

+

前言

在实际项目中,当我们需要覆盖某些开源组件库样式的时候,我们会发现会有一些奇怪的CSS命名方式,如下所示:

+
// 以下是CSS类名
.xx__xx
.xx__xx--xx
.xx--xx
+

为了搞清楚这种规则,通过查阅了解到这是一种叫做 BEM的命名方法。下面我就来了解下这个高大上的东西:

+

BEM是一种方法,可帮助我们在前端开发中创建可重用的组件和代码共享

+

更多中文解释见 https://www.cnblogs.com/dujishi/p/5862911.html
更全面详细的解释下 http://getbem.com

+

通过阅读上述文章,可知BEM命名是很重要的一种规范,但是纯手写起来,会有一些繁琐,为了将这些规则更好的和vue组件的HTML Class绑定相互结合,做如下封装:

+
/**
* bem helper
* b函数内部,默认取当前组件名称做默认类名,如下,以'button'为例
* b() // 'button'
* b('text') // 'button__text'
* b({ disabled }) // 'button button--disabled'
* b('text', { disabled }) // 'button__text button__text--disabled'
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
*/

const ELEMENT = '__'
const MODS = '--'

const join = (name, el, symbol) => el ? name + symbol + el : name

const prefix = (name, mods) => {
if (typeof mods === 'string') {
return join(name, mods, MODS)
}

// 数组语法,传递一个数组
if (Array.isArray(mods)) {
return mods.map(item => prefix(name, item))
}

// 对象语法,传递对象
const ret = {}
Object.keys(mods).forEach(key => {
ret[name + MODS + key] = mods[key]
})
return ret
}

export default {
methods: {
b (el, mods) {
// 获取组件名称
const { name } = this.$options

if (el && typeof el !== 'string') {
mods = el
el = ''
}
el = join(name, el, ELEMENT)

return mods ? [el, prefix(el, mods)] : el
},
},
}
+

b (bem的简写) 方法混入到组件中后,我们就可以直接在HTML模板中使用它,如下所示:

+
<template>
<div :class="b([type])">
<div :class="[b('wrapper', { scrollable }), {'thinline--bottom': type=== 'line'}]">
...
</div>
</div>
</template>

<script>
expot default {
name: 'tabs',
data() {
return {
type: 'line',
scrollable: true,
}
}
}
</script>
+

如上所示代码,将渲染出如下类名:

.tabs--line
.tabs__wrapper
.tabs__wrapper--scrollable
.thinline--bottom

+
+

上述代码可以直接拷贝使用,可以在Vue项目中实际用起来看下效果啦。

+
+]]>
+ + Vue + BEM + + + Bem + CSS + Mixin + +
+ + 你真的懂 border-radius 了吗? + /2019/03/08/border-radius/ + 声明

以下的截图文字说明,来源于 <<CSS揭秘>> 文章的片段

+

前言

在日常开发中 border-radius 属性是一个非常常用和简单的属性,但是他有一个鲜为人知的真相:它可以单独指定水平 和垂直半径,只要用一个斜杠(/)分隔这两个值即可

+

分析

为什么叫 border-radius?

border-radius-explain

+

border-radius 的更多用法

border-radius

+

下面还有一个图形化的解释,结合上面的文章截图理解:

+

border-radius1

+

在线测试DEMO

https://codepen.io/shellWolf/pen/MxpEGb?editors=1100

+]]>
+ + CSS3 + + + border-radius + +
+ + Button 按钮组件 + /2019/03/04/button/ + 前言

在日常开发中,button组件是使用频率比较高的组件,原生的HTML button标签只能满足一部分的使用场景,所以需要对button标签进行二次封装,来满足更多的场景。

+

设计

对于一个button组件,我们对它做如下设计:

+
    +
  1. 保留原生HTML button标签的部分特性 (如:type, disabled等)
  2. +
  3. 通过传入type prop,来展示不同类型的button
  4. +
  5. 通过传入loading prop,来控制button的加载效果
  6. +
  7. 通过传入icon prop,实现button和icon的结合
  8. +
  9. 通过传入ripple prop,实现水波纹的点击效果
  10. +
  11. 通过传入block prop,来控制button的宽度是否继承父容器宽度
  12. +
  13. 提供自定义的click事件,来响应用户的点击
  14. +
+

具体设计如下所示:

+

button

+

实现

组件代码如下所示:

+
<template>
<button
:class="[
b([type, size, {
loading,
icon,
block,
ripple
}])]"
:disabled="disabled"
:type="htmlType"
@click="handleClick"
>
<spin v-if="loading" size="16px"/>

<ripple v-if="ripple && !loading && !disabled" :ripple-opacity="rippleOpacity" :ripple-color="rippleColor"/>

<slot name="icon">
<icon v-if="icon" :name="icon" />
</slot>

<slot/>
</button>
</template>

<script>
import Spin from '../spin'
import Ripple from '../ripple'

export default {
name: 'button',
components: {
Ripple,
Spin
},
props: {
disabled: Boolean,
// 设置 button 原生的 type 值
htmlType: {
type: String,
default: 'button',
},
// 设置按钮类型
type: {
type: String,
default: 'default',
},
icon: String,
loading: Boolean,
// 支持large、default、small三种尺寸,默认为default, 当为默认时不需要设置
size: {
type: String,
default: '',
},
// 开启水波纹点击
ripple: Boolean,
// 设置波纹透明度
rippleOpacity: [String, Number],
// 设置波纹颜色,默认取字体颜色 (currentColor)
rippleColor: String,
// 将按钮宽度调整为其父宽度的选项
block: Boolean,
},
methods: {
handleClick (event) {
// loading 和 disabled 状态下不做click 事件处理
if (!this.loading && !this.disabled) {
this.$emit('click', event)
}
},
},
}
</script>
+
+

提示:不同的浏览器对 <button> 元素的 type 属性使用不同的默认值, 所以我们需要给自定义的button 组件的 htmlType 属性设置默认的值为 button

+
+

从上可知button组件提供了2个 slot

+
    +
  1. 默认插槽一般用于接收button组件的文本传入;
  2. +
  3. icon 插槽,提供给用户插入图片的途径(当icon图标不能够完全满足需求时,我们可以传入图片代替)
  4. +
+

由于它没有复杂的逻辑,基本上就是一个视图组件,接下来我们将重点分析它的样式,对应的css样式(stylus语法)代码 如下所示:

+
$text-color = #4a4a4a
$border-color = #eee
$gray-darker = #666
$gray-dark = #999

.button
position: relative
display: inline-block
box-sizing: border-box
color: $text-color
background: $white
height: 34px
line-height: 32px
padding: 0 12px
border-radius: 4px
border: 1px solid $border-color
box-shadow: none
text-align: center
font-size: 14px
cursor: pointer
outline: none
touch-action: manipulation
white-space: nowrap
user-select: none
-webkit-appearance: none
-webkit-text-size-adjust: 100%

&::before
content: ""
position: absolute
z-index: 1
top: -1px
left: -1px
bottom: -1px
right: -1px
width: 100%
height: 100%
opacity: 0
border: inherit
border-radius: inherit
background-color: $gray-darker
pointer-events: none
transition: opacity .3s

&:active::before
opacity: 0.15

&[disabled]
&,
&:focus,
&:active
cursor: not-allowed
background-color: $border-color
color: $gray-dark
border: 1px solid $border-color
box-shadow: none
&::before,
&:active::before
display: none
+

分析上述重点样式代码:

+
    +
  1. 设置 -webkit-appearance: none 去除 button 标签默认的appearance样式,常用于IOS下移除原生样式
  2. +
  3. 设置 outline: none去除外边线样式
  4. +
  5. 设置 touch-action: manipulation 可减少浏览器在用户点击时延迟生成点击事件的情况
  6. +
  7. 设置 white-space: nowrap 禁止组件文本换行
  8. +
  9. 设置 user-select: none 阻止button组件文本被选择(复制)
  10. +
  11. 设置 -webkit-text-size-adjust: 100% 关闭字体大小自动调整功能
  12. +
+

还需要注意的是,当点击button组件时,需要设置active状态下的样式,如果直接在button上改变 background-color 或者其它样式的值,这样将会导致额外的 layout 和 paint, 如下所示:
background-color trigger

+

为了能够进行性能优化,做如下设计:

+
    +
  1. 将 button 组件 active 状态下的样式通过在 ‘::before’ 上设置绝对定位进行触发,这样点击button时就不会影响到其他dom的渲染
  2. +
  3. 为了不影响button的正常点击操作,需要在伪元素上设置 pointer-events: none 这样点击事件就会穿透到真正到button元素上
  4. +
  5. 通过改变 opacity 样式来反馈 active 状态
  6. +
  7. 为了做更近一步的优化,我们通过设置 transition 样式将伪元素提升为合成层 (元素提升为合成层后,transform 和 opacity 才不会触发 paint,如果不是合成层,则其依然会触发 paint
  8. +
+

提示:(这里是引用 justjavac 大神的回答)
在 Blink 和 WebKit 内核的浏览器中,对于应用了 transition 或者 animation的 opacity 元素,浏览器会将渲染层提升为合成层。也可以使用 translateZ(0) 或者 translate3d(0,0,0) 来人为地强制性地创建一个合成层。

+

可以通过使用 Chrome DevTools 工具来查看页面中合成层的情况,在 Rendering 标签下,勾选上 Show layer borders即可

+
+

请点击查看 DEMO 效果

+
+

附录 ✨

+ +]]>
+ + Vue + 组件开发 + Button + + + Vue + 组件 + +
+ + Collapse 折叠面板组件 + /2019/03/13/collapse/ + 前言

折叠面板组件直观展示:

+

collapse

+

下面我们一起分析如何实现这个组件

+

分析

    +
  • 可以把组件拆分成父容器(collapse)和子组件(collapse-item)2个,然后在父组件上使用 v-model 进行双向绑定
  • +
  • 子组件折叠有2种方式,第一种是普通展开模式,第二种是accordion(手风琴)模式
  • +
  • 对折叠项内容展开和收起时运用动画,产生平滑过渡效果
  • +
+

实现

Collapse 父组件

模板代码如下:

+
<template>
<group :class="b()">
<slot />
</group>
</template>

<script>

import Group from './group'

export {
name: 'collapse',

components: {
Group,
},

props: {
// 控制手风琴效果
accordion: Boolean,
// 用于生成双向绑定
value: [String, Number, Array],
},

provide () {
return {
Collapse: this,
}
},

data () {
return {
items: [],
}
},

methods: {
switch (name, expanded) {
if (!this.accordion) {
name = expanded
? this.value.concat(name)
: this.value.filter(activeName => activeName !== name)
} else {
name = expanded
? name === this.value ? '' : name
: ''
}

this.$emit('input', name)
this.$emit('change', name)
},
},
}
</script>
+

上述代码有几点需要注意的地方:

+
    +
  1. provide / inject 允许一个祖先组件向其所有子孙后代注入一个依赖,不论组件层次有多深,并在起上下游关系成立的时间里始终生效
  2. +
  3. 通过属性 valueswitch 方法中发射 input 事件,让自定义组件实现双向绑定
  4. +
  5. accordion 属性为真时,展开的折叠项只有一个,记录到一个字符串中即可,当为假时,可以有多个折叠项同时是展开状态,这个时候我们需要用数组记录状态
  6. +
+

Collapse Item 子组件

模板代码如下:

+
+

raf, cancel 源码见 →附录←

+
+
<template>
<div
:class="[
b(),
{ 'thinline--top': index }
]"
>
<!-- 通过 $props 将父组件的 props 一起传给子组件 - -->
<cell :class="b('title', { expanded, disabled })" v-bind="$props" @click="onClick">
<slot slot="icon" name="icon" />
<slot slot="title" name="title" />
<slot slot="value" name="value" />
<slot slot="right-icon" name="right-icon" />
</cell>

<div
v-if="inited"
v-show="show"
ref="wrapper"
:class="b('wrapper')"
@transitionend="onTransitionEnd"
>
<div ref="content" :class="b('content')">
<slot />
</div>
</div>
</div>
</template>

<script>
import { raf, cancel } from '../utils/raf'

let rafID = null

export default create({
name: 'collapse-item',

props: {
name: [String, Number],
disabled: Boolean,
icon: String,
description: String,
title: [String, Number],
value: [String, Number],
border: {
type: Boolean,
default: true,
},
isLink: {
type: Boolean,
default: true,
},
},

inject: ['Collapse'],

data () {
return {
show: null,
inited: null,
}
},

computed: {
items () {
return this.parent.items
},

index () {
return this.items.indexOf(this)
},

currentName () {
return this.isDef(this.name) ? this.name : this.index
},

expanded () {
if (!this.parent) {
return null
}

const { value } = this.parent

return this.parent.accordion
? value === this.currentName
: value.some(name => name === this.currentName)
},
},

watch: {
expanded (expanded, prev) {
if (prev === null) {
return
}

if (expanded) {
this.show = true
this.inited = true
}

this.$nextTick(() => {
const { content, wrapper } = this.$refs
if (!content || !wrapper) {
return
}

const contentHeight = content.clientHeight + 'px'

// 处理第一次高度展开或收起来时的动画
wrapper.style.height = expanded ? 0 : contentHeight
rafID = raf(() => {
wrapper.style.height = expanded ? contentHeight : 0
})
})
},
},

created () {
if (!this.Collapse) {
console.error('CollapseItem needs to be child of Collapse')
} else {
this.parent = this.Collapse
}

this.items.push(this)
this.show = this.expanded
this.inited = this.expanded
},

destroyed () {
cancel(rafID)
this.items.splice(this.index, 1)
},

methods: {
onClick () {
if (this.disabled) {
return
}

this.parent.switch(this.currentName, !this.expanded)
},

onTransitionEnd () {
if (!this.expanded) {
this.show = false
}
},
},
})
</script>
+

分析代码:

+
    +
  1. 通过 inject 接收父组件的依赖,并在 created 生命周期中进行校验和初始化
  2. +
  3. 子组件内容容器上同时运用 v-ifv-show 这样保证了,第一次时不做全部渲染,又保证了后续切换时,不需要进行频繁的重新生成dom
  4. +
  5. 如果不显示设置 name, 默认值为当前组件在折叠列表中的索引值
  6. +
  7. 通过 currentName 与 父组件的 value 值进行比较判断确定当前子项的展开状态
  8. +
  9. 它点击改变子项的状态时,监听展开状态,并在里面对展开内容,进行第一帧的raf动画,其他帧是css动画
  10. +
  11. 通过 onTransitionEnd 捕捉过渡结束状态,并同时改变 show 变量的状态
  12. +
+

样式代码如下:

+

.collapse-item {
&__title {
.cell__right-icon::before {
transition: .3s
transform: rotate(90deg)
}

&::after {
visibility: hidden
}

&--expanded {
.cell__right-icon::before {
transform: rotate(-90deg)
}

&::after {
visibility: visible
}
}

&--disabled {
&,
& .cell__right-icon {
color: $gray
}

&:active {
background-color: #fff
}
}
}

&__wrapper {
overflow: hidden
will-change: height
transition: height .3s ease-in-out
}

&__content {
padding: 15px
background-color: #fff
}
}
+

从上述代码可知,针对 height 做过渡,实现平滑折叠效果

+

DEMO展示

点击下方链接查看 👇:
http://wechat.hand-china.com/hippius-ui/#/zh-CN/collapse

+

附录:

+
    +
  • raf 源码分析见 raf
  • +
+]]>
+ + Vue + 组件开发 + Collapse + + + Vue + 组件 + +
+ + 超有价值文章收集 (链接) + /2019/03/11/collection/ + CSS +

EVENT

+

JS

+

BABEL

+]]>
+ + CSS + + + css + event + +
+ + Grid 栅格组件 + /2018/11/13/grid/ +

学然后知不足

+
戴圣<<礼记·学记>>
+

声明


+

本篇文章是基于网上开源的UI库 vant、antd、element 等做的关于一个栅格组件的分析

+

组件分析


+
    +
  1. 首先,需要创建的是一个布局组件,基本的结构如下图所示:
  2. +
+

basic-layout

+

从上图可知,一个布局组件最少需要2个容器,一个父容器组件 <row>,多个子容器组件 <col>,当然,这个简单结构是不足以支持复杂场景的,我们继续往下走

+
    +
  1. 现代浏览器常用的布局方式为 flex布局,但是为了考虑到兼容性问题,得有个兼容性版的基础布局
  2. +
+

组件设计


+

为了考虑到实际情况,所以需要考虑,子容器 列元素 的占位 span、间距 gutter、 偏移 offset 问题, 且为了能更加细分和适应更多的场景,这里把 父容器 行元素 分为24栅栏,具体思路如下所示:

+
    +
  1. 考虑到组件的灵活性,把父子容器组件都设计为动态 <component> 组件,通过 is 属性指定具体标签

    +
  2. +
  3. 在父容器 <row> 上,设计 type,通过类型传递来选择开不开起 flex 布局

    +
  4. +
  5. 在父容器 <row> 上,传递 gutter,并在子容器 <col> 上,通过 this.$parent 对象,取到父容器上传递的 gutter 来设置列元素的间距,因为需要考虑到边界条件,容器2端的列元素应该没有padding,并且考虑到列元素应该被均匀拉伸,所以此时在父容器上通过 gutter 来计算并设置父容器的负边距,以此来处理这种情况,这也是为什么 gutter 传递到父容器而不是子容器的一个原因

    +
  6. +
  7. 在子容器 <col> 上,传递 offset,来设置列元素的偏移值,这里通过设置左外边距 margin-left 来实现,计算规则 (与计算 span 一样) 如下所示,这里采用的是stylus语法:

    +
  8. +
+
{ margin-left: "calc(%s * 100% / 24)" % $i }
+

容器具体的属性设计总结如下所示:

+

Row

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
参数说明默认值
type布局方式,可选值为flex-
gutter列元素之间的间距(单位为px)-
tag自定义元素标签div
justifyFlex 主轴对齐方式start
alignFlex 交叉轴对齐方式top
+

Col

+ + + + + + + + + + + + + + + + + + + + + + + + +
参数说明默认值
span列元素宽度-
offset列元素偏移距离-
tag自定义元素标签div
+

布局样式分析


+

完整代码,请→戳此处←

+
    +
  1. 为了方便使用循环,变量这些语法,采用stylus或其他预编译语言编写样式,下面所有的css代码片段都采用stylus书写
  2. +
  3. 为了考虑组件之后使用场景,需要良好的覆盖性和命名的独立性,这里采用BEM命名规范
  4. +
  5. 为了创建兼容性版本的布局,这里子容器采用 float 布局,并设置盒模型为 border-box (内边距和边框在以设定的宽高内进行绘制),更多盒模型知识自行搜索,如下所示:

    +

    {prefix}是stylus的插值语法,代表类名的前缀,表示设置了一个 prefix 变量,如:prefix = hips

    +
    .{prefix}-col {
    float: left
    box-sizing: border-box
    }
    +

    同时为了处理高度塌陷和margin无效等问题,需要我们在父容器上通过伪元素上的设置来清除浮动,如下所示:

    +
    .{prefix}-row {
    &::after {
    content: ""
    display: table
    clear: both
    }
    }
    +

    在将 type 设为 flex 的时候,设为Flex布局以后,子元素的float、clear和vertical-align属性将失效,但还是需要将父容器上的伪元素清除如下所示:

    +
    .{prefix}-row {
    &--flex {
    display: flex
    &::after {
    display: none
    }
    }
    +
  6. +
+

至于上面为什么要那么设计,这里有一篇分析Bootstrap和flex的文章,也是栅格布局概念精要,推荐阅读!!

+

这里是一个在线测试demo,做了float布局-处理高度塌陷和margin无效等问题的分析,有兴趣可以自己实际演练下。

+

✨ 这里是一个关于Grid组件的在线demo ,请点击→

+

附录:

+ +]]>
+ + Vue + 组件开发 + Grid + + + Vue + 组件 + +
+ + 如何实现国际化(i18n) + /2019/02/26/i18n/ +

千里之行,始于足下

+
老子<<道德经>>
+

声明


+

本篇文章的源代码基于开源组件库 vant

+

需求分析


+

在开始实现功能之前我们先来看下,通用的i18n库的使用流程,如下所示:

+

i18n使用流程图

+

从上图可知,要想使用i18n得先导入这个包,然后使用Vue.use方法去install这个包,再进行初始化i18n实例,最后在new Vue的时候挂载到全局。

+

所以我们设计的时候需要提供一个 install 方法,用于初始化,也需要提供 localemessages 去标记当前语言类型和具体的语言对应的内容,最后挂载到Vue的全局实例上。继续往下走 -↓

+

设计实战


+

实现细节如下所示:

+
    +
  1. 定义一个 install 方法,用于初始化。在这个方法中我们创建2个挂载在Vue原型上的响应式对象,如下所示:
  2. +
+
import defaultMessages from './lang/zh-CN' // 对应的默认语言包
...

const proto = Vue.prototype
const defaultLang = 'zh-CN'
...
function install () {
...
Vue.util.defineReactive(proto, '$prefixLang', defaultLang)
Vue.util.defineReactive(proto, '$prefixMessages', {
[defaultLang]: defaultMessages,
})
}
+

从上可知,定义了2个私有属性 $prefixLang (对应locale) 和 $prefixMessages (对应messages) (注意为变量名带上自定义的 prefix) 在Vue的原型上,这样就达到了挂载到全局的目的,但是为了能够使之变为可响应式的对象,还需要利用 Vue.util.defineReactive 方法(这个方法没有在官网上暴露,需要通过分析源码时获知,更具体的解释见→附录←

+
    +
  1. 定义一个 use 方法进行语言的切换。如下所示:
  2. +
+
import deepAssign from '../utils/deep-assign'
...

const proto = Vue.prototype

...

function use (lang, messages) {
proto.$prefixLang = lang
add({
[lang]: messages,
})
}

function add (messages = {}) {
// 将 messages 所有可枚举属性复制到 $prefixMessages 属性上
deepAssign(proto.$prefixMessages, messages)
}
+

从上可以,我们可以通过 use 方法并配合 deepAssign 方法 来进行当前语言和对应的内容的切换, deepAssign 的实现细节见 →附录←

+
    +
  1. 为了能够在Vue组件模板中使用,同样需要创建一个 $t 函数,如下所示:
  2. +
+

function get (object, path) {
const keys = path.split('.')
let result = object

keys.forEach(key => {
result = isDef(result[key]) ? result[key] : ''
})

return result
}

const camelizeRE = /-(\w)/g

function camelize (str) {
return str.replace(camelizeRE, (_, c) => c.toUpperCase())
}

// component mixin
export default {
computed: {
$t () {
const { name } = this.$options // 用于获取当前 Vue 实例的初始化选项
const prefix = name ? camelize(name) + '.' : ''

if (process.env.NODE_ENV !== 'production' && !this.$prefixMessages) {
console.warn('[XXX] Locale not correctly registered.')
return () => ''
}

const messages = this.$prefixMessages[this.$prefixLang]
return (path, ...args) => {
const message = get(messages, prefix + path) || get(messages, path)
return typeof message === 'function' ? message.apply(null, args) : message
}
},
},
}
+

从上可知,创建了一个可混入的 $t computed 属性, 然后在对应的Vue文件上使用 mixins 的方式混入(更多源码),这样我们就能在Vue组件模板上使用 $t 函数来做国际化了,如下所示:

+
<template>
<p>{{ $t('key') }}</p>
</template>
+

至此,如何实现国际化已经全部分析完毕。

+

附录:

+ +]]>
+ + Vue + 国际化 + + + Mixin + Vue + +
+ + 自定义图标字体 + /2019/03/03/icon/ + 前言

本篇文章将介绍如何和UI设计师配合,制定自定义的图标字体,最终生成自定义的ttf文件和样式。

+

实现

大致流程如下图所示:

+

icon-ttf

+

下面就针对它做具体的分析:

+
    +
  1. 首先需要在电脑中安装 sketch 软件,因为我们要用到该软件的 sketchtool (一个内置工具)命令,将 .sketch 源文件处理为svg文件,如下所示:
  2. +
+
shell.exec(`/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool export slices --formats=svg --overwriting=YES --save-for-web=YES ${sketch} --output=${svgDir}`)
+
    +
  1. 我们需要创建一个icon文件夹,用于处理sketch文件,目录结构如下所示:
    icon index
  2. +
+

从上图可知,最终我们会生成一个带 md5 标记的ttf文件(通过 [gulp-iconfont](https://www.npmjs.com/package/gulp-iconfont) 模块)和对应的样式文件index.styl (通过 [gulp-iconfont-css](https://www.npmjs.com/package/gulp-iconfont-css) 模块),这2个模块的更多解释请查看各自的npm包介绍

+

template.css 文件相识代码见: https://github.com/youzan/vant-icons/blob/master/build/template.tpl

+

template-local.js 文件代码如下所示:

+
module.exports = (fontName, ttf) => {
return `@font-face {
font-style: normal;
font-weight: normal;
font-family: '${fontName}';
src: url('./${ttf}') format('truetype');
}
`;
};
+

下面是config文件下 index.js文件内容,可以自定义图标的样式名,通过以下格式:

+
module.exports = {
name: 'xxx-icon',
glyphs: [{
src: 'search.svg',
css: 'search'
}, ...]
}
+

具体的 gulp 脚本代码如下所示:

+
/**
* build iconfont from sketch
*/
const fs = require('fs-extra')
const gulp = require('gulp')
const path = require('path')
const glob = require('fast-glob')
const shell = require('shelljs')
const md5File = require('md5-file')
const iconfont = require('gulp-iconfont') // core module
const iconfontCss = require('gulp-iconfont-css') // core module
const config = require('../packages/icon/config')
const local = require('../packages/icon/config/template-local')

const iconDir = path.join(__dirname, '../packages/icon')
const svgDir = path.join(iconDir, 'svg')
const sketch = path.join(iconDir, 'assets/icons.sketch')
const template = path.join(iconDir, 'config/template.css')

// get md5 from sketch
const md5 = md5File
.sync(sketch)
.slice(0, 6)
const ttf = `${config.name}-${md5}.ttf`

// extract svg from sketch should install sketchtool first install guide:
// https://developer.sketchapp.com/guides/sketchtool/
shell.exec(`/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool export slices --formats=svg --overwriting=YES --save-for-web=YES ${sketch} --output=${svgDir}`)

// remove previous ttf
const prevTTFs = glob.sync(path.join(iconDir, '*.ttf'))
prevTTFs.forEach(ttf => fs.removeSync(ttf))

// rename svg
config
.glyphs
.forEach((icon, index) => {
const src = path.join(svgDir, icon.src)
if (fs.existsSync(src)) {
fs.renameSync(src, path.join(svgDir, icon.css + '.svg'))
}
})

// generate ttf from sketch && build icon.styl
gulp.task('ttf', () => {
return gulp
.src([`${svgDir}/*.svg`])
.pipe(iconfontCss({
fontName: config.name,
path: template,
targetPath: '../icon/index.styl',
normalize: true,
firstGlyph: 0xf000,
cssClass: ttf, // this is a trick to pass ttf to template
}))
.pipe(iconfont({
fontName: ttf.replace('.ttf', ''),
formats: ['ttf'],
}))
.pipe(gulp.dest(iconDir))
})

gulp.task('default', ['ttf'], () => {
// generate local.styl
fs.writeFileSync(path.join(iconDir, 'local.styl'), local(config.name, ttf))

// remove svg
fs.removeSync(svgDir)

// upload ttf to cdn /no cdn shell.exec(`superman cdn /xxx ${path.join(iconDir,
// ttf)}`)
})
+
+

✨下面是完整的自定义图标字体解决方案的项目地址:https://github.com/youzan/vant-icons

+
+]]>
+ + Vue + Icon + + + icon + ttf + gulp + +
+ + 对于Rotate的图形解释 + /2019/03/12/rotate/ + 前言

开始本文之前,需要先对CSS的3d坐标轴有一定的概念,如下图所示:

+

3D坐标轴

+

分析

RotateZ

rotateZ

+

从上图可知,rotateZ旋转就是普通的rotate 2d 旋转,我们可以把一个图形压缩为一条线(图中蓝色虚线),然后按给定角度就行旋转,红色虚线和蓝色虚线的夹角就是旋转的角度

+
+

注意:rotate 采取就近转到目标的原则

+
    +
  • 小于180°,正常顺时针,但大于180°逆时针旋转
  • +
  • 设180°会逆时针转,-180°才顺时针
  • +
  • 设为360°的倍数值不会转
  • +
+
+

RotateX

rotateX

+

从上图可知,当绕X轴旋转时,图形的X边长不会变化,只有Y值发生改变,公式为: cos deg * Y = Y',意思就是,当前选择角度的cos值乘以原先Y边的值等于旋转后新边的值

+

RotateY

rotateY

+

从上图可知,当绕Y轴旋转时,图形的Y边长不会变化,只有X值发生改变,公式为: cos deg * X = X',意思就是,当前选择角度的cos值乘以原先X边的值等于旋转后新边的值

+
+

Tips:
我们可以通过与 perspective 透视属性 和 transform-style:preserve-3d 属性配合,观察图形的3D变化

+
+]]>
+ + CSS + + + css + rotate + +
+ + Spin 旋转提示组件 + /2019/03/07/spin/ + 前言

要实现一个spin效果,这里有2种实现实现方式:

+
    +
  1. imgembed 标签中,传入svg文件(loading效果的svg)地址到 src 特性中,就可以了

    +

    如下所示旋转效果(更多资源,查看附录):

    +
  2. +
+

                                                                  

+ +
    +
  1. 利用纯CSS3来绘制旋转效果 (下面将重点分析其绘制过程), 如下图所示:
  2. +
+

spin

+
+

DEMO效果展示,请点击 这里 查看

+
+

实现

代码如下所示:

+

模板代码

<template>
<img v-if="!!svgSrc" :src="svgSrc" :style="svgStyle">
<div v-else :class="b()" :style="sizeStyle">
<i v-for="i in 12" :class="b('item')" :style="colorStyle" :key="i"/>
</div>
</template>
+

从上可知,模板代码非常简单,就是循环出了12个元素在一个容器中,构成 Spin 组件的主体,重要的是样式的编写,我们继续往下走👇

+

CSS代码 (采用stylus语法)

@keyframes spin-fade {
0% {
opacity: .85
}
50% {
opacity: .25
}
100% {
opacity: .25
}
}

.spin {
position: relative
display: inline-block
width: 40px
height: 40px
&__item {
position: absolute
left: calc(50% - 1px)
top: 37.5%
width: 2px
height: 25%
border-radius: 50% / 20%
opacity: .25
background-color: currentColor
animation: spin-fade 1s linear infinite

for num in (1..12) {
&:nth-child({num}) {
animation-delay: ((num - 1) / 12) s
transform: rotate(30deg * (num - 6)) translateY(-150%)
}
}
}
}
+

针对上述样式的解释:

+
    +
  1. 创建一个行内块的父容器盒子,设置为相对定位
  2. +
  3. 创建12个绝对定位的子元素,并设置其透明度为 .25 为后面动画打铺垫
  4. +
  5. 给每个子元素的四个角设置水平半径为50%,垂直半径为20%的圆角
  6. +
  7. 给每个子元素设置固定宽度2px,高度相对父容器自适应(占父容器的25%)
  8. +
  9. 通过 top: 37.5%; left: calc(50% - 1px) 设置初始子元素为垂直居中的
  10. +
  11. 通过 transform: rotate(30deg * (num - 6)) translateY(-150%) 让第一个子元素旋转-150deg 改变正反向,然后向正方向移动(即向下(因为改变了正方向))1.5(37.5 / 25 = 1.5)个子元素高度的距离,确定第一个元素的初始位置,其它11个子元素按同样的规则进行排布,最后形成一个圆形排布
  12. +
  13. 最后给子元素设置动画,控制子元素的透明度,以 1/12 s 为间隔控制透明度的变化,形成视觉上的转动(其实只是子元素透明度的变化)
  14. +
+

下面几张图分解关键步骤解释:

+

spin
spin1
spin2

+

附录 ✨

+ +]]>
+ + Vue + 组件开发 + Spin + + + Vue + 组件 + CSS3 + +
+ + 如何用CSS手绘一个5角星? + /2019/03/12/star/ + 前言

前2天和同事聊天的时候,被问到如何利用CSS手绘一个 5角星 图形,简单思考了下,想出了个比较简易的办法,详细分析见下文

+

分析

我们先来观察下5角星,发现它有以下几个特征:

+
    +
  1. 有5个角,对应5个三角形
  2. +
  3. 每个三角形都是等边三角形
  4. +
  5. 每个三角形之间间隔同样的角度,并按圆形排列
  6. +
+

结合上述特征,就可以把问题进行切割,分解成下面几步:

+
    +
  1. 创建5个一样的等边三角形
  2. +
  3. 把每个三角形按(360°/5 = 72°)进行间隔排列
  4. +
  5. 给最后的中心空白区域位置填色
  6. +
+

实现

创建三角形

我们利用 border 法画三角形,进行三角形绘制之前,得先搞懂一个图,如下所示:

+

border

+

分析上图,蓝色三角形(bottom)其实从它的顶点垂直下来一条线为准,将蓝色三角形分为左右两个小三角形,左边小三角形底边受left值影响,右边小三角形底边受right值影响,其它三角形也一样。

+

根据上述规则, 我们可以很方便得到一个角度为60°的等边三角形:

+
    +
  1. 指定bottom border的宽度,举例我们设为100px
  2. +
  3. 由于要创建一个 角度为指定角度(60°)的等边三角形,我们把三角形对分,成为2个直角三角形,这样,我们就有了一个指定为 30°的角和一个给定的bottom 值,通过勾股定理公式: tan30°= X/(bottom值),很容易得到X的值,这样我们就确定了 left 和 right 的值为 √3/3*100px ≈ 58px
  4. +
+

具体的代码如下所示:

+
div{
position: absolute;
left: calc(50% - 58px);
top: calc(50% - 58px);
border-style: solid;
border-width: 0 58px 100px 58px;
border-color: red transparent currentcolor transparent;
width: 0px;
height: 0px;
}
+

按圆形排列三角形

上面我们得到了我们想要的三角形,接下来我们就把他们按72°间隔进行排列,具体代码如下所示

+
#div1 {
transform: rotate(72deg) translateY(-120%)
}

#div2 {
transform: rotate(144deg) translateY(-120%)
}

#div3 {
transform: rotate(216deg) translateY(-120%)
}

#div4 {
transform: rotate(288deg) translateY(-120%)
}

#div5 {
transform: rotate(360deg) translateY(-120%)
}
+

填充图形中间位置颜色

多个三角形围城一圈会组成,一个空白的区域,我们需要把它填充为与边框同样的颜色

+
#fill {
width: 166px;
height: 158px;
border: none;
left: calc(50% - 83px);
top: calc(50% - 79px);
background: currentcolor;
border-radius: 10px;
}
+
+

注意: border 和 填充体的颜色都取 currentcolor

+
+

DEMO

DEMO链接地址(可在线测试): https://codepen.io/shellWolf/pen/YgxOVm

+

结语

增强自己的分解意识,还有更好的方法等待去探索。

+]]>
+ + CSS + + + css + border + 三角形 + 星星 + +
+ + Switch 开关组件 + /2019/03/13/switch/ + 前言

switch 组件是一个很常用的基础组件,如下图所示:

+

switch

+

下面我们来一起开发一个自定义的 switch 组件吧

+

分析

因为 switch 组件是一个开关组件,它的可操作状态就和 checkbox 一样,所以,我们可以基于 <input type="checkbox"> 标签为基础,对它进行改造封装

+

实现

组件逻辑代码

我们可以在 switch 组件上创建双向数据绑定, 当用户触发 input 元素的输入事件时,自动更新到 switch 的数据

+
+

注意:内部的 input 元素的数据也是双向绑定

+
+

大致操作流程如下所示:

+
    +
  1. 在 computed 的 get 中 给 currentValue 赋初值
  2. +
  3. 当用户触发 input 的 chang 事件时,input 元素自动更新数据,也就是下文的 currentValue 变量, 同时发送一个自定义的 change 事件,停供给外界使用
  4. +
  5. currentValue 发生变化时,会触发它 setter 方法,我们在 computed 的 set 中 发射默认的 input 事件
  6. +
  7. 在父组件中 用 v-model 自动接收上一步 发射事件的值,更新 switch 组件选择状态
  8. +
+

具体代码如下所示:

+
<template>
<div
:class="b()"
>
<input
:class="b('input', { disabled })"
:disabled="disabled"
v-model="currentValue"
type="checkbox"
@change="onChange"
>
</div>
</template>

<script>

export default {
name: 'switch',

props: {
value: Boolean,
disabled: Boolean,
},

computed: {
currentValue: {
get () {
return this.value
},

set (val) {
this.$emit('input', val)
},
},
},

methods: {
onChange () {
this.$nextTick(() => {
this.$emit('change', this.currentValue)
})
},
},
})
</script>
+

组件样式代码

.switch
position: relative
display: inline-flex
align-items: center
font-size: 14px

&__input
display: inline-block
box-sizing: border-box
appearance: none
-webkit-appearance: none
outline: none
width: 52px
height: 32px
border: 1px solid #eee
border-radius: 32px
transition: background-color 0.1s, border 0.1s
&--disabled
opacity: 0.4
pointer-events: none

&::before,
&::after
content: ""
position: absolute
border-radius: 16px
top: 0px
left: 0px
bottom: 0px
right: 0px
transition: transform .4s cubic-bezier(0.4, 0.4, 0.25, 1.35)
background: #eee

&::after
width: 30px
height: 30px
border-radius: 15px
background: #fff
box-shadow: 0 1px 3px rgba(0, 0, 0, .3)
margin-top: 1px

&:checked
background: #1f8ceb
&::before
transform: scale(0)
&::after
transform: translateX(100% - 30px)
+

上述代码有以下几点需要注意的地方:

+

1: 设置 -webkit-appearance: none 去除 input 的原始外观
2: 通过 before 和 after 伪元素 构造 switch的动画元素
3: 通过 input:checked 选择器控制当选中时, before 和 after 的变化,配合 transition形成点击的动画效果

+

DEMO展示

点击下方链接查看 👇:
http://wechat.hand-china.com/hippius-ui/#/zh-CN/switch

+]]>
+ + Vue + 组件开发 + Switch + + + Vue + 组件 + +
+ + Tabbar 标签栏组件 + /2019/03/14/tabbar/ + 前言

标签栏组件是什么样子的呢? 看下图:

+

tabbar

+

下面我将分析如何实现效果

+
+

本文将不会给出具体的代码实现,但是会绘画出设计流程

+
+

实现

布局

    +
  1. 首先我们来说说布局,父组件其实只是一个容器组件,我们对它进行flex布局,并用 flex = 1 根据子元素个数等分其宽度
  2. +
  3. 子组件内部有2个元素,一个图标,对应图标下方的文字(附加功能右上角徽章,这个不做分析),同样也采用flex布局,然后做居中处理,不过元素排列方向通过 flex-flow: column 改变为竖排,这样大致布局也就基本完成了
  4. +
+

逻辑

逻辑代码分析见下图:

+

tabbar-logic

+

DEMO

点击下面👇链接展示:

+

http://wechat.hand-china.com/hippius-ui/#/zh-CN/tab-bar

+]]>
+ + Vue + 组件分析 + Tabbar + + + Vue + 组件 + +
+ + 通用方法收集 + /2019/03/01/util/ + 前言

以下源代码大部分收集于各个开源库和公开代码

+
+

# 常用辅助类函数

function isDef (value) {
return value !== undefined && value !== null
}

function isObj (x) {
const type = typeof x
return x !== null && (type === 'object' || type === 'function')
}

function isArray (val) {
return Object.prototype.toString.call(val) === '[object Array]'
}

// 将keba-case(短横线)的变量名转换为camelCase(驼峰式)
function camelize (str) {
return str.replace(/-(\w)/g, (_, c) => c.toUpperCase())
}

// 范围限制 ,确保当前值在最大值和最小值之间
function range (num, min, max) {
return Math.min(Math.max(num, min), max)
}

/* eslint-disable */
function isEmail(value: string): boolean {
const reg = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
return reg.test(value);
}

function isMobile(value: string): boolean {
value = value.replace(/[^-|\d]/g, '');
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
}

function isNumber(value: string): boolean {
return /^\d+$/.test(value);
}

// Is image source
export function isSrc(url: string): boolean {
return /^(https?:)?\/\/|data:image/.test(url);
}
+

# deepAssign

将所有可枚举属性的值从源对象复制到目标对象,返回目标对象

+
const { hasOwnProperty } = Object.prototype

function assignKey (to, from, key) {
const val = from[key]

// 1.如果源对象的某个key对应的value是未定义的,直接返回
// 2.如果源对象的某个key对应的value不是未定义的,但是目标对象对应的key的value未定义 直接返回
if (!isDef(val) || (hasOwnProperty.call(to, key) && !isDef(to[key]))) {
return
}

if (!hasOwnProperty.call(to, key) || !isObj(val)) {
to[key] = val
} else {
to[key] = assign(Object(to[key]), from[key])
}
}

export default function assign (to, from) {
for (const key in from) {
if (hasOwnProperty.call(from, key)) {
assignKey(to, from, key)
}
}
return to
}
+
+

注意1✨: 该方法会跳过那些值为 null 或 undefined 的源对象和目标对象;该方法对于目标对象中没有的key会直接复制源对象对应的key和value,不会发生深拷贝

+
+
+

注意2✨: 当Object以非构造函数形式被调用时,Object() 等同于 new Object(),主要用于处理给定值是 null 和 undefined·时, 创建并返回一个空对象,否则,将返回一个与给定值对应类型的对象

+
+

点击查看最新源码

+

# raf

requestAnimationFrame官方介绍
下面是 requestAnimationFrame的 polyfill

+
let prev = Date.now()

/* istanbul ignore next */
function fallback (fn) {
const curr = Date.now()
const ms = Math.max(0, 16 - (curr - prev))
const id = setTimeout(fn, ms)
prev = curr + ms
return id
}

/* istanbul ignore next */
const root = Vue.prototype.$isServer ? global : window

/* istanbul ignore next */
const iRaf = root.requestAnimationFrame || root.webkitRequestAnimationFrame || fallback

/* istanbul ignore next */
const iCancel = root.cancelAnimationFrame || root.webkitCancelAnimationFrame || root.clearTimeout

export function raf (fn) {
return iRaf.call(root, fn)
}

export function cancel (id) {
iCancel.call(root, id)
}
+

点击查看最新源码

+

# scroll

获取html元素对应的一些位置信息的封装

+
export default {
// get nearest scroll element
getScrollEventTarget (element, rootParent = window) {
let currentNode = element
// bugfix, see http://w3help.org/zh-cn/causes/SD9013 and http://stackoverflow.com/questions/17016740/onscroll-function-is-not-working-for-chrome
while (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode.nodeType === 1 && currentNode !== rootParent) {
const overflowY = this.getComputedStyle(currentNode).overflowY
if (overflowY === 'scroll' || overflowY === 'auto') {
return currentNode
}
currentNode = currentNode.parentNode
}
return rootParent
},

getScrollTop (element) {
return 'scrollTop' in element ? element.scrollTop : element.pageYOffset
},

setScrollTop (element, value) {
'scrollTop' in element ? element.scrollTop = value : element.scrollTo(element.scrollX, value)
},

// get distance from element top to page top
getElementTop (element) {
return (element === window ? 0 : element.getBoundingClientRect().top) + this.getScrollTop(window)
},

getVisibleHeight (element) {
return element === window ? element.innerHeight : element.getBoundingClientRect().height
},

getComputedStyle: !Vue.prototype.$isServer && document.defaultView.getComputedStyle.bind(document.defaultView),
}
+

点击查看最新源码

+]]>
+ + Util + 函数 + + + Util + +
+ + Ripple 水波纹效果 + /2019/03/05/wave/ + 声明

代码借鉴了 keen-ui 和 material-ui 的实现方式

+

前言

在日常项目中,经常会看到点击button或某个元素块时,有水波纹效果,如下图所示:

+

ripple button

+

下面,我们将分析如何实现这个效果

+

设计

常见的波纹点击效果的实现方式是监听元素的 mousedown、 mouseup 事件(pc端), touchstart touchend 事件(mobile端),因为mouse事件和touch事件时优先于click事件的,并且有多个回调状态。

+

通过监听上述事件,在元素内部创建一个波纹元素,并调整元素的 transformopacity 属性,通过计算点击的位置来设置波纹元素的大小和位置,已达到波纹扩散的效果。

+

我们讲组件分为2个部分,circleRipple 子组件 和 ripple 父组件:

+
    +
  • circleRipple 为波纹扩散组件,由 transition 组件包裹来设置动画,实现波纹扩散效果
  • +
  • ripple 父组件,监听 mousetouch 相关事件来控制 circleRipple 的位置和显示
  • +
+

实现

CircleRipple

利用 vue 的 transition 组件的来完成 circleRipple 的动画效果,之所以设置为子组件,就是为了方便从外部通过传参来控制它的样式。实现代码如下:

+
<template>
<transition name="ripple">
<div :class="b()" :style="styles"/>
</transition>
</template>

<script>

export default {
name: 'ripple-circle',
props: {
styles: {
type: Object,
default () {
return {}
},
},
},
}
</script>
+

样式代码如下所示:

+
.ripple-circle
position: absolute
border-radius: 50%
opacity: .1
background-color: currentColor
background-clip: padding-box
pointer-events: none
user-select: none

.ripple-enter-active,
.ripple-leave-active
transform: translate(-50%, -50%) scale(1)
transition: opacity 1s ease-out, transform 0.25s ease-out

.ripple-enter
transform: translate(-50%, -50%) scale(0)

.ripple-leave-to
opacity: 0 !important
+

上述代码中有2个需要注意的属性:

+
    +
  1. 设置 background-color: currentColor, 使用该关键字的元素的(或其最近父元素)color属性的颜色值
  2. +
  3. 设置 background-clip: padding-box, 使背景被裁剪到内边距框,不包含border
  4. +
+

Ripple

Ripple 需要控制 circleRipple 的显示,如果频繁点击可能出现多个 circleRipple

+
<template>
<div
:class="b()"
@contextmenu.prevent
@touchstart="start"
@touchend="end"
@touchcancel="end"
@mousedown="start"
@mouseup="end"
@mouseleave="end"
>
<!--多个波纹用 v-for 控制-->
<ripple-circle v-for="ripple in ripples" :key="ripple.key" :styles="ripple.style"/>
</div>
</template>

<script>
import RippleCircle from './ripple-circle'

const hasTouchEvent = 'ontouchstart' in document.documentElement
let rippleKey = 0

export default {
name: 'ripple',
components: {
RippleCircle,
},
props: {
rippleOpacity: {
type: [Number, String],
default: '0.15',
},
rippleColor: {
type: String,
default: '',
},
},
data () {
return {
ripples: [],
}
},
methods: {
start (e) {
if (hasTouchEvent && !e.touches) return
const ripple = {
key: rippleKey++,
style: this.__calcRippleStyle(e),
}

// 增加一个波纹元素只需要在 ripples 数组中push一个 ripple 对象即可
this.ripples.push(ripple)
},

end (e) {
if ((hasTouchEvent && !e.touches) || this.ripples.length === 0) return
// 删除数组中第一个一个波纹元素
this.ripples.splice(0, 1)
},

// 计算波纹样式并返回
__calcRippleStyle (e) {
const { target } = e
const rect = target.getBoundingClientRect()
const isTouchEvent = e.touches && e.touches.length

const pointerClientX = isTouchEvent ? Math.floor(e.touches[0].clientX) : e.clientX
const pointerClientY = isTouchEvent ? Math.floor(e.touches[0].clientY) : e.clientY

// 计算点击位置在当前点击块中,距离上下左右边框的距离
const left = pointerClientX - rect.left
const top = pointerClientY - rect.top
const right = rect.right - pointerClientX
const bottom = rect.bottom - pointerClientY

// 计算点击位置距离四周边框的四个斜边长度
const leftTopDiagLen = this.__calcDiagLen(left, top)
const rightTopDiagLen = this.__calcDiagLen(right, top)
const leftBottomDiagLen = this.__calcDiagLen(left, bottom)
const rightBottomDiagLen = this.__calcDiagLen(right, bottom)

// 获取上面计算四条斜边的最大边并向上取整,取得绘画波纹的半径
const rippleCircleRadius = Math.ceil(
Math.max(
leftTopDiagLen,
rightTopDiagLen,
leftBottomDiagLen,
rightBottomDiagLen,
),
)
const rippleCircleDiameter = rippleCircleRadius * 2

// 确定波纹绘制的颜色、透明度、大小、位置
return {
color: this.rippleColor,
opacity: this.rippleOpacity,
width: `${rippleCircleDiameter}px`,
height: `${rippleCircleDiameter}px`,
left: `${left}px`,
top: `${top}px`,
}
},

// 计算斜边长
__calcDiagLen (a, b) {
return Math.sqrt(a * a + b * b)
},
},
}
</script>
+
+

注意:@contextmenu.prevent 表示鼠标右击时阻止浏览器打开默认的菜单选项

+
+

针对上述代码的分析见下图所示:

+

ripple-circle

+

👇下面有一个在线的可操作水波纹示例(大家可以点击亵玩):👇
https://codepen.io/shellWolf/pen/vPyQJX?editors=1100

+

样式代码如下所示:

+
.ripple
position: absolute
overflow: hidden
top: 0
left: 0
width: 100%
height: 101%
+

该组件通常与 buttoncell 等组件结合使用。

+
+

使用注意事项:由于 Ripple 组件内部都是 position:absolute 布局,使用时,需要在外部加上 position:relative
请点击查看 DEMO 效果(滚动到水波纹点击效果那一栏)

+
+

附录 ✨

+ +]]>
+ + Vue + 组件开发 + Ripple + + + Vue + 组件 + +
+
diff --git a/source/_posts/bem.md b/source/_posts/bem.md deleted file mode 100644 index 0a15564..0000000 --- a/source/_posts/bem.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: BEM -date: 2019-03-01 17:08:19 -categories: [Vue, BEM] -tags: [Bem, CSS, Mixin] ---- - -### 声明 - -{% note info %}原始代码出自vant组件库。 最新代码,[点击这里](https://github.com/youzan/vant/blob/dev/packages/utils/use/bem.ts){% endnote %} - -### 前言 - -在实际项目中,当我们需要覆盖某些开源组件库样式的时候,我们会发现会有一些奇怪的CSS命名方式,如下所示: - -```css -// 以下是CSS类名 -.xx__xx -.xx__xx--xx -.xx--xx -``` - -为了搞清楚这种规则,通过查阅了解到这是一种叫做 `BEM`的命名方法。下面我就来了解下这个高大上的东西: - -***BEM是一种方法,可帮助我们在前端开发中创建可重用的组件和代码共享*** - -更多中文解释见 https://www.cnblogs.com/dujishi/p/5862911.html -更全面详细的解释下 http://getbem.com - -通过阅读上述文章,可知BEM命名是很重要的一种规范,但是纯手写起来,会有一些繁琐,为了将这些规则更好的和vue组件的HTML Class绑定相互结合,做如下封装: - -```js -/** - * bem helper - * b函数内部,默认取当前组件名称做默认类名,如下,以'button'为例 - * b() // 'button' - * b('text') // 'button__text' - * b({ disabled }) // 'button button--disabled' - * b('text', { disabled }) // 'button__text button__text--disabled' - * b(['disabled', 'primary']) // 'button button--disabled button--primary' - */ - -const ELEMENT = '__' -const MODS = '--' - -const join = (name, el, symbol) => el ? name + symbol + el : name - -const prefix = (name, mods) => { - if (typeof mods === 'string') { - return join(name, mods, MODS) - } - - // 数组语法,传递一个数组 - if (Array.isArray(mods)) { - return mods.map(item => prefix(name, item)) - } - - // 对象语法,传递对象 - const ret = {} - Object.keys(mods).forEach(key => { - ret[name + MODS + key] = mods[key] - }) - return ret -} - -export default { - methods: { - b (el, mods) { - // 获取组件名称 - const { name } = this.$options - - if (el && typeof el !== 'string') { - mods = el - el = '' - } - el = join(name, el, ELEMENT) - - return mods ? [el, prefix(el, mods)] : el - }, - }, -} - -``` - -将 `b` (bem的简写) 方法混入到组件中后,我们就可以直接在HTML模板中使用它,如下所示: - -```html - - - -``` - -如上所示代码,将渲染出如下类名: -```css -.tabs--line -.tabs__wrapper -.tabs__wrapper--scrollable -.thinline--bottom -``` - -> 上述代码可以直接拷贝使用,可以在Vue项目中实际用起来看下效果啦。 diff --git a/source/_posts/border-radius.md b/source/_posts/border-radius.md deleted file mode 100644 index 9731e07..0000000 --- a/source/_posts/border-radius.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: 你真的懂 border-radius 了吗? -date: 2019-03-08 17:54:26 -categories: [CSS3] -tags: [border-radius] ---- - -### 声明 - -以下的截图文字说明,来源于 <> 文章的片段 - -### 前言 - -在日常开发中 `border-radius` 属性是一个非常常用和简单的属性,但是他有一个鲜为人知的真相:它可以单独指定水平 和垂直半径,只要用一个斜杠(/)分隔这两个值即可 - -### 分析 - -#### 为什么叫 border-radius? - -![border-radius-explain](/images/border-radius1.png) - -#### border-radius 的更多用法 - -![border-radius](/images/border-radius2.png) - -***下面还有一个图形化的解释,结合上面的文章截图理解:*** - -![border-radius1](/images/border-radius3.png) - -#### 在线测试DEMO - -https://codepen.io/shellWolf/pen/MxpEGb?editors=1100 diff --git a/source/_posts/button.md b/source/_posts/button.md deleted file mode 100644 index 5944ee5..0000000 --- a/source/_posts/button.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: Button 按钮组件 -date: 2019-03-04 11:23:47 -categories: [Vue, 组件开发, Button] -tags: [Vue, 组件] ---- - -### 前言 - -在日常开发中,button组件是使用频率比较高的组件,原生的HTML button标签只能满足一部分的使用场景,所以需要对button标签进行二次封装,来满足更多的场景。 - -### 设计 - -对于一个button组件,我们对它做如下设计: - -1. 保留原生HTML button标签的部分特性 (如:type, disabled等) -2. 通过传入type prop,来展示不同类型的button -3. 通过传入loading prop,来控制button的加载效果 -4. 通过传入icon prop,实现button和icon的结合 -5. 通过传入ripple prop,实现水波纹的点击效果 -6. 通过传入block prop,来控制button的宽度是否继承父容器宽度 -7. 提供自定义的click事件,来响应用户的点击 - -具体设计如下所示: - -![button](/images/button.png) - -### 实现 - -组件代码如下所示: - -```js - - - - -``` - -> 提示:不同的浏览器对 ` + + + + + + + + + + +
+
+
+
+ + + + + +
+ +
+
+

Bem标签 +

+
+ + + + + + + + +
+ +
+ + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+ +
+ +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/CSS/index.html b/tags/CSS/index.html new file mode 100644 index 0000000..a77df5f --- /dev/null +++ b/tags/CSS/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: CSS | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/CSS3/index.html b/tags/CSS3/index.html new file mode 100644 index 0000000..3ccf113 --- /dev/null +++ b/tags/CSS3/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: CSS3 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Mixin/index.html b/tags/Mixin/index.html new file mode 100644 index 0000000..1b93df1 --- /dev/null +++ b/tags/Mixin/index.html @@ -0,0 +1,1128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: Mixin | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Util/index.html b/tags/Util/index.html new file mode 100644 index 0000000..d104f9b --- /dev/null +++ b/tags/Util/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: Util | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/Vue/index.html b/tags/Vue/index.html new file mode 100644 index 0000000..7888738 --- /dev/null +++ b/tags/Vue/index.html @@ -0,0 +1,1284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: Vue | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/border-radius/index.html b/tags/border-radius/index.html new file mode 100644 index 0000000..59d7580 --- /dev/null +++ b/tags/border-radius/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: border-radius | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/border/index.html b/tags/border/index.html new file mode 100644 index 0000000..703578c --- /dev/null +++ b/tags/border/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: border | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/css/index.html b/tags/css/index.html new file mode 100644 index 0000000..c107635 --- /dev/null +++ b/tags/css/index.html @@ -0,0 +1,1154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: css | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/event/index.html b/tags/event/index.html new file mode 100644 index 0000000..8f3232b --- /dev/null +++ b/tags/event/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: event | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/gulp/index.html b/tags/gulp/index.html new file mode 100644 index 0000000..18de1c2 --- /dev/null +++ b/tags/gulp/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: gulp | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/icon/index.html b/tags/icon/index.html new file mode 100644 index 0000000..c691d5e --- /dev/null +++ b/tags/icon/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: icon | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/rotate/index.html b/tags/rotate/index.html new file mode 100644 index 0000000..cc27b32 --- /dev/null +++ b/tags/rotate/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: rotate | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/ttf/index.html b/tags/ttf/index.html new file mode 100644 index 0000000..a0d7661 --- /dev/null +++ b/tags/ttf/index.html @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: ttf | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/tags/\344\270\211\350\247\222\345\275\242/index.html" "b/tags/\344\270\211\350\247\222\345\275\242/index.html" new file mode 100644 index 0000000..44be7ae --- /dev/null +++ "b/tags/\344\270\211\350\247\222\345\275\242/index.html" @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: 三角形 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/tags/\346\230\237\346\230\237/index.html" "b/tags/\346\230\237\346\230\237/index.html" new file mode 100644 index 0000000..af3c80a --- /dev/null +++ "b/tags/\346\230\237\346\230\237/index.html" @@ -0,0 +1,1102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: 星星 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/tags/\347\273\204\344\273\266/index.html" "b/tags/\347\273\204\344\273\266/index.html" new file mode 100644 index 0000000..6d5e377 --- /dev/null +++ "b/tags/\347\273\204\344\273\266/index.html" @@ -0,0 +1,1258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 标签: 组件 | Wolf Whistling + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/landscape/.gitignore b/themes/landscape/.gitignore deleted file mode 100644 index 6e3a08a..0000000 --- a/themes/landscape/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -node_modules -tmp \ No newline at end of file diff --git a/themes/landscape/Gruntfile.js b/themes/landscape/Gruntfile.js deleted file mode 100644 index 59fd5df..0000000 --- a/themes/landscape/Gruntfile.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = function(grunt){ - grunt.initConfig({ - gitclone: { - fontawesome: { - options: { - repository: 'https://github.com/FortAwesome/Font-Awesome.git', - directory: 'tmp/fontawesome' - }, - }, - fancybox: { - options: { - repository: 'https://github.com/fancyapps/fancyBox.git', - directory: 'tmp/fancybox' - } - } - }, - copy: { - fontawesome: { - expand: true, - cwd: 'tmp/fontawesome/fonts/', - src: ['**'], - dest: 'source/css/fonts/' - }, - fancybox: { - expand: true, - cwd: 'tmp/fancybox/source/', - src: ['**'], - dest: 'source/fancybox/' - } - }, - _clean: { - tmp: ['tmp'], - fontawesome: ['source/css/fonts'], - fancybox: ['source/fancybox'] - } - }); - - require('load-grunt-tasks')(grunt); - - grunt.renameTask('clean', '_clean'); - - grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']); - grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']); - grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']); - grunt.registerTask('clean', ['_clean']); -}; \ No newline at end of file diff --git a/themes/landscape/LICENSE b/themes/landscape/LICENSE deleted file mode 100644 index 9ce4d32..0000000 --- a/themes/landscape/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2013 Tommy Chen - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/themes/landscape/README.md b/themes/landscape/README.md deleted file mode 100644 index 90ecccd..0000000 --- a/themes/landscape/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# Landscape - -A brand new default theme for [Hexo]. - -- [Preview](http://hexo.io/hexo-theme-landscape/) - -## Installation - -### Install - -``` bash -$ git clone https://github.com/hexojs/hexo-theme-landscape.git themes/landscape -``` - -**Landscape requires Hexo 2.4 and above.** If you would like to enable the RSS, the [hexo-generate-feed] plugin is also required. - -### Enable - -Modify `theme` setting in `_config.yml` to `landscape`. - -### Update - -``` bash -cd themes/landscape -git pull -``` - -## Configuration - -``` yml -# Header -menu: - Home: / - Archives: /archives -rss: /atom.xml - -# Content -excerpt_link: Read More -fancybox: true - -# Sidebar -sidebar: right -widgets: -- category -- tag -- tagcloud -- archives -- recent_posts - -# Miscellaneous -google_analytics: -favicon: /favicon.png -twitter: -google_plus: -``` - -- **menu** - Navigation menu -- **rss** - RSS link -- **excerpt_link** - "Read More" link at the bottom of excerpted articles. `false` to hide the link. -- **fancybox** - Enable [Fancybox] -- **sidebar** - Sidebar style. You can choose `left`, `right`, `bottom` or `false`. -- **widgets** - Widgets displaying in sidebar -- **google_analytics** - Google Analytics ID -- **favicon** - Favicon path -- **twitter** - Twiiter ID -- **google_plus** - Google+ ID - -## Features - -### Fancybox - -Landscape uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos. - -``` -![img caption](img url) - -{% fancybox img_url [img_thumbnail] [img_caption] %} -``` - -### Sidebar - -You can put your sidebar in left side, right side or bottom of your site by editing `sidebar` setting. - -Landscape provides 5 built-in widgets: - -- category -- tag -- tagcloud -- archives -- recent_posts - -All of them are enabled by default. You can edit them in `widget` setting. - -## Development - -### Requirements - -- [Grunt] 0.4+ -- Hexo 2.4+ - -### Grunt tasks - -- **default** - Download [Fancybox] and [Font Awesome]. -- **fontawesome** - Only download [Font Awesome]. -- **fancybox** - Only download [Fancybox]. -- **clean** - Clean temporarily files and downloaded files. - -[Hexo]: https://hexo.io/ -[Fancybox]: http://fancyapps.com/fancybox/ -[Font Awesome]: http://fontawesome.io/ -[Grunt]: http://gruntjs.com/ -[hexo-generate-feed]: https://github.com/hexojs/hexo-generator-feed diff --git a/themes/landscape/_config.yml b/themes/landscape/_config.yml deleted file mode 100644 index ca22374..0000000 --- a/themes/landscape/_config.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Header -menu: - Home: / - Archives: /archives -rss: /atom.xml - -# Content -excerpt_link: Read More -fancybox: true - -# Sidebar -sidebar: right -widgets: -- category -- tag -- tagcloud -- archive -- recent_posts - -# display widgets at the bottom of index pages (pagination == 2) -index_widgets: -# - category -# - tagcloud -# - archive - -# widget behavior -archive_type: 'monthly' -show_count: false - -# Miscellaneous -google_analytics: -gauges_analytics: -favicon: /favicon.png -twitter: -google_plus: -fb_admins: -fb_app_id: diff --git a/themes/landscape/languages/de.yml b/themes/landscape/languages/de.yml deleted file mode 100644 index 630055f..0000000 --- a/themes/landscape/languages/de.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Kategorien -search: Suche -tags: Tags -tagcloud: Tag Cloud -tweets: Tweets -prev: zurück -next: weiter -comment: Kommentare -archive_a: Archiv -archive_b: "Archive: %s" -page: Seite %d -recent_posts: letzter Beitrag -newer: Neuer -older: Älter -share: Teilen -powered_by: Powered by -rss_feed: RSS Feed -category: Kategorie -tag: Tag diff --git a/themes/landscape/languages/default.yml b/themes/landscape/languages/default.yml deleted file mode 100644 index 3ef7e92..0000000 --- a/themes/landscape/languages/default.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Categories -search: Search -tags: Tags -tagcloud: Tag Cloud -tweets: Tweets -prev: Prev -next: Next -comment: Comments -archive_a: Archives -archive_b: "Archives: %s" -page: Page %d -recent_posts: Recent Posts -newer: Newer -older: Older -share: Share -powered_by: Powered by -rss_feed: RSS Feed -category: Category -tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/es.yml b/themes/landscape/languages/es.yml deleted file mode 100644 index d862e87..0000000 --- a/themes/landscape/languages/es.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Categorías -search: Buscar -tags: Tags -tagcloud: Nube de Tags -tweets: Tweets -prev: Previo -next: Siguiente -comment: Comentarios -archive_a: Archivos -archive_b: "Archivos: %s" -page: Página %d -recent_posts: Posts recientes -newer: Nuevo -older: Viejo -share: Compartir -powered_by: Construido por -rss_feed: RSS -category: Categoría -tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/fr.yml b/themes/landscape/languages/fr.yml deleted file mode 100644 index c84f51b..0000000 --- a/themes/landscape/languages/fr.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Catégories -search: Rechercher -tags: Mot-clés -tagcloud: Nuage de mot-clés -tweets: Tweets -prev: Précédent -next: Suivant -comment: Commentaires -archive_a: Archives -archive_b: "Archives: %s" -page: Page %d -recent_posts: Articles récents -newer: Récent -older: Ancien -share: Partager -powered_by: Propulsé par -rss_feed: Flux RSS -category: Catégorie -tag: Mot-clé diff --git a/themes/landscape/languages/ja.yml b/themes/landscape/languages/ja.yml deleted file mode 100644 index af0f7fe..0000000 --- a/themes/landscape/languages/ja.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: カテゴリ -search: 検索 -tags: タグ -tagcloud: タグクラウド -tweets: ツイート -prev: 戻る -next: 次へ -comment: コメント -archive_a: アーカイブ -archive_b: "アーカイブ: %s" -page: ページ %d -recent_posts: 最近の投稿 -newer: 次の記事 -older: 前の記事 -share: 共有 -powered_by: Powered by -rss_feed: RSSフィード -category: カテゴリ -tag: タグ diff --git a/themes/landscape/languages/ko.yml b/themes/landscape/languages/ko.yml deleted file mode 100644 index 1d27b43..0000000 --- a/themes/landscape/languages/ko.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: 카테고리 -search: 검색 -tags: 태그 -tagcloud: 태그 클라우드 -tweets: 트윗 -prev: 이전 -next: 다음 -comment: 댓글 -archive_a: 아카이브 -archive_b: "아카이브: %s" -page: 페이지 %d -recent_posts: 최근 포스트 -newer: 최신 -older: 이전 -share: 공유 -powered_by: Powered by -rss_feed: RSS Feed -category: 카테고리 -tag: 태그 diff --git a/themes/landscape/languages/nl.yml b/themes/landscape/languages/nl.yml deleted file mode 100644 index 568d33e..0000000 --- a/themes/landscape/languages/nl.yml +++ /dev/null @@ -1,20 +0,0 @@ - -categories: Categorieën -search: Zoeken -tags: Labels -tagcloud: Tag Cloud -tweets: Tweets -prev: Vorige -next: Volgende -comment: Commentaren -archive_a: Archieven -archive_b: "Archieven: %s" -page: Pagina %d -recent_posts: Recente berichten -newer: Nieuwer -older: Ouder -share: Delen -powered_by: Powered by -rss_feed: RSS Feed -category: Categorie -tag: Label diff --git a/themes/landscape/languages/no.yml b/themes/landscape/languages/no.yml deleted file mode 100644 index b997691..0000000 --- a/themes/landscape/languages/no.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Kategorier -search: Søk -tags: Tags -tagcloud: Tag Cloud -tweets: Tweets -prev: Forrige -next: Neste -comment: Kommentarer -archive_a: Arkiv -archive_b: "Arkiv: %s" -page: Side %d -recent_posts: Siste innlegg -newer: Newer -older: Older -share: Share -powered_by: Powered by -rss_feed: RSS Feed -category: Category -tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/pt.yml b/themes/landscape/languages/pt.yml deleted file mode 100644 index 3d74af3..0000000 --- a/themes/landscape/languages/pt.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Categorias -search: Buscar -tags: Tags -tagcloud: Nuvem de Tags -tweets: Tweets -prev: Anterior -next: Próximo -comment: Comentários -archive_a: Arquivos -archive_b: "Arquivos: %s" -page: Página %d -recent_posts: Postagens Recentes -newer: Mais Recente -older: Mais Antigo -share: Compartilhar -powered_by: Desenvolvido por -rss_feed: Feed RSS -category: Categoria -tag: Tag diff --git a/themes/landscape/languages/ru.yml b/themes/landscape/languages/ru.yml deleted file mode 100644 index 625a83c..0000000 --- a/themes/landscape/languages/ru.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: Категории -search: Поиск -tags: Метки -tagcloud: Облако меток -tweets: Твиты -prev: Назад -next: Вперед -comment: Комментарии -archive_a: Архив -archive_b: "Архив: %s" -page: Страница %d -recent_posts: Недавние записи -newer: Следующий -older: Предыдущий -share: Поделиться -powered_by: Создано с помощью -rss_feed: RSS-каналы -category: Категория -tag: Метка \ No newline at end of file diff --git a/themes/landscape/languages/zh-CN.yml b/themes/landscape/languages/zh-CN.yml deleted file mode 100644 index ad5ce3a..0000000 --- a/themes/landscape/languages/zh-CN.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: 分类 -search: 搜索 -tags: 标签 -tagcloud: 标签云 -tweets: 推文 -prev: 上一页 -next: 下一页 -comment: 留言 -archive_a: 归档 -archive_b: 归档:%s -page: 第 %d 页 -recent_posts: 最新文章 -newer: Newer -older: Older -share: Share -powered_by: Powered by -rss_feed: RSS Feed -category: Category -tag: Tag diff --git a/themes/landscape/languages/zh-TW.yml b/themes/landscape/languages/zh-TW.yml deleted file mode 100644 index 76d2916..0000000 --- a/themes/landscape/languages/zh-TW.yml +++ /dev/null @@ -1,19 +0,0 @@ -categories: 分類 -search: 搜尋 -tags: 標籤 -tagcloud: 標籤雲 -tweets: 推文 -prev: 上一頁 -next: 下一頁 -comment: 留言 -archive_a: 彙整 -archive_b: 彙整:%s -page: 第 %d 頁 -recent_posts: 最新文章 -newer: Newer -older: Older -share: Share -powered_by: Powered by -rss_feed: RSS Feed -category: Category -tag: Tag \ No newline at end of file diff --git a/themes/landscape/layout/_partial/after-footer.ejs b/themes/landscape/layout/_partial/after-footer.ejs deleted file mode 100644 index ff2d509..0000000 --- a/themes/landscape/layout/_partial/after-footer.ejs +++ /dev/null @@ -1,25 +0,0 @@ -<% if (config.disqus_shortname){ %> - -<% } %> - - - -<% if (theme.fancybox){ %> - <%- css('fancybox/jquery.fancybox') %> - <%- js('fancybox/jquery.fancybox.pack') %> -<% } %> - -<%- js('js/script') %> -<%- partial('gauges-analytics') %> diff --git a/themes/landscape/layout/_partial/archive-post.ejs b/themes/landscape/layout/_partial/archive-post.ejs deleted file mode 100644 index 36f2cc3..0000000 --- a/themes/landscape/layout/_partial/archive-post.ejs +++ /dev/null @@ -1,8 +0,0 @@ -
-
-
- <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %> - <%- partial('post/title', {class_name: 'archive-article-title'}) %> -
-
-
\ No newline at end of file diff --git a/themes/landscape/layout/_partial/archive.ejs b/themes/landscape/layout/_partial/archive.ejs deleted file mode 100644 index 9da934a..0000000 --- a/themes/landscape/layout/_partial/archive.ejs +++ /dev/null @@ -1,34 +0,0 @@ -<% if (pagination == 2){ %> - <% page.posts.each(function(post){ %> - <%- partial('article', {post: post, index: true}) %> - <% }) %> -<% } else { %> - <% var last; %> - <% page.posts.each(function(post, i){ %> - <% var year = post.date.year(); %> - <% if (last != year){ %> - <% if (last != null){ %> - - <% } %> - <% last = year; %> -
- -
- <% } %> - <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> - <% }) %> - <% if (page.posts.length){ %> -
- <% } %> -<% } %> -<% if (page.total > 1){ %> - -<% } %> diff --git a/themes/landscape/layout/_partial/article.ejs b/themes/landscape/layout/_partial/article.ejs deleted file mode 100644 index 0f951a9..0000000 --- a/themes/landscape/layout/_partial/article.ejs +++ /dev/null @@ -1,44 +0,0 @@ -
- -
- <%- partial('post/gallery') %> - <% if (post.link || post.title){ %> -
- <%- partial('post/title', {class_name: 'article-title'}) %> -
- <% } %> -
- <% if (post.excerpt && index){ %> - <%- post.excerpt %> - <% if (theme.excerpt_link){ %> -

- <%= theme.excerpt_link %> -

- <% } %> - <% } else { %> - <%- post.content %> - <% } %> -
- -
- <% if (!index){ %> - <%- partial('post/nav') %> - <% } %> -
- -<% if (!index && post.comments && config.disqus_shortname){ %> -
-
- -
-
-<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/footer.ejs b/themes/landscape/layout/_partial/footer.ejs deleted file mode 100644 index 3aca618..0000000 --- a/themes/landscape/layout/_partial/footer.ejs +++ /dev/null @@ -1,11 +0,0 @@ -
- <% if (theme.sidebar === 'bottom'){ %> - <%- partial('_partial/sidebar') %> - <% } %> -
- -
-
\ No newline at end of file diff --git a/themes/landscape/layout/_partial/gauges-analytics.ejs b/themes/landscape/layout/_partial/gauges-analytics.ejs deleted file mode 100644 index d64be38..0000000 --- a/themes/landscape/layout/_partial/gauges-analytics.ejs +++ /dev/null @@ -1,18 +0,0 @@ -<% if (theme.gauges_analytics){ %> - - - -<% } %> diff --git a/themes/landscape/layout/_partial/google-analytics.ejs b/themes/landscape/layout/_partial/google-analytics.ejs deleted file mode 100644 index 84e75f0..0000000 --- a/themes/landscape/layout/_partial/google-analytics.ejs +++ /dev/null @@ -1,14 +0,0 @@ -<% if (theme.google_analytics){ %> - - - -<% } %> diff --git a/themes/landscape/layout/_partial/head.ejs b/themes/landscape/layout/_partial/head.ejs deleted file mode 100644 index 43d5f93..0000000 --- a/themes/landscape/layout/_partial/head.ejs +++ /dev/null @@ -1,36 +0,0 @@ - - - - - <%- partial('google-analytics') %> - <% - var title = page.title; - - if (is_archive()){ - title = __('archive_a'); - - if (is_month()){ - title += ': ' + page.year + '/' + page.month; - } else if (is_year()){ - title += ': ' + page.year; - } - } else if (is_category()){ - title = __('category') + ': ' + page.category; - } else if (is_tag()){ - title = __('tag') + ': ' + page.tag; - } - %> - <% if (title){ %><%= title %> | <% } %><%= config.title %> - - <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> - <% if (theme.rss){ %> - - <% } %> - <% if (theme.favicon){ %> - - <% } %> - <% if (config.highlight.enable){ %> - - <% } %> - <%- css('css/style') %> - diff --git a/themes/landscape/layout/_partial/header.ejs b/themes/landscape/layout/_partial/header.ejs deleted file mode 100644 index e8a305e..0000000 --- a/themes/landscape/layout/_partial/header.ejs +++ /dev/null @@ -1,32 +0,0 @@ - \ No newline at end of file diff --git a/themes/landscape/layout/_partial/mobile-nav.ejs b/themes/landscape/layout/_partial/mobile-nav.ejs deleted file mode 100644 index 7c1d2af..0000000 --- a/themes/landscape/layout/_partial/mobile-nav.ejs +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/category.ejs b/themes/landscape/layout/_partial/post/category.ejs deleted file mode 100644 index db2ed48..0000000 --- a/themes/landscape/layout/_partial/post/category.ejs +++ /dev/null @@ -1,10 +0,0 @@ -<% if (post.categories && post.categories.length){ %> - -<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/date.ejs b/themes/landscape/layout/_partial/post/date.ejs deleted file mode 100644 index 3f49613..0000000 --- a/themes/landscape/layout/_partial/post/date.ejs +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/gallery.ejs b/themes/landscape/layout/_partial/post/gallery.ejs deleted file mode 100644 index 886c8ec..0000000 --- a/themes/landscape/layout/_partial/post/gallery.ejs +++ /dev/null @@ -1,11 +0,0 @@ -<% if (post.photos && post.photos.length){ %> -
-
- <% post.photos.forEach(function(photo, i){ %> - - - - <% }) %> -
-
-<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/nav.ejs b/themes/landscape/layout/_partial/post/nav.ejs deleted file mode 100644 index 720798a..0000000 --- a/themes/landscape/layout/_partial/post/nav.ejs +++ /dev/null @@ -1,22 +0,0 @@ -<% if (post.prev || post.next){ %> - -<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/tag.ejs b/themes/landscape/layout/_partial/post/tag.ejs deleted file mode 100644 index e0f327f..0000000 --- a/themes/landscape/layout/_partial/post/tag.ejs +++ /dev/null @@ -1,6 +0,0 @@ -<% if (post.tags && post.tags.length){ %> - <%- list_tags(post.tags, { - show_count: false, - class: 'article-tag' - }) %> -<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/title.ejs b/themes/landscape/layout/_partial/post/title.ejs deleted file mode 100644 index 69d646f..0000000 --- a/themes/landscape/layout/_partial/post/title.ejs +++ /dev/null @@ -1,15 +0,0 @@ -<% if (post.link){ %> -

- -

-<% } else if (post.title){ %> - <% if (index){ %> -

- <%= post.title %> -

- <% } else { %> -

- <%= post.title %> -

- <% } %> -<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/sidebar.ejs b/themes/landscape/layout/_partial/sidebar.ejs deleted file mode 100644 index c1e48e5..0000000 --- a/themes/landscape/layout/_partial/sidebar.ejs +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/themes/landscape/layout/_widget/archive.ejs b/themes/landscape/layout/_widget/archive.ejs deleted file mode 100644 index a20c58c..0000000 --- a/themes/landscape/layout/_widget/archive.ejs +++ /dev/null @@ -1,8 +0,0 @@ -<% if (site.posts.length){ %> -
-

<%= __('archive_a') %>

-
- <%- list_archives({show_count: theme.show_count, type: theme.archive_type}) %> -
-
-<% } %> diff --git a/themes/landscape/layout/_widget/category.ejs b/themes/landscape/layout/_widget/category.ejs deleted file mode 100644 index 8d9e5e9..0000000 --- a/themes/landscape/layout/_widget/category.ejs +++ /dev/null @@ -1,8 +0,0 @@ -<% if (site.categories.length){ %> -
-

<%= __('categories') %>

-
- <%- list_categories({show_count: theme.show_count}) %> -
-
-<% } %> diff --git a/themes/landscape/layout/_widget/recent_posts.ejs b/themes/landscape/layout/_widget/recent_posts.ejs deleted file mode 100644 index 7a38547..0000000 --- a/themes/landscape/layout/_widget/recent_posts.ejs +++ /dev/null @@ -1,14 +0,0 @@ -<% if (site.posts.length){ %> -
-

<%= __('recent_posts') %>

-
- -
-
-<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_widget/tag.ejs b/themes/landscape/layout/_widget/tag.ejs deleted file mode 100644 index ea5fb2c..0000000 --- a/themes/landscape/layout/_widget/tag.ejs +++ /dev/null @@ -1,8 +0,0 @@ -<% if (site.tags.length){ %> -
-

<%= __('tags') %>

-
- <%- list_tags({show_count: theme.show_count}) %> -
-
-<% } %> diff --git a/themes/landscape/layout/_widget/tagcloud.ejs b/themes/landscape/layout/_widget/tagcloud.ejs deleted file mode 100644 index 5feb435..0000000 --- a/themes/landscape/layout/_widget/tagcloud.ejs +++ /dev/null @@ -1,8 +0,0 @@ -<% if (site.tags.length){ %> -
-

<%= __('tagcloud') %>

-
- <%- tagcloud() %> -
-
-<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/archive.ejs b/themes/landscape/layout/archive.ejs deleted file mode 100644 index 52f9b21..0000000 --- a/themes/landscape/layout/archive.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/category.ejs b/themes/landscape/layout/category.ejs deleted file mode 100644 index 3ffe252..0000000 --- a/themes/landscape/layout/category.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('_partial/archive', {pagination: config.category, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/index.ejs b/themes/landscape/layout/index.ejs deleted file mode 100644 index 60a2c68..0000000 --- a/themes/landscape/layout/index.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('_partial/archive', {pagination: 2, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/layout.ejs b/themes/landscape/layout/layout.ejs deleted file mode 100644 index cf88daf..0000000 --- a/themes/landscape/layout/layout.ejs +++ /dev/null @@ -1,18 +0,0 @@ -<%- partial('_partial/head') %> - -
-
- <%- partial('_partial/header', null, {cache: !config.relative_link}) %> -
-
<%- body %>
- <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %> - <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %> - <% } %> -
- <%- partial('_partial/footer', null, {cache: !config.relative_link}) %> -
- <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> - <%- partial('_partial/after-footer') %> -
- - \ No newline at end of file diff --git a/themes/landscape/layout/page.ejs b/themes/landscape/layout/page.ejs deleted file mode 100644 index bea6318..0000000 --- a/themes/landscape/layout/page.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/themes/landscape/layout/post.ejs b/themes/landscape/layout/post.ejs deleted file mode 100644 index bea6318..0000000 --- a/themes/landscape/layout/post.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/themes/landscape/layout/tag.ejs b/themes/landscape/layout/tag.ejs deleted file mode 100644 index 048cdb0..0000000 --- a/themes/landscape/layout/tag.ejs +++ /dev/null @@ -1 +0,0 @@ -<%- partial('_partial/archive', {pagination: config.tag, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/package.json b/themes/landscape/package.json deleted file mode 100644 index ac0df3d..0000000 --- a/themes/landscape/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "hexo-theme-landscape", - "version": "0.0.2", - "private": true, - "devDependencies": { - "grunt": "~0.4.2", - "load-grunt-tasks": "~0.2.0", - "grunt-git": "~0.2.2", - "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-copy": "~0.4.1" - } -} diff --git a/themes/landscape/scripts/fancybox.js b/themes/landscape/scripts/fancybox.js deleted file mode 100644 index 83f1fdc..0000000 --- a/themes/landscape/scripts/fancybox.js +++ /dev/null @@ -1,24 +0,0 @@ -var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/; - -/** -* Fancybox tag -* -* Syntax: -* {% fancybox /path/to/image [/path/to/thumbnail] [title] %} -*/ - -hexo.extend.tag.register('fancybox', function(args){ - var original = args.shift(), - thumbnail = ''; - - if (args.length && rUrl.test(args[0])){ - thumbnail = args.shift(); - } - - var title = args.join(' '); - - return '' + - '' + title + '' - '' + - (title ? '' + title + '' : ''); -}); \ No newline at end of file diff --git a/themes/landscape/source/css/_extend.styl b/themes/landscape/source/css/_extend.styl deleted file mode 100644 index 96a1817..0000000 --- a/themes/landscape/source/css/_extend.styl +++ /dev/null @@ -1,63 +0,0 @@ -$block-caption - text-decoration: none - text-transform: uppercase - letter-spacing: 2px - color: color-grey - margin-bottom: 1em - margin-left: 5px - line-height: 1em - text-shadow: 0 1px #fff - font-weight: bold - -$block - background: #fff - box-shadow: 1px 2px 3px #ddd - border: 1px solid color-border - border-radius: 3px - -$base-style - h1 - font-size: 2em - h2 - font-size: 1.5em - h3 - font-size: 1.3em - h4 - font-size: 1.2em - h5 - font-size: 1em - h6 - font-size: 1em - color: color-grey - hr - border: 1px dashed color-border - 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 - 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 \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/archive.styl b/themes/landscape/source/css/_partial/archive.styl deleted file mode 100644 index 90ef053..0000000 --- a/themes/landscape/source/css/_partial/archive.styl +++ /dev/null @@ -1,80 +0,0 @@ -.archives-wrap - margin: block-margin 0 - -.archives - clearfix() - -.archive-year-wrap - margin-bottom: 1em - -.archive-year - @extend $block-caption - -.archives - column-gap: 10px - @media mq-tablet - column-count: 2 - @media mq-normal - column-count: 3 - -.archive-article - avoid-column-break() - -.archive-article-inner - @extend $block - padding: 10px - margin-bottom: 15px - -.archive-article-title - text-decoration: none - font-weight: bold - color: color-default - transition: color 0.2s - line-height: line-height - &:hover - color: color-link - -.archive-article-footer - margin-top: 1em - -.archive-article-date - color: color-grey - text-decoration: none - font-size: 0.85em - line-height: 1em - margin-bottom: 0.5em - display: block - -#page-nav - clearfix() - margin: block-margin auto - background: #fff - box-shadow: 1px 2px 3px #ddd - border: 1px solid color-border - border-radius: 3px - text-align: center - color: color-grey - overflow: hidden - a, span - padding: 10px 20px - line-height: 1 - height: 2ex - a - color: color-grey - text-decoration: none - &:hover - background: color-grey - color: #fff - .prev - float: left - .next - float: right - .page-number - display: inline-block - @media mq-mobile - display: none - .current - color: color-default - font-weight: bold - .space - color: color-border \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/article.styl b/themes/landscape/source/css/_partial/article.styl deleted file mode 100644 index 46094f9..0000000 --- a/themes/landscape/source/css/_partial/article.styl +++ /dev/null @@ -1,357 +0,0 @@ -.article - margin: block-margin 0 - -.article-inner - @extend $block - overflow: hidden - -.article-meta - clearfix() - -.article-date - @extend $block-caption - float: left - -.article-category - float: left - line-height: 1em - color: #ccc - text-shadow: 0 1px #fff - margin-left: 8px - &:before - content: "\2022" - -.article-category-link - @extend $block-caption - margin: 0 12px 1em - -.article-header - padding: article-padding article-padding 0 - -.article-title - text-decoration: none - font-size: 2em - font-weight: bold - color: color-default - line-height: line-height-title - transition: color 0.2s - a&:hover - color: color-link - -.article-entry - @extend $base-style - clearfix() - color: color-default - padding: 0 article-padding - p, table - line-height: line-height - margin: line-height 0 - h1, h2, h3, h4, h5, h6 - font-weight: bold - h1, h2, h3, h4, h5, h6 - line-height: line-height-title - margin: line-height-title 0 - a - color: color-link - text-decoration: none - &:hover - text-decoration: underline - ul, ol, dl - margin-top: line-height - margin-bottom: line-height - img, video - max-width: 100% - height: auto - display: block - margin: auto - iframe - border: none - table - width: 100% - border-collapse: collapse - border-spacing: 0 - th - font-weight: bold - border-bottom: 3px solid color-border - padding-bottom: 0.5em - td - border-bottom: 1px solid color-border - padding: 10px 0 - blockquote - font-family: font-serif - font-size: 1.4em - margin: line-height 20px - text-align: center - footer - font-size: font-size - margin: line-height 0 - font-family: font-sans - cite - &:before - content: "—" - padding: 0 0.5em - .pullquote - text-align: left - width: 45% - margin: 0 - &.left - margin-left: 0.5em - margin-right: 1em - &.right - margin-right: 0.5em - margin-left: 1em - .caption - color: color-grey - display: block - font-size: 0.9em - margin-top: 0.5em - position: relative - text-align: center - // http://webdesignerwall.com/tutorials/css-elastic-videos - .video-container - position: relative - padding-top: (9 / 16 * 100)% // 16:9 ratio - height: 0 - overflow: hidden - iframe, object, embed - position: absolute - top: 0 - left: 0 - width: 100% - height: 100% - margin-top: 0 - -.article-more-link a - display: inline-block - line-height: 1em - padding: 6px 15px - border-radius: 15px - background: color-background - color: color-grey - text-shadow: 0 1px #fff - text-decoration: none - &:hover - background: color-link - color: #fff - text-decoration: none - text-shadow: 0 1px darken(color-link, 20%) - -.article-footer - clearfix() - font-size: 0.85em - line-height: line-height - border-top: 1px solid color-border - padding-top: line-height - margin: 0 article-padding article-padding - a - color: color-grey - text-decoration: none - &:hover - color: color-default - -.article-tag-list-item - float: left - margin-right: 10px - -.article-tag-list-link - &:before - content: "#" - -.article-comment-link - float: right - &:before - content: "\f075" - font-family: font-icon - padding-right: 8px - -.article-share-link - cursor: pointer - float: right - margin-left: 20px - &:before - content: "\f064" - font-family: font-icon - padding-right: 6px - -#article-nav - clearfix() - position: relative - @media mq-normal - margin: block-margin 0 - &:before - absolute-center(8px) - content: "" - border-radius: 50% - background: color-border - box-shadow: 0 1px 2px #fff - -.article-nav-link-wrap - text-decoration: none - text-shadow: 0 1px #fff - color: color-grey - box-sizing: border-box - margin-top: block-margin - text-align: center - display: block - &:hover - color: color-default - @media mq-normal - width: 50% - margin-top: 0 - -#article-nav-newer - @media mq-normal - float: left - text-align: right - padding-right: 20px - -#article-nav-older - @media mq-normal - float: right - text-align: left - padding-left: 20px - -.article-nav-caption - text-transform: uppercase - letter-spacing: 2px - color: color-border - line-height: 1em - font-weight: bold - #article-nav-newer & - margin-right: -2px - -.article-nav-title - font-size: 0.85em - line-height: line-height - margin-top: 0.5em - -.article-share-box - position: absolute - display: none - background: #fff - box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.2) - border-radius: 3px - margin-left: -145px - overflow: hidden - z-index: 1 - &.on - display: block - -.article-share-input - width: 100% - background: none - box-sizing: border-box - font: 14px font-sans - padding: 0 15px - color: color-default - outline: none - border: 1px solid color-border - border-radius: 3px 3px 0 0 - height: 36px - line-height: 36px - -.article-share-links - clearfix() - background: color-background - -$article-share-link - width: 50px - height: 36px - display: block - float: left - position: relative - color: #999 - text-shadow: 0 1px #fff - &:before - font-size: 20px - font-family: font-icon - absolute-center(@font-size) - text-align: center - &:hover - color: #fff - -.article-share-twitter - @extend $article-share-link - &:before - content: "\f099" - &:hover - background: color-twitter - text-shadow: 0 1px darken(color-twitter, 20%) - -.article-share-facebook - @extend $article-share-link - &:before - content: "\f09a" - &:hover - background: color-facebook - text-shadow: 0 1px darken(color-facebook, 20%) - -.article-share-pinterest - @extend $article-share-link - &:before - content: "\f0d2" - &:hover - background: color-pinterest - text-shadow: 0 1px darken(color-pinterest, 20%) - -.article-share-google - @extend $article-share-link - &:before - content: "\f0d5" - &:hover - background: color-google - text-shadow: 0 1px darken(color-google, 20%) - -.article-gallery - background: #000 - position: relative - -.article-gallery-photos - position: relative - overflow: hidden - -.article-gallery-img - display: none - max-width: 100% - &:first-child - display: block - &.loaded - position: absolute - display: block - img - display: block - max-width: 100% - margin: 0 auto -/* -$article-gallery-ctrl - position: absolute - top: 0 - height: 100% - width: 60px - color: #fff - text-shadow: 0 0 3px rgba(0, 0, 0, 0.3) - opacity: 0.3 - transition: opacity 0.2s - cursor: pointer - &:hover - opacity: 0.8 - &:before - font-size: 30px - font-family: font-icon - position: absolute - top: 50% - margin-top: @font-size * -0.5 - -.article-gallery-prev - @extend $article-gallery-ctrl - left: 0 - &:before - content: "\f053" - left: 15px - -.article-gallery-next - @extend $article-gallery-ctrl - right: 0 - &:before - content: "\f054" - right: 15px*/ \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/comment.styl b/themes/landscape/source/css/_partial/comment.styl deleted file mode 100644 index 296b7dd..0000000 --- a/themes/landscape/source/css/_partial/comment.styl +++ /dev/null @@ -1,9 +0,0 @@ -#comments - background: #fff - box-shadow: 1px 2px 3px #ddd - padding: article-padding - border: 1px solid color-border - border-radius: 3px - margin: block-margin 0 - a - color: color-link \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/footer.styl b/themes/landscape/source/css/_partial/footer.styl deleted file mode 100644 index fe2fd24..0000000 --- a/themes/landscape/source/css/_partial/footer.styl +++ /dev/null @@ -1,14 +0,0 @@ -#footer - background: color-footer-background - padding: 50px 0 - border-top: 1px solid color-border - color: color-grey - a - color: color-link - text-decoration: none - &:hover - text-decoration: underline - -#footer-info - line-height: line-height - font-size: 0.85em \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/header.styl b/themes/landscape/source/css/_partial/header.styl deleted file mode 100644 index d18ebc8..0000000 --- a/themes/landscape/source/css/_partial/header.styl +++ /dev/null @@ -1,165 +0,0 @@ -#header - height: banner-height - position: relative - border-bottom: 1px solid color-border - &:before, &:after - content: "" - position: absolute - left: 0 - right: 0 - height: 40px - &:before - top: 0 - background: linear-gradient(rgba(0, 0, 0, 0.2), transparent) - &:after - bottom: 0 - background: linear-gradient(transparent, rgba(0, 0, 0, 0.2)) - -#header-outer - height: 100% - position: relative - -#header-inner - position: relative - overflow: hidden - -#banner - position: absolute - top: 0 - left: 0 - width: 100% - height: 100% - background: url(banner-url) center #000 - background-size: cover - z-index: -1 - -#header-title - text-align: center - height: logo-size - position: absolute - top: 50% - left: 0 - margin-top: logo-size * -0.5 - -$logo-text - text-decoration: none - color: #fff - font-weight: 300 - text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) - -#logo - @extend $logo-text - font-size: logo-size - line-height: logo-size - letter-spacing: 2px - -#subtitle - @extend $logo-text - font-size: subtitle-size - line-height: subtitle-size - letter-spacing: 1px - -#subtitle-wrap - margin-top: subtitle-size - -#main-nav - float: left - margin-left: -15px - -$nav-link - float: left - color: #fff - opacity: 0.6 - text-decoration: none - text-shadow: 0 1px rgba(0, 0, 0, 0.2) - transition: opacity 0.2s - display: block - padding: 20px 15px - &:hover - opacity: 1 - -.nav-icon - @extend $nav-link - font-family: font-icon - text-align: center - font-size: font-size - width: font-size - height: font-size - padding: 20px 15px - position: relative - cursor: pointer - -.main-nav-link - @extend $nav-link - font-weight: 300 - letter-spacing: 1px - @media mq-mobile - display: none - -#main-nav-toggle - display: none - &:before - content: "\f0c9" - @media mq-mobile - display: block - -#sub-nav - float: right - margin-right: -15px - -#nav-rss-link - &:before - content: "\f09e" - -#nav-search-btn - &:before - content: "\f002" - -#search-form-wrap - position: absolute - top: 15px - width: 150px - height: 30px - right: -150px - opacity: 0 - transition: 0.2s ease-out - &.on - opacity: 1 - right: 0 - @media mq-mobile - width: 100% - right: -100% - -.search-form - position: absolute - top: 0 - left: 0 - right: 0 - background: #fff - padding: 5px 15px - border-radius: 15px - box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) - -.search-form-input - border: none - background: none - color: color-default - width: 100% - font: 13px font-sans - outline: none - &::-webkit-search-results-decoration - &::-webkit-search-cancel-button - -webkit-appearance: none - -.search-form-submit - position: absolute - top: 50% - right: 10px - margin-top: -7px - font: 13px font-icon - border: none - background: none - color: #bbb - cursor: pointer - &:hover, &:focus - color: #777 \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/highlight.styl b/themes/landscape/source/css/_partial/highlight.styl deleted file mode 100644 index c932ec3..0000000 --- a/themes/landscape/source/css/_partial/highlight.styl +++ /dev/null @@ -1,158 +0,0 @@ -// https://github.com/chriskempson/tomorrow-theme -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 - -$code-block - background: highlight-background - margin: 0 article-padding * -1 - padding: 15px article-padding - border-style: solid - border-color: color-border - border-width: 1px 0 - overflow: auto - color: highlight-foreground - line-height: font-size * line-height - -$line-numbers - color: #666 - font-size: 0.85em - -.article-entry - pre, code - font-family: font-mono - code - background: color-background - 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 - margin: 0 - padding: 0 - table - margin: 0 - width: auto - td - border: none - padding: 0 - 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: font-size * line-height - .line.marked - background: highlight-selection - .gist - margin: 0 article-padding * -1 - border-style: solid - border-color: color-border - border-width: 1px 0 - background: highlight-background - padding: 15px article-padding 15px 0 - .gist-file - border: none - font-family: font-mono - 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: 0.85em font-sans - text-shadow: 0 0 - padding: 0 - margin-top: 1em - margin-left: article-padding - a - color: color-link - font-weight: normal - &:hover - text-decoration: underline - -pre - .comment - .title - 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 - .class - .ruby .class .title - .css .rules .attribute - color: highlight-green - .string - .value - .inheritance - .header - .ruby .symbol - .xml .cdata - color: highlight-green - .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 diff --git a/themes/landscape/source/css/_partial/mobile.styl b/themes/landscape/source/css/_partial/mobile.styl deleted file mode 100644 index eb68b3a..0000000 --- a/themes/landscape/source/css/_partial/mobile.styl +++ /dev/null @@ -1,19 +0,0 @@ -@media mq-mobile - #mobile-nav - position: absolute - top: 0 - left: 0 - width: mobile-nav-width - height: 100% - background: color-mobile-nav-background - border-right: 1px solid #fff - -@media mq-mobile - .mobile-nav-link - display: block - color: color-grey - text-decoration: none - padding: 15px 20px - font-weight: bold - &:hover - color: #fff diff --git a/themes/landscape/source/css/_partial/sidebar-aside.styl b/themes/landscape/source/css/_partial/sidebar-aside.styl deleted file mode 100644 index 838b167..0000000 --- a/themes/landscape/source/css/_partial/sidebar-aside.styl +++ /dev/null @@ -1,27 +0,0 @@ -#sidebar - @media mq-normal - column(sidebar-column) - -.widget-wrap - margin: block-margin 0 - -.widget-title - @extend $block-caption - -.widget - color: color-sidebar-text - text-shadow: 0 1px #fff - background: color-widget-background - box-shadow: 0 -1px 4px color-widget-border inset - border: 1px solid color-widget-border - padding: 15px - border-radius: 3px - a - color: color-link - text-decoration: none - &:hover - text-decoration: underline - ul, ol, dl - ul, ol, dl - margin-left: 15px - list-style: disc \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/sidebar-bottom.styl b/themes/landscape/source/css/_partial/sidebar-bottom.styl deleted file mode 100644 index e2403fd..0000000 --- a/themes/landscape/source/css/_partial/sidebar-bottom.styl +++ /dev/null @@ -1,27 +0,0 @@ -.widget-wrap - margin-bottom: block-margin !important - @media mq-normal - column(main-column) - -.widget-title - color: #ccc - text-transform: uppercase - letter-spacing: 2px - margin-bottom: .5em - line-height: 1em - font-weight: bold - -.widget - color: color-grey - ul, ol - li - display: inline-block - zoom:1 - *display:inline - padding-right: .75em -/* Having problems getting balanced white space between items - li:before - content: " | " - li:first-child:before - content: none - */ diff --git a/themes/landscape/source/css/_partial/sidebar.styl b/themes/landscape/source/css/_partial/sidebar.styl deleted file mode 100644 index e43d66a..0000000 --- a/themes/landscape/source/css/_partial/sidebar.styl +++ /dev/null @@ -1,35 +0,0 @@ -if sidebar is bottom - @import "sidebar-bottom" -else - @import "sidebar-aside" - -.widget - @extend $base-style - line-height: line-height - word-wrap: break-word - font-size: 0.9em - ul, ol - list-style: none - margin: 0 - ul, ol - margin: 0 20px - ul - list-style: disc - ol - list-style: decimal - -.category-list-count -.tag-list-count -.archive-list-count - padding-left: 5px - color: color-grey - font-size: 0.85em - &:before - content: "(" - &:after - content: ")" - -.tagcloud - a - margin-right: 5px - display: inline-block diff --git a/themes/landscape/source/css/_util/grid.styl b/themes/landscape/source/css/_util/grid.styl deleted file mode 100644 index 2a14dd2..0000000 --- a/themes/landscape/source/css/_util/grid.styl +++ /dev/null @@ -1,38 +0,0 @@ -///////////////// -// Semantic.gs // for Stylus: http://learnboost.github.com/stylus/ -///////////////// - -// Utility function — you should never need to modify this -// _gridsystem-width = (column-width + gutter-width) * columns -gridsystem-width(_columns = columns) - (column-width + gutter-width) * _columns - -// Set @total-width to 100% for a fluid layout -// total-width = gridsystem-width(columns) -total-width = 100% - -////////// -// GRID // -////////// - -body - clearfix() - width: 100% - -row(_columns = columns) - clearfix() - display: block - width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns)) - margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1) - -column(x, _columns = columns) - display: inline - float: left - width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns)) - margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns)) - -push(offset = 1) - margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) - -pull(offset = 1) - margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) \ No newline at end of file diff --git a/themes/landscape/source/css/_util/mixin.styl b/themes/landscape/source/css/_util/mixin.styl deleted file mode 100644 index b56f037..0000000 --- a/themes/landscape/source/css/_util/mixin.styl +++ /dev/null @@ -1,31 +0,0 @@ -// http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ -hide-text() - text-indent: 100% - white-space: nowrap - overflow: hidden - -// http://codepen.io/shshaw/full/gEiDt -absolute-center(width, height = width) - // margin: auto - // position: absolute - // top: 50% - // top: 0 - // left: 0 - // bottom: 0 - // right: 0 - // width: width - // height: height - // overflow: auto - width: width - height: height - position: absolute - top: 50% - left: 50% - margin-top: width * -0.5 - margin-left: height * -0.5 - -avoid-column-break() - vendor("column-break-inside", avoid, only: webkit) - page-break-inside: avoid // for firefox - overflow: hidden // fix for firefox - break-inside: avoid-column diff --git a/themes/landscape/source/css/_variables.styl b/themes/landscape/source/css/_variables.styl deleted file mode 100644 index 4562911..0000000 --- a/themes/landscape/source/css/_variables.styl +++ /dev/null @@ -1,63 +0,0 @@ -// Config -support-for-ie = false -vendor-prefixes = webkit moz ms official - -// Colors -color-default = #555 -color-grey = #999 -color-border = #ddd -color-link = #258fb8 -color-background = #eee -color-sidebar-text = #777 -color-widget-background = #ddd -color-widget-border = #ccc -color-footer-background = #262a30 -color-mobile-nav-background = #191919 -color-twitter = #00aced -color-facebook = #3b5998 -color-pinterest = #cb2027 -color-google = #dd4b39 - -// Fonts -font-sans = -apple-system, BlinkMacSystemFont, - "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", - "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif -font-serif = Georgia, "Times New Roman", serif -font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace -font-icon = FontAwesome -font-icon-path = "fonts/fontawesome-webfont" -font-icon-version = "4.0.3" -font-size = 14px -line-height = 1.6em -line-height-title = 1.1em - -// Header -logo-size = 40px -subtitle-size = 16px -banner-height = 300px -banner-url = "images/banner.jpg" - -sidebar = hexo-config("sidebar") - -// Layout -block-margin = 50px -article-padding = 20px -mobile-nav-width = 280px -main-column = 9 -sidebar-column = 3 - -if sidebar and sidebar isnt bottom - _sidebar-column = sidebar-column -else - _sidebar-column = 0 - -// Grids -column-width = 80px -gutter-width = 20px -columns = main-column + _sidebar-column - -// Media queries -mq-mobile = "screen and (max-width: 479px)" -mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)" -mq-normal = "screen and (min-width: 768px)" \ No newline at end of file diff --git a/themes/landscape/source/css/fonts/FontAwesome.otf b/themes/landscape/source/css/fonts/FontAwesome.otf deleted file mode 100644 index 8b0f54e..0000000 Binary files a/themes/landscape/source/css/fonts/FontAwesome.otf and /dev/null differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.eot b/themes/landscape/source/css/fonts/fontawesome-webfont.eot deleted file mode 100644 index 7c79c6a..0000000 Binary files a/themes/landscape/source/css/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.svg b/themes/landscape/source/css/fonts/fontawesome-webfont.svg deleted file mode 100644 index 45fdf33..0000000 --- a/themes/landscape/source/css/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.ttf b/themes/landscape/source/css/fonts/fontawesome-webfont.ttf deleted file mode 100644 index e89738d..0000000 Binary files a/themes/landscape/source/css/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.woff b/themes/landscape/source/css/fonts/fontawesome-webfont.woff deleted file mode 100644 index 8c1748a..0000000 Binary files a/themes/landscape/source/css/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/themes/landscape/source/css/images/banner.jpg b/themes/landscape/source/css/images/banner.jpg deleted file mode 100644 index b963e06..0000000 Binary files a/themes/landscape/source/css/images/banner.jpg and /dev/null differ diff --git a/themes/landscape/source/css/style.styl b/themes/landscape/source/css/style.styl deleted file mode 100644 index c51f8e4..0000000 --- a/themes/landscape/source/css/style.styl +++ /dev/null @@ -1,89 +0,0 @@ -@import "nib" -@import "_variables" -@import "_util/mixin" -@import "_util/grid" - -global-reset() - -input, button - margin: 0 - padding: 0 - &::-moz-focus-inner - border: 0 - padding: 0 - -@font-face - font-family: FontAwesome - font-style: normal - font-weight: normal - src: url(font-icon-path + ".eot?v=#" + font-icon-version) - src: url(font-icon-path + ".eot?#iefix&v=#" + font-icon-version) format("embedded-opentype"), - url(font-icon-path + ".woff?v=#" + font-icon-version) format("woff"), - url(font-icon-path + ".ttf?v=#" + font-icon-version) format("truetype"), - url(font-icon-path + ".svg#fontawesomeregular?v=#" + font-icon-version) format("svg") - -html, body, #container - height: 100% - -body - background: color-background - font: font-size font-sans - -webkit-text-size-adjust: 100% - -.outer - clearfix() - max-width: (column-width + gutter-width) * columns + gutter-width - margin: 0 auto - padding: 0 gutter-width - -.inner - column(columns) - -.left, .alignleft - float: left - -.right, .alignright - float: right - -.clear - clear: both - -#container - position: relative - -.mobile-nav-on - overflow: hidden - -#wrap - height: 100% - width: 100% - position: absolute - top: 0 - left: 0 - transition: 0.2s ease-out - z-index: 1 - background: color-background - .mobile-nav-on & - left: mobile-nav-width - -if sidebar and sidebar isnt bottom - #main - @media mq-normal - column(main-column) - -if sidebar is left - @media mq-normal - #main - float: right - -@import "_extend" -@import "_partial/header" -@import "_partial/article" -@import "_partial/comment" -@import "_partial/archive" -@import "_partial/footer" -@import "_partial/highlight" -@import "_partial/mobile" - -if sidebar - @import "_partial/sidebar" \ No newline at end of file diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js deleted file mode 100644 index 352bb5f..0000000 --- a/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js +++ /dev/null @@ -1,122 +0,0 @@ - /*! - * Buttons helper for fancyBox - * version: 1.0.5 (Mon, 15 Oct 2012) - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * helpers : { - * buttons: { - * position : 'top' - * } - * } - * }); - * - */ -;(function ($) { - //Shortcut for fancyBox object - var F = $.fancybox; - - //Add helper object - F.helpers.buttons = { - defaults : { - skipSingle : false, // disables if gallery contains single image - position : 'top', // 'top' or 'bottom' - tpl : '
' - }, - - list : null, - buttons: null, - - beforeLoad: function (opts, obj) { - //Remove self if gallery do not have at least two items - - if (opts.skipSingle && obj.group.length < 2) { - obj.helpers.buttons = false; - obj.closeBtn = true; - - return; - } - - //Increase top margin to give space for buttons - obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; - }, - - onPlayStart: function () { - if (this.buttons) { - this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); - } - }, - - onPlayEnd: function () { - if (this.buttons) { - this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); - } - }, - - afterShow: function (opts, obj) { - var buttons = this.buttons; - - if (!buttons) { - this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); - - buttons = { - prev : this.list.find('.btnPrev').click( F.prev ), - next : this.list.find('.btnNext').click( F.next ), - play : this.list.find('.btnPlay').click( F.play ), - toggle : this.list.find('.btnToggle').click( F.toggle ), - close : this.list.find('.btnClose').click( F.close ) - } - } - - //Prev - if (obj.index > 0 || obj.loop) { - buttons.prev.removeClass('btnDisabled'); - } else { - buttons.prev.addClass('btnDisabled'); - } - - //Next / Play - if (obj.loop || obj.index < obj.group.length - 1) { - buttons.next.removeClass('btnDisabled'); - buttons.play.removeClass('btnDisabled'); - - } else { - buttons.next.addClass('btnDisabled'); - buttons.play.addClass('btnDisabled'); - } - - this.buttons = buttons; - - this.onUpdate(opts, obj); - }, - - onUpdate: function (opts, obj) { - var toggle; - - if (!this.buttons) { - return; - } - - toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); - - //Size toggle button - if (obj.canShrink) { - toggle.addClass('btnToggleOn'); - - } else if (!obj.canExpand) { - toggle.addClass('btnDisabled'); - } - }, - - beforeClose: function () { - if (this.list) { - this.list.remove(); - } - - this.list = null; - this.buttons = null; - } - }; - -}(jQuery)); diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js deleted file mode 100644 index 62737a5..0000000 --- a/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js +++ /dev/null @@ -1,199 +0,0 @@ -/*! - * Media helper for fancyBox - * version: 1.0.6 (Fri, 14 Jun 2013) - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * helpers : { - * media: true - * } - * }); - * - * Set custom URL parameters: - * $(".fancybox").fancybox({ - * helpers : { - * media: { - * youtube : { - * params : { - * autoplay : 0 - * } - * } - * } - * } - * }); - * - * Or: - * $(".fancybox").fancybox({, - * helpers : { - * media: true - * }, - * youtube : { - * autoplay: 0 - * } - * }); - * - * Supports: - * - * Youtube - * http://www.youtube.com/watch?v=opj24KnzrWo - * http://www.youtube.com/embed/opj24KnzrWo - * http://youtu.be/opj24KnzrWo - * http://www.youtube-nocookie.com/embed/opj24KnzrWo - * Vimeo - * http://vimeo.com/40648169 - * http://vimeo.com/channels/staffpicks/38843628 - * http://vimeo.com/groups/surrealism/videos/36516384 - * http://player.vimeo.com/video/45074303 - * Metacafe - * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ - * http://www.metacafe.com/watch/7635964/ - * Dailymotion - * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people - * Twitvid - * http://twitvid.com/QY7MD - * Twitpic - * http://twitpic.com/7p93st - * Instagram - * http://instagr.am/p/IejkuUGxQn/ - * http://instagram.com/p/IejkuUGxQn/ - * Google maps - * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 - * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 - * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 - */ -;(function ($) { - "use strict"; - - //Shortcut for fancyBox object - var F = $.fancybox, - format = function( url, rez, params ) { - params = params || ''; - - if ( $.type( params ) === "object" ) { - params = $.param(params, true); - } - - $.each(rez, function(key, value) { - url = url.replace( '$' + key, value || '' ); - }); - - if (params.length) { - url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; - } - - return url; - }; - - //Add helper object - F.helpers.media = { - defaults : { - youtube : { - matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, - params : { - autoplay : 1, - autohide : 1, - fs : 1, - rel : 0, - hd : 1, - wmode : 'opaque', - enablejsapi : 1 - }, - type : 'iframe', - url : '//www.youtube.com/embed/$3' - }, - vimeo : { - matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, - params : { - autoplay : 1, - hd : 1, - show_title : 1, - show_byline : 1, - show_portrait : 0, - fullscreen : 1 - }, - type : 'iframe', - url : '//player.vimeo.com/video/$1' - }, - metacafe : { - matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, - params : { - autoPlay : 'yes' - }, - type : 'swf', - url : function( rez, params, obj ) { - obj.swf.flashVars = 'playerVars=' + $.param( params, true ); - - return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; - } - }, - dailymotion : { - matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, - params : { - additionalInfos : 0, - autoStart : 1 - }, - type : 'swf', - url : '//www.dailymotion.com/swf/video/$1' - }, - twitvid : { - matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, - params : { - autoplay : 0 - }, - type : 'iframe', - url : '//www.twitvid.com/embed.php?guid=$1' - }, - twitpic : { - matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, - type : 'image', - url : '//twitpic.com/show/full/$1/' - }, - instagram : { - matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, - type : 'image', - url : '//$1/p/$2/media/?size=l' - }, - google_maps : { - matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, - type : 'iframe', - url : function( rez ) { - return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); - } - } - }, - - beforeLoad : function(opts, obj) { - var url = obj.href || '', - type = false, - what, - item, - rez, - params; - - for (what in opts) { - if (opts.hasOwnProperty(what)) { - item = opts[ what ]; - rez = url.match( item.matcher ); - - if (rez) { - type = item.type; - params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); - - url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); - - break; - } - } - } - - if (type) { - obj.href = url; - obj.type = type; - - obj.autoHeight = false; - } - } - }; - -}(jQuery)); \ No newline at end of file diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js deleted file mode 100644 index 58c9719..0000000 --- a/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js +++ /dev/null @@ -1,165 +0,0 @@ - /*! - * Thumbnail helper for fancyBox - * version: 1.0.7 (Mon, 01 Oct 2012) - * @requires fancyBox v2.0 or later - * - * Usage: - * $(".fancybox").fancybox({ - * helpers : { - * thumbs: { - * width : 50, - * height : 50 - * } - * } - * }); - * - */ -;(function ($) { - //Shortcut for fancyBox object - var F = $.fancybox; - - //Add helper object - F.helpers.thumbs = { - defaults : { - width : 50, // thumbnail width - height : 50, // thumbnail height - position : 'bottom', // 'top' or 'bottom' - source : function ( item ) { // function to obtain the URL of the thumbnail image - var href; - - if (item.element) { - href = $(item.element).find('img').attr('src'); - } - - if (!href && item.type === 'image' && item.href) { - href = item.href; - } - - return href; - } - }, - - wrap : null, - list : null, - width : 0, - - init: function (opts, obj) { - var that = this, - list, - thumbWidth = opts.width, - thumbHeight = opts.height, - thumbSource = opts.source; - - //Build list structure - list = ''; - - for (var n = 0; n < obj.group.length; n++) { - list += '
  • '; - } - - this.wrap = $('
    ').addClass(opts.position).appendTo('body'); - this.list = $('').appendTo(this.wrap); - - //Load each thumbnail - $.each(obj.group, function (i) { - var el = obj.group[ i ], - href = thumbSource( el ); - - if (!href) { - return; - } - - $("").load(function () { - var width = this.width, - height = this.height, - widthRatio, heightRatio, parent; - - if (!that.list || !width || !height) { - return; - } - - //Calculate thumbnail width/height and center it - widthRatio = width / thumbWidth; - heightRatio = height / thumbHeight; - - parent = that.list.children().eq(i).find('a'); - - if (widthRatio >= 1 && heightRatio >= 1) { - if (widthRatio > heightRatio) { - width = Math.floor(width / heightRatio); - height = thumbHeight; - - } else { - width = thumbWidth; - height = Math.floor(height / widthRatio); - } - } - - $(this).css({ - width : width, - height : height, - top : Math.floor(thumbHeight / 2 - height / 2), - left : Math.floor(thumbWidth / 2 - width / 2) - }); - - parent.width(thumbWidth).height(thumbHeight); - - $(this).hide().appendTo(parent).fadeIn(300); - - }) - .attr('src', href) - .attr('title', el.title); - }); - - //Set initial width - this.width = this.list.children().eq(0).outerWidth(true); - - this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); - }, - - beforeLoad: function (opts, obj) { - //Remove self if gallery do not have at least two items - if (obj.group.length < 2) { - obj.helpers.thumbs = false; - - return; - } - - //Increase bottom margin to give space for thumbs - obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); - }, - - afterShow: function (opts, obj) { - //Check if exists and create or update list - if (this.list) { - this.onUpdate(opts, obj); - - } else { - this.init(opts, obj); - } - - //Set active element - this.list.children().removeClass('active').eq(obj.index).addClass('active'); - }, - - //Center list - onUpdate: function (opts, obj) { - if (this.list) { - this.list.stop(true).animate({ - 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) - }, 150); - } - }, - - beforeClose: function () { - if (this.wrap) { - this.wrap.remove(); - } - - this.wrap = null; - this.list = null; - this.width = 0; - } - } - -}(jQuery)); \ No newline at end of file diff --git a/themes/landscape/source/fancybox/jquery.fancybox.css b/themes/landscape/source/fancybox/jquery.fancybox.css deleted file mode 100644 index c75d051..0000000 --- a/themes/landscape/source/fancybox/jquery.fancybox.css +++ /dev/null @@ -1,273 +0,0 @@ -/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ -.fancybox-wrap, -.fancybox-skin, -.fancybox-outer, -.fancybox-inner, -.fancybox-image, -.fancybox-wrap iframe, -.fancybox-wrap object, -.fancybox-nav, -.fancybox-nav span, -.fancybox-tmp -{ - padding: 0; - margin: 0; - border: 0; - outline: none; - vertical-align: top; -} - -.fancybox-wrap { - position: absolute; - top: 0; - left: 0; - z-index: 8020; -} - -.fancybox-skin { - position: relative; - background: #f9f9f9; - color: #444; - text-shadow: none; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.fancybox-opened { - z-index: 8030; -} - -.fancybox-opened .fancybox-skin { - -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); - box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); -} - -.fancybox-outer, .fancybox-inner { - position: relative; -} - -.fancybox-inner { - overflow: hidden; -} - -.fancybox-type-iframe .fancybox-inner { - -webkit-overflow-scrolling: touch; -} - -.fancybox-error { - color: #444; - font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; - margin: 0; - padding: 15px; - white-space: nowrap; -} - -.fancybox-image, .fancybox-iframe { - display: block; - width: 100%; - height: 100%; -} - -.fancybox-image { - max-width: 100%; - max-height: 100%; -} - -#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url(fancybox_sprite.png); -} - -#fancybox-loading { - position: fixed; - top: 50%; - left: 50%; - margin-top: -22px; - margin-left: -22px; - background-position: 0 -108px; - opacity: 0.8; - cursor: pointer; - z-index: 8060; -} - -#fancybox-loading div { - width: 44px; - height: 44px; - background: url(fancybox_loading.gif) center center no-repeat; -} - -.fancybox-close { - position: absolute; - top: -18px; - right: -18px; - width: 36px; - height: 36px; - cursor: pointer; - z-index: 8040; -} - -.fancybox-nav { - position: absolute; - top: 0; - width: 40%; - height: 100%; - cursor: pointer; - text-decoration: none; - background: transparent url(blank.gif); /* helps IE */ - -webkit-tap-highlight-color: rgba(0,0,0,0); - z-index: 8040; -} - -.fancybox-prev { - left: 0; -} - -.fancybox-next { - right: 0; -} - -.fancybox-nav span { - position: absolute; - top: 50%; - width: 36px; - height: 34px; - margin-top: -18px; - cursor: pointer; - z-index: 8040; - visibility: hidden; -} - -.fancybox-prev span { - left: 10px; - background-position: 0 -36px; -} - -.fancybox-next span { - right: 10px; - background-position: 0 -72px; -} - -.fancybox-nav:hover span { - visibility: visible; -} - -.fancybox-tmp { - position: absolute; - top: -99999px; - left: -99999px; - max-width: 99999px; - max-height: 99999px; - overflow: visible !important; -} - -/* Overlay helper */ - -.fancybox-lock { - overflow: visible !important; - width: auto; -} - -.fancybox-lock body { - overflow: hidden !important; -} - -.fancybox-lock-test { - overflow-y: hidden !important; -} - -.fancybox-overlay { - position: absolute; - top: 0; - left: 0; - overflow: hidden; - display: none; - z-index: 8010; - background: url(fancybox_overlay.png); -} - -.fancybox-overlay-fixed { - position: fixed; - bottom: 0; - right: 0; -} - -.fancybox-lock .fancybox-overlay { - overflow: auto; - overflow-y: scroll; -} - -/* Title helper */ - -.fancybox-title { - visibility: hidden; - font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; - position: relative; - text-shadow: none; - z-index: 8050; -} - -.fancybox-opened .fancybox-title { - visibility: visible; -} - -.fancybox-title-float-wrap { - position: absolute; - bottom: 0; - right: 50%; - margin-bottom: -35px; - z-index: 8050; - text-align: center; -} - -.fancybox-title-float-wrap .child { - display: inline-block; - margin-right: -100%; - padding: 2px 20px; - background: transparent; /* Fallback for web browsers that doesn't support RGBa */ - background: rgba(0, 0, 0, 0.8); - -webkit-border-radius: 15px; - -moz-border-radius: 15px; - border-radius: 15px; - text-shadow: 0 1px 2px #222; - color: #FFF; - font-weight: bold; - line-height: 24px; - white-space: nowrap; -} - -.fancybox-title-outside-wrap { - position: relative; - margin-top: 10px; - color: #fff; -} - -.fancybox-title-inside-wrap { - padding-top: 10px; -} - -.fancybox-title-over-wrap { - position: absolute; - bottom: 0; - left: 0; - color: #fff; - padding: 10px; - background: #000; - background: rgba(0, 0, 0, .8); -} - -/*Retina graphics!*/ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), - only screen and (min--moz-device-pixel-ratio: 1.5), - only screen and (min-device-pixel-ratio: 1.5){ - - #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url(fancybox_sprite@2x.png); - background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ - } - - #fancybox-loading div { - background-image: url(fancybox_loading@2x.gif); - background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ - } -} \ No newline at end of file diff --git a/themes/landscape/source/fancybox/jquery.fancybox.js b/themes/landscape/source/fancybox/jquery.fancybox.js deleted file mode 100644 index 7a0f8ac..0000000 --- a/themes/landscape/source/fancybox/jquery.fancybox.js +++ /dev/null @@ -1,2017 +0,0 @@ -/*! - * fancyBox - jQuery Plugin - * version: 2.1.5 (Fri, 14 Jun 2013) - * requires jQuery v1.6 or later - * - * Examples at http://fancyapps.com/fancybox/ - * License: www.fancyapps.com/fancybox/#license - * - * Copyright 2012 Janis Skarnelis - janis@fancyapps.com - * - */ - -;(function (window, document, $, undefined) { - "use strict"; - - var H = $("html"), - W = $(window), - D = $(document), - F = $.fancybox = function () { - F.open.apply( this, arguments ); - }, - IE = navigator.userAgent.match(/msie/i), - didUpdate = null, - isTouch = document.createTouch !== undefined, - - isQuery = function(obj) { - return obj && obj.hasOwnProperty && obj instanceof $; - }, - isString = function(str) { - return str && $.type(str) === "string"; - }, - isPercentage = function(str) { - return isString(str) && str.indexOf('%') > 0; - }, - isScrollable = function(el) { - return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); - }, - getScalar = function(orig, dim) { - var value = parseInt(orig, 10) || 0; - - if (dim && isPercentage(orig)) { - value = F.getViewport()[ dim ] / 100 * value; - } - - return Math.ceil(value); - }, - getValue = function(value, dim) { - return getScalar(value, dim) + 'px'; - }; - - $.extend(F, { - // The current version of fancyBox - version: '2.1.5', - - defaults: { - padding : 15, - margin : 20, - - width : 800, - height : 600, - minWidth : 100, - minHeight : 100, - maxWidth : 9999, - maxHeight : 9999, - pixelRatio: 1, // Set to 2 for retina display support - - autoSize : true, - autoHeight : false, - autoWidth : false, - - autoResize : true, - autoCenter : !isTouch, - fitToView : true, - aspectRatio : false, - topRatio : 0.5, - leftRatio : 0.5, - - scrolling : 'auto', // 'auto', 'yes' or 'no' - wrapCSS : '', - - arrows : true, - closeBtn : true, - closeClick : false, - nextClick : false, - mouseWheel : true, - autoPlay : false, - playSpeed : 3000, - preload : 3, - modal : false, - loop : true, - - ajax : { - dataType : 'html', - headers : { 'X-fancyBox': true } - }, - iframe : { - scrolling : 'auto', - preload : true - }, - swf : { - wmode: 'transparent', - allowfullscreen : 'true', - allowscriptaccess : 'always' - }, - - keys : { - next : { - 13 : 'left', // enter - 34 : 'up', // page down - 39 : 'left', // right arrow - 40 : 'up' // down arrow - }, - prev : { - 8 : 'right', // backspace - 33 : 'down', // page up - 37 : 'right', // left arrow - 38 : 'down' // up arrow - }, - close : [27], // escape key - play : [32], // space - start/stop slideshow - toggle : [70] // letter "f" - toggle fullscreen - }, - - direction : { - next : 'left', - prev : 'right' - }, - - scrollOutside : true, - - // Override some properties - index : 0, - type : null, - href : null, - content : null, - title : null, - - // HTML templates - tpl: { - wrap : '
    ', - image : '', - iframe : '', - error : '

    The requested content cannot be loaded.
    Please try again later.

    ', - closeBtn : '', - next : '', - prev : '' - }, - - // Properties for each animation type - // Opening fancyBox - openEffect : 'fade', // 'elastic', 'fade' or 'none' - openSpeed : 250, - openEasing : 'swing', - openOpacity : true, - openMethod : 'zoomIn', - - // Closing fancyBox - closeEffect : 'fade', // 'elastic', 'fade' or 'none' - closeSpeed : 250, - closeEasing : 'swing', - closeOpacity : true, - closeMethod : 'zoomOut', - - // Changing next gallery item - nextEffect : 'elastic', // 'elastic', 'fade' or 'none' - nextSpeed : 250, - nextEasing : 'swing', - nextMethod : 'changeIn', - - // Changing previous gallery item - prevEffect : 'elastic', // 'elastic', 'fade' or 'none' - prevSpeed : 250, - prevEasing : 'swing', - prevMethod : 'changeOut', - - // Enable default helpers - helpers : { - overlay : true, - title : true - }, - - // Callbacks - onCancel : $.noop, // If canceling - beforeLoad : $.noop, // Before loading - afterLoad : $.noop, // After loading - beforeShow : $.noop, // Before changing in current item - afterShow : $.noop, // After opening - beforeChange : $.noop, // Before changing gallery item - beforeClose : $.noop, // Before closing - afterClose : $.noop // After closing - }, - - //Current state - group : {}, // Selected group - opts : {}, // Group options - previous : null, // Previous element - coming : null, // Element being loaded - current : null, // Currently loaded element - isActive : false, // Is activated - isOpen : false, // Is currently open - isOpened : false, // Have been fully opened at least once - - wrap : null, - skin : null, - outer : null, - inner : null, - - player : { - timer : null, - isActive : false - }, - - // Loaders - ajaxLoad : null, - imgPreload : null, - - // Some collections - transitions : {}, - helpers : {}, - - /* - * Static methods - */ - - open: function (group, opts) { - if (!group) { - return; - } - - if (!$.isPlainObject(opts)) { - opts = {}; - } - - // Close if already active - if (false === F.close(true)) { - return; - } - - // Normalize group - if (!$.isArray(group)) { - group = isQuery(group) ? $(group).get() : [group]; - } - - // Recheck if the type of each element is `object` and set content type (image, ajax, etc) - $.each(group, function(i, element) { - var obj = {}, - href, - title, - content, - type, - rez, - hrefParts, - selector; - - if ($.type(element) === "object") { - // Check if is DOM element - if (element.nodeType) { - element = $(element); - } - - if (isQuery(element)) { - obj = { - href : element.data('fancybox-href') || element.attr('href'), - title : $('
    ').text( element.data('fancybox-title') || element.attr('title') ).html(), - isDom : true, - element : element - }; - - if ($.metadata) { - $.extend(true, obj, element.metadata()); - } - - } else { - obj = element; - } - } - - href = opts.href || obj.href || (isString(element) ? element : null); - title = opts.title !== undefined ? opts.title : obj.title || ''; - - content = opts.content || obj.content; - type = content ? 'html' : (opts.type || obj.type); - - if (!type && obj.isDom) { - type = element.data('fancybox-type'); - - if (!type) { - rez = element.prop('class').match(/fancybox\.(\w+)/); - type = rez ? rez[1] : null; - } - } - - if (isString(href)) { - // Try to guess the content type - if (!type) { - if (F.isImage(href)) { - type = 'image'; - - } else if (F.isSWF(href)) { - type = 'swf'; - - } else if (href.charAt(0) === '#') { - type = 'inline'; - - } else if (isString(element)) { - type = 'html'; - content = element; - } - } - - // Split url into two pieces with source url and content selector, e.g, - // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" - if (type === 'ajax') { - hrefParts = href.split(/\s+/, 2); - href = hrefParts.shift(); - selector = hrefParts.shift(); - } - } - - if (!content) { - if (type === 'inline') { - if (href) { - content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 - - } else if (obj.isDom) { - content = element; - } - - } else if (type === 'html') { - content = href; - - } else if (!type && !href && obj.isDom) { - type = 'inline'; - content = element; - } - } - - $.extend(obj, { - href : href, - type : type, - content : content, - title : title, - selector : selector - }); - - group[ i ] = obj; - }); - - // Extend the defaults - F.opts = $.extend(true, {}, F.defaults, opts); - - // All options are merged recursive except keys - if (opts.keys !== undefined) { - F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; - } - - F.group = group; - - return F._start(F.opts.index); - }, - - // Cancel image loading or abort ajax request - cancel: function () { - var coming = F.coming; - - if (coming && false === F.trigger('onCancel')) { - return; - } - - F.hideLoading(); - - if (!coming) { - return; - } - - if (F.ajaxLoad) { - F.ajaxLoad.abort(); - } - - F.ajaxLoad = null; - - if (F.imgPreload) { - F.imgPreload.onload = F.imgPreload.onerror = null; - } - - if (coming.wrap) { - coming.wrap.stop(true, true).trigger('onReset').remove(); - } - - F.coming = null; - - // If the first item has been canceled, then clear everything - if (!F.current) { - F._afterZoomOut( coming ); - } - }, - - // Start closing animation if is open; remove immediately if opening/closing - close: function (event) { - F.cancel(); - - if (false === F.trigger('beforeClose')) { - return; - } - - F.unbindEvents(); - - if (!F.isActive) { - return; - } - - if (!F.isOpen || event === true) { - $('.fancybox-wrap').stop(true).trigger('onReset').remove(); - - F._afterZoomOut(); - - } else { - F.isOpen = F.isOpened = false; - F.isClosing = true; - - $('.fancybox-item, .fancybox-nav').remove(); - - F.wrap.stop(true, true).removeClass('fancybox-opened'); - - F.transitions[ F.current.closeMethod ](); - } - }, - - // Manage slideshow: - // $.fancybox.play(); - toggle slideshow - // $.fancybox.play( true ); - start - // $.fancybox.play( false ); - stop - play: function ( action ) { - var clear = function () { - clearTimeout(F.player.timer); - }, - set = function () { - clear(); - - if (F.current && F.player.isActive) { - F.player.timer = setTimeout(F.next, F.current.playSpeed); - } - }, - stop = function () { - clear(); - - D.unbind('.player'); - - F.player.isActive = false; - - F.trigger('onPlayEnd'); - }, - start = function () { - if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { - F.player.isActive = true; - - D.bind({ - 'onCancel.player beforeClose.player' : stop, - 'onUpdate.player' : set, - 'beforeLoad.player' : clear - }); - - set(); - - F.trigger('onPlayStart'); - } - }; - - if (action === true || (!F.player.isActive && action !== false)) { - start(); - } else { - stop(); - } - }, - - // Navigate to next gallery item - next: function ( direction ) { - var current = F.current; - - if (current) { - if (!isString(direction)) { - direction = current.direction.next; - } - - F.jumpto(current.index + 1, direction, 'next'); - } - }, - - // Navigate to previous gallery item - prev: function ( direction ) { - var current = F.current; - - if (current) { - if (!isString(direction)) { - direction = current.direction.prev; - } - - F.jumpto(current.index - 1, direction, 'prev'); - } - }, - - // Navigate to gallery item by index - jumpto: function ( index, direction, router ) { - var current = F.current; - - if (!current) { - return; - } - - index = getScalar(index); - - F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; - F.router = router || 'jumpto'; - - if (current.loop) { - if (index < 0) { - index = current.group.length + (index % current.group.length); - } - - index = index % current.group.length; - } - - if (current.group[ index ] !== undefined) { - F.cancel(); - - F._start(index); - } - }, - - // Center inside viewport and toggle position type to fixed or absolute if needed - reposition: function (e, onlyAbsolute) { - var current = F.current, - wrap = current ? current.wrap : null, - pos; - - if (wrap) { - pos = F._getPosition(onlyAbsolute); - - if (e && e.type === 'scroll') { - delete pos.position; - - wrap.stop(true, true).animate(pos, 200); - - } else { - wrap.css(pos); - - current.pos = $.extend({}, current.dim, pos); - } - } - }, - - update: function (e) { - var type = (e && e.originalEvent && e.originalEvent.type), - anyway = !type || type === 'orientationchange'; - - if (anyway) { - clearTimeout(didUpdate); - - didUpdate = null; - } - - if (!F.isOpen || didUpdate) { - return; - } - - didUpdate = setTimeout(function() { - var current = F.current; - - if (!current || F.isClosing) { - return; - } - - F.wrap.removeClass('fancybox-tmp'); - - if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { - F._setDimension(); - } - - if (!(type === 'scroll' && current.canShrink)) { - F.reposition(e); - } - - F.trigger('onUpdate'); - - didUpdate = null; - - }, (anyway && !isTouch ? 0 : 300)); - }, - - // Shrink content to fit inside viewport or restore if resized - toggle: function ( action ) { - if (F.isOpen) { - F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; - - // Help browser to restore document dimensions - if (isTouch) { - F.wrap.removeAttr('style').addClass('fancybox-tmp'); - - F.trigger('onUpdate'); - } - - F.update(); - } - }, - - hideLoading: function () { - D.unbind('.loading'); - - $('#fancybox-loading').remove(); - }, - - showLoading: function () { - var el, viewport; - - F.hideLoading(); - - el = $('
    ').click(F.cancel).appendTo('body'); - - // If user will press the escape-button, the request will be canceled - D.bind('keydown.loading', function(e) { - if ((e.which || e.keyCode) === 27) { - e.preventDefault(); - - F.cancel(); - } - }); - - if (!F.defaults.fixed) { - viewport = F.getViewport(); - - el.css({ - position : 'absolute', - top : (viewport.h * 0.5) + viewport.y, - left : (viewport.w * 0.5) + viewport.x - }); - } - - F.trigger('onLoading'); - }, - - getViewport: function () { - var locked = (F.current && F.current.locked) || false, - rez = { - x: W.scrollLeft(), - y: W.scrollTop() - }; - - if (locked && locked.length) { - rez.w = locked[0].clientWidth; - rez.h = locked[0].clientHeight; - - } else { - // See http://bugs.jquery.com/ticket/6724 - rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); - rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); - } - - return rez; - }, - - // Unbind the keyboard / clicking actions - unbindEvents: function () { - if (F.wrap && isQuery(F.wrap)) { - F.wrap.unbind('.fb'); - } - - D.unbind('.fb'); - W.unbind('.fb'); - }, - - bindEvents: function () { - var current = F.current, - keys; - - if (!current) { - return; - } - - // Changing document height on iOS devices triggers a 'resize' event, - // that can change document height... repeating infinitely - W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); - - keys = current.keys; - - if (keys) { - D.bind('keydown.fb', function (e) { - var code = e.which || e.keyCode, - target = e.target || e.srcElement; - - // Skip esc key if loading, because showLoading will cancel preloading - if (code === 27 && F.coming) { - return false; - } - - // Ignore key combinations and key events within form elements - if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { - $.each(keys, function(i, val) { - if (current.group.length > 1 && val[ code ] !== undefined) { - F[ i ]( val[ code ] ); - - e.preventDefault(); - return false; - } - - if ($.inArray(code, val) > -1) { - F[ i ] (); - - e.preventDefault(); - return false; - } - }); - } - }); - } - - if ($.fn.mousewheel && current.mouseWheel) { - F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { - var target = e.target || null, - parent = $(target), - canScroll = false; - - while (parent.length) { - if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { - break; - } - - canScroll = isScrollable( parent[0] ); - parent = $(parent).parent(); - } - - if (delta !== 0 && !canScroll) { - if (F.group.length > 1 && !current.canShrink) { - if (deltaY > 0 || deltaX > 0) { - F.prev( deltaY > 0 ? 'down' : 'left' ); - - } else if (deltaY < 0 || deltaX < 0) { - F.next( deltaY < 0 ? 'up' : 'right' ); - } - - e.preventDefault(); - } - } - }); - } - }, - - trigger: function (event, o) { - var ret, obj = o || F.coming || F.current; - - if (obj) { - if ($.isFunction( obj[event] )) { - ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); - } - - if (ret === false) { - return false; - } - - if (obj.helpers) { - $.each(obj.helpers, function (helper, opts) { - if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { - F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); - } - }); - } - } - - D.trigger(event); - }, - - isImage: function (str) { - return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); - }, - - isSWF: function (str) { - return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); - }, - - _start: function (index) { - var coming = {}, - obj, - href, - type, - margin, - padding; - - index = getScalar( index ); - obj = F.group[ index ] || null; - - if (!obj) { - return false; - } - - coming = $.extend(true, {}, F.opts, obj); - - // Convert margin and padding properties to array - top, right, bottom, left - margin = coming.margin; - padding = coming.padding; - - if ($.type(margin) === 'number') { - coming.margin = [margin, margin, margin, margin]; - } - - if ($.type(padding) === 'number') { - coming.padding = [padding, padding, padding, padding]; - } - - // 'modal' propery is just a shortcut - if (coming.modal) { - $.extend(true, coming, { - closeBtn : false, - closeClick : false, - nextClick : false, - arrows : false, - mouseWheel : false, - keys : null, - helpers: { - overlay : { - closeClick : false - } - } - }); - } - - // 'autoSize' property is a shortcut, too - if (coming.autoSize) { - coming.autoWidth = coming.autoHeight = true; - } - - if (coming.width === 'auto') { - coming.autoWidth = true; - } - - if (coming.height === 'auto') { - coming.autoHeight = true; - } - - /* - * Add reference to the group, so it`s possible to access from callbacks, example: - * afterLoad : function() { - * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); - * } - */ - - coming.group = F.group; - coming.index = index; - - // Give a chance for callback or helpers to update coming item (type, title, etc) - F.coming = coming; - - if (false === F.trigger('beforeLoad')) { - F.coming = null; - - return; - } - - type = coming.type; - href = coming.href; - - if (!type) { - F.coming = null; - - //If we can not determine content type then drop silently or display next/prev item if looping through gallery - if (F.current && F.router && F.router !== 'jumpto') { - F.current.index = index; - - return F[ F.router ]( F.direction ); - } - - return false; - } - - F.isActive = true; - - if (type === 'image' || type === 'swf') { - coming.autoHeight = coming.autoWidth = false; - coming.scrolling = 'visible'; - } - - if (type === 'image') { - coming.aspectRatio = true; - } - - if (type === 'iframe' && isTouch) { - coming.scrolling = 'scroll'; - } - - // Build the neccessary markup - coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); - - $.extend(coming, { - skin : $('.fancybox-skin', coming.wrap), - outer : $('.fancybox-outer', coming.wrap), - inner : $('.fancybox-inner', coming.wrap) - }); - - $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { - coming.skin.css('padding' + v, getValue(coming.padding[ i ])); - }); - - F.trigger('onReady'); - - // Check before try to load; 'inline' and 'html' types need content, others - href - if (type === 'inline' || type === 'html') { - if (!coming.content || !coming.content.length) { - return F._error( 'content' ); - } - - } else if (!href) { - return F._error( 'href' ); - } - - if (type === 'image') { - F._loadImage(); - - } else if (type === 'ajax') { - F._loadAjax(); - - } else if (type === 'iframe') { - F._loadIframe(); - - } else { - F._afterLoad(); - } - }, - - _error: function ( type ) { - $.extend(F.coming, { - type : 'html', - autoWidth : true, - autoHeight : true, - minWidth : 0, - minHeight : 0, - scrolling : 'no', - hasError : type, - content : F.coming.tpl.error - }); - - F._afterLoad(); - }, - - _loadImage: function () { - // Reset preload image so it is later possible to check "complete" property - var img = F.imgPreload = new Image(); - - img.onload = function () { - this.onload = this.onerror = null; - - F.coming.width = this.width / F.opts.pixelRatio; - F.coming.height = this.height / F.opts.pixelRatio; - - F._afterLoad(); - }; - - img.onerror = function () { - this.onload = this.onerror = null; - - F._error( 'image' ); - }; - - img.src = F.coming.href; - - if (img.complete !== true) { - F.showLoading(); - } - }, - - _loadAjax: function () { - var coming = F.coming; - - F.showLoading(); - - F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { - url: coming.href, - error: function (jqXHR, textStatus) { - if (F.coming && textStatus !== 'abort') { - F._error( 'ajax', jqXHR ); - - } else { - F.hideLoading(); - } - }, - success: function (data, textStatus) { - if (textStatus === 'success') { - coming.content = data; - - F._afterLoad(); - } - } - })); - }, - - _loadIframe: function() { - var coming = F.coming, - iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) - .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) - .attr('src', coming.href); - - // This helps IE - $(coming.wrap).bind('onReset', function () { - try { - $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); - } catch (e) {} - }); - - if (coming.iframe.preload) { - F.showLoading(); - - iframe.one('load', function() { - $(this).data('ready', 1); - - // iOS will lose scrolling if we resize - if (!isTouch) { - $(this).bind('load.fb', F.update); - } - - // Without this trick: - // - iframe won't scroll on iOS devices - // - IE7 sometimes displays empty iframe - $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); - - F._afterLoad(); - }); - } - - coming.content = iframe.appendTo( coming.inner ); - - if (!coming.iframe.preload) { - F._afterLoad(); - } - }, - - _preloadImages: function() { - var group = F.group, - current = F.current, - len = group.length, - cnt = current.preload ? Math.min(current.preload, len - 1) : 0, - item, - i; - - for (i = 1; i <= cnt; i += 1) { - item = group[ (current.index + i ) % len ]; - - if (item.type === 'image' && item.href) { - new Image().src = item.href; - } - } - }, - - _afterLoad: function () { - var coming = F.coming, - previous = F.current, - placeholder = 'fancybox-placeholder', - current, - content, - type, - scrolling, - href, - embed; - - F.hideLoading(); - - if (!coming || F.isActive === false) { - return; - } - - if (false === F.trigger('afterLoad', coming, previous)) { - coming.wrap.stop(true).trigger('onReset').remove(); - - F.coming = null; - - return; - } - - if (previous) { - F.trigger('beforeChange', previous); - - previous.wrap.stop(true).removeClass('fancybox-opened') - .find('.fancybox-item, .fancybox-nav') - .remove(); - } - - F.unbindEvents(); - - current = coming; - content = coming.content; - type = coming.type; - scrolling = coming.scrolling; - - $.extend(F, { - wrap : current.wrap, - skin : current.skin, - outer : current.outer, - inner : current.inner, - current : current, - previous : previous - }); - - href = current.href; - - switch (type) { - case 'inline': - case 'ajax': - case 'html': - if (current.selector) { - content = $('
    ').html(content).find(current.selector); - - } else if (isQuery(content)) { - if (!content.data(placeholder)) { - content.data(placeholder, $('
    ').insertAfter( content ).hide() ); - } - - content = content.show().detach(); - - current.wrap.bind('onReset', function () { - if ($(this).find(content).length) { - content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); - } - }); - } - break; - - case 'image': - content = current.tpl.image.replace(/\{href\}/g, href); - break; - - case 'swf': - content = ''; - embed = ''; - - $.each(current.swf, function(name, val) { - content += ''; - embed += ' ' + name + '="' + val + '"'; - }); - - content += ''; - break; - } - - if (!(isQuery(content) && content.parent().is(current.inner))) { - current.inner.append( content ); - } - - // Give a chance for helpers or callbacks to update elements - F.trigger('beforeShow'); - - // Set scrolling before calculating dimensions - current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); - - // Set initial dimensions and start position - F._setDimension(); - - F.reposition(); - - F.isOpen = false; - F.coming = null; - - F.bindEvents(); - - if (!F.isOpened) { - $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); - - } else if (previous.prevMethod) { - F.transitions[ previous.prevMethod ](); - } - - F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); - - F._preloadImages(); - }, - - _setDimension: function () { - var viewport = F.getViewport(), - steps = 0, - canShrink = false, - canExpand = false, - wrap = F.wrap, - skin = F.skin, - inner = F.inner, - current = F.current, - width = current.width, - height = current.height, - minWidth = current.minWidth, - minHeight = current.minHeight, - maxWidth = current.maxWidth, - maxHeight = current.maxHeight, - scrolling = current.scrolling, - scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, - margin = current.margin, - wMargin = getScalar(margin[1] + margin[3]), - hMargin = getScalar(margin[0] + margin[2]), - wPadding, - hPadding, - wSpace, - hSpace, - origWidth, - origHeight, - origMaxWidth, - origMaxHeight, - ratio, - width_, - height_, - maxWidth_, - maxHeight_, - iframe, - body; - - // Reset dimensions so we could re-check actual size - wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); - - wPadding = getScalar(skin.outerWidth(true) - skin.width()); - hPadding = getScalar(skin.outerHeight(true) - skin.height()); - - // Any space between content and viewport (margin, padding, border, title) - wSpace = wMargin + wPadding; - hSpace = hMargin + hPadding; - - origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; - origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; - - if (current.type === 'iframe') { - iframe = current.content; - - if (current.autoHeight && iframe.data('ready') === 1) { - try { - if (iframe[0].contentWindow.document.location) { - inner.width( origWidth ).height(9999); - - body = iframe.contents().find('body'); - - if (scrollOut) { - body.css('overflow-x', 'hidden'); - } - - origHeight = body.outerHeight(true); - } - - } catch (e) {} - } - - } else if (current.autoWidth || current.autoHeight) { - inner.addClass( 'fancybox-tmp' ); - - // Set width or height in case we need to calculate only one dimension - if (!current.autoWidth) { - inner.width( origWidth ); - } - - if (!current.autoHeight) { - inner.height( origHeight ); - } - - if (current.autoWidth) { - origWidth = inner.width(); - } - - if (current.autoHeight) { - origHeight = inner.height(); - } - - inner.removeClass( 'fancybox-tmp' ); - } - - width = getScalar( origWidth ); - height = getScalar( origHeight ); - - ratio = origWidth / origHeight; - - // Calculations for the content - minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); - maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); - - minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); - maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); - - // These will be used to determine if wrap can fit in the viewport - origMaxWidth = maxWidth; - origMaxHeight = maxHeight; - - if (current.fitToView) { - maxWidth = Math.min(viewport.w - wSpace, maxWidth); - maxHeight = Math.min(viewport.h - hSpace, maxHeight); - } - - maxWidth_ = viewport.w - wMargin; - maxHeight_ = viewport.h - hMargin; - - if (current.aspectRatio) { - if (width > maxWidth) { - width = maxWidth; - height = getScalar(width / ratio); - } - - if (height > maxHeight) { - height = maxHeight; - width = getScalar(height * ratio); - } - - if (width < minWidth) { - width = minWidth; - height = getScalar(width / ratio); - } - - if (height < minHeight) { - height = minHeight; - width = getScalar(height * ratio); - } - - } else { - width = Math.max(minWidth, Math.min(width, maxWidth)); - - if (current.autoHeight && current.type !== 'iframe') { - inner.width( width ); - - height = inner.height(); - } - - height = Math.max(minHeight, Math.min(height, maxHeight)); - } - - // Try to fit inside viewport (including the title) - if (current.fitToView) { - inner.width( width ).height( height ); - - wrap.width( width + wPadding ); - - // Real wrap dimensions - width_ = wrap.width(); - height_ = wrap.height(); - - if (current.aspectRatio) { - while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { - if (steps++ > 19) { - break; - } - - height = Math.max(minHeight, Math.min(maxHeight, height - 10)); - width = getScalar(height * ratio); - - if (width < minWidth) { - width = minWidth; - height = getScalar(width / ratio); - } - - if (width > maxWidth) { - width = maxWidth; - height = getScalar(width / ratio); - } - - inner.width( width ).height( height ); - - wrap.width( width + wPadding ); - - width_ = wrap.width(); - height_ = wrap.height(); - } - - } else { - width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); - height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); - } - } - - if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { - width += scrollOut; - } - - inner.width( width ).height( height ); - - wrap.width( width + wPadding ); - - width_ = wrap.width(); - height_ = wrap.height(); - - canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; - canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); - - $.extend(current, { - dim : { - width : getValue( width_ ), - height : getValue( height_ ) - }, - origWidth : origWidth, - origHeight : origHeight, - canShrink : canShrink, - canExpand : canExpand, - wPadding : wPadding, - hPadding : hPadding, - wrapSpace : height_ - skin.outerHeight(true), - skinSpace : skin.height() - height - }); - - if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { - inner.height('auto'); - } - }, - - _getPosition: function (onlyAbsolute) { - var current = F.current, - viewport = F.getViewport(), - margin = current.margin, - width = F.wrap.width() + margin[1] + margin[3], - height = F.wrap.height() + margin[0] + margin[2], - rez = { - position: 'absolute', - top : margin[0], - left : margin[3] - }; - - if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { - rez.position = 'fixed'; - - } else if (!current.locked) { - rez.top += viewport.y; - rez.left += viewport.x; - } - - rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); - rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); - - return rez; - }, - - _afterZoomIn: function () { - var current = F.current; - - if (!current) { - return; - } - - F.isOpen = F.isOpened = true; - - F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); - - F.update(); - - // Assign a click event - if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { - F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { - if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { - e.preventDefault(); - - F[ current.closeClick ? 'close' : 'next' ](); - } - }); - } - - // Create a close button - if (current.closeBtn) { - $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { - e.preventDefault(); - - F.close(); - }); - } - - // Create navigation arrows - if (current.arrows && F.group.length > 1) { - if (current.loop || current.index > 0) { - $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); - } - - if (current.loop || current.index < F.group.length - 1) { - $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); - } - } - - F.trigger('afterShow'); - - // Stop the slideshow if this is the last item - if (!current.loop && current.index === current.group.length - 1) { - - F.play( false ); - - } else if (F.opts.autoPlay && !F.player.isActive) { - F.opts.autoPlay = false; - - F.play(true); - } - }, - - _afterZoomOut: function ( obj ) { - obj = obj || F.current; - - $('.fancybox-wrap').trigger('onReset').remove(); - - $.extend(F, { - group : {}, - opts : {}, - router : false, - current : null, - isActive : false, - isOpened : false, - isOpen : false, - isClosing : false, - wrap : null, - skin : null, - outer : null, - inner : null - }); - - F.trigger('afterClose', obj); - } - }); - - /* - * Default transitions - */ - - F.transitions = { - getOrigPosition: function () { - var current = F.current, - element = current.element, - orig = current.orig, - pos = {}, - width = 50, - height = 50, - hPadding = current.hPadding, - wPadding = current.wPadding, - viewport = F.getViewport(); - - if (!orig && current.isDom && element.is(':visible')) { - orig = element.find('img:first'); - - if (!orig.length) { - orig = element; - } - } - - if (isQuery(orig)) { - pos = orig.offset(); - - if (orig.is('img')) { - width = orig.outerWidth(); - height = orig.outerHeight(); - } - - } else { - pos.top = viewport.y + (viewport.h - height) * current.topRatio; - pos.left = viewport.x + (viewport.w - width) * current.leftRatio; - } - - if (F.wrap.css('position') === 'fixed' || current.locked) { - pos.top -= viewport.y; - pos.left -= viewport.x; - } - - pos = { - top : getValue(pos.top - hPadding * current.topRatio), - left : getValue(pos.left - wPadding * current.leftRatio), - width : getValue(width + wPadding), - height : getValue(height + hPadding) - }; - - return pos; - }, - - step: function (now, fx) { - var ratio, - padding, - value, - prop = fx.prop, - current = F.current, - wrapSpace = current.wrapSpace, - skinSpace = current.skinSpace; - - if (prop === 'width' || prop === 'height') { - ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); - - if (F.isClosing) { - ratio = 1 - ratio; - } - - padding = prop === 'width' ? current.wPadding : current.hPadding; - value = now - padding; - - F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); - F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); - } - }, - - zoomIn: function () { - var current = F.current, - startPos = current.pos, - effect = current.openEffect, - elastic = effect === 'elastic', - endPos = $.extend({opacity : 1}, startPos); - - // Remove "position" property that breaks older IE - delete endPos.position; - - if (elastic) { - startPos = this.getOrigPosition(); - - if (current.openOpacity) { - startPos.opacity = 0.1; - } - - } else if (effect === 'fade') { - startPos.opacity = 0.1; - } - - F.wrap.css(startPos).animate(endPos, { - duration : effect === 'none' ? 0 : current.openSpeed, - easing : current.openEasing, - step : elastic ? this.step : null, - complete : F._afterZoomIn - }); - }, - - zoomOut: function () { - var current = F.current, - effect = current.closeEffect, - elastic = effect === 'elastic', - endPos = {opacity : 0.1}; - - if (elastic) { - endPos = this.getOrigPosition(); - - if (current.closeOpacity) { - endPos.opacity = 0.1; - } - } - - F.wrap.animate(endPos, { - duration : effect === 'none' ? 0 : current.closeSpeed, - easing : current.closeEasing, - step : elastic ? this.step : null, - complete : F._afterZoomOut - }); - }, - - changeIn: function () { - var current = F.current, - effect = current.nextEffect, - startPos = current.pos, - endPos = { opacity : 1 }, - direction = F.direction, - distance = 200, - field; - - startPos.opacity = 0.1; - - if (effect === 'elastic') { - field = direction === 'down' || direction === 'up' ? 'top' : 'left'; - - if (direction === 'down' || direction === 'right') { - startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); - endPos[ field ] = '+=' + distance + 'px'; - - } else { - startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); - endPos[ field ] = '-=' + distance + 'px'; - } - } - - // Workaround for http://bugs.jquery.com/ticket/12273 - if (effect === 'none') { - F._afterZoomIn(); - - } else { - F.wrap.css(startPos).animate(endPos, { - duration : current.nextSpeed, - easing : current.nextEasing, - complete : F._afterZoomIn - }); - } - }, - - changeOut: function () { - var previous = F.previous, - effect = previous.prevEffect, - endPos = { opacity : 0.1 }, - direction = F.direction, - distance = 200; - - if (effect === 'elastic') { - endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; - } - - previous.wrap.animate(endPos, { - duration : effect === 'none' ? 0 : previous.prevSpeed, - easing : previous.prevEasing, - complete : function () { - $(this).trigger('onReset').remove(); - } - }); - } - }; - - /* - * Overlay helper - */ - - F.helpers.overlay = { - defaults : { - closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay - speedOut : 200, // duration of fadeOut animation - showEarly : true, // indicates if should be opened immediately or wait until the content is ready - css : {}, // custom CSS properties - locked : !isTouch, // if true, the content will be locked into overlay - fixed : true // if false, the overlay CSS position property will not be set to "fixed" - }, - - overlay : null, // current handle - fixed : false, // indicates if the overlay has position "fixed" - el : $('html'), // element that contains "the lock" - - // Public methods - create : function(opts) { - var parent; - - opts = $.extend({}, this.defaults, opts); - - if (this.overlay) { - this.close(); - } - - parent = F.coming ? F.coming.parent : opts.parent; - - this.overlay = $('
    ').appendTo( parent && parent.lenth ? parent : 'body' ); - this.fixed = false; - - if (opts.fixed && F.defaults.fixed) { - this.overlay.addClass('fancybox-overlay-fixed'); - - this.fixed = true; - } - }, - - open : function(opts) { - var that = this; - - opts = $.extend({}, this.defaults, opts); - - if (this.overlay) { - this.overlay.unbind('.overlay').width('auto').height('auto'); - - } else { - this.create(opts); - } - - if (!this.fixed) { - W.bind('resize.overlay', $.proxy( this.update, this) ); - - this.update(); - } - - if (opts.closeClick) { - this.overlay.bind('click.overlay', function(e) { - if ($(e.target).hasClass('fancybox-overlay')) { - if (F.isActive) { - F.close(); - } else { - that.close(); - } - - return false; - } - }); - } - - this.overlay.css( opts.css ).show(); - }, - - close : function() { - W.unbind('resize.overlay'); - - if (this.el.hasClass('fancybox-lock')) { - $('.fancybox-margin').removeClass('fancybox-margin'); - - this.el.removeClass('fancybox-lock'); - - W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); - } - - $('.fancybox-overlay').remove().hide(); - - $.extend(this, { - overlay : null, - fixed : false - }); - }, - - // Private, callbacks - - update : function () { - var width = '100%', offsetWidth; - - // Reset width/height so it will not mess - this.overlay.width(width).height('100%'); - - // jQuery does not return reliable result for IE - if (IE) { - offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); - - if (D.width() > offsetWidth) { - width = D.width(); - } - - } else if (D.width() > W.width()) { - width = D.width(); - } - - this.overlay.width(width).height(D.height()); - }, - - // This is where we can manipulate DOM, because later it would cause iframes to reload - onReady : function (opts, obj) { - var overlay = this.overlay; - - $('.fancybox-overlay').stop(true, true); - - if (!overlay) { - this.create(opts); - } - - if (opts.locked && this.fixed && obj.fixed) { - obj.locked = this.overlay.append( obj.wrap ); - obj.fixed = false; - } - - if (opts.showEarly === true) { - this.beforeShow.apply(this, arguments); - } - }, - - beforeShow : function(opts, obj) { - if (obj.locked && !this.el.hasClass('fancybox-lock')) { - if (this.fixPosition !== false) { - $('*').filter(function(){ - return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); - }).addClass('fancybox-margin'); - } - - this.el.addClass('fancybox-margin'); - - this.scrollV = W.scrollTop(); - this.scrollH = W.scrollLeft(); - - this.el.addClass('fancybox-lock'); - - W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); - } - - this.open(opts); - }, - - onUpdate : function() { - if (!this.fixed) { - this.update(); - } - }, - - afterClose: function (opts) { - // Remove overlay if exists and fancyBox is not opening - // (e.g., it is not being open using afterClose callback) - if (this.overlay && !F.coming) { - this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); - } - } - }; - - /* - * Title helper - */ - - F.helpers.title = { - defaults : { - type : 'float', // 'float', 'inside', 'outside' or 'over', - position : 'bottom' // 'top' or 'bottom' - }, - - beforeShow: function (opts) { - var current = F.current, - text = current.title, - type = opts.type, - title, - target; - - if ($.isFunction(text)) { - text = text.call(current.element, current); - } - - if (!isString(text) || $.trim(text) === '') { - return; - } - - title = $('
    ' + text + '
    '); - - switch (type) { - case 'inside': - target = F.skin; - break; - - case 'outside': - target = F.wrap; - break; - - case 'over': - target = F.inner; - break; - - default: // 'float' - target = F.skin; - - title.appendTo('body'); - - if (IE) { - title.width( title.width() ); - } - - title.wrapInner(''); - - //Increase bottom margin so this title will also fit into viewport - F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); - break; - } - - title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); - } - }; - - // jQuery plugin initialization - $.fn.fancybox = function (options) { - var index, - that = $(this), - selector = this.selector || '', - run = function(e) { - var what = $(this).blur(), idx = index, relType, relVal; - - if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { - relType = options.groupAttr || 'data-fancybox-group'; - relVal = what.attr(relType); - - if (!relVal) { - relType = 'rel'; - relVal = what.get(0)[ relType ]; - } - - if (relVal && relVal !== '' && relVal !== 'nofollow') { - what = selector.length ? $(selector) : that; - what = what.filter('[' + relType + '="' + relVal + '"]'); - idx = what.index(this); - } - - options.index = idx; - - // Stop an event from bubbling if everything is fine - if (F.open(what, options) !== false) { - e.preventDefault(); - } - } - }; - - options = options || {}; - index = options.index || 0; - - if (!selector || options.live === false) { - that.unbind('click.fb-start').bind('click.fb-start', run); - - } else { - D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); - } - - this.filter('[data-fancybox-start=1]').trigger('click'); - - return this; - }; - - // Tests that need a body at doc ready - D.ready(function() { - var w1, w2; - - if ( $.scrollbarWidth === undefined ) { - // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth - $.scrollbarWidth = function() { - var parent = $('
    ').appendTo('body'), - child = parent.children(), - width = child.innerWidth() - child.height( 99 ).innerWidth(); - - parent.remove(); - - return width; - }; - } - - if ( $.support.fixedPosition === undefined ) { - $.support.fixedPosition = (function() { - var elem = $('
    ').appendTo('body'), - fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); - - elem.remove(); - - return fixed; - }()); - } - - $.extend(F.defaults, { - scrollbarWidth : $.scrollbarWidth(), - fixed : $.support.fixedPosition, - parent : $('body') - }); - - //Get real width of page scroll-bar - w1 = $(window).width(); - - H.addClass('fancybox-lock-test'); - - w2 = $(window).width(); - - H.removeClass('fancybox-lock-test'); - - $("").appendTo("head"); - }); - -}(window, document, jQuery)); \ No newline at end of file diff --git a/themes/landscape/source/fancybox/jquery.fancybox.pack.js b/themes/landscape/source/fancybox/jquery.fancybox.pack.js deleted file mode 100644 index 2db1280..0000000 --- a/themes/landscape/source/fancybox/jquery.fancybox.pack.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ -(function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0
    ',image:'',iframe:'",error:'

    The requested content cannot be loaded.
    Please try again later.

    ',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, -openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, -isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=u(a)?f(a).get():[a]),f.each(a,function(e,c){var l={},g,h,k,n,m;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),u(c)?(l={href:c.data("fancybox-href")||c.attr("href"),title:f("
    ").text(c.data("fancybox-title")||c.attr("title")).html(),isDom:!0,element:c}, -f.metadata&&f.extend(!0,l,c.metadata())):l=c);g=d.href||l.href||(r(c)?c:null);h=d.title!==w?d.title:l.title||"";n=(k=d.content||l.content)?"html":d.type||l.type;!n&&l.isDom&&(n=c.data("fancybox-type"),n||(n=(n=c.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(c)&&(n="html",k=c)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));k||("inline"===n?g?k=f(r(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):l.isDom&&(k=c): -"html"===n?k=g:n||g||!l.isDom||(n="inline",k=c));f.extend(l,{href:g,type:n,content:k,title:h,selector:m});a[e]=l}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==w&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(), -b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&& -(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==w&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,l;c&&(l=b._getPosition(d),a&&"scroll"===a.type?(delete l.position,c.stop(!0,!0).animate(l,200)):(c.css(l),e.pos=f.extend({},e.dim,l)))}, -update:function(a){var d=a&&a.originalEvent&&a.originalEvent.type,e=!d||"orientationchange"===d;e&&(clearTimeout(C),C=null);b.isOpen&&!C&&(C=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),C=null)},e&&!t?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,t&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), -b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
    ').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}));b.trigger("onLoading")},getViewport:function(){var a=b.current&& -b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=t&&s.innerWidth?s.innerWidth:q.width(),d.h=t&&s.innerHeight?s.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&u(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(t?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c= -e.which||e.keyCode,l=e.target||e.srcElement;if(27===c&&b.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||l&&(l.type||f(l).is("[contenteditable]"))||f.each(d,function(d,l){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();0!==c&&!k&&1g||0>l)&&b.next(0>g?"up":"right"),d.preventDefault())}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&& -b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=m(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c, -c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== -c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&t&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(t?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady"); -if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= -this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, -d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",t?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);t||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload|| -b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,l,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); -b.unbindEvents();e=a.content;c=a.type;l=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
    ").html(e).find(a.selector):u(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
    ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", -!1)}));break;case "image":e=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}u(e)&&e.parent().is(a.inner)||a.inner.append(e);b.trigger("beforeShow"); -a.inner.css("overflow","yes"===l?"scroll":"no"===l?"hidden":l);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(d.prevMethod)b.transitions[d.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,l=b.skin,g=b.inner,h=b.current,c=h.width,k=h.height,n=h.minWidth,v=h.minHeight,p=h.maxWidth, -q=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,z=m(y[1]+y[3]),s=m(y[0]+y[2]),w,A,u,D,B,G,C,E,I;e.add(l).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=m(l.outerWidth(!0)-l.width());w=m(l.outerHeight(!0)-l.height());A=z+y;u=s+w;D=F(c)?(a.w-A)*m(c)/100:c;B=F(k)?(a.h-u)*m(k)/100:k;if("iframe"===h.type){if(I=h.content,h.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(D).height(9999),G=I.contents().find("body"),r&&G.css("overflow-x", -"hidden"),B=G.outerHeight(!0))}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=m(D);k=m(B);E=D/B;n=m(F(n)?m(n,"w")-A:n);p=m(F(p)?m(p,"w")-A:p);v=m(F(v)?m(v,"h")-u:v);q=m(F(q)?m(q,"h")-u:q);G=p;C=q;h.fitToView&&(p=Math.min(a.w-A,p),q=Math.min(a.h-u,q));A=a.w-z;s=a.h-s;h.aspectRatio?(c>p&&(c=p,k=m(c/E)),k>q&&(k=q,c=m(k*E)),cA||z>s)&&c>n&&k>v&&!(19p&&(c=p,k=m(c/E)),g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height();else c=Math.max(n,Math.min(c,c-(a-A))),k=Math.max(v,Math.min(k,k-(z-s)));r&&"auto"===t&&kA||z>s)&&c>n&&k>v;c=h.aspectRatio?cv&&k
    ').appendTo(d&&d.lenth?d:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay", -function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); -J?(b=Math.max(H.documentElement.offsetWidth,H.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*").filter(function(){return"fixed"=== -f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", -position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(r(e)&&""!==f.trim(e)){d=f('
    '+e+"
    ");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),J&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(m(d.css("margin-bottom")))}d["top"===a.position?"prependTo": -"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",l=function(g){var h=f(this).blur(),k=d,l,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||h.is(".fancybox-wrap")||(l=a.groupAttr||"data-fancybox-group",m=h.attr(l),m||(l="rel",m=h.get(0)[l]),m&&""!==m&&"nofollow"!==m&&(h=c.length?f(c):e,h=h.filter("["+l+'="'+m+'"]'),k=h.index(this)),a.index=k,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;c&&!1!==a.live?p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')", -"click.fb-start",l):e.unbind("click.fb-start").bind("click.fb-start",l);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===w&&(f.scrollbarWidth=function(){var a=f('
    ').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===w&&(f.support.fixedPosition=function(){var a=f('
    ').appendTo("body"), -b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(s).width();K.addClass("fancybox-lock-test");d=f(s).width();K.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); \ No newline at end of file diff --git a/themes/landscape/source/js/script.js b/themes/landscape/source/js/script.js deleted file mode 100644 index 1e58767..0000000 --- a/themes/landscape/source/js/script.js +++ /dev/null @@ -1,137 +0,0 @@ -(function($){ - // Search - var $searchWrap = $('#search-form-wrap'), - isSearchAnim = false, - searchAnimDuration = 200; - - var startSearchAnim = function(){ - isSearchAnim = true; - }; - - var stopSearchAnim = function(callback){ - setTimeout(function(){ - isSearchAnim = false; - callback && callback(); - }, searchAnimDuration); - }; - - $('#nav-search-btn').on('click', function(){ - if (isSearchAnim) return; - - startSearchAnim(); - $searchWrap.addClass('on'); - stopSearchAnim(function(){ - $('.search-form-input').focus(); - }); - }); - - $('.search-form-input').on('blur', function(){ - startSearchAnim(); - $searchWrap.removeClass('on'); - stopSearchAnim(); - }); - - // Share - $('body').on('click', function(){ - $('.article-share-box.on').removeClass('on'); - }).on('click', '.article-share-link', function(e){ - e.stopPropagation(); - - var $this = $(this), - url = $this.attr('data-url'), - encodedUrl = encodeURIComponent(url), - id = 'article-share-box-' + $this.attr('data-id'), - offset = $this.offset(); - - if ($('#' + id).length){ - var box = $('#' + id); - - if (box.hasClass('on')){ - box.removeClass('on'); - return; - } - } else { - var html = [ - '
    ', - '', - '
    ', - '', - '', - '', - '', - '
    ', - '
    ' - ].join(''); - - var box = $(html); - - $('body').append(box); - } - - $('.article-share-box.on').hide(); - - box.css({ - top: offset.top + 25, - left: offset.left - }).addClass('on'); - }).on('click', '.article-share-box', function(e){ - e.stopPropagation(); - }).on('click', '.article-share-box-input', function(){ - $(this).select(); - }).on('click', '.article-share-box-link', function(e){ - e.preventDefault(); - e.stopPropagation(); - - window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450'); - }); - - // Caption - $('.article-entry').each(function(i){ - $(this).find('img').each(function(){ - if ($(this).parent().hasClass('fancybox')) return; - - var alt = this.alt; - - if (alt) $(this).after('' + alt + ''); - - $(this).wrap(''); - }); - - $(this).find('.fancybox').each(function(){ - $(this).attr('rel', 'article' + i); - }); - }); - - if ($.fancybox){ - $('.fancybox').fancybox(); - } - - // Mobile nav - var $container = $('#container'), - isMobileNavAnim = false, - mobileNavAnimDuration = 200; - - var startMobileNavAnim = function(){ - isMobileNavAnim = true; - }; - - var stopMobileNavAnim = function(){ - setTimeout(function(){ - isMobileNavAnim = false; - }, mobileNavAnimDuration); - } - - $('#main-nav-toggle').on('click', function(){ - if (isMobileNavAnim) return; - - startMobileNavAnim(); - $container.toggleClass('mobile-nav-on'); - stopMobileNavAnim(); - }); - - $('#wrap').on('click', function(){ - if (isMobileNavAnim || !$container.hasClass('mobile-nav-on')) return; - - $container.removeClass('mobile-nav-on'); - }); -})(jQuery); \ No newline at end of file diff --git a/themes/next/.bowerrc b/themes/next/.bowerrc deleted file mode 100644 index 8013f26..0000000 --- a/themes/next/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "source/lib" -} diff --git a/themes/next/.editorconfig b/themes/next/.editorconfig deleted file mode 100644 index f0627b9..0000000 --- a/themes/next/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# editorconfig.org - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = space -indent_size = 2 - -[*.py] -indent_size = 4 diff --git a/themes/next/.gitattributes b/themes/next/.gitattributes deleted file mode 100644 index 7ead58e..0000000 --- a/themes/next/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -source/lib/* linguist-vendored -scripts/merge.js linguist-vendored diff --git a/themes/next/.github/CONTRIBUTING.md b/themes/next/.github/CONTRIBUTING.md deleted file mode 100644 index 9175b91..0000000 --- a/themes/next/.github/CONTRIBUTING.md +++ /dev/null @@ -1,6 +0,0 @@ -Before submitting an issue, please search for the issue [here](https://github.com/iissnan/hexo-theme-next/issues?utf8=%E2%9C%93&q=) to find if the issue is already reported. - -Also, you can search for answers on the [NexT Documentation Site](http://theme-next.iissnan.com/): - -- [常见问题 - 中文文档](http://theme-next.iissnan.com/faqs.html) -- FAQs (Work in progress) diff --git a/themes/next/.github/ISSUE_TEMPLATE.md b/themes/next/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index b5c9980..0000000 --- a/themes/next/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,47 +0,0 @@ - - -### I agree and want to create new issue - - -- [ ] Yes, I was on [Hexo Docs page](https://hexo.io/docs/), especially on [Templates](https://hexo.io/docs/templates.html), [Variables](https://hexo.io/docs/variables.html), [Helpers](https://hexo.io/docs/helpers.html) and [Troubleshooting](https://hexo.io/docs/troubleshooting.html). -- [ ] Yes, I was on [NexT Documentation Site](http://theme-next.iissnan.com/). -- [ ] And yes, I already searched for current [issues](https://github.com/iissnan/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue) and this is not help to me. - -*** - -### Expected behavior - - -### Actual behavior - - -### Steps to reproduce the behavior -Link to demo site with this issue: N/A -Link(s) to source code or any usefull link(s): N/A - -### NexT Information - -**NexT Version:** - -``` -[ ] Master -[ ] Latest Release -[ ] Old version - -``` - -**NexT Scheme:** - -``` -[ ] All schemes -[ ] Muse -[ ] Mist -[ ] Pisces -``` - -### Other Information diff --git a/themes/next/.github/PULL_REQUEST_TEMPLATE.md b/themes/next/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 146e9b4..0000000 --- a/themes/next/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,68 +0,0 @@ - - - - -## PR Checklist -**Please check if your PR fulfills the following requirements:** - -- [ ] The commit message follows [our guidelines](https://github.com/iissnan/hexo-theme-next/blob/master/.github/CONTRIBUTING.md). -- [ ] Tests for the changes have been added (for bug fixes / features). -- [ ] Docs have been added / updated (for bug fixes / features). - -## PR Type -**What kind of change does this PR introduce?** - -- [ ] Bugfix. -- [ ] Feature. -- [ ] Code style update (formatting, local variables). -- [ ] Refactoring (no functional changes, no api changes). -- [ ] Build related changes. -- [ ] CI related changes. -- [ ] Documentation content changes. -- [ ] Other... Please describe: - -## What is the current behavior? - - -Issue Number(s): N/A - -## What is the new behavior? - - -## Does this PR introduce a breaking change? -- [ ] Yes. -- [ ] No. - - - - - - diff --git a/themes/next/.gitignore b/themes/next/.gitignore deleted file mode 100644 index 14e3690..0000000 --- a/themes/next/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -.DS_Store -.idea/ -*.log -*.iml -node_modules/ - -# Ignore unused verdors' files -source/lib/fancybox/* -!source/lib/fancybox/source/ - -source/lib/font-awesome/less/ -source/lib/font-awesome/scss/ - -source/lib/ua-parser-js/* -!source/lib/ua-parser-js/dist/ - -source/lib/Han/* -!source/lib/Han/dist/ diff --git a/themes/next/.hound.yml b/themes/next/.hound.yml deleted file mode 100644 index 534bae8..0000000 --- a/themes/next/.hound.yml +++ /dev/null @@ -1,4 +0,0 @@ -javascript: - enabled: true - config_file: .jshintrc - ignore_file: .javascript_ignore diff --git a/themes/next/.javascript_ignore b/themes/next/.javascript_ignore deleted file mode 100644 index ad0d1ea..0000000 --- a/themes/next/.javascript_ignore +++ /dev/null @@ -1,5 +0,0 @@ -source/vendors/* -source/lib/* -source/js/src/affix.js -source/js/src/scrollspy.js -source/js/src/js.cookie.js diff --git a/themes/next/.jshintrc b/themes/next/.jshintrc deleted file mode 100644 index a2d0ed3..0000000 --- a/themes/next/.jshintrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "asi": false, - "bitwise": true, - "browser": true, - "camelcase": true, - "curly": true, - "forin": true, - "immed": true, - "latedef": "nofunc", - "maxlen": 120, - "newcap": true, - "noarg": true, - "noempty": true, - "nonew": true, - "predef": [ - "$", - "jQuery", - "NexT", - "CONFIG" - ], - "quotmark": true, - "trailing": true, - "undef": true, - "unused": true, - - "expr": true -} diff --git a/themes/next/.stylintrc b/themes/next/.stylintrc deleted file mode 100644 index 38e6ac1..0000000 --- a/themes/next/.stylintrc +++ /dev/null @@ -1,45 +0,0 @@ -{ - "blocks": false, - "brackets": "always", - "colons": "always", - "colors": "always", - "commaSpace": "always", - "commentSpace": "always", - "cssLiteral": "never", - "customProperties": [], - "depthLimit": false, - "duplicates": true, - "efficient": "always", - "exclude": [], - "extendPref": false, - "globalDupe": false, - "groupOutputByFile": true, - "indentPref": false, - "leadingZero": "never", - "maxErrors": false, - "maxWarnings": false, - "mixed": false, - "mixins": [], - "namingConvention": "lowercase-dash", - "namingConventionStrict": false, - "none": "never", - "noImportant": true, - "parenSpace": false, - "placeholders": "always", - "prefixVarsWithDollar": "always", - "quotePref": false, - "reporterOptions": { - "columns": ["lineData", "severity", "description", "rule"], - "columnSplitter": " ", - "showHeaders": false, - "truncate": true - }, - "semicolons": "always", - "sortOrder": "grouped", - "stackedProperties": false, - "trailingWhitespace": "never", - "universal": false, - "valid": true, - "zeroUnits": "never", - "zIndexNormalize": false -} diff --git a/themes/next/.travis.yml b/themes/next/.travis.yml deleted file mode 100644 index 752549d..0000000 --- a/themes/next/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: node -cache: - directories: - - node_modules - -install: npm install - -before_script: - - npm install -g gulp diff --git a/themes/next/LICENSE b/themes/next/LICENSE deleted file mode 100644 index 0bf8716..0000000 --- a/themes/next/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2014-2017 iissnan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/themes/next/README.en.md b/themes/next/README.en.md deleted file mode 100644 index c4a6003..0000000 --- a/themes/next/README.en.md +++ /dev/null @@ -1,232 +0,0 @@ -# NexT - -> NexT is a high quality elegant [Hexo](http://hexo.io) theme. It is crafted from scratch, with love. - - -[Live Preview](http://notes.iissnan.com) - -## Screenshots - -* Desktop -![Desktop Preview](http://iissnan.com/nexus/next/desktop-preview.png) - -* Sidebar - -![Desktop Sidebar Preview](http://iissnan.com/nexus/next/desktop-sidebar-preview.png) - -* Sidebar (Post details page) - -![Desktop Sidebar Preview](http://iissnan.com/nexus/next/desktop-sidebar-toc.png) - -* Mobile - -![Mobile Preview](http://iissnan.com/nexus/next/mobile.png) - - -## Installation - -1. Get it from GitHub - - $ git clone https://github.com/iissnan/hexo-theme-next themes/next - -2. Add it to `_config.yml` - - theme: next - - -## Update - -```shell -cd themes/next -git pull -``` - -### Theme configurations using Hexo data files [#328](https://github.com/iissnan/hexo-theme-next/issues/328) - -Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via `git pull`, or need to merge configurations manually when upgrading to new releases. - - At present, NexT encourages users to store some options in site's `_config.yml` and other options in theme's `_config.yml`. This approach is applicable, but has some drawbacks: -1. Configurations are splited into two pieces -2. Users maybe confuse which place should be for options - -In order to resolve this issue, NexT will take advantage of Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature. - -If you prefer Hexo 2.x, you can still use the old approach for configurations. NexT is still compatible with Hexo 2.x. - -#### Benefits - -With this feature, now you can put all your configurations into one place (`source/_data/next.yml`), you don't need to touch `next/_config.yml`. If there are any new options in new releases, you just need to copy those options from `next/_config.yml`, paste into `_data/next.yml` and set their values to whatever you want. - -#### How to use this feature - -1. Please ensure you are using Hexo 3 (or above) -2. Create an file named `next.yml` in site's `source/_data` directory (create `_data` directory if it did not exist) -3. Copy NexT theme options both in site's `_config.yml` and theme's `_config.yml` into `next.yml`. - -## Features - -### Multiple languages support, including: English / Russian / French / German / Simplified Chinese / Traditional Chinese. - -Default language is English. - -```yml -language: en -# language: zh-Hans -# language: fr-FR -# language: zh-hk -# language: zh-tw -# language: ru -# language: de -``` - -Set `language` field as following in site `_config.yml` to change to Chinese. - -```yml -language: zh-Hans -``` - -### Comment support. - -NexT has native support for `DuoShuo` and `Disqus` comment systems. - -Add the following snippets to your `_config.yml`: - -```yml -duoshuo: - enable: true - shortname: your-duoshuo-shortname -``` - -OR - -```yml -disqus_shortname: your-disqus-shortname -``` - -### Tags page. - -> Add a tags page contains all tags in your site. - -- Create a page named `tags` - - hexo new page "tags" - -- Edit tags page, set page type to `tags`. - - title: All tags - date: 2014-12-22 12:39:04 - type: "tags" - -- Add `tags` to theme `_config.yml`: - - menu: - home: / - archives: /archives - tags: /tags - -### Categories page. - -> Add a categories page contains all categories in your site. - -- Create a page named `categories` - - hexo new page "categories" - -- Edit categories page, set page type to `categories`. - - title: All categories - date: 2014-12-22 12:39:04 - type: "categories" - -- Add `categories` to theme `_config.yml`: - - menu: - home: / - archives: /archives - categories: /categories - -### Social Media - -NexT can automatically add links to your Social Media accounts: - -```yml -social: - GitHub: your-github-url - Twitter: your-twitter-url - Weibo: your-weibo-url - DouBan: your-douban-url - ZhiHu: your-zhihu-url -``` - -### Feed link. - -> Show a feed link. - -Set `rss` field in theme's `_config.yml`, as the following value: - -1. `rss: false` will totally disable feed link. -2. `rss: ` use sites' feed link. This is the default option. - - Follow the installation instruction in the plugin's README. After the configuration is done for this plugin, the feed link is ready too. - -3. `rss: http://your-feed-url` set specific feed link. - -### Up to 5 code highlight themes built-in. - -NexT uses [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) with 5 themes for you to choose from. -Next use `normal` by default. Have a preview about `normal` and `night`: - -![Tomorrow Normal Preview](http://iissnan.com/nexus/next/tomorrow-normal.png) -![Tomorrow Night Preview](http://iissnan.com/nexus/next/tomorrow-night.png) - -Head over to [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) for more details. - -## Configuration - -NexT comes with few configurations. - -```yml - -# Menu configuration. -menu: - home: / - archives: /archives - -# Favicon -favicon: /favicon.ico - -# Avatar (put the image into next/source/images/) -# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..) -avatar: /default_avatar.png - -# Code highlight theme -# available: normal | night | night eighties | night blue | night bright -highlight_theme: normal - -# Fancybox for image gallery -fancybox: true - -# Specify the date when the site was setup -since: 2013 - -``` - -## Browser support - -![Browser support](http://iissnan.com/nexus/next/browser-support.png) - - -## Contributing - -Contribution is welcome, feel free to open an issue and fork. Waiting for your pull request. - -[![hexo-image]][hexo-url] -[![bower-image]][bower-url] -[![jquery-image]][jquery-url] - -[hexo-image]: http://img.shields.io/badge/Hexo-2.4+-2BAF2B.svg?style=flat-square -[hexo-url]: http://hexo.io -[bower-image]: http://img.shields.io/badge/Bower-*-2BAF2B.svg?style=flat-square -[bower-url]: http://bower.io -[jquery-image]: https://img.shields.io/badge/jquery-1.9-blue.svg?style=flat-square -[jquery-url]: http://jquery.com/ diff --git a/themes/next/README.md b/themes/next/README.md deleted file mode 100644 index a2b004f..0000000 --- a/themes/next/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# NexT - -> 精于心,简于形 - -在线预览 Preview | NexT 使用文档 | [English Documentation](README.en.md) - -[![Join the chat at https://gitter.im/iissnan/hexo-theme-next](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -![NexT Schemes](http://iissnan.com/nexus/next/next-schemes.jpg) - - -## 浏览器支持 Browser support - -![Browser support](http://iissnan.com/nexus/next/browser-support.png) - - -## 贡献 Contributing - -接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的`Pull Request`。 - -Any types of contribution are welcome. Thanks. - -## 开发 Development - -NexT 主旨在于简洁优雅且易于使用,所以首先要尽量确保 NexT 的简洁易用性。 - -NexT is built for easily use with elegant appearance. First things first, always keep things simple. - -## [开发历史 Changelog](https://github.com/iissnan/hexo-theme-next/wiki/Changelog) - -[![hexo-image]][hexo-url] -[![bower-image]][bower-url] -[![jquery-image]][jquery-url] -[![velocity-image]][velocity-url] - -[hexo-image]: http://img.shields.io/badge/Hexo-2.4+-2BAF2B.svg?style=flat-square -[hexo-url]: http://hexo.io -[bower-image]: http://img.shields.io/badge/Bower-*-2BAF2B.svg?style=flat-square -[bower-url]: http://bower.io -[jquery-image]: https://img.shields.io/badge/jquery-2.1-2BAF2B.svg?style=flat-square -[jquery-url]: http://jquery.com/ -[velocity-image]: https://img.shields.io/badge/Velocity-1.2-2BAF2B.svg?style=flat-square -[velocity-url]: http://julian.com/research/velocity/ diff --git a/themes/next/_config.yml b/themes/next/_config.yml deleted file mode 100755 index 520d908..0000000 --- a/themes/next/_config.yml +++ /dev/null @@ -1,674 +0,0 @@ -# --------------------------------------------------------------- -# Site Information Settings -# --------------------------------------------------------------- - -# Put your favicon.ico into `hexo-site/source/` directory. -favicon: favicon.ico - -# Set default keywords (Use a comma to separate) -keywords: "Hexo, NexT" - -# Set rss to false to disable feed link. -# Leave rss as empty to use site's feed link. -# Set rss to specific value if you have burned your feed already. -rss: false - -# Specify the date when the site was setup -since: 2018 - -# icon between year and author @Footer -authoricon: heart - -# Footer `powered-by` and `theme-info` copyright -copyright: true - - -# --------------------------------------------------------------- -# SEO Settings -# --------------------------------------------------------------- - -# Canonical, set a canonical link tag in your hexo, you could use it for your SEO of blog. -# See: https://support.google.com/webmasters/answer/139066 -# Tips: Before you open this tag, remember set up your URL in hexo _config.yml ( ex. url: http://yourdomain.com ) -canonical: true - -# Change headers hierarchy on site-subtitle (will be main site description) and on all post/pages titles for better SEO-optimization. -seo: false - -# If true, will add site-subtitle to index page, added in main hexo config. -# subtitle: Subtitle -index_with_subtitle: false - - -# --------------------------------------------------------------- -# Menu Settings -# --------------------------------------------------------------- - -# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash (/archives -> archives) -menu: - home: / - categories: /categories/ - #about: /about/ - archives: /archives/ - tags: /tags/ - #sitemap: /sitemap.xml - #commonweal: /404/ - -# Enable/Disable menu icons. -# Icon Mapping: -# Map a menu item to a specific FontAwesome icon name. -# Key is the name of menu item and value is the name of FontAwesome icon. Key is case-senstive. -# When an question mask icon presenting up means that the item has no mapping icon. -menu_icons: - enable: true - #KeyMapsToMenuItemKey: NameOfTheIconFromFontAwesome - home: home - about: user - categories: th - schedule: calendar - tags: tags - archives: archive - sitemap: sitemap - commonweal: heartbeat - - -# --------------------------------------------------------------- -# Scheme Settings -# --------------------------------------------------------------- - -# Schemes -#scheme: Muse -# scheme: Mist -# scheme: Pisces -scheme: Gemini - - -# --------------------------------------------------------------- -# Sidebar Settings -# --------------------------------------------------------------- - -# Social Links -# Key is the link label showing to end users. -# Value is the target link (E.g. GitHub: https://github.com/iissnan) -#social: - #LinkLabel: Link - -# Social Links Icons -# Icon Mapping: -# Map a menu item to a specific FontAwesome icon name. -# Key is the name of the item and value is the name of FontAwesome icon. Key is case-senstive. -# When an globe mask icon presenting up means that the item has no mapping icon. -social_icons: - enable: true - icons_only: false - transition: false - # Icon Mappings. - # KeyMapsToSocialItemKey: NameOfTheIconFromFontAwesome - GitHub: github - E-Mail: envelope - Google: google - Twitter: twitter - FB Page: facebook - VK Group: vk - Skype: skype - YouTube: youtube - Instagram: instagram - StackOverflow: stack-overflow - Weibo: weibo - -# Blog rolls -#links_title: Links -#links_layout: block -#links_layout: inline -#links: - #Title: http://example.com/ - -# Sidebar Avatar -# in theme directory(source/images): /images/avatar.jpg -# in site directory(source/uploads): /uploads/avatar.jpg -avatar: /images/avatar.png - -# Table Of Contents in the Sidebar -toc: - enable: true - - # Automatically add list number to toc. - number: true - - # If true, all words will placed on next lines if header width longer then sidebar width. - wrap: false - -# Creative Commons 4.0 International License. -# http://creativecommons.org/ -# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero -#creative_commons: by-nc-sa -#creative_commons: - -sidebar: - # Sidebar Position, available value: left | right - position: left - #position: right - - # Sidebar Display, available value: - # - post expand on posts automatically. Default. - # - always expand for all pages automatically - # - hide expand only when click on the sidebar toggle icon. - # - remove Totally remove sidebar including sidebar toggle. - display: post - #display: always - #display: hide - #display: remove - - # Sidebar offset from top menubar in pixels. - offset: 12 - offset_float: 12 - - # Back to top in sidebar - b2t: false - - # Scroll percent label in b2t button - scrollpercent: false - - # Enable sidebar on narrow view - onmobile: false - - -# --------------------------------------------------------------- -# Post Settings -# --------------------------------------------------------------- - -# Automatically scroll page to section which is under mark. -scroll_to_more: true - -# Automatically saving scroll position on each post/page in cookies. -save_scroll: false - -# Automatically excerpt description in homepage as preamble text. -excerpt_description: true - -# Automatically Excerpt. Not recommend. -# Please use in the post to control excerpt accurately. -auto_excerpt: - enable: true - length: 150 - -# Read more button -# If true, the read more button would be displayed in excerpt section. -read_more_btn: true - -# Post meta display settings -post_meta: - item_text: true - created_at: true - updated_at: false - categories: true - -# Post wordcount display settings -# Dependencies: https://github.com/willin/hexo-wordcount -post_wordcount: - item_text: true - wordcount: false - min2read: false - separated_meta: true - -# Wechat Subscriber -#wechat_subscriber: - #enabled: true - #qcode: /path/to/your/wechatqcode ex. /uploads/wechat-qcode.jpg - #description: 欢迎您扫一扫上面的微信公众号,订阅我的博客! - -# Reward -#reward_comment: 坚持原创技术分享,您的支持将鼓励我继续创作! -#wechatpay: /images/wechatpay.jpg -#alipay: /images/alipay.jpg -#bitcoin: /images/bitcoin.png - -# Declare license on posts -post_copyright: - enable: false - license: CC BY-NC-SA 3.0 - license_url: https://creativecommons.org/licenses/by-nc-sa/3.0/ - - -# --------------------------------------------------------------- -# Misc Theme Settings -# --------------------------------------------------------------- - -# Reduce padding / margin indents on devices with narrow width. -mobile_layout_economy: false - -# Android Chrome header panel color ($black-deep). -android_chrome_color: "#222" - -# Custom Logo. -# !!Only available for Default Scheme currently. -# Options: -# enabled: [true/false] - Replace with specific image -# image: url-of-image - Images's url -custom_logo: - enabled: false - image: - -# Code Highlight theme -# Available value: -# normal | night | night eighties | night blue | night bright -# https://github.com/chriskempson/tomorrow-theme -highlight_theme: night bright - - -# --------------------------------------------------------------- -# Font Settings -# - Find fonts on Google Fonts (https://www.google.com/fonts) -# - All fonts set here will have the following styles: -# light, light italic, normal, normal italic, bold, bold italic -# - Be aware that setting too much fonts will cause site running slowly -# - Introduce in 5.0.1 -# --------------------------------------------------------------- -font: - enable: true - - # Uri of fonts host. E.g. //fonts.googleapis.com (Default) - host: - - # Global font settings used on element. - global: - # external: true will load this font family from host. - external: true - family: Lato - - # Font settings for Headlines (h1, h2, h3, h4, h5, h6) - # Fallback to `global` font settings. - headings: - external: true - family: Roboto Slab - - # Font settings for posts - # Fallback to `global` font settings. - posts: - external: true - family: - - # Font settings for Logo - # Fallback to `global` font settings. - # The `size` option use `px` as unit - logo: - external: true - family: Lobster Two - size: 24 - - # Font settings for and code blocks. - codes: - external: true - family: PT Mono - size: - - -# --------------------------------------------------------------- -# Third Party Services Settings -# --------------------------------------------------------------- - -# MathJax Support -mathjax: - enable: false - per_page: false - cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML - -# Han Support docs: https://hanzi.pro/ -han: false - -# Swiftype Search API Key -#swiftype_key: - -# Baidu Analytics ID -baidu_analytics: 9588ac22e073a502f1a96d6e22508525 - -# Duoshuo ShortName -#duoshuo_shortname: - -# Disqus -disqus: - enable: false - shortname: - count: true - -# Hypercomments -#hypercomments_id: - -# changyan -changyan: - enable: false - appid: - appkey: - -# Support for youyan comments system. -# You can get your uid from http://www.uyan.cc -#youyan_uid: your uid - -# Support for LiveRe comments system. -# You can get your uid from https://livere.com/insight/myCode (General web site) -livere_uid: MTAyMC8zNzAxNi8xMzU1Mg== - -# Baidu Share -# Available value: -# button | slide -# Warning: Baidu Share does not support https. -baidushare: true -## type: button - -# Share -#jiathis: -# Warning: JiaThis does not support https. -#add_this_id: - -# Share -#duoshuo_share: true - -# Google Webmaster tools verification setting -# See: https://www.google.com/webmasters/ -google_site_verification: 6hmllxbk8bu1s4TQAc6wrjMIpWb5JNQnLina1YeqeQI - -# Google Analytics -google_analytics: UA-120259506-1 - -# Yandex Webmaster tools verification setting -# See: https://webmaster.yandex.ru/ -#yandex_site_verification: - -# CNZZ count -cnzz_siteid: 1273862303 - -# Application Insights -# See https://azure.microsoft.com/en-us/services/application-insights/ -# application_insights: - -# Make duoshuo show UA -# user_id must NOT be null when admin_enable is true! -# you can visit http://dev.duoshuo.com get duoshuo user id. -duoshuo_info: - ua_enable: false - admin_enable: false - user_id: 0 - #admin_nickname: Author - - -# Facebook SDK Support. -# https://github.com/iissnan/hexo-theme-next/pull/410 -facebook_sdk: - enable: false - app_id: # - fb_admin: # - like_button: #true - webmaster: #true - -# Facebook comments plugin -# This plugin depends on Facebook SDK. -# If facebook_sdk.enable is false, Facebook comments plugin is unavailable. -facebook_comments_plugin: - enable: false - num_of_posts: 10 # min posts num is 1 - width: 100% # default width is 550px - scheme: light # default scheme is light (light or dark) - -# VKontakte API Support. -# To get your AppID visit https://vk.com/editapp?act=create -vkontakte_api: - enable: false - app_id: # - like: true - comments: true - num_of_posts: 10 - -# Star rating support to each article. -# To get your ID visit https://widgetpack.com -rating: - enable: false - id: # - color: fc6423 - - -# Show number of visitors to each article. -# You can visit https://leancloud.cn get AppID and AppKey. -leancloud_visitors: - enable: true - app_id: 6o3Ho7a4mYcc9QOt822UtYaz-gzGzoHsz - app_key: N5jHCgAvPt0N4czQtJy3lsyD - -# Show PV/UV of the website/page with busuanzi. -# Get more information on http://ibruce.info/2015/04/04/busuanzi/ -busuanzi_count: - # count values only if the other configs are false - enable: true - # custom uv span for the whole site - site_uv: true - site_uv_header: 本站访客数 - site_uv_footer: 人次 - # custom pv span for the whole site - site_pv: true - site_pv_header: 本站总访问量 - site_pv_footer: 次 - # custom pv span for one page only - page_pv: true - page_pv_header: 浏览 - page_pv_footer: 次 - - -# Tencent analytics ID -tencent_analytics: 65876627 - -# Tencent MTA ID -# tencent_mta: - - -# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO -baidu_push: false - -# Google Calendar -# Share your recent schedule to others via calendar page -# -# API Documentation: -# https://developers.google.com/google-apps/calendar/v3/reference/events/list -calendar: - enable: false - calendar_id: - api_key: - orderBy: startTime - offsetMax: 24 - offsetMin: 4 - timeZone: - showDeleted: false - singleEvents: true - maxResults: 250 - -# Algolia Search -algolia_search: - enable: false - hits: - per_page: 10 - labels: - input_placeholder: Search for Posts - hits_empty: "We didn't find any results for the search: ${query}" - hits_stats: "${hits} results found in ${time} ms" - -# Local search -# Dependencies: https://github.com/flashlab/hexo-generator-search -local_search: - enable: true - # if auto, trigger search by changing input - # if manual, trigger search by pressing enter key or search button - trigger: auto - # show top n results per article, show all results by setting to -1 - top_n_per_article: 1 - - -# --------------------------------------------------------------- -# Tags Settings -# --------------------------------------------------------------- - -# External URL with BASE64 encrypt & decrypt. -# Usage: {% exturl text url "title" %} -# Alias: {% extlink text url "title" %} -exturl: false - -# Note tag (bs-callout). -note: - # Note tag style values: - # - simple bs-callout old alert style. Default. - # - modern bs-callout new (v2-v3) alert style. - # - flat flat callout style with background, like on Mozilla or StackOverflow. - # - disabled disable all CSS styles import of note tag. - style: simple - icons: false - border_radius: 3 - # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). - # Offset also applied to label tag variables. This option can work with disabled note tag. - light_bg_offset: 0 - -# Label tag. -label: true - -# Tabs tag. -tabs: - enable: true - transition: - tabs: false - labels: true - border_radius: 0 - - -#! --------------------------------------------------------------- -#! DO NOT EDIT THE FOLLOWING SETTINGS -#! UNLESS YOU KNOW WHAT YOU ARE DOING -#! --------------------------------------------------------------- - -# Motion 动画效果 -use_motion: true - -# Fancybox -fancybox: true - -# Progress bar in the top during page loading. -pace: false -# Themes list: -#pace-theme-big-counter -#pace-theme-bounce -#pace-theme-barber-shop -#pace-theme-center-atom -#pace-theme-center-circle -#pace-theme-center-radar -#pace-theme-center-simple -#pace-theme-corner-indicator -#pace-theme-fill-left -#pace-theme-flash -#pace-theme-loading-bar -#pace-theme-mac-osx -#pace-theme-minimal -# For example -# pace_theme: pace-theme-center-simple -pace_theme: pace-theme-minimal - -# Canvas-nest -canvas_nest: false - -# three_waves -three_waves: false - -# canvas_lines -canvas_lines: false - -# canvas_sphere -canvas_sphere: false - -# Only fit scheme Pisces -# Canvas-ribbon -canvas_ribbon: true - -# Script Vendors. -# Set a CDN address for the vendor you want to customize. -# For example -# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js -# Be aware that you should use the same version as internal ones to avoid potential problems. -# Please use the https protocol of CDN files when you enable https on your site. -vendors: - # Internal path prefix. Please do not edit it. - _internal: lib - - # Internal version: 2.1.3 - jquery: - - # Internal version: 2.1.5 - # See: http://fancyapps.com/fancybox/ - fancybox: - fancybox_css: - - # Internal version: 1.0.6 - # See: https://github.com/ftlabs/fastclick - fastclick: - - # Internal version: 1.9.7 - # See: https://github.com/tuupola/jquery_lazyload - lazyload: - - # Internal version: 1.2.1 - # See: http://VelocityJS.org - velocity: - - # Internal version: 1.2.1 - # See: http://VelocityJS.org - velocity_ui: - - # Internal version: 0.7.9 - # See: https://faisalman.github.io/ua-parser-js/ - ua_parser: - - # Internal version: 4.6.2 - # See: http://fontawesome.io/ - fontawesome: - - # Internal version: 1 - # https://www.algolia.com - algolia_instant_js: - algolia_instant_css: - - # Internal version: 1.0.2 - # See: https://github.com/HubSpot/pace - # Or use direct links below: - # pace: //cdn.bootcss.com/pace/1.0.2/pace.min.js - # pace_css: //cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css - pace: - pace_css: - - # Internal version: 1.0.0 - # https://github.com/hustcc/canvas-nest.js - canvas_nest: - - # three - three: - - # three_waves - # https://github.com/jjandxa/three_waves - three_waves: - - # three_waves - # https://github.com/jjandxa/canvas_lines - canvas_lines: - - # three_waves - # https://github.com/jjandxa/canvas_sphere - canvas_sphere: - - # Internal version: 1.0.0 - # https://github.com/zproo/canvas-ribbon - canvas_ribbon: - - # Internal version: 3.3.0 - # https://github.com/ethantw/Han - han: - - -# Assets -css: css -js: js -images: images - -# Theme version -version: 5.1.2 diff --git a/themes/next/bower.json b/themes/next/bower.json deleted file mode 100644 index ed2a674..0000000 --- a/themes/next/bower.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "isn-next", - "version": "5.1.2", - "homepage": "https://github.com/iissnan/hexo-theme-next", - "authors": [ - "iissnan " - ], - "description": "Elegant theme for Hexo", - "repository": "https://github.com/iissnan/hexo-theme-next", - "keywords": [ - "hexo", - "notes", - "theme", - "iissnan", - "NexT" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "source/lib", - "test", - "tests", - "screenshots" - ], - "dependencies": { - "fancybox": "~2.1.5", - "velocity": "~1.2.1", - "jquery": "http://code.jquery.com/jquery-2.1.3.min.js", - "fastclick": "~1.0.6", - "font-awesome": "fontawesome#*", - "jquery_lazyload": "jquery.lazyload#~1.9.7", - "ua-parser-js": "~0.7.9", - "Han": "^3.3.0" - } -} diff --git a/themes/next/gulpfile.coffee b/themes/next/gulpfile.coffee deleted file mode 100644 index c7d706b..0000000 --- a/themes/next/gulpfile.coffee +++ /dev/null @@ -1,54 +0,0 @@ -fs = require('fs') -path = require('path') -gulp = require('gulp') -jshint = require('gulp-jshint') -stylish = require('jshint-stylish') -shell = require('gulp-shell') -yaml = require('js-yaml') - -gulp.task 'lint', -> - return gulp.src([ - './source/js/src/utils.js', - './source/js/src/motion.js', - './source/js/src/hook-duoshuo.js', - './source/js/src/algolia-search.js', - './source/js/src/bootstrap.js', - './source/js/src/post-details.js', - './source/js/src/schemes/pisces.js' - ]).pipe jshint() - .pipe jshint.reporter(stylish) - -gulp.task 'lint:stylus', shell.task [ - '"./node_modules/.bin/stylint" ./source/css/' -] - -gulp.task 'validate:config', (cb) -> - themeConfig = fs.readFileSync path.join(__dirname, '_config.yml') - - try - yaml.safeLoad(themeConfig) - cb() - catch error - cb new Error(error) - -gulp.task 'validate:languages', (cb) -> - languagesPath = path.join __dirname, 'languages' - languages = fs.readdirSync languagesPath - errors = [] - - for lang in languages - languagePath = path.join languagesPath, lang - try - yaml.safeLoad fs.readFileSync(languagePath), { - filename: path.relative(__dirname, languagePath) - } - catch error - errors.push error - - if errors.length == 0 - cb() - else - cb(errors) - - -gulp.task 'default', ['lint', 'validate:config', 'validate:languages'] diff --git a/themes/next/languages/de.yml b/themes/next/languages/de.yml deleted file mode 100644 index c4e11d7..0000000 --- a/themes/next/languages/de.yml +++ /dev/null @@ -1,83 +0,0 @@ -title: - archive: Archiv - category: Kategorie - tag: Tag - -author: Author - -menu: - home: Startseite - archives: Archiv - categories: Kategorien - tags: Tags - about: Über - feed: RSS - search: Suche - -sidebar: - overview: Übersicht - toc: Inhaltsverzeichnis - -post: - created: Post created - sticky: Sticky - posted: Veröffentlicht am - modified: Updated at - in: in - read_more: Weiterlesen - untitled: Unbenannt - toc_empty: Dieser Artikel hat kein Inhaltsverzeichnis - visitors: Visitors - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: Gesamt - tags: tags - -footer: - powered: "Erstellt mit %s" - theme: Theme - -counter: - tag_cloud: - zero: Keine Tags - one: Insgesamt ein Tag - other: "Insgesamt %d Tags" - - categories: - zero: Keine Kategorien - one: Insgesamt eine Kategorie - other: "Insgesamt %d Kategorien" - - archive_posts: - zero: Keine Artikel vorhanden. - one: Ein Artikel. - other: "Insgesamt %d Artikel." - -state: - posts: Artikel - pages: Seiten - tags: Tags - categories: Kategorien - -cheers: - um: Öhm.. - ok: OK - nice: Schön - good: Gut - great: Wunderbar - excellent: Exzellent - -keep_on: Bleib dran. - -symbol: - comma: '. ' - period: ', ' - colon: ':' diff --git a/themes/next/languages/default.yml b/themes/next/languages/default.yml deleted file mode 100644 index 65166a5..0000000 --- a/themes/next/languages/default.yml +++ /dev/null @@ -1,92 +0,0 @@ -title: - archive: Archive - category: Category - tag: Tag - schedule: Schedule - -author: Author - -menu: - home: Home - archives: Archives - categories: Categories - tags: Tags - about: About - search: Search - schedule: Schedule - sitemap: Sitemap - commonweal: Commonweal 404 - -sidebar: - overview: Overview - toc: Table of Contents - -post: - created: Post created - modified: Post modified - sticky: Sticky - posted: Posted on - in: In - more: more - read_more: Read more - untitled: Untitled - toc_empty: This post does not have a Table of Contents - visitors: Visitors - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - - - -page: - totally: Totally - tags: tags - -footer: - powered: "Powered by %s" - theme: Theme - -counter: - tag_cloud: - zero: No tags - one: 1 tag in total - other: "%d tags in total" - - categories: - zero: No categories - one: 1 category in total - other: "%d categories in total" - - archive_posts: - zero: No posts. - one: 1 post. - other: "%d posts in total." - -state: - posts: posts - pages: pages - tags: tags - categories: categories - -search: - placeholder: Searching... - -cheers: - um: Um.. - ok: OK - nice: Nice - good: Good - great: Great - excellent: Excellent - -keep_on: Keep on posting. - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/en.yml b/themes/next/languages/en.yml deleted file mode 100644 index 37f967a..0000000 --- a/themes/next/languages/en.yml +++ /dev/null @@ -1,90 +0,0 @@ -title: - archive: Archive - category: Category - tag: Tag - schedule: Schedule - -author: Author - -menu: - home: Home - archives: Archives - categories: Categories - tags: Tags - about: About - search: Search - schedule: Schedule - sitemap: Sitemap - commonweal: Commonweal 404 - -sidebar: - overview: Overview - toc: Table of Contents - -post: - created: Post created - modified: Post modified - sticky: Sticky - posted: Posted on - in: In - more: more - read_more: Read more - untitled: Untitled - toc_empty: This post does not have a Table of Contents - visitors: Visitors - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: Totally - tags: tags - -footer: - powered: "Powered by %s" - theme: Theme - -counter: - tag_cloud: - zero: No tags - one: 1 tag in total - other: "%d tags in total" - - categories: - zero: No categories - one: 1 category in total - other: "%d categories in total" - - archive_posts: - zero: No posts. - one: 1 post. - other: "%d posts in total." - -state: - posts: posts - pages: pages - tags: tags - categories: categories - -search: - placeholder: Searching... - -cheers: - um: Um.. - ok: OK - nice: Nice - good: Good - great: Great - excellent: Excellent - -keep_on: Keep on posting. - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/fr-FR.yml b/themes/next/languages/fr-FR.yml deleted file mode 100644 index deaef31..0000000 --- a/themes/next/languages/fr-FR.yml +++ /dev/null @@ -1,81 +0,0 @@ -title: - archive: Archive - category: Catégorie - tag: Tag - -author: Author - -menu: - home: Accueil - archives: Archives - categories: Categories - tags: Tags - about: A propos - search: recherche - -sidebar: - overview: Ensemble - toc: Table Des Matières - -post: - sticky: Sticky - posted: Posté le - modified: Updated at - in: In - read_more: Lire la suite - untitled: Non titré - toc_empty: This post does not have a Table of Contents - visitors: Visitors - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: Total - tags: tags - -footer: - powered: "Powered by %s" - theme: Thème - -counter: - tag_cloud: - zero: Aucun tags - one: 1 tag au total - other: "%d tags au total" - - categories: - zero: Aucun categories - one: 1 category au total - other: "%d categories au total" - - archive_posts: - zero: Aucun article. - one: 1 article. - other: "%d articles au total." - -state: - posts: articles - pages: pages - tags: tags - categories: categories - -cheers: - um: Um.. - ok: OK - nice: Jolie - good: Bien - great: Super - excellent: Excellent - -keep_on: Et ca ne fait que commencer. - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/id.yml b/themes/next/languages/id.yml deleted file mode 100644 index 683bef4..0000000 --- a/themes/next/languages/id.yml +++ /dev/null @@ -1,81 +0,0 @@ -title: - archive: Arsip - category: Kategori - tag: Tag - -author: Penulis - -menu: - home: Beranda - archives: Arsip - categories: Kategori - tags: Tags - about: Tentang - search: Pencarian - -sidebar: - overview: Ikhtisar - toc: Daftar Isi - -post: - sticky: Sticky - posted: Diposting di - modified: Updated at - in: Di - read_more: Baca lebih - untitled: Tidak ada title - toc_empty: Posting ini tidak memiliki Daftar Isi - visitors: Pengunjung - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: Total - tags: tags - -footer: - powered: "Powered by %s" - theme: Tema - -counter: - tag_cloud: - zero: Tidak ada tags - one: 1 total tag - other: "%d total tags" - - categories: - zero: Tidak ada kategori - one: 1 total categori - other: "%d total kategori" - - archive_posts: - zero: Tidak ada posting. - one: 1 posting. - other: "%d total posting." - -state: - posts: posting - pages: halaman - tags: tags - categories: kategori - -cheers: - um: Um.. - ok: OK - nice: Bagus - good: Bagus - great: Besar - excellent: Baik - -keep_on: Terus Posting. - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/ja.yml b/themes/next/languages/ja.yml deleted file mode 100644 index df86e2a..0000000 --- a/themes/next/languages/ja.yml +++ /dev/null @@ -1,81 +0,0 @@ -title: - archive: アーカイブ - category: カテゴリ - tag: タグ - -author: Author - -menu: - home: ホーム - archives: アーカイブ - categories: カテゴリ - tags: タグ - about: About - search: 検索 - -sidebar: - overview: 概要 - toc: 見出し - -post: - sticky: 固定 - posted: 投稿日 - modified: Updated at - in: In - read_more: 続きを読む - untitled: 無題 - toc_empty: 見出しがありません - visitors: Visitors - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: 全ページ - tags: タグ - -footer: - powered: "Powered by %s" - theme: Theme - -counter: - tag_cloud: - zero: タグなし - one: "全 1 タグ" - other: "全 %d タグ" - - categories: - zero: カテゴリなし - one: "全 1 カテゴリ" - other: "全 %d カテゴリ" - - archive_posts: - zero: ポストなし - one: "全 1 ポスト" - other: "全 %d ポスト" - -state: - posts: ポスト - pages: ページ - tags: タグ - categories: カテゴリ - -cheers: - um: うーん - ok: OK - nice: まあまあ - good: いいね - great: すごい - excellent: 最高 - -keep_on: もっと書こう! - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/ko.yml b/themes/next/languages/ko.yml deleted file mode 100644 index 350f1b5..0000000 --- a/themes/next/languages/ko.yml +++ /dev/null @@ -1,81 +0,0 @@ -title: - archive: 아카이브 - category: 카테고리 - tag: 태그 - -author: 작성자 - -menu: - home: 홈 - archives: 아카이브 - categories: 카테고리 - tags: 태그 - about: About - search: 검색 - -sidebar: - overview: 흝어보기 - toc: 목차 - -post: - sticky: 고정 - posted: 작성일 - modified: Updated at - in: In - read_more: 더 읽어보기 - untitled: 제목 없음 - toc_empty: 목차 없음 - visitors: 방문객 - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: 모두 - tags: 태그 - -footer: - powered: "Powered by %s" - theme: Theme - -counter: - tag_cloud: - zero: 태그 없음 - one: 1개의 태그 - other: "총 %d개의 태그" - - categories: - zero: 카테고리 없음 - one: 1개의 카테고리 - other: "총 %d개의 카테고리" - - archive_posts: - zero: 포스트 없음 - one: 1개의 포스트 - other: "총 %d개의 포스트" - -state: - posts: 포스트 - pages: 페이지 - tags: 태그 - categories: 카테고리 - -cheers: - um: 음.. - ok: OK - nice: 잘했어요 - good: 좋아요 - great: 훌륭해요 - excellent: 완벽해요 - -keep_on: 포스트를 마저 작성하세요 - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/pt-BR.yml b/themes/next/languages/pt-BR.yml deleted file mode 100644 index 28f7195..0000000 --- a/themes/next/languages/pt-BR.yml +++ /dev/null @@ -1,81 +0,0 @@ -title: - archive: Arquivo - category: Categoria - tag: Tag - -author: Autor - -menu: - home: Home - archives: Arquivos - categories: Categorias - tags: Tags - about: Sobre - search: Pesquisar - -sidebar: - overview: Visão geral - toc: Tabela de conteúdo - -post: - sticky: Sticky - posted: Postado em - modified: Updated at - in: Em - read_more: Leia mais - untitled: Sem título - toc_empty: Este post não possui tabela de conteúdo - visitors: Visitantes - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: Totalmente - tags: tags - -footer: - powered: "Feito com %s" - theme: Tema - -counter: - tag_cloud: - zero: Sem tags - one: 1 tag no total de - other: "%d tags no total de" - - categories: - zero: Sem categoria - one: 1 categoria no total de - other: "%d categoria no total de" - - archive_posts: - zero: Sem posts. - one: 1 post. - other: "%d posts no total." - -state: - posts: Posts - pages: Páginas - tags: Tags - categories: Categorias - -cheers: - um: Uhmmmm... - ok: OK - nice: Bom - good: Muito Bom - great: Ótimo - excellent: Excelente - -keep_on: Continuar no post. - -symbol: - comma: '. ' - period: ', ' - colon: ':' diff --git a/themes/next/languages/pt.yml b/themes/next/languages/pt.yml deleted file mode 100644 index f4eb2bf..0000000 --- a/themes/next/languages/pt.yml +++ /dev/null @@ -1,81 +0,0 @@ -title: - archive: Arquivo - category: Categoria - tag: Tag - -author: Author - -menu: - home: Home - archives: Arquivos - categories: Categorias - tags: Tags - about: Sobre - search: Pesquisa - -sidebar: - overview: Visão Geral - toc: Tabela de Conteúdo - -post: - sticky: Sticky - posted: Postado em - modified: Updated at - in: Em - read_more: Ler mais - untitled: Sem título - toc_empty: Esta publicação não possui uma tabela de conteúdo - visitors: Visitors - wordcount: Words count in article - min2read: Reading time - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: Totalmente - tags: tags - -footer: - powered: "Desenvolvido com amor com %s" - theme: Tema - -counter: - tag_cloud: - zero: Sem tags - one: 1 tag no total - other: "%d tags no total" - - categories: - zero: Sem categorias - one: 1 categoria no total - other: "%d categorias no total" - - archive_posts: - zero: Sem publicações. - one: 1 post. - other: "%d publicações no total." - -state: - posts: publicações - pages: páginas - tags: tags - categories: categorias - -cheers: - um: Um.. - ok: OK - nice: Legal - good: Bom - great: Grandioso - excellent: Excelente - -keep_on: Mantenha-se publicando! - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/ru.yml b/themes/next/languages/ru.yml deleted file mode 100644 index 07ebed7..0000000 --- a/themes/next/languages/ru.yml +++ /dev/null @@ -1,98 +0,0 @@ -title: - archive: Архив - category: Категория - tag: Тэг - schedule: Календарь - -author: Автор - -menu: - home: Главная - archives: Архив - categories: Категории - tags: Тэги - about: О сайте - search: Поиск - schedule: Календарь - sitemap: Карта сайта - -sidebar: - overview: Обзор - toc: Содержание - -post: - created: Дата создания записи - modified: Дата обновления записи - sticky: Ссылка - posted: Размещено - in: в категории - more: далее - read_more: Читать полностью - untitled: Без имени - toc_empty: Эта запись без оглавления - visitors: Просмотров - wordcount: Кол-во слов в статье - min2read: Время чтения в минутах - copyright: - author: Автор записи - link: Ссылка на запись - license_title: Информация об авторских правах - license_content: 'Все записи на этом сайте защищены лицензией - %s если не указано дополнительно.' - -page: - totally: Всего - tags: тэги - -footer: - powered: "Powered by %s" - theme: Theme - -counter: - tag_cloud: - zero: Нет тэгов. - one: 1 тэг. - two: "%d тэга всего." - three: "%d тэга всего." - four: "%d тэга всего." - other: "%d тэгов всего." - - categories: - zero: Нет категорий. - one: 1 категория. - two: "%d категории всего." - three: "%d категории всего." - four: "%d категории всего." - other: "%d категорий всего." - - archive_posts: - zero: Нет записей. - one: 1 запись. - two: "%d записи всего." - three: "%d записи всего." - four: "%d записи всего." - other: "%d записей всего." - -state: - posts: Архив - pages: Страницы - tags: Тэги - categories: Категории - -search: - placeholder: Поиск... - -cheers: - um: Эм.. - ok: OK - nice: Неплохо - good: Хорошо - great: Замечательно - excellent: Великолепно - -keep_on: Продолжаю писать. - -symbol: - comma: ', ' - period: '. ' - colon: ':' diff --git a/themes/next/languages/zh-Hans.yml b/themes/next/languages/zh-Hans.yml deleted file mode 100644 index b99de7f..0000000 --- a/themes/next/languages/zh-Hans.yml +++ /dev/null @@ -1,89 +0,0 @@ -title: - archive: 归档 - category: 分类 - tag: 标签 - schedule: 日程表 - -author: 博主 - -menu: - home: 首页 - archives: 归档 - categories: 分类 - tags: 标签 - about: 关于 - search: 搜索 - schedule: 日程表 - sitemap: 站点地图 - commonweal: 公益404 - -sidebar: - overview: 站点概览 - toc: 文章目录 - -post: - created: 创建于 - modified: 更新于 - sticky: 置顶 - posted: 发表于 - in: 分类于 - read_more: 阅读全文 - untitled: 未命名 - toc_empty: 此文章未包含目录 - visitors: 阅读次数 - wordcount: 字数统计 - min2read: 阅读时长 - copyright: - author: 本文作者 - link: 本文链接 - license_title: 版权声明 - license_content: '本博客所有文章除特别声明外,均采用 - %s 许可协议。转载请注明出处!' - -page: - totally: 共有 - tags: 标签 - -footer: - powered: "由 %s 强力驱动" - theme: 主题 - -counter: - tag_cloud: - zero: 暂无标签 - one: 目前共计 1 个标签 - other: "目前共计 %d 个标签" - - categories: - zero: 暂无分类 - one: 目前共计 1 个分类 - other: "目前共计 %d 个分类" - - archive_posts: - zero: 暂无日志。 - one: 目前共计 1 篇日志。 - other: "目前共计 %d 篇日志。" - -state: - posts: 日志 - pages: 页面 - tags: 标签 - categories: 分类 - -search: - placeholder: 搜索... - -cheers: - um: 嗯.. - ok: OK - nice: 好 - good: 很好 - great: 非常好 - excellent: 太棒了 - -keep_on: 继续努力。 - -symbol: - comma: ', ' - period: '。 ' - colon: ':' diff --git a/themes/next/languages/zh-hk.yml b/themes/next/languages/zh-hk.yml deleted file mode 100644 index c1cc179..0000000 --- a/themes/next/languages/zh-hk.yml +++ /dev/null @@ -1,89 +0,0 @@ -title: - archive: 歸檔 - category: 分類 - tag: 標籤 - schedule: 日程表 - -author: 博主 - -menu: - home: 首頁 - archives: 歸檔 - categories: 分類 - tags: 標籤 - about: 關於 - search: 檢索 - schedule: 日程表 - sitemap: 站點地圖 - commonweal: 公益404 - -sidebar: - overview: 本站概覽 - toc: 文章目錄 - -post: - created: 創建於 - modified: 更新於 - sticky: 置頂 - posted: 發表於 - in: 分類於 - read_more: 閱讀全文 - untitled: 未命名 - toc_empty: 此文章未包含目錄 - visitors: 閱讀次數 - wordcount: 字數統計 - min2read: 閱讀時長 - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: 共有 - tags: 標籤 - -footer: - powered: "由 %s 強力驅動" - theme: 主題 - -counter: - tag_cloud: - zero: 暫無標籤 - one: 目前共有 1 個標籤 - other: "目前共有 %d 個標籤" - - categories: - zero: 暫無分類 - one: 目前共有 1 個分類 - other: "目前共有 %d 個分類" - - archive_posts: - zero: 暫無文章。 - one: 目前共有 1 篇文章。 - other: "目前共有 %d 篇文章。" - -state: - posts: 文章 - pages: 頁面 - tags: 標籤 - categories: 分類 - -search: - placeholder: 搜索... - -cheers: - um: 嗯.. - ok: OK - nice: 好 - good: 很好 - great: 非常好 - excellent: 激爆好 - -keep_on: 繼續努力。 - -symbol: - comma: ', ' - period: '。 ' - colon: ':' diff --git a/themes/next/languages/zh-tw.yml b/themes/next/languages/zh-tw.yml deleted file mode 100644 index dfb4896..0000000 --- a/themes/next/languages/zh-tw.yml +++ /dev/null @@ -1,89 +0,0 @@ -title: - archive: 歸檔 - category: 分類 - tag: 標籤 - schedule: 日程表 - -author: 博主 - -menu: - home: 首頁 - archives: 歸檔 - categories: 分類 - tags: 標籤 - about: 關於 - search: 檢索 - schedule: 日程表 - sitemap: 站點地圖 - commonweal: 公益404 - -sidebar: - overview: 本站概覽 - toc: 文章目錄 - -post: - created: 創建於 - modified: 更新於 - sticky: 置頂 - posted: 發表於 - in: 分類於 - read_more: 閱讀全文 - untitled: 未命名 - toc_empty: 此文章未包含目錄 - visitors: 閱讀次數 - wordcount: 字數統計 - min2read: 閱讀時長 - copyright: - author: Post author - link: Post link - license_title: Copyright Notice - license_content: 'All articles in this blog are licensed under - %s unless stating additionally.' - -page: - totally: 共有 - tags: 標籤 - -footer: - powered: "由 %s 強力驅動" - theme: 主題 - -counter: - tag_cloud: - zero: 暫無標籤 - one: 目前共計 1 個標籤 - other: "目前共計 %d 個標籤" - - categories: - zero: 暫無分類 - one: 目前共計 1 個分類 - other: "目前共計 %d 個分類" - - archive_posts: - zero: 暫無文章。 - one: 目前共計 1 篇文章。 - other: "目前共計 %d 篇文章。" - -state: - posts: 文章 - pages: 頁面 - tags: 標籤 - categories: 分類 - -search: - placeholder: 搜索... - -cheers: - um: 嗯.. - ok: OK - nice: 好 - good: 很好 - great: 非常好 - excellent: 非常屌 - -keep_on: 繼續努力。 - -symbol: - comma: ', ' - period: '。 ' - colon: ':' diff --git a/themes/next/layout/_custom/header.swig b/themes/next/layout/_custom/header.swig deleted file mode 100644 index 8b13789..0000000 --- a/themes/next/layout/_custom/header.swig +++ /dev/null @@ -1 +0,0 @@ - diff --git a/themes/next/layout/_custom/sidebar.swig b/themes/next/layout/_custom/sidebar.swig deleted file mode 100644 index 8b13789..0000000 --- a/themes/next/layout/_custom/sidebar.swig +++ /dev/null @@ -1 +0,0 @@ - diff --git a/themes/next/layout/_layout.swig b/themes/next/layout/_layout.swig deleted file mode 100644 index aef857e..0000000 --- a/themes/next/layout/_layout.swig +++ /dev/null @@ -1,84 +0,0 @@ - - -{% set html_class = 'theme-next ' + theme.scheme %} -{% if theme.use_motion %} - {% set html_class = html_class + ' use-motion' %} -{% endif %} - - - - {% include '_partials/head.swig' %} - {% block title %}{% endblock %} - {% include '_third-party/analytics/index.swig' %} - - - - - {% set container_class = "container " %} - {% if theme.sidebar.position %} - {% set container_class = container_class + 'sidebar-position-' + theme.sidebar.position %} - {% endif %} - -
    -
    - - - -
    -
    -
    -
    - {% block content %}{% endblock %} -
    - {% include '_third-party/duoshuo-hot-articles.swig' %} - {% include '_partials/comments.swig' %} -
    - {% if theme.sidebar.display !== 'remove' %} - {% block sidebar %}{% endblock %} - {% endif %} -
    -
    - -
    - -
    - - {% if not theme.sidebar.b2t %} -
    - - {% if theme.sidebar.scrollpercent %} - 0% - {% endif %} -
    - {% endif %} - -
    - - {% include '_scripts/vendors.swig' %} - {% include '_scripts/commons.swig' %} - - {% set scheme_script = '_scripts/schemes/' + theme.scheme | lower + '.swig' %} - {% include scheme_script %} - - {% block script_extra %} - {% include '_scripts/pages/post-details.swig' %} - {% endblock %} - - {% include '_scripts/boostrap.swig' %} - - {% include '_third-party/comments/index.swig' %} - {% include '_third-party/search/index.swig' %} - {% include '_third-party/analytics/lean-analytics.swig' %} - {% include '_third-party/seo/baidu-push.swig' %} - {% include '_third-party/rating.swig' %} - {% include '_third-party/mathjax.swig' %} - {% include '_third-party/scroll-cookie.swig' %} - {% include '_third-party/exturl.swig' %} - - diff --git a/themes/next/layout/_macro/post-collapse.swig b/themes/next/layout/_macro/post-collapse.swig deleted file mode 100644 index 1894d24..0000000 --- a/themes/next/layout/_macro/post-collapse.swig +++ /dev/null @@ -1,34 +0,0 @@ -{% macro render(post) %} - - - -{% endmacro %} diff --git a/themes/next/layout/_macro/post-copyright.swig b/themes/next/layout/_macro/post-copyright.swig deleted file mode 100644 index e1f6a1d..0000000 --- a/themes/next/layout/_macro/post-copyright.swig +++ /dev/null @@ -1,14 +0,0 @@ -
      -
    • - {{ __('post.copyright.author') + __('symbol.colon') }} - {{ config.author }} -
    • -
    • - {{ __('post.copyright.link') + __('symbol.colon') }} - {{ post.permalink }} -
    • -
    • - {{ __('post.copyright.license_title') + __('symbol.colon') }} - {{ __('post.copyright.license_content', theme.post_copyright.license_url, theme.post_copyright.license) }} -
    • -
    diff --git a/themes/next/layout/_macro/post.swig b/themes/next/layout/_macro/post.swig deleted file mode 100644 index b485115..0000000 --- a/themes/next/layout/_macro/post.swig +++ /dev/null @@ -1,411 +0,0 @@ -{% macro render(post, is_index, post_extra_class) %} - - {% set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %} - - {% set post_class = 'post post-type-' + post.type | default('normal') %} - {% if post_extra_class > 0 %} - {% set post_class = post_class + ' ' + post_extra_class | default('') %} - {% endif %} - {% if post.sticky > 0 %} - {% set post_class = post_class + ' ' + 'post-sticky' %} - {% endif %} - -
    - {##################} - {### POST BLOCK ###} - {##################} -
    - - - - - - - {% if not headlessPost %} -
    - - {# Not to show title for quote posts that do not have a title #} - {% if not (is_index and post.type === 'quote' and not post.title) %} - <{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title{% if post.direction && post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="name headline">{# - #}{# Link posts #}{# - #}{% if post.link %} - {% if post.sticky > 0 %} - {{ post.sticky }} - - - - {% endif %} - - {% else %}{# - #}{% if is_index %} - {% if post.sticky > 0 %} - - - - {% endif %} - {# - #}{% else %}{{ post.title }}{% endif %}{# - #}{% endif %}{# - #} - {% endif %} - - -
    - {% endif %} - - {#################} - {### POST BODY ###} - {#################} -
    - - {# Gallery support #} - {% if post.photos and post.photos.length %} -
    - {% set COLUMN_NUMBER = 3 %} - {% for photo in post.photos %} - {% if loop.index0 % COLUMN_NUMBER === 0 %}
    {% endif %} - - {% if loop.index0 % COLUMN_NUMBER === 2 %}
    {% endif %} - {% endfor %} - - {# Append end tag for `post-gallery-row` when (photos size mod COLUMN_NUMBER) is less than COLUMN_NUMBER #} - {% if post.photos.length % COLUMN_NUMBER > 0 %}
    {% endif %} -
    - {% endif %} - - {% if is_index %} - {% if post.description and theme.excerpt_description %} - {{ post.description }} - - {% if theme.read_more_btn %} -
    - - {{ __('post.read_more') }} » - -
    - {% endif %} - - {% elif post.excerpt %} - {{ post.excerpt }} - - {% if theme.read_more_btn %} -
    - - {{ __('post.read_more') }} » - -
    - {% endif %} - - {% elif theme.auto_excerpt.enable %} - {% set content = post.content | striptags %} - {{ content.substring(0, theme.auto_excerpt.length) }} - {% if content.length > theme.auto_excerpt.length %}...{% endif %} - - {% if theme.read_more_btn %} -
    - - {{ __('post.read_more') }} » - -
    - {% endif %} - - {% else %} - {% if post.type === 'picture' %} - {{ post.content }} - {% else %} - {{ post.content }} - {% endif %} - {% endif %} - {% else %} - {{ post.content }} - {% endif %} -
    - {#####################} - {### END POST BODY ###} - {#####################} - - {% if theme.wechat_subscriber.enabled and not is_index %} -
    - {% include 'wechat-subscriber.swig' %} -
    - {% endif %} - - {% if (theme.alipay or theme.wechatpay or theme.bitcoin) and not is_index %} -
    - {% include 'reward.swig' %} -
    - {% endif %} - - {% if theme.post_copyright.enable and not is_index %} -
    - {% include 'post-copyright.swig' with { post: post } %} -
    - {% endif %} - -
    - {% if post.tags and post.tags.length and not is_index %} - - {% endif %} - - {% if not is_index %} - {% if theme.rating.enable or (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} -
    - {% if theme.rating.enable %} -
    -
    -
    - {% endif %} - - {% if (theme.vkontakte_api.enable and theme.vkontakte_api.like) or (theme.facebook_sdk.enable and theme.facebook_sdk.like_button) %} - - {% endif %} -
    - {% endif %} - {% endif %} - - {% if not is_index and (post.prev or post.next) %} -
    -
    - {% if post.next %} - - {% endif %} -
    - - - -
    - {% if post.prev %} - - {% endif %} -
    -
    - {% endif %} - - {% set isLast = loop.index % page.per_page === 0 %} - {% if is_index and not isLast %} -
    - {% endif %} -
    -
    - {######################} - {### END POST BLOCK ###} - {######################} - - -{% endmacro %} diff --git a/themes/next/layout/_macro/reward.swig b/themes/next/layout/_macro/reward.swig deleted file mode 100644 index c9f446c..0000000 --- a/themes/next/layout/_macro/reward.swig +++ /dev/null @@ -1,30 +0,0 @@ -
    -
    {{ theme.reward_comment }}
    - - -
    diff --git a/themes/next/layout/_macro/sidebar.swig b/themes/next/layout/_macro/sidebar.swig deleted file mode 100644 index c999385..0000000 --- a/themes/next/layout/_macro/sidebar.swig +++ /dev/null @@ -1,165 +0,0 @@ -{% macro render(is_post) %} - - - -{% endmacro %} diff --git a/themes/next/layout/_macro/wechat-subscriber.swig b/themes/next/layout/_macro/wechat-subscriber.swig deleted file mode 100644 index b1d4364..0000000 --- a/themes/next/layout/_macro/wechat-subscriber.swig +++ /dev/null @@ -1,4 +0,0 @@ -
    - {{ theme.author }} wechat -
    {{ theme.wechat_subscriber.description }}
    -
    diff --git a/themes/next/layout/_partials/comments.swig b/themes/next/layout/_partials/comments.swig deleted file mode 100644 index 052b0d8..0000000 --- a/themes/next/layout/_partials/comments.swig +++ /dev/null @@ -1,33 +0,0 @@ -{% if page.comments %} -
    - {% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %} -
    -
    - {% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %} -
    -
    - {% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %} -
    - {% elseif theme.disqus.enable %} -
    - -
    - {% elseif theme.hypercomments_id %} -
    - {% elseif theme.youyan_uid %} -
    - {% elseif theme.livere_uid %} -
    - {% elseif theme.changyan.appid and theme.changyan.appkey %} -
    - {% endif %} -
    -{% endif %} diff --git a/themes/next/layout/_partials/footer.swig b/themes/next/layout/_partials/footer.swig deleted file mode 100644 index 2f479c0..0000000 --- a/themes/next/layout/_partials/footer.swig +++ /dev/null @@ -1,22 +0,0 @@ - - -{% if theme.copyright %} -
    - {{ __('footer.powered', 'Hexo') }} -
    - -
    - {{ __('footer.theme') }} - - - NexT.{{ theme.scheme }} - -
    -{% endif %} diff --git a/themes/next/layout/_partials/head.swig b/themes/next/layout/_partials/head.swig deleted file mode 100644 index 4570dfc..0000000 --- a/themes/next/layout/_partials/head.swig +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - -{% if theme.pace %} - {% set pace_css_uri = url_for(theme.vendors._internal + '/pace/'+ theme.pace_theme +'.min.css?v=1.0.2') %} - {% set pace_js_uri = url_for(theme.vendors._internal + '/pace/pace.min.js?v=1.0.2') %} - {% if theme.vendors.pace %} - {% set pace_js_uri = theme.vendors.pace %} - {% endif %} - {% if theme.vendors.pace_css %} - {% set pace_css_uri = theme.vendors.pace_css %} - {% endif %} - - -{% endif %} - - -{% if theme.han %} - {% set Han_uri = url_for(theme.vendors._internal + '/Han/dist/han.min.css?v=3.3') %} - {% if theme.vendors.Han %} - {% set Han_uri = theme.vendors.Han %} - {% endif %} - -{% endif %} - - -{# #238, Disable Baidu tranformation #} - - - - -{% if theme.google_site_verification %} - -{% endif %} - - -{% if theme.yandex_site_verification %} - -{% endif %} - - -{% if theme.baidu_site_verification %} - -{% endif %} - - -{% if theme.qihu_site_verification %} - -{% endif %} - - -{% if theme.fancybox %} - {% set fancybox_css_uri = url_for(theme.vendors._internal + '/fancybox/source/jquery.fancybox.css?v=2.1.5') %} - {% if theme.vendors.fancybox_css %} - {% set fancybox_css_uri = theme.vendors.fancybox_css %} - {% endif %} - -{% endif %} - -{% include "./head/external-fonts.swig" %} - -{% set font_awesome_uri = url_for(theme.vendors._internal + '/font-awesome/css/font-awesome.min.css?v=4.6.2') %} -{% if theme.vendors.fontawesome %} - {% set font_awesome_uri = theme.vendors.fontawesome %} -{% endif %} - - - - -{% if page.keywords %} - -{% elif page.tags and page.tags.length %} - -{% elif theme.keywords %} - -{% endif %} - - -{% if theme.rss === '' and config.feed and config.feed.path %} - {% set theme.rss = config.feed.path %} -{% endif %} -{% if theme.rss %} - -{% endif %} - - -{% if theme.favicon %} - -{% endif %} - - -{% if theme.facebook_sdk.enable and theme.facebook_sdk.webmaster %} - - -{% endif %} - - -{{ - open_graph({ - twitter_id: theme.twitter, - google_plus: theme.google_plus, - fb_admins: theme.fb_admins, - fb_app_id: theme.fb_app_id - }) -}} - - -{# Export some HEXO Configurations to Front-End #} - - -{# Canonical, good for google search engine (SEO) : https://support.google.com/webmasters/answer/139066 #} -{% if theme.canonical %} - -{% endif %} - -{% include 'head/custom-head.swig' %} diff --git a/themes/next/layout/_partials/head/custom-head.swig b/themes/next/layout/_partials/head/custom-head.swig deleted file mode 100644 index 6aed40d..0000000 --- a/themes/next/layout/_partials/head/custom-head.swig +++ /dev/null @@ -1,3 +0,0 @@ -{# -Custom head. -#} diff --git a/themes/next/layout/_partials/head/external-fonts.swig b/themes/next/layout/_partials/head/external-fonts.swig deleted file mode 100644 index 876e12e..0000000 --- a/themes/next/layout/_partials/head/external-fonts.swig +++ /dev/null @@ -1,51 +0,0 @@ -{% if theme.font.enable %} - - {% set font_config = theme.font %} - {% set font_families = '' %} - {% set font_styles = ':300,300italic,400,400italic,700,700italic' %} - {% set font_found = false %} - - {% if font_config.global.family and font_config.global.external %} - {% set font_families += font_config.global.family + font_styles %} - {% set font_found = true %} - {% endif %} - - {% if font_config.headings.family and font_config.headings.external %} - {% if font_found %} - {% set font_families += '|' %} - {% endif %} - - {% set font_families += font_config.headings.family + font_styles %} - {% endif %} - - {% if font_config.posts.family and font_config.posts.external %} - {% if font_found %} - {% set font_families += '|' %} - {% endif %} - - {% set font_families += font_config.posts.family + font_styles %} - {% endif %} - - {% if font_config.logo.family and font_config.logo.external %} - {% if font_found %} - {% set font_families += '|' %} - {% endif %} - - {% set font_families += font_config.logo.family + font_styles %} - {% endif %} - - {% if font_config.codes.family and font_config.codes.external %} - {% if font_found %} - {% set font_families += '|' %} - {% endif %} - - {% set font_families += font_config.codes.family + font_styles %} - {% endif %} - - {% if font_families !== '' %} - {% set font_families += '&subset=latin,latin-ext' %} - {% set font_host = font_config.host | default('//fonts.googleapis.com') %} - - {% endif %} - -{% endif %} diff --git a/themes/next/layout/_partials/header.swig b/themes/next/layout/_partials/header.swig deleted file mode 100644 index ddb37f1..0000000 --- a/themes/next/layout/_partials/header.swig +++ /dev/null @@ -1,76 +0,0 @@ -
    -
    - {% if theme.custom_logo.image and theme.scheme === 'Muse' %} -
    - - {{ config.title }} - -
    - {% endif %} - - - {% if theme.seo %} -

    {{ config.subtitle }}

    - {% else %} -

    {{ config.subtitle }}

    - {% endif %} -
    - - -
    - - - -{% include '../_custom/header.swig' %} diff --git a/themes/next/layout/_partials/page-header.swig b/themes/next/layout/_partials/page-header.swig deleted file mode 100644 index 1e1f890..0000000 --- a/themes/next/layout/_partials/page-header.swig +++ /dev/null @@ -1,11 +0,0 @@ -
    - - <{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{{ page.title }} - -{% if page.description %} - -{% endif %} - -
    diff --git a/themes/next/layout/_partials/pagination.swig b/themes/next/layout/_partials/pagination.swig deleted file mode 100644 index 5f96b99..0000000 --- a/themes/next/layout/_partials/pagination.swig +++ /dev/null @@ -1,11 +0,0 @@ -{% if page.prev or page.next %} - -{% endif %} diff --git a/themes/next/layout/_partials/search.swig b/themes/next/layout/_partials/search.swig deleted file mode 100644 index a507d27..0000000 --- a/themes/next/layout/_partials/search.swig +++ /dev/null @@ -1,9 +0,0 @@ -{% if theme.algolia_search.enable %} - {% include '../_third-party/search/algolia-search/dom.swig' %} -{% elseif theme.swiftype_key %} - {% include 'search/swiftype.swig' %} -{% elseif theme.tinysou_Key %} - {% include 'search/tinysou.swig' %} -{% elseif theme.local_search.enable %} - {% include 'search/localsearch.swig' %} -{% endif %} diff --git a/themes/next/layout/_partials/search/localsearch.swig b/themes/next/layout/_partials/search/localsearch.swig deleted file mode 100644 index f106aa0..0000000 --- a/themes/next/layout/_partials/search/localsearch.swig +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/themes/next/layout/_partials/search/swiftype.swig b/themes/next/layout/_partials/search/swiftype.swig deleted file mode 100644 index 732e0c1..0000000 --- a/themes/next/layout/_partials/search/swiftype.swig +++ /dev/null @@ -1,12 +0,0 @@ -
    - -
    - - diff --git a/themes/next/layout/_partials/search/tinysou.swig b/themes/next/layout/_partials/search/tinysou.swig deleted file mode 100644 index 2dfa3e3..0000000 --- a/themes/next/layout/_partials/search/tinysou.swig +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
    diff --git a/themes/next/layout/_partials/share/add-this.swig b/themes/next/layout/_partials/share/add-this.swig deleted file mode 100644 index ae0a6b4..0000000 --- a/themes/next/layout/_partials/share/add-this.swig +++ /dev/null @@ -1,4 +0,0 @@ - -
    - -
    diff --git a/themes/next/layout/_partials/share/baidushare.swig b/themes/next/layout/_partials/share/baidushare.swig deleted file mode 100644 index 6be4898..0000000 --- a/themes/next/layout/_partials/share/baidushare.swig +++ /dev/null @@ -1,57 +0,0 @@ -{% if theme.baidushare.type === "button" %} -
    - - - - - - - - - - -
    - -{% elseif theme.baidushare.type === "slide" %} - -{% endif %} - diff --git a/themes/next/layout/_partials/share/duoshuo_share.swig b/themes/next/layout/_partials/share/duoshuo_share.swig deleted file mode 100644 index bfa26f4..0000000 --- a/themes/next/layout/_partials/share/duoshuo_share.swig +++ /dev/null @@ -1,18 +0,0 @@ -
    -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/themes/next/layout/_partials/share/jiathis.swig b/themes/next/layout/_partials/share/jiathis.swig deleted file mode 100644 index 6c64a71..0000000 --- a/themes/next/layout/_partials/share/jiathis.swig +++ /dev/null @@ -1,21 +0,0 @@ - -
    - - - - - - - - - - - -
    - - - diff --git a/themes/next/layout/_scripts/boostrap.swig b/themes/next/layout/_scripts/boostrap.swig deleted file mode 100644 index 5e95090..0000000 --- a/themes/next/layout/_scripts/boostrap.swig +++ /dev/null @@ -1,9 +0,0 @@ -{% - set boot_scripts = [ - 'src/bootstrap.js' - ] -%} - -{% for bs in boot_scripts %} - -{% endfor %} diff --git a/themes/next/layout/_scripts/commons.swig b/themes/next/layout/_scripts/commons.swig deleted file mode 100644 index abc2971..0000000 --- a/themes/next/layout/_scripts/commons.swig +++ /dev/null @@ -1,10 +0,0 @@ -{% - set js_commons = [ - 'src/utils.js', - 'src/motion.js' - ] -%} - -{% for common in js_commons %} - -{% endfor %} diff --git a/themes/next/layout/_scripts/pages/post-details.swig b/themes/next/layout/_scripts/pages/post-details.swig deleted file mode 100644 index 6938779..0000000 --- a/themes/next/layout/_scripts/pages/post-details.swig +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/themes/next/layout/_scripts/schemes/gemini.swig b/themes/next/layout/_scripts/schemes/gemini.swig deleted file mode 100644 index 5119eba..0000000 --- a/themes/next/layout/_scripts/schemes/gemini.swig +++ /dev/null @@ -1,10 +0,0 @@ -{% - set scripts = [ - 'src/affix.js', - 'src/schemes/pisces.js' - ] -%} - -{% for script in scripts %} - -{% endfor %} diff --git a/themes/next/layout/_scripts/schemes/mist.swig b/themes/next/layout/_scripts/schemes/mist.swig deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/layout/_scripts/schemes/muse.swig b/themes/next/layout/_scripts/schemes/muse.swig deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/layout/_scripts/schemes/pisces.swig b/themes/next/layout/_scripts/schemes/pisces.swig deleted file mode 100644 index 5119eba..0000000 --- a/themes/next/layout/_scripts/schemes/pisces.swig +++ /dev/null @@ -1,10 +0,0 @@ -{% - set scripts = [ - 'src/affix.js', - 'src/schemes/pisces.js' - ] -%} - -{% for script in scripts %} - -{% endfor %} diff --git a/themes/next/layout/_scripts/vendors.swig b/themes/next/layout/_scripts/vendors.swig deleted file mode 100644 index d59da72..0000000 --- a/themes/next/layout/_scripts/vendors.swig +++ /dev/null @@ -1,45 +0,0 @@ -{# Reset `window.Promise` when it was not a function. #} -{# IE refers the element whose id is `Promise` as `window.Promise`, this causes Velocity throwing an exception #} - - -{% set js_vendors = {} %} -{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %} -{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %} -{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %} -{% set js_vendors.velocity = 'velocity/velocity.min.js?v=1.2.1' %} -{% set js_vendors.velocity_ui = 'velocity/velocity.ui.min.js?v=1.2.1' %} - -{% if theme.fancybox %} - {% set js_vendors.fancybox = 'fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %} -{% endif %} -{% if theme.canvas_nest %} - {% set js_vendors.canvas_nest = 'canvas-nest/canvas-nest.min.js' %} -{% endif %} - -{% if theme.three_waves %} - {% set js_vendors.three = 'three/three.min.js' %} - {% set js_vendors.three_waves = 'three/three-waves.min.js' %} -{% endif %} - -{% if theme.canvas_lines %} - {% set js_vendors.three = 'three/three.min.js' %} - {% set js_vendors.canvas_lines = 'three/canvas_lines.min.js' %} -{% endif %} - -{% if theme.canvas_sphere %} - {% set js_vendors.three = 'three/three.min.js' %} - {% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %} -{% endif %} - -{% if theme.canvas_ribbon and theme.scheme === 'Pisces'%} - {% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %} -{% endif %} - -{% for name, internal in js_vendors %} - {% set internal_script = url_for(theme.vendors._internal) + '/' + internal %} - -{% endfor %} diff --git a/themes/next/layout/_third-party/analytics/application-insights.swig b/themes/next/layout/_third-party/analytics/application-insights.swig deleted file mode 100644 index c0af16f..0000000 --- a/themes/next/layout/_third-party/analytics/application-insights.swig +++ /dev/null @@ -1,11 +0,0 @@ -{% if theme.application_insights %} - -{% endif %} \ No newline at end of file diff --git a/themes/next/layout/_third-party/analytics/baidu-analytics.swig b/themes/next/layout/_third-party/analytics/baidu-analytics.swig deleted file mode 100644 index 9ae1d83..0000000 --- a/themes/next/layout/_third-party/analytics/baidu-analytics.swig +++ /dev/null @@ -1,11 +0,0 @@ -{% if theme.baidu_analytics %} - -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/busuanzi-counter.swig b/themes/next/layout/_third-party/analytics/busuanzi-counter.swig deleted file mode 100644 index f853efa..0000000 --- a/themes/next/layout/_third-party/analytics/busuanzi-counter.swig +++ /dev/null @@ -1,21 +0,0 @@ -{% if theme.busuanzi_count.enable %} -
    - - - {% if theme.busuanzi_count.site_uv %} - - {{ theme.busuanzi_count.site_uv_header }} - - {{ theme.busuanzi_count.site_uv_footer }} - - {% endif %} - - {% if theme.busuanzi_count.site_pv %} - - {{ theme.busuanzi_count.site_pv_header }} - - {{ theme.busuanzi_count.site_pv_footer }} - - {% endif %} -
    -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/cnzz-analytics.swig b/themes/next/layout/_third-party/analytics/cnzz-analytics.swig deleted file mode 100644 index bffb73c..0000000 --- a/themes/next/layout/_third-party/analytics/cnzz-analytics.swig +++ /dev/null @@ -1,7 +0,0 @@ -{% if theme.cnzz_siteid %} - -
    - -
    - -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/facebook-sdk.swig b/themes/next/layout/_third-party/analytics/facebook-sdk.swig deleted file mode 100644 index 7b5a291..0000000 --- a/themes/next/layout/_third-party/analytics/facebook-sdk.swig +++ /dev/null @@ -1,19 +0,0 @@ -{% if theme.facebook_sdk.enable %} - -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/google-analytics.swig b/themes/next/layout/_third-party/analytics/google-analytics.swig deleted file mode 100644 index c66d461..0000000 --- a/themes/next/layout/_third-party/analytics/google-analytics.swig +++ /dev/null @@ -1,10 +0,0 @@ -{% if theme.google_analytics %} - -{% endif %} \ No newline at end of file diff --git a/themes/next/layout/_third-party/analytics/index.swig b/themes/next/layout/_third-party/analytics/index.swig deleted file mode 100644 index 6686058..0000000 --- a/themes/next/layout/_third-party/analytics/index.swig +++ /dev/null @@ -1,8 +0,0 @@ -{% include 'facebook-sdk.swig' %} -{% include 'vkontakte-api.swig' %} -{% include 'google-analytics.swig' %} -{% include 'baidu-analytics.swig' %} -{% include 'tencent-analytics.swig' %} -{% include 'tencent-mta.swig' %} -{% include 'cnzz-analytics.swig' %} -{% include 'application-insights.swig' %} diff --git a/themes/next/layout/_third-party/analytics/lean-analytics.swig b/themes/next/layout/_third-party/analytics/lean-analytics.swig deleted file mode 100644 index 2e8bb98..0000000 --- a/themes/next/layout/_third-party/analytics/lean-analytics.swig +++ /dev/null @@ -1,108 +0,0 @@ -{% if theme.leancloud_visitors.enable %} - - {# custom analytics part create by xiamo #} - - - - -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/tencent-analytics.swig b/themes/next/layout/_third-party/analytics/tencent-analytics.swig deleted file mode 100644 index c2fab35..0000000 --- a/themes/next/layout/_third-party/analytics/tencent-analytics.swig +++ /dev/null @@ -1,10 +0,0 @@ -{% if theme.tencent_analytics %} - -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/tencent-mta.swig b/themes/next/layout/_third-party/analytics/tencent-mta.swig deleted file mode 100644 index f4b6470..0000000 --- a/themes/next/layout/_third-party/analytics/tencent-mta.swig +++ /dev/null @@ -1,14 +0,0 @@ -{% if theme.tencent_mta %} - -{% endif %} diff --git a/themes/next/layout/_third-party/analytics/vkontakte-api.swig b/themes/next/layout/_third-party/analytics/vkontakte-api.swig deleted file mode 100644 index 913a8fc..0000000 --- a/themes/next/layout/_third-party/analytics/vkontakte-api.swig +++ /dev/null @@ -1,27 +0,0 @@ -{% if theme.vkontakte_api.enable %} - -
    - - -{% endif %} diff --git a/themes/next/layout/_third-party/comments/changyan.swig b/themes/next/layout/_third-party/comments/changyan.swig deleted file mode 100644 index d816b2c..0000000 --- a/themes/next/layout/_third-party/comments/changyan.swig +++ /dev/null @@ -1,18 +0,0 @@ -{% if theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %} - {% if is_home() %} - - {% else %} - - - {% endif %} -{% endif %} diff --git a/themes/next/layout/_third-party/comments/disqus.swig b/themes/next/layout/_third-party/comments/disqus.swig deleted file mode 100644 index 2d14907..0000000 --- a/themes/next/layout/_third-party/comments/disqus.swig +++ /dev/null @@ -1,23 +0,0 @@ -{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %} - {% if theme.disqus.enable %} - - {% if theme.disqus.count %} - - {% endif %} - - {% if page.comments %} - - {% endif %} - - {% endif %} -{% endif %} diff --git a/themes/next/layout/_third-party/comments/duoshuo.swig b/themes/next/layout/_third-party/comments/duoshuo.swig deleted file mode 100644 index c8499b2..0000000 --- a/themes/next/layout/_third-party/comments/duoshuo.swig +++ /dev/null @@ -1,33 +0,0 @@ -{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %} - - {% if theme.duoshuo %} - {% set duoshuo_shortname = theme.duoshuo.shortname %} - {% else %} - {% set duoshuo_shortname = theme.duoshuo_shortname %} - {% endif %} - - - - {% if theme.duoshuo_info.ua_enable %} - {% if theme.duoshuo_info.admin_enable %} - {% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %} - - - {% endif %} - {% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %} - - - {% endif %} - -{% endif %} diff --git a/themes/next/layout/_third-party/comments/hypercomments.swig b/themes/next/layout/_third-party/comments/hypercomments.swig deleted file mode 100644 index de693e4..0000000 --- a/themes/next/layout/_third-party/comments/hypercomments.swig +++ /dev/null @@ -1,27 +0,0 @@ -{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname %} - - {% if theme.hypercomments_id %} - - - - {% endif %} - -{% endif %} diff --git a/themes/next/layout/_third-party/comments/index.swig b/themes/next/layout/_third-party/comments/index.swig deleted file mode 100644 index 563def5..0000000 --- a/themes/next/layout/_third-party/comments/index.swig +++ /dev/null @@ -1,6 +0,0 @@ -{% include 'duoshuo.swig' %} -{% include 'disqus.swig' %} -{% include 'hypercomments.swig' %} -{% include 'youyan.swig' %} -{% include 'livere.swig' %} -{% include 'changyan.swig' %} diff --git a/themes/next/layout/_third-party/comments/livere.swig b/themes/next/layout/_third-party/comments/livere.swig deleted file mode 100644 index 9e1e165..0000000 --- a/themes/next/layout/_third-party/comments/livere.swig +++ /dev/null @@ -1,16 +0,0 @@ -{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not (theme.disqus.enable and theme.disqus.shortname) and not theme.hypercomments_id %} - - {% if page.comments and theme.livere_uid %} - - {% endif %} - -{% endif %} diff --git a/themes/next/layout/_third-party/comments/youyan.swig b/themes/next/layout/_third-party/comments/youyan.swig deleted file mode 100644 index dbf3e8a..0000000 --- a/themes/next/layout/_third-party/comments/youyan.swig +++ /dev/null @@ -1,16 +0,0 @@ -{% if not (theme.duoshuo and theme.duoshuo.shortname) - and not theme.duoshuo_shortname - and not theme.disqus_shortname - and not theme.hypercomments_id %} - - {% if theme.youyan_uid %} - {% set uid = theme.youyan_uid %} - - {% if page.comments %} - - - - {% endif %} - {% endif %} - -{% endif %} diff --git a/themes/next/layout/_third-party/duoshuo-hot-articles.swig b/themes/next/layout/_third-party/duoshuo-hot-articles.swig deleted file mode 100644 index 2d1088d..0000000 --- a/themes/next/layout/_third-party/duoshuo-hot-articles.swig +++ /dev/null @@ -1,5 +0,0 @@ -{# 多说热评文章 #} -{% if (theme.duoshuo_hotartical and page.title) %} -

    热评文章

    -
    -{% endif %} diff --git a/themes/next/layout/_third-party/exturl.swig b/themes/next/layout/_third-party/exturl.swig deleted file mode 100644 index 329ab50..0000000 --- a/themes/next/layout/_third-party/exturl.swig +++ /dev/null @@ -1,3 +0,0 @@ -{% if theme.exturl %} - -{% endif %} diff --git a/themes/next/layout/_third-party/mathjax.swig b/themes/next/layout/_third-party/mathjax.swig deleted file mode 100644 index 89db7b4..0000000 --- a/themes/next/layout/_third-party/mathjax.swig +++ /dev/null @@ -1,23 +0,0 @@ -{% if theme.mathjax.enable %} - {% if not theme.mathjax.per_page or (page.total or page.mathjax) %} - - - - - {% endif %} -{% endif %} diff --git a/themes/next/layout/_third-party/rating.swig b/themes/next/layout/_third-party/rating.swig deleted file mode 100644 index 3b376ce..0000000 --- a/themes/next/layout/_third-party/rating.swig +++ /dev/null @@ -1,18 +0,0 @@ -{% if theme.rating.enable and (not is_home() and is_post()) %} - -{% endif %} diff --git a/themes/next/layout/_third-party/schedule.swig b/themes/next/layout/_third-party/schedule.swig deleted file mode 100644 index 6db3a3c..0000000 --- a/themes/next/layout/_third-party/schedule.swig +++ /dev/null @@ -1,185 +0,0 @@ -{% if theme.calendar.enable %} -{% if page.type == 'schedule' %} - - - -{% endif %} -{% endif %} diff --git a/themes/next/layout/_third-party/scroll-cookie.swig b/themes/next/layout/_third-party/scroll-cookie.swig deleted file mode 100644 index 9fbb0eb..0000000 --- a/themes/next/layout/_third-party/scroll-cookie.swig +++ /dev/null @@ -1,4 +0,0 @@ -{% if theme.save_scroll %} - - -{% endif %} diff --git a/themes/next/layout/_third-party/search/algolia-search/assets.swig b/themes/next/layout/_third-party/search/algolia-search/assets.swig deleted file mode 100644 index 069504f..0000000 --- a/themes/next/layout/_third-party/search/algolia-search/assets.swig +++ /dev/null @@ -1,18 +0,0 @@ -{% if theme.algolia_search.enable %} - - {# S: Include Algolia instantsearch.js library #} - {% set algolia_instant_css = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.css') %} - {% if theme.vendors.algolia_instant_css %} - {% set algolia_instant_css = theme.vendors.algolia_instant_css %} - {% endif %} - - - {% set algolia_instant_js = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.js') %} - {% if theme.vendors.algolia_instant_js %} - {% set algolia_instant_js = theme.vendors.algolia_instant_js %} - {% endif %} - - {# E: Include Algolia instantsearch.js library #} - - -{% endif %} diff --git a/themes/next/layout/_third-party/search/algolia-search/dom.swig b/themes/next/layout/_third-party/search/algolia-search/dom.swig deleted file mode 100644 index a733bb1..0000000 --- a/themes/next/layout/_third-party/search/algolia-search/dom.swig +++ /dev/null @@ -1,20 +0,0 @@ -{% if theme.algolia_search.enable %} - -{% endif %} diff --git a/themes/next/layout/_third-party/search/index.swig b/themes/next/layout/_third-party/search/index.swig deleted file mode 100644 index 0a352bc..0000000 --- a/themes/next/layout/_third-party/search/index.swig +++ /dev/null @@ -1,3 +0,0 @@ -{% include 'tinysou.swig' %} -{% include 'localsearch.swig' %} -{% include 'algolia-search/assets.swig' %} diff --git a/themes/next/layout/_third-party/search/localsearch.swig b/themes/next/layout/_third-party/search/localsearch.swig deleted file mode 100644 index c373e5c..0000000 --- a/themes/next/layout/_third-party/search/localsearch.swig +++ /dev/null @@ -1,318 +0,0 @@ -{% if theme.local_search.enable %} - -{% endif %} diff --git a/themes/next/layout/_third-party/search/tinysou.swig b/themes/next/layout/_third-party/search/tinysou.swig deleted file mode 100644 index 6e18684..0000000 --- a/themes/next/layout/_third-party/search/tinysou.swig +++ /dev/null @@ -1,23 +0,0 @@ -{% if config.tinysou_Key %} - -{% endif %} \ No newline at end of file diff --git a/themes/next/layout/_third-party/seo/baidu-push.swig b/themes/next/layout/_third-party/seo/baidu-push.swig deleted file mode 100644 index ee6838f..0000000 --- a/themes/next/layout/_third-party/seo/baidu-push.swig +++ /dev/null @@ -1,16 +0,0 @@ -{% if theme.baidu_push %} - -{% endif %} diff --git a/themes/next/layout/archive.swig b/themes/next/layout/archive.swig deleted file mode 100644 index 8e1900b..0000000 --- a/themes/next/layout/archive.swig +++ /dev/null @@ -1,71 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/post-collapse.swig' as post_template %} -{% import '_macro/sidebar.swig' as sidebar_template %} - -{% block title %}{{ __('title.archive') }} | {{ config.title }}{% endblock %} - -{% block page_class %} page-archive {% endblock %} - -{% block content %} - - {#####################} - {### ARCHIVE BLOCK ###} - {#####################} -
    -
    - - - - {% set cheers %} - {% set posts_length = site.posts.length %} - {% if posts_length > 210 %} {% set cheers = 'excellent' %} - {% elif posts_length > 130 %} {% set cheers = 'great' %} - {% elif posts_length > 80 %} {% set cheers = 'good' %} - {% elif posts_length > 50 %} {% set cheers = 'nice' %} - {% elif posts_length > 30 %} {% set cheers = 'ok' %} - {% else %} - {% set cheers = 'um' %} - {% endif %} - {{ __('cheers.' + cheers) }}! {{ _p("counter.archive_posts", site.posts.length) }} {{ __('keep_on') }} - - - {% for post in page.posts %} - - {# Show year #} - {% set year %} - {% set post.year = date(post.date, 'YYYY') %} - - {% if post.year !== year %} - {% set year = post.year %} -
    -

    {{ year }}

    -
    - {% endif %} - {# endshow #} - - {{ post_template.render(post) }} - - {% endfor %} - -
    -
    - {#########################} - {### END ARCHIVE BLOCK ###} - {#########################} - - {% include '_partials/pagination.swig' %} - -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(false) }} -{% endblock %} - - -{% block script_extra %} - {% if theme.use_motion %} - - {% endif %} -{% endblock %} diff --git a/themes/next/layout/category.swig b/themes/next/layout/category.swig deleted file mode 100644 index 8e3aa72..0000000 --- a/themes/next/layout/category.swig +++ /dev/null @@ -1,38 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/post-collapse.swig' as post_template %} -{% import '_macro/sidebar.swig' as sidebar_template %} - -{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ config.title }}{% endblock %} - -{% block content %} - - {######################} - {### CATEGORY BLOCK ###} - {######################} -
    - -
    -
    - <{% if theme.seo %}h2{% else %}h1{% endif %}>{# - #}{{ page.category }}{# - #}{{ __('title.category') }} - -
    - - {% for post in page.posts %} - {{ post_template.render(post) }} - {% endfor %} -
    - -
    - {##########################} - {### END CATEGORY BLOCK ###} - {##########################} - - {% include '_partials/pagination.swig' %} - -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(false) }} -{% endblock %} diff --git a/themes/next/layout/index.swig b/themes/next/layout/index.swig deleted file mode 100644 index 7c7f862..0000000 --- a/themes/next/layout/index.swig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/post.swig' as post_template %} -{% import '_macro/sidebar.swig' as sidebar_template %} - -{% block title %}{{ config.title }}{% if theme.index_with_subtitle and config.subtitle %} - {{config.subtitle }}{% endif %}{% endblock %} - -{% block page_class %} - {% if is_home() %} page-home {% endif %} -{% endblock %} - -{% block content %} -
    - {% for post in page.posts %} - {{ post_template.render(post, true) }} - {% endfor %} -
    - - {% include '_partials/pagination.swig' %} -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(false) }} -{% endblock %} diff --git a/themes/next/layout/page.swig b/themes/next/layout/page.swig deleted file mode 100644 index f2085a8..0000000 --- a/themes/next/layout/page.swig +++ /dev/null @@ -1,66 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/sidebar.swig' as sidebar_template %} - - {% block title %}{# - #}{% set page_title_suffix = ' | ' + config.title %}{# - - #}{% if page.type === "categories" and not page.title %}{# - #}{{ __('title.category') + page_title_suffix }}{# - #}{% elif page.type === "tags" and not page.title %}{# - #}{{ __('title.tag') + page_title_suffix }}{# - #}{% else %}{# - #}{{ page.title + page_title_suffix }}{# - #}{% endif %}{# -#}{% endblock %} - -{% block page_class %}page-post-detail{% endblock %} - -{% block content %} - -
    - {##################} - {### PAGE BLOCK ###} - {##################} -
    - {% include '_partials/page-header.swig' %} - {#################} - {### PAGE BODY ###} - {#################} -
    - {# tagcloud page support #} - {% if page.type === "tags" %} -
    -
    - {{ _p('counter.tag_cloud', site.tags.length) }} -
    -
    - {{ tagcloud({min_font: 12, max_font: 30, amount: 200, color: true, start_color: '#ccc', end_color: '#111'}) }} -
    -
    - {% elif page.type === 'categories' %} -
    -
    - {{ _p('counter.categories', site.categories.length) }} -
    -
    - {{ list_categories() }} -
    -
    - {% else %} - {{ page.content }} - {% endif %} -
    - {#####################} - {### END PAGE BODY ###} - {#####################} -
    - {######################} - {### END PAGE BLOCK ###} - {######################} -
    - -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(false) }} -{% endblock %} diff --git a/themes/next/layout/post.swig b/themes/next/layout/post.swig deleted file mode 100644 index 091f326..0000000 --- a/themes/next/layout/post.swig +++ /dev/null @@ -1,38 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/post.swig' as post_template %} -{% import '_macro/sidebar.swig' as sidebar_template %} - - -{% block title %}{{ page.title }} | {{ config.title }}{% endblock %} - -{% block page_class %}page-post-detail{% endblock %} - - -{% block content %} - -
    - {{ post_template.render(page) }} - -
    - {% if theme.jiathis %} - {% include '_partials/share/jiathis.swig' %} - {% elseif theme.baidushare %} - {% include '_partials/share/baidushare.swig' %} - {% elseif theme.add_this_id %} - {% include '_partials/share/add-this.swig' %} - {% elseif theme.duoshuo_shortname and theme.duoshuo_share %} - {% include '_partials/share/duoshuo_share.swig' %} - {% endif %} -
    -
    - -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(true) }} -{% endblock %} - - -{% block script_extra %} - {% include '_scripts/pages/post-details.swig' %} -{% endblock %} diff --git a/themes/next/layout/schedule.swig b/themes/next/layout/schedule.swig deleted file mode 100644 index 216dfea..0000000 --- a/themes/next/layout/schedule.swig +++ /dev/null @@ -1,25 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/sidebar.swig' as sidebar_template %} - -{% block title %}{{ __('title.schedule') }} | {{ config.title }}{% endblock %} - -{% block page_class %}page-post-detail page-calendar{% endblock %} - -{% block content %} - {######################} - {### SCHEDULE BLOCK ###} - {######################} -
    -
    -
      -
    -
    -
    - {##########################} - {### END SCHEDULE BLOCK ###} - {##########################} -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(false) }} -{% endblock %} diff --git a/themes/next/layout/tag.swig b/themes/next/layout/tag.swig deleted file mode 100644 index e570ce8..0000000 --- a/themes/next/layout/tag.swig +++ /dev/null @@ -1,37 +0,0 @@ -{% extends '_layout.swig' %} -{% import '_macro/post-collapse.swig' as post_template %} -{% import '_macro/sidebar.swig' as sidebar_template %} - -{% block title %}{{ __('title.tag') }}: {{ page.tag }} | {{ config.title }}{% endblock %} - -{% block content %} - - {#################} - {### TAG BLOCK ###} - {#################} -
    - -
    -
    - <{% if theme.seo %}h2{% else %}h1{% endif %}>{# - #}{{ page.tag }}{# - #}{{ __('title.tag') }} - -
    - - {% for post in page.posts %} - {{ post_template.render(post) }} - {% endfor %} -
    - -
    - {#####################} - {### END TAG BLOCK ###} - {#####################} - - {% include '_partials/pagination.swig' %} -{% endblock %} - -{% block sidebar %} - {{ sidebar_template.render(false) }} -{% endblock %} diff --git a/themes/next/package.json b/themes/next/package.json deleted file mode 100644 index a7ede38..0000000 --- a/themes/next/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "hexo-theme-next", - "version": "5.1.2", - "description": "Elegant theme for Hexo", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "gulp" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/iissnan/hexo-theme-next.git" - }, - "keywords": [ - "NexT", - "Hexo" - ], - "author": "iissnan ", - "license": "MIT", - "bugs": { - "url": "https://github.com/iissnan/hexo-theme-next/issues" - }, - "homepage": "https://theme-next.iissnan.com", - "devDependencies": { - "coffee-script": "^1.10.0", - "gulp": "^3.9.0", - "gulp-jshint": "^1.12.0", - "gulp-shell": "^0.6.1", - "js-yaml": "^3.8.1", - "jshint-stylish": "^2.1.0", - "stylint": "^1.5.9" - } -} diff --git a/themes/next/scripts/merge-configs.js b/themes/next/scripts/merge-configs.js deleted file mode 100644 index 0428f4d..0000000 --- a/themes/next/scripts/merge-configs.js +++ /dev/null @@ -1,14 +0,0 @@ -/* global hexo */ - -var merge = require('./merge'); - -/** - * Merge configs in _data/next.yml into hexo.theme.config. - * Note: configs in _data/next.yml will override configs in hexo.theme.config. - */ -hexo.on('generateBefore', function () { - if (hexo.locals.get) { - var data = hexo.locals.get('data'); - data && data.next && merge(hexo.theme.config, data.next); - } -}); diff --git a/themes/next/scripts/merge.js b/themes/next/scripts/merge.js deleted file mode 100644 index f964663..0000000 --- a/themes/next/scripts/merge.js +++ /dev/null @@ -1,2225 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function () { - try { - return freeProcess && freeProcess.binding('util'); - } catch (e) { - } -}()); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ -function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; -} - -/** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ -function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; -} - -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: - return func.call(thisArg); - case 1: - return func.call(thisArg, args[0]); - case 2: - return func.call(thisArg, args[0], args[1]); - case 3: - return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function (value) { - return func(value); - }; -} - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) { - } - } - return result; -} - -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function (value, key) { - result[++index] = [key, value]; - }); - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} - -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function (value) { - result[++index] = value; - }); - return result; -} - -/** Used for built-in method references. */ -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function () { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; -} - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); -} - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - this.__data__ = new ListCache(entries); -} - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; -} - -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - return this.__data__['delete'](key); -} - -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - return this; - } - cache = this.__data__ = new MapCache(pairs); - } - cache.set(key, value); - return this; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (typeof key == 'number' && value === undefined && !(key in object))) { - object[key] = value; - } -} - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - arrayEach(props || value, function (subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); - }); - return result; -} - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -/** - * The base implementation of `getTag`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - return objectToString.call(value); -} - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; -} - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - if (!(isArray(source) || isTypedArray(source))) { - var props = baseKeysIn(source); - } - arrayEach(props || source, function (srcValue, key) { - if (props) { - key = srcValue; - srcValue = source[key]; - } - if (isObject(srcValue)) { - stack || (stack = new Stack); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }); -} - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - newValue = srcValue; - if (isArray(srcValue) || isTypedArray(srcValue)) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else { - isCommon = false; - newValue = baseClone(srcValue, true); - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - isCommon = false; - newValue = baseClone(srcValue, true); - } - else { - newValue = objValue; - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function () { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; -} - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -/** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); -} - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -/** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); -} - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - assignValue(object, key, newValue === undefined ? source[key] : newValue); - } - return object; -} - -/** - * Copies own symbol properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function (object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -/** - * Creates an array of the own enumerable symbol properties of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge < 14, and promises in Node.js. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function (value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: - return dataViewTag; - case mapCtorString: - return mapTag; - case promiseCtorString: - return promiseTag; - case setCtorString: - return setTag; - case weakMapCtorString: - return weakMapTag; - } - } - return result; - }; -} - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: - case float64Tag: - case int8Tag: - case int16Tag: - case int32Tag: - case uint8Tag: - case uint8ClampedTag: - case uint16Tag: - case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) { - } - try { - return (func + ''); - } catch (e) { - } - } - return ''; -} - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); -} - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return copyObject(value, keysIn(value)); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = createAssigner(function (object, source, srcIndex) { - baseMerge(object, source, srcIndex); -}); - -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -module.exports = merge; diff --git a/themes/next/scripts/tags/button.js b/themes/next/scripts/tags/button.js deleted file mode 100644 index 26e7d34..0000000 --- a/themes/next/scripts/tags/button.js +++ /dev/null @@ -1,31 +0,0 @@ -/* global hexo */ -// Usage: {% button /path/to/url/, text, icon [class], title %} -// Alias: {% btn /path/to/url/, text, icon [class], title %} - -function postButton(args) { - args = args.join(' ').split(','); - var url = args[0]; - var text = args[1] || ''; - var icon = args[2] || ''; - var title = args[3] || ''; - - if (!url) { - hexo.log.warn('URL can NOT be empty'); - } - - text = text.trim(); - icon = icon.trim(); - title = title.trim(); - - var result = [' 0 && result.push(' title="' + title + '"'); - result.push('>'); - icon.length > 0 && result.push(''); - text.length > 0 && result.push(text); - result.push(''); - - return result.join(''); -} - -hexo.extend.tag.register('button', postButton); -hexo.extend.tag.register('btn', postButton); diff --git a/themes/next/scripts/tags/center-quote.js b/themes/next/scripts/tags/center-quote.js deleted file mode 100644 index 93c5258..0000000 --- a/themes/next/scripts/tags/center-quote.js +++ /dev/null @@ -1,12 +0,0 @@ -/* global hexo */ -// Usage: {% centerquote %} Something {% endcenterquote %} -// Alias: {% cq %} Something {% endcq %} - -function centerQuote (args, content) { - return '
    ' + - hexo.render.renderSync({text: content, engine: 'markdown'}) + - '
    '; -} - -hexo.extend.tag.register('centerquote', centerQuote, {ends: true}); -hexo.extend.tag.register('cq', centerQuote, {ends: true}); diff --git a/themes/next/scripts/tags/exturl.js b/themes/next/scripts/tags/exturl.js deleted file mode 100644 index 901a9ce..0000000 --- a/themes/next/scripts/tags/exturl.js +++ /dev/null @@ -1,59 +0,0 @@ -/* global hexo */ -// Usage: {% exturl text url "title" %} -// Alias: {% extlink text url "title" %} - -'use strict'; - -/*jshint camelcase: false */ -var util = require('hexo-util'); -/*jshint camelcase: true */ -var htmlTag = util.htmlTag; - -var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/; - -// Create Base64 Object -var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}; - -function extURL(args, content) { - var exturl = 'exturl'; - var url = ''; - var text = ['']; - var title = ''; - var item = ''; - var i = 0; - var len = args.length; - - // Find link URL and text - for (; i < len; i++) { - item = args[i]; - - if (rUrl.test(item)) { - url = Base64.encode(item); - break; - } else { - text.push(item); - } - } - - // Delete link URL and text from arguments - args = args.slice(i + 1); - - // Check if the link should be open in a new window - // and collect the last text as the link title - if (args.length) { - var shift = args[0]; - title = args.join(' '); - } - - var attrs = { - class: exturl, - 'data-url': url, - title: title - }; - - //console.log(url); - return htmlTag('span', attrs, text.join(' ')); -} - -hexo.extend.tag.register('exturl', extURL, {ends: false}); -hexo.extend.tag.register('extlink', extURL, {ends: false}); diff --git a/themes/next/scripts/tags/full-image.js b/themes/next/scripts/tags/full-image.js deleted file mode 100644 index d4e0e4f..0000000 --- a/themes/next/scripts/tags/full-image.js +++ /dev/null @@ -1,26 +0,0 @@ -/* global hexo */ -// Usage: {% fullimage /path/to/image, alt, title %} -// Alias: {% fi /path/to/image, alt, title %} - -function fullImage(args) { - args = args.join(' ').split(','); - var src = args[0]; - var alt = args[1] || ''; - var title = args[2] || ''; - - if (!src) { - hexo.log.warn('Image src can NOT be empty'); - } - alt = alt.trim(); - title = title.trim(); - - var image = [' 0 && image.push('alt="' + alt + '"'); - title.length > 0 && image.push('title="' + title + '"'); - image.push('/>'); - - return image.join(' '); -} - -hexo.extend.tag.register('fullimage', fullImage); -hexo.extend.tag.register('fi', fullImage); diff --git a/themes/next/scripts/tags/group-pictures.js b/themes/next/scripts/tags/group-pictures.js deleted file mode 100644 index df7774b..0000000 --- a/themes/next/scripts/tags/group-pictures.js +++ /dev/null @@ -1,833 +0,0 @@ -/* global hexo */ -// Usage: {% grouppicture group-layout %}{% endgrouppicture %} -// Alias: {% gp group-layout %}{% endgp %} - -function groupPicture(args, content) { - args = args[0].split('-'); - var group = parseInt(args[0]); - var layout = parseInt(args[1]); - - content = hexo.render.renderSync({text: content, engine: 'markdown'}); - - var pictures = content.match(//g); - - return '
    ' + - templates.dispatch(pictures, group, layout) + - '
    '; -} - -var templates = { - - dispatch: function (pictures, group, layout) { - var fn = 'group' + group + 'Layout' + layout; - fn = templates[fn] || templates.defaults; - return fn.call(templates, pictures); - }, - - /** - * 2-1 - * - * □ - * □ - * - * @param pictures - * @returns {string} - */ - group2Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1) - ]); - }, - - /** - * 2-2 - * - * □ □ - * - * @param pictures - */ - group2Layout2: function (pictures) { - return this.getHTML(pictures); - }, - - /** - * 3-1 - * - * □ □ □ - * - * @param pictures - */ - group3Layout1: function (pictures) { - return this.getHTML(pictures); - }, - - /** - * 3-2 - * - * □ - * □ □ - * - * @param pictures - */ - group3Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1) - ]); - }, - - /** - * 3-3 - * - * □ □ - * □ - * - * @param pictures - */ - group3Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2) - ]); - }, - - /** - * 4-1 - * - * □ - * □ □ - * □ - * - * @param pictures - */ - group4Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3) - ]); - }, - - /** - * 4-2 - * - * □ - * □ □ □ - * - * @param pictures - */ - group4Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1) - ]); - }, - - /** - * 4-3 - * - * □ □ - * □ □ - * - * @param pictures - */ - group4Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2) - ]); - }, - - /** - * 4-4 - * - * □ □ □ - * □ - * - * @param pictures - */ - group4Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3) - ]); - }, - - /** - * 5-1 - * - * □ - * □ □ - * □ □ - * - * @param pictures - */ - group5Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3) - ]); - }, - - /** - * 5-2 - * - * □ □ - * □ - * □ □ - * - * @param pictures - */ - group5Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 3), - pictures.slice(3) - ]); - }, - - /** - * 5-3 - * - * □ □ - * □ □ □ - * - * @param pictures - */ - group5Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2) - ]); - }, - - /** - * 5-4 - * - * □ □ □ - * □ □ - * - * @param pictures - */ - group5Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3) - ]); - }, - - /** - * 6-1 - * - * □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group6Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3) - ]); - }, - - /** - * 6-2 - * - * □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group6Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 4), - pictures.slice(4) - ]); - }, - - /** - * 6-3 - * - * □ □ - * □ - * □ □ □ - * - * @param pictures - */ - group6Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 3), - pictures.slice(3) - ]); - }, - - /** - * 6-4 - * - * □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group6Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 4), - pictures.slice(4) - ]); - }, - - /** - * 6-5 - * - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group6Layout5: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3) - ]); - }, - - /** - * 7-1 - * - * □ - * □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group7Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3, 5), - pictures.slice(5) - ]); - }, - - /** - * 7-2 - * - * □ - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group7Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 4), - pictures.slice(4) - ]); - }, - - /** - * 7-3 - * - * □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group7Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 4), - pictures.slice(4) - ]); - }, - - /** - * 7-4 - * - * □ □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group7Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 5), - pictures.slice(5) - ]); - }, - - /** - * 7-5 - * - * □ □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group7Layout5: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 5), - pictures.slice(5) - ]); - }, - - /** - * 8-1 - * - * □ - * □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group8Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3, 5), - pictures.slice(5) - ]); - }, - - /** - * 8-2 - * - * □ - * □ □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group8Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3, 6), - pictures.slice(6) - ]); - }, - - /** - * 8-3 - * - * □ - * □ □ □ - * □ □ - * □ □ - * @param pictures - */ - group8Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 4), - pictures.slice(4, 6), - pictures.slice(6) - ]); - }, - - /** - * 8-4 - * - * □ □ - * □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group8Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 4), - pictures.slice(4, 6), - pictures.slice(6) - ]); - }, - - /** - * 8-5 - * - * □ □ - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group8Layout5: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 5), - pictures.slice(5) - ]); - }, - - /** - * 8-6 - * - * □ □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group8Layout6: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 5), - pictures.slice(5) - ]); - }, - - /** - * 8-7 - * - * □ □ □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group8Layout7: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 6), - pictures.slice(6) - ]); - }, - - /** - * 9-1 - * - * □ - * □ □ - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group9Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 3), - pictures.slice(3, 6), - pictures.slice(6) - ]); - }, - - /** - * 9-2 - * - * □ - * □ □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group9Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 4), - pictures.slice(4, 6), - pictures.slice(6) - ]); - }, - - /** - * 9-3 - * - * □ □ - * □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group9Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 4), - pictures.slice(4, 6), - pictures.slice(6) - ]); - }, - - /** - * 9-4 - * - * □ □ - * □ □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group9Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 4), - pictures.slice(4, 7), - pictures.slice(7) - ]); - }, - - /** - * 9-5 - * - * □ □ - * □ □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group9Layout5: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 5), - pictures.slice(5, 7), - pictures.slice(7) - ]); - }, - - /** - * 9-6 - * - * □ □ □ - * □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group9Layout6: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 5), - pictures.slice(5, 7), - pictures.slice(7) - ]); - }, - - /** - * 9-7 - * - * □ □ □ - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group9Layout7: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 6), - pictures.slice(6) - ]); - }, - - /** - * 10-1 - * - * □ - * □ □ □ - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group10Layout1: function (pictures) { - return this.getHTML([ - pictures.slice(0, 1), - pictures.slice(1, 4), - pictures.slice(4, 7), - pictures.slice(7) - ]); - }, - - /** - * 10-2 - * - * □ □ - * □ □ - * □ □ □ - * □ □ □ - * - * @param pictures - */ - group10Layout2: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 4), - pictures.slice(4, 7), - pictures.slice(7) - ]); - }, - - /** - * 10-3 - * - * □ □ - * □ □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group10Layout3: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 5), - pictures.slice(5, 7), - pictures.slice(7) - ]); - }, - - /** - * 10-4 - * - * □ □ - * □ □ □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group10Layout4: function (pictures) { - return this.getHTML([ - pictures.slice(0, 2), - pictures.slice(2, 5), - pictures.slice(5, 8), - pictures.slice(8) - ]); - }, - - /** - * 10-5 - * - * □ □ □ - * □ □ - * □ □ - * □ □ □ - * - * @param pictures - */ - group10Layout5: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 5), - pictures.slice(5, 7), - pictures.slice(7) - ]); - }, - - /** - * 10-6 - * - * □ □ □ - * □ □ - * □ □ □ - * □ □ - * - * @param pictures - */ - group10Layout6: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 5), - pictures.slice(5, 8), - pictures.slice(8) - ]); - }, - - /** - * 10-7 - * - * □ □ □ - * □ □ □ - * □ □ - * □ □ - * - * @param pictures - */ - group10Layout7: function (pictures) { - return this.getHTML([ - pictures.slice(0, 3), - pictures.slice(3, 6), - pictures.slice(6, 8), - pictures.slice(8) - ]); - }, - - /** - * Defaults Layout - * - * □ □ □ - * □ □ □ - * ... - * - * @param pictures - */ - defaults: function (pictures) { - var ROW_SIZE = 3; - var rows = pictures.length / ROW_SIZE + 1; - var pictureArr = []; - - for (var i = 0; i < rows; i++) { - pictureArr.push(pictures.slice(i * ROW_SIZE, (i + 1) * ROW_SIZE)); - } - - return this.getHTML(pictureArr); - }, - - getHTML: function (rows) { - var rowHTML = ''; - - for (var i = 0; i < rows.length; i++) { - rowHTML += this.getRowHTML(rows[i]); - } - - return '
    ' + rowHTML + '
    '; - }, - - getRowHTML: function (pictures) { - return ( - '
    ' + - this.getColumnHTML(pictures) + - '
    ' - ); - }, - - getColumnHTML: function (pictures) { - var columns = []; - var columnWidth = 100 / pictures.length; - var columnStyle = ' style="width: ' + columnWidth + '%;"'; - - for (var i = 0; i < pictures.length; i++) { - columns.push('
    ' + pictures[i] + '
    '); - } - return columns.join(''); - } -}; - -hexo.extend.tag.register('grouppicture', groupPicture, {ends: true}); -hexo.extend.tag.register('gp', groupPicture, {ends: true}); diff --git a/themes/next/scripts/tags/label.js b/themes/next/scripts/tags/label.js deleted file mode 100644 index 57e54dd..0000000 --- a/themes/next/scripts/tags/label.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * label.js | global hexo script. - * - * Usage: - * - * {% label [class]@Text %} - * - * [class] : default | primary | success | info | warning | danger. - * If not defined, default class will be selected. - */ - -function postLabel (args) { - args = args.join(' ').split('@'); - var classes = args[0] || 'default'; - var text = args[1] || ''; - - classes = classes.trim(); - !text && hexo.log.warn('Label text must be defined!'); - - return '' + text + ''; -} - -hexo.extend.tag.register('label', postLabel, { ends: false }); diff --git a/themes/next/scripts/tags/lazy-image.js b/themes/next/scripts/tags/lazy-image.js deleted file mode 100644 index 650d57a..0000000 --- a/themes/next/scripts/tags/lazy-image.js +++ /dev/null @@ -1,26 +0,0 @@ -/* global hexo */ -// Usage: {% lazyimage /path/to/image, alt, title %} -// Alias: {% li /path/to/image, alt, title %} - -function lazyImage(args) { - args = args.join(' ').split(','); - var src = args[0]; - var alt = args[1] || ''; - var title = args[2] || ''; - - if (!src) { - hexo.log.warn('Image src can NOT be empty'); - } - alt = alt.trim(); - title = title.trim(); - - var image = [' 0 && image.push('alt="' + alt + '"'); - title.length > 0 && image.push('title="' + title + '"'); - image.push('/>'); - - return image.join(' '); -} - -hexo.extend.tag.register('lazyimage', lazyImage); -hexo.extend.tag.register('li', lazyImage); diff --git a/themes/next/scripts/tags/note.js b/themes/next/scripts/tags/note.js deleted file mode 100644 index a5690a3..0000000 --- a/themes/next/scripts/tags/note.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * note.js | global hexo script. - * - * ATTENTION! No need to write this tag in 1 line if u don't want see probally bugs. - * - * Usage: - * - * {% note [class] %} - * Any content (support inline tags too). - * {% endnote %} - * - * [class] : default | primary | success | info | warning | danger. - * May be not defined. - */ - -function bscallOut (args, content) { - return '
    ' + hexo.render.renderSync({text: content, engine: 'markdown'}).trim() + '
    '; -} - -hexo.extend.tag.register('note', bscallOut, {ends: true}); diff --git a/themes/next/scripts/tags/tabs.js b/themes/next/scripts/tags/tabs.js deleted file mode 100644 index 9af8f68..0000000 --- a/themes/next/scripts/tags/tabs.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * tabs.js | global hexo script. - * - * Usage: - * - * {% tabs [Unique name], [index] %} - * - * Any content (support inline tags too). - * - * {% endtabs %} - * - * [Unique name] : Unique name of tabs block tag without comma. - * Will be used in #id's as prefix for each tab with their index numbers. - * If there are whitespaces in name, for generate #id all whitespaces will replaced by dashes. - * Only for current url of post/page must be unique! - * [index] : Index number of active tab. - * If not defined, first tab (1) will be selected. - * If index is -1, no tab will be selected. It's will be something like spoiler. - * May be not defined. - * [Tab caption] : Caption of current tab. - * If not caption specified, unique name with tab index suffix will be used as caption of tab. - * If not caption specified, but specified icon, caption will empty. - * May be not defined. - * [icon] : Font awesome icon. - * May be not defined. - */ - -'use strict'; - - function postTabs (args, content) { - var tabBlock = /\n([\w\W\s\S]*?)/g; - - var args = args.join(' ').split(','); - var tabName = args[0]; - var tabActive = args[1] || ''; - - var matches = []; - var match; - var tabId = 0; - var tabNav = ''; - var tabContent = ''; - - !tabName && hexo.log.warn('Tabs block must have unique name!'); - - while (match = tabBlock.exec(content)) { - matches.push(match[1]); - matches.push(match[2]); - } - - for (var i = 0; i < matches.length; i += 2) { - var tabParameters = matches[i].split('@'); - var postContent = matches[i + 1]; - var tabCaption = tabParameters[0] || ''; - var tabIcon = tabParameters[1] || ''; - var tabHref = ''; - - postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}); - - tabId += 1; - tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-'); - - ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId); - - var isOnlyicon = (tabIcon.length > 0 && tabCaption.length === 0) ? 'style="text-align: center;' : ''; - tabIcon.length > 0 && (tabIcon = ''); - - var isActive = ((tabActive.length > 0 && tabActive == tabId) || (tabActive.length === 0 && tabId == 1)) ? ' active' : ''; - tabNav += '
  • ' + tabIcon + tabCaption + '
  • '; - tabContent += '
    ' + postContent + '
    '; - } - - tabNav = ''; - tabContent = '
    ' + tabContent + '
    '; - - return '
    ' + tabNav + tabContent + '
    '; - } - - hexo.extend.tag.register('tabs', postTabs, {ends: true}); diff --git a/themes/next/source/css/_common/components/back-to-top-sidebar.styl b/themes/next/source/css/_common/components/back-to-top-sidebar.styl deleted file mode 100644 index ab797f3..0000000 --- a/themes/next/source/css/_common/components/back-to-top-sidebar.styl +++ /dev/null @@ -1,25 +0,0 @@ -.back-to-top { - display: none; - margin: 15px -10px -20px; - background: $body-bg-color; - font-size: $b2t-font-size; - opacity: $b2t-opacity; - cursor: pointer; - text-align: center; - -webkit-transform: translateZ(0); - the-transition(); - &:hover { opacity: 0.8; } - - +tablet() { - fixbutton() if hexo-config('sidebar.onmobile'); - hide() if not hexo-config('sidebar.onmobile'); - } - +mobile() { - fixbutton() if hexo-config('sidebar.onmobile'); - hide() if not hexo-config('sidebar.onmobile'); - } - - &.back-to-top-on { - display: block; - } -} diff --git a/themes/next/source/css/_common/components/back-to-top.styl b/themes/next/source/css/_common/components/back-to-top.styl deleted file mode 100644 index 1ae463a..0000000 --- a/themes/next/source/css/_common/components/back-to-top.styl +++ /dev/null @@ -1,31 +0,0 @@ -.back-to-top { - box-sizing: border-box; - position: fixed; - bottom: $b2t-position-bottom; - right: $b2t-position-right; - z-index: $zindex-5; - padding: 0 6px; - width: hexo-config('sidebar.scrollpercent') ? initial : 24px; - background: $b2t-bg-color; - font-size: $b2t-font-size; - opacity: $b2t-opacity; - color: $b2t-color; - cursor: pointer; - text-align: center; - -webkit-transform: translateZ(0); - transition-property: bottom; - the-transition(); - - +tablet() { - fixbutton() if hexo-config('sidebar.onmobile'); - hide() if not hexo-config('sidebar.onmobile'); - } - +mobile() { - fixbutton() if hexo-config('sidebar.onmobile'); - hide() if not hexo-config('sidebar.onmobile'); - } - - &.back-to-top-on { - bottom: $b2t-position-bottom-on; - } -} diff --git a/themes/next/source/css/_common/components/buttons.styl b/themes/next/source/css/_common/components/buttons.styl deleted file mode 100644 index e0d08f6..0000000 --- a/themes/next/source/css/_common/components/buttons.styl +++ /dev/null @@ -1,28 +0,0 @@ -.btn { - display: inline-block; - padding: 0 20px; - font-size: $btn-default-font-size; - color: $btn-default-color; - background: $btn-default-bg; - border: $btn-default-border-width solid $btn-default-border-color; - text-decoration: none; - border-radius: $btn-default-radius; - transition-property: background-color; - the-transition(); - - &:hover { - border-color: $btn-default-hover-border-color; - color: $btn-default-hover-color; - background: $btn-default-hover-bg; - } -} - -.btn-bar { - display: block; - width: 22px; - height: 2px; - background: $text-color; - border-radius: 1px; - - &+.btn-bar { margin-top: 4px; } -} diff --git a/themes/next/source/css/_common/components/comments.styl b/themes/next/source/css/_common/components/comments.styl deleted file mode 100644 index bf3edb9..0000000 --- a/themes/next/source/css/_common/components/comments.styl +++ /dev/null @@ -1 +0,0 @@ -.comments { margin: 60px 20px 0; } diff --git a/themes/next/source/css/_common/components/components.styl b/themes/next/source/css/_common/components/components.styl deleted file mode 100644 index fe4a160..0000000 --- a/themes/next/source/css/_common/components/components.styl +++ /dev/null @@ -1,16 +0,0 @@ -@import "highlight"; -@import "tags"; - -@import "buttons"; -@import "pagination"; -@import "comments"; -@import "tag-cloud"; -@import hexo-config('sidebar.b2t') ? "back-to-top-sidebar" : "back-to-top"; - -@import "header"; -@import "post"; -@import "sidebar"; -@import "footer"; -@import "third-party"; - -@import "pages"; diff --git a/themes/next/source/css/_common/components/footer/footer.styl b/themes/next/source/css/_common/components/footer/footer.styl deleted file mode 100644 index 550704b..0000000 --- a/themes/next/source/css/_common/components/footer/footer.styl +++ /dev/null @@ -1,39 +0,0 @@ -.footer { - font-size: 14px; - color: $grey-dark; - - img { border: none; } -} - -.footer-inner { text-align: center; } - -.with-love { - display: inline-block; - margin: 0 5px; -} - -.powered-by, -.theme-info { display: inline-block; } - -.powered-by { - margin-right: 10px; - - &::after { - content: "|"; - padding-left: 10px; - } -} - -.cc-license { - margin-top: 10px; - text-align: center; - - .cc-opacity { - opacity: 0.7; - border-bottom: none; - - &:hover { opacity: 0.9; } - } - - img { display: inline-block; } -} diff --git a/themes/next/source/css/_common/components/header/header.styl b/themes/next/source/css/_common/components/header/header.styl deleted file mode 100644 index 01f7f8a..0000000 --- a/themes/next/source/css/_common/components/header/header.styl +++ /dev/null @@ -1,9 +0,0 @@ -.header { background: $head-bg; } - -.header-inner { position: relative; } - - -@import "headerband"; -@import "site-meta"; -@import "site-nav"; -@import "menu"; diff --git a/themes/next/source/css/_common/components/header/headerband.styl b/themes/next/source/css/_common/components/header/headerband.styl deleted file mode 100644 index 382dbd9..0000000 --- a/themes/next/source/css/_common/components/header/headerband.styl +++ /dev/null @@ -1,4 +0,0 @@ -.headband { - height: $headband-height; - background: $headband-bg; -} diff --git a/themes/next/source/css/_common/components/header/menu.styl b/themes/next/source/css/_common/components/header/menu.styl deleted file mode 100644 index d2b0f05..0000000 --- a/themes/next/source/css/_common/components/header/menu.styl +++ /dev/null @@ -1,32 +0,0 @@ -// Menu -// -------------------------------------------------- -.menu { - margin-top: 20px; - padding-left: 0; - text-align: center; -} - -.menu .menu-item { - display: inline-block; - margin: 0 10px; - list-style: none; - - @media screen and (max-width: 767px) { - margin-top: 10px; - } - - a { - display: block; - font-size: 13px; - line-height: inherit; - border-bottom: 1px solid $menu-link-border; - transition-property: border-color; - the-transition(); - - &:hover { border-bottom-color: $menu-link-hover-border; } - } - - .fa { margin-right: 5px; } -} - -.use-motion .menu-item { opacity: 0; } diff --git a/themes/next/source/css/_common/components/header/site-meta.styl b/themes/next/source/css/_common/components/header/site-meta.styl deleted file mode 100644 index efe31ec..0000000 --- a/themes/next/source/css/_common/components/header/site-meta.styl +++ /dev/null @@ -1,48 +0,0 @@ -.site-meta { - margin: 0; - text-align: $site-meta-text-align; - - +mobile() { text-align: center; } -} - -.brand { - position: relative; - display: inline-block; - padding: 0 40px; - color: $brand-color; - background: $brand-bg; - border-bottom: none; - &:hover { color: $brand-hover-color; } -} - -.logo { - display: inline-block; - margin-right: 5px; - line-height: 36px; - vertical-align: top; -} - -.site-title { - display: inline-block; - vertical-align: top; - line-height: 36px; - font-size: $logo-font-size; - font-weight: normal; - font-family: $font-family-logo; -} - -.site-subtitle { - margin-top: 10px; - font-size: $subtitle-font-size; - color: $subtitle-color; -} - -.use-motion { - .brand { opacity: 0; } - - .logo, .site-title, .site-subtitle { - opacity: 0; - position: relative; - top: -10px; - } -} diff --git a/themes/next/source/css/_common/components/header/site-nav.styl b/themes/next/source/css/_common/components/header/site-nav.styl deleted file mode 100644 index c6446e7..0000000 --- a/themes/next/source/css/_common/components/header/site-nav.styl +++ /dev/null @@ -1,28 +0,0 @@ -.site-nav-toggle { - display: none; - position: absolute; - top: 10px; - left: 10px; - +mobile() { - display: block; - } - - button { - margin-top: 2px; - padding: 9px 10px; - background: transparent; - border: none; - } -} - -.site-nav { - +mobile() { - display: none; - margin: 0 -10px; - padding: 0 10px; - clear: both; - border-top: 1px solid $gray-lighter; - } - +tablet() { display: block !important; } - +desktop() { display: block !important; } -} diff --git a/themes/next/source/css/_common/components/highlight/diff.styl b/themes/next/source/css/_common/components/highlight/diff.styl deleted file mode 100644 index f779499..0000000 --- a/themes/next/source/css/_common/components/highlight/diff.styl +++ /dev/null @@ -1,8 +0,0 @@ -$highlight_theme = hexo-config("highlight_theme") - -if $highlight_theme == "normal" - $highlight-deletion = #fdd - $highlight-addition = #dfd -else - $highlight-deletion = #008000 - $highlight-addition = #800000 diff --git a/themes/next/source/css/_common/components/highlight/highlight.styl b/themes/next/source/css/_common/components/highlight/highlight.styl deleted file mode 100644 index 2cb961d..0000000 --- a/themes/next/source/css/_common/components/highlight/highlight.styl +++ /dev/null @@ -1,176 +0,0 @@ -// https://github.com/chriskempson/tomorrow-theme - -@require "theme" -@require "diff" - -// Placeholder: $code-block -$code-block { - overflow: auto; - margin: 20px 0; - padding: 0; - font-size $code-font-size; - color: $highlight-foreground; - background: $highlight-background; - line-height: $line-height-code-block; -} - -pre, code { font-family: $code-font-family; } - -code { - padding: 2px 4px; - word-wrap: break-word; - color: $code-foreground; - background: $code-background; - border-radius: $code-border-radius; - font-size $code-font-size; -} - -pre { - @extend $code-block; - - code { - padding: 0; - color: $highlight-foreground; - background: none; - text-shadow: none; - } -} - -.highlight { - @extend $code-block; - border-radius: 1px - - pre { - border: none; - margin: 0; - padding: 10px 0; - } - - table { - margin: 0; - width: auto; - border: none; - } - - td { - border: none; - padding: 0; - } - - figcaption { - clearfix(); - font-size: 1em; - color: $highlight-foreground; - line-height: 1em; - margin-bottom: 1em; - - a { - float: right; - color: $highlight-foreground; - - &:hover { border-bottom-color: $highlight-foreground; } - } - } - - .gutter pre { - padding-left: 10px - padding-right: 10px - color: $highlight-gutter.color - text-align: right - background-color: $highlight-gutter.bg-color - } - - .code pre { - width: 100% - padding-left: 10px - padding-right: 10px - background-color: $highlight-background - } - - .line { height: 20px; } -} - - -.gutter { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.gist table { - width: auto; - - td { border: none; } -} - -// For diff highlight -pre .deletion { background: $highlight-deletion; } -pre .addition { background: $highlight-addition; } -pre .meta { color: $highlight-purple; } - -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 - .command { - color: $highlight-orange; - } - - .ruby .class .title - .css .rules .attribute - .string - .value - .inheritance - .header - .ruby .symbol - .xml .cdata - .special - .number - .formula { - 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; - } - -} diff --git a/themes/next/source/css/_common/components/highlight/theme.styl b/themes/next/source/css/_common/components/highlight/theme.styl deleted file mode 100644 index ff1f4be..0000000 --- a/themes/next/source/css/_common/components/highlight/theme.styl +++ /dev/null @@ -1,92 +0,0 @@ -$highlight_theme = hexo-config("highlight_theme") - - -if $highlight_theme == "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 - $highlight-gutter = { - color: #869194, - bg-color: #eff2f3 - } - -if $highlight_theme == "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 - $highlight-gutter = { - color: lighten($highlight-background, 50%), - bg-color: darken($highlight-background, 100%) - } - -if $highlight_theme == "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 - $highlight-gutter = { - color: $highlight-comment, - bg-color: darken($highlight-background, 40%) - } - -if $highlight_theme == "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 - $highlight-gutter = { - color: $highlight-comment, - bg-color: darken($highlight-background, 60%) - } - -if $highlight_theme == "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 - $highlight-gutter = { - color: lighten($highlight-background, 40%), - bg-color: lighten($highlight-background, 16%) - } diff --git a/themes/next/source/css/_common/components/pages/archive.styl b/themes/next/source/css/_common/components/pages/archive.styl deleted file mode 100644 index a6f36d8..0000000 --- a/themes/next/source/css/_common/components/pages/archive.styl +++ /dev/null @@ -1,33 +0,0 @@ -.use-motion { - .post { opacity: 0; } -} - -.page-archive { - - .archive-page-counter { - position: relative; - top: 3px; - left: 20px; - - +mobile() { - top: 5px; - } - } - - .posts-collapse { - - .archive-move-on { - position: absolute; - top: 11px; - left: 0; - margin-left: -6px; - width: 10px; - height: 10px; - opacity: 0.5; - background: $black-light; - border: 1px solid white; - - circle(); - } - } -} diff --git a/themes/next/source/css/_common/components/pages/categories.styl b/themes/next/source/css/_common/components/pages/categories.styl deleted file mode 100644 index db3bb10..0000000 --- a/themes/next/source/css/_common/components/pages/categories.styl +++ /dev/null @@ -1,27 +0,0 @@ -.category-all-page { - .category-all-title { text-align: center; } - - .category-all { margin-top: 20px; } - - .category-list { - margin: 0; - padding: 0; - list-style: none; - } - - .category-list-item { margin: 5px 10px; } - - .category-list-count { - color: $grey; - &:before { - display: inline; - content: " (" - } - &:after { - display: inline; - content: ") " - } - } - - .category-list-child { padding-left: 10px; } -} diff --git a/themes/next/source/css/_common/components/pages/pages.styl b/themes/next/source/css/_common/components/pages/pages.styl deleted file mode 100644 index cb14d04..0000000 --- a/themes/next/source/css/_common/components/pages/pages.styl +++ /dev/null @@ -1,6 +0,0 @@ -// Page specific styles - -@import "archive"; -@import "categories"; -@import "schedule"; -@import "post-detail"; diff --git a/themes/next/source/css/_common/components/pages/post-detail.styl b/themes/next/source/css/_common/components/pages/post-detail.styl deleted file mode 100644 index 3f26afd..0000000 --- a/themes/next/source/css/_common/components/pages/post-detail.styl +++ /dev/null @@ -1,6 +0,0 @@ -.page-post-detail { - - .sidebar-toggle-line { background: $sidebar-highlight; } - - .comments { overflow: hidden; } -} diff --git a/themes/next/source/css/_common/components/pages/schedule.styl b/themes/next/source/css/_common/components/pages/schedule.styl deleted file mode 100644 index 18ec933..0000000 --- a/themes/next/source/css/_common/components/pages/schedule.styl +++ /dev/null @@ -1,101 +0,0 @@ -@keyframes dot-flash { - from {opacity: 1; transform:scale(1.1);} - to {opacity: 0; transform:scale(1);} -} - -#schedule { - ul#event-list { - padding-left: 30px - hr { - margin: 20px 0 45px 0!important - background: #222 - &:after { - display: inline-block - content: 'NOW' - background: #222 - color: #FFF - font-weight:bold - text-align: right - padding: 0 5px - } - } - li.event { - margin: 20px 0px - background: #F9F9F9 - padding-left: 10px - min-height: 40px - h2.event-summary { - margin: 0 - padding-bottom: 3px - &:before { - display: inline-block - font-family: FontAwesome - font-size: 8px - content: '\f111' - vertical-align: middle - margin-right: 25px - color: #bbb - } - } - span.event-relative-time { - display: inline-block - font-size: 12px - font-weight: 400 - padding-left: 12px - color: #bbb - } - span.event-details { - display: block - color: #bbb - margin-left: 56px - padding-top: 3px - padding-bottom: 6px - text-indent: -24px - line-height: 18px - &:before { - text-indent: 0 - display: inline-block - width: 14px - font-family: FontAwesome - text-align: center - margin-right: 9px - color: #bbb - } - &.event-location:before { - content: '\f041' - } - &.event-duration:before { - content: '\f017' - } - } - } - li.event-past { - background: #FCFCFC - & > * { - opacity: .6 - } - h2.event-summary { - color: #bbb - &:before { - color: #DFDFDF - } - } - } - li.event-now { - background: #222 - color: #FFF - padding: 15px 0 15px 10px - h2.event-summary { - &:before { - transform: scale(1.2) - color: #FFF - animation: dot-flash 1s alternate infinite ease-in-out; - } - } - * { - color: #FFF!important - } - } - } -} - diff --git a/themes/next/source/css/_common/components/pagination.styl b/themes/next/source/css/_common/components/pagination.styl deleted file mode 100644 index 43455b0..0000000 --- a/themes/next/source/css/_common/components/pagination.styl +++ /dev/null @@ -1,56 +0,0 @@ -.pagination { - margin: 120px 0 40px; - text-align: center; - border-top: 1px solid $pagination-border; -} - -.page-number-basic { - display: inline-block; - position: relative; - top: -1px; - margin: 0 10px; - padding: 0 10px; - line-height: 30px; - - +mobile() { margin: 0 5px; } -} - -.pagination { - .prev, .next, .page-number { - @extend .page-number-basic; - border-bottom: 0; - border-top: 1px solid $pagination-link-border; - transition-property: border-color; - the-transition(); - - &:hover { border-top-color: $pagination-link-hover-border; } - } - - .space { - @extend .page-number-basic; - padding: 0; - margin: 0; - } - - .prev { margin-left: 0; } - .next { margin-right: 0; } - - .page-number.current { - color: $pagination-active-color; - background: $pagination-active-bg; - border-top-color: $pagination-active-border; - } -} - -@media (max-width: 767px) - .pagination { border-top: none; } - - .pagination { - .prev, .next, .page-number { - margin-bottom: 10px; - border-top: 0; - border-bottom: 1px solid $pagination-link-border; - - &:hover { border-bottom-color: $pagination-link-hover-border; } - } - } diff --git a/themes/next/source/css/_common/components/post/post-button.styl b/themes/next/source/css/_common/components/post/post-button.styl deleted file mode 100644 index a0246d7..0000000 --- a/themes/next/source/css/_common/components/post/post-button.styl +++ /dev/null @@ -1,19 +0,0 @@ -.post-button { - margin-top: 50px; - - .btn { - color: $read-more-color; - font-size: $read-more-font-size; - background: $read-more-bg-color; - border-radius: $read-more-border-radius; - line-height: 2; - margin: 0 4px 8px 4px; - } - .btn:hover { - @extend .btn:hover; - } - .fa-fw { - width: (18em / 14); - text-align: left; - } -} diff --git a/themes/next/source/css/_common/components/post/post-collapse.styl b/themes/next/source/css/_common/components/post/post-collapse.styl deleted file mode 100644 index 6633a45..0000000 --- a/themes/next/source/css/_common/components/post/post-collapse.styl +++ /dev/null @@ -1,111 +0,0 @@ -// TODO: Refactor. - -@media (max-width: 767px) { - .posts-collapse { - margin: 0 20px; - - .post-title, .post-meta { - display: block; - width: auto; - text-align: left; - } - } -} - -.posts-collapse { - position: relative; - z-index: $zindex-1; - - &::after { - content: " "; - position: absolute; - top: 20px; - left: 0; - margin-left: -2px; - width: 4px; - height: 100%; - background: $whitesmoke; - z-index: $zindex-bottom; - } - - margin-left: $posts-collapse-left; - +mobile() { margin: 0 20px; } - - .collection-title { - position: relative; - margin: 60px 0; - - h1, h2 { margin-left: 20px; } - - small { color: $grey; margin-left: 5px; } - - &::before { - content: " "; - position: absolute; - left: 0; - top: 50%; - margin-left: -4px; - margin-top: -4px; - width: 8px; - height: 8px; - background: $grey; - circle(); - } - } - - .post { margin: 30px 0; } - - .post-header { - position: relative; - the-transition(); - transition-property: border; - border-bottom: 1px dashed $grey-light; - - &::before { - content: " "; - position: absolute; - left: 0; - top: 12px; - width: 6px; - height: 6px; - margin-left: -4px; - background: $grey; - circle(); - border: 1px solid white; - the-transition(); - transition-property: background; - } - } - - .post-header:hover { - border-bottom-color: $grey-dim; - - &::before { background: $black-deep; } - } - - .post-meta { - position: absolute; - font-size: 12px; - left: 20px; - top: 5px; - } - - .post-comments-count { display: none; } - - .post-title { - margin-left: 60px; - font-size: 16px; - font-weight: normal; - line-height: inherit; - - &::after { - margin-left: 3px; - opacity: 0.6; - } - - a { - color: $grey-dim; - border-bottom: none; - } - } -} diff --git a/themes/next/source/css/_common/components/post/post-copyright.styl b/themes/next/source/css/_common/components/post/post-copyright.styl deleted file mode 100644 index f1cc7cb..0000000 --- a/themes/next/source/css/_common/components/post/post-copyright.styl +++ /dev/null @@ -1,7 +0,0 @@ -.post-copyright { - margin: $post-copyright.margin; - padding: $post-copyright.padding; - border-left: $post-copyright.border.width $post-copyright.border.style $post-copyright.border.color; - background-color: $post-copyright.bg; - list-style: none; -} diff --git a/themes/next/source/css/_common/components/post/post-eof.styl b/themes/next/source/css/_common/components/post/post-eof.styl deleted file mode 100644 index e430325..0000000 --- a/themes/next/source/css/_common/components/post/post-eof.styl +++ /dev/null @@ -1,17 +0,0 @@ -.posts-expand { - .post-eof { - display: block; - margin: $post-eof-margin-top auto $post-eof-margin-bottom; - width: 8%; - height: 1px; - background: $grey-light; - text-align: center; - } -} - - -.post:last-child { - .post-eof.post-eof.post-eof { - display: none; - } -} diff --git a/themes/next/source/css/_common/components/post/post-expand.styl b/themes/next/source/css/_common/components/post/post-expand.styl deleted file mode 100644 index bb99b7d..0000000 --- a/themes/next/source/css/_common/components/post/post-expand.styl +++ /dev/null @@ -1,65 +0,0 @@ -// TODO: Refactor. - -.posts-expand { - padding-top: 40px; -} - -@media (max-width: 767px) { - .posts-expand { - margin: 0 20px; - } - - .post-body { - pre { - padding: 10px; - .gutter pre { - padding-right: 10px; - } - } - - .highlight { - margin-left: 0px; - margin-right: 0px; - padding: 0; - .gutter pre { - padding-right: 10px; - } - } - } -} - -.posts-expand .post-body { - +desktop() { text-align: justify; } - - - h2, h3, h4, h5, h6 { - padding-top: 10px; - - .header-anchor{ - float: right; - margin-left: 10px; - color: $grey-light; - border-bottom-style: none; - visibility: hidden; - - &:hover{ - color: inherit; - } - } - - &:hover .header-anchor{ - visibility: visible; - } - } - - ul li { list-style: circle; } - - img { - box-sizing: border-box; - margin: auto; - padding: 3px; - border: 1px solid $gray-lighter; - } -} - -.posts-expand .fancybox img { margin: 0 auto; } diff --git a/themes/next/source/css/_common/components/post/post-gallery.styl b/themes/next/source/css/_common/components/post/post-gallery.styl deleted file mode 100644 index b2385ae..0000000 --- a/themes/next/source/css/_common/components/post/post-gallery.styl +++ /dev/null @@ -1,23 +0,0 @@ -.post-gallery { - display: table; - table-layout: fixed; - width: 100%; - border-collapse: separate; -} - -.post-gallery-row { display: table-row; } - -.post-gallery .post-gallery-img { - display: table-cell; - text-align: center; - vertical-align: middle; - border: none; -} - -.post-gallery .post-gallery-img img { - max-width: 100%; - max-height: 100%; - border: none; -} - -.fancybox-close, .fancybox-close:hover { border: none; } diff --git a/themes/next/source/css/_common/components/post/post-meta.styl b/themes/next/source/css/_common/components/post/post-meta.styl deleted file mode 100644 index 8d07e41..0000000 --- a/themes/next/source/css/_common/components/post/post-meta.styl +++ /dev/null @@ -1,49 +0,0 @@ -.posts-expand .post-meta { - margin: 3px 0 60px 0; - color: $grey-dark; - font-family: $font-family-posts; - font-size: 12px; - text-align: center; - - .post-category-list { - display: inline-block; - margin: 0; - padding: 3px; - } - .post-category-list-link { color: $grey-dark; } - - .post-description { - font-size: 14px; - margin-top: 2px; - } -} - -.post-wordcount { - display: inline-block; -} - -.post-meta-divider { - margin: 0 .5em; -} - -.post-meta-item-icon { - margin-right: 3px; - +tablet() { - display: inline-block; - } - +mobile() { - display: inline-block; - } -} -.post-meta-item-text { - +tablet() { - display: none; - } - +mobile() { - display: none; - } -} - -.posts-expand .post-comments-count { - +mobile() { display: none; } -} diff --git a/themes/next/source/css/_common/components/post/post-nav.styl b/themes/next/source/css/_common/components/post/post-nav.styl deleted file mode 100644 index fa85838..0000000 --- a/themes/next/source/css/_common/components/post/post-nav.styl +++ /dev/null @@ -1,57 +0,0 @@ -.post-nav { - display: table; - margin-top: 15px; - width: 100%; - border-top: 1px solid $gainsboro; -} - -.post-nav-divider { - display: table-cell; - width: 10%; -} - -.post-nav-item { - display: table-cell; - padding: 10px 0 0 0; - width: 45%; - vertical-align: top; - - a { - position: relative; - display: block; - line-height: 25px; - font-size: 14px; - color: $link-color; - border-bottom: none; - - &:hover { - color: $link-hover-color; - border-bottom: none; - } - - &:active { top: 2px; } - } - - .fa { - position: absolute; - top: 8px; - left: 0; - font-size: 12px; - } - -} - -.post-nav-next { - a { padding-left: 15px; } -} - -.post-nav-prev { - text-align: right; - - a { padding-right: 15px; } - - .fa { - right: 0; - left: auto; - } -} diff --git a/themes/next/source/css/_common/components/post/post-reward.styl b/themes/next/source/css/_common/components/post/post-reward.styl deleted file mode 100644 index 9e1b8f2..0000000 --- a/themes/next/source/css/_common/components/post/post-reward.styl +++ /dev/null @@ -1,64 +0,0 @@ -#rewardButton { - cursor: pointer; - border: 0; - outline: 0; - border-radius: 100%; - padding: 0; - margin: 0; - letter-spacing: normal; - text-transform: none; - text-indent: 0px; - text-shadow: none; -} -#rewardButton span { - display: inline-block; - width: 80px; - height: 35px; - border-radius: 5px; - color: #fff; - font-weight: 400; - font-style: normal; - font-variant: normal; - font-stretch: normal; - font-size: 18px; - font-family: "Microsoft Yahei"; - background: #F44336; -} -#rewardButton span:hover{ - background: #F7877F; -} -#QR{ - padding-top:20px; -} -#QR a{ - border:0; -} -#QR img{ - width: 180px; - max-width: 100%; - display: inline-block; - margin: 0.8em 2em 0 2em; -} -#wechat:hover p{ - animation: roll 0.1s infinite linear; - -webkit-animation: roll 0.1s infinite linear; - -moz-animation: roll 0.1s infinite linear; -} -#alipay:hover p{ - animation: roll 0.1s infinite linear; - -webkit-animation: roll 0.1s infinite linear; - -moz-animation: roll 0.1s infinite linear; -} -#bitcoin:hover p { - animation: roll 0.1s infinite linear; - -webkit-animation: roll 0.1s infinite linear; - -moz-animation: roll 0.1s infinite linear; -} -@keyframes roll { - from { - transform(rotateZ(30deg)); - } - to { - transform(rotateZ(-30deg)); - } -} diff --git a/themes/next/source/css/_common/components/post/post-rtl.styl b/themes/next/source/css/_common/components/post/post-rtl.styl deleted file mode 100644 index ea048b9..0000000 --- a/themes/next/source/css/_common/components/post/post-rtl.styl +++ /dev/null @@ -1,11 +0,0 @@ -.rtl { - &.post-body { - p, a, h1, h2, h3, h4, h5, h6, li, ul, ol { - direction: rtl; - font-family: UKIJ Ekran; - } - } - &.post-title { - font-family: UKIJ Ekran; - } -} diff --git a/themes/next/source/css/_common/components/post/post-tags.styl b/themes/next/source/css/_common/components/post/post-tags.styl deleted file mode 100644 index 8c04ec7..0000000 --- a/themes/next/source/css/_common/components/post/post-tags.styl +++ /dev/null @@ -1,10 +0,0 @@ -.posts-expand .post-tags { - margin-top: 40px; - text-align: center; - - a { - display: inline-block; - margin-right: 10px; - font-size: 13px; - } -} diff --git a/themes/next/source/css/_common/components/post/post-title.styl b/themes/next/source/css/_common/components/post/post-title.styl deleted file mode 100644 index 0e651dc..0000000 --- a/themes/next/source/css/_common/components/post/post-title.styl +++ /dev/null @@ -1,38 +0,0 @@ -.posts-expand .post-title { - font-size: 26px; - text-align: center; - word-break: break-word; - font-weight: $posts-expand-title-font-weight - - +mobile() { - font-size: 22px; - } -} -.posts-expand .post-title-link { - display: inline-block; - position: relative; - color: $black-light; - border-bottom: none; - line-height: 1.2; - vertical-align: top; - - &::before { - content: ""; - position: absolute; - width: 100%; - height: 2px; - bottom: 0; - left: 0; - background-color: #000; - visibility: hidden; - transform: scaleX(0); - the-transition(); - } - - &:hover::before { - visibility: visible; - transform: scaleX(1); - } - - .fa { font-size: 16px; } -} diff --git a/themes/next/source/css/_common/components/post/post-type.styl b/themes/next/source/css/_common/components/post/post-type.styl deleted file mode 100644 index c3d2510..0000000 --- a/themes/next/source/css/_common/components/post/post-type.styl +++ /dev/null @@ -1,14 +0,0 @@ -// TODO: Refactor. - -.page-home, .page-post-detail { - .post-type-quote { - .post-header, - .post-tags { - display: none; - } - - blockquote { - @extend .blockquote-center - } - } -} diff --git a/themes/next/source/css/_common/components/post/post-widgets.styl b/themes/next/source/css/_common/components/post/post-widgets.styl deleted file mode 100644 index de5cb9d..0000000 --- a/themes/next/source/css/_common/components/post/post-widgets.styl +++ /dev/null @@ -1,36 +0,0 @@ -.post-widgets { - border-top: 1px solid #eee; - padding-top: 9px; - margin-top: 45px; - display: flex; - justify-content: center; - flex-wrap: wrap; - align-items: center; -} - -.wp_rating { - height: 20px; - margin-right: 10px; - text-align: center; - line-height: 20px; - padding-top: 6px; -} - -.social-like { - font-size: 14px; - text-align: center; - display: flex; - justify-content: center; -} - -.vk_like { - width: 85px; - height: 21px; - padding-top: 7px; - align-self: center; -} - -.fb_like { - height: 30px; - align-self: center; -} diff --git a/themes/next/source/css/_common/components/post/post-wordcount.styl b/themes/next/source/css/_common/components/post/post-wordcount.styl deleted file mode 100644 index 51fd9c0..0000000 --- a/themes/next/source/css/_common/components/post/post-wordcount.styl +++ /dev/null @@ -1,3 +0,0 @@ -.post-wordcount { - display: inline-block; -} diff --git a/themes/next/source/css/_common/components/post/post.styl b/themes/next/source/css/_common/components/post/post.styl deleted file mode 100644 index 1b73e14..0000000 --- a/themes/next/source/css/_common/components/post/post.styl +++ /dev/null @@ -1,50 +0,0 @@ -.post-body { - font-family: $font-family-posts; - +mobile() { - word-break: break-word; - } -} - -.post-body .fancybox img { - display: block !important; - margin: 0 auto; - cursor: pointer; - cursor: zoom-in; - cursor: -webkit-zoom-in; -} - -.post-body .image-caption { - margin: 10px auto 15px; - text-align: center; - font-size: $font-size-base; - color: $grey-dark; - font-weight: bold; - line-height: 1; -} - -.post-body .figure .caption { - @extend .post-body .image-caption; -} - -.post-sticky-flag { - display: inline-block; - font-size: 16px; - -ms-transform: rotate(30deg); - transform: rotate(30deg); -} - -@import "post-expand"; -@import "post-collapse"; -@import "post-type"; -@import "post-title"; -@import "post-meta"; -@import "post-button"; -@import "post-tags"; -@import "post-nav"; -@import "post-eof"; -@import "post-gallery"; -@import "post-reward" if hexo-config('alipay') or hexo-config('wechatpay') or hexo-config('bitcoin'); -@import "post-copyright" if hexo-config('post_copyright.enable'); -@import "post-wordcount" if !hexo-config('post_wordcount.separated_meta'); -@import "post-widgets" if (hexo-config('facebook_sdk.enable') and hexo-config('facebook_sdk.like_button')) or (hexo-config('vkontakte_api.enable') and hexo-config('vkontakte_api.like')) or hexo-config('rating.enable'); -@import "post-rtl"; diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-author-links.styl b/themes/next/source/css/_common/components/sidebar/sidebar-author-links.styl deleted file mode 100644 index 1708cbf..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-author-links.styl +++ /dev/null @@ -1,26 +0,0 @@ -.links-of-author { - margin-top: 20px; - display: flex; - flex-wrap: wrap; - justify-content: center; -} - -.links-of-author a { - display: inline-block; - vertical-align: middle; - margin-right: 10px; - margin-bottom: 10px; - border-bottom-color: $black-light; - font-size: 13px; - - &:before { - display: inline-block; - vertical-align: middle; - margin-right: 3px; - content: " "; - width: 4px; - height: 4px; - border-radius: 50%; - background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%); - } -} diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-author.styl b/themes/next/source/css/_common/components/sidebar/sidebar-author.styl deleted file mode 100644 index 14ac717..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-author.styl +++ /dev/null @@ -1,22 +0,0 @@ -.site-author-image { - display: block; - margin: 0 auto; - padding: $site-author-image-padding; - max-width: $site-author-image-width; - height: $site-author-image-height; - border: $site-author-image-border-width solid $site-author-image-border-color; -} - -.site-author-name { - margin: $site-author-name-margin; - text-align: $site-author-name-align; - color: $site-author-name-color; - font-weight: $site-author-name-weight; -} - -.site-description { - margin-top: $site-description-margin-top; - text-align: $site-description-align; - font-size: $site-description-font-size; - color: $site-description-color; -} diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-blogroll.styl b/themes/next/source/css/_common/components/sidebar/sidebar-blogroll.styl deleted file mode 100644 index 4769d5e..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-blogroll.styl +++ /dev/null @@ -1,14 +0,0 @@ -.links-of-blogroll { font-size: 13px; } - -.links-of-blogroll-title { - margin-top: 20px; - font-size: 14px; - font-weight: $font-weight-bold; -} -.links-of-blogroll-list { - margin: 0; - padding: 0; - list-style: none; -} - -.links-of-blogroll-item { padding: 2px 10px; } diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-dimmer.styl b/themes/next/source/css/_common/components/sidebar/sidebar-dimmer.styl deleted file mode 100644 index b2da3ce..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-dimmer.styl +++ /dev/null @@ -1,21 +0,0 @@ -.sidebar-active #sidebar-dimmer { - opacity: .7; - -webkit-transform: translateX(-150%); - transform: translateX(-150%); - transition: opacity .2s; -} - -#sidebar-dimmer { - display: none; - position: absolute; - top: 0; - left: 100%; - width: 200%; - height: 100%; - background: #000; - opacity: 0; - transition: opacity .2s,transform 0s .2s; - +mobile() { - display: block; - } -} diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-feed-link.styl b/themes/next/source/css/_common/components/sidebar/sidebar-feed-link.styl deleted file mode 100644 index b3868a8..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-feed-link.styl +++ /dev/null @@ -1,23 +0,0 @@ -.feed-link { - margin-top: 20px; - - a { - display: inline-block; - padding: 0 15px; - color: rgb(252, 100, 35); - border: 1px solid rgb(252, 100, 35); - border-radius: 4px; - - i { - color: rgb(252, 100, 35); - font-size: 14px; - } - - &:hover { - color:white; - background: rgb(252, 100, 35); - - i { color: white; } - } - } -} diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-nav.styl b/themes/next/source/css/_common/components/sidebar/sidebar-nav.styl deleted file mode 100644 index 973eda7..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-nav.styl +++ /dev/null @@ -1,29 +0,0 @@ -// Sidebar Navigation - -.sidebar-nav { - margin: 0 0 20px; - padding-left: 0; -} -.sidebar-nav li { - display: inline-block; - cursor: pointer; - border-bottom: 1px solid transparent; - font-size: 14px; - color: $sidebar-nav-color; - - &:hover { color: $sidebar-nav-hover-color; } -} - -.page-post-detail .sidebar-nav-toc { padding: 0 5px; } - -.page-post-detail .sidebar-nav-overview { margin-left: 10px; } - -.sidebar-nav .sidebar-nav-active { - color: $sidebar-highlight; - border-bottom-color: $sidebar-highlight; - - &:hover { color: $sidebar-highlight; } -} - -.sidebar-panel { display: none; } -.sidebar-panel-active { display: block; } diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-toc.styl b/themes/next/source/css/_common/components/sidebar/sidebar-toc.styl deleted file mode 100644 index 552275a..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-toc.styl +++ /dev/null @@ -1,59 +0,0 @@ - -.post-toc-empty { - font-size: 14px; - color: $grey-dim; -} - -.post-toc-wrap { overflow: hidden; } - -.post-toc { overflow: auto; } - -.post-toc ol { - margin: 0; - padding: 0 2px 5px 10px; - text-align: left; - list-style: none; - font-size: 14px; - - & > ol { padding-left: 0; } - - a { - the-transition(); - transition-property: all; - color: $toc-link-color; - border-bottom-color: $toc-link-border-color; - - &:hover { - color: $toc-link-hover-color; - border-bottom-color: $toc-link-hover-border-color; - } - } -} - -.post-toc .nav-item { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap if !hexo-config('toc.wrap'); - line-height: 1.8; -} - -.post-toc .nav .nav-child { display: none; } - -.post-toc .nav .active > .nav-child { display: block; } - -.post-toc .nav .active-current > .nav-child { - display: block; - & > .nav-item { display: block; } -} - -.post-toc .nav .active > a { - color: $toc-link-active-color; - border-bottom-color: $toc-link-active-border-color; -} - -.post-toc .nav .active-current > a { - color: $toc-link-active-current-color; - &:hover { - color: $toc-link-active-current-border-color; - } -} diff --git a/themes/next/source/css/_common/components/sidebar/sidebar-toggle.styl b/themes/next/source/css/_common/components/sidebar/sidebar-toggle.styl deleted file mode 100644 index c4b6a06..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar-toggle.styl +++ /dev/null @@ -1,36 +0,0 @@ -.sidebar-toggle { - position: fixed; - right: $b2t-position-right; - bottom: 45px; - width: 14px; - height: 14px; - padding: 5px; - background: $black-deep; - line-height: 0; - z-index: $zindex-5; - cursor: pointer; - -webkit-transform: translateZ(0); - - +tablet() { - fixbutton() if hexo-config('sidebar.onmobile'); - hide() if not hexo-config('sidebar.onmobile'); - } - +mobile() { - fixbutton() if hexo-config('sidebar.onmobile'); - hide() if not hexo-config('sidebar.onmobile'); - } -} - - - -.sidebar-toggle-line { - position: relative; - display: inline-block; - vertical-align: top; - height: 2px; - width: 100%; - background: white; - margin-top: 3px; - - &:first-child { margin-top: 0; } -} diff --git a/themes/next/source/css/_common/components/sidebar/sidebar.styl b/themes/next/source/css/_common/components/sidebar/sidebar.styl deleted file mode 100644 index 39b11fd..0000000 --- a/themes/next/source/css/_common/components/sidebar/sidebar.styl +++ /dev/null @@ -1,43 +0,0 @@ -.sidebar { - position: fixed; - right: 0; - top: 0; - bottom: 0; - - width: 0; - z-index: $zindex-4; - box-shadow: inset 0 2px 6px black; - background: $black-deep; - -webkit-transform: translateZ(0); // http://stackoverflow.com/questions/17079857/position-fixed-broken-in-chrome-with-flash-behind - - a { - color: $grey-dark; - border-bottom-color: $black-light; - &:hover { color: $gainsboro; } - } - - +tablet() { - hide() if not hexo-config('sidebar.onmobile'); - } - +mobile() { - hide() if not hexo-config('sidebar.onmobile'); - } - -} - -.sidebar-inner { - position: relative; - padding: 20px 10px; - color: $grey-dark; - text-align: center; -} - -@import "sidebar-toggle"; -@import "sidebar-author"; -@import "site-state"; -@import "sidebar-feed-link"; -@import "sidebar-author-links"; -@import "sidebar-blogroll"; -@import "sidebar-nav"; -@import "sidebar-toc"; -@import "sidebar-dimmer" if hexo-config('sidebar.onmobile'); diff --git a/themes/next/source/css/_common/components/sidebar/site-state.styl b/themes/next/source/css/_common/components/sidebar/site-state.styl deleted file mode 100644 index c05b0ea..0000000 --- a/themes/next/source/css/_common/components/sidebar/site-state.styl +++ /dev/null @@ -1,28 +0,0 @@ -.site-state { - overflow: hidden; - line-height: 1.4; - white-space: nowrap; - text-align: $site-state-align; -} - -.site-state-item { - display: inline-block; - padding: 0 15px; - border-left: 1px solid $site-state-item-border-color; - - &:first-child { border-left: none; } - - a { border-bottom: none; } -} -.site-state-item-count { - display: block; - text-align: center; - color: $site-state-item-count-color; - font-weight: $font-weight-bold; - font-size: $site-state-item-count-font-size; -} - -.site-state-item-name { - font-size: $site-state-item-name-font-size; - color: $site-state-item-name-color; -} diff --git a/themes/next/source/css/_common/components/tag-cloud.styl b/themes/next/source/css/_common/components/tag-cloud.styl deleted file mode 100644 index 30b01c6..0000000 --- a/themes/next/source/css/_common/components/tag-cloud.styl +++ /dev/null @@ -1,8 +0,0 @@ -.tag-cloud { - text-align: center; - - a { - display: inline-block; - margin: 10px; - } -} \ No newline at end of file diff --git a/themes/next/source/css/_common/components/tags/blockquote-center.styl b/themes/next/source/css/_common/components/tags/blockquote-center.styl deleted file mode 100644 index b0f3bcc..0000000 --- a/themes/next/source/css/_common/components/tags/blockquote-center.styl +++ /dev/null @@ -1,33 +0,0 @@ -// Blockquote with all children centered. -.blockquote-center { - position: relative; - margin: 40px 0; - padding: 0; - border-left: none; - text-align: center; - - &::before, &::after { - position: absolute; - content: ' '; - display: block; - width: 100%; - height: 24px; - opacity: 0.2; - background-repeat: no-repeat; - background-position: 0 -6px; - background-size: 22px 22px; - } - &::before { - top: -20px; - background-image: url($center-quote-left); - border-top: 1px solid $grey-light; - } - &::after { - bottom: -20px; - background-image: url($center-quote-right); - border-bottom: 1px solid $grey-light; - background-position: 100% 8px; - } - - p, div { text-align: center; } -} diff --git a/themes/next/source/css/_common/components/tags/exturl.styl b/themes/next/source/css/_common/components/tags/exturl.styl deleted file mode 100644 index 49a1684..0000000 --- a/themes/next/source/css/_common/components/tags/exturl.styl +++ /dev/null @@ -1,18 +0,0 @@ -.exturl { - // Remove the gray background color from active links in IE 10. - background-color: transparent; - - cursor: pointer; - border-bottom: 1px solid #999; - - .fa { - font-size: 14px; - } -} - -// Improve readability when focused and also mouse hovered in all browsers. -.exturl:active, .exturl:hover { - outline: 0; - color: $black-deep; - border-bottom-color: $black-deep; -} diff --git a/themes/next/source/css/_common/components/tags/full-image.styl b/themes/next/source/css/_common/components/tags/full-image.styl deleted file mode 100644 index 3f79bec..0000000 --- a/themes/next/source/css/_common/components/tags/full-image.styl +++ /dev/null @@ -1,12 +0,0 @@ -// Expand image to 126% with nagative margin-left/right on Desktop. -.full-image.full-image.full-image { - border: none; - max-width: 100%; - width: auto; - margin: 20px auto; - +desktop() { - max-width: none; - width: $full-image-width; - margin: $full-image-margin-vertical $full-image-margin-horizontal; - } -} diff --git a/themes/next/source/css/_common/components/tags/group-pictures.styl b/themes/next/source/css/_common/components/tags/group-pictures.styl deleted file mode 100644 index ce1461d..0000000 --- a/themes/next/source/css/_common/components/tags/group-pictures.styl +++ /dev/null @@ -1,35 +0,0 @@ -.post .post-body .group-picture { - img { - box-sizing: border-box; - padding: 0 3px; - border: none; - } -} - -.post .group-picture-row { - overflow: hidden; - margin-top: 6px; - &:first-child { margin-top: 0; } -} - -.post .group-picture-column { float: left; } - -.page-post-detail .post-body .group-picture-column { - float: none; - margin-top: 10px; - width: auto !important; - img { margin: 0 auto; } -} - -.page-archive { - .group-picture-container { overflow: hidden; } - .group-picture-row { - float: left; - &:first-child { margin-top: 6px; } - } - - .group-picture-column { - max-width: 150px; - max-height: 150px; - } -} diff --git a/themes/next/source/css/_common/components/tags/label.styl b/themes/next/source/css/_common/components/tags/label.styl deleted file mode 100644 index 541dd2d..0000000 --- a/themes/next/source/css/_common/components/tags/label.styl +++ /dev/null @@ -1,12 +0,0 @@ -.post-body .label { - display: inline; - padding: 0 2px; - white-space: nowrap; - - &.default { background-color: $label-default; } - &.primary { background-color: $label-primary; } - &.info { background-color: $label-info; } - &.success { background-color: $label-success; } - &.warning { background-color: $label-warning; } - &.danger { background-color: $label-danger; } -} diff --git a/themes/next/source/css/_common/components/tags/note-modern.styl b/themes/next/source/css/_common/components/tags/note-modern.styl deleted file mode 100644 index 4cb4200..0000000 --- a/themes/next/source/css/_common/components/tags/note-modern.styl +++ /dev/null @@ -1,171 +0,0 @@ -.post-body .note { - note_icons = hexo-config('note.icons'); - - position: relative; - padding: 15px; - margin-bottom: 20px; - - border: 1px solid transparent; - background-color: $whitesmoke; - border-radius: unit(hexo-config('note.border_radius'), px) if hexo-config('note.border_radius') is a 'unit'; - - h2, h3, h4, h5, h6 { - if note_icons { - margin-top: 3px; - } else { - margin-top: 0; - } - margin-bottom: 0; - border-bottom: initial; - padding-top: 0 !important; - } - - p, ul, ol, table, pre, blockquote { - &:first-child { - margin-top: 0; - } - &:last-child { - margin-bottom: 0; - } - } - - if note_icons { - &:not(.no-icon) { - padding-left: 45px; - &:before { - position: absolute; - font-family: 'FontAwesome'; - font-size: larger; - top: 13px; - left: 15px; - } - } - } - - &.default { - background-color: $note-modern-default-bg; - border-color: $note-modern-default-border; - color: $note-modern-default-text; - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-default-icon; - } - } - } - a { - color: $note-modern-default-text; - border-bottom: 1px solid $note-modern-default-text; - &:hover { - color: $note-modern-default-hover; - border-bottom: 1px solid $note-modern-default-hover; - } - } - } - - &.primary { - background-color: $note-modern-primary-bg; - border-color: $note-modern-primary-border; - color: $note-modern-primary-text; - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-primary-icon; - } - } - } - a { - color: $note-modern-primary-text; - border-bottom: 1px solid $note-modern-primary-text; - &:hover { - color: $note-modern-primary-hover; - border-bottom: 1px solid $note-modern-primary-hover; - } - } - } - - &.info { - background-color: $note-modern-info-bg; - border-color: $note-modern-info-border; - color: $note-modern-info-text; - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-info-icon; - } - } - } - a { - color: $note-modern-info-text; - border-bottom: 1px solid $note-modern-info-text; - &:hover { - color: $note-modern-info-hover; - border-bottom: 1px solid $note-modern-info-hover; - } - } - } - - &.success { - background-color: $note-modern-success-bg; - border-color: $note-modern-success-border; - color: $note-modern-success-text; - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-success-icon; - } - } - } - a { - color: $note-modern-success-text; - border-bottom: 1px solid $note-modern-success-text; - &:hover { - color: $note-modern-success-hover; - border-bottom: 1px solid $note-modern-success-hover; - } - } - } - - &.warning { - background-color: $note-modern-warning-bg; - border-color: $note-modern-warning-border; - color: $note-modern-warning-text; - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-warning-icon; - } - } - } - a { - color: $note-modern-warning-text; - border-bottom: 1px solid $note-modern-warning-text; - &:hover { - color: $note-modern-warning-hover; - border-bottom: 1px solid $note-modern-warning-hover; - } - } - } - - &.danger { - background-color: $note-modern-danger-bg; - border-color: $note-modern-danger-border; - color: $note-modern-danger-text; - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-danger-icon; - } - } - } - a { - color: $note-modern-danger-text; - border-bottom: 1px solid $note-modern-danger-text; - &:hover { - color: $note-modern-danger-hover; - border-bottom: 1px solid $note-modern-danger-hover; - } - } - } - -} diff --git a/themes/next/source/css/_common/components/tags/note.styl b/themes/next/source/css/_common/components/tags/note.styl deleted file mode 100644 index 4b234b0..0000000 --- a/themes/next/source/css/_common/components/tags/note.styl +++ /dev/null @@ -1,161 +0,0 @@ -.post-body .note { - note_style = hexo-config('note.style'); - note_icons = hexo-config('note.icons'); - - position: relative; - padding: 15px; - margin-bottom: 20px; - - if note_style == 'simple' { - border: 1px solid $gainsboro; - border-left-width: 5px; - } - if note_style == 'flat' { - border: initial; - border-left: 3px solid $gainsboro; - background-color: lighten($gainsboro, 65%); - } - border-radius: unit(hexo-config('note.border_radius'), px) if hexo-config('note.border_radius') is a 'unit'; - - h2, h3, h4, h5, h6 { - if note_icons { - margin-top: 3px; - } else { - margin-top: 0; - } - margin-bottom: 0; - border-bottom: initial; - padding-top: 0 !important; - } - - p, ul, ol, table, pre, blockquote { - &:first-child { - margin-top: 0; - } - &:last-child { - margin-bottom: 0; - } - } - - if note_icons { - &:not(.no-icon) { - padding-left: 45px; - &:before { - position: absolute; - font-family: 'FontAwesome'; - font-size: larger; - top: 13px; - left: 15px; - } - } - } - - &.default { - if note_style == 'flat' { - background-color: $note-default-bg; - } - border-left-color: $note-default-border; - h2, h3, h4, h5, h6 { - color: $note-default-text; - } - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-default-icon; - color : $note-default-text; - } - } - } - } - - &.primary { - if note_style == 'flat' { - background-color: $note-primary-bg; - } - border-left-color: $note-primary-border; - h2, h3, h4, h5, h6 { - color: $note-primary-text; - } - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-primary-icon; - color : $note-primary-text; - } - } - } - } - - &.info { - if note_style == 'flat' { - background-color: $note-info-bg; - } - border-left-color: $note-info-border; - h2, h3, h4, h5, h6 { - color: $note-info-text; - } - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-info-icon; - color : $note-info-text; - } - } - } - } - - &.success { - if note_style == 'flat' { - background-color: $note-success-bg; - } - border-left-color: $note-success-border; - h2, h3, h4, h5, h6 { - color: $note-success-text; - } - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-success-icon; - color : $note-success-text; - } - } - } - } - - &.warning { - if note_style == 'flat' { - background-color: $note-warning-bg; - } - border-left-color: $note-warning-border; - h2, h3, h4, h5, h6 { - color: $note-warning-text; - } - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-warning-icon; - color : $note-warning-text; - } - } - } - } - - &.danger { - if note_style == 'flat' { - background-color: $note-danger-bg; - } - border-left-color: $note-danger-border; - h2, h3, h4, h5, h6 { - color: $note-danger-text; - } - if note_icons { - &:not(.no-icon) { - &:before { - content: $note-danger-icon; - color : $note-danger-text; - } - } - } - } - -} diff --git a/themes/next/source/css/_common/components/tags/tabs.styl b/themes/next/source/css/_common/components/tags/tabs.styl deleted file mode 100644 index c3c27c4..0000000 --- a/themes/next/source/css/_common/components/tags/tabs.styl +++ /dev/null @@ -1,99 +0,0 @@ -.post-body .tabs { - position: relative; - display: block; - margin-bottom: 20px; - padding-top: 10px; - - // Read tabs border_radius from NexT config and set in "tbr px" to use it as string variable in this CSS section. - hexo-config('tabs.border_radius') is a 'unit' ? (tbr = unit(hexo-config('tabs.border_radius'), px)) : (tbr = 0) - - ul.nav-tabs { - margin: 0; - padding: 0; - display: flex; - margin-bottom: -1px; - - +mobile-smallest() { - display: block; - margin-bottom: 5px; - } - - li.tab { - list-style-type: none !important; - margin: 0 .25em 0 0; - border-top: 3px solid transparent; - border-left: 1px solid transparent; - border-right: 1px solid transparent; - - +mobile-smallest() { - margin: initial; - border-top: 1px solid transparent; - border-left: 3px solid transparent; - border-right: 1px solid transparent; - border-bottom: 1px solid transparent; - } - - if tbr > 0 { - border-radius: tbr tbr 0 0; - +mobile-smallest() { border-radius: tbr; } - } - if hexo-config('tabs.transition.tabs') { the-transition-ease-out(); } - - & a { - outline: 0; - border-bottom: initial; - display: block; - line-height: 1.8em; - padding: .25em .75em; - & i { width: (18em / 14); } - if hexo-config('tabs.transition.labels') { the-transition-ease-out(); } - } - - &.active { - border-top: 3px solid $orange; - border-left: 1px solid $table-border-color; - border-right: 1px solid $table-border-color; - background-color: #fff; - - +mobile-smallest() { - border-top: 1px solid $table-border-color; - border-left: 3px solid $orange; - border-right: 1px solid $table-border-color; - border-bottom: 1px solid $table-border-color; - } - - & a { - cursor: default; - color: $link-color; - } - } - } - - } - - .tab-content { - background-color: #fff; - - .tab-pane { - border: 1px solid $table-border-color; - padding: 20px 20px 0 20px; - if tbr > 0 { border-radius: tbr; } - - &:not(.active) { - hide(); - } - &.active { - show(); - if tbr > 0 { - &:nth-of-type(1) { - border-radius: 0 tbr tbr tbr; - +mobile-smallest() { border-radius: tbr; } - } - } - } - - } - - } - -} diff --git a/themes/next/source/css/_common/components/tags/tags.styl b/themes/next/source/css/_common/components/tags/tags.styl deleted file mode 100644 index e7e027a..0000000 --- a/themes/next/source/css/_common/components/tags/tags.styl +++ /dev/null @@ -1,8 +0,0 @@ -@import "full-image"; -@import "blockquote-center"; -@import "group-pictures"; -@import "exturl" if hexo-config('exturl'); -@import "note" if hexo-config('note.style') == 'simple' || hexo-config('note.style') == 'flat'; -@import "note-modern" if hexo-config('note.style') == 'modern'; -@import "label" if hexo-config('label'); -@import "tabs" if hexo-config('tabs.enable'); diff --git a/themes/next/source/css/_common/components/third-party/algolia-search.styl b/themes/next/source/css/_common/components/third-party/algolia-search.styl deleted file mode 100644 index e2e9828..0000000 --- a/themes/next/source/css/_common/components/third-party/algolia-search.styl +++ /dev/null @@ -1,125 +0,0 @@ -.algolia-pop-overlay - position: fixed - width: 100% - height: 100% - top: 0 - left: 0 - z-index: 2080 - background-color: rgba(0, 0, 0, 0.3) - -.algolia-popup - overflow: hidden - padding: 0 - display: none - position: fixed - top: 10% - left: 50% - width: 700px - height: 80% - margin-left: -350px - background: #fff - color: #333 - z-index: 9999 - border-radius: 5px - +mobile() - padding: 0 - top: 0 - left: 0 - margin: 0 - width: 100% - height: 100% - border-radius: 0 - - .popup-btn-close - position: absolute - right: 14px - color: #4EBD79 - font-size: 14px - font-weight: bold - text-transform: uppercase - cursor: pointer - padding-left: 15px - border-left: 1px solid #eee - top: 10px - .fa - color: $grey-dark - font-size: 18px - &:hover .fa - color: $black-deep - -.algolia-search - padding: 10px 15px 5px - max-height: 50px - border-bottom: 1px solid #ccc - background: $whitesmoke - border-top-left-radius: 5px - border-top-right-radius: 5px - -.algolia-search-input-icon - display: inline-block - width: 20px - .fa - font-size: 18px - -.algolia-search-input - display: inline-block - width: calc(90% - 20px) - input - padding: 5px 0 - width: 100% - outline: none - border: none - background: transparent - -.algolia-powered - float: right - img - display: inline-block - height: 18px - vertical-align: middle - -.algolia-results - position: relative - overflow: auto - padding: 10px 30px - height: calc(100% - 50px) - - hr - margin: 10px 0 - - .highlight - font-style: normal - margin: 0 - padding: 0 2px - font-size: inherit - color: red - -.algolia-hits - margin-top: 20px - -.algolia-hit-item - margin: 15px 0 - -.algolia-hit-item-link - display: block - border-bottom: 1px dashed #ccc - the-transition() - -.algolia-pagination - .pagination - margin-top: 40px - border-top: none - padding: 0 - .pagination-item - display: inline-block - .page-number - border-top: none - &:hover - border-bottom: 1px solid $black-deep - - .current .page-number - @extend .pagination .page-number.current - - .disabled-item - visibility: hidden - diff --git a/themes/next/source/css/_common/components/third-party/baidushare.styl b/themes/next/source/css/_common/components/third-party/baidushare.styl deleted file mode 100644 index fc42b71..0000000 --- a/themes/next/source/css/_common/components/third-party/baidushare.styl +++ /dev/null @@ -1,12 +0,0 @@ -.post-spread { - margin-top: 20px; - text-align: center; -} - -.bdshare-slide-button-box a { border: none; } - -.bdsharebuttonbox { - display: inline-block; - - a { border: none; } -} diff --git a/themes/next/source/css/_common/components/third-party/busuanzi-counter.styl b/themes/next/source/css/_common/components/third-party/busuanzi-counter.styl deleted file mode 100644 index 960fef6..0000000 --- a/themes/next/source/css/_common/components/third-party/busuanzi-counter.styl +++ /dev/null @@ -1,30 +0,0 @@ -if hexo-config("scheme") == Pisces - .busuanzi-count { - +tablet() { - width: auto; - } - +mobile() { - width: auto; - } - } - -.site-uv, -.site-pv, -.page-pv { - display: inline-block; - - .busuanzi-value { - margin: 0 5px; - } -} - -if hexo-config("busuanzi_count.site_pv") and hexo-config("busuanzi_count.site_uv") - .site-uv - { - margin-right: 10px; - - &::after { - content: "|"; - padding-left: 10px; - } - } diff --git a/themes/next/source/css/_common/components/third-party/duoshuo.styl b/themes/next/source/css/_common/components/third-party/duoshuo.styl deleted file mode 100644 index 3359518..0000000 --- a/themes/next/source/css/_common/components/third-party/duoshuo.styl +++ /dev/null @@ -1,290 +0,0 @@ - -.theme-next { - $duoshuoBaseBorderColor = #c7d4e1; - $duoshuoBaseBgColor = #f6f8fa; - - #ds-thread #ds-reset { - color: #555; - } - - #ds-thread #ds-reset .ds-replybox { - margin-bottom: 30px; - } - - #ds-thread #ds-reset .ds-replybox .ds-avatar, #ds-reset .ds-avatar img { - box-shadow: none; - } - - #ds-thread #ds-reset .ds-textarea-wrapper { - border-color: $duoshuoBaseBorderColor; - background: none; - border-top-right-radius: 3px; - border-top-left-radius: 3px; - } - - - #ds-thread #ds-reset .ds-textarea-wrapper textarea { - height: 60px; - } - - #ds-reset .ds-rounded-top { - border-radius: 0; - } - - #ds-thread #ds-reset .ds-post-toolbar { - box-sizing: border-box; - border: 1px solid $duoshuoBaseBorderColor; - background: $duoshuoBaseBgColor; - } - - #ds-thread #ds-reset .ds-post-options { - height: 40px; - border: none; - background: none; - } - - #ds-thread #ds-reset .ds-toolbar-buttons { - top: 11px; - } - - #ds-thread #ds-reset .ds-sync { - top: 5px; - } - - #ds-thread #ds-reset .ds-post-button { - top: 4px; - right: 5px; - width: 90px; - height: 30px; - border: 1px solid #c5ced7; - border-radius: 3px; - background-image: linear-gradient(#fbfbfc, #f5f7f9); - color: #60676d; - } - - #ds-thread #ds-reset .ds-post-button:hover { - background-position: 0 -30px; - color: #60676d; - } - - #ds-thread #ds-reset .ds-comments-info { - padding: 10px 0; - } - - #ds-thread #ds-reset .ds-sort { - display: none; - } - - #ds-thread #ds-reset li.ds-tab a.ds-current { - border: none; - background: $duoshuoBaseBgColor; - color: #60676d; - - &:hover { - background-color: #e9f0f7; - color: #60676d; - } - } - - #ds-thread #ds-reset li.ds-tab a { - border-radius: 2px; - padding: 5px; - } - - #ds-thread #ds-reset .ds-login-buttons p { - color: #999; - line-height: 36px; - } - - #ds-thread #ds-reset .ds-login-buttons .ds-service-list li { - height: 28px; - } - - #ds-thread #ds-reset .ds-service-list a { - background: none; - padding: 5px; - border: 1px solid; - border-radius: 3px; - text-align: center; - - &:hover { - color: #fff; - background: #666; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-weibo { - color: #fc9b00; - border-color: #fc9b00; - - &:hover { - background: #fc9b00; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-qq { - color: #60a3ec; - border-color: #60a3ec; - - &:hover { - background: #60a3ec; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-renren { - color: #2e7ac4; - border-color: #2e7ac4; - - &:hover { - background: #2e7ac4; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-douban { - color: #37994c; - border-color: #37994c; - - &:hover { - background: #37994c; - } - } - #ds-thread #ds-reset .ds-service-list .ds-kaixin { - color: #fef20d; - border-color: #fef20d; - - &:hover { - background: #fef20d; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-netease { - color: #f00; - border-color: #f00; - - &:hover { - background: #f00; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-sohu { - color: #ffcb05; - border-color: #ffcb05; - - &:hover { - background: #ffcb05; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-baidu { - color: #2831e0; - border-color: #2831e0; - - &:hover { - background: #2831e0; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-google { - color: #166bec; - border-color: #166bec; - - &:hover { - background: #166bec; - } - } - - #ds-thread #ds-reset .ds-service-list .ds-weixin { - color: #00CE0D; - border-color: #00CE0D; - - &:hover { - background: #00CE0D; - } - } - #ds-thread #ds-reset .ds-service-list .ds-more-services { - border: none; - &:hover { - background: none; - } - } - -/*duoshuo UA style begin*/ - - #ds-reset .duoshuo-ua-admin { - display: inline-block; - color: red; - } - - #ds-reset .duoshuo-ua-platform, - #ds-reset .duoshuo-ua-browser { - color: #ccc; - - .fa { - display: inline-block; - margin-right: 3px; - } - } - - #ds-reset .duoshuo-ua-separator { - display: inline-block; - margin-left: 5px; - } - - .this_ua { - background-color: #ccc !important; - border-radius: 4px; - padding: 0 5px !important; - margin: 1px 1px !important; - border: 1px solid #BBB !important; - color: #fff; - display: inline-block !important; - } - - .this_ua.admin { - background-color: #d9534f !important; - border-color: #d9534f !important; - } - - .this_ua.platform.iOS, .this_ua.platform.Mac, .this_ua.platform.Windows { - background-color: #39b3d7 !important; - border-color: #46b8da !important; - } - - .this_ua.platform.Linux { - background-color: #3A3A3A !important; - border-color: #1F1F1F !important; - } - - .this_ua.platform.Android { - background-color: #00C47D !important; - border-color: #01B171 !important; - } - - .this_ua.browser.Mobile, .this_ua.browser.Chrome { - background-color: #5cb85c !important; - border-color: #4cae4c !important; - } - - .this_ua.browser.Firefox { - background-color: #f0ad4e !important; - border-color: #eea236 !important; - } - - .this_ua.browser.Maxthon, .this_ua.browser.IE { - background-color: #428bca !important; - border-color: #357ebd !important; - } - - .this_ua.browser.baidu, .this_ua.browser.UCBrowser, .this_ua.browser.Opera { - background-color: #d9534f !important; - border-color: #d43f3a !important; - } - - .this_ua.browser.Android, .this_ua.browser.QQBrowser { - background-color: #78ACE9 !important; - border-color: #4cae4c !important; - } - -/*duoshuo UA style end*/ - -} diff --git a/themes/next/source/css/_common/components/third-party/han.styl b/themes/next/source/css/_common/components/third-party/han.styl deleted file mode 100644 index d02c969..0000000 --- a/themes/next/source/css/_common/components/third-party/han.styl +++ /dev/null @@ -1,3 +0,0 @@ -.fa { - font-family: FontAwesome!important; -} diff --git a/themes/next/source/css/_common/components/third-party/jiathis.styl b/themes/next/source/css/_common/components/third-party/jiathis.styl deleted file mode 100644 index d501fb5..0000000 --- a/themes/next/source/css/_common/components/third-party/jiathis.styl +++ /dev/null @@ -1,10 +0,0 @@ -.post-spread { - margin-top: 20px; - text-align: center; -} - -.jiathis_style { - display: inline-block; - - a { border: none; } -} \ No newline at end of file diff --git a/themes/next/source/css/_common/components/third-party/localsearch.styl b/themes/next/source/css/_common/components/third-party/localsearch.styl deleted file mode 100644 index 85f43cf..0000000 --- a/themes/next/source/css/_common/components/third-party/localsearch.styl +++ /dev/null @@ -1,102 +0,0 @@ -.local-search-pop-overlay - position: fixed - width: 100% - height: 100% - top: 0 - left: 0 - z-index: 2080 - background-color: rgba(0, 0, 0, 0.3) - -.local-search-popup - display: none - position: fixed - top: 10% - left: 50% - margin-left: -350px - width: 700px - height: 80% - padding: 0 - background: #fff - color: #333 - z-index: 9999 - border-radius: 5px - +mobile() - padding: 0 - top: 0 - left: 0 - margin: 0 - width: 100% - height: 100% - border-radius: 0 - - ul.search-result-list - padding: 0 - margin: 0 5px - - p.search-result - border-bottom: 1px dashed #ccc - padding: 5px 0 - - a.search-result-title - font-weight: bold - font-size: 16px - - .search-keyword - border-bottom: 1px dashed #f00 - font-weight: bold - color: #f00 - - .local-search-header - padding: 5px - height: 36px - background: #f5f5f5 - border-top-left-radius: 5px - border-top-right-radius: 5px - - #local-search-result - overflow: auto - position: relative - padding: 5px 25px - height: calc(100% - 55px) - - .local-search-input-wrapper - display: inline-block - width: calc(100% - 90px) - height: 36px - line-height: 36px - padding: 0 5px - - .local-search-input-wrapper input - padding: 8px 0 - height: 20px - display: block - width: 100% - outline: none - border: none - background: transparent - vertical-align: middle - - .search-icon, .popup-btn-close - display: inline-block - font-size: 18px - color: #999 - height: 36px - width: 18px - padding-left: 10px - padding-right: 10px - - .search-icon - float: left - - .popup-btn-close - border-left: 1px solid #eee - float: right - cursor: pointer - - #no-result - position: absolute - left: 50% - top: 50% - -webkit-transform: translate(-50%, -50%) - transform: translate(-50%, -50%) - color: #ccc diff --git a/themes/next/source/css/_common/components/third-party/third-party.styl b/themes/next/source/css/_common/components/third-party/third-party.styl deleted file mode 100644 index 895e522..0000000 --- a/themes/next/source/css/_common/components/third-party/third-party.styl +++ /dev/null @@ -1,7 +0,0 @@ -@import "duoshuo"; -@import "jiathis"; -@import "han"; -@import "baidushare"; -@import "localsearch"; -@import "busuanzi-counter"; -@import "algolia-search" if hexo-config('algolia_search.enable'); diff --git a/themes/next/source/css/_common/outline/outline.styl b/themes/next/source/css/_common/outline/outline.styl deleted file mode 100644 index 7337e18..0000000 --- a/themes/next/source/css/_common/outline/outline.styl +++ /dev/null @@ -1,58 +0,0 @@ -// -// Layout -// Note: Must name this file "outline" instead of "layout" -// Or Hexo will use it as template layout. -// ================================================= - - -html, body { height: 100%; } - -.container { - position: relative; - min-height: 100%; -} - - -// Header Section -// -------------------------------------------------- -.header-inner { - margin: 0 auto; - padding: 100px 0 70px; - width: $content-desktop; - - +desktop-large() { - .container & { width: $content-desktop-large; } - } -} - -// Main Section -// -------------------------------------------------- -.main { padding-bottom: $footer-height + $gap-between-main-and-footer; } -.main-inner { - margin: 0 auto; - width: $content-desktop; - - +desktop-large() { - .container & { width: $content-desktop-large; } - } -} - - -// Footer Section -// -------------------------------------------------- -.footer { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - min-height: $footer-height; -} -.footer-inner { - box-sizing: border-box; - margin: 20px auto; - width: $content-desktop; - - +desktop-large() { - .container & { width: $content-desktop-large; } - } -} diff --git a/themes/next/source/css/_common/scaffolding/base.styl b/themes/next/source/css/_common/scaffolding/base.styl deleted file mode 100644 index 42dd462..0000000 --- a/themes/next/source/css/_common/scaffolding/base.styl +++ /dev/null @@ -1,101 +0,0 @@ - -::selection { - background: $selection-bg; - color: $selection-color; -} - -body { - position: relative; // Required by scrollspy - font-family: $font-family-base; - font-size: $font-size-base; - line-height: $line-height-base; - color: $text-color; - background: $body-bg-color; - - +mobile() { padding-right: 0 !important; } - +tablet() { padding-right: 0 !important; } - +desktop-large() { font-size: $font-size-large; } -} - -h1, h2, h3, h4, h5, h6 { - margin: 0; - padding: 0; - font-weight: bold; - line-height: 1.5; - font-family: $font-family-headings; -} - -h2, h3, h4, h5, h6 { margin: 20px 0 15px; } - -for headline in (1..6) { - h{headline} { - font-size: $font-size-headings-base - $font-size-headings-step * headline; - } - - +mobile() { - h{headline} { - font-size: $font-size-headings-base - $font-size-headings-step * headline - 4px; - } - } -} - -p { margin: 0 0 20px 0; } - -a { - color: $link-color; - text-decoration: none; - border-bottom: 1px solid $grey-dark; - word-wrap: break-word; - - &:hover { - color: $link-hover-color; - border-bottom-color: $link-decoration-hover-color; - } -} - -blockquote { - margin: 0; - padding: 0; -} - -img { - display: block; - margin: auto; - max-width: 100%; - height: auto; -} - - -hr { - margin: 40px 0; - height: 3px; - border: none; - background-color: $gray-lighter; - background-image: repeating-linear-gradient( - -45deg, - white, - white 4px, - transparent 4px, - transparent 8px - ); -} - -blockquote { - padding: 0 15px; - color: $grey-dim; - border-left: 4px solid $gray-lighter; - - cite::before { - content: "-"; - padding: 0 5px; - } -} - -dt { font-weight: $font-weight-bolder; } - -dd { - margin: 0; - padding: 0; -} - - diff --git a/themes/next/source/css/_common/scaffolding/helpers.styl b/themes/next/source/css/_common/scaffolding/helpers.styl deleted file mode 100644 index a00d0bb..0000000 --- a/themes/next/source/css/_common/scaffolding/helpers.styl +++ /dev/null @@ -1,67 +0,0 @@ -// -// Helpers -// ================================================= - - - -// Alignment -.text-left { text-align: left; } -.text-center { text-align: center; } -.text-right { text-align: right; } -.text-justify { text-align: justify; } -.text-nowrap { white-space: nowrap; } - - -// Transformation -.text-lowercase { text-transform: lowercase; } -.text-uppercase { text-transform: uppercase; } -.text-capitalize { text-transform: capitalize; } - - -// Center-align a block level element. -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} - - -// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/ -.clearfix { - clearfix(); -} - -.pullquote { - width: 45%; - - &.left { - float: left; - margin-left: 5px; - margin-right: 10px; - } - - &.right { - float: right; - margin-left: 10px; - margin-right: 5px; - } -} - -.affix.affix.affix { position: fixed; } - -.translation { - margin-top: -20px; - font-size: 14px; - color: $grey-dark; -} - -// https://davidwalsh.name/detect-scrollbar-width -.scrollbar-measure { - width: 100px; - height: 100px; - overflow: scroll; - position: absolute; - top: -9999px; -} - -.use-motion .motion-element { opacity: 0; } diff --git a/themes/next/source/css/_common/scaffolding/mobile.styl b/themes/next/source/css/_common/scaffolding/mobile.styl deleted file mode 100644 index ba0d211..0000000 --- a/themes/next/source/css/_common/scaffolding/mobile.styl +++ /dev/null @@ -1,118 +0,0 @@ -/* -// > 1600px -+desktop-large() { - -} - -// > 992px -+desktop() { - -} - -// > 768px & < 991px -+tablet() { - -} -*/ - -// < 767px -+mobile() { - - // For Pisces scheme only wider width. - .content-wrap { - padding: 15px !important; - } - - .posts-expand { - padding-top: 20px !important; - margin: initial !important; - } - -} - -// < 567px -+mobile-small() { - - // For Muse & Mist schemes only. - .header-inner { - margin-bottom: initial !important; - } - .main-inner { - margin-top: initial !important; - } - - // For Pisces scheme only wider width. - .content-wrap { - padding: initial !important; - } - - // For all schemes wider width. - .posts-expand { - padding-top: 10px !important; - margin: initial !important; - - .post-header { - padding: 0 18px; - } - - .post-meta { - margin: 3px 0 10px 0 !important; - } - - } - - .post-body { - - // For post blocks wider width. - h2, h3, h4, h5, h6 { - margin: 10px 18px 8px; - } - // Rewrite paddings & margins inside tags. - .note, .tabs .tab-content .tab-pane { - h2, h3, h4, h5, h6 { - margin: 0 5px; - } - } - - p { - margin: 0 0 10px 0; - padding: 0 18px; - } - // Rewrite paddings & margins inside tags. - .note > p, .tabs .tab-content .tab-pane > p { - padding: 0 5px; - } - - .video-container .fluid-vids { - margin-bottom: 10px !important; - } - - .note { - padding: 10px !important; - margin-bottom: 10px !important; - - if hexo-config('note.icons') { - &:not(.no-icon) { - padding-left: 35px !important; - &:before { - top: 8px !important; - left: 12px !important; - } - } - } - } - - .tabs .tab-content .tab-pane { - padding: 10px 10px 0 10px !important; - } - - } - -} - -/* -// < 413px -+mobile-smallest() { - -} -*/ diff --git a/themes/next/source/css/_common/scaffolding/normalize.styl b/themes/next/source/css/_common/scaffolding/normalize.styl deleted file mode 100644 index 81c6f31..0000000 --- a/themes/next/source/css/_common/scaffolding/normalize.styl +++ /dev/null @@ -1,427 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} \ No newline at end of file diff --git a/themes/next/source/css/_common/scaffolding/scaffolding.styl b/themes/next/source/css/_common/scaffolding/scaffolding.styl deleted file mode 100644 index b5d3500..0000000 --- a/themes/next/source/css/_common/scaffolding/scaffolding.styl +++ /dev/null @@ -1,9 +0,0 @@ -// -// Scaffolding -// ================================================= - -@import "normalize"; -@import "base"; -@import "helpers"; -@import "tables"; -@import "mobile" if hexo-config('mobile_layout_economy'); diff --git a/themes/next/source/css/_common/scaffolding/tables.styl b/themes/next/source/css/_common/scaffolding/tables.styl deleted file mode 100644 index c653b81..0000000 --- a/themes/next/source/css/_common/scaffolding/tables.styl +++ /dev/null @@ -1,33 +0,0 @@ -table { - margin: 20px 0; - width: $table-width; - border-collapse: collapse; - border-spacing: 0; - border: 1px solid $table-border-color; - font-size: $table-font-size; - table-layout: fixed; - word-wrap: break-all; -} -table>tbody>tr { - &:nth-of-type(odd) { background-color: $table-row-odd-bg-color; } - &:hover { background-color: $table-row-hover-bg-color; } -} - -caption, th, td { - padding: $table-cell-padding; - text-align: $table-content-alignment; - vertical-align: $table-content-vertical; - font-weight: normal; -} - -th, td { - border-bottom: 3px solid $table-cell-border-bottom-color; - border-right: 1px solid $table-cell-border-right-color; -} - -th { - padding-bottom: 10px; - font-weight: $table-th-font-weight; -} - -td { border-bottom-width: 1px; } diff --git a/themes/next/source/css/_custom/custom.styl b/themes/next/source/css/_custom/custom.styl deleted file mode 100644 index 63937f7..0000000 --- a/themes/next/source/css/_custom/custom.styl +++ /dev/null @@ -1 +0,0 @@ -// Custom styles. diff --git a/themes/next/source/css/_mixins/Gemini.styl b/themes/next/source/css/_mixins/Gemini.styl deleted file mode 100644 index eb4102e..0000000 --- a/themes/next/source/css/_mixins/Gemini.styl +++ /dev/null @@ -1 +0,0 @@ -@import "Pisces.styl"; diff --git a/themes/next/source/css/_mixins/Mist.styl b/themes/next/source/css/_mixins/Mist.styl deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/source/css/_mixins/Muse.styl b/themes/next/source/css/_mixins/Muse.styl deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/source/css/_mixins/Pisces.styl b/themes/next/source/css/_mixins/Pisces.styl deleted file mode 100644 index a1c2b79..0000000 --- a/themes/next/source/css/_mixins/Pisces.styl +++ /dev/null @@ -1,16 +0,0 @@ -sidebar-inline-links-item() { - margin: 5px 0 0; - if !hexo-config('social_icons.icons_only') { width: 50%; } - - & a { - box-sizing: border-box; - display: inline-block; - margin-right: 0; - margin-bottom: 0; - padding: 0 5px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - if hexo-config('social_icons.transition') { the-transition(); } - } -} diff --git a/themes/next/source/css/_mixins/base.styl b/themes/next/source/css/_mixins/base.styl deleted file mode 100644 index 0e787f7..0000000 --- a/themes/next/source/css/_mixins/base.styl +++ /dev/null @@ -1,92 +0,0 @@ -the-transition() { - transition-duration: 0.2s; - transition-timing-function: ease-in-out; - transition-delay: 0s; -} - -the-transition-ease-in() { - transition-duration: 0.2s; - transition-timing-function: ease-in; - transition-delay: 0s; -} - -the-transition-ease-out() { - transition-duration: 0.2s; - transition-timing-function: ease-out; - transition-delay: 0s; -} - -mobile-smallest() { - @media (max-width: 413px) { - {block} - } -} - -mobile-small() { - @media (max-width: 567px) { - {block} - } -} - -mobile() { - @media (max-width: 767px) { - {block} - } -} - -tablet() { - @media (min-width: 768px) and (max-width: 991px) { - {block} - } -} - -desktop() { - @media (min-width: 992px) { - {block} - } -} - -desktop-large() { - @media (min-width: 1600px) { - {block} - } -} - -circle() { - border-radius: 50%; -} - -transform() { - -webkit-transform: arguments - -moz-transform: arguments - -ms-transform: arguments - -o-transform: arguments - transform: arguments -} - -hide() { - display: none !important; -} - -show() { - display: block !important; -} - -fixbutton() { - right: 20px; - opacity: 0.8; -} - -random-color($min, $max) { - return floor(math(0, 'random') * ($max - $min + 1) + $min); -} - -// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/ -clearfix() { - &:before, - &:after { - content: " "; - display: table; - } - &:after { clear: both; } -} diff --git a/themes/next/source/css/_mixins/custom.styl b/themes/next/source/css/_mixins/custom.styl deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/source/css/_schemes/Gemini/index.styl b/themes/next/source/css/_schemes/Gemini/index.styl deleted file mode 100644 index e6e217e..0000000 --- a/themes/next/source/css/_schemes/Gemini/index.styl +++ /dev/null @@ -1,40 +0,0 @@ -@import "../Pisces/_layout"; -@import "../Pisces/_brand"; -@import "../Pisces/_menu"; -@import "../Pisces/_sidebar"; -@import "../Pisces/_posts"; - -// Rewrite _layout.styl -// ================================================= -// For post blocks. -.content-wrap { - padding: initial; - background: initial; - box-shadow: initial; - border-radius: initial; -} - -.post-block { - margin-bottom: 12px; - - background: white; - padding: $content-desktop-padding; - box-shadow: $box-shadow-inner; - border-radius: $border-radius-inner; -} - -.posts-expand { - padding-top: initial; -} - -.post-eof { - hide(); -} - -// For footer top alignment. -.main { - padding-bottom: initial; -} -.footer { - bottom: auto; -} diff --git a/themes/next/source/css/_schemes/Mist/_base.styl b/themes/next/source/css/_schemes/Mist/_base.styl deleted file mode 100644 index 97dc4cb..0000000 --- a/themes/next/source/css/_schemes/Mist/_base.styl +++ /dev/null @@ -1,12 +0,0 @@ -// Tags -// -------------------------------------------------- -h1, h2, h3, h4, h5, h6 { margin: 20px 0 10px; } - -p { margin: 0 0 25px 0; } - -a { border-bottom-color: $grey-light; } - -hr { - margin: 20px 0; - height: 2px; -} diff --git a/themes/next/source/css/_schemes/Mist/_header.styl b/themes/next/source/css/_schemes/Mist/_header.styl deleted file mode 100644 index a191649..0000000 --- a/themes/next/source/css/_schemes/Mist/_header.styl +++ /dev/null @@ -1,63 +0,0 @@ -// Header -// -------------------------------------------------- -.header { background: $whitesmoke; } -.header-inner { - padding: 25px 0 20px; - clearfix(); - - +mobile() { - width: auto; - margin-bottom: 50px; - padding: 10px; - } -} - -.site-meta { - float: left; - margin-left: -20px; - line-height: normal; - - +mobile() { - margin-left: 10px; - } - - .brand { - padding: 2px 1px; - background: none; - - +mobile() { display: block; } - } - - .logo { display: none; } - - .site-title { - font-size: 22px; - font-weight: bolder; - - +mobile() { line-height: 34px; } - } -} - - -.logo-line-before, -.logo-line-after { - display: block; - overflow: hidden; - margin: 0 auto; - width: 75%; - - +mobile() { display: none; } - - i { - position: relative; - display: block; - height: 2px; - background: $black-deep; - +mobile() { height: 3px; } - } -} - -.use-motion { - .logo-line-before i { left: -100%; } - .logo-line-after i { right: -100%; } -} diff --git a/themes/next/source/css/_schemes/Mist/_logo.styl b/themes/next/source/css/_schemes/Mist/_logo.styl deleted file mode 100644 index 571b407..0000000 --- a/themes/next/source/css/_schemes/Mist/_logo.styl +++ /dev/null @@ -1 +0,0 @@ -.site-subtitle { display: none; } diff --git a/themes/next/source/css/_schemes/Mist/_menu.styl b/themes/next/source/css/_schemes/Mist/_menu.styl deleted file mode 100644 index fa0cd4e..0000000 --- a/themes/next/source/css/_schemes/Mist/_menu.styl +++ /dev/null @@ -1,46 +0,0 @@ -// Menu -// -------------------------------------------------- -.site-nav-toggle { - position: static; - float: right; -} - - -.menu { - float: right; - margin: 8px 0 0 0; - - +mobile() { - margin: 20px 0 0 0; - padding: 0; - } - - br { display: none; } - - .menu-item { - margin: 0; - +mobile() { display: block; } - } - - .menu-item a { - padding: 0 10px; - background: none; - border: none; - border-radius: 2px; - transition-property: background; - - +mobile() { - text-align: left; - } - - &:hover { background: #e1e1e1; } - } - - a::before { - display: none; - - +mobile() { display: block; } - } - - +mobile() { float: none; } -} diff --git a/themes/next/source/css/_schemes/Mist/_posts-expanded.styl b/themes/next/source/css/_schemes/Mist/_posts-expanded.styl deleted file mode 100644 index 96caa64..0000000 --- a/themes/next/source/css/_schemes/Mist/_posts-expanded.styl +++ /dev/null @@ -1,64 +0,0 @@ -// Post Expanded -// -------------------------------------------------- -.posts-expand { - padding-top: 0; - - .post-title, - .post-meta { - text-align: $site-meta-text-align; - +mobile() { text-align: center; } - } - .post-eof { display: none; } - - .post { margin-top: 120px; } - .post:first-child { margin-top: 0; } - - .post-meta { - margin-top: 5px; - margin-bottom: 20px; - } - - .post-title { - position: relative; - font-size: $font-size-headings-base; - font-weight: 400; - +mobile() { font-size: $font-size-headings-smaller; } - +desktop-large() { font-size: $font-size-headings-large; } - } - .post-title:hover:before { background: $black-deep; } - - .post-body img { margin: 0; } - - .post-tags { - text-align: left; - a { - padding: 1px 5px; - background: $whitesmoke; - border-bottom: none; - } - a:hover { background: $grey-light; } - } - .post-nav { margin-top: 40px; } -} - -.post-button { - margin-top: 20px; - text-align: left; - - a { - margin: 0 8px 8px 0 !important; - padding: 0; - font-size: $font-size-base; - color: $grey-dim; - background: none; - border: none; - border-bottom: 2px solid $grey-dim; - transition-property: border; - - +mobile() { font-size: $font-size-small; } - +desktop-large() { font-size: $font-size-large; } - - - &:hover { border-bottom-color: $black-deep; } - } -} diff --git a/themes/next/source/css/_schemes/Mist/_search.styl b/themes/next/source/css/_schemes/Mist/_search.styl deleted file mode 100644 index 6cd7b2c..0000000 --- a/themes/next/source/css/_schemes/Mist/_search.styl +++ /dev/null @@ -1,5 +0,0 @@ -// Search -// -------------------------------------------------- -.site-search form { - display: none; -} \ No newline at end of file diff --git a/themes/next/source/css/_schemes/Mist/index.styl b/themes/next/source/css/_schemes/Mist/index.styl deleted file mode 100644 index 7d047f4..0000000 --- a/themes/next/source/css/_schemes/Mist/index.styl +++ /dev/null @@ -1,91 +0,0 @@ -// -// Mist scheme -// ================================================= - -@import "_base"; -@import "outline/outline"; -@import "_header"; -@import "_logo"; -@import "_menu"; -@import "_search.styl"; -@import "_posts-expanded"; -@import "sidebar/sidebar-blogroll"; - - -// Components -// -------------------------------------------------- -.btn { - padding: 0 10px; - border-width: 2px; - border-radius: 0; -} - -.headband { display: none; } - - -// Search -// -------------------------------------------------- -.site-search { - position: relative; - float: right; - margin-top: 5px; - padding-top: 3px; - - +mobile() { - float: none; - padding: 0 10px; - } -} - - -// Page - Container -// -------------------------------------------------- -.container .main-inner { - +mobile() { width: auto; } -} - - -// Page - Post details -// -------------------------------------------------- -.page-post-detail { - .post-title, - .post-meta { text-align: center; } - - .post-title:before { display: none; } - - .post-meta { margin-bottom: 60px; } -} - - -// Pagination -// -------------------------------------------------- -.pagination { - margin: 120px 0 0; - text-align: left; - - +mobile() { - margin: 80px 10px 0; - text-align: center; - } -} - -// Footer -// -------------------------------------------------- -.footer { - margin-top: 80px; - padding: 10px 0; - background: $whitesmoke; - color: $grey-dim; -} -.footer-inner { - margin: 0 auto; - text-align: left; - - +mobile() { - width: auto; - text-align: center; - } -} - -// Helpers -// -------------------------------------------------- diff --git a/themes/next/source/css/_schemes/Mist/outline/outline.styl b/themes/next/source/css/_schemes/Mist/outline/outline.styl deleted file mode 100644 index 12c0bae..0000000 --- a/themes/next/source/css/_schemes/Mist/outline/outline.styl +++ /dev/null @@ -1 +0,0 @@ -.main-inner { margin-top: 80px; } diff --git a/themes/next/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl b/themes/next/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl deleted file mode 100644 index 6db1ed7..0000000 --- a/themes/next/source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl +++ /dev/null @@ -1 +0,0 @@ -.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; } diff --git a/themes/next/source/css/_schemes/Muse/_layout.styl b/themes/next/source/css/_schemes/Muse/_layout.styl deleted file mode 100644 index 0107472..0000000 --- a/themes/next/source/css/_schemes/Muse/_layout.styl +++ /dev/null @@ -1,9 +0,0 @@ -.header-inner, .container .main-inner, .footer-inner { - +mobile() { width: auto; } -} - -// embed tag -embed { - display: block; - margin: 0px auto 25px auto; -} diff --git a/themes/next/source/css/_schemes/Muse/_logo.styl b/themes/next/source/css/_schemes/Muse/_logo.styl deleted file mode 100644 index 1d0437a..0000000 --- a/themes/next/source/css/_schemes/Muse/_logo.styl +++ /dev/null @@ -1,21 +0,0 @@ -.custom-logo { - .site-meta-headline { text-align: center; } - - .brand { background: none; } - - .site-title { - margin: 10px auto 0; - font-size: 24px; - color: $black-deep; - a { border: none; } - } - - -} - -.custom-logo-image { - margin: 0 auto; - padding: 5px; - max-width: 150px; - background: white; -} diff --git a/themes/next/source/css/_schemes/Muse/_menu.styl b/themes/next/source/css/_schemes/Muse/_menu.styl deleted file mode 100644 index 246932a..0000000 --- a/themes/next/source/css/_schemes/Muse/_menu.styl +++ /dev/null @@ -1,33 +0,0 @@ -.site-nav { - +mobile() { - position: absolute; - left: 0; - top: 52px; - margin: 0; - width: 100%; - padding: 0; - background: white; - border-bottom: 1px solid $gray-lighter; - z-index: 1; - } -} - -.menu { - +mobile() { text-align: left; } -} -.menu .menu-item { - +mobile() { - display: block; - margin: 0 10px; - vertical-align: top; - } - - br { - +mobile() { display: none; } - } - - a { - +mobile() { padding: 5px 10px; } - } - .fa { margin-right: 0; } -} diff --git a/themes/next/source/css/_schemes/Muse/_search.styl b/themes/next/source/css/_schemes/Muse/_search.styl deleted file mode 100644 index 6cd7b2c..0000000 --- a/themes/next/source/css/_schemes/Muse/_search.styl +++ /dev/null @@ -1,5 +0,0 @@ -// Search -// -------------------------------------------------- -.site-search form { - display: none; -} \ No newline at end of file diff --git a/themes/next/source/css/_schemes/Muse/index.styl b/themes/next/source/css/_schemes/Muse/index.styl deleted file mode 100644 index 35effe8..0000000 --- a/themes/next/source/css/_schemes/Muse/index.styl +++ /dev/null @@ -1,5 +0,0 @@ -@import "_layout.styl"; -@import "_logo.styl"; -@import "_menu.styl"; -@import "_search.styl"; -@import "sidebar/sidebar-blogroll"; diff --git a/themes/next/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl b/themes/next/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl deleted file mode 100644 index 6db1ed7..0000000 --- a/themes/next/source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl +++ /dev/null @@ -1 +0,0 @@ -.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; } diff --git a/themes/next/source/css/_schemes/Pisces/_brand.styl b/themes/next/source/css/_schemes/Pisces/_brand.styl deleted file mode 100644 index c85ee8f..0000000 --- a/themes/next/source/css/_schemes/Pisces/_brand.styl +++ /dev/null @@ -1,30 +0,0 @@ -.site-brand-wrapper { - position: relative; -} - -.site-meta { - padding: 20px 0; - color: white; - background: $black-deep; - - +tablet() { - box-shadow: 0 0 16px rgba(0,0,0,0.5); - } - +mobile() { - box-shadow: 0 0 16px rgba(0,0,0,0.5); - } -} - -.brand { - padding: 0; - background: none; - - &:hover { color: white; } -} - -.site-subtitle { - margin: 10px 10px 0; - font-weight: initial; -} - -.site-search form { display: none; } diff --git a/themes/next/source/css/_schemes/Pisces/_layout.styl b/themes/next/source/css/_schemes/Pisces/_layout.styl deleted file mode 100644 index fbc2238..0000000 --- a/themes/next/source/css/_schemes/Pisces/_layout.styl +++ /dev/null @@ -1,130 +0,0 @@ -.header { - position: relative; - margin: 0 auto; - width: $main-desktop; - - +tablet() { - width: auto; - } - +mobile() { - width: auto; - } -} - -.header-inner { - position: absolute; - top: 0; - overflow: hidden; - padding: 0; - width: 240px; - background: white; - box-shadow: $box-shadow-inner; - border-radius: $border-radius-inner; - - +desktop-large() { - .container & { width: 240px; } - } - +tablet() { - position: relative; - width: auto; - border-radius: initial; - } - +mobile() { - position: relative; - width: auto; - border-radius: initial; - } -} - -.main { - clearfix(); - +tablet() { - padding-bottom: 100px; - } - +mobile() { - padding-bottom: 100px; - } -} - -.container .main-inner { - width: $main-desktop; - - +tablet() { - width: auto; - } - +mobile() { - width: auto; - } -} - -.content-wrap { - float: right; - box-sizing: border-box; - padding: $content-desktop-padding; - width: $content-desktop; - background: rgba(255,255,255, 0.6); - min-height: 700px; - box-shadow: $box-shadow-inner; - border-radius: $border-radius-inner; - - +tablet() { - width: 100%; - padding: 20px; - border-radius: initial; - } - +mobile() { - width: 100%; - padding: 20px; - min-height: auto; - border-radius: initial; - } -} - -.sidebar { - position: static; - float: left; - margin-top: 300px; - width: $sidebar-desktop; - background: $body-bg-color; - box-shadow: none; - - +tablet() { - display: none; - } - +mobile() { - display: none; - } -} - -.sidebar-toggle { display: none; } - - -.footer-inner { - width: $main-desktop; - padding-left: 260px; - - +tablet() { - width: auto; - padding-left: 0 !important; - padding-right: 0 !important; - } - +mobile() { - width: auto; - padding-left: 0 !important; - padding-right: 0 !important; - } -} - - - -.sidebar-position-right { - .header-inner { right: 0; } - .content-wrap { float: left; } - .sidebar { float: right; } - - .footer-inner { - padding-left: 0; - padding-right: 260px; - } -} - diff --git a/themes/next/source/css/_schemes/Pisces/_menu.styl b/themes/next/source/css/_schemes/Pisces/_menu.styl deleted file mode 100644 index 21986ac..0000000 --- a/themes/next/source/css/_schemes/Pisces/_menu.styl +++ /dev/null @@ -1,67 +0,0 @@ -.site-nav { - border-top: none; - - +tablet() { - display: none !important; - } -} - -.site-nav-on { - +tablet() { - display: block !important; - } -} - -.menu .menu-item { - display: block; - margin: 0; - - a { - position: relative; - box-sizing: border-box; - padding: 5px 20px; - text-align: left; - line-height: inherit; - transition-property: background-color; - the-transition(); - - &:hover { - background: #f9f9f9; - border-bottom-color: white; - } - } - - br { display: none; } -} - -.menu-item-active a { - @extend .menu .menu-item a:hover; - - &:after { - content: " "; - position: absolute; - top: 50%; - margin-top: -3px; - right: 15px; - width: 6px; - height: 6px; - border-radius: 50%; - background-color: $grey; - } -} - -.btn-bar { - background-color: white; -} - -.site-nav-toggle { - left: 20px; - top: 50%; - - -webkit-transform: translateY(-50%); - transform: translateY(-50%); - - +tablet() { - display: block; - } -} diff --git a/themes/next/source/css/_schemes/Pisces/_posts.styl b/themes/next/source/css/_schemes/Pisces/_posts.styl deleted file mode 100644 index 498409d..0000000 --- a/themes/next/source/css/_schemes/Pisces/_posts.styl +++ /dev/null @@ -1,5 +0,0 @@ -.post-body { - +mobile() { - text-align: justify; - } -} diff --git a/themes/next/source/css/_schemes/Pisces/_sidebar.styl b/themes/next/source/css/_schemes/Pisces/_sidebar.styl deleted file mode 100644 index 299b970..0000000 --- a/themes/next/source/css/_schemes/Pisces/_sidebar.styl +++ /dev/null @@ -1,107 +0,0 @@ -.use-motion .sidebar .motion-element { opacity: 1; } - -.sidebar { - display: none; - right: auto; - bottom: auto; - - // Do NOT delete this line - // or Affix (position: fixed) will not work in Google Chrome. - -webkit-transform: none; -} - - -.sidebar-inner { - box-sizing: border-box; - width: 240px; - color: $text-color; - background: white; - box-shadow: $box-shadow; - border-radius: $border-radius; - - &.affix { - position: fixed; - top: $sidebar-offset-float; - } -} - -.site-overview { - margin: 0 2px; - text-align: left; -} - -.site-author { - clearfix(); -} - -.sidebar a { - color: $black-light; - - &:hover { color: $black-deep; } -} - -.links-of-author-item { - a:before { display: none; } - a { - border-bottom: none; - text-decoration: underline; - } -} - -.feed-link { - border-top: 1px dotted $grey-light; - border-bottom: 1px dotted $grey-light; - text-align: center; -} - -.feed-link a { - display: block; - color: $orange; - border: none; - - &:hover { - background: none; - color: darken($orange, 20%); - - i { color: darken($orange, 20%); } - } -} - -.links-of-author { - clearfix(); -} -.links-of-author-item { - sidebar-inline-links-item(); - - a { - display: block; - text-decoration: none; - - &:hover { - border-radius: 4px; - background: $gainsboro; - } - } - - .fa { - margin-right: 2px; - font-size: 16px; - } - .fa-globe { font-size: 15px; } -} - - -.links-of-blogroll { - margin-top: 20px; - padding: 3px 0 0; - border-top: 1px dotted $grey-light; -} -.links-of-blogroll-title { margin-top: 0; } -.links-of-blogroll-item { padding: 0; } -.links-of-blogroll-inline { - clearfix(); - - .links-of-blogroll-item { - sidebar-inline-links-item(); - } -} diff --git a/themes/next/source/css/_schemes/Pisces/index.styl b/themes/next/source/css/_schemes/Pisces/index.styl deleted file mode 100644 index cda4936..0000000 --- a/themes/next/source/css/_schemes/Pisces/index.styl +++ /dev/null @@ -1,5 +0,0 @@ -@import "_layout"; -@import "_brand"; -@import "_menu"; -@import "_sidebar"; -@import "_posts"; diff --git a/themes/next/source/css/_variables/Gemini.styl b/themes/next/source/css/_variables/Gemini.styl deleted file mode 100644 index 3759a1b..0000000 --- a/themes/next/source/css/_variables/Gemini.styl +++ /dev/null @@ -1,19 +0,0 @@ -// Variables of Gemini scheme -// ================================================= - -@import "Pisces.styl"; - -// Settings for some of the most global styles. -// -------------------------------------------------- -$body-bg-color = #eee -$main-desktop = 75%; -$sidebar-desktop = 240 -$content-desktop = calc(100% - 252px); - -// Borders. -// -------------------------------------------------- -$box-shadow-inner = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12); -$box-shadow = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12), 0 -1px .5px 0 rgba(0,0,0,.09); - -$border-radius-inner = initial; -$border-radius = initial; diff --git a/themes/next/source/css/_variables/Mist.styl b/themes/next/source/css/_variables/Mist.styl deleted file mode 100644 index 92def6d..0000000 --- a/themes/next/source/css/_variables/Mist.styl +++ /dev/null @@ -1,13 +0,0 @@ -// Variables of Mist scheme -// ================================================= - -$font-size-headings-base = 26px - -$brand-color = $black-deep -$brand-hover-color = $brand-color - -$site-meta-text-align = left -$posts-collapse-left = 0 - -$read-more-color = $link-color -$read-more-bg-color = transparent diff --git a/themes/next/source/css/_variables/Muse.styl b/themes/next/source/css/_variables/Muse.styl deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/source/css/_variables/Pisces.styl b/themes/next/source/css/_variables/Pisces.styl deleted file mode 100644 index f5db756..0000000 --- a/themes/next/source/css/_variables/Pisces.styl +++ /dev/null @@ -1,77 +0,0 @@ -// Variables of Pisces scheme -// ================================================= - -// Settings for some of the most global styles. -// -------------------------------------------------- -$body-bg-color = #f5f7f9 - - -// Borders -// -------------------------------------------------- -$box-shadow-inner = initial; -$box-shadow = initial; - -$border-radius-inner = initial; -$border-radius = initial; - - -// Header -// -------------------------------------------------- -$subtitle-color = $gray-lighter - -// Sidebar -// -------------------------------------------------- -$sidebar-offset-float = unit(hexo-config('sidebar.offset_float'), px) if hexo-config('sidebar.offset_float') is a 'unit' - -$sidebar-nav-hover-color = $orange -$sidebar-highlight = $orange - -$site-author-image-width = 120px -$site-author-image-border-width = 1px -$site-author-image-border-color = $gainsboro - -$site-author-name-margin = 0 -$site-author-name-color = $black-deep -$site-author-name-align = center -$site-author-name-weight = $font-weight-bold - -$site-description-font-size = 13px -$site-description-color = $grey-dark -$site-description-margin-top = 0 -$site-description-align = center - -$site-state-item-count-font-size = 16px -$site-state-item-name-font-size = 13px -$site-state-item-name-color = $grey-dark -$site-state-item-border-color = $gainsboro - -$toc-link-color = $grey-dim -$toc-link-border-color = $grey-light -$toc-link-hover-color = black -$toc-link-hover-border-color = black -$toc-link-active-color = $sidebar-highlight -$toc-link-active-border-color = $sidebar-highlight -$toc-link-active-current-color = $sidebar-highlight -$toc-link-active-current-border-color = $sidebar-highlight - - -// Components -// -------------------------------------------------- - -// Button -$read-more-color = $text-color -$read-more-bg-color = white -$read-more-border-radius = 2px -$btn-default-border-color = $text-color -$btn-default-hover-color = white -$btn-default-hover-bg = $black-deep - -// Full Image Tag -$full-image-width = 118% -$full-image-margin-horizontal = -9% -$full-image-margin-vertical = 0 - -// Back to top -$b2t-opacity = .6 -$b2t-position-bottom = -100px -$b2t-position-bottom-on = 30px diff --git a/themes/next/source/css/_variables/base.styl b/themes/next/source/css/_variables/base.styl deleted file mode 100644 index 44a028a..0000000 --- a/themes/next/source/css/_variables/base.styl +++ /dev/null @@ -1,418 +0,0 @@ -// -// Variables -// ================================================= - - - -// Colors -// colors for use across theme. -// -------------------------------------------------- - -$whitesmoke = #f5f5f5 -$gainsboro = #eee -$gray-lighter = #ddd -$grey-light = #ccc -$grey = #bbb -$grey-dark = #999 -$grey-dim = #666 -$black-light = #555 -$black-dim = #333 -$black-deep = #222 -$red = #ff2a2a -$blue-bright = #87daff -$blue = #0684bd -$blue-deep = #262a30 -$orange = #fc6423 - - - -// Scaffolding -// Settings for some of the most global styles. -// -------------------------------------------------- - -// Global text color on -$text-color = $black-light - -// Global link color. -$link-color = $black-light -$link-hover-color = $black-deep -$link-decoration-color = $grey-light -$link-decoration-hover-color = $black-deep - -// Global border color. -$border-color = $grey-light - -// Background color for -$body-bg-color = white - -// Selection -$selection-bg = $blue-deep -$selection-color = white - - - -// Typography -// Font, line-height, and elements colors. -// -------------------------------------------------- - - -get_font_family(config) { - custom_family = hexo-config('font.' + config + '.family') - return custom_family is a 'string' ? custom_family : null -} - -// Font families. -$font-family-chinese = "PingFang SC", "Microsoft YaHei" - -$font-family-base = $font-family-chinese, sans-serif -$font-family-base = get_font_family('global'), $font-family-chinese, sans-serif if get_font_family('global') - -$font-family-logo = $font-family-base -$font-family-logo = get_font_family('logo'), $font-family-base if get_font_family('logo') - -$font-family-headings = $font-family-base -$font-family-headings = get_font_family('headings'), $font-family-base if get_font_family('headings') - -$font-family-posts = $font-family-base -$font-family-posts = get_font_family('posts'), $font-family-base if get_font_family('posts') - -$font-family-monospace = consolas, Menlo, $font-family-chinese, monospace -$font-family-monospace = get_font_family('codes'), consolas, Menlo, $font-family-chinese, monospace if get_font_family('codes') - -$font-family-icons = 'FontAwesome' - - -// Font Weight -$font-weight-lighter = 200 -$font-weight-light = 300 -$font-weight-normal = 400 -$font-weight-bold = 600 -$font-weight-bolder = 700 - - -// Font size -$font-size-base = 14px -$font-size-small = $font-size-base - 2px -$font-size-smaller = $font-size-base - 4px -$font-size-large = $font-size-base + 2px -$font-size-larger = $font-size-base + 4px - - -// Headings font size -$font-size-headings-step = 2px -$font-size-headings-base = 24px -$font-size-headings-small = $font-size-headings-base - $font-size-headings-step -$font-size-headings-smaller = $font-size-headings-small - $font-size-headings-step -$font-size-headings-large = $font-size-headings-base + $font-size-headings-step -$font-size-headings-larger = $font-size-headings-large + $font-size-headings-step - -// Global line height -$line-height-base = 2 -$line-height-code-block = 1.6 // Can't be less than 1.3 - - - -// Z-index master list -// -------------------------------------------------- -$zindex-bottom = -1 -$zindex-1 = 1010 -$zindex-2 = 1020 -$zindex-3 = 1030 -$zindex-4 = 1040 -$zindex-5 = 1050 - - - -// Table -// -------------------------------------------------- -$table-width = 100% -$table-border-color = $gray-lighter -$table-font-size = 14px -$table-content-alignment = left -$table-content-vertical = middle -$table-th-font-weight = 700 -$table-cell-padding = 8px -$table-cell-border-right-color = $gainsboro -$table-cell-border-bottom-color = $gray-lighter -$table-row-odd-bg-color = #f9f9f9 -$table-row-hover-bg-color = $whitesmoke - - - -// Code & Code Blocks -// -------------------------------------------------- -$code-font-family = $font-family-monospace -$code-font-size = 13px -$code-font-size = unit(hexo-config('font.codes.size'), px) if hexo-config('font.codes.size') is a 'unit' -$code-border-radius = 3px -$code-foreground = $black-light -$code-background = $gainsboro - - - -// Buttons -// -------------------------------------------------- - -$btn-font-weight = normal - -$btn-default-radius = 0 -$btn-default-bg = $black-deep -$btn-default-color = white -$btn-default-font-size = 14px -$btn-default-border-width = 2px -$btn-default-border-color = $black-deep -$btn-default-hover-bg = white -$btn-default-hover-color = $black-deep -$btn-default-hover-border-color = $black-deep - - - -// Pagination -// -------------------------------------------------- - -$pagination-border = $gainsboro - -$pagination-link-bg = transparent -$pagination-link-color = $link-color -$pagination-link-border = $gainsboro - -$pagination-link-hover-bg = transparent -$pagination-link-hover-color = $link-color -$pagination-link-hover-border = $black-deep - -$pagination-active-bg = $grey-light -$pagination-active-color = white -$pagination-active-border = $grey-light - - - -// Layout sizes -// -------------------------------------------------- - -$main-desktop = 960px -$main-desktop-large = 1200px - -$content-desktop = 700px -$content-desktop-large = 900px -$content-desktop-padding = 40px - -$sidebar-desktop = 240px - -$footer-height = 50px - -$gap-between-main-and-footer = 100px - - - -// Headband -// -------------------------------------------------- -$headband-height = 3px -$headband-bg = $black-deep - - - -// Section Header -// Variables for header section elements. -// -------------------------------------------------- - -$head-bg = transparent - -// Site Meta -$site-meta-text-align = center -$brand-color = white -$brand-hover-color = white -$brand-bg = $black-deep - -$logo-font-size = 20px -$logo-font-size = unit(hexo-config('font.logo.size'), px) if hexo-config('font.logo.size') is a 'unit' - -$site-subtitle-color = $grey-dark -$subtitle-font-size = 13px -$subtitle-color = $grey-dark - -// Menu -$menu-link-border = transparent -$menu-link-hover-border = $black-deep - - - -// Posts Expand -// -------------------------------------------------- -$posts-expand-title-font-weight = $font-weight-normal -$post-copyright = { - margin: 2em 0 0, - padding: .5em 1em, - bg: #f9f9f9, - border: { - width: 3px, - style: solid, - color: #ff1700 - } -} - - -// Posts Collpase -// -------------------------------------------------- -$posts-collapse-left = 55px -$posts-collapse-left-mobile = 5px - -$read-more-color = white -$read-more-font-size = 14px -$read-more-bg-color = $black-deep -$read-more-border-radius = 0 - - - - -// Sidebar -// Variables for sidebar section elements. -// -------------------------------------------------- -$sidebar-nav-color = $black-light -$sidebar-nav-hover-color = $whitesmoke -$sidebar-highlight = $blue-bright - -$site-author-image-padding = 2px -$site-author-image-width = 96px -$site-author-image-height = auto -$site-author-image-border-width = 2px -$site-author-image-border-color = $black-dim - -$site-author-name-margin = 5px 0 0 -$site-author-name-color = $whitesmoke -$site-author-name-align = center -$site-author-name-weight = normal - -$site-description-font-size = 14px -$site-description-color = $grey-dark -$site-description-margin-top = 5px -$site-description-align = center - -$site-state-align = center -$site-state-item-count-font-size = 18px -$site-state-item-count-color = inherit -$site-state-item-name-font-size = 13px -$site-state-item-name-color = inherit -$site-state-item-border-color = $black-dim - -$toc-link-color = $grey-dark -$toc-link-border-color = $black-light -$toc-link-hover-color = $grey-light -$toc-link-hover-border-color = $grey-light -$toc-link-active-color = $sidebar-highlight -$toc-link-active-border-color = $sidebar-highlight -$toc-link-active-current-color = $sidebar-highlight -$toc-link-active-current-border-color = $sidebar-highlight - - -// Components -// -------------------------------------------------- - -// Back to top -$b2t-opacity = 1 -$b2t-position-bottom = -100px -$b2t-position-bottom-on = 19px -$b2t-position-right = 30px -$b2t-font-size = 12px -$b2t-color = white -$b2t-bg-color = $black-deep - -// full-image -$full-image-width = 110% -$full-image-margin-horizontal = -5% -$full-image-margin-vertical = 25px - -// .post-expand .post-eof -// In Muse scheme, margin above and below the post separator -$post-eof-margin-top = 80px // or 160px for more white space -$post-eof-margin-bottom = 60px // or 120px for less white space - - -// Iconography -// Icons SVG Base64 -// -------------------------------------------------- - -// blockquote-center icon -$center-quote-left = '../images/quote-l.svg' -$center-quote-right = '../images/quote-r.svg' - - -// Note colors -// -------------------------------------------------- -// Read note light_bg_offset from NexT config and set in "lbg%" to use it as string variable. -hexo-config('note.light_bg_offset') is a 'unit' ? (lbg = unit(hexo-config('note.light_bg_offset'),"%")) : (lbg = 0) - -// Default -$note-default-border = #777 -$note-default-bg = lighten(spin($note-default-border, 0), 94% + lbg) -$note-default-text = $note-default-border -$note-default-icon = "\f0a9" - -$note-modern-default-border = #e1e1e1 -$note-modern-default-bg = lighten(spin($note-modern-default-border, 10), 60% + (lbg * 4)) -$note-modern-default-text = $grey-dim -$note-modern-default-hover = darken(spin($note-modern-default-text, -10), 32%) - -// Primary -$note-primary-border = #6f42c1 -$note-primary-bg = lighten(spin($note-primary-border, 10), 92% + lbg) -$note-primary-text = $note-primary-border -$note-primary-icon = "\f055" - -$note-modern-primary-border = #e1c2ff -$note-modern-primary-bg = lighten(spin($note-modern-primary-border, 10), 40% + (lbg * 4)) -$note-modern-primary-text = #6f42c1 -$note-modern-primary-hover = darken(spin($note-modern-primary-text, -10), 22%) - -// Info -$note-info-border = #428bca -$note-info-bg = lighten(spin($note-info-border, -10), 91% + lbg) -$note-info-text = $note-info-border -$note-info-icon = "\f05a" - -$note-modern-info-border = #b3e5ef -$note-modern-info-bg = lighten(spin($note-modern-info-border, 10), 50% + (lbg * 4)) -$note-modern-info-text = #31708f -$note-modern-info-hover = darken(spin($note-modern-info-text, -10), 32%) - -// Success -$note-success-border = #5cb85c -$note-success-bg = lighten(spin($note-success-border, 10), 90% + lbg) -$note-success-text = $note-success-border -$note-success-icon = "\f058" - -$note-modern-success-border = #d0e6be -$note-modern-success-bg = lighten(spin($note-modern-success-border, 10), 40% + (lbg * 4)) -$note-modern-success-text = #3c763d -$note-modern-success-hover = darken(spin($note-modern-success-text, -10), 27%) - -// Warning -$note-warning-border = #f0ad4e -$note-warning-bg = lighten(spin($note-warning-border, 10), 88% + lbg) -$note-warning-text = $note-warning-border -$note-warning-icon = "\f06a" - -$note-modern-warning-border = #fae4cd -$note-modern-warning-bg = lighten(spin($note-modern-warning-border, 10), 43% + (lbg * 4)) -$note-modern-warning-text = #8a6d3b -$note-modern-warning-hover = darken(spin($note-modern-warning-text, -10), 18%) - -// Danger -$note-danger-border = #d9534f -$note-danger-bg = lighten(spin($note-danger-border, -10), 92% + lbg) -$note-danger-text = $note-danger-border -$note-danger-icon = "\f056" - -$note-modern-danger-border = #ebcdd2 -$note-modern-danger-bg = lighten(spin($note-modern-danger-border, 10), 35% + (lbg * 4)) -$note-modern-danger-text = #a94442 -$note-modern-danger-hover = darken(spin($note-modern-danger-text, -10), 22%) - - -// Label colors -// -------------------------------------------------- -$label-default = lighten(spin($note-default-border, 0), 89% + lbg) -$label-primary = lighten(spin($note-primary-border, 10), 87% + lbg) -$label-info = lighten(spin($note-info-border, -10), 86% + lbg) -$label-success = lighten(spin($note-success-border, 10), 85% + lbg) -$label-warning = lighten(spin($note-warning-border, 10), 83% + lbg) -$label-danger = lighten(spin($note-danger-border, -10), 87% + lbg) diff --git a/themes/next/source/css/_variables/custom.styl b/themes/next/source/css/_variables/custom.styl deleted file mode 100644 index 3e839b9..0000000 --- a/themes/next/source/css/_variables/custom.styl +++ /dev/null @@ -1,14 +0,0 @@ -// 标题,修改成你期望的字体族 -$font-family-headings = Georgia, sans - -// 修改成你期望的字体族 -$font-family-base = "Microsoft YaHei", Verdana, sans-serif - -// 代码字体 -$code-font-family = "Input Mono", "PT Mono", Consolas, Monaco, Menlo, monospace - -// 正文字体的大小 -$font-size-base = 16px - -// 代码字体的大小 -$code-font-size = 13px \ No newline at end of file diff --git a/themes/next/source/css/main.styl b/themes/next/source/css/main.styl deleted file mode 100644 index d46298d..0000000 --- a/themes/next/source/css/main.styl +++ /dev/null @@ -1,45 +0,0 @@ -// CSS Style Guide: http://codeguide.co/#css - - - -$scheme = hexo-config('scheme') ? hexo-config('scheme') : 'Muse'; -$variables = base $scheme custom; -$mixins = base $scheme custom; - - - -// Variables Layer -// -------------------------------------------------- -for $variable in $variables - @import "_variables/" + $variable - - -// Mixins Layer -// -------------------------------------------------- -for $mixin in $mixins - @import "_mixins/" + $mixin; - - - -// Common Layer -// -------------------------------------------------- - -// Scaffolding -@import "_common/scaffolding"; - -// Layout -@import "_common/outline"; - -// Components -@import "_common/components"; - - -// Schemes Layer -// -------------------------------------------------- -@import "_schemes/" + $scheme; - - - -// Custom Layer -// -------------------------------------------------- -@import "_custom/custom"; diff --git a/themes/next/source/fonts/.gitkeep b/themes/next/source/fonts/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/themes/next/source/lib/fancybox/source/blank.gif b/themes/next/source/lib/fancybox/source/blank.gif deleted file mode 100644 index 35d42e8..0000000 Binary files a/themes/next/source/lib/fancybox/source/blank.gif and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/fancybox_loading.gif b/themes/next/source/lib/fancybox/source/fancybox_loading.gif deleted file mode 100644 index a03a40c..0000000 Binary files a/themes/next/source/lib/fancybox/source/fancybox_loading.gif and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/fancybox_loading@2x.gif b/themes/next/source/lib/fancybox/source/fancybox_loading@2x.gif deleted file mode 100644 index 9205aeb..0000000 Binary files a/themes/next/source/lib/fancybox/source/fancybox_loading@2x.gif and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/fancybox_overlay.png b/themes/next/source/lib/fancybox/source/fancybox_overlay.png deleted file mode 100644 index a439139..0000000 Binary files a/themes/next/source/lib/fancybox/source/fancybox_overlay.png and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/fancybox_sprite.png b/themes/next/source/lib/fancybox/source/fancybox_sprite.png deleted file mode 100644 index fd8d5ca..0000000 Binary files a/themes/next/source/lib/fancybox/source/fancybox_sprite.png and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/fancybox_sprite@2x.png b/themes/next/source/lib/fancybox/source/fancybox_sprite@2x.png deleted file mode 100644 index d0e4779..0000000 Binary files a/themes/next/source/lib/fancybox/source/fancybox_sprite@2x.png and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/helpers/fancybox_buttons.png b/themes/next/source/lib/fancybox/source/helpers/fancybox_buttons.png deleted file mode 100644 index 0787207..0000000 Binary files a/themes/next/source/lib/fancybox/source/helpers/fancybox_buttons.png and /dev/null differ diff --git a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-buttons.css b/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-buttons.css deleted file mode 100644 index a26273a..0000000 --- a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-buttons.css +++ /dev/null @@ -1,97 +0,0 @@ -#fancybox-buttons { - position: fixed; - left: 0; - width: 100%; - z-index: 8050; -} - -#fancybox-buttons.top { - top: 10px; -} - -#fancybox-buttons.bottom { - bottom: 10px; -} - -#fancybox-buttons ul { - display: block; - width: 166px; - height: 30px; - margin: 0 auto; - padding: 0; - list-style: none; - border: 1px solid #111; - border-radius: 3px; - -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); - -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); - box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); - background: rgb(50,50,50); - background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); - background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); -} - -#fancybox-buttons ul li { - float: left; - margin: 0; - padding: 0; -} - -#fancybox-buttons a { - display: block; - width: 30px; - height: 30px; - text-indent: -9999px; - background-color: transparent; - background-image: url('fancybox_buttons.png'); - background-repeat: no-repeat; - outline: none; - opacity: 0.8; -} - -#fancybox-buttons a:hover { - opacity: 1; -} - -#fancybox-buttons a.btnPrev { - background-position: 5px 0; -} - -#fancybox-buttons a.btnNext { - background-position: -33px 0; - border-right: 1px solid #3e3e3e; -} - -#fancybox-buttons a.btnPlay { - background-position: 0 -30px; -} - -#fancybox-buttons a.btnPlayOn { - background-position: -30px -30px; -} - -#fancybox-buttons a.btnToggle { - background-position: 3px -60px; - border-left: 1px solid #111; - border-right: 1px solid #3e3e3e; - width: 35px -} - -#fancybox-buttons a.btnToggleOn { - background-position: -27px -60px; -} - -#fancybox-buttons a.btnClose { - border-left: 1px solid #111; - width: 35px; - background-position: -56px 0px; -} - -#fancybox-buttons a.btnDisabled { - opacity : 0.4; - cursor: default; -} \ No newline at end of file diff --git a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.css b/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.css deleted file mode 100644 index 63d2943..0000000 --- a/themes/next/source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.css +++ /dev/null @@ -1,55 +0,0 @@ -#fancybox-thumbs { - position: fixed; - left: 0; - width: 100%; - overflow: hidden; - z-index: 8050; -} - -#fancybox-thumbs.bottom { - bottom: 2px; -} - -#fancybox-thumbs.top { - top: 2px; -} - -#fancybox-thumbs ul { - position: relative; - list-style: none; - margin: 0; - padding: 0; -} - -#fancybox-thumbs ul li { - float: left; - padding: 1px; - opacity: 0.5; -} - -#fancybox-thumbs ul li.active { - opacity: 0.75; - padding: 0; - border: 1px solid #fff; -} - -#fancybox-thumbs ul li:hover { - opacity: 1; -} - -#fancybox-thumbs ul li a { - display: block; - position: relative; - overflow: hidden; - border: 1px solid #222; - background: #111; - outline: none; -} - -#fancybox-thumbs ul li img { - display: block; - position: relative; - border: 0; - padding: 0; - max-width: none; -} \ No newline at end of file diff --git a/themes/next/source/lib/fastclick/.bower.json b/themes/next/source/lib/fastclick/.bower.json deleted file mode 100644 index cfabed7..0000000 --- a/themes/next/source/lib/fastclick/.bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "fastclick", - "main": "lib/fastclick.js", - "ignore": [ - "**/.*", - "component.json", - "package.json", - "Makefile", - "tests", - "examples" - ], - "homepage": "https://github.com/ftlabs/fastclick", - "version": "1.0.6", - "_release": "1.0.6", - "_resolution": { - "type": "version", - "tag": "v1.0.6", - "commit": "2ac7258407619398005ca720596f0d36ce66a6c8" - }, - "_source": "git://github.com/ftlabs/fastclick.git", - "_target": "~1.0.6", - "_originalSource": "fastclick", - "_direct": true -} \ No newline at end of file diff --git a/themes/next/source/lib/fastclick/README.md b/themes/next/source/lib/fastclick/README.md deleted file mode 100644 index 074895d..0000000 --- a/themes/next/source/lib/fastclick/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# FastClick # - -FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a `click` event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic. - -FastClick is developed by [FT Labs](http://labs.ft.com/), part of the Financial Times. - -[Explication en français](http://maxime.sh/2013/02/supprimer-le-lag-des-clics-sur-mobile-avec-fastclick/). - -[日本語で説明](https://developer.mozilla.org/ja/docs/Mozilla/Firefox_OS/Apps/Tips_and_techniques#Make_events_immediate)。 - -## Why does the delay exist? ## - -According to [Google](https://developers.google.com/mobile/articles/fast_buttons): - -> ...mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap. - -## Compatibility ## - -The library has been deployed as part of the [FT Web App](http://app.ft.com/) and is tried and tested on the following mobile browsers: - -* Mobile Safari on iOS 3 and upwards -* Chrome on iOS 5 and upwards -* Chrome on Android (ICS) -* Opera Mobile 11.5 and upwards -* Android Browser since Android 2 -* PlayBook OS 1 and upwards - -## When it isn't needed ## - -FastClick doesn't attach any listeners on desktop browsers. - -Chrome 32+ on Android with `width=device-width` in the [viewport meta tag](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag) doesn't have a 300ms delay, therefore listeners aren't attached. - -```html - -``` - -Same goes for Chrome on Android (all versions) with `user-scalable=no` in the viewport meta tag. But be aware that `user-scalable=no` also disables pinch zooming, which may be an accessibility concern. - -For IE11+, you can use `touch-action: manipulation;` to disable double-tap-to-zoom on certain elements (like links and buttons). For IE10 use `-ms-touch-action: manipulation`. - -## Usage ## - -Include fastclick.js in your JavaScript bundle or add it to your HTML page like this: - -```html - -``` - -The script must be loaded prior to instantiating FastClick on any element of the page. - -To instantiate FastClick on the `body`, which is the recommended method of use: - -```js -if ('addEventListener' in document) { - document.addEventListener('DOMContentLoaded', function() { - FastClick.attach(document.body); - }, false); -} -``` - -Or, if you're using jQuery: - -```js -$(function() { - FastClick.attach(document.body); -}); -``` - -If you're using Browserify or another CommonJS-style module system, the `FastClick.attach` function will be returned when you call `require('fastclick')`. As a result, the easiest way to use FastClick with these loaders is as follows: - -```js -var attachFastClick = require('fastclick'); -attachFastClick(document.body); -``` - -### Minified ### - -Run `make` to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to `build/fastclick.min.js` or you can [download a pre-minified version](http://build.origami.ft.com/bundles/js?modules=fastclick). - -Note: the pre-minified version is built using [our build service](http://origami.ft.com/docs/developer-guide/build-service/) which exposes the `FastClick` object through `Origami.fastclick` and will have the Browserify/CommonJS API (see above). - -```js -var attachFastClick = Origami.fastclick; -attachFastClick(document.body); -``` - -### AMD ### - -FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as [RequireJS](http://requirejs.org/). Note that when using the AMD style require, the full `FastClick` object will be returned, _not_ `FastClick.attach` - -```js -var FastClick = require('fastclick'); -FastClick.attach(document.body, options); -``` - -### Package managers ### - -You can install FastClick using [Component](https://github.com/component/component), [npm](https://npmjs.org/package/fastclick) or [Bower](http://bower.io/). - -For Ruby, there's a third-party gem called [fastclick-rails](http://rubygems.org/gems/fastclick-rails). For .NET there's a [NuGet package](http://nuget.org/packages/FastClick). - -## Advanced ## - -### Ignore certain elements with `needsclick` ### - -Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the `needsclick` class. -```html -Ignored by FastClick -``` - -#### Use case 1: non-synthetic click required #### - -Internally, FastClick uses `document.createEvent` to fire a synthetic `click` event as soon as `touchend` is fired by the browser. It then suppresses the additional `click` event created by the browser after that. In some cases, the non-synthetic `click` event created by the browser is required, as described in the [triggering focus example](http://ftlabs.github.com/fastclick/examples/focus.html). - -This is where the `needsclick` class comes in. Add the class to any element that requires a non-synthetic click. - -#### Use case 2: Twitter Bootstrap 2.2.2 dropdowns #### - -Another example of when to use the `needsclick` class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own `touchstart` listener for dropdowns, so you want to tell FastClick to ignore those. If you don't, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after. - -```html -Dropdown -``` - -## Examples ## - -FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this: - -* [basic use](http://ftlabs.github.com/fastclick/examples/layer.html) showing the increase in perceived responsiveness -* [triggering focus](http://ftlabs.github.com/fastclick/examples/focus.html) on an input element from a `click` handler -* [input element](http://ftlabs.github.com/fastclick/examples/input.html) which never receives clicks but gets fast focus - -## Tests ## - -There are no automated tests. The files in `tests/` are manual reduced test cases. We've had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it's not so trivial to test. - -## Credits and collaboration ## - -FastClick is maintained by [Rowan Beentje](http://twitter.com/rowanbeentje), [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia) and [Matthew Andrews](http://twitter.com/andrewsmatt) at [FT Labs](http://labs.ft.com). All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request. diff --git a/themes/next/source/lib/fastclick/bower.json b/themes/next/source/lib/fastclick/bower.json deleted file mode 100644 index 18e1abd..0000000 --- a/themes/next/source/lib/fastclick/bower.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "fastclick", - "main": "lib/fastclick.js", - "ignore": [ - "**/.*", - "component.json", - "package.json", - "Makefile", - "tests", - "examples" - ] -} diff --git a/themes/next/source/lib/font-awesome/.bower.json b/themes/next/source/lib/font-awesome/.bower.json deleted file mode 100644 index fb98b1d..0000000 --- a/themes/next/source/lib/font-awesome/.bower.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "font-awesome", - "description": "Font Awesome", - "keywords": [], - "homepage": "http://fontawesome.io", - "dependencies": {}, - "devDependencies": {}, - "license": [ - "OFL-1.1", - "MIT", - "CC-BY-3.0" - ], - "main": [ - "less/font-awesome.less", - "scss/font-awesome.scss" - ], - "ignore": [ - "*/.*", - "*.json", - "src", - "*.yml", - "Gemfile", - "Gemfile.lock", - "*.md" - ], - "version": "4.7.0", - "_release": "4.7.0", - "_resolution": { - "type": "version", - "tag": "v4.7.0", - "commit": "a3fe90fa5f6fac55d197f9cbd18e3f57dafb716c" - }, - "_source": "https://github.com/FortAwesome/Font-Awesome.git", - "_target": "*", - "_originalSource": "fontawesome" -} \ No newline at end of file diff --git a/themes/next/source/lib/font-awesome/.gitignore b/themes/next/source/lib/font-awesome/.gitignore deleted file mode 100644 index 39c4f20..0000000 --- a/themes/next/source/lib/font-awesome/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -*.pyc -*.egg-info -*.db -*.db.old -*.swp -*.db-journal - -.coverage -.DS_Store -.installed.cfg -_gh_pages/* - -.idea/* -.svn/* -src/website/static/* -src/website/media/* - -bin -cfcache -develop-eggs -dist -downloads -eggs -parts -tmp -.sass-cache -node_modules - -src/website/settingslocal.py -stunnel.log - -.ruby-version -.bundle diff --git a/themes/next/source/lib/font-awesome/.npmignore b/themes/next/source/lib/font-awesome/.npmignore deleted file mode 100644 index 54a691f..0000000 --- a/themes/next/source/lib/font-awesome/.npmignore +++ /dev/null @@ -1,42 +0,0 @@ -*.pyc -*.egg-info -*.db -*.db.old -*.swp -*.db-journal - -.coverage -.DS_Store -.installed.cfg -_gh_pages/* - -.idea/* -.svn/* -src/website/static/* -src/website/media/* - -bin -cfcache -develop-eggs -dist -downloads -eggs -parts -tmp -.sass-cache -node_modules - -src/website/settingslocal.py -stunnel.log - -.ruby-version - -# don't need these in the npm package. -src/ -_config.yml -bower.json -component.json -composer.json -CONTRIBUTING.md -Gemfile -Gemfile.lock diff --git a/themes/next/source/lib/font-awesome/bower.json b/themes/next/source/lib/font-awesome/bower.json deleted file mode 100644 index 9e21126..0000000 --- a/themes/next/source/lib/font-awesome/bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "font-awesome", - "description": "Font Awesome", - "keywords": [], - "homepage": "http://fontawesome.io", - "dependencies": {}, - "devDependencies": {}, - "license": ["OFL-1.1", "MIT", "CC-BY-3.0"], - "main": [ - "less/font-awesome.less", - "scss/font-awesome.scss" - ], - "ignore": [ - "*/.*", - "*.json", - "src", - "*.yml", - "Gemfile", - "Gemfile.lock", - "*.md" - ] -} diff --git a/themes/next/source/lib/jquery/.bower.json b/themes/next/source/lib/jquery/.bower.json deleted file mode 100644 index 30b67e0..0000000 --- a/themes/next/source/lib/jquery/.bower.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "jquery", - "_cacheHeaders": { - "ETag": "\"5492efef-14960\"", - "Last-Modified": "Thu, 18 Dec 2014 15:17:03 GMT", - "Content-Length": "84320", - "Content-Type": "application/x-javascript" - }, - "_release": "e-tag:5492efef-", - "main": "index.js", - "_source": "http://code.jquery.com/jquery-2.1.3.min.js", - "_target": "*", - "_originalSource": "http://code.jquery.com/jquery-2.1.3.min.js", - "_direct": true -} \ No newline at end of file diff --git a/themes/next/source/lib/jquery_lazyload/.bower.json b/themes/next/source/lib/jquery_lazyload/.bower.json deleted file mode 100644 index 9999f39..0000000 --- a/themes/next/source/lib/jquery_lazyload/.bower.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "jquery_lazyload", - "version": "1.9.7", - "homepage": "http://www.appelsiini.net/projects/lazyload", - "authors": [ - "Mika Tuupola " - ], - "description": "jQuery plugin for lazy loading images", - "main": [ - "jquery.lazyload.js", - "jquery.scrollstop.js" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "**/*.min.js", - "**/*.html", - "**/*.textile", - "Gruntfile.js", - "lazyload.jquery.json", - "package.json", - "node_modules", - "bower_components", - "test", - "img" - ], - "_release": "1.9.7", - "_resolution": { - "type": "version", - "tag": "1.9.7", - "commit": "218e50eb4999fe59ac94b939a65c8c988d1d420b" - }, - "_source": "git://github.com/tuupola/jquery_lazyload.git", - "_target": "~1.9.7", - "_originalSource": "jquery.lazyload", - "_direct": true -} \ No newline at end of file diff --git a/themes/next/source/lib/jquery_lazyload/CONTRIBUTING.md b/themes/next/source/lib/jquery_lazyload/CONTRIBUTING.md deleted file mode 100644 index 4a5fb22..0000000 --- a/themes/next/source/lib/jquery_lazyload/CONTRIBUTING.md +++ /dev/null @@ -1,39 +0,0 @@ -# Contributing to Lazy Load - -## Only one feature or change per pull request - -Make pull requests only one feature or change at the time. For example you have fixed a bug. You also have optimized some code. Optimization is not related to a bug. These should be submitted as separate pull requests. This way I can easily choose what to include. It is also easier to understand the code changes. Commit messages should be descriptive and full sentences. - -Do not commit minified versions. Do not touch the version number. Make the pull requests against [1.9.x branch](https://github.com/tuupola/jquery_lazyload/commits/1.9.x). - -## Write meaningful commit messages - -Proper commit message is full sentence. It starts with capital letter but does not end with period. Headlines do not end with period. The GitHub default `Update filename.js` is not enough. When needed include also longer explanation what the commit does. - -``` -Capitalized, short (50 chars or less) summary - -More detailed explanatory text, if necessary. Wrap it to about 72 -characters or so. In some contexts, the first line is treated as the -subject of an email and the rest of the text as the body. The blank -line separating the summary from the body is critical (unless you omit -the body entirely); tools like rebase can get confused if you run the -two together. -``` - -When in doubt see Tim Pope's blogpost [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) - -## Follow the existing coding standards - -When contributing to open source project it is polite to follow the original authors coding standars. They might be different than yours. It is not a holy war. Just follow then original. - -```javascript -var snake_case = "something"; - -function camelCase(options) { -} - -if (true !== false) { - console.log("here be dragons"); -} -``` diff --git a/themes/next/source/lib/jquery_lazyload/README.md b/themes/next/source/lib/jquery_lazyload/README.md deleted file mode 100644 index a9626ee..0000000 --- a/themes/next/source/lib/jquery_lazyload/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Lazy Load Plugin for jQuery - -Lazy Load delays loading of images in long web pages. Images outside of viewport wont be loaded before user scrolls to them. This is opposite of image preloading. - -Using Lazy Load on long web pages containing many large images makes the page load faster. Browser will be in ready state after loading visible images. In some cases it can also help to reduce server load. - -Lazy Load is inspired by [YUI ImageLoader](http://developer.yahoo.com/yui/imageloader/) Utility by Matt Mlinac. - -## How to Use? - -Lazy Load depends on jQuery. Include them both in end of your HTML code: - -```html - - -``` - -You must alter your HTML code. URL of the real image must be put into data-original attribute. It is good idea to give Lazy Loaded image a specific class. This way you can easily control which images plugin is binded to. Note that you should have width and height attributes in your image tag. - -```html - -``` - -then in your code do: - -```js -$("img.lazy").lazyload(); -``` - -This causes all images of class lazy to be lazy loaded. - -More information on [Lazy Load](http://www.appelsiini.net/projects/lazyload) project page. - -## Install - -You can install with [bower](http://bower.io/) or [npm](https://www.npmjs.com/). - - -```sh -$ bower install jquery.lazyload -$ npm install jquery-lazyload -``` - - -# License - -All code licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php). All images licensed under [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/deed.en_US). In other words you are basically free to do whatever you want. Just don't remove my name from the source. - diff --git a/themes/next/source/lib/jquery_lazyload/bower.json b/themes/next/source/lib/jquery_lazyload/bower.json deleted file mode 100644 index 929d3c4..0000000 --- a/themes/next/source/lib/jquery_lazyload/bower.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "jquery_lazyload", - "version": "1.9.4", - "homepage": "http://www.appelsiini.net/projects/lazyload", - "authors": [ - "Mika Tuupola " - ], - "description": "jQuery plugin for lazy loading images", - "main": [ - "jquery.lazyload.js", - "jquery.scrollstop.js" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "**/*.min.js", - "**/*.html", - "**/*.textile", - "Gruntfile.js", - "lazyload.jquery.json", - "package.json", - "node_modules", - "bower_components", - "test", - "img" - ] -} diff --git a/themes/next/source/lib/velocity/.bower.json b/themes/next/source/lib/velocity/.bower.json deleted file mode 100644 index 8fb3b04..0000000 --- a/themes/next/source/lib/velocity/.bower.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "velocity", - "version": "1.2.2", - "homepage": "http://velocityjs.org", - "authors": [ - { - "name": "Julian Shapiro", - "homepage": "http://julian.com/" - } - ], - "description": "Accelerated JavaScript animation.", - "main": [ - "./velocity.js", - "./velocity.ui.js" - ], - "keywords": [ - "animation", - "jquery", - "animate", - "lightweight", - "smooth", - "ui", - "velocity.js", - "velocityjs", - "javascript" - ], - "license": "MIT", - "ignore": [ - "*.json", - "!/bower.json", - "LICENSE", - "*.md" - ], - "dependencies": { - "jquery": "*" - }, - "repository": { - "type": "git", - "url": "http://github.com/julianshapiro/velocity.git" - }, - "_release": "1.2.2", - "_resolution": { - "type": "version", - "tag": "1.2.2", - "commit": "6b227928631aab5694255df3c219736c4c02449d" - }, - "_source": "git://github.com/julianshapiro/velocity.git", - "_target": "~1.2.1", - "_originalSource": "velocity" -} \ No newline at end of file diff --git a/themes/next/source/lib/velocity/bower.json b/themes/next/source/lib/velocity/bower.json deleted file mode 100644 index 768ee61..0000000 --- a/themes/next/source/lib/velocity/bower.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "velocity", - "version": "1.2.2", - "homepage": "http://velocityjs.org", - "authors": [ - { "name" : "Julian Shapiro", - "homepage" : "http://julian.com/" - } - ], - "description": "Accelerated JavaScript animation.", - "main": [ "./velocity.js", "./velocity.ui.js"], - "keywords": [ - "animation", - "jquery", - "animate", - "lightweight", - "smooth", - "ui", - "velocity.js", - "velocityjs", - "javascript" - ], - "license": "MIT", - "ignore": [ - "*.json", - "!/bower.json", - "LICENSE", - "*.md" - ], - "dependencies": { - "jquery": "*" - }, - "repository" : - { - "type" : "git", - "url" : "http://github.com/julianshapiro/velocity.git" - } -} \ No newline at end of file diff --git a/themes/next/test/.jshintrc b/themes/next/test/.jshintrc deleted file mode 100644 index 038a8b0..0000000 --- a/themes/next/test/.jshintrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "curly": true, - "eqnull": true, - "eqeqeq": true, - "undef": true, - "newcap": true, - "unused": true, - "laxcomma": false, - "asi": false, - "expr": true, - "loopfunc": false, - "strict": false, - - "globals": { - "define": true, - "require": true, - "it": true, - "module": true, - "describe": true, - "window": true, - "$": true - } -} diff --git a/themes/next/test/helpers.js b/themes/next/test/helpers.js deleted file mode 100644 index 83f51d0..0000000 --- a/themes/next/test/helpers.js +++ /dev/null @@ -1,133 +0,0 @@ -define([ - 'intern!object', - 'intern/chai!assert', - 'intern/order!source/js/helpers.js' -], function (registerSuite, assert) { - registerSuite({ - name: 'helpers', - - beforeEach: function () { - window = { - navigator: { - userAgent: '' - } - }; - screen = { - width: 0 - }; - - minic = { - desktop: function (screenWidth) { - window.navigator.userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36'; - screen.width = screenWidth || 992; - }, - tablet: function (screenWidth) { - window.navigator.userAgent = 'Mozilla/5.0 (iPad; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5'; - screen.width = screenWidth || 750; - }, - mobile: function (screenWidth) { - window.navigator.userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4'; - screen.width = screenWidth || 767; - } - }; - }, - - '#hasMobileUA': { - 'should be true': function () { - minic.mobile(); - assert.isTrue( hasMobileUA() ); - minic.tablet(); - assert.isTrue( hasMobileUA() ); - }, - - 'should be false': function () { - minic.desktop(); - assert.isFalse( hasMobileUA() ); - } - }, - - - '#isDesktop': { - 'should be true': function () { - minic.desktop(992); - assert.isTrue( isDesktop() ); - - minic.desktop(1200); - assert.isTrue( isDesktop() ); - }, - 'should be false': function () { - minic.mobile(); - assert.isFalse( isDesktop() ); - - minic.tablet(992); - assert.isFalse( isDesktop() ); - } - }, - - '#isTablet': { - 'should be true': function () { - minic.tablet(900); - assert.isTrue( isTablet() ); - - minic.tablet(780); - assert.isTrue( isTablet() ); - }, - 'should be false': function () { - minic.desktop(500); - assert.isFalse( isTablet() ); - - minic.tablet(1000); - assert.isFalse( isTablet() ); - - minic.tablet(500); - assert.isFalse( isTablet() ); - } - }, - - '#isMobile': { - 'should be true': function () { - minic.mobile(); - assert.isTrue( isMobile() ); - - minic.mobile(700); - assert.isTrue( isMobile() ); - }, - 'should be false': function () { - minic.desktop(); - assert.isFalse( isMobile() ); - - minic.tablet(); - assert.isFalse( isMobile() ); - - minic.mobile(1000); - assert.isFalse( isMobile() ); - } - }, - - '#escapeSelector': function () { - var selectors = ['(something', '.something', '$something']; - selectors.forEach(function (s) { - assert.equal( escapeSelector(s), '\\' + s ); - }); - }, - - '#displaySidebar': function () {}, - - '#isMist': { - beforeEach: function () { - CONFIG = { - scheme: '' - }; - }, - 'should be true': function () { - CONFIG.scheme = 'Mist'; - assert.isTrue( isMist() ); - }, - 'should be false': function () { - CONFIG.scheme = 'Minimal'; - assert.isFalse( isMist() ); - } - } - - }); -}); diff --git a/themes/next/test/intern.js b/themes/next/test/intern.js deleted file mode 100644 index db115c7..0000000 --- a/themes/next/test/intern.js +++ /dev/null @@ -1,65 +0,0 @@ -// Learn more about configuring this file at . -// These default settings work OK for most people. The options that *must* be changed below are the -// packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites. -define({ - // The port on which the instrumenting proxy will listen - proxyPort: 9000, - - // A fully qualified URL to the Intern proxy - proxyUrl: 'http://localhost:9000/', - - // Default desired capabilities for all environments. Individual capabilities can be overridden by any of the - // specified browser environments in the `environments` array below as well. See - // https://code.google.com/p/selenium/wiki/DesiredCapabilities for standard Selenium capabilities and - // https://saucelabs.com/docs/additional-config#desired-capabilities for Sauce Labs capabilities. - // Note that the `build` capability will be filled in with the current commit ID from the Travis CI environment - // automatically - capabilities: { - 'selenium-version': '2.41.0' - }, - - // Browsers to run integration testing against. Note that version numbers must be strings if used with Sauce - // OnDemand. Options that will be permutated are browserName, version, platform, and platformVersion; any other - // capabilities options specified for an environment will be copied as-is - environments: [ - { browserName: 'internet explorer', version: '11', platform: 'Windows 8.1' }, - { browserName: 'internet explorer', version: '10', platform: 'Windows 8' }, - { browserName: 'internet explorer', version: '9', platform: 'Windows 7' }, - { browserName: 'firefox', version: '28', platform: [ 'OS X 10.9', 'Windows 7', 'Linux' ] }, - { browserName: 'chrome', version: '34', platform: [ 'OS X 10.9', 'Windows 7', 'Linux' ] }, - { browserName: 'safari', version: '6', platform: 'OS X 10.8' }, - { browserName: 'safari', version: '7', platform: 'OS X 10.9' } - ], - - // Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service - maxConcurrency: 3, - - // Name of the tunnel class to use for WebDriver tests - tunnel: 'SauceLabsTunnel', - - // The desired AMD loader to use when running unit tests (client.html/client.js). Omit to use the default Dojo - // loader - useLoader: { - 'host-node': 'dojo/dojo', - 'host-browser': 'node_modules/dojo/dojo.js' - }, - - // Configuration options for the module loader; any AMD configuration options supported by the specified AMD loader - // can be used here - loader: { - // Packages that should be registered with the loader in each testing environment - packages: [ { name: 'next', location: '.' } ] - }, - - // Non-functional test suite(s) to run in each browser - suites: [ - /* 'myPackage/tests/foo', 'myPackage/tests/bar' */ - 'tests/helpers' - ], - - // Functional test suite(s) to run in each browser once non-functional tests are completed - functionalSuites: [ /* 'myPackage/tests/functional' */ ], - - // A regular expression matching URLs to files that should not be included in code coverage analysis - excludeInstrumentation: /^(?:tests|node_modules)\// -});