diff --git "a/2017/04/02/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266/index.html" "b/2017/04/02/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266/index.html" deleted file mode 100644 index 95a1268..0000000 --- "a/2017/04/02/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266/index.html" +++ /dev/null @@ -1,710 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - React Native 自定义组件 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

React Native 自定义组件

- - - -
- - - - - -
- - - - - -

ES6语法

定义组件
在ES6里,我们通过定义一个继承自React.Component的class来定义一个组件类,像这样:

-
1
2
3
4
5
6
7
8
//ES6
1. class Photo extends React.Component {
2. render() {
3. return (
4. <Image source={this.props.source} />
5. );
6. }
7. }
-

定义组件的属性类型和默认属性

-

在ES6里,可以统一使用static成员来实现

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//ES6
1. class Video extends React.Component {
2. static defaultProps = {
3. autoPlay: false,
4. maxLoops: 10,
5. }; // 注意这里有分号
6. static propTypes = {
7. autoPlay: React.PropTypes.bool.isRequired,
8. maxLoops: React.PropTypes.number.isRequired,
9. posterFrameSrc: React.PropTypes.string.isRequired,
1. videoSrc: React.PropTypes.string.isRequired,
2. }; // 注意这里有分号
3. render() {
4. return (
5. <View />
6. );
7. } // 注意这里既没有分号也没有逗号
8. }
-
-

正文

首先

-
1
import React, { Component ,PropTypes} from 'react';
-

必须包含PropTypes,这是为了规范组件属性的数据类型

-
1
2
3
4
5
import {
Text,
View,
TouchableOpacity,
} from 'react-native';
-

设置默认属性

-
1
2
3
4
1. static defaultProps = {
2. defaultColor:'#f44e14',
3. buttonName:'Button',
4. }
-

设置对外接收的属性,以及属性的数据类型

-
1
2
3
4
5
6
7
1.  static propTypes = {
2. setBackgroundColor : PropTypes.string,
3. buttonName : PropTypes.string,
4. block : PropTypes.func,
5. setWidth : PropTypes.number,
6. setHeight : PropTypes.number,
7. }
-

上面的block属性我设置的是一个func类型,也就是函数,在这里就是起一个回调作用。

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1. render() {
2. return(
3. <TouchableOpacity onPress={()=>this.props.block()} >
4. <View style={{
5. flexDirection : 'row',
6. justifyContent : 'center',
7. alignItems : 'center',
8. backgroundColor : (this.props.setBackgroundColor) ? this.props.setBackgroundColor : this.props.defaultColor,
9. width : (this.props.setWidth!==0) ? this.props.setWidth : 60 ,
1. height : (this.props.setHeight!==0) ? this.props.setHeight : 20,}}
2. >
3. <Text>{this.props.buttonName}</Text>
4. </View>
5. </TouchableOpacity>
6. );
7. }
-

外部使用

引入自定义组件文件

-
1
<TouchableOpacity onPress={()=>this.props.block()} >//执行外部传进来的函数
-

自定义组件完整代码

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
1. import React, { Component ,PropTypes} from 'react';
2. import {
3. Text,
4. View,
5. TouchableOpacity,
6. } from 'react-native';
7. class DiscolorationButton extends React.Component{
8. static defaultProps = {
9. defaultColor:'#f44e14',
1. buttonName:'Button',
2. }
3. static propTypes = {
4. setBackgroundColor : PropTypes.string,
5. buttonName : PropTypes.string,
6. block : PropTypes.func,
7. setWidth : PropTypes.number,
8. setHeight : PropTypes.number,
9. }
1. render() {
2. return(
3. <TouchableOpacity onPress={()=>this.props.block()} >
4. <View style={{
5. flexDirection : 'row',
6. justifyContent : 'center',
7. alignItems : 'center',
8. backgroundColor : (this.props.setBackgroundColor) ? this.props.setBackgroundColor : this.props.defaultColor,
9. width : (this.props.setWidth!==0) ? this.props.setWidth : 60 ,
1. height : (this.props.setHeight!==0) ? this.props.setHeight : 20,}}
2. >
3. <Text>{this.props.buttonName}</Text>
4. </View>
5. </TouchableOpacity>
6. );
7. }
8. }
9. module.exports = DiscolorationButton;
-

<div align=’center’>
效果图

-

外部调用

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
1. import React, { Component } from 'react';
2. import {
3. AppRegistry,
4. StyleSheet,
5. Text,
6. View
7. } from 'react-native';
8. import DiscolorationButton from './DiscolorationButton.js'
9. export default class test extends Component {
1. test(){
2. alert('我是测试函数');
3. }
4. render() {
5. return (
6. <View style={styles.container}>
7. <DiscolorationButton

8. setBackgroundColor = '#bfb'
9. buttonName = '点我'
1. setWidth = {80}
2. setHeight = {40}
3. block = {()=>this.test()}
4. />
5. </View>
6. );
7. }
8. }

9. const styles = StyleSheet.create({
1. container: {
2. flex: 1,
3. justifyContent: 'center',
4. alignItems: 'center',
5. backgroundColor: '#F5FCFF',
6. },
7. });
8. AppRegistry.registerComponent('test', () => test);
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2017/04/23/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213/index.html" "b/2017/04/23/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213/index.html" deleted file mode 100644 index 4c3d0a6..0000000 --- "a/2017/04/23/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213/index.html" +++ /dev/null @@ -1,702 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ReactNative ListView轻松上手 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

ReactNative ListView轻松上手

- - - -
- - - - - -
- - - - - -

感觉自己需要提一下了,最近简单的写了个demo练练手,主要记录下自己的收获。

-

在移动开发中我们用得最多和最重要的一个控件就是滚动视图,在iOS开发中我们用的这个控件叫做TableView,在Android开发中这个控件叫做ListView,然后就是现在的跨平台开发。最近最火的跨平台开发框架当属Facebook开源的React-Native了。在React-Native中也有一个实现滚动视图的组件也叫做ListView

-

最近在工作中接触到了这个开源框架,在项目中用到了RN(React-Natove简写)的ListView,然后自己写了个简单的demo。

-

RN中ListView的属性就不一一讲解了,在ReactNative中文中已经讲得很详细了。
不管是RN中的ListView还是iOS中的TableView都得有数据源的即DataSource,因为RN跨平台框架底层是调用原生的控件。

-

<div align=’center’>

-


那么在RN中是这样设置数据源的

-

创建一个ListView.DataSource类型的对象this.ds

-
1
this.ds = new ListView.DataSource({rowHasChanged:(r1,r2)=>r1!==r2})
-

创建一个数组this.datasource并赋值,这个数组中装着的是5个对象。

-
1
2
3
4
5
6
this.dataSource = [  {name:'柴小圣',id:1,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450044201-0.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','网剧'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.ngQ_96uWK-a50WUtnjGagAEsEP&w=221&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:2,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450045C3-1.jpg',picDescribe:'O(∩_∩)O哈哈~美艳写真图',messageNumber:43,label:['欢乐者联盟','网剧','哈哈'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.wsbd4ipN95lWxm-6g5aINQEsEs&w=200&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:3,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450042929-2.jpg',picDescribe:'(~ ̄▽ ̄)~漂亮妹纸',messageNumber:55,label:['搞笑'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?q=杰尼龟&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:4,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450041D6-3.jpg',picDescribe:'看看✧(≖ ◡ ≖✿)嘿嘿',messageNumber:33,label:['奇葩使者','雷剧','Ls'],firstLabelImage:'https://tse3-mm.cn.bing.net/th?q=可达鸭&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:5,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/045004O27-4.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','牛'],firstLabelImage:'https://tse2-mm.cn.bing.net/th?q=加菲猫&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
]
-

使用this.ds.cloneWithRows方法为ListViewDataSource复制填充数据this.dataSource

-
1
2
3
this.state = {
dataSource:this.ds.cloneWithRows(this.dataSource)
}
-

使用ListView组件

-
1
2
//设置数据源和每行的实际渲染
<ListView dataSource={this.state.dataSource} renderRow={this._renderRow}/>
-

ListView组件的renderRow属性

-
-

renderRow function

-
-
-

(rowData, sectionID, rowID, highlightRow) => renderable

-
-
-

从数据源(Data source)中接受一条数据,以及它和它所在section的ID。返回一个可渲染的组件来为这行数据进行渲染。默认情况下参数中的数据就是放进数据源中的数据本身,不过也可以提供一些转换器。

-
-
-

如果某一行正在被高亮(通过调用highlightRow函数),ListView会得到相应的通知。当一行被高亮时,其两侧的分割线会被隐藏。行的高亮状态可以通过调用highlightRow(null)来重置。

-
-

这里的renderRow使用起来有点类似iOS开发中的自定义Cell

-

具体使用

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
_renderRow(rowData: string, sectionID: number, rowID: number){
return(
<View key={rowID}>
<ImageTextMixedConfigurationCell imageUri={rowData.picUri} text = {rowData.picDescribe}/>
<View style={styles.bottomStyle}>
<TEMlabelButton totalWidth = {1/2*WIDTH}
imageUri = {rowData.firstLabelImage}
selected = {(obj)=>{alert('text='+obj.labelText+'selectedIndex='+obj.selectedIndex)}}
id = {rowData.id}
titleArray = {rowData.label}/>
<BottomRightView messageNumber = {rowData.messageNumber} rowID = {rowID}/>
</View>
</View>
)
}
-

ListView组件使用完整代码

-
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
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Dimensions,
TouchableOpacity,
ListView,
Image,
Text,
View
} from 'react-native';
/**
*引入自定义组件
*/
import ImageTextMixedConfigurationCell from './ImageTextMixedConfigurationCell.js';
import TEMcollectionButton from './CollectionButton.js';
import BottomRightView from './BottomRightView.js';
import TEMlabelButton from './LabelButton.js';
/**
*关闭烦人的警告框(关闭有好有坏自行斟酌)
*/
console.disableYellowBox = true;
/**
*引入系统监听机制
*/
import RCTDeviceEventEmitter from 'RCTDeviceEventEmitter';

export const WIDTH = Dimensions.get('window').width;
export const HEIGHT = Dimensions.get('window').height;

export default class ListViewDemo extends Component {
constructor(props){
super(props)
this.ds = new ListView.DataSource({rowHasChanged:(r1,r2)=>r1!==r2})
this.dataSource = [ {name:'柴小圣',id:1,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450044201-0.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','网剧'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.ngQ_96uWK-a50WUtnjGagAEsEP&w=221&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:2,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450045C3-1.jpg',picDescribe:'O(∩_∩)O哈哈~美艳写真图',messageNumber:43,label:['欢乐者联盟','网剧','哈哈'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.wsbd4ipN95lWxm-6g5aINQEsEs&w=200&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:3,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450042929-2.jpg',picDescribe:'(~ ̄▽ ̄)~漂亮妹纸',messageNumber:55,label:['搞笑'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?q=杰尼龟&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:4,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450041D6-3.jpg',picDescribe:'看看✧(≖ ◡ ≖✿)嘿嘿',messageNumber:33,label:['奇葩使者','雷剧','Ls'],firstLabelImage:'https://tse3-mm.cn.bing.net/th?q=可达鸭&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:5,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/045004O27-4.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','牛'],firstLabelImage:'https://tse2-mm.cn.bing.net/th?q=加菲猫&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
]
this.state = {
dataSource:this.ds.cloneWithRows(this.dataSource)
}
}
componentDidMount(){
this.listenerA=RCTDeviceEventEmitter.addListener('deletCellEvent',(rowID) => {
this.deletCell(rowID);
});
}
componentWillUnmount(){
this.listenerA.remove();
}
deletCell(rowID){
this.dataSource.splice(rowID,1);
this.setState({
dataSource : this.ds.cloneWithRows(this.dataSource)
})
}
_renderRow(rowData: string, sectionID: number, rowID: number){
return(
<View key={rowID}>
<ImageTextMixedConfigurationCell imageUri={rowData.picUri} text = {rowData.picDescribe}/>
<View style={styles.bottomStyle}>
<TEMlabelButton totalWidth = {1/2*WIDTH}
imageUri = {rowData.firstLabelImage}
selected = {(obj)=>{alert('text='+obj.labelText+'selectedIndex='+obj.selectedIndex)}}
id = {rowData.id}
titleArray = {rowData.label}/>
<BottomRightView messageNumber = {rowData.messageNumber} rowID = {rowID}/>
</View>
</View>
)
}
render() {
return (
<View style={styles.container}>
<View style={styles.topBar}/>
<ListView dataSource={this.state.dataSource} renderRow={this._renderRow}/>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F5FCFF',
},
topBar: {
width: WIDTH,
height: 20,
},
bottomStyle: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
width: WIDTH,
backgroundColor: '#FFF',
height: 40
},
});

AppRegistry.registerComponent('ListViewDemo', () => ListViewDemo);
-

完整demo
https://github.com/jungleiOS/RN_ListView.git
如果大家觉得喜欢请在GitHub上赏作者一个Star吧

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2017/09/08/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266/index.html" "b/2017/09/08/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266/index.html" deleted file mode 100644 index 84a3225..0000000 --- "a/2017/09/08/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266/index.html" +++ /dev/null @@ -1,672 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 一行代码搞定TextField输入限制 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

一行代码搞定TextField输入限制

- - - -
- - - - - -
- - - - - -

网上有很多介绍输入限制的文章
原理请参看这篇文章,我只是做了一个简单的封装而已

-

这里可以贴出全部代码

-
1
2
3
4
5
#import <UIKit/UIKit.h>

@interface UITextField (TMRInputLimit)
- (void)inputLimitWithMaxLength:(NSInteger)maxLength;
@end
-
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
#import "UITextField+TMRInputLimit.h"
#import <objc/runtime.h>
@interface UITextField ()
@property (assign, nonatomic) NSNumber *maxLength;
@end
@implementation UITextField (TMRInputLimit)

- (void)setMaxLength:(NSNumber *)maxLength
{
objc_setAssociatedObject(self, @selector(maxLength), maxLength, OBJC_ASSOCIATION_ASSIGN);
}

- (NSNumber *)maxLength
{
return objc_getAssociatedObject(self, @selector(maxLength));

}

- (void)inputLimitWithMaxLength:(NSInteger)maxLength
{
self.maxLength = [NSNumber numberWithInteger:maxLength];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldEditChanged:) name:@"UITextFieldTextDidChangeNotification" object:self];
}

- (void)textFieldEditChanged:(NSNotification *)obj
{
NSInteger maxLength = [self.maxLength integerValue];
UITextField *field = (UITextField *)obj.object;
NSString *toBeString = field.text;
UITextRange *selectedRange = [field markedTextRange];
UITextPosition *position = [field positionFromPosition:selectedRange.start offset:0];
if (!position || !selectedRange)
{
if (toBeString.length > maxLength)
{
NSRange rangeIndex = [toBeString rangeOfComposedCharacterSequenceAtIndex:maxLength];
if (rangeIndex.length == 1)
{
field.text = [toBeString substringToIndex:maxLength];
}
else
{
NSRange rangeRange = [toBeString rangeOfComposedCharacterSequencesForRange:NSMakeRange(0, maxLength)];
field.text = [toBeString substringWithRange:rangeRange];
}
}
}

}

- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"UITextFieldTextDidChangeNotification" object:self];
}

@end
-

使用时import这个分类

-
1
[_textField inputLimitWithMaxLength:6];
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/05/08/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" "b/2018/05/08/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" deleted file mode 100644 index 33d413f..0000000 --- "a/2018/05/08/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" +++ /dev/null @@ -1,717 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Charles + Mokcy 模拟后台返回数据 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

Charles + Mokcy 模拟后台返回数据

- - - -
- - - - - -
- - - - - -

应用场景

在开发中总有一些情况,我们按照设计出的图画好了,准备调接口。然后发现后台只做了接口的字段定义,具体的数据内容并没有返回给我们。这时候又需要接口为我们提供内容做一些网络或者逻辑的调试,我们不能干等着后台给我们提供数据啊。现在我们就可以用Charles拦截请求,Mocky模拟后台数据返回给我们。

-

Charles的使用

如下图勾选上 macOS Proxy,这样Charles就能获取所有通过你的电脑发出的网络请求了

抓到的数据

-

通过Charles的的Map功能重定向到用Mokcy模拟的地址

右键你的接口选择Map Remote

填写相关信息

具体填写,请接着往下看

-

Mocky模拟数据

Mocky网址https://www.mocky.io/

-

Mcoky的使用

-
    -
  1. Status Code 和 Content Type如图填就行了
  2. -
  3. Custom headers 请求时所带的参数,多个参数就点Switch to basic mode 哪个按钮添加
  4. -
  5. 在Body 中构建你自己的JSON
  6. -
  7. 点击Generate my HTTP Response生成如下链接
  8. -
-

生成的链接
回到Charles的重定向界面

-
    -
  1. protocol根据具体情况填写
  2. -
  3. Host填写www.mokcy.io
  4. -
  5. path填写mokcy生成的地址
  6. -
  7. Query带参数请求才填,同Map From下面的Query
  8. -
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/05/28/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230/index.html" "b/2018/05/28/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230/index.html" deleted file mode 100644 index 1c539c6..0000000 --- "a/2018/05/28/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230/index.html" +++ /dev/null @@ -1,732 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Python3 PySpider 执行 pyspider all 遇到的问题 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

Python3 PySpider 执行 pyspider all 遇到的问题

- - - -
- - - - - -
- - - - - -
    -
  1. Could not create web server listening on port 25555
  2. -
  3. pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
  4. -
-

参考文献

-

netstat、lsof查看端口

netstat

netstat用来查看系统当前系统网络状态信息,包括端口,连接情况等,常用方式如下:

-
    -
  • -t : 指明显示TCP端口
  • -
  • -u : 指明显示UDP端口
  • -
  • -l : 仅显示监听套接字(LISTEN状态的套接字)
  • -
  • -p : 显示进程标识符和程序名称,每一个套接字/端口都属于一个程序
  • -
  • -n : 不进行DNS解析
  • -
  • -a 显示所有连接的端口
  • -
-

直接查看端口命令。netstat -an | grep 22
note:22就是改为要查询的端口

-

lsof

参考链接
lsof的作用是列出当前系统打开文件(list open files),不过通过-i参数也能查看端口的连接情况,-i后跟冒号端口可以查看指定端口信息,直接-i是系统当前所有打开的端口

-
    -
  • -a 列出打开文件存在的进程
  • -
  • -c<进程名> 列出指定进程所打开的文件
  • -
  • -g 列出GID号进程详情
  • -
  • -d<文件号> 列出占用该文件号的进程
  • -
  • +d<目录> 列出目录下被打开的文件
  • -
  • +D<目录> 递归列出目录下被打开的文件
  • -
  • -n<目录> 列出使用NFS的文件
  • -
  • -i<条件> 列出符合条件的进程。(4、6、协议、:端口、 @ip )
  • -
  • -p<进程号> 列出指定进程号所打开的文件
  • -
  • -u 列出UID号进程详情
  • -
  • -h 显示帮助信息
  • -
  • -v 显示版本信息
  • -
-

lsof -i:22 #查看22端口连接情况,默认为sshd端口

-

解决第一个问题

    -
  1. 使用lsof命令查看那条线程占用了25555端口
  2. -
  3. 执行kill命令杀掉那条线程 如: kill 15889

    解决第二个问题

  4. -
  5. pip3 uninstall pycurl
  6. -
  7. export PYCURL_SSL_LIBRARY=openssl
  8. -
  9. export LDFLAGS=-L/usr/local/opt/openssl/lib
  10. -
  11. export CPPFLAGS=-I/usr/local/opt/openssl/include
  12. -
  13. pip3 install pycurl –compile –no-cache-dir
  14. -
-

执行以上命令行卸载pycurl再重装

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/02/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" "b/2018/06/02/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" deleted file mode 100644 index a458c79..0000000 --- "a/2018/06/02/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" +++ /dev/null @@ -1,717 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Charles + Mokcy 模拟后台返回数据 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

Charles + Mokcy 模拟后台返回数据

- - - -
- - - - - -
- - - - - -

应用场景

在开发中总有一些情况,我们按照设计出的图画好了,准备调接口。然后发现后台只做了接口的字段定义,具体的数据内容并没有返回给我们。这时候又需要接口为我们提供内容做一些网络或者逻辑的调试,我们不能干等着后台给我们提供数据啊。现在我们就可以用Charles拦截请求,Mocky模拟后台数据返回给我们。

-

Charles的使用

如下图勾选上 macOS Proxy,这样Charles就能获取所有通过你的电脑发出的网络请求了

抓到的数据

-

通过Charles的的Map功能重定向到用Mokcy模拟的地址

右键你的接口选择Map Remote

填写相关信息

具体填写,请接着往下看

-

Mocky模拟数据

Mocky网址https://www.mocky.io/

-

Mcoky的使用

-
    -
  1. Status Code 和 Content Type如图填就行了
  2. -
  3. Custom headers 请求时所带的参数,多个参数就点Switch to basic mode 哪个按钮添加
  4. -
  5. 在Body 中构建你自己的JSON
  6. -
  7. 点击Generate my HTTP Response生成如下链接
  8. -
-

生成的链接
回到Charles的重定向界面

-
    -
  1. protocol根据具体情况填写
  2. -
  3. Host填写www.mokcy.io
  4. -
  5. path填写mokcy生成的地址
  6. -
  7. Query带参数请求才填,同Map From下面的Query
  8. -
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/02/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230/index.html" "b/2018/06/02/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230/index.html" deleted file mode 100644 index b385031..0000000 --- "a/2018/06/02/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230/index.html" +++ /dev/null @@ -1,732 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Python3 PySpider 执行 pyspider all 遇到的问题 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

Python3 PySpider 执行 pyspider all 遇到的问题

- - - -
- - - - - -
- - - - - -
    -
  1. Could not create web server listening on port 25555
  2. -
  3. pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
  4. -
-

参考文献

-

netstat、lsof查看端口

netstat

netstat用来查看系统当前系统网络状态信息,包括端口,连接情况等,常用方式如下:

-
    -
  • -t : 指明显示TCP端口
  • -
  • -u : 指明显示UDP端口
  • -
  • -l : 仅显示监听套接字(LISTEN状态的套接字)
  • -
  • -p : 显示进程标识符和程序名称,每一个套接字/端口都属于一个程序
  • -
  • -n : 不进行DNS解析
  • -
  • -a 显示所有连接的端口
  • -
-

直接查看端口命令。netstat -an | grep 22
note:22就是改为要查询的端口

-

lsof

参考链接
lsof的作用是列出当前系统打开文件(list open files),不过通过-i参数也能查看端口的连接情况,-i后跟冒号端口可以查看指定端口信息,直接-i是系统当前所有打开的端口

-
    -
  • -a 列出打开文件存在的进程
  • -
  • -c<进程名> 列出指定进程所打开的文件
  • -
  • -g 列出GID号进程详情
  • -
  • -d<文件号> 列出占用该文件号的进程
  • -
  • +d<目录> 列出目录下被打开的文件
  • -
  • +D<目录> 递归列出目录下被打开的文件
  • -
  • -n<目录> 列出使用NFS的文件
  • -
  • -i<条件> 列出符合条件的进程。(4、6、协议、:端口、 @ip )
  • -
  • -p<进程号> 列出指定进程号所打开的文件
  • -
  • -u 列出UID号进程详情
  • -
  • -h 显示帮助信息
  • -
  • -v 显示版本信息
  • -
-

lsof -i:22 #查看22端口连接情况,默认为sshd端口

-

解决第一个问题

    -
  1. 使用lsof命令查看那条线程占用了25555端口
  2. -
  3. 执行kill命令杀掉那条线程 如: kill 15889

    解决第二个问题

  4. -
  5. pip3 uninstall pycurl
  6. -
  7. export PYCURL_SSL_LIBRARY=openssl
  8. -
  9. export LDFLAGS=-L/usr/local/opt/openssl/lib
  10. -
  11. export CPPFLAGS=-I/usr/local/opt/openssl/include
  12. -
  13. pip3 install pycurl –compile –no-cache-dir
  14. -
-

执行以上命令行卸载pycurl再重装

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/02/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266/index.html" "b/2018/06/02/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266/index.html" deleted file mode 100644 index fa64407..0000000 --- "a/2018/06/02/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266/index.html" +++ /dev/null @@ -1,714 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - React Native 自定义组件 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

React Native 自定义组件

- - - -
- - - - - -
- - - - - -

ES6语法

定义组件
在ES6里,我们通过定义一个继承自React.Component的class来定义一个组件类,像这样:

-
1
2
3
4
5
6
7
8
//ES6
1. class Photo extends React.Component {
2. render() {
3. return (
4. <Image source={this.props.source} />
5. );
6. }
7. }
-

定义组件的属性类型和默认属性

-

在ES6里,可以统一使用static成员来实现

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//ES6
1. class Video extends React.Component {
2. static defaultProps = {
3. autoPlay: false,
4. maxLoops: 10,
5. }; // 注意这里有分号
6. static propTypes = {
7. autoPlay: React.PropTypes.bool.isRequired,
8. maxLoops: React.PropTypes.number.isRequired,
9. posterFrameSrc: React.PropTypes.string.isRequired,
1. videoSrc: React.PropTypes.string.isRequired,
2. }; // 注意这里有分号
3. render() {
4. return (
5. <View />
6. );
7. } // 注意这里既没有分号也没有逗号
8. }
-
-

正文

首先

-
1
import React, { Component ,PropTypes} from 'react';
-

必须包含PropTypes,这是为了规范组件属性的数据类型

-
1
2
3
4
5
import {
Text,
View,
TouchableOpacity,
} from 'react-native';
-

设置默认属性

-
1
2
3
4
1. static defaultProps = {
2. defaultColor:'#f44e14',
3. buttonName:'Button',
4. }
-

设置对外接收的属性,以及属性的数据类型

-
1
2
3
4
5
6
7
1.  static propTypes = {
2. setBackgroundColor : PropTypes.string,
3. buttonName : PropTypes.string,
4. block : PropTypes.func,
5. setWidth : PropTypes.number,
6. setHeight : PropTypes.number,
7. }
-

上面的block属性我设置的是一个func类型,也就是函数,在这里就是起一个回调作用。

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1. render() {
2. return(
3. <TouchableOpacity onPress={()=>this.props.block()} >
4. <View style={{
5. flexDirection : 'row',
6. justifyContent : 'center',
7. alignItems : 'center',
8. backgroundColor : (this.props.setBackgroundColor) ? this.props.setBackgroundColor : this.props.defaultColor,
9. width : (this.props.setWidth!==0) ? this.props.setWidth : 60 ,
1. height : (this.props.setHeight!==0) ? this.props.setHeight : 20,}}
2. >
3. <Text>{this.props.buttonName}</Text>
4. </View>
5. </TouchableOpacity>
6. );
7. }
-

外部使用

引入自定义组件文件

-
1
<TouchableOpacity onPress={()=>this.props.block()} >//执行外部传进来的函数
-

自定义组件完整代码

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
1. import React, { Component ,PropTypes} from 'react';
2. import {
3. Text,
4. View,
5. TouchableOpacity,
6. } from 'react-native';
7. class DiscolorationButton extends React.Component{
8. static defaultProps = {
9. defaultColor:'#f44e14',
1. buttonName:'Button',
2. }
3. static propTypes = {
4. setBackgroundColor : PropTypes.string,
5. buttonName : PropTypes.string,
6. block : PropTypes.func,
7. setWidth : PropTypes.number,
8. setHeight : PropTypes.number,
9. }
1. render() {
2. return(
3. <TouchableOpacity onPress={()=>this.props.block()} >
4. <View style={{
5. flexDirection : 'row',
6. justifyContent : 'center',
7. alignItems : 'center',
8. backgroundColor : (this.props.setBackgroundColor) ? this.props.setBackgroundColor : this.props.defaultColor,
9. width : (this.props.setWidth!==0) ? this.props.setWidth : 60 ,
1. height : (this.props.setHeight!==0) ? this.props.setHeight : 20,}}
2. >
3. <Text>{this.props.buttonName}</Text>
4. </View>
5. </TouchableOpacity>
6. );
7. }
8. }
9. module.exports = DiscolorationButton;
-

<div align=’center’>
效果图

-

外部调用

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
1. import React, { Component } from 'react';
2. import {
3. AppRegistry,
4. StyleSheet,
5. Text,
6. View
7. } from 'react-native';
8. import DiscolorationButton from './DiscolorationButton.js'
9. export default class test extends Component {
1. test(){
2. alert('我是测试函数');
3. }
4. render() {
5. return (
6. <View style={styles.container}>
7. <DiscolorationButton

8. setBackgroundColor = '#bfb'
9. buttonName = '点我'
1. setWidth = {80}
2. setHeight = {40}
3. block = {()=>this.test()}
4. />
5. </View>
6. );
7. }
8. }

9. const styles = StyleSheet.create({
1. container: {
2. flex: 1,
3. justifyContent: 'center',
4. alignItems: 'center',
5. backgroundColor: '#F5FCFF',
6. },
7. });
8. AppRegistry.registerComponent('test', () => test);
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/02/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213/index.html" "b/2018/06/02/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213/index.html" deleted file mode 100644 index ad118a5..0000000 --- "a/2018/06/02/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213/index.html" +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ReactNative ListView轻松上手 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

ReactNative ListView轻松上手

- - - -
- - - - - -
- - - - - -

感觉自己需要提一下了,最近简单的写了个demo练练手,主要记录下自己的收获。

-

在移动开发中我们用得最多和最重要的一个控件就是滚动视图,在iOS开发中我们用的这个控件叫做TableView,在Android开发中这个控件叫做ListView,然后就是现在的跨平台开发。最近最火的跨平台开发框架当属Facebook开源的React-Native了。在React-Native中也有一个实现滚动视图的组件也叫做ListView

-

最近在工作中接触到了这个开源框架,在项目中用到了RN(React-Natove简写)的ListView,然后自己写了个简单的demo。

-

RN中ListView的属性就不一一讲解了,在ReactNative中文中已经讲得很详细了。
不管是RN中的ListView还是iOS中的TableView都得有数据源的即DataSource,因为RN跨平台框架底层是调用原生的控件。

-

<div align=’center’>

-


那么在RN中是这样设置数据源的

-

创建一个ListView.DataSource类型的对象this.ds

-
1
this.ds = new ListView.DataSource({rowHasChanged:(r1,r2)=>r1!==r2})
-

创建一个数组this.datasource并赋值,这个数组中装着的是5个对象。

-
1
2
3
4
5
6
this.dataSource = [  {name:'柴小圣',id:1,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450044201-0.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','网剧'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.ngQ_96uWK-a50WUtnjGagAEsEP&w=221&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:2,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450045C3-1.jpg',picDescribe:'O(∩_∩)O哈哈~美艳写真图',messageNumber:43,label:['欢乐者联盟','网剧','哈哈'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.wsbd4ipN95lWxm-6g5aINQEsEs&w=200&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:3,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450042929-2.jpg',picDescribe:'(~ ̄▽ ̄)~漂亮妹纸',messageNumber:55,label:['搞笑'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?q=杰尼龟&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:4,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450041D6-3.jpg',picDescribe:'看看✧(≖ ◡ ≖✿)嘿嘿',messageNumber:33,label:['奇葩使者','雷剧','Ls'],firstLabelImage:'https://tse3-mm.cn.bing.net/th?q=可达鸭&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:5,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/045004O27-4.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','牛'],firstLabelImage:'https://tse2-mm.cn.bing.net/th?q=加菲猫&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
]
-

使用this.ds.cloneWithRows方法为ListViewDataSource复制填充数据this.dataSource

-
1
2
3
this.state = {
dataSource:this.ds.cloneWithRows(this.dataSource)
}
-

使用ListView组件

-
1
2
//设置数据源和每行的实际渲染
<ListView dataSource={this.state.dataSource} renderRow={this._renderRow}/>
-

ListView组件的renderRow属性

-
-

renderRow function

-
-
-

(rowData, sectionID, rowID, highlightRow) => renderable

-
-
-

从数据源(Data source)中接受一条数据,以及它和它所在section的ID。返回一个可渲染的组件来为这行数据进行渲染。默认情况下参数中的数据就是放进数据源中的数据本身,不过也可以提供一些转换器。

-
-
-

如果某一行正在被高亮(通过调用highlightRow函数),ListView会得到相应的通知。当一行被高亮时,其两侧的分割线会被隐藏。行的高亮状态可以通过调用highlightRow(null)来重置。

-
-

这里的renderRow使用起来有点类似iOS开发中的自定义Cell

-

具体使用

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
_renderRow(rowData: string, sectionID: number, rowID: number){
return(
<View key={rowID}>
<ImageTextMixedConfigurationCell imageUri={rowData.picUri} text = {rowData.picDescribe}/>
<View style={styles.bottomStyle}>
<TEMlabelButton totalWidth = {1/2*WIDTH}
imageUri = {rowData.firstLabelImage}
selected = {(obj)=>{alert('text='+obj.labelText+'selectedIndex='+obj.selectedIndex)}}
id = {rowData.id}
titleArray = {rowData.label}/>
<BottomRightView messageNumber = {rowData.messageNumber} rowID = {rowID}/>
</View>
</View>
)
}
-

ListView组件使用完整代码

-
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
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Dimensions,
TouchableOpacity,
ListView,
Image,
Text,
View
} from 'react-native';
/**
*引入自定义组件
*/
import ImageTextMixedConfigurationCell from './ImageTextMixedConfigurationCell.js';
import TEMcollectionButton from './CollectionButton.js';
import BottomRightView from './BottomRightView.js';
import TEMlabelButton from './LabelButton.js';
/**
*关闭烦人的警告框(关闭有好有坏自行斟酌)
*/
console.disableYellowBox = true;
/**
*引入系统监听机制
*/
import RCTDeviceEventEmitter from 'RCTDeviceEventEmitter';

export const WIDTH = Dimensions.get('window').width;
export const HEIGHT = Dimensions.get('window').height;

export default class ListViewDemo extends Component {
constructor(props){
super(props)
this.ds = new ListView.DataSource({rowHasChanged:(r1,r2)=>r1!==r2})
this.dataSource = [ {name:'柴小圣',id:1,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450044201-0.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','网剧'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.ngQ_96uWK-a50WUtnjGagAEsEP&w=221&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:2,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450045C3-1.jpg',picDescribe:'O(∩_∩)O哈哈~美艳写真图',messageNumber:43,label:['欢乐者联盟','网剧','哈哈'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.wsbd4ipN95lWxm-6g5aINQEsEs&w=200&h=200&c=7&qlt=90&o=4&pid=1.7'},
{name:'柴小圣',id:3,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450042929-2.jpg',picDescribe:'(~ ̄▽ ̄)~漂亮妹纸',messageNumber:55,label:['搞笑'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?q=杰尼龟&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:4,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450041D6-3.jpg',picDescribe:'看看✧(≖ ◡ ≖✿)嘿嘿',messageNumber:33,label:['奇葩使者','雷剧','Ls'],firstLabelImage:'https://tse3-mm.cn.bing.net/th?q=可达鸭&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
{name:'柴小圣',id:5,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/045004O27-4.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','牛'],firstLabelImage:'https://tse2-mm.cn.bing.net/th?q=加菲猫&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'},
]
this.state = {
dataSource:this.ds.cloneWithRows(this.dataSource)
}
}
componentDidMount(){
this.listenerA=RCTDeviceEventEmitter.addListener('deletCellEvent',(rowID) => {
this.deletCell(rowID);
});
}
componentWillUnmount(){
this.listenerA.remove();
}
deletCell(rowID){
this.dataSource.splice(rowID,1);
this.setState({
dataSource : this.ds.cloneWithRows(this.dataSource)
})
}
_renderRow(rowData: string, sectionID: number, rowID: number){
return(
<View key={rowID}>
<ImageTextMixedConfigurationCell imageUri={rowData.picUri} text = {rowData.picDescribe}/>
<View style={styles.bottomStyle}>
<TEMlabelButton totalWidth = {1/2*WIDTH}
imageUri = {rowData.firstLabelImage}
selected = {(obj)=>{alert('text='+obj.labelText+'selectedIndex='+obj.selectedIndex)}}
id = {rowData.id}
titleArray = {rowData.label}/>
<BottomRightView messageNumber = {rowData.messageNumber} rowID = {rowID}/>
</View>
</View>
)
}
render() {
return (
<View style={styles.container}>
<View style={styles.topBar}/>
<ListView dataSource={this.state.dataSource} renderRow={this._renderRow}/>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F5FCFF',
},
topBar: {
width: WIDTH,
height: 20,
},
bottomStyle: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
width: WIDTH,
backgroundColor: '#FFF',
height: 40
},
});

AppRegistry.registerComponent('ListViewDemo', () => ListViewDemo);
-

完整demo
https://github.com/jungleiOS/RN_ListView.git
如果大家觉得喜欢请在GitHub上赏作者一个Star吧

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/02/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266/index.html" "b/2018/06/02/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266/index.html" deleted file mode 100644 index c47e486..0000000 --- "a/2018/06/02/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266/index.html" +++ /dev/null @@ -1,672 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 一行代码搞定TextField输入限制 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

一行代码搞定TextField输入限制

- - - -
- - - - - -
- - - - - -

网上有很多介绍输入限制的文章
原理请参看这篇文章,我只是做了一个简单的封装而已

-

这里可以贴出全部代码

-
1
2
3
4
5
#import <UIKit/UIKit.h>

@interface UITextField (TMRInputLimit)
- (void)inputLimitWithMaxLength:(NSInteger)maxLength;
@end
-
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
#import "UITextField+TMRInputLimit.h"
#import <objc/runtime.h>
@interface UITextField ()
@property (assign, nonatomic) NSNumber *maxLength;
@end
@implementation UITextField (TMRInputLimit)

- (void)setMaxLength:(NSNumber *)maxLength
{
objc_setAssociatedObject(self, @selector(maxLength), maxLength, OBJC_ASSOCIATION_ASSIGN);
}

- (NSNumber *)maxLength
{
return objc_getAssociatedObject(self, @selector(maxLength));

}

- (void)inputLimitWithMaxLength:(NSInteger)maxLength
{
self.maxLength = [NSNumber numberWithInteger:maxLength];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldEditChanged:) name:@"UITextFieldTextDidChangeNotification" object:self];
}

- (void)textFieldEditChanged:(NSNotification *)obj
{
NSInteger maxLength = [self.maxLength integerValue];
UITextField *field = (UITextField *)obj.object;
NSString *toBeString = field.text;
UITextRange *selectedRange = [field markedTextRange];
UITextPosition *position = [field positionFromPosition:selectedRange.start offset:0];
if (!position || !selectedRange)
{
if (toBeString.length > maxLength)
{
NSRange rangeIndex = [toBeString rangeOfComposedCharacterSequenceAtIndex:maxLength];
if (rangeIndex.length == 1)
{
field.text = [toBeString substringToIndex:maxLength];
}
else
{
NSRange rangeRange = [toBeString rangeOfComposedCharacterSequencesForRange:NSMakeRange(0, maxLength)];
field.text = [toBeString substringWithRange:rangeRange];
}
}
}

}

- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"UITextFieldTextDidChangeNotification" object:self];
}

@end
-

使用时import这个分类

-
1
[_textField inputLimitWithMaxLength:6];
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/06/git \346\234\254\345\234\260\344\273\223\345\272\223\345\222\214\350\277\234\347\250\213\344\273\223\345\272\223\347\233\270\345\205\263\350\201\224/index.html" "b/2018/06/06/git \346\234\254\345\234\260\344\273\223\345\272\223\345\222\214\350\277\234\347\250\213\344\273\223\345\272\223\347\233\270\345\205\263\350\201\224/index.html" deleted file mode 100644 index 017372c..0000000 --- "a/2018/06/06/git \346\234\254\345\234\260\344\273\223\345\272\223\345\222\214\350\277\234\347\250\213\344\273\223\345\272\223\347\233\270\345\205\263\350\201\224/index.html" +++ /dev/null @@ -1,707 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - git 本地仓库和远程仓库相关联 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

git 本地仓库和远程仓库相关联

- - - -
- - - - - -
- - - - - -
    -
  1. 本地库提交变化 git commit
  2. -
  3. 关联远程仓库 git remote add origin remoteRepositoryAddress(远程仓库地址)
  4. -
  5. 提交本地仓库到远程 git push origin master
  6. -
  7. 如果本地与远程库不一致,报错误:error:failed to push some refs to …
  8. -
  9. git pull –rebase origin master (这条指令的意思是把远程库中的更新合并到本地库中,–rebase的作用是取消掉本地库中刚刚的commit,并把他们接到更新后的版本库之中。)
  10. -
  11. 回到第3步
  12. -
-

错误分析

-
git pull –rebase origin master意为先取消commit记录,并且把它们临时 保存为补丁(patch)(这些补丁放到”.git/rebase”目录中),之后同步远程库到本地,最后合并补丁到本地库之中。

-
接下来就可以把本地库push到远程库当中了。

-

图片来自MBuger

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/21/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" "b/2018/06/21/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" deleted file mode 100644 index 895c69e..0000000 --- "a/2018/06/21/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256/index.html" +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Charles + Mokcy 模拟后台返回数据 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

Charles + Mokcy 模拟后台返回数据

- - - -
- - - - - -
- - - - - -

应用场景

在开发中总有一些情况,我们按照设计出的图画好了,准备调接口。然后发现后台只做了接口的字段定义,具体的数据内容并没有返回给我们。这时候又需要接口为我们提供内容做一些网络或者逻辑的调试,我们不能干等着后台给我们提供数据啊。现在我们就可以用Charles拦截请求,Mocky模拟后台数据返回给我们。

-

Charles的使用

如下图勾选上 macOS Proxy,这样Charles就能获取所有通过你的电脑发出的网络请求了

抓到的数据

-

通过Charles的的Map功能重定向到用Mokcy模拟的地址

右键你的接口选择Map Remote

填写相关信息

具体填写,请接着往下看

-

Mocky模拟数据

Mocky网址https://www.mocky.io/

-

Mcoky的使用

-
    -
  1. Status Code 和 Content Type如图填就行了
  2. -
  3. Custom headers 请求时所带的参数,多个参数就点Switch to basic mode 哪个按钮添加
  4. -
  5. 在Body 中构建你自己的JSON
  6. -
  7. 点击Generate my HTTP Response生成如下链接
  8. -
-

生成的链接
回到Charles的重定向界面

-
    -
  1. protocol根据具体情况填写
  2. -
  3. Host填写www.mokcy.io
  4. -
  5. path填写mokcy生成的地址
  6. -
  7. Query带参数请求才填,同Map From下面的Query
  8. -
- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/06/21/git \346\234\254\345\234\260\344\273\223\345\272\223\345\222\214\350\277\234\347\250\213\344\273\223\345\272\223\347\233\270\345\205\263\350\201\224/index.html" "b/2018/06/21/git \346\234\254\345\234\260\344\273\223\345\272\223\345\222\214\350\277\234\347\250\213\344\273\223\345\272\223\347\233\270\345\205\263\350\201\224/index.html" deleted file mode 100644 index cb8a432..0000000 --- "a/2018/06/21/git \346\234\254\345\234\260\344\273\223\345\272\223\345\222\214\350\277\234\347\250\213\344\273\223\345\272\223\347\233\270\345\205\263\350\201\224/index.html" +++ /dev/null @@ -1,707 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - git 本地仓库和远程仓库相关联 | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

git 本地仓库和远程仓库相关联

- - - -
- - - - - -
- - - - - -
    -
  1. 本地库提交变化 git commit
  2. -
  3. 关联远程仓库 git remote add origin remoteRepositoryAddress(远程仓库地址)
  4. -
  5. 提交本地仓库到远程 git push origin master
  6. -
  7. 如果本地与远程库不一致,报错误:error:failed to push some refs to …
  8. -
  9. git pull –rebase origin master (这条指令的意思是把远程库中的更新合并到本地库中,–rebase的作用是取消掉本地库中刚刚的commit,并把他们接到更新后的版本库之中。)
  10. -
  11. 回到第3步
  12. -
-

错误分析

-
git pull –rebase origin master意为先取消commit记录,并且把它们临时 保存为补丁(patch)(这些补丁放到”.git/rebase”目录中),之后同步远程库到本地,最后合并补丁到本地库之中。

-
接下来就可以把本地库push到远程库当中了。

-

图片来自MBuger

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/07/30/\351\235\242\350\257\225\351\242\230\357\274\210Category\357\274\211/index.html" "b/2018/07/30/\351\235\242\350\257\225\351\242\230\357\274\210Category\357\274\211/index.html" deleted file mode 100644 index 4bd71f7..0000000 --- "a/2018/07/30/\351\235\242\350\257\225\351\242\230\357\274\210Category\357\274\211/index.html" +++ /dev/null @@ -1,734 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 面试题(Category) | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

面试题(Category)

- - - -
- - - - - -
- - - - - -
    -
  • 分类(Category)和扩展(Extension)有什么区别?
  • -
  • 分别用来做什么?
  • -
  • 分类的局限性?
  • -
  • 分类的结构体有哪些成员?

    -

    答案参考链接:Category VS Extension 原理详解

    -
  • -
-

他们的作用:

Category

    -
  • 可以减少单个文件的体积
  • -
  • 把不同功能组织到不同的Category里
  • -
  • 可以由多个开发者共同完成一个类
  • -
  • 可以按需加载想要的category
  • -
  • 声明私有方法
  • -
  • 模拟多继承(一定要搞懂多继承概念)
  • -
  • 把framework的私有方法公开(先了解framework😢)
  • -
-

Extension

    -
  • Extension可以添加属性和方法,且方法必须实现
  • -
  • 隐藏私有信息
  • -
-

区别

    -
  • extension在编译器决议,属于类的一部分,category在运行时决议
  • -
  • extension必须在有一个类的源码时才能添加,category不需要有类的源码
  • -
  • extension可以添加实例变量,category不可以
  • -
-

Category 结构体 category_t

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
struct category_t {
const char *name;
classref_t cls;
struct method_list_t *instanceMethods; // 对象方法
struct method_list_t *classMethods; // 类方法
struct protocol_list_t *protocols; // 协议
struct property_list_t *instanceProperties; // 属性
// Fields below this point are not always present on disk.
struct property_list_t *_classProperties;

method_list_t *methodsForMeta(bool isMeta) {
if (isMeta) return classMethods;
else return instanceMethods;
}

property_list_t *propertiesForMeta(bool isMeta, struct header_info *hi);
};
-

问: Category的实现原理,以及Category为什么只能加方法不能加属性?

-
-

答:分类的实现原理是将category中的方法,属性,协议数据放在category_t结构体中,然后将结构体内的方法列表拷贝到类对象的方法列表中。 Category可以添加属性,但是并不会自动生成成员变量及set/get方法。因为category_t结构体中并不存在成员变量。通过之前对对象的分析我们知道成员变量是存放在实例对象中的,并且编译的那一刻就已经决定好了。而分类是在运行时才去加载的。那么我们就无法再程序运行时将分类的成员变量中添加到实例对象的结构体中。因此分类中不可以添加成员变量。

-
-

问:Category中有load方法吗?load方法是什么时候调用的?load 方法能继承吗?

-
-

答:Category中有load方法,load方法在程序启动装载类信息的时候就会调用。load方法可以继承。调用子类的load方法之前,会先调用父类的load方法

-
-

问:load、initialize的区别,以及它们在category重写的时候的调用的次序。

-
-

答:区别在于调用方式和调用时刻 调用方式:load是根据函数地址直接调用,initialize是通过objc_msgSend调用 调用时刻:load是runtime加载类、分类的时候调用(只会调用1次),initialize是类第一次接收到消息的时候调用,每一个类只会initialize一次(父类的initialize方法可能会被调用多次)

-
-
-

调用顺序:先调用类的load方法,先编译那个类,就先调用load。在调用load之前会先调用父类的load方法。分类中load方法不会覆盖本类的load方法,先编译的分类优先调用load方法。initialize先初始化父类,之后再初始化子类。如果子类没有实现+initialize,会调用父类的+initialize(所以父类的+initialize可能会被调用多次),如果分类实现了+initialize,就覆盖类本身的+initialize调用。

-
-

作者:xx_cc
链接:https://juejin.im/post/5aef0a3b518825670f7bc0f3

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/2018/08/04/\347\273\206\350\257\264weak/index.html" "b/2018/08/04/\347\273\206\350\257\264weak/index.html" deleted file mode 100644 index c524a14..0000000 --- "a/2018/08/04/\347\273\206\350\257\264weak/index.html" +++ /dev/null @@ -1,773 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 细说weak | TMR De Blog - - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- - -
- - - - - - - - -
- - - -
- - - - - - - -
- - - -

细说weak

- - - -
- - - - - -
- - - - - -
    -
  • 被weak修饰的对象在被释放的时候会发生什么?
  • -
  • 是如何实现的?
  • -
  • 知道sideTable么?
  • -
  • 里面的结构可以画出来么?
  • -
-

在回答这些问题之前,我们先来了解一下weak的内部结构。

-
-

对于我们常说的weak,其实是一个由Runtime维护的用于存储对象的所有weak指针的hash表。key是所指对象的指针,value是weak指针的地址(这个地址的值是所指对象的地址)数组。 光这么说还是不好理解,来看一个列子吧

-
-
1
2
NSObject *b = [NSObject new];
__weak id a = b;
-
-

这里的b就是weak表的key,&a(a的内存地址)就是value;

-
-

那这个结论是怎样得到的?

-

在我们加入runtime源码进行调试的时候,我们发现 weak 修饰符变量是通过 objc_initWeak 函数来初始化的,在变量作用域结束的时候通过 objc_destroyWeak 函数来释放该变量的。这两个函数长下面这样👇

-
-
1
2
3
4
5
6
7
8
9
10
11
12
13
id objc_initWeak(id *location, id newObj)
{
// 查看对象实例是否有效
// 无效对象直接导致指针释放
if (!newObj) {
*location = nil;
return nil;
}
// 这里传递了三个 bool 数值
// 使用 template 进行常量参数传递是为了优化性能
return storeWeak<false/*old*/, true/*new*/, true/*crash*/>
(location, (objc_object*)newObj);
}
-
1
2
3
4
5
void objc_destroyWeak(id *location)
{
(void)storeWeak<true/*old*/, false/*new*/, false/*crash*/>
(location, nil);
}
-

从上两段代码不难发现它们都调用了storeWeak 这个函数,但是两个方法传入的参数却稍有不同。
init 方法中,第一个参数为 weak 修饰的变量,第二个参数为引用计数对象。但在 destoryWeak 函数,第一参数依旧为 weak 修饰的变量,第二个参数为 nil。那这块传入不同的参数到底代表什么,我们继续分析 storeWeak 这个函数。

-
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
// 更新一个弱引用变量
// 如果 HaveOld 是 true, 变量是个有效值,需要被及时清理。变量可以为 nil。
// 如果 HaveNew 是 true, 需要一个新的 value 来替换变量。变量可以为 nil
// 如果crashifdeallocation 是 ture ,那么如果 newObj 是 deallocating,或者 newObj 的类不支持弱引用,则该进程就会停止。
// 如果crashifdeallocation 是 false,那么 nil 会被存储。

template <bool HaveOld, bool HaveNew, bool CrashIfDeallocating>
static id storeWeak(id *location, objc_object *newObj)
{
assert(HaveOld || HaveNew);
if (!HaveNew) assert(newObj == nil);

Class previouslyInitializedClass = nil;
id oldObj;

// 创建新旧散列表
SideTable *oldTable;
SideTable *newTable;

// Acquire locks for old and new values.
// 获得新值和旧值的锁存位置 (用地址作为唯一标示)
// Order by lock address to prevent lock ordering problems.
// 通过地址来建立索引标志,防止桶重复
// Retry if the old value changes underneath us.
// 下面指向的操作会改变旧值
retry:
if (HaveOld) {
// 如果 HaveOld 为 true ,更改指针,获得以 oldObj 为索引所存储的值地址
oldObj = *location;
oldTable = &SideTables()[oldObj];
} else {
oldTable = nil;
}
if (HaveNew) {
// 获得以 newObj 为索引所存储的值对象
newTable = &SideTables()[newObj];
} else {
newTable = nil;
}

// 对两个 table 进行加锁操作,防止多线程中竞争冲突
SideTable::lockTwo<HaveOld, HaveNew>(oldTable, newTable);

// location 应该与 oldObj 保持一致,如果不同,说明当前的 location 已经处理过 oldObj 可是又被其他线程所修改, 保证线程安全,这个判断用来避免线程冲突重处理问题
if (HaveOld && *location != oldObj) {
SideTable::unlockTwo<HaveOld, HaveNew>(oldTable, newTable);
goto retry;
}

// Prevent a deadlock between the weak reference machinery
// and the +initialize machinery by ensuring that no
// weakly-referenced object has an un-+initialized isa.
// 防止弱引用之间发生死锁,并且通过 +initialize 初始化构造器保证所有弱引用的 isa 非空指向
if (HaveNew && newObj) {
// 获得新对象的 isa 指针
Class cls = newObj->getIsa();
// 判断 isa 非空且已经初始化
if (cls != previouslyInitializedClass &&
!((objc_class *)cls)->isInitialized())
{
// 对两个表解锁
SideTable::unlockTwo<HaveOld, HaveNew>(oldTable, newTable);
_class_initialize(_class_getNonMetaClass(cls, (id)newObj));

// If this class is finished with +initialize then we're good.
// If this class is still running +initialize on this thread
// (i.e. +initialize called storeWeak on an instance of itself)
// then we may proceed but it will appear initializing and
// not yet initialized to the check above.
// Instead set previouslyInitializedClass to recognize it on retry.
// 如果该类已经完成执行 +initialize 方法是最好的,如果该类 + initialize 在线程中,例如 +initialize 正在调用storeWeak 方法,那么则需要手动对其增加保护策略,并设置 previouslyInitializedClass 指针进行标记然后重新尝试
previouslyInitializedClass = cls;

goto retry;
}
}

// Clean up old value, if any. 清除旧值
if (HaveOld) {
weak_unregister_no_lock(&oldTable->weak_table, oldObj, location);
}

// Assign new value, if any. 分配新值
if (HaveNew) {
newObj = (objc_object *)weak_register_no_lock(&newTable->weak_table,
(id)newObj, location,
CrashIfDeallocating);
// weak_register_no_lock returns nil if weak store should be rejected
// 如果弱引用被释放则该方法返回 nil
// Set is-weakly-referenced bit in refcount table.
// 在引用计数表中设置弱引用标记位
if (newObj && !newObj->isTaggedPointer()) {
newObj->setWeaklyReferenced_nolock();
}

// Do not set *location anywhere else. That would introduce a race.
*location = (id)newObj;
}
else {
// No new value. The storage is not changed.
}

SideTable::unlockTwo<HaveOld, HaveNew>(oldTable, newTable);

return (id)newObj;
}
-

以上就是 store_weak 这个函数的实现,它主要做了以下几件事:

-
    -
  • 声明了新旧散列表指针,因为 weak 修饰的变量如果之前已经指向一个对象,然后其再次改变指向另一个对象,那么按理来说我们需要从oldTable中删除 weak 变量的记录,也就是要释放该weak变量,然后再给newTable添加新记录(weak变量)。这里的新旧散列表就是这个作用。
  • -
  • 根据新旧变量的地址获取相应的 SideTable
  • -
  • 对两个表进行加锁操作,防止多线程竞争冲突
  • -
  • 进行线程冲突重处理判断
  • -
  • 判断其 isa 是否为空,为空则需要进行初始化
  • -
  • 如果存在旧值,调用 weak_unregister_no_lock 函数清除旧值
  • -
  • 调用 weak_register_no_lock 函数分配新值
  • -
  • 解锁两个表,并返回第二参数
  • -
-

tip

-

你可以把objc_storeWeak(id location, objc_object newObj)理解为:objc_storeWeak(value, key),并且当key变nil,将value置nil。
结合最开始的例子我们可以理解为objc_storeWeak(&a, b)
在b非nil时,a和b指向同一个内存地址,在b变nil时,a变nil。此时向a发送消息不会崩溃:在Objective-C中向nil发送消息是安全的。
而如果a是由 assign 修饰的,则: 在 b 非 nil 时,a 和 b 指向同一个内存地址,在 b 变 nil 时,a 还是指向该内存地址,变野指针。此时向 a 发送消息极易崩溃。

-
-

初始化弱引用对象流程一览

初始化弱引用对象流程一览

-

SideTable

可能大家对sideTale不太明白,sideTable主要用于管理对象的引用计数和 weak 表。在 NSObject.mm 中声明其数据结构:

-
1
2
3
4
5
6
7
8
struct SideTable {
// 保证原子操作的自旋锁
spinlock_t slock;
// 引用计数的 hash 表
RefcountMap refcnts;
// weak 引用全局 hash 表
weak_table_t weak_table;
}
-

对于 slock 和 refcnts 两个成员不用多说,第一个是为了防止竞争选择的自旋锁,第二个是协助对象的 isa 指针的 extra_rc 共同引用计数的变量。这里主要看 weak_table_t 的结构与作用。

-

weak_table_t

weak_table_t结构体存储了某个对象相关的的所有的弱引用信息。其定义如下(具体定义在objc-weak.h中):

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
* The global weak references table. Stores object ids as keys,
* and weak_entry_t structs as their values.
*/
struct weak_table_t {
// 保存了所有指向指定对象的 weak 指针
weak_entry_t *weak_entries;
// 存储空间
size_t num_entries;
// 参与判断引用计数辅助量
uintptr_t mask;
// hash key 最大偏移值
uintptr_t max_hash_displacement;
};
-

使用weak 指针指向的对象的地址作为 key ,用 weak_entry_t 类型结构体对象作为 value 。其中的 weak_entries 成员,从字面意思上看,即为弱引用表入口。

-

weak_entry_t

其中weak_entry_t是存储在 weak_table_t 中的一个内部结构体,它负责维护和存储指向一个对象的所有弱引用hash表。其定义如下:

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
typedef objc_object ** weak_referrer_t;
struct weak_entry_t {
DisguisedPtrobjc_object> referent;
union {
struct {
weak_referrer_t *referrers;
uintptr_t out_of_line : 1;
uintptr_t num_refs : PTR_MINUS_1;
uintptr_t mask;
uintptr_t max_hash_displacement;
};
struct {// out_of_line=0 is LSB of one of these (don't care which)
weak_referrer_t inline_referrers[WEAK_INLINE_COUNT];
};
}
}
-

referent:
被指对象的地址。前面循环遍历查找的时候就是判断目标地址是否和他相等。

-

referrers:
可变数组,里面保存着所有指向这个对象的弱引用的地址。当这个对象被释放的时候,referrers里的所有指针都会被设置成nil。

-

inline_referrers:
只有4个元素的数组,默认情况下用它来存储弱引用的指针。当大于4个的时候使用referrers来存储指针。

-

讲了这3个东西,我们用一张图来体现他们的关系

-

weak_unregister_no_lock

结合刚刚讲到的从oldTable中删除 weak 变量的记录,来看看weak_unregister_no_lock 函数如何清除旧值的。

-
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
void weak_unregister_no_lock(weak_table_t *weak_table, id referent_id, 
id *referrer_id)
{
objc_object *referent = (objc_object *)referent_id;
objc_object **referrer = (objc_object **)referrer_id;

weak_entry_t *entry;

if (!referent) return;

if ((entry = weak_entry_for_referent(weak_table, referent))) {
remove_referrer(entry, referrer);
bool empty = true;
if (entry->out_of_line && entry->num_refs != 0) {
empty = false;
}
else {
for (size_t i = 0; i < WEAK_INLINE_COUNT; i++) {
if (entry->inline_referrers[i]) {
empty = false;
break;
}
}
}

if (empty) {
weak_entry_remove(weak_table, entry);
}
}

// Do not set *referrer = nil. objc_storeWeak() requires that the
// value not change.
}
-

该方法主要作用是将旧对象在 weak_table 中解除 weak 指针的对应绑定。根据函数名,称之为解除注册操作。
来看看这个函数的逻辑。首先参数是 weak_table_t 表,键和值。声明 weak_entry_t 变量,如果key(referent)为空,直接返回。根据全局入口表和键获取对应的 weak_entry_t 对象 entry。获取到entry后,将entry以及 weak_table作为参数传入 remove_referrer 函数中,这个函数就是解除操作。然后判断entry是否为空,如果为空,从全局记录表中清除相应的entry。

-

weak_entry_for_referent

接下来,我们了解一下,如何获取这个 weak_entry_t 这个变量。

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
static weak_entry_t *weak_entry_for_referent(weak_table_t *weak_table, objc_object *referent)
{
assert(referent);

weak_entry_t *weak_entries = weak_table->weak_entries;

if (!weak_entries) return nil;

size_t index = hash_pointer(referent) & weak_table->mask;
size_t hash_displacement = 0;
while (weak_table->weak_entries[index].referent != referent) {
index = (index+1) & weak_table->mask;
hash_displacement++;
if (hash_displacement > weak_table->max_hash_displacement) {
return nil;
}
}

return &weak_table->weak_entries[index];
}
-

这个函数的逻辑就是先获取全局 weak 表入口,然后将引用计数对象的地址进行 hash 化后与 weak_table->mask 做与操作,作为下标,在全局 weak 表中查找,若找到,返回entry,若没有,返回nil。

-

remove_referrer

再来了解一下解除对象的函数:

-
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
static void remove_referrer(weak_entry_t *entry, objc_object **old_referrer)
{
if (! entry->out_of_line) {
for (size_t i = 0; i < WEAK_INLINE_COUNT; i++) {
if (entry->inline_referrers[i] == old_referrer) {
entry->inline_referrers[i] = nil;
return;
}
}
_objc_inform("Attempted to unregister unknown __weak variable "
"at %p. This is probably incorrect use of "
"objc_storeWeak() and objc_loadWeak(). "
"Break on objc_weak_error to debug.\n",
old_referrer);
objc_weak_error();
return;
}

size_t index = w_hash_pointer(old_referrer) & (entry->mask);
size_t hash_displacement = 0;
while (entry->referrers[index] != old_referrer) {
index = (index+1) & entry->mask;
hash_displacement++;
if (hash_displacement > entry->max_hash_displacement) {
_objc_inform("Attempted to unregister unknown __weak variable "
"at %p. This is probably incorrect use of "
"objc_storeWeak() and objc_loadWeak(). "
"Break on objc_weak_error to debug.\n",
old_referrer);
objc_weak_error();
return;
}
}
entry->referrers[index] = nil;
entry->num_refs--;
}
-

这个函数传入的是 weak_entry 对象,当 out_of_line 为0 时,遍历数组,找到对应的对象,置nil,如果未找到,报错并返回。当 out_of_line 不为0时,根据对象的地址 hash 化并和 mask 做与操作作为下标,查找相应的对象,若没有,报错并返回,若有,相应的置为 nil,并减少元素数量,即 num_refs 减 1。

-

清除旧值就讲完了
来看看添加新值

-

weak_register_no_lock

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
id weak_register_no_lock(weak_table_t *weak_table, id referent_id, 
id *referrer_id, bool crashIfDeallocating)
{
objc_object *referent = (objc_object *)referent_id;
objc_object **referrer = (objc_object **)referrer_id;

if (!referent || referent->isTaggedPointer()) return referent_id;

// ensure that the referenced object is viable
bool deallocating;
if (!referent->ISA()->hasCustomRR()) {
deallocating = referent->rootIsDeallocating();
}
else {
BOOL (*allowsWeakReference)(objc_object *, SEL) =
(BOOL(*)(objc_object *, SEL))
object_getMethodImplementation((id)referent,
SEL_allowsWeakReference);
if ((IMP)allowsWeakReference == _objc_msgForward) {
return nil;
}
deallocating =
! (*allowsWeakReference)(referent, SEL_allowsWeakReference);
}

if (deallocating) {
if (crashIfDeallocating) {
_objc_fatal("Cannot form weak reference to instance (%p) of "
"class %s. It is possible that this object was "
"over-released, or is in the process of deallocation.",
(void*)referent, object_getClassName((id)referent));
} else {
return nil;
}
}

// now remember it and where it is being stored
weak_entry_t *entry;
if ((entry = weak_entry_for_referent(weak_table, referent))) {
append_referrer(entry, referrer);
}
else {
weak_entry_t new_entry;
new_entry.referent = referent;
new_entry.out_of_line = 0;
new_entry.inline_referrers[0] = referrer;
for (size_t i = 1; i < WEAK_INLINE_COUNT; i++) {
new_entry.inline_referrers[i] = nil;
}

weak_grow_maybe(weak_table);
weak_entry_insert(weak_table, &new_entry);
}

// Do not set *referrer. objc_storeWeak() requires that the
// value not change.

return referent_id;
}
-

一大堆 if-else, 主要是为了判断该对象是不是 taggedPoint 以及是否正在调用 dealloca 等。下面操作开始,同样是先获取 weak_entry,如果获取到,则调用 append_referrer 插入对象,若没有,则新建一个 weak_entry,默认为 out_of_line,然后将新对象放到 0 下标位置,其他位置置为 nil 。下面两个函数 weak_grow_maybe 是用来判断是否需要重申请内存重 hash,weak_entry_insert 函数是用来将新建的 weak_entry 插入到全局 weak 表中。插入时同样是以对象地址的 hash 化和 mask 值相与作为下标来记录的。

-

接下来看看 append_referrer 函数,源代码如下:

-
append_referrer
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
static void append_referrer(weak_entry_t *entry, objc_object **new_referrer)
{
if (! entry->out_of_line) {
// Try to insert inline.
for (size_t i = 0; i < WEAK_INLINE_COUNT; i++) {
if (entry->inline_referrers[i] == nil) {
entry->inline_referrers[i] = new_referrer;
return;
}
}

// Couldn't insert inline. Allocate out of line.
weak_referrer_t *new_referrers = (weak_referrer_t *)
calloc(WEAK_INLINE_COUNT, sizeof(weak_referrer_t));
// This constructed table is invalid, but grow_refs_and_insert
// will fix it and rehash it.
for (size_t i = 0; i < WEAK_INLINE_COUNT; i++) {
new_referrers[i] = entry->inline_referrers[I];
}
entry->referrers = new_referrers;
entry->num_refs = WEAK_INLINE_COUNT;
entry->out_of_line = 1;
entry->mask = WEAK_INLINE_COUNT-1;
entry->max_hash_displacement = 0;
}

assert(entry->out_of_line);

if (entry->num_refs >= TABLE_SIZE(entry) * 3/4) {
return grow_refs_and_insert(entry, new_referrer);
}
size_t index = w_hash_pointer(new_referrer) & (entry->mask);
size_t hash_displacement = 0;
while (entry->referrers[index] != NULL) {
index = (index+1) & entry->mask;
hash_displacement++;
}
if (hash_displacement > entry->max_hash_displacement) {
entry->max_hash_displacement = hash_displacement;
}
weak_referrer_t &ref = entry->referrers[index];
ref = new_referrer;
entry->num_refs++;
}
-

当 out_of_line 为 0,并且静态数组里面还有位置存放,那么直接存放并返回。如果没有位置存放,则升级为动态数组,并加入。如果 out_of_line 不为 0,先判断是否需要扩容,然后同样的,使用对象地址的 hash 化和 mask 做与操作作为下标,找到相应的位置并插入。

-

对象的销毁以及 weak 的置 nil 实现

释放时,调用clearDeallocating函数。clearDeallocating 函数首先根据对象地址获取所有weak指针地址的数组,然后遍历这个数组把其中的数据设为nil,最后把这个entry从weak表中删除,最后清理对象的记录。

-

当weak引用指向的对象被释放时,又是如何去处理weak指针的呢?当释放对象时,其基本流程如下:

-
    -
  • 调用 objc_release
  • -
  • 因为对象的引用计数为0,所以执行dealloc
  • -
  • 在dealloc 中,调用了_objc_rootDealloc 函数
  • -
  • 在 _objc_rootDealloc 中,调用了 objec_dispose 函数
  • -
  • 调用objc_destructInstance
  • -
  • 最后调用 objc_clear_deallocating
  • -
-

objc_clear_deallocating的具体实现如下:

1
2
3
4
5
6
7
8
void objc_clear_deallocating(id obj) 
{
assert(obj);
assert(!UseGC);

if (obj->isTaggedPointer()) return;
obj->clearDeallocating();
}
-

这个函数只是做一些判断以及更深层次的函数调用,

-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void objc_object::sidetable_clearDeallocating()
{
SideTable& table = SideTables()[this];

// clear any weak table items
// clear extra retain count and deallocating bit
// (fixme warn or abort if extra retain count == 0 ?)
table.lock();
// 迭代器
RefcountMap::iterator it = table.refcnts.find(this);
if (it != table.refcnts.end()) {
if (it->second & SIDE_TABLE_WEAKLY_REFERENCED) {
weak_clear_no_lock(&table.weak_table, (id)this);
}
table.refcnts.erase(it);
}
table.unlock();
}
-

我们可以看到,在这个函数中,首先取出对象对应的SideTable实例,如果这个对象有关联的弱引用,则调用weak_clear_no_lock来清除对象的弱引用信息,我们在来深入一下

-
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
void 
weak_clear_no_lock(weak_table_t *weak_table, id referent_id)
{
//1、拿到被销毁对象的指针
objc_object *referent = (objc_object *)referent_id;

//2、通过 指针 在weak_table中查找出对应的entry
weak_entry_t *entry = weak_entry_for_referent(weak_table, referent);
if (entry == nil) {
/// XXX shouldn't happen, but does with mismatched CF/objc
//printf("XXX no entry for clear deallocating %p\n", referent);
return;
}

//3、将所有的引用设置成nil
weak_referrer_t *referrers;
size_t count;

if (entry->out_of_line()) {
//3.1、如果弱引用超过4个则将referrers数组内的弱引用都置成nil。
referrers = entry->referrers;
count = TABLE_SIZE(entry);
}
else {
//3.2、不超过4个则将inline_referrers数组内的弱引用都置成nil
referrers = entry->inline_referrers;
count = WEAK_INLINE_COUNT;
}

//循环设置所有的引用为nil
for (size_t i = 0; i < count; ++i) {
objc_object **referrer = referrers[I];
if (referrer) {
if (*referrer == referent) {
*referrer = nil;
}
else if (*referrer) {
_objc_inform("__weak variable at %p holds %p instead of %p. "
"This is probably incorrect use of "
"objc_storeWeak() and objc_loadWeak(). "
"Break on objc_weak_error to debug.\n",
referrer, (void*)*referrer, (void*)referent);
objc_weak_error();
}
}
}

//4、从weak_table中移除entry
weak_entry_remove(weak_table, entry);
}
-

这个函数根据 out_of_line 的值,取得对应的记录表,然后根据引用计数对象,将相应的 weak 对象置 nil。最后清除相应的记录表。

-

通过上面的描述,我们基本能了解一个weak引用从生到死的过程。从这个流程可以看出,一个weak引用的处理涉及各种查表、添加与删除操作,还是有一定消耗的。所以如果大量使用weak变量的话,会对性能造成一定的影响。那么,我们应该在什么时候去使用weak呢?《Objective-C高级编程》给我们的建议是只在避免循环引用的时候使用weak修饰符。

-

好了本文开篇提出的几个问题的答案都能在上面找到。

-

参看
iOS 中weak的实现
iOS管理对象内存的数据结构以及操作算法–SideTables、RefcountMap、weak_table_t-一
细说weak
runtime 如何实现 weak 属性 -
iOS 底层解析weak的实现原理(包含weak对象的初始化,引用,释放的分析)

- - -
- - - - - - - - - - - -
- - - -
- - - -
- -
-
- - -
- - - - - - - - - -
- - - - - - - - - -
-
- - - - -
- - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Blog/.gitignore b/Blog/.gitignore new file mode 100644 index 0000000..063b0e4 --- /dev/null +++ b/Blog/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +Thumbs.db +db.json +*.log +node_modules/ +public/ +.deploy*/ \ No newline at end of file diff --git a/Blog/_config.yml b/Blog/_config.yml new file mode 100644 index 0000000..c0616e8 --- /dev/null +++ b/Blog/_config.yml @@ -0,0 +1,83 @@ +# Hexo Configuration +## Docs: https://hexo.io/docs/configuration.html +## Source: https://github.com/hexojs/hexo/ + +# Site +title: TMR De Blog +subtitle: iOS/RN/爬虫爱好者 +description: 拥抱全栈,深耕移动开发 +keywords: iOS +author: 塔米尔 +language: zh-Hans +timezone: +avatar: https://upload.jianshu.io/users/upload_avatars/2067180/c0c37aff-e45a-422f-8196-50adefdf7ea4.jpeg?imageMogr2/auto-orient/strip|imageView2/1/w/240/h/240 +# 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/docs/deployment.html +deploy: + type: git + repo: https://github.com/jungleiOS/jungleiOS.github.io + branch: master diff --git a/Blog/package-lock.json b/Blog/package-lock.json new file mode 100644 index 0000000..bfaae34 --- /dev/null +++ b/Blog/package-lock.json @@ -0,0 +1,3744 @@ +{ + "name": "hexo-site", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "JSONStream": { + "version": "1.3.3", + "resolved": "http://registry.npm.taobao.org/JSONStream/download/JSONStream-1.3.3.tgz", + "integrity": "sha1-J7S4+7/qtOcbz1Uefye+jZUiOb8=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "a-sync-waterfall": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/a-sync-waterfall/download/a-sync-waterfall-1.0.0.tgz", + "integrity": "sha1-OOgxnXk3niRiiEW1O5ZyKyng5Hw=" + }, + "abbrev": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz", + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=" + }, + "accepts": { + "version": "1.3.5", + "resolved": "http://registry.npm.taobao.org/accepts/download/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "anymatch": { + "version": "1.3.2", + "resolved": "http://registry.npm.taobao.org/anymatch/download/anymatch-1.3.2.tgz", + "integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=", + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "argparse": { + "version": "1.0.10", + "resolved": "http://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/array-unique/download/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "asap": { + "version": "2.0.6", + "resolved": "http://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "async": { + "version": "0.2.10", + "resolved": "http://registry.npm.taobao.org/async/download/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/async-each/download/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "atob": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/atob/download/atob-2.1.1.tgz", + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "http://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-eslint": { + "version": "7.2.3", + "resolved": "http://registry.npm.taobao.org/babel-eslint/download/babel-eslint-7.2.3.tgz", + "integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "http://registry.npm.taobao.org/babel-messages/download/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "http://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "http://registry.npm.taobao.org/babel-traverse/download/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "http://registry.npm.taobao.org/babel-types/download/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "http://registry.npm.taobao.org/babylon/download/babylon-6.18.0.tgz", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "http://registry.npm.taobao.org/base/download/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "requires": { + "cache-base": "1.0.1", + "class-utils": "0.3.6", + "component-emitter": "1.2.1", + "define-property": "1.0.0", + "isobject": "3.0.1", + "mixin-deep": "1.3.1", + "pascalcase": "0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + } + } + }, + "basic-auth": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/basic-auth/download/basic-auth-2.0.0.tgz", + "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=", + "requires": { + "safe-buffer": "5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.1.tgz", + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" + } + } + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "http://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz", + "integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=" + }, + "boolbase": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "http://registry.npm.taobao.org/braces/download/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browser-fingerprint": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/browser-fingerprint/download/browser-fingerprint-0.0.1.tgz", + "integrity": "sha1-jfPNyiW/fVs1QtYVRdcwBT/OYEo=" + }, + "bytes": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/bytes/download/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "cache-base": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "requires": { + "collection-visit": "1.0.0", + "component-emitter": "1.2.1", + "get-value": "2.0.6", + "has-value": "1.0.0", + "isobject": "3.0.1", + "set-value": "2.0.0", + "to-object-path": "0.3.0", + "union-value": "1.0.0", + "unset-value": "1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "camel-case": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, + "camelcase": { + "version": "1.2.1", + "resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cheerio": { + "version": "0.22.0", + "resolved": "http://registry.npm.taobao.org/cheerio/download/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.9.2", + "lodash.assignin": "4.2.0", + "lodash.bind": "4.2.1", + "lodash.defaults": "4.2.0", + "lodash.filter": "4.6.0", + "lodash.flatten": "4.4.0", + "lodash.foreach": "4.5.0", + "lodash.map": "4.6.0", + "lodash.merge": "4.6.1", + "lodash.pick": "4.4.0", + "lodash.reduce": "4.6.0", + "lodash.reject": "4.6.0", + "lodash.some": "4.6.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "http://registry.npm.taobao.org/chokidar/download/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.4", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "http://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "requires": { + "arr-union": "3.1.0", + "define-property": "0.2.5", + "isobject": "3.0.1", + "static-extend": "0.1.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/collection-visit/download/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "1.0.0", + "object-visit": "1.0.1" + } + }, + "color-convert": { + "version": "1.9.1", + "resolved": "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.1.tgz", + "integrity": "sha1-wSYRB66y8pTr/+ye2eytUppgl+0=", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "command-exists": { + "version": "1.2.6", + "resolved": "http://registry.npm.taobao.org/command-exists/download/command-exists-1.2.6.tgz", + "integrity": "sha1-V3+OX+sMsPFZzVV6Uam+G9124J4=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "http://registry.npm.taobao.org/component-emitter/download/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "compressible": { + "version": "2.0.14", + "resolved": "http://registry.npm.taobao.org/compressible/download/compressible-2.0.14.tgz", + "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", + "requires": { + "mime-db": "1.34.0" + }, + "dependencies": { + "mime-db": { + "version": "1.34.0", + "resolved": "http://registry.npm.taobao.org/mime-db/download/mime-db-1.34.0.tgz", + "integrity": "sha1-RS0Oz/XDA0am3B5kseruDTcZ/5o=" + } + } + }, + "compression": { + "version": "1.7.2", + "resolved": "http://registry.npm.taobao.org/compression/download/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", + "requires": { + "accepts": "1.3.5", + "bytes": "3.0.0", + "compressible": "2.0.14", + "debug": "2.6.9", + "on-headers": "1.0.1", + "safe-buffer": "5.1.1", + "vary": "1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.1.tgz", + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "connect": { + "version": "3.6.6", + "resolved": "http://registry.npm.taobao.org/connect/download/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "1.3.2", + "utils-merge": "1.0.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js": { + "version": "2.5.7", + "resolved": "http://registry.npm.taobao.org/core-js/download/core-js-2.5.7.tgz", + "integrity": "sha1-+XJgj/DOrWi4QaFqky0LGDeRgU4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "requires": { + "lru-cache": "4.1.3", + "which": "1.3.1" + } + }, + "css-parse": { + "version": "1.7.0", + "resolved": "http://registry.npm.taobao.org/css-parse/download/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=" + }, + "css-select": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/css-select/download/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/css-what/download/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + }, + "cuid": { + "version": "1.3.8", + "resolved": "http://registry.npm.taobao.org/cuid/download/cuid-1.3.8.tgz", + "integrity": "sha1-S4deCWm612T37AcGz0T1+wgx9rc=", + "requires": { + "browser-fingerprint": "0.0.1", + "core-js": "1.2.7", + "node-fingerprint": "0.0.2" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "http://registry.npm.taobao.org/core-js/download/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "define-property": { + "version": "2.0.2", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "requires": { + "is-descriptor": "1.0.2", + "isobject": "3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + } + } + }, + "depd": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/dom-serializer/download/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/domelementtype/download/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "http://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.4.2", + "resolved": "http://registry.npm.taobao.org/domhandler/download/domhandler-2.4.2.tgz", + "integrity": "sha1-iAUJfpM9ZehVRvcm1g9euItE+AM=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "http://registry.npm.taobao.org/domutils/download/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.6.1", + "resolved": "http://registry.npm.taobao.org/ejs/download/ejs-2.6.1.tgz", + "integrity": "sha1-SY7A1JVlWrxvI81hho2SZGQHGqA=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "entities": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/entities/download/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/esprima/download/esprima-4.0.0.tgz", + "integrity": "sha1-RJnt3NERDgshi6zy+n9/WfVcqAQ=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "etag": { + "version": "1.8.1", + "resolved": "http://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "http://registry.npm.taobao.org/expand-range/download/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.4" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "1.0.0", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fill-range": { + "version": "2.2.4", + "resolved": "http://registry.npm.taobao.org/fill-range/download/fill-range-2.2.4.tgz", + "integrity": "sha1-6x53OrsFbc2N8r/favWbizqTZWU=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "3.0.0", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/for-own/download/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "http://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.4", + "resolved": "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.4.tgz", + "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=", + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.7", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "0.5.1", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "optional": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "optional": true, + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "http://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "glob": { + "version": "6.0.4", + "resolved": "http://registry.npm.taobao.org/glob/download/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "optional": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "http://registry.npm.taobao.org/glob-base/download/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/glob-parent/download/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "http://registry.npm.taobao.org/globals/download/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=" + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-value": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "2.0.6", + "has-values": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "hexo": { + "version": "3.7.1", + "resolved": "http://registry.npm.taobao.org/hexo/download/hexo-3.7.1.tgz", + "integrity": "sha1-A4GHTmeJG1IbnjAj7024WmIzf5Y=", + "requires": { + "abbrev": "1.1.1", + "archy": "1.0.0", + "bluebird": "3.5.1", + "chalk": "2.4.1", + "cheerio": "0.22.0", + "hexo-cli": "1.1.0", + "hexo-front-matter": "0.2.3", + "hexo-fs": "0.2.3", + "hexo-i18n": "0.2.1", + "hexo-log": "0.2.0", + "hexo-util": "0.6.3", + "js-yaml": "3.12.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "moment": "2.22.2", + "moment-timezone": "0.5.17", + "nunjucks": "3.1.3", + "pretty-hrtime": "1.0.3", + "resolve": "1.7.1", + "strip-ansi": "4.0.0", + "strip-indent": "2.0.0", + "swig-extras": "0.0.1", + "swig-templates": "2.0.2", + "text-table": "0.2.0", + "tildify": "1.2.0", + "titlecase": "1.1.2", + "warehouse": "2.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.1.tgz", + "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "hexo-cli": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/hexo-cli/download/hexo-cli-1.1.0.tgz", + "integrity": "sha1-SW0jjUZG2/0c8Ee23FJxv7XLeY8=", + "requires": { + "abbrev": "1.1.1", + "bluebird": "3.5.1", + "chalk": "1.1.3", + "command-exists": "1.2.6", + "hexo-fs": "0.2.3", + "hexo-log": "0.2.0", + "hexo-util": "0.6.3", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "resolve": "1.7.1", + "tildify": "1.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + } + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.4.0.tgz", + "integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=", + "requires": { + "has-flag": "3.0.0" + } + }, + "swig-templates": { + "version": "2.0.2", + "resolved": "http://registry.npm.taobao.org/swig-templates/download/swig-templates-2.0.2.tgz", + "integrity": "sha1-0lAqcwMBk1b06nbqkGXU9Yr2q3U=", + "requires": { + "optimist": "0.6.1", + "uglify-js": "2.6.0" + } + }, + "uglify-js": { + "version": "2.6.0", + "resolved": "http://registry.npm.taobao.org/uglify-js/download/uglify-js-2.6.0.tgz", + "integrity": "sha1-JeqhzDVQ45QQzu+v0c+7a20V8AE=", + "requires": { + "async": "0.2.10", + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "hexo-bunyan": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/hexo-bunyan/download/hexo-bunyan-1.0.0.tgz", + "integrity": "sha1-shBrJlR7Iy8BlduGPLXV/4Un/TY=", + "requires": { + "moment": "2.22.2", + "mv": "2.1.1", + "safe-json-stringify": "1.2.0" + } + }, + "hexo-deployer-git": { + "version": "0.3.1", + "resolved": "http://registry.npm.taobao.org/hexo-deployer-git/download/hexo-deployer-git-0.3.1.tgz", + "integrity": "sha1-JrCF7MUOLMmezTPVbCVMVUTALSE=", + "requires": { + "babel-eslint": "7.2.3", + "bluebird": "3.5.1", + "chalk": "1.1.3", + "hexo-fs": "0.2.3", + "hexo-util": "0.6.3", + "moment": "2.22.2", + "swig": "1.4.2" + } + }, + "hexo-front-matter": { + "version": "0.2.3", + "resolved": "http://registry.npm.taobao.org/hexo-front-matter/download/hexo-front-matter-0.2.3.tgz", + "integrity": "sha1-x8qO9CDqNr2F6ECKLoyb9J76YF4=", + "requires": { + "js-yaml": "3.12.0" + } + }, + "hexo-fs": { + "version": "0.2.3", + "resolved": "http://registry.npm.taobao.org/hexo-fs/download/hexo-fs-0.2.3.tgz", + "integrity": "sha1-w6gbRuRX36/FbYfHjvEUEE9KPkE=", + "requires": { + "bluebird": "3.5.1", + "chokidar": "1.7.0", + "escape-string-regexp": "1.0.5", + "graceful-fs": "4.1.11" + } + }, + "hexo-generator-archive": { + "version": "0.1.5", + "resolved": "http://registry.npm.taobao.org/hexo-generator-archive/download/hexo-generator-archive-0.1.5.tgz", + "integrity": "sha1-qXkhTN3e4mk+BVGAnClL7a27abM=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "2.1.1" + }, + "dependencies": { + "object-assign": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" + } + } + }, + "hexo-generator-category": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/hexo-generator-category/download/hexo-generator-category-0.1.3.tgz", + "integrity": "sha1-uealhiUwqDvdfaTIGcG58+TMtLI=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "2.1.1" + }, + "dependencies": { + "object-assign": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" + } + } + }, + "hexo-generator-index": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/hexo-generator-index/download/hexo-generator-index-0.2.1.tgz", + "integrity": "sha1-kEIin8rHmq9wBXXaGTMr8/fuXF0=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "4.1.1" + } + }, + "hexo-generator-tag": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/hexo-generator-tag/download/hexo-generator-tag-0.2.0.tgz", + "integrity": "sha1-xXFYRrtB5X2cIMHWbX2yGhq/emI=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "4.1.1" + } + }, + "hexo-i18n": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/hexo-i18n/download/hexo-i18n-0.2.1.tgz", + "integrity": "sha1-hPFBQyvwnYtVjth4xygWS20c1t4=", + "requires": { + "sprintf-js": "1.0.3" + } + }, + "hexo-log": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/hexo-log/download/hexo-log-0.2.0.tgz", + "integrity": "sha1-0w/UXhoSqDyIAzWGZASF78XfWm8=", + "requires": { + "chalk": "1.1.3", + "hexo-bunyan": "1.0.0" + } + }, + "hexo-pagination": { + "version": "0.0.2", + "resolved": "http://registry.npm.taobao.org/hexo-pagination/download/hexo-pagination-0.0.2.tgz", + "integrity": "sha1-jPRwx9sN5bGKOSanbesZQBXffys=", + "requires": { + "utils-merge": "1.0.1" + } + }, + "hexo-renderer-ejs": { + "version": "0.3.1", + "resolved": "http://registry.npm.taobao.org/hexo-renderer-ejs/download/hexo-renderer-ejs-0.3.1.tgz", + "integrity": "sha1-wMGjdXUy1H5bfZ3JCLXf2YyUviw=", + "requires": { + "ejs": "2.6.1", + "object-assign": "4.1.1" + } + }, + "hexo-renderer-marked": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/hexo-renderer-marked/download/hexo-renderer-marked-0.3.2.tgz", + "integrity": "sha1-1qN6+f8ZXjD5727eGgbqH+QyKWY=", + "requires": { + "hexo-util": "0.6.3", + "marked": "0.3.19", + "object-assign": "4.1.1", + "strip-indent": "2.0.0" + } + }, + "hexo-renderer-stylus": { + "version": "0.3.3", + "resolved": "http://registry.npm.taobao.org/hexo-renderer-stylus/download/hexo-renderer-stylus-0.3.3.tgz", + "integrity": "sha1-xU6ifh/Y48ipp6hM+6itNUEiyn8=", + "requires": { + "nib": "1.1.2", + "stylus": "0.54.5" + } + }, + "hexo-server": { + "version": "0.2.2", + "resolved": "http://registry.npm.taobao.org/hexo-server/download/hexo-server-0.2.2.tgz", + "integrity": "sha1-WSaGtVS4v+CaGbyGwPADrD6MGbk=", + "requires": { + "bluebird": "3.5.1", + "chalk": "1.1.3", + "compression": "1.7.2", + "connect": "3.6.6", + "mime": "1.6.0", + "morgan": "1.9.0", + "object-assign": "4.1.1", + "opn": "4.0.2", + "serve-static": "1.13.2" + } + }, + "hexo-util": { + "version": "0.6.3", + "resolved": "http://registry.npm.taobao.org/hexo-util/download/hexo-util-0.6.3.tgz", + "integrity": "sha1-FqKt5Fe++VWvDf0io/5vCkmpE3w=", + "requires": { + "bluebird": "3.5.1", + "camel-case": "3.0.0", + "cross-spawn": "4.0.2", + "highlight.js": "9.12.0", + "html-entities": "1.2.1", + "striptags": "2.2.1" + } + }, + "highlight.js": { + "version": "9.12.0", + "resolved": "http://registry.npm.taobao.org/highlight.js/download/highlight.js-9.12.0.tgz", + "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=" + }, + "html-entities": { + "version": "1.2.1", + "resolved": "http://registry.npm.taobao.org/html-entities/download/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "http://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.2", + "domutils": "1.5.1", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "http://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": "1.5.0" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + } + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invariant": { + "version": "2.2.4", + "resolved": "http://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz", + "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=" + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/is-dotfile/download/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-odd": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-odd/download/is-odd-2.0.0.tgz", + "integrity": "sha1-dkZiRnH9fqVYzNmieVGC8pWPGyQ=", + "optional": true, + "requires": { + "is-number": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=", + "optional": true + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "http://registry.npm.taobao.org/is-plain-object/download/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "http://registry.npm.taobao.org/js-yaml/download/js-yaml-3.12.0.tgz", + "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/jsonparse/download/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/lazy-cache/download/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.10.tgz", + "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc=" + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "http://registry.npm.taobao.org/lodash.assignin/download/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "http://registry.npm.taobao.org/lodash.bind/download/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "http://registry.npm.taobao.org/lodash.defaults/download/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "http://registry.npm.taobao.org/lodash.filter/download/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "http://registry.npm.taobao.org/lodash.flatten/download/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "http://registry.npm.taobao.org/lodash.foreach/download/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "http://registry.npm.taobao.org/lodash.map/download/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "http://registry.npm.taobao.org/lodash.merge/download/lodash.merge-4.6.1.tgz", + "integrity": "sha1-rcJdnLmbk5HFliTzefu6YNcRHVQ=" + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "http://registry.npm.taobao.org/lodash.pick/download/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "http://registry.npm.taobao.org/lodash.reduce/download/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "http://registry.npm.taobao.org/lodash.reject/download/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "http://registry.npm.taobao.org/lodash.some/download/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "longest": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/loose-envify/download/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "http://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.3.tgz", + "integrity": "sha1-oRdc80lt/IQ2wVbDNLSVWZK85pw=", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-visit": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "1.0.1" + } + }, + "markdown": { + "version": "0.5.0", + "resolved": "http://registry.npm.taobao.org/markdown/download/markdown-0.5.0.tgz", + "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI=", + "requires": { + "nopt": "2.1.2" + } + }, + "marked": { + "version": "0.3.19", + "resolved": "http://registry.npm.taobao.org/marked/download/marked-0.3.19.tgz", + "integrity": "sha1-XUf3CcTJ/Dwha21GEnKA9As515A=" + }, + "math-random": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/math-random/download/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=" + }, + "micromatch": { + "version": "2.3.11", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "http://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz", + "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "http://registry.npm.taobao.org/mime-db/download/mime-db-1.33.0.tgz", + "integrity": "sha1-o0kgUKXLm2NFBUHjnZeI0icng9s=" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.18.tgz", + "integrity": "sha1-bzI/YKg9ERRvgx/xH9ZuL+VQO7g=", + "requires": { + "mime-db": "1.33.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "requires": { + "for-in": "1.0.2", + "is-extendable": "1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "requires": { + "is-plain-object": "2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "moment": { + "version": "2.22.2", + "resolved": "http://registry.npm.taobao.org/moment/download/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + }, + "moment-timezone": { + "version": "0.5.17", + "resolved": "http://registry.npm.taobao.org/moment-timezone/download/moment-timezone-0.5.17.tgz", + "integrity": "sha1-PI/vMgUdhMOvF02R3FKXfcsK1+U=", + "requires": { + "moment": "2.22.2" + } + }, + "morgan": { + "version": "1.9.0", + "resolved": "http://registry.npm.taobao.org/morgan/download/morgan-1.9.0.tgz", + "integrity": "sha1-0B+mxlhZt2/PMbPLU6OCGjEdgFE=", + "requires": { + "basic-auth": "2.0.0", + "debug": "2.6.9", + "depd": "1.1.2", + "on-finished": "2.3.0", + "on-headers": "1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mv": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/mv/download/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "optional": true, + "requires": { + "mkdirp": "0.5.1", + "ncp": "2.0.0", + "rimraf": "2.4.5" + } + }, + "nan": { + "version": "2.10.0", + "resolved": "http://registry.npm.taobao.org/nan/download/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", + "optional": true + }, + "nanomatch": { + "version": "1.2.9", + "resolved": "http://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.9.tgz", + "integrity": "sha1-h59xUMstq3pHElkGbBBO7m4Pp8I=", + "optional": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "fragment-cache": "0.2.1", + "is-odd": "2.0.0", + "is-windows": "1.0.2", + "kind-of": "6.0.2", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "optional": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "optional": true + } + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/ncp/download/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "optional": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/negotiator/download/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "nib": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/nib/download/nib-1.1.2.tgz", + "integrity": "sha1-amnt5AgblcDe+L4CSkyK4MLLtsc=", + "requires": { + "stylus": "0.54.5" + } + }, + "no-case": { + "version": "2.3.2", + "resolved": "http://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz", + "integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=", + "requires": { + "lower-case": "1.1.4" + } + }, + "node-fingerprint": { + "version": "0.0.2", + "resolved": "http://registry.npm.taobao.org/node-fingerprint/download/node-fingerprint-0.0.2.tgz", + "integrity": "sha1-Mcur63GmeufdWn3AQuUcPHWGhQE=" + }, + "nopt": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/nopt/download/nopt-2.1.2.tgz", + "integrity": "sha1-bMzZd7gBMqB3MdbozljCyDA8+a8=", + "requires": { + "abbrev": "1.1.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/nth-check/download/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "requires": { + "boolbase": "1.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nunjucks": { + "version": "3.1.3", + "resolved": "http://registry.npm.taobao.org/nunjucks/download/nunjucks-3.1.3.tgz", + "integrity": "sha1-miPIRK8BwUOgtA873RISqdeHcmA=", + "requires": { + "a-sync-waterfall": "1.0.0", + "asap": "2.0.6", + "chokidar": "2.0.3", + "postinstall-build": "5.0.1", + "yargs": "3.32.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", + "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", + "optional": true, + "requires": { + "micromatch": "3.1.10", + "normalize-path": "2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "optional": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "http://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "braces": { + "version": "2.3.2", + "resolved": "http://registry.npm.taobao.org/braces/download/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "repeat-element": "1.1.2", + "snapdragon": "0.8.2", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "chokidar": { + "version": "2.0.3", + "resolved": "http://registry.npm.taobao.org/chokidar/download/chokidar-2.0.3.tgz", + "integrity": "sha1-3L1PbLsqVbR5m6ioQKxSfl9LEXY=", + "optional": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.2", + "fsevents": "1.2.4", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.1.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "optional": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "optional": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "optional": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "optional": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "optional": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "optional": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "optional": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "http://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "optional": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "optional": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "optional": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/fill-range/download/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "optional": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "optional": true, + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "optional": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "optional": true, + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "optional": true, + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "optional": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + }, + "micromatch": { + "version": "3.1.10", + "resolved": "http://registry.npm.taobao.org/micromatch/download/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "optional": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.2", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.2", + "to-regex": "3.0.2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/window-size/download/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + } + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/object-copy/download/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "0.1.1", + "define-property": "0.2.5", + "kind-of": "3.2.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "http://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "http://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/on-headers/download/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, + "once": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "opn": { + "version": "4.0.2", + "resolved": "http://registry.npm.taobao.org/opn/download/opn-4.0.2.tgz", + "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", + "requires": { + "object-assign": "4.1.1", + "pinkie-promise": "2.0.1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/optimist/download/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "http://registry.npm.taobao.org/parse-glob/download/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "http://registry.npm.taobao.org/parseurl/download/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "optional": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "optional": true + }, + "postinstall-build": { + "version": "5.0.1", + "resolved": "http://registry.npm.taobao.org/postinstall-build/download/postinstall-build-5.0.1.tgz", + "integrity": "sha1-uRepB5smF42aJK9aXNjLSpkdEbk=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/pretty-hrtime/download/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "randomatic": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/randomatic/download/randomatic-3.0.0.tgz", + "integrity": "sha1-01SQAw6091eN4pLObfsEqRoSiSM=", + "requires": { + "is-number": "4.0.0", + "kind-of": "6.0.2", + "math-random": "1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-4.0.0.tgz", + "integrity": "sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + } + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/range-parser/download/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/readdirp/download/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "http://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz", + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "http://registry.npm.taobao.org/regex-cache/download/regex-cache-0.4.4.tgz", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "requires": { + "extend-shallow": "3.0.2", + "safe-regex": "1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "resolve": { + "version": "1.7.1", + "resolved": "http://registry.npm.taobao.org/resolve/download/resolve-1.7.1.tgz", + "integrity": "sha1-qt1lY3T9KYruiVvAJrgpdBhnf9M=", + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "http://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=" + }, + "right-align": { + "version": "0.1.3", + "resolved": "http://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.4.5", + "resolved": "http://registry.npm.taobao.org/rimraf/download/rimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "optional": true, + "requires": { + "glob": "6.0.4" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" + }, + "safe-json-stringify": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/safe-json-stringify/download/safe-json-stringify-1.2.0.tgz", + "integrity": "sha1-NW5EvJjx+TzkXfFLzXwBzahuCv0=", + "optional": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "0.1.15" + } + }, + "sax": { + "version": "0.5.8", + "resolved": "http://registry.npm.taobao.org/sax/download/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + }, + "send": { + "version": "0.16.2", + "resolved": "http://registry.npm.taobao.org/send/download/send-0.16.2.tgz", + "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=", + "requires": { + "debug": "2.6.9", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.3", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "http://registry.npm.taobao.org/mime/download/mime-1.4.1.tgz", + "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY=" + }, + "statuses": { + "version": "1.4.0", + "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.4.0.tgz", + "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=" + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "http://registry.npm.taobao.org/serve-static/download/serve-static-1.13.2.tgz", + "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=", + "requires": { + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.2" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/set-immediate-shim/download/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/set-value/download/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "split-string": "3.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.0.tgz", + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "http://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "requires": { + "base": "0.11.2", + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "map-cache": "0.2.2", + "source-map": "0.5.7", + "source-map-resolve": "0.5.2", + "use": "3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "requires": { + "define-property": "1.0.0", + "isobject": "3.0.1", + "snapdragon-util": "3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "1.0.2" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "requires": { + "kind-of": "6.0.2" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/is-descriptor/download/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "requires": { + "is-accessor-descriptor": "1.0.0", + "is-data-descriptor": "1.0.0", + "kind-of": "6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "requires": { + "kind-of": "3.2.2" + } + }, + "source-map": { + "version": "0.1.34", + "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.1.34.tgz", + "integrity": "sha1-p8/omux7FoLDsZjQrPtH19CQVms=", + "requires": { + "amdefine": "1.0.1" + } + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "http://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "requires": { + "atob": "2.1.1", + "decode-uri-component": "0.2.0", + "resolve-url": "0.2.1", + "source-map-url": "0.4.0", + "urix": "0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, + "split-string": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "requires": { + "extend-shallow": "3.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "static-extend": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "0.2.5", + "object-copy": "0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "http://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "0.1.6" + } + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/statuses/download/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/strip-indent/download/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + }, + "striptags": { + "version": "2.2.1", + "resolved": "http://registry.npm.taobao.org/striptags/download/striptags-2.2.1.tgz", + "integrity": "sha1-TEULcI1BuL85zyTEn/I0/Gqr/TI=" + }, + "stylus": { + "version": "0.54.5", + "resolved": "http://registry.npm.taobao.org/stylus/download/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "requires": { + "css-parse": "1.7.0", + "debug": "2.6.9", + "glob": "7.0.6", + "mkdirp": "0.5.1", + "sax": "0.5.8", + "source-map": "0.1.34" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "http://registry.npm.taobao.org/glob/download/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "swig": { + "version": "1.4.2", + "resolved": "http://registry.npm.taobao.org/swig/download/swig-1.4.2.tgz", + "integrity": "sha1-QIXKBFM2kQS11IPihBs5t64aq6U=", + "requires": { + "optimist": "0.6.1", + "uglify-js": "2.4.24" + } + }, + "swig-extras": { + "version": "0.0.1", + "resolved": "http://registry.npm.taobao.org/swig-extras/download/swig-extras-0.0.1.tgz", + "integrity": "sha1-tQP+3jcqucJMasaMr2VrzvGHIyg=", + "requires": { + "markdown": "0.5.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "http://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tildify": { + "version": "1.2.0", + "resolved": "http://registry.npm.taobao.org/tildify/download/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "titlecase": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/titlecase/download/titlecase-1.1.2.tgz", + "integrity": "sha1-eBE9EQgIa4MmMxoyR96o9aSeqFM=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "http://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "3.2.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "requires": { + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/to-regex-range/download/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "3.0.0", + "repeat-string": "1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "http://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + } + } + } + }, + "uglify-js": { + "version": "2.4.24", + "resolved": "http://registry.npm.taobao.org/uglify-js/download/uglify-js-2.4.24.tgz", + "integrity": "sha1-+tV1XB4Vd2WLsG/5q25UjJW+vW4=", + "requires": { + "async": "0.2.10", + "source-map": "0.1.34", + "uglify-to-browserify": "1.0.2", + "yargs": "3.5.4" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" + }, + "union-value": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/union-value/download/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "3.1.0", + "get-value": "2.0.6", + "is-extendable": "0.1.1", + "set-value": "0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "http://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "0.1.1" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "http://registry.npm.taobao.org/set-value/download/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "2.0.1", + "is-extendable": "0.1.1", + "is-plain-object": "2.0.4", + "to-object-path": "0.3.0" + } + } + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "0.3.1", + "isobject": "3.0.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "http://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "2.0.6", + "has-values": "0.1.4", + "isobject": "2.1.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "http://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "http://registry.npm.taobao.org/isobject/download/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "upath": { + "version": "1.1.0", + "resolved": "http://registry.npm.taobao.org/upath/download/upath-1.1.0.tgz", + "integrity": "sha1-NSVll+RqWB20eT0M5H+prr/J+r0=", + "optional": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "http://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, + "urix": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.0", + "resolved": "http://registry.npm.taobao.org/use/download/use-3.1.0.tgz", + "integrity": "sha1-FHFr8D/f79AwQK71jYtLhfOnxUQ=", + "requires": { + "kind-of": "6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "http://registry.npm.taobao.org/kind-of/download/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "http://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "http://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "warehouse": { + "version": "2.2.0", + "resolved": "http://registry.npm.taobao.org/warehouse/download/warehouse-2.2.0.tgz", + "integrity": "sha1-XQnWSUKZK+Zn2PfIagnCuK6gQGI=", + "requires": { + "JSONStream": "1.3.3", + "bluebird": "3.5.1", + "cuid": "1.3.8", + "graceful-fs": "4.1.11", + "is-plain-object": "2.0.4", + "lodash": "4.17.10" + } + }, + "which": { + "version": "1.3.1", + "resolved": "http://registry.npm.taobao.org/which/download/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "requires": { + "isexe": "2.0.0" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "http://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "http://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "3.5.4", + "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-3.5.4.tgz", + "integrity": "sha1-2K/49mXpTDS9JZvevRv68N3TU2E=", + "requires": { + "camelcase": "1.2.1", + "decamelize": "1.2.0", + "window-size": "0.1.0", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + } + } + } + } +} diff --git a/Blog/package.json b/Blog/package.json new file mode 100644 index 0000000..4c1c807 --- /dev/null +++ b/Blog/package.json @@ -0,0 +1,20 @@ +{ + "name": "hexo-site", + "version": "0.0.0", + "private": true, + "hexo": { + "version": "3.7.1" + }, + "dependencies": { + "hexo": "^3.2.0", + "hexo-deployer-git": "^0.3.1", + "hexo-generator-archive": "^0.1.4", + "hexo-generator-category": "^0.1.3", + "hexo-generator-index": "^0.2.0", + "hexo-generator-tag": "^0.2.0", + "hexo-renderer-ejs": "^0.3.0", + "hexo-renderer-marked": "^0.3.0", + "hexo-renderer-stylus": "^0.3.1", + "hexo-server": "^0.2.0" + } +} diff --git a/Blog/scaffolds/draft.md b/Blog/scaffolds/draft.md new file mode 100644 index 0000000..498e95b --- /dev/null +++ b/Blog/scaffolds/draft.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +tags: +--- diff --git a/Blog/scaffolds/page.md b/Blog/scaffolds/page.md new file mode 100644 index 0000000..f01ba3c --- /dev/null +++ b/Blog/scaffolds/page.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +date: {{ date }} +--- diff --git a/Blog/scaffolds/post.md b/Blog/scaffolds/post.md new file mode 100644 index 0000000..1f9b9a4 --- /dev/null +++ b/Blog/scaffolds/post.md @@ -0,0 +1,5 @@ +--- +title: {{ title }} +date: {{ date }} +tags: +--- diff --git "a/Blog/source/_posts/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256.md" "b/Blog/source/_posts/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256.md" new file mode 100644 index 0000000..a6cd8f5 --- /dev/null +++ "b/Blog/source/_posts/Charles-+-Mokcy-\346\250\241\346\213\237\345\220\216\345\217\260\350\277\224\345\233\236\346\225\260\346\215\256.md" @@ -0,0 +1,37 @@ +--- +title: Charles + Mokcy 模拟后台返回数据 +date: 2018.05.08 18:13 +--- +## 应用场景 +在开发中总有一些情况,我们按照设计出的图画好了,准备调接口。然后发现后台只做了接口的字段定义,具体的数据内容并没有返回给我们。这时候又需要接口为我们提供内容做一些网络或者逻辑的调试,我们不能干等着后台给我们提供数据啊。现在我们就可以用Charles拦截请求,Mocky模拟后台数据返回给我们。 +## Charles的使用 +如下图勾选上 macOS Proxy,这样Charles就能获取所有通过你的电脑发出的网络请求了 +![](https://upload-images.jianshu.io/upload_images/2067180-3e1f4d40edff36a6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) +抓到的数据 +![](https://upload-images.jianshu.io/upload_images/2067180-a0f0485191ab92fb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) +### 通过Charles的的Map功能重定向到用Mokcy模拟的地址 +右键你的接口选择Map Remote +![](https://upload-images.jianshu.io/upload_images/2067180-ff77429f01688a41.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) +填写相关信息 +![](https://upload-images.jianshu.io/upload_images/2067180-9fbff2c04b897ca7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) +具体填写,请接着往下看 +## Mocky模拟数据 +Mocky网址https://www.mocky.io/ +### Mcoky的使用 +![](https://upload-images.jianshu.io/upload_images/2067180-693eacfb9e4166e4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +1. Status Code 和 Content Type如图填就行了 +2. Custom headers 请求时所带的参数,多个参数就点Switch to basic mode 哪个按钮添加 +3. 在Body 中构建你自己的JSON +4. 点击Generate my HTTP Response生成如下链接 + +![生成的链接](https://upload-images.jianshu.io/upload_images/2067180-f52c4db6ea2bb9cd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) +回到Charles的重定向界面 +![](https://upload-images.jianshu.io/upload_images/2067180-9fbff2c04b897ca7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +1. protocol根据具体情况填写 +2. Host填写www.mokcy.io +3. path填写mokcy生成的地址 +4. Query带参数请求才填,同Map From下面的Query + + diff --git "a/Blog/source/_posts/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230.md" "b/Blog/source/_posts/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230.md" new file mode 100644 index 0000000..7813b7a --- /dev/null +++ "b/Blog/source/_posts/Python3-PySpider-\346\211\247\350\241\214-pyspider-all-\351\201\207\345\210\260\347\232\204\351\227\256\351\242\230.md" @@ -0,0 +1,53 @@ +--- +title: Python3 PySpider 执行 pyspider all 遇到的问题 +date: 2018.05.28 11:52 +--- +1. Could not create web server listening on port 25555 +2. pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) + +[参考文献](https://www.zhihu.com/question/267901970) + +## netstat、lsof查看端口 +### netstat +netstat用来查看系统当前系统网络状态信息,包括端口,连接情况等,常用方式如下: +* -t : 指明显示TCP端口 +* -u : 指明显示UDP端口 +* -l : 仅显示监听套接字(LISTEN状态的套接字) +* -p : 显示进程标识符和程序名称,每一个套接字/端口都属于一个程序 +* -n : 不进行DNS解析 +* -a 显示所有连接的端口 + +直接查看端口命令。netstat -an | grep 22 +note:22就是改为要查询的端口 + +### lsof +[参考链接](http://www.cnblogs.com/peida/archive/2013/02/26/2932972.html) +lsof的作用是列出当前系统打开文件(list open files),不过通过-i参数也能查看端口的连接情况,-i后跟冒号端口可以查看指定端口信息,直接-i是系统当前所有打开的端口 +* -a 列出打开文件存在的进程 +* -c<进程名> 列出指定进程所打开的文件 +* -g 列出GID号进程详情 +* -d<文件号> 列出占用该文件号的进程 +* +d<目录> 列出目录下被打开的文件 +* +D<目录> 递归列出目录下被打开的文件 +* -n<目录> 列出使用NFS的文件 +* -i<条件> 列出符合条件的进程。(4、6、协议、:端口、 @ip ) +* -p<进程号> 列出指定进程号所打开的文件 +* -u 列出UID号进程详情 +* -h 显示帮助信息 +* -v 显示版本信息 + +lsof -i:22 #查看22端口连接情况,默认为sshd端口 + +### 解决第一个问题 +1. 使用lsof命令查看那条线程占用了25555端口 +2. 执行kill命令杀掉那条线程 如: kill 15889 +### 解决第二个问题 +1. pip3 uninstall pycurl +2. export PYCURL_SSL_LIBRARY=openssl +3. export LDFLAGS=-L/usr/local/opt/openssl/lib +4. export CPPFLAGS=-I/usr/local/opt/openssl/include +5. pip3 install pycurl --compile --no-cache-dir + +执行以上命令行卸载pycurl再重装 + + diff --git "a/Blog/source/_posts/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266.md" "b/Blog/source/_posts/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266.md" new file mode 100644 index 0000000..d76abad --- /dev/null +++ "b/Blog/source/_posts/React-Native-\350\207\252\345\256\232\344\271\211\347\273\204\344\273\266.md" @@ -0,0 +1,200 @@ +--- +title: React Native 自定义组件 +date: 2017.04.02 01:04 +--- +### ES6语法 + +**定义组件** +在ES6里,我们通过定义一个继承自React.Component的class来定义一个组件类,像这样: + +```js +//ES6 +1. class Photo extends React.Component { +2. render() { +3. return ( +4. +5. ); +6. } +7. } + +``` +**定义组件的属性类型和默认属性** + + +在ES6里,可以统一使用static成员来实现 + +```js +//ES6 +1. class Video extends React.Component { +2. static defaultProps = { +3. autoPlay: false, +4. maxLoops: 10, +5. }; // 注意这里有分号 +6. static propTypes = { +7. autoPlay: React.PropTypes.bool.isRequired, +8. maxLoops: React.PropTypes.number.isRequired, +9. posterFrameSrc: React.PropTypes.string.isRequired, +1. videoSrc: React.PropTypes.string.isRequired, +2. }; // 注意这里有分号 +3. render() { +4. return ( +5. +6. ); +7. } // 注意这里既没有分号也没有逗号 +8. } + +``` + + +------- + +#### 正文 + +首先 + +```js +import React, { Component ,PropTypes} from 'react'; +``` + +必须包含PropTypes,这是为了规范组件属性的数据类型 + +```js +import { + Text, + View, + TouchableOpacity, + } from 'react-native'; +``` + +设置默认属性 + +```js +1. static defaultProps = { +2. defaultColor:'#f44e14', +3. buttonName:'Button', +4. } +``` +设置对外接收的属性,以及属性的数据类型 + +```js +1. static propTypes = { +2. setBackgroundColor : PropTypes.string, +3. buttonName : PropTypes.string, +4. block : PropTypes.func, +5. setWidth : PropTypes.number, +6. setHeight : PropTypes.number, +7. } +``` +上面的block属性我设置的是一个func类型,也就是函数,在这里就是起一个回调作用。 + +``` +1. render() { +2. return( +3. this.props.block()} > +4. +3. {this.props.buttonName} +4. +5. +6. ); +7. } +``` +#### 外部使用 + +引入自定义组件文件 + +``` +this.props.block()} >//执行外部传进来的函数 +``` +#### 自定义组件完整代码 +```js +1. import React, { Component ,PropTypes} from 'react'; +2. import { +3. Text, +4. View, +5. TouchableOpacity, +6. } from 'react-native'; +7. class DiscolorationButton extends React.Component{ +8. static defaultProps = { +9. defaultColor:'#f44e14', +1. buttonName:'Button', +2. } +3. static propTypes = { +4. setBackgroundColor : PropTypes.string, +5. buttonName : PropTypes.string, +6. block : PropTypes.func, +7. setWidth : PropTypes.number, +8. setHeight : PropTypes.number, +9. } +1. render() { +2. return( +3. this.props.block()} > +4. +3. {this.props.buttonName} +4. +5. +6. ); +7. } +8. } +9. module.exports = DiscolorationButton; +``` + +
+![效果图](http://upload-images.jianshu.io/upload_images/2067180-e0547192bd5c6831.gif?imageMogr2/auto-orient/strip) + + +### 外部调用 +```js +1. import React, { Component } from 'react'; +2. import { +3. AppRegistry, +4. StyleSheet, +5. Text, +6. View +7. } from 'react-native'; +8. import DiscolorationButton from './DiscolorationButton.js' +9. export default class test extends Component { +1. test(){ +2. alert('我是测试函数'); +3. } +4. render() { +5. return ( +6. +7. this.test()} +4. /> +5. +6. ); +7. } +8. } + +9. const styles = StyleSheet.create({ +1. container: { +2. flex: 1, +3. justifyContent: 'center', +4. alignItems: 'center', +5. backgroundColor: '#F5FCFF', +6. }, +7. }); +8. AppRegistry.registerComponent('test', () => test); +``` + + diff --git "a/Blog/source/_posts/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213.md" "b/Blog/source/_posts/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213.md" new file mode 100644 index 0000000..c4215e0 --- /dev/null +++ "b/Blog/source/_posts/ReactNative-ListView\350\275\273\346\235\276\344\270\212\346\211\213.md" @@ -0,0 +1,194 @@ +--- +title: ReactNative ListView轻松上手 +date: 2017.04.23 18:25 +--- +感觉自己需要提一下了,最近简单的写了个demo练练手,主要记录下自己的收获。 + +在移动开发中我们用得最多和最重要的一个控件就是滚动视图,在iOS开发中我们用的这个控件叫做TableView,在Android开发中这个控件叫做ListView,然后就是现在的跨平台开发。最近最火的跨平台开发框架当属Facebook开源的React-Native了。在React-Native中也有一个实现滚动视图的组件也叫做ListView + +最近在工作中接触到了这个开源框架,在项目中用到了RN(React-Natove简写)的ListView,然后自己写了个简单的demo。 + +RN中ListView的属性就不一一讲解了,在ReactNative中文中已经讲得很详细了。 +不管是RN中的ListView还是iOS中的TableView都得有数据源的即DataSource,因为RN跨平台框架底层是调用原生的控件。 +
+![](https://upload-images.jianshu.io/upload_images/2067180-2a1488c0631620ef.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +![](http://upload-images.jianshu.io/upload_images/2067180-690e114a045bfacd.gif?imageMogr2/auto-orient/strip) +那么在RN中是这样设置数据源的 + +创建一个ListView.DataSource类型的对象this.ds + +```js +this.ds = new ListView.DataSource({rowHasChanged:(r1,r2)=>r1!==r2}) +``` + +创建一个数组this.datasource并赋值,这个数组中装着的是5个对象。 + +```js +this.dataSource = [ {name:'柴小圣',id:1,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450044201-0.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','网剧'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.ngQ_96uWK-a50WUtnjGagAEsEP&w=221&h=200&c=7&qlt=90&o=4&pid=1.7'}, + {name:'柴小圣',id:2,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450045C3-1.jpg',picDescribe:'O(∩_∩)O哈哈~美艳写真图',messageNumber:43,label:['欢乐者联盟','网剧','哈哈'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.wsbd4ipN95lWxm-6g5aINQEsEs&w=200&h=200&c=7&qlt=90&o=4&pid=1.7'}, + {name:'柴小圣',id:3,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450042929-2.jpg',picDescribe:'(~ ̄▽ ̄)~漂亮妹纸',messageNumber:55,label:['搞笑'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?q=杰尼龟&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'}, + {name:'柴小圣',id:4,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450041D6-3.jpg',picDescribe:'看看✧(≖ ◡ ≖✿)嘿嘿',messageNumber:33,label:['奇葩使者','雷剧','Ls'],firstLabelImage:'https://tse3-mm.cn.bing.net/th?q=可达鸭&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'}, + {name:'柴小圣',id:5,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/045004O27-4.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','牛'],firstLabelImage:'https://tse2-mm.cn.bing.net/th?q=加菲猫&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'}, + ] +``` + +使用this.ds.cloneWithRows方法为ListViewDataSource复制填充数据this.dataSource + +```js +this.state = { + dataSource:this.ds.cloneWithRows(this.dataSource) + } +``` +使用ListView组件 + +```js +//设置数据源和每行的实际渲染 + +``` + +ListView组件的renderRow属性 + +> renderRow function + +> (rowData, sectionID, rowID, highlightRow) => renderable + +> 从数据源(Data source)中接受一条数据,以及它和它所在section的ID。返回一个可渲染的组件来为这行数据进行渲染。默认情况下参数中的数据就是放进数据源中的数据本身,不过也可以提供一些转换器。 + +> 如果某一行正在被高亮(通过调用highlightRow函数),ListView会得到相应的通知。当一行被高亮时,其两侧的分割线会被隐藏。行的高亮状态可以通过调用highlightRow(null)来重置。 + +这里的renderRow使用起来有点类似iOS开发中的自定义Cell + +具体使用 + +```js + _renderRow(rowData: string, sectionID: number, rowID: number){ + return( + + + + {alert('text='+obj.labelText+'selectedIndex='+obj.selectedIndex)}} + id = {rowData.id} + titleArray = {rowData.label}/> + + + + ) + } +``` +ListView组件使用完整代码 + +```js +import React, { Component } from 'react'; +import { + AppRegistry, + StyleSheet, + Dimensions, + TouchableOpacity, + ListView, + Image, + Text, + View +} from 'react-native'; +/** + *引入自定义组件 + */ +import ImageTextMixedConfigurationCell from './ImageTextMixedConfigurationCell.js'; +import TEMcollectionButton from './CollectionButton.js'; +import BottomRightView from './BottomRightView.js'; +import TEMlabelButton from './LabelButton.js'; +/** + *关闭烦人的警告框(关闭有好有坏自行斟酌) + */ +console.disableYellowBox = true; +/** + *引入系统监听机制 + */ +import RCTDeviceEventEmitter from 'RCTDeviceEventEmitter'; + +export const WIDTH = Dimensions.get('window').width; +export const HEIGHT = Dimensions.get('window').height; + +export default class ListViewDemo extends Component { + constructor(props){ + super(props) + this.ds = new ListView.DataSource({rowHasChanged:(r1,r2)=>r1!==r2}) + this.dataSource = [ {name:'柴小圣',id:1,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450044201-0.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','网剧'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.ngQ_96uWK-a50WUtnjGagAEsEP&w=221&h=200&c=7&qlt=90&o=4&pid=1.7'}, + {name:'柴小圣',id:2,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450045C3-1.jpg',picDescribe:'O(∩_∩)O哈哈~美艳写真图',messageNumber:43,label:['欢乐者联盟','网剧','哈哈'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?id=OIP.wsbd4ipN95lWxm-6g5aINQEsEs&w=200&h=200&c=7&qlt=90&o=4&pid=1.7'}, + {name:'柴小圣',id:3,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450042929-2.jpg',picDescribe:'(~ ̄▽ ̄)~漂亮妹纸',messageNumber:55,label:['搞笑'],firstLabelImage:'https://tse4-mm.cn.bing.net/th?q=杰尼龟&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'}, + {name:'柴小圣',id:4,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/0450041D6-3.jpg',picDescribe:'看看✧(≖ ◡ ≖✿)嘿嘿',messageNumber:33,label:['奇葩使者','雷剧','Ls'],firstLabelImage:'https://tse3-mm.cn.bing.net/th?q=可达鸭&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'}, + {name:'柴小圣',id:5,picCategory:'写真图',picUri:'http://res.mamiw.com/uploads/allimg/160408/045004O27-4.jpg',picDescribe:'极品美女柴小圣美艳写真图',messageNumber:99,label:['搞笑六点半','牛'],firstLabelImage:'https://tse2-mm.cn.bing.net/th?q=加菲猫&w=120&h=120&c=1&rs=1&qlt=90&pid=InlineBlock&mkt=zh-CN&adlt=strict&t=1&mw=247'}, + ] + this.state = { + dataSource:this.ds.cloneWithRows(this.dataSource) + } + } + componentDidMount(){ + this.listenerA=RCTDeviceEventEmitter.addListener('deletCellEvent',(rowID) => { + this.deletCell(rowID); + }); + } + componentWillUnmount(){ + this.listenerA.remove(); + } + deletCell(rowID){ + this.dataSource.splice(rowID,1); + this.setState({ + dataSource : this.ds.cloneWithRows(this.dataSource) + }) + } + _renderRow(rowData: string, sectionID: number, rowID: number){ + return( + + + + {alert('text='+obj.labelText+'selectedIndex='+obj.selectedIndex)}} + id = {rowData.id} + titleArray = {rowData.label}/> + + + + ) + } + render() { + return ( + + + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#F5FCFF', + }, + topBar: { + width: WIDTH, + height: 20, + }, + bottomStyle: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'space-between', + width: WIDTH, + backgroundColor: '#FFF', + height: 40 + }, +}); + +AppRegistry.registerComponent('ListViewDemo', () => ListViewDemo); + +``` + +完整demo +https://github.com/jungleiOS/RN_ListView.git +如果大家觉得喜欢请在GitHub上赏作者一个Star吧 + + diff --git "a/Blog/source/_posts/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266.md" "b/Blog/source/_posts/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266.md" new file mode 100644 index 0000000..7b70392 --- /dev/null +++ "b/Blog/source/_posts/TextField-\344\270\200\350\241\214\344\273\243\347\240\201\346\220\236\345\256\232\350\276\223\345\205\245\351\231\220\345\210\266.md" @@ -0,0 +1,86 @@ +--- +title: 一行代码搞定TextField输入限制 +date: 2017.09.18 10:47 +--- + +网上有很多介绍输入限制的文章 +原理请参看[这篇文章](http://www.jianshu.com/p/2d1c06f2dfa4),我只是做了一个简单的封装而已 + +这里可以贴出全部代码 + +``` +#import + +@interface UITextField (TMRInputLimit) +- (void)inputLimitWithMaxLength:(NSInteger)maxLength; +@end +``` + + +``` +#import "UITextField+TMRInputLimit.h" +#import +@interface UITextField () +@property (assign, nonatomic) NSNumber *maxLength; +@end +@implementation UITextField (TMRInputLimit) + +- (void)setMaxLength:(NSNumber *)maxLength +{ + objc_setAssociatedObject(self, @selector(maxLength), maxLength, OBJC_ASSOCIATION_ASSIGN); +} + +- (NSNumber *)maxLength +{ + return objc_getAssociatedObject(self, @selector(maxLength)); + +} + +- (void)inputLimitWithMaxLength:(NSInteger)maxLength +{ + self.maxLength = [NSNumber numberWithInteger:maxLength]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldEditChanged:) name:@"UITextFieldTextDidChangeNotification" object:self]; +} + +- (void)textFieldEditChanged:(NSNotification *)obj +{ + NSInteger maxLength = [self.maxLength integerValue]; + UITextField *field = (UITextField *)obj.object; + NSString *toBeString = field.text; + UITextRange *selectedRange = [field markedTextRange]; + UITextPosition *position = [field positionFromPosition:selectedRange.start offset:0]; + if (!position || !selectedRange) + { + if (toBeString.length > maxLength) + { + NSRange rangeIndex = [toBeString rangeOfComposedCharacterSequenceAtIndex:maxLength]; + if (rangeIndex.length == 1) + { + field.text = [toBeString substringToIndex:maxLength]; + } + else + { + NSRange rangeRange = [toBeString rangeOfComposedCharacterSequencesForRange:NSMakeRange(0, maxLength)]; + field.text = [toBeString substringWithRange:rangeRange]; + } + } + } + +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:@"UITextFieldTextDidChangeNotification" object:self]; +} + +@end + +``` + +使用时import这个分类 + +``` +[_textField inputLimitWithMaxLength:6]; +``` + + diff --git a/Blog/themes/landscape/.gitignore b/Blog/themes/landscape/.gitignore new file mode 100644 index 0000000..6e3a08a --- /dev/null +++ b/Blog/themes/landscape/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +tmp \ No newline at end of file diff --git a/Blog/themes/landscape/Gruntfile.js b/Blog/themes/landscape/Gruntfile.js new file mode 100644 index 0000000..59fd5df --- /dev/null +++ b/Blog/themes/landscape/Gruntfile.js @@ -0,0 +1,46 @@ +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/Blog/themes/landscape/LICENSE b/Blog/themes/landscape/LICENSE new file mode 100644 index 0000000..9ce4d32 --- /dev/null +++ b/Blog/themes/landscape/LICENSE @@ -0,0 +1,7 @@ +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/Blog/themes/landscape/README.md b/Blog/themes/landscape/README.md new file mode 100644 index 0000000..90ecccd --- /dev/null +++ b/Blog/themes/landscape/README.md @@ -0,0 +1,112 @@ +# 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/Blog/themes/landscape/_config.yml b/Blog/themes/landscape/_config.yml new file mode 100644 index 0000000..ca22374 --- /dev/null +++ b/Blog/themes/landscape/_config.yml @@ -0,0 +1,37 @@ +# 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/Blog/themes/landscape/languages/de.yml b/Blog/themes/landscape/languages/de.yml new file mode 100644 index 0000000..630055f --- /dev/null +++ b/Blog/themes/landscape/languages/de.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/default.yml b/Blog/themes/landscape/languages/default.yml new file mode 100644 index 0000000..3ef7e92 --- /dev/null +++ b/Blog/themes/landscape/languages/default.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/es.yml b/Blog/themes/landscape/languages/es.yml new file mode 100644 index 0000000..d862e87 --- /dev/null +++ b/Blog/themes/landscape/languages/es.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/fr.yml b/Blog/themes/landscape/languages/fr.yml new file mode 100644 index 0000000..c84f51b --- /dev/null +++ b/Blog/themes/landscape/languages/fr.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/ja.yml b/Blog/themes/landscape/languages/ja.yml new file mode 100644 index 0000000..af0f7fe --- /dev/null +++ b/Blog/themes/landscape/languages/ja.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/ko.yml b/Blog/themes/landscape/languages/ko.yml new file mode 100644 index 0000000..1d27b43 --- /dev/null +++ b/Blog/themes/landscape/languages/ko.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/nl.yml b/Blog/themes/landscape/languages/nl.yml new file mode 100644 index 0000000..568d33e --- /dev/null +++ b/Blog/themes/landscape/languages/nl.yml @@ -0,0 +1,20 @@ + +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/Blog/themes/landscape/languages/no.yml b/Blog/themes/landscape/languages/no.yml new file mode 100644 index 0000000..b997691 --- /dev/null +++ b/Blog/themes/landscape/languages/no.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/pt.yml b/Blog/themes/landscape/languages/pt.yml new file mode 100644 index 0000000..3d74af3 --- /dev/null +++ b/Blog/themes/landscape/languages/pt.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/ru.yml b/Blog/themes/landscape/languages/ru.yml new file mode 100644 index 0000000..625a83c --- /dev/null +++ b/Blog/themes/landscape/languages/ru.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/zh-CN.yml b/Blog/themes/landscape/languages/zh-CN.yml new file mode 100644 index 0000000..51e1321 --- /dev/null +++ b/Blog/themes/landscape/languages/zh-CN.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/languages/zh-TW.yml b/Blog/themes/landscape/languages/zh-TW.yml new file mode 100644 index 0000000..76d2916 --- /dev/null +++ b/Blog/themes/landscape/languages/zh-TW.yml @@ -0,0 +1,19 @@ +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/Blog/themes/landscape/layout/_partial/after-footer.ejs b/Blog/themes/landscape/layout/_partial/after-footer.ejs new file mode 100644 index 0000000..ff2d509 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/after-footer.ejs @@ -0,0 +1,25 @@ +<% 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/Blog/themes/landscape/layout/_partial/archive-post.ejs b/Blog/themes/landscape/layout/_partial/archive-post.ejs new file mode 100644 index 0000000..36f2cc3 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/archive-post.ejs @@ -0,0 +1,8 @@ +
+
+
+ <%- 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/Blog/themes/landscape/layout/_partial/archive.ejs b/Blog/themes/landscape/layout/_partial/archive.ejs new file mode 100644 index 0000000..9da934a --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/archive.ejs @@ -0,0 +1,34 @@ +<% 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/Blog/themes/landscape/layout/_partial/article.ejs b/Blog/themes/landscape/layout/_partial/article.ejs new file mode 100644 index 0000000..0f951a9 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/article.ejs @@ -0,0 +1,44 @@ +
+ +
+ <%- 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/Blog/themes/landscape/layout/_partial/footer.ejs b/Blog/themes/landscape/layout/_partial/footer.ejs new file mode 100644 index 0000000..3aca618 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/footer.ejs @@ -0,0 +1,11 @@ +
+ <% if (theme.sidebar === 'bottom'){ %> + <%- partial('_partial/sidebar') %> + <% } %> +
+ +
+
\ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/gauges-analytics.ejs b/Blog/themes/landscape/layout/_partial/gauges-analytics.ejs new file mode 100644 index 0000000..d64be38 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/gauges-analytics.ejs @@ -0,0 +1,18 @@ +<% if (theme.gauges_analytics){ %> + + + +<% } %> diff --git a/Blog/themes/landscape/layout/_partial/google-analytics.ejs b/Blog/themes/landscape/layout/_partial/google-analytics.ejs new file mode 100644 index 0000000..84e75f0 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/google-analytics.ejs @@ -0,0 +1,14 @@ +<% if (theme.google_analytics){ %> + + + +<% } %> diff --git a/Blog/themes/landscape/layout/_partial/head.ejs b/Blog/themes/landscape/layout/_partial/head.ejs new file mode 100644 index 0000000..43d5f93 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/head.ejs @@ -0,0 +1,36 @@ + + + + + <%- 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/Blog/themes/landscape/layout/_partial/header.ejs b/Blog/themes/landscape/layout/_partial/header.ejs new file mode 100644 index 0000000..e8a305e --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/header.ejs @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/mobile-nav.ejs b/Blog/themes/landscape/layout/_partial/mobile-nav.ejs new file mode 100644 index 0000000..7c1d2af --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/mobile-nav.ejs @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/post/category.ejs b/Blog/themes/landscape/layout/_partial/post/category.ejs new file mode 100644 index 0000000..db2ed48 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/post/category.ejs @@ -0,0 +1,10 @@ +<% if (post.categories && post.categories.length){ %> + +<% } %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/post/date.ejs b/Blog/themes/landscape/layout/_partial/post/date.ejs new file mode 100644 index 0000000..3f49613 --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/post/date.ejs @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/post/gallery.ejs b/Blog/themes/landscape/layout/_partial/post/gallery.ejs new file mode 100644 index 0000000..886c8ec --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/post/gallery.ejs @@ -0,0 +1,11 @@ +<% if (post.photos && post.photos.length){ %> +
+
+ <% post.photos.forEach(function(photo, i){ %> + + + + <% }) %> +
+
+<% } %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/post/nav.ejs b/Blog/themes/landscape/layout/_partial/post/nav.ejs new file mode 100644 index 0000000..720798a --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/post/nav.ejs @@ -0,0 +1,22 @@ +<% if (post.prev || post.next){ %> + +<% } %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/_partial/post/tag.ejs b/Blog/themes/landscape/layout/_partial/post/tag.ejs new file mode 100644 index 0000000..e0f327f --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/post/tag.ejs @@ -0,0 +1,6 @@ +<% 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/Blog/themes/landscape/layout/_partial/post/title.ejs b/Blog/themes/landscape/layout/_partial/post/title.ejs new file mode 100644 index 0000000..69d646f --- /dev/null +++ b/Blog/themes/landscape/layout/_partial/post/title.ejs @@ -0,0 +1,15 @@ +<% if (post.link){ %> +

+ +

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

+ <%= post.title %> +

+ <% } else { %> +

+ <%= post.title %> +

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

<%= __('archive_a') %>

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

<%= __('categories') %>

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

<%= __('recent_posts') %>

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

<%= __('tags') %>

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

<%= __('tagcloud') %>

+
+ <%- tagcloud() %> +
+
+<% } %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/archive.ejs b/Blog/themes/landscape/layout/archive.ejs new file mode 100644 index 0000000..52f9b21 --- /dev/null +++ b/Blog/themes/landscape/layout/archive.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/category.ejs b/Blog/themes/landscape/layout/category.ejs new file mode 100644 index 0000000..3ffe252 --- /dev/null +++ b/Blog/themes/landscape/layout/category.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.category, index: true}) %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/index.ejs b/Blog/themes/landscape/layout/index.ejs new file mode 100644 index 0000000..60a2c68 --- /dev/null +++ b/Blog/themes/landscape/layout/index.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: 2, index: true}) %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/layout.ejs b/Blog/themes/landscape/layout/layout.ejs new file mode 100644 index 0000000..cf88daf --- /dev/null +++ b/Blog/themes/landscape/layout/layout.ejs @@ -0,0 +1,18 @@ +<%- 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/Blog/themes/landscape/layout/page.ejs b/Blog/themes/landscape/layout/page.ejs new file mode 100644 index 0000000..bea6318 --- /dev/null +++ b/Blog/themes/landscape/layout/page.ejs @@ -0,0 +1 @@ +<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/post.ejs b/Blog/themes/landscape/layout/post.ejs new file mode 100644 index 0000000..bea6318 --- /dev/null +++ b/Blog/themes/landscape/layout/post.ejs @@ -0,0 +1 @@ +<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/Blog/themes/landscape/layout/tag.ejs b/Blog/themes/landscape/layout/tag.ejs new file mode 100644 index 0000000..048cdb0 --- /dev/null +++ b/Blog/themes/landscape/layout/tag.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.tag, index: true}) %> \ No newline at end of file diff --git a/Blog/themes/landscape/package.json b/Blog/themes/landscape/package.json new file mode 100644 index 0000000..ac0df3d --- /dev/null +++ b/Blog/themes/landscape/package.json @@ -0,0 +1,12 @@ +{ + "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/Blog/themes/landscape/scripts/fancybox.js b/Blog/themes/landscape/scripts/fancybox.js new file mode 100644 index 0000000..83f1fdc --- /dev/null +++ b/Blog/themes/landscape/scripts/fancybox.js @@ -0,0 +1,24 @@ +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/Blog/themes/landscape/source/css/_extend.styl b/Blog/themes/landscape/source/css/_extend.styl new file mode 100644 index 0000000..96a1817 --- /dev/null +++ b/Blog/themes/landscape/source/css/_extend.styl @@ -0,0 +1,63 @@ +$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/Blog/themes/landscape/source/css/_partial/archive.styl b/Blog/themes/landscape/source/css/_partial/archive.styl new file mode 100644 index 0000000..90ef053 --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/archive.styl @@ -0,0 +1,80 @@ +.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/Blog/themes/landscape/source/css/_partial/article.styl b/Blog/themes/landscape/source/css/_partial/article.styl new file mode 100644 index 0000000..46094f9 --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/article.styl @@ -0,0 +1,357 @@ +.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/Blog/themes/landscape/source/css/_partial/comment.styl b/Blog/themes/landscape/source/css/_partial/comment.styl new file mode 100644 index 0000000..296b7dd --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/comment.styl @@ -0,0 +1,9 @@ +#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/Blog/themes/landscape/source/css/_partial/footer.styl b/Blog/themes/landscape/source/css/_partial/footer.styl new file mode 100644 index 0000000..fe2fd24 --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/footer.styl @@ -0,0 +1,14 @@ +#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/Blog/themes/landscape/source/css/_partial/header.styl b/Blog/themes/landscape/source/css/_partial/header.styl new file mode 100644 index 0000000..d18ebc8 --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/header.styl @@ -0,0 +1,165 @@ +#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/Blog/themes/landscape/source/css/_partial/highlight.styl b/Blog/themes/landscape/source/css/_partial/highlight.styl new file mode 100644 index 0000000..c932ec3 --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/highlight.styl @@ -0,0 +1,158 @@ +// 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/Blog/themes/landscape/source/css/_partial/mobile.styl b/Blog/themes/landscape/source/css/_partial/mobile.styl new file mode 100644 index 0000000..eb68b3a --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/mobile.styl @@ -0,0 +1,19 @@ +@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/Blog/themes/landscape/source/css/_partial/sidebar-aside.styl b/Blog/themes/landscape/source/css/_partial/sidebar-aside.styl new file mode 100644 index 0000000..838b167 --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/sidebar-aside.styl @@ -0,0 +1,27 @@ +#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/Blog/themes/landscape/source/css/_partial/sidebar-bottom.styl b/Blog/themes/landscape/source/css/_partial/sidebar-bottom.styl new file mode 100644 index 0000000..e2403fd --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/sidebar-bottom.styl @@ -0,0 +1,27 @@ +.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/Blog/themes/landscape/source/css/_partial/sidebar.styl b/Blog/themes/landscape/source/css/_partial/sidebar.styl new file mode 100644 index 0000000..e43d66a --- /dev/null +++ b/Blog/themes/landscape/source/css/_partial/sidebar.styl @@ -0,0 +1,35 @@ +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/Blog/themes/landscape/source/css/_util/grid.styl b/Blog/themes/landscape/source/css/_util/grid.styl new file mode 100644 index 0000000..2a14dd2 --- /dev/null +++ b/Blog/themes/landscape/source/css/_util/grid.styl @@ -0,0 +1,38 @@ +///////////////// +// 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/Blog/themes/landscape/source/css/_util/mixin.styl b/Blog/themes/landscape/source/css/_util/mixin.styl new file mode 100644 index 0000000..b56f037 --- /dev/null +++ b/Blog/themes/landscape/source/css/_util/mixin.styl @@ -0,0 +1,31 @@ +// 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/Blog/themes/landscape/source/css/_variables.styl b/Blog/themes/landscape/source/css/_variables.styl new file mode 100644 index 0000000..4562911 --- /dev/null +++ b/Blog/themes/landscape/source/css/_variables.styl @@ -0,0 +1,63 @@ +// 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/Blog/themes/landscape/source/css/fonts/FontAwesome.otf b/Blog/themes/landscape/source/css/fonts/FontAwesome.otf new file mode 100644 index 0000000..8b0f54e Binary files /dev/null and b/Blog/themes/landscape/source/css/fonts/FontAwesome.otf differ diff --git a/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.eot b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..7c79c6a Binary files /dev/null and b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.eot differ diff --git a/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.svg b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..45fdf33 --- /dev/null +++ b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.ttf b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..e89738d Binary files /dev/null and b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.ttf differ diff --git a/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.woff b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8c1748a Binary files /dev/null and b/Blog/themes/landscape/source/css/fonts/fontawesome-webfont.woff differ diff --git a/Blog/themes/landscape/source/css/images/banner.jpg b/Blog/themes/landscape/source/css/images/banner.jpg new file mode 100644 index 0000000..b963e06 Binary files /dev/null and b/Blog/themes/landscape/source/css/images/banner.jpg differ diff --git a/Blog/themes/landscape/source/css/style.styl b/Blog/themes/landscape/source/css/style.styl new file mode 100644 index 0000000..c51f8e4 --- /dev/null +++ b/Blog/themes/landscape/source/css/style.styl @@ -0,0 +1,89 @@ +@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/lib/fancybox/source/blank.gif b/Blog/themes/landscape/source/fancybox/blank.gif similarity index 100% rename from lib/fancybox/source/blank.gif rename to Blog/themes/landscape/source/fancybox/blank.gif diff --git a/lib/fancybox/source/fancybox_loading.gif b/Blog/themes/landscape/source/fancybox/fancybox_loading.gif similarity index 100% rename from lib/fancybox/source/fancybox_loading.gif rename to Blog/themes/landscape/source/fancybox/fancybox_loading.gif diff --git a/lib/fancybox/source/fancybox_loading@2x.gif b/Blog/themes/landscape/source/fancybox/fancybox_loading@2x.gif similarity index 100% rename from lib/fancybox/source/fancybox_loading@2x.gif rename to Blog/themes/landscape/source/fancybox/fancybox_loading@2x.gif diff --git a/lib/fancybox/source/fancybox_overlay.png b/Blog/themes/landscape/source/fancybox/fancybox_overlay.png similarity index 100% rename from lib/fancybox/source/fancybox_overlay.png rename to Blog/themes/landscape/source/fancybox/fancybox_overlay.png diff --git a/lib/fancybox/source/fancybox_sprite.png b/Blog/themes/landscape/source/fancybox/fancybox_sprite.png similarity index 100% rename from lib/fancybox/source/fancybox_sprite.png rename to Blog/themes/landscape/source/fancybox/fancybox_sprite.png diff --git a/lib/fancybox/source/fancybox_sprite@2x.png b/Blog/themes/landscape/source/fancybox/fancybox_sprite@2x.png similarity index 100% rename from lib/fancybox/source/fancybox_sprite@2x.png rename to Blog/themes/landscape/source/fancybox/fancybox_sprite@2x.png diff --git a/lib/fancybox/source/helpers/fancybox_buttons.png b/Blog/themes/landscape/source/fancybox/helpers/fancybox_buttons.png similarity index 100% rename from lib/fancybox/source/helpers/fancybox_buttons.png rename to Blog/themes/landscape/source/fancybox/helpers/fancybox_buttons.png diff --git a/lib/fancybox/source/helpers/jquery.fancybox-buttons.css b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css similarity index 100% rename from lib/fancybox/source/helpers/jquery.fancybox-buttons.css rename to Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css diff --git a/lib/fancybox/source/helpers/jquery.fancybox-buttons.js b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js similarity index 99% rename from lib/fancybox/source/helpers/jquery.fancybox-buttons.js rename to Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js index fd8b955..352bb5f 100644 --- a/lib/fancybox/source/helpers/jquery.fancybox-buttons.js +++ b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js @@ -13,7 +13,7 @@ * }); * */ -(function ($) { +;(function ($) { //Shortcut for fancyBox object var F = $.fancybox; diff --git a/lib/fancybox/source/helpers/jquery.fancybox-media.js b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js similarity index 99% rename from lib/fancybox/source/helpers/jquery.fancybox-media.js rename to Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js index 3584c8a..62737a5 100644 --- a/lib/fancybox/source/helpers/jquery.fancybox-media.js +++ b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js @@ -62,7 +62,7 @@ * 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 ($) { +;(function ($) { "use strict"; //Shortcut for fancyBox object diff --git a/lib/fancybox/source/helpers/jquery.fancybox-thumbs.css b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css similarity index 100% rename from lib/fancybox/source/helpers/jquery.fancybox-thumbs.css rename to Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css diff --git a/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js similarity index 96% rename from lib/fancybox/source/helpers/jquery.fancybox-thumbs.js rename to Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js index 5db3d4a..58c9719 100644 --- a/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js +++ b/Blog/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js @@ -14,7 +14,7 @@ * }); * */ -(function ($) { +;(function ($) { //Shortcut for fancyBox object var F = $.fancybox; @@ -62,7 +62,8 @@ //Load each thumbnail $.each(obj.group, function (i) { - var href = thumbSource( obj.group[ i ] ); + var el = obj.group[ i ], + href = thumbSource( el ); if (!href) { return; @@ -105,7 +106,9 @@ $(this).hide().appendTo(parent).fadeIn(300); - }).attr('src', href); + }) + .attr('src', href) + .attr('title', el.title); }); //Set initial width diff --git a/lib/fancybox/source/jquery.fancybox.css b/Blog/themes/landscape/source/fancybox/jquery.fancybox.css similarity index 92% rename from lib/fancybox/source/jquery.fancybox.css rename to Blog/themes/landscape/source/fancybox/jquery.fancybox.css index 367890a..c75d051 100644 --- a/lib/fancybox/source/jquery.fancybox.css +++ b/Blog/themes/landscape/source/fancybox/jquery.fancybox.css @@ -76,7 +76,7 @@ } #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { - background-image: url('fancybox_sprite.png'); + background-image: url(fancybox_sprite.png); } #fancybox-loading { @@ -94,7 +94,7 @@ #fancybox-loading div { width: 44px; height: 44px; - background: url('fancybox_loading.gif') center center no-repeat; + background: url(fancybox_loading.gif) center center no-repeat; } .fancybox-close { @@ -114,7 +114,7 @@ height: 100%; cursor: pointer; text-decoration: none; - background: transparent url('blank.gif'); /* helps IE */ + background: transparent url(blank.gif); /* helps IE */ -webkit-tap-highlight-color: rgba(0,0,0,0); z-index: 8040; } @@ -156,7 +156,6 @@ position: absolute; top: -99999px; left: -99999px; - visibility: hidden; max-width: 99999px; max-height: 99999px; overflow: visible !important; @@ -165,7 +164,7 @@ /* Overlay helper */ .fancybox-lock { - overflow: hidden !important; + overflow: visible !important; width: auto; } @@ -184,7 +183,7 @@ overflow: hidden; display: none; z-index: 8010; - background: url('fancybox_overlay.png'); + background: url(fancybox_overlay.png); } .fancybox-overlay-fixed { @@ -263,12 +262,12 @@ 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-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-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/lib/fancybox/source/jquery.fancybox.js b/Blog/themes/landscape/source/fancybox/jquery.fancybox.js similarity index 97% rename from lib/fancybox/source/jquery.fancybox.js rename to Blog/themes/landscape/source/fancybox/jquery.fancybox.js index e8e1987..7a0f8ac 100644 --- a/lib/fancybox/source/jquery.fancybox.js +++ b/Blog/themes/landscape/source/fancybox/jquery.fancybox.js @@ -1,7 +1,7 @@ /*! * fancyBox - jQuery Plugin * version: 2.1.5 (Fri, 14 Jun 2013) - * @requires jQuery v1.6 or later + * requires jQuery v1.6 or later * * Examples at http://fancyapps.com/fancybox/ * License: www.fancyapps.com/fancybox/#license @@ -10,7 +10,7 @@ * */ -(function (window, document, $, undefined) { +;(function (window, document, $, undefined) { "use strict"; var H = $("html"), @@ -261,7 +261,7 @@ if (isQuery(element)) { obj = { href : element.data('fancybox-href') || element.attr('href'), - title : element.data('fancybox-title') || element.attr('title'), + title : $('
').text( element.data('fancybox-title') || element.attr('title') ).html(), isDom : true, element : element }; @@ -363,12 +363,16 @@ cancel: function () { var coming = F.coming; - if (!coming || false === F.trigger('onCancel')) { + if (coming && false === F.trigger('onCancel')) { return; } F.hideLoading(); + if (!coming) { + return; + } + if (F.ajaxLoad) { F.ajaxLoad.abort(); } @@ -546,7 +550,7 @@ }, update: function (e) { - var type = (e && e.type), + var type = (e && e.originalEvent && e.originalEvent.type), anyway = !type || type === 'orientationchange'; if (anyway) { @@ -630,6 +634,8 @@ left : (viewport.w * 0.5) + viewport.x }); } + + F.trigger('onLoading'); }, getViewport: function () { @@ -639,7 +645,7 @@ y: W.scrollTop() }; - if (locked) { + if (locked && locked.length) { rez.w = locked[0].clientWidth; rez.h = locked[0].clientHeight; @@ -741,24 +747,22 @@ trigger: function (event, o) { var ret, obj = o || F.coming || F.current; - if (!obj) { - return; - } - - if ($.isFunction( obj[event] )) { - ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); - } + if (obj) { + if ($.isFunction( obj[event] )) { + ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); + } - if (ret === false) { - return false; - } + 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); - } - }); + 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); @@ -1117,7 +1121,7 @@ break; case 'image': - content = current.tpl.image.replace('{href}', href); + content = current.tpl.image.replace(/\{href\}/g, href); break; case 'swf': @@ -1426,7 +1430,7 @@ F.isOpen = F.isOpened = true; - F.wrap.css('overflow', 'visible').addClass('fancybox-opened'); + F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); F.update(); @@ -1465,12 +1469,13 @@ // 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(); + F.play(true); } }, @@ -1703,13 +1708,17 @@ // Public methods create : function(opts) { + var parent; + opts = $.extend({}, this.defaults, opts); if (this.overlay) { this.close(); } - this.overlay = $('
').appendTo( F.coming ? F.coming.parent : opts.parent ); + 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) { @@ -1755,19 +1764,14 @@ }, close : function() { - var scrollV, scrollH; - W.unbind('resize.overlay'); if (this.el.hasClass('fancybox-lock')) { $('.fancybox-margin').removeClass('fancybox-margin'); - scrollV = W.scrollTop(); - scrollH = W.scrollLeft(); - this.el.removeClass('fancybox-lock'); - W.scrollTop( scrollV ).scrollLeft( scrollH ); + W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); } $('.fancybox-overlay').remove().hide(); @@ -1812,10 +1816,6 @@ } if (opts.locked && this.fixed && obj.fixed) { - if (!overlay) { - this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; - } - obj.locked = this.overlay.append( obj.wrap ); obj.fixed = false; } @@ -1826,23 +1826,21 @@ }, beforeShow : function(opts, obj) { - var scrollV, scrollH; - - if (obj.locked) { - if (this.margin !== false) { + 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'); } - scrollV = W.scrollTop(); - scrollH = W.scrollLeft(); + this.el.addClass('fancybox-margin'); + + this.scrollV = W.scrollTop(); + this.scrollH = W.scrollLeft(); this.el.addClass('fancybox-lock'); - W.scrollTop( scrollV ).scrollLeft( scrollH ); + W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); } this.open(opts); @@ -1857,7 +1855,6 @@ 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.isActive) { if (this.overlay && !F.coming) { this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); } diff --git a/Blog/themes/landscape/source/fancybox/jquery.fancybox.pack.js b/Blog/themes/landscape/source/fancybox/jquery.fancybox.pack.js new file mode 100644 index 0000000..2db1280 --- /dev/null +++ b/Blog/themes/landscape/source/fancybox/jquery.fancybox.pack.js @@ -0,0 +1,46 @@ +/*! 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/Blog/themes/landscape/source/js/script.js b/Blog/themes/landscape/source/js/script.js new file mode 100644 index 0000000..1e58767 --- /dev/null +++ b/Blog/themes/landscape/source/js/script.js @@ -0,0 +1,137 @@ +(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/archives/2017/04/index.html b/archives/2017/04/index.html deleted file mode 100644 index f3242a6..0000000 --- a/archives/2017/04/index.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2017/09/index.html b/archives/2017/09/index.html deleted file mode 100644 index 01e168a..0000000 --- a/archives/2017/09/index.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2017/index.html b/archives/2017/index.html deleted file mode 100644 index f9a7200..0000000 --- a/archives/2017/index.html +++ /dev/null @@ -1,661 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2018/05/index.html b/archives/2018/05/index.html deleted file mode 100644 index 8ee88df..0000000 --- a/archives/2018/05/index.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2018/06/index.html b/archives/2018/06/index.html deleted file mode 100644 index b502176..0000000 --- a/archives/2018/06/index.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2018/07/index.html b/archives/2018/07/index.html deleted file mode 100644 index dfa7cd6..0000000 --- a/archives/2018/07/index.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2018/08/index.html b/archives/2018/08/index.html deleted file mode 100644 index 9b42572..0000000 --- a/archives/2018/08/index.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2018/index.html b/archives/2018/index.html deleted file mode 100644 index ac3faf2..0000000 --- a/archives/2018/index.html +++ /dev/null @@ -1,735 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/index.html b/archives/index.html deleted file mode 100644 index 7761c9b..0000000 --- a/archives/index.html +++ /dev/null @@ -1,851 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 归档 | TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/main.css b/css/main.css deleted file mode 100644 index 3de61c2..0000000 --- a/css/main.css +++ /dev/null @@ -1,3002 +0,0 @@ -/* 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: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; - font-size: 14px; - line-height: 2; - color: #555; - background: #f5f7f9; -} -@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: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif; -} -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; - outline: 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; -} -kbd { - border: 1px solid #ccc; - border-radius: 0.2em; - box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); - background-color: #f9f9f9; - font-family: inherit; - background-image: -webkit-linear-gradient(top, #eee, #fff, #eee); - padding: 0.1em 0.3em; - white-space: nowrap; -} -.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: 700px; -} -@media (min-width: 1600px) { - .container .header-inner { - width: 900px; - } -} -.main { - padding-bottom: 150px; -} -.main-inner { - margin: 0 auto; - width: 700px; -} -@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: 700px; -} -@media (min-width: 1600px) { - .container .footer-inner { - width: 900px; - } -} -pre, -.highlight { - overflow: auto; - margin: 20px 0; - padding: 0; - font-size: 13px; - color: #4d4d4c; - background: #f7f7f7; - line-height: 1.6; -} -pre, -code { - font-family: consolas, Menlo, "PingFang SC", "Microsoft YaHei", monospace; -} -code { - padding: 2px 4px; - word-wrap: break-word; - color: #555; - background: #eee; - border-radius: 3px; - font-size: 13px; -} -pre { - padding: 10px; -} -pre code { - padding: 0; - color: #4d4d4c; - 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: #4d4d4c; - 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: #4d4d4c; -} -.highlight figcaption a:hover { - border-bottom-color: #4d4d4c; -} -.highlight .gutter pre { - padding-left: 10px; - padding-right: 10px; - color: #869194; - text-align: right; - background-color: #eff2f3; -} -.highlight .code pre { - width: 100%; - padding-left: 10px; - padding-right: 10px; - background-color: #f7f7f7; -} -.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: #fdd; -} -pre .addition { - background: #dfd; -} -pre .meta { - color: #8959a8; -} -pre .comment { - color: #8e908c; -} -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: #c82829; -} -pre .number, -pre .preprocessor, -pre .built_in, -pre .literal, -pre .params, -pre .constant, -pre .command { - color: #f5871f; -} -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: #718c00; -} -pre .title, -pre .css .hexcolor { - color: #3e999f; -} -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: #4271ae; -} -pre .keyword, -pre .javascript .function { - color: #8959a8; -} -.full-image.full-image.full-image.full-image { - border: none; - max-width: 100%; - width: auto; - margin: 20px auto 25px; -} -@media (min-width: 992px) { - .full-image.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: #555; - background: #fff; - border: 2px solid #555; - text-decoration: none; - border-radius: 2px; - transition-property: background-color; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; - transition-delay: 0s; - line-height: 2; -} -.btn:hover { - border-color: #222; - color: #fff; - background: #222; -} -.btn +.btn { - margin: 0 0 8px 8px; -} -.btn .fa-fw { - width: 1.285714285714286em; - text-align: left; -} -.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 11px; -} -@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; - padding: 0 10px; - } - .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: 20px; - font-weight: normal; - font-family: '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: -20px auto 15px; - text-align: center; - font-size: 14px; - 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); -} -.use-motion .post-block, -.use-motion .pagination, -.use-motion .comments { - opacity: 0; -} -.use-motion .post-header { - opacity: 0; -} -.use-motion .post-body { - opacity: 0; -} -.use-motion .collection-title { - opacity: 0; -} -.posts-expand { - padding-top: 40px; -} -@media (max-width: 767px) { - .posts-expand { - margin: 0 20px; - } - .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 .post-body .fancybox img { - margin: 0 auto 25px; -} -@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 { - text-align: center; - word-break: break-word; - font-weight: 400; -} -.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-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: 40px; -} -.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; -} -.site-overview-wrap { - overflow: hidden; -} -.site-overview { - overflow-y: auto; - overflow-x: hidden; -} -.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 { - margin: 0 auto; - padding: 2px; - max-width: 120px; - height: auto; - border: 1px solid #eee; - border-radius: 50%; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - transition: 1.4s all; -} -.site-author-image:hover { - -webkit-transform: rotate(360deg); - -moz-transform: rotate(360deg); - -ms-transform: rotate(360deg); - -transform: rotate(360deg); -} -.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; -} -.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: #a43646; -} -.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; -} -.links-of-blogroll-item a { - max-width: 280px; - box-sizing: border-box; - display: inline-block; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} -.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; - text-align: justify; - 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; -} -.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; -} -@media (min-width: 768px) and (max-width: 991px) { - .busuanzi-count { - width: auto; - } -} -@media (max-width: 767px) { - .busuanzi-count { - width: auto; - } -} -.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; -} -.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: 960px; -} -@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: initial; - 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: 960px; -} -@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: 700px; - background: #fff; - min-height: 700px; - box-shadow: initial; - 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: 240px; - background: #f5f7f9; - 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: 960px; - 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 { - margin-left: -100%; - right: auto; - bottom: auto; - -webkit-transform: none; -} -.sidebar-inner { - box-sizing: border-box; - width: 240px; - color: #555; - background: #fff; - box-shadow: initial; - border-radius: initial; - opacity: 0; -} -.sidebar-inner.affix { - position: fixed; - top: 12px; -} -.sidebar-inner.affix-bottom { - position: absolute; -} -.site-overview { - 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; -} -.site-state-item { - padding: 0 10px; -} -.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 { - display: flex; - flex-wrap: wrap; - justify-content: center; -} -.links-of-author-item { - margin: 5px 0 0; - width: 50%; -} -.links-of-author-item a { - max-width: 216px; - 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 { - text-align: center; - 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%; - display: inline-block; - width: unset; -} -.links-of-blogroll-inline .links-of-blogroll-item a { - max-width: 216px; - 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; - } -} diff --git a/images/algolia_logo.svg b/images/algolia_logo.svg deleted file mode 100644 index 4702423..0000000 --- a/images/algolia_logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/images/apple-touch-icon-next.png b/images/apple-touch-icon-next.png deleted file mode 100644 index 86a0d1d..0000000 Binary files a/images/apple-touch-icon-next.png and /dev/null differ diff --git a/images/avatar.gif b/images/avatar.gif deleted file mode 100644 index 9899025..0000000 Binary files a/images/avatar.gif and /dev/null differ diff --git a/images/cc-by-nc-nd.svg b/images/cc-by-nc-nd.svg deleted file mode 100644 index 79a4f2e..0000000 --- a/images/cc-by-nc-nd.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/images/cc-by-nc-sa.svg b/images/cc-by-nc-sa.svg deleted file mode 100644 index bf6bc26..0000000 --- a/images/cc-by-nc-sa.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/images/cc-by-nc.svg b/images/cc-by-nc.svg deleted file mode 100644 index 3697349..0000000 --- a/images/cc-by-nc.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/images/cc-by-nd.svg b/images/cc-by-nd.svg deleted file mode 100644 index 934c61e..0000000 --- a/images/cc-by-nd.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/images/cc-by-sa.svg b/images/cc-by-sa.svg deleted file mode 100644 index 463276a..0000000 --- a/images/cc-by-sa.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/images/cc-by.svg b/images/cc-by.svg deleted file mode 100644 index 4bccd14..0000000 --- a/images/cc-by.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/images/cc-zero.svg b/images/cc-zero.svg deleted file mode 100644 index 0f86639..0000000 --- a/images/cc-zero.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/favicon-16x16-next.png b/images/favicon-16x16-next.png deleted file mode 100644 index de8c5d3..0000000 Binary files a/images/favicon-16x16-next.png and /dev/null differ diff --git a/images/favicon-32x32-next.png b/images/favicon-32x32-next.png deleted file mode 100644 index e02f5f4..0000000 Binary files a/images/favicon-32x32-next.png and /dev/null differ diff --git a/images/loading.gif b/images/loading.gif deleted file mode 100644 index efb6768..0000000 Binary files a/images/loading.gif and /dev/null differ diff --git a/images/logo.svg b/images/logo.svg deleted file mode 100644 index cbb3937..0000000 --- a/images/logo.svg +++ /dev/null @@ -1,23 +0,0 @@ - -image/svg+xml diff --git a/images/placeholder.gif b/images/placeholder.gif deleted file mode 100644 index efb6768..0000000 Binary files a/images/placeholder.gif and /dev/null differ diff --git a/images/quote-l.svg b/images/quote-l.svg deleted file mode 100644 index 6dd94a4..0000000 --- a/images/quote-l.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - diff --git a/images/quote-r.svg b/images/quote-r.svg deleted file mode 100644 index 312b64d..0000000 --- a/images/quote-r.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/images/searchicon.png b/images/searchicon.png deleted file mode 100644 index 14a16ca..0000000 Binary files a/images/searchicon.png and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index eb51eda..0000000 --- a/index.html +++ /dev/null @@ -1,1561 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TMR De Blog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/js/src/affix.js b/js/src/affix.js deleted file mode 100644 index 11a3d39..0000000 --- a/js/src/affix.js +++ /dev/null @@ -1,162 +0,0 @@ -/* ======================================================================== - * Bootstrap: affix.js v3.3.5 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.5' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) - -}(jQuery); diff --git a/js/src/algolia-search.js b/js/src/algolia-search.js deleted file mode 100644 index 9787e2a..0000000 --- a/js/src/algolia-search.js +++ /dev/null @@ -1,115 +0,0 @@ -/* global instantsearch: true */ -/*jshint camelcase: false */ - -$(document).ready(function () { - var algoliaSettings = CONFIG.algolia; - var isAlgoliaSettingsValid = algoliaSettings.applicationID && - algoliaSettings.apiKey && - algoliaSettings.indexName; - - if (!isAlgoliaSettingsValid) { - window.console.error('Algolia Settings are invalid.'); - return; - } - - var search = instantsearch({ - appId: algoliaSettings.applicationID, - apiKey: algoliaSettings.apiKey, - indexName: algoliaSettings.indexName, - searchFunction: function (helper) { - var searchInput = $('#algolia-search-input').find('input'); - - if (searchInput.val()) { - helper.search(); - } - } - }); - - // Registering Widgets - [ - instantsearch.widgets.searchBox({ - container: '#algolia-search-input', - placeholder: algoliaSettings.labels.input_placeholder - }), - - instantsearch.widgets.hits({ - container: '#algolia-hits', - hitsPerPage: algoliaSettings.hits.per_page || 10, - templates: { - item: function (data) { - var link = data.permalink ? data.permalink : (CONFIG.root + data.path); - return ( - '' + - data._highlightResult.title.value + - '' - ); - }, - empty: function (data) { - return ( - '
' + - algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query) + - '
' - ); - } - }, - cssClasses: { - item: 'algolia-hit-item' - } - }), - - instantsearch.widgets.stats({ - container: '#algolia-stats', - templates: { - body: function (data) { - var stats = algoliaSettings.labels.hits_stats - .replace(/\$\{hits}/, data.nbHits) - .replace(/\$\{time}/, data.processingTimeMS); - return ( - stats + - '' + - ' Algolia' + - '' + - '
' - ); - } - } - }), - - instantsearch.widgets.pagination({ - container: '#algolia-pagination', - scrollTo: false, - showFirstLast: false, - labels: { - first: '', - last: '', - previous: '', - next: '' - }, - cssClasses: { - root: 'pagination', - item: 'pagination-item', - link: 'page-number', - active: 'current', - disabled: 'disabled-item' - } - }) - ].forEach(search.addWidget, search); - - search.start(); - - $('.popup-trigger').on('click', function(e) { - e.stopPropagation(); - $('body') - .append('
') - .css('overflow', 'hidden'); - $('.popup').toggle(); - $('#algolia-search-input').find('input').focus(); - }); - - $('.popup-btn-close').click(function(){ - $('.popup').hide(); - $('.algolia-pop-overlay').remove(); - $('body').css('overflow', ''); - }); - -}); diff --git a/js/src/bootstrap.js b/js/src/bootstrap.js deleted file mode 100644 index d9c33ed..0000000 --- a/js/src/bootstrap.js +++ /dev/null @@ -1,52 +0,0 @@ -/* global NexT: true */ - -$(document).ready(function () { - - $(document).trigger('bootstrap:before'); - - NexT.utils.isMobile() && window.FastClick.attach(document.body); - - NexT.utils.lazyLoadPostsImages(); - - NexT.utils.registerESCKeyEvent(); - - NexT.utils.registerBackToTop(); - - // Mobile top menu bar. - $('.site-nav-toggle button').on('click', function () { - var $siteNav = $('.site-nav'); - var ON_CLASS_NAME = 'site-nav-on'; - var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME); - var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown'; - var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass'; - - $siteNav.stop()[animateAction]('fast', function () { - $siteNav[animateCallback](ON_CLASS_NAME); - }); - }); - - /** - * Register JS handlers by condition option. - * Need to add config option in Front-End at 'layout/_partials/head.swig' file. - */ - CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox(); - CONFIG.tabs && NexT.utils.registerTabsTag(); - - NexT.utils.embeddedVideoTransformer(); - NexT.utils.addActiveClassToMenuItem(); - - - // Define Motion Sequence. - NexT.motion.integrator - .add(NexT.motion.middleWares.logo) - .add(NexT.motion.middleWares.menu) - .add(NexT.motion.middleWares.postList) - .add(NexT.motion.middleWares.sidebar); - - $(document).trigger('motion:before'); - - // Bootstrap Motion. - CONFIG.motion.enable && NexT.motion.integrator.bootstrap(); - - $(document).trigger('bootstrap:after'); -}); diff --git a/js/src/exturl.js b/js/src/exturl.js deleted file mode 100644 index b85062a..0000000 --- a/js/src/exturl.js +++ /dev/null @@ -1,15 +0,0 @@ -/* global NexT: true */ - -$(document).ready(function () { - - // 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}}; - - $('.exturl').on('click', function () { - var $exturl = $(this).attr('data-url'); - var $decurl = Base64.decode($exturl); - window.open($decurl, '_blank'); - return false; - }); - -}); diff --git a/js/src/hook-duoshuo.js b/js/src/hook-duoshuo.js deleted file mode 100644 index ca64dbd..0000000 --- a/js/src/hook-duoshuo.js +++ /dev/null @@ -1,115 +0,0 @@ -/* global DUOSHUO: true */ -/* jshint camelcase: false */ - -typeof DUOSHUO !== 'undefined' ? - hookTemplate() : - ($('#duoshuo-script')[0].onload = hookTemplate); - - -function hookTemplate() { - var post = DUOSHUO.templates.post; - - DUOSHUO.templates.post = function (e, t) { - var rs = post(e, t); - var agent = e.post.agent; - var userId = e.post.author.user_id; - var admin = ''; - - if (userId && (userId == CONFIG.duoshuo.userId)) { - admin = '' + CONFIG.duoshuo.author + ''; - } - - if (agent && /^Mozilla/.test(agent)) { - rs = rs.replace(/<\/div>

/, admin + getAgentInfo(agent) + '

'); - } - - return rs; - }; -} - -function getAgentInfo(string) { - $.ua.set(string); - - var UNKNOWN = 'Unknown'; - var sua = $.ua; - var separator = isMobile() ? '

' : ''; - var osName = sua.os.name || UNKNOWN; - var osVersion = sua.os.version || UNKNOWN; - var browserName = sua.browser.name || UNKNOWN; - var browserVersion = sua.browser.version || UNKNOWN; - var iconMapping = { - os: { - android : 'android', - linux : 'linux', - windows : 'windows', - ios : 'apple', - 'mac os': 'apple', - unknown : 'desktop' - }, - browser: { - chrome : 'chrome', - chromium : 'chrome', - firefox : 'firefox', - opera : 'opera', - safari : 'safari', - ie : 'internet-explorer', - wechat : 'wechat', - qq : 'qq', - unknown : 'globe' - } - }; - var osIcon = iconMapping.os[osName.toLowerCase()]; - var browserIcon = iconMapping.browser[getBrowserKey()]; - - return separator + - '' + - '' + - osName + ' ' + osVersion + - '' + separator + - '' + - '' + - browserName + ' ' + browserVersion + - ''; - - function getBrowserKey () { - var key = browserName.toLowerCase(); - - if (key.match(/WeChat/i)) { - return 'wechat'; - } - - if (key.match(/QQBrowser/i)) { - return 'qq'; - } - - return key; - } - - function isMobile() { - var userAgent = window.navigator.userAgent; - - var isiPad = userAgent.match(/iPad/i) !== null; - var mobileUA = [ - 'iphone', 'android', 'phone', 'mobile', - 'wap', 'netfront', 'x11', 'java', 'opera mobi', - 'opera mini', 'ucweb', 'windows ce', 'symbian', - 'symbianos', 'series', 'webos', 'sony', - 'blackberry', 'dopod', 'nokia', 'samsung', - 'palmsource', 'xda', 'pieplus', 'meizu', - 'midp' ,'cldc' , 'motorola', 'foma', - 'docomo', 'up.browser', 'up.link', 'blazer', - 'helio', 'hosin', 'huawei', 'novarra', - 'coolpad', 'webos', 'techfaith', 'palmsource', - 'alcatel', 'amoi', 'ktouch', 'nexian', - 'ericsson', 'philips', 'sagem', 'wellcom', - 'bunjalloo', 'maui', 'smartphone', 'iemobile', - 'spice', 'bird', 'zte-', 'longcos', - 'pantech', 'gionee', 'portalmmm', 'jig browser', - 'hiptop', 'benq', 'haier', '^lct', - '320x320', '240x320', '176x220' - ]; - var pattern = new RegExp(mobileUA.join('|'), 'i'); - - return !isiPad && userAgent.match(pattern); - } -} diff --git a/js/src/js.cookie.js b/js/src/js.cookie.js deleted file mode 100644 index c6c3975..0000000 --- a/js/src/js.cookie.js +++ /dev/null @@ -1,165 +0,0 @@ -/*! - * JavaScript Cookie v2.1.4 - * https://github.com/js-cookie/js-cookie - * - * Copyright 2006, 2015 Klaus Hartl & Fagner Brack - * Released under the MIT license - */ -;(function (factory) { - var registeredInModuleLoader = false; - if (typeof define === 'function' && define.amd) { - define(factory); - registeredInModuleLoader = true; - } - if (typeof exports === 'object') { - module.exports = factory(); - registeredInModuleLoader = true; - } - if (!registeredInModuleLoader) { - var OldCookies = window.Cookies; - var api = window.Cookies = factory(); - api.noConflict = function () { - window.Cookies = OldCookies; - return api; - }; - } -}(function () { - function extend () { - var i = 0; - var result = {}; - for (; i < arguments.length; i++) { - var attributes = arguments[ i ]; - for (var key in attributes) { - result[key] = attributes[key]; - } - } - return result; - } - - function init (converter) { - function api (key, value, attributes) { - var result; - if (typeof document === 'undefined') { - return; - } - - // Write - - if (arguments.length > 1) { - attributes = extend({ - path: '/' - }, api.defaults, attributes); - - if (typeof attributes.expires === 'number') { - var expires = new Date(); - expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); - attributes.expires = expires; - } - - // We're using "expires" because "max-age" is not supported by IE - attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; - - try { - result = JSON.stringify(value); - if (/^[\{\[]/.test(result)) { - value = result; - } - } catch (e) {} - - if (!converter.write) { - value = encodeURIComponent(String(value)) - .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); - } else { - value = converter.write(value, key); - } - - key = encodeURIComponent(String(key)); - key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); - key = key.replace(/[\(\)]/g, escape); - - var stringifiedAttributes = ''; - - for (var attributeName in attributes) { - if (!attributes[attributeName]) { - continue; - } - stringifiedAttributes += '; ' + attributeName; - if (attributes[attributeName] === true) { - continue; - } - stringifiedAttributes += '=' + attributes[attributeName]; - } - return (document.cookie = key + '=' + value + stringifiedAttributes); - } - - // Read - - if (!key) { - result = {}; - } - - // To prevent the for loop in the first place assign an empty array - // in case there are no cookies at all. Also prevents odd result when - // calling "get()" - var cookies = document.cookie ? document.cookie.split('; ') : []; - var rdecode = /(%[0-9A-Z]{2})+/g; - var i = 0; - - for (; i < cookies.length; i++) { - var parts = cookies[i].split('='); - var cookie = parts.slice(1).join('='); - - if (cookie.charAt(0) === '"') { - cookie = cookie.slice(1, -1); - } - - try { - var name = parts[0].replace(rdecode, decodeURIComponent); - cookie = converter.read ? - converter.read(cookie, name) : converter(cookie, name) || - cookie.replace(rdecode, decodeURIComponent); - - if (this.json) { - try { - cookie = JSON.parse(cookie); - } catch (e) {} - } - - if (key === name) { - result = cookie; - break; - } - - if (!key) { - result[name] = cookie; - } - } catch (e) {} - } - - return result; - } - - api.set = api; - api.get = function (key) { - return api.call(api, key); - }; - api.getJSON = function () { - return api.apply({ - json: true - }, [].slice.call(arguments)); - }; - api.defaults = {}; - - api.remove = function (key, attributes) { - api(key, '', extend(attributes, { - expires: -1 - })); - }; - - api.withConverter = init; - - return api; - } - - return init(function () {}); -})); diff --git a/js/src/motion.js b/js/src/motion.js deleted file mode 100644 index 1129179..0000000 --- a/js/src/motion.js +++ /dev/null @@ -1,352 +0,0 @@ -/* global NexT: true */ - -$(document).ready(function () { - NexT.motion = {}; - - var sidebarToggleLines = { - lines: [], - push: function (line) { - this.lines.push(line); - }, - init: function () { - this.lines.forEach(function (line) { - line.init(); - }); - }, - arrow: function () { - this.lines.forEach(function (line) { - line.arrow(); - }); - }, - close: function () { - this.lines.forEach(function (line) { - line.close(); - }); - } - }; - - function SidebarToggleLine(settings) { - this.el = $(settings.el); - this.status = $.extend({}, { - init: { - width: '100%', - opacity: 1, - left: 0, - rotateZ: 0, - top: 0 - } - }, settings.status); - } - - SidebarToggleLine.prototype.init = function () { - this.transform('init'); - }; - SidebarToggleLine.prototype.arrow = function () { - this.transform('arrow'); - }; - SidebarToggleLine.prototype.close = function () { - this.transform('close'); - }; - SidebarToggleLine.prototype.transform = function (status) { - this.el.velocity('stop').velocity(this.status[status]); - }; - - var sidebarToggleLine1st = new SidebarToggleLine({ - el: '.sidebar-toggle-line-first', - status: { - arrow: {width: '50%', rotateZ: '-45deg', top: '2px'}, - close: {width: '100%', rotateZ: '-45deg', top: '5px'} - } - }); - var sidebarToggleLine2nd = new SidebarToggleLine({ - el: '.sidebar-toggle-line-middle', - status: { - arrow: {width: '90%'}, - close: {opacity: 0} - } - }); - var sidebarToggleLine3rd = new SidebarToggleLine({ - el: '.sidebar-toggle-line-last', - status: { - arrow: {width: '50%', rotateZ: '45deg', top: '-2px'}, - close: {width: '100%', rotateZ: '45deg', top: '-5px'} - } - }); - - sidebarToggleLines.push(sidebarToggleLine1st); - sidebarToggleLines.push(sidebarToggleLine2nd); - sidebarToggleLines.push(sidebarToggleLine3rd); - - var SIDEBAR_WIDTH = '320px'; - var SIDEBAR_DISPLAY_DURATION = 200; - var xPos, yPos; - - var sidebarToggleMotion = { - toggleEl: $('.sidebar-toggle'), - dimmerEl: $('#sidebar-dimmer'), - sidebarEl: $('.sidebar'), - isSidebarVisible: false, - init: function () { - this.toggleEl.on('click', this.clickHandler.bind(this)); - this.dimmerEl.on('click', this.clickHandler.bind(this)); - this.toggleEl.on('mouseenter', this.mouseEnterHandler.bind(this)); - this.toggleEl.on('mouseleave', this.mouseLeaveHandler.bind(this)); - this.sidebarEl.on('touchstart', this.touchstartHandler.bind(this)); - this.sidebarEl.on('touchend', this.touchendHandler.bind(this)); - this.sidebarEl.on('touchmove', function(e){e.preventDefault();}); - - $(document) - .on('sidebar.isShowing', function () { - NexT.utils.isDesktop() && $('body').velocity('stop').velocity( - {paddingRight: SIDEBAR_WIDTH}, - SIDEBAR_DISPLAY_DURATION - ); - }) - .on('sidebar.isHiding', function () { - }); - }, - clickHandler: function () { - this.isSidebarVisible ? this.hideSidebar() : this.showSidebar(); - this.isSidebarVisible = !this.isSidebarVisible; - }, - mouseEnterHandler: function () { - if (this.isSidebarVisible) { - return; - } - sidebarToggleLines.arrow(); - }, - mouseLeaveHandler: function () { - if (this.isSidebarVisible) { - return; - } - sidebarToggleLines.init(); - }, - touchstartHandler: function(e) { - xPos = e.originalEvent.touches[0].clientX; - yPos = e.originalEvent.touches[0].clientY; - }, - touchendHandler: function(e) { - var _xPos = e.originalEvent.changedTouches[0].clientX; - var _yPos = e.originalEvent.changedTouches[0].clientY; - if (_xPos-xPos > 30 && Math.abs(_yPos-yPos) < 20) { - this.clickHandler(); - } - }, - showSidebar: function () { - var self = this; - - sidebarToggleLines.close(); - - this.sidebarEl.velocity('stop').velocity({ - width: SIDEBAR_WIDTH - }, { - display: 'block', - duration: SIDEBAR_DISPLAY_DURATION, - begin: function () { - $('.sidebar .motion-element').velocity( - 'transition.slideRightIn', - { - stagger: 50, - drag: true, - complete: function () { - self.sidebarEl.trigger('sidebar.motion.complete'); - } - } - ); - }, - complete: function () { - self.sidebarEl.addClass('sidebar-active'); - self.sidebarEl.trigger('sidebar.didShow'); - } - } - ); - - this.sidebarEl.trigger('sidebar.isShowing'); - }, - hideSidebar: function () { - NexT.utils.isDesktop() && $('body').velocity('stop').velocity({paddingRight: 0}); - this.sidebarEl.find('.motion-element').velocity('stop').css('display', 'none'); - this.sidebarEl.velocity('stop').velocity({width: 0}, {display: 'none'}); - - sidebarToggleLines.init(); - - this.sidebarEl.removeClass('sidebar-active'); - this.sidebarEl.trigger('sidebar.isHiding'); - - // Prevent adding TOC to Overview if Overview was selected when close & open sidebar. - if (!!$('.post-toc-wrap')) { - if ($('.site-overview-wrap').css('display') === 'block') { - $('.post-toc-wrap').removeClass('motion-element'); - } else { - $('.post-toc-wrap').addClass('motion-element'); - } - } - } - }; - sidebarToggleMotion.init(); - - NexT.motion.integrator = { - queue: [], - cursor: -1, - add: function (fn) { - this.queue.push(fn); - return this; - }, - next: function () { - this.cursor++; - var fn = this.queue[this.cursor]; - $.isFunction(fn) && fn(NexT.motion.integrator); - }, - bootstrap: function () { - this.next(); - } - }; - - NexT.motion.middleWares = { - logo: function (integrator) { - var sequence = []; - var $brand = $('.brand'); - var $title = $('.site-title'); - var $subtitle = $('.site-subtitle'); - var $logoLineTop = $('.logo-line-before i'); - var $logoLineBottom = $('.logo-line-after i'); - - $brand.size() > 0 && sequence.push({ - e: $brand, - p: {opacity: 1}, - o: {duration: 200} - }); - - NexT.utils.isMist() && hasElement([$logoLineTop, $logoLineBottom]) && - sequence.push( - getMistLineSettings($logoLineTop, '100%'), - getMistLineSettings($logoLineBottom, '-100%') - ); - - hasElement($title) && sequence.push({ - e: $title, - p: {opacity: 1, top: 0}, - o: { duration: 200 } - }); - - hasElement($subtitle) && sequence.push({ - e: $subtitle, - p: {opacity: 1, top: 0}, - o: {duration: 200} - }); - - if (CONFIG.motion.async) { - integrator.next(); - } - - if (sequence.length > 0) { - sequence[sequence.length - 1].o.complete = function () { - integrator.next(); - }; - $.Velocity.RunSequence(sequence); - } else { - integrator.next(); - } - - - function getMistLineSettings (element, translateX) { - return { - e: $(element), - p: {translateX: translateX}, - o: { - duration: 500, - sequenceQueue: false - } - }; - } - - /** - * Check if $elements exist. - * @param {jQuery|Array} $elements - * @returns {boolean} - */ - function hasElement ($elements) { - $elements = Array.isArray($elements) ? $elements : [$elements]; - return $elements.every(function ($element) { - return $.isFunction($element.size) && $element.size() > 0; - }); - } - }, - - menu: function (integrator) { - - if (CONFIG.motion.async) { - integrator.next(); - } - - $('.menu-item').velocity('transition.slideDownIn', { - display: null, - duration: 200, - complete: function () { - integrator.next(); - } - }); - }, - - postList: function (integrator) { - //var $post = $('.post'); - var $postBlock = $('.post-block, .pagination, .comments'); - var $postBlockTransition = CONFIG.motion.transition.post_block; - var $postHeader = $('.post-header'); - var $postHeaderTransition = CONFIG.motion.transition.post_header; - var $postBody = $('.post-body'); - var $postBodyTransition = CONFIG.motion.transition.post_body; - var $collHeader = $('.collection-title, .archive-year'); - var $collHeaderTransition = CONFIG.motion.transition.coll_header; - var $sidebarAffix = $('.sidebar-inner'); - var $sidebarAffixTransition = CONFIG.motion.transition.sidebar; - var hasPost = $postBlock.size() > 0; - - hasPost ? postMotion() : integrator.next(); - - if (CONFIG.motion.async) { - integrator.next(); - } - - function postMotion () { - var postMotionOptions = window.postMotionOptions || { - stagger: 100, - drag: true - }; - postMotionOptions.complete = function () { - // After motion complete need to remove transform from sidebar to let affix work on Pisces | Gemini. - if (CONFIG.motion.transition.sidebar && (NexT.utils.isPisces() || NexT.utils.isGemini())) { - $sidebarAffix.css({ 'transform': 'initial' }); - } - integrator.next(); - }; - - //$post.velocity('transition.slideDownIn', postMotionOptions); - if (CONFIG.motion.transition.post_block) { - $postBlock.velocity('transition.' + $postBlockTransition, postMotionOptions); - } - if (CONFIG.motion.transition.post_header) { - $postHeader.velocity('transition.' + $postHeaderTransition, postMotionOptions); - } - if (CONFIG.motion.transition.post_body) { - $postBody.velocity('transition.' + $postBodyTransition, postMotionOptions); - } - if (CONFIG.motion.transition.coll_header) { - $collHeader.velocity('transition.' + $collHeaderTransition, postMotionOptions); - } - // Only for Pisces | Gemini. - if (CONFIG.motion.transition.sidebar && (NexT.utils.isPisces() || NexT.utils.isGemini())) { - $sidebarAffix.velocity('transition.' + $sidebarAffixTransition, postMotionOptions); - } - } - }, - - sidebar: function (integrator) { - if (CONFIG.sidebar.display === 'always') { - NexT.utils.displaySidebar(); - } - integrator.next(); - } - }; - -}); diff --git a/js/src/post-details.js b/js/src/post-details.js deleted file mode 100644 index a82bcc2..0000000 --- a/js/src/post-details.js +++ /dev/null @@ -1,99 +0,0 @@ -/* global NexT: true */ - -$(document).ready(function () { - - initScrollSpy(); - - function initScrollSpy () { - var tocSelector = '.post-toc'; - var $tocElement = $(tocSelector); - var activeCurrentSelector = '.active-current'; - - $tocElement - .on('activate.bs.scrollspy', function () { - var $currentActiveElement = $(tocSelector + ' .active').last(); - - removeCurrentActiveClass(); - $currentActiveElement.addClass('active-current'); - - // Scrolling to center active TOC element if TOC content is taller then viewport. - $tocElement.scrollTop($currentActiveElement.offset().top - $tocElement.offset().top + $tocElement.scrollTop() - ($tocElement.height() / 2)); - }) - .on('clear.bs.scrollspy', removeCurrentActiveClass); - - $('body').scrollspy({ target: tocSelector }); - - function removeCurrentActiveClass () { - $(tocSelector + ' ' + activeCurrentSelector) - .removeClass(activeCurrentSelector.substring(1)); - } - } - -}); - -$(document).ready(function () { - var html = $('html'); - var TAB_ANIMATE_DURATION = 200; - var hasVelocity = $.isFunction(html.velocity); - - $('.sidebar-nav li').on('click', function () { - var item = $(this); - var activeTabClassName = 'sidebar-nav-active'; - var activePanelClassName = 'sidebar-panel-active'; - if (item.hasClass(activeTabClassName)) { - return; - } - - var currentTarget = $('.' + activePanelClassName); - var target = $('.' + item.data('target')); - - hasVelocity ? - currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () { - target - .velocity('stop') - .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION) - .addClass(activePanelClassName); - }) : - currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () { - currentTarget.hide(); - target - .stop() - .css({'opacity': 0, 'display': 'block'}) - .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () { - currentTarget.removeClass(activePanelClassName); - target.addClass(activePanelClassName); - }); - }); - - item.siblings().removeClass(activeTabClassName); - item.addClass(activeTabClassName); - }); - - // TOC item animation navigate & prevent #item selector in adress bar. - $('.post-toc a').on('click', function (e) { - e.preventDefault(); - var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href')); - var offset = $(targetSelector).offset().top; - - hasVelocity ? - html.velocity('stop').velocity('scroll', { - offset: offset + 'px', - mobileHA: false - }) : - $('html, body').stop().animate({ - scrollTop: offset - }, 500); - }); - - // Expand sidebar on post detail page by default, when post has a toc. - var $tocContent = $('.post-toc-content'); - var isSidebarCouldDisplay = CONFIG.sidebar.display === 'post' || - CONFIG.sidebar.display === 'always'; - var hasTOC = $tocContent.length > 0 && $tocContent.html().trim().length > 0; - if (isSidebarCouldDisplay && hasTOC) { - CONFIG.motion.enable ? - (NexT.motion.middleWares.sidebar = function () { - NexT.utils.displaySidebar(); - }) : NexT.utils.displaySidebar(); - } -}); diff --git a/js/src/schemes/pisces.js b/js/src/schemes/pisces.js deleted file mode 100644 index 0e6e426..0000000 --- a/js/src/schemes/pisces.js +++ /dev/null @@ -1,57 +0,0 @@ -$(document).ready(function () { - - var sidebarInner = $('.sidebar-inner'); - - initAffix(); - resizeListener(); - - function initAffix () { - var headerOffset = getHeaderOffset(), - footerOffset = getFooterOffset(), - sidebarHeight = $('#sidebar').height() + NexT.utils.getSidebarb2tHeight(), - contentHeight = $('#content').height(); - - // Not affix if sidebar taller then content (to prevent bottom jumping). - if (headerOffset + sidebarHeight < contentHeight) { - sidebarInner.affix({ - offset: { - top: headerOffset - CONFIG.sidebar.offset, - bottom: footerOffset - } - }); - } - - setSidebarMarginTop(headerOffset).css({ 'margin-left': 'initial' }); - } - - function resizeListener () { - var mql = window.matchMedia('(min-width: 991px)'); - mql.addListener(function(e){ - if(e.matches){ - recalculateAffixPosition(); - } - }); - } - - function getHeaderOffset () { - return $('.header-inner').height() + CONFIG.sidebar.offset; - } - - function getFooterOffset () { - var footerInner = $('.footer-inner'), - footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight(), - footerOffset = footerInner.outerHeight(true) + footerMargin; - return footerOffset; - } - - function setSidebarMarginTop (headerOffset) { - return $('#sidebar').css({ 'margin-top': headerOffset }); - } - - function recalculateAffixPosition () { - $(window).off('.affix'); - sidebarInner.removeData('bs.affix').removeClass('affix affix-top affix-bottom'); - initAffix(); - } - -}); diff --git a/js/src/scroll-cookie.js b/js/src/scroll-cookie.js deleted file mode 100644 index 34ff200..0000000 --- a/js/src/scroll-cookie.js +++ /dev/null @@ -1,23 +0,0 @@ -$(document).ready(function() { - - // Set relative link path (without domain) - var rpath = window.location.href.replace(window.location.origin, ""); - - // Write position in cookie - var timeout; - $(window).on("scroll", function() { - clearTimeout(timeout); - timeout = setTimeout(function () { - Cookies.set("scroll-cookie", ($(window).scrollTop() + "|" + rpath), { expires: 365, path: '' }); - }, 250); - }); - - // Read position from cookie - if (Cookies.get("scroll-cookie") !== undefined) { - var cvalues = Cookies.get("scroll-cookie").split('|'); - if (cvalues[1] == rpath) { - $(window).scrollTop(cvalues[0]); - } - } - -}); diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js deleted file mode 100644 index f5c5c6c..0000000 --- a/js/src/scrollspy.js +++ /dev/null @@ -1,182 +0,0 @@ -/* ======================================================================== -* Bootstrap: scrollspy.js v3.3.2 -* http://getbootstrap.com/javascript/#scrollspy -* ======================================================================== -* Copyright 2011-2015 Twitter, Inc. -* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) -* ======================================================================== */ - -/** - * Custom by iissnan - * - * - Add a `clear.bs.scrollspy` event. - * - Esacpe targets selector. - */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.2' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(NexT.utils.escapeSelector(href)) // Need to escape selector. - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - - - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - $(this.selector).trigger('clear.bs.scrollspy') // Add a custom event. - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); diff --git a/js/src/utils.js b/js/src/utils.js deleted file mode 100644 index c1621ef..0000000 --- a/js/src/utils.js +++ /dev/null @@ -1,339 +0,0 @@ -/* global NexT: true */ - -NexT.utils = NexT.$u = { - /** - * Wrap images with fancybox support. - */ - wrapImageWithFancyBox: function () { - $('.content img') - .not('[hidden]') - .not('.group-picture img, .post-gallery img') - .each(function () { - var $image = $(this); - var imageTitle = $image.attr('title'); - var $imageWrapLink = $image.parent('a'); - - if ($imageWrapLink.size() < 1) { - var imageLink = ($image.attr('data-original')) ? this.getAttribute('data-original') : this.getAttribute('src'); - $imageWrapLink = $image.wrap('').parent('a'); - } - - $imageWrapLink.addClass('fancybox fancybox.image'); - $imageWrapLink.attr('rel', 'group'); - - if (imageTitle) { - $imageWrapLink.append('

' + imageTitle + '

'); - - //make sure img title tag will show correctly in fancybox - $imageWrapLink.attr('title', imageTitle); - } - }); - - $('.fancybox').fancybox({ - helpers: { - overlay: { - locked: false - } - } - }); - }, - - lazyLoadPostsImages: function () { - $('#posts').find('img').lazyload({ - //placeholder: '/images/loading.gif', - effect: 'fadeIn', - threshold : 0 - }); - }, - - /** - * Tabs tag listener (without twitter bootstrap). - */ - registerTabsTag: function () { - var tNav = '.tabs ul.nav-tabs '; - - // Binding `nav-tabs` & `tab-content` by real time permalink changing. - $(function() { - $(window).bind('hashchange', function() { - var tHash = location.hash; - if (tHash !== '') { - $(tNav + 'li:has(a[href="' + tHash + '"])').addClass('active').siblings().removeClass('active'); - $(tHash).addClass('active').siblings().removeClass('active'); - } - }).trigger('hashchange'); - }); - - $(tNav + '.tab').on('click', function (href) { - href.preventDefault(); - // Prevent selected tab to select again. - if(!$(this).hasClass('active')){ - - // Add & Remove active class on `nav-tabs` & `tab-content`. - $(this).addClass('active').siblings().removeClass('active'); - var tActive = $(this).find('a').attr('href'); - $(tActive).addClass('active').siblings().removeClass('active'); - - // Clear location hash in browser if #permalink exists. - if (location.hash !== '') { - history.pushState('', document.title, window.location.pathname + window.location.search); - } - } - }); - - }, - - registerESCKeyEvent: function () { - $(document).on('keyup', function (event) { - var shouldDismissSearchPopup = event.which === 27 && - $('.search-popup').is(':visible'); - if (shouldDismissSearchPopup) { - $('.search-popup').hide(); - $('.search-popup-overlay').remove(); - $('body').css('overflow', ''); - } - }); - }, - - registerBackToTop: function () { - var THRESHOLD = 50; - var $top = $('.back-to-top'); - - $(window).on('scroll', function () { - $top.toggleClass('back-to-top-on', window.pageYOffset > THRESHOLD); - - var scrollTop = $(window).scrollTop(); - var contentVisibilityHeight = NexT.utils.getContentVisibilityHeight(); - var scrollPercent = (scrollTop) / (contentVisibilityHeight); - var scrollPercentRounded = Math.round(scrollPercent*100); - var scrollPercentMaxed = (scrollPercentRounded > 100) ? 100 : scrollPercentRounded; - $('#scrollpercent>span').html(scrollPercentMaxed); - }); - - $top.on('click', function () { - $('body').velocity('scroll'); - }); - }, - - /** - * Transform embedded video to support responsive layout. - * @see http://toddmotto.com/fluid-and-responsive-youtube-and-vimeo-videos-with-fluidvids-js/ - */ - embeddedVideoTransformer: function () { - var $iframes = $('iframe'); - - // Supported Players. Extend this if you need more players. - var SUPPORTED_PLAYERS = [ - 'www.youtube.com', - 'player.vimeo.com', - 'player.youku.com', - 'music.163.com', - 'www.tudou.com' - ]; - var pattern = new RegExp( SUPPORTED_PLAYERS.join('|') ); - - $iframes.each(function () { - var iframe = this; - var $iframe = $(this); - var oldDimension = getDimension($iframe); - var newDimension; - - if (this.src.search(pattern) > 0) { - - // Calculate the video ratio based on the iframe's w/h dimensions - var videoRatio = getAspectRadio(oldDimension.width, oldDimension.height); - - // Replace the iframe's dimensions and position the iframe absolute - // This is the trick to emulate the video ratio - $iframe.width('100%').height('100%') - .css({ - position: 'absolute', - top: '0', - left: '0' - }); - - - // Wrap the iframe in a new
which uses a dynamically fetched padding-top property - // based on the video's w/h dimensions - var wrap = document.createElement('div'); - wrap.className = 'fluid-vids'; - wrap.style.position = 'relative'; - wrap.style.marginBottom = '20px'; - wrap.style.width = '100%'; - wrap.style.paddingTop = videoRatio + '%'; - // Fix for appear inside tabs tag. - (wrap.style.paddingTop === '') && (wrap.style.paddingTop = '50%'); - - // Add the iframe inside our newly created
- var iframeParent = iframe.parentNode; - iframeParent.insertBefore(wrap, iframe); - wrap.appendChild(iframe); - - // Additional adjustments for 163 Music - if (this.src.search('music.163.com') > 0) { - newDimension = getDimension($iframe); - var shouldRecalculateAspect = newDimension.width > oldDimension.width || - newDimension.height < oldDimension.height; - - // 163 Music Player has a fixed height, so we need to reset the aspect radio - if (shouldRecalculateAspect) { - wrap.style.paddingTop = getAspectRadio(newDimension.width, oldDimension.height) + '%'; - } - } - } - }); - - function getDimension($element) { - return { - width: $element.width(), - height: $element.height() - }; - } - - function getAspectRadio(width, height) { - return height / width * 100; - } - }, - - /** - * Add `menu-item-active` class name to menu item - * via comparing location.path with menu item's href. - */ - addActiveClassToMenuItem: function () { - var path = window.location.pathname; - path = path === '/' ? path : path.substring(0, path.length - 1); - $('.menu-item a[href^="' + path + '"]:first').parent().addClass('menu-item-active'); - }, - - hasMobileUA: function () { - var nav = window.navigator; - var ua = nav.userAgent; - var pa = /iPad|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian/g; - - return pa.test(ua); - }, - - isTablet: function () { - return window.screen.width < 992 && window.screen.width > 767 && this.hasMobileUA(); - }, - - isMobile: function () { - return window.screen.width < 767 && this.hasMobileUA(); - }, - - isDesktop: function () { - return !this.isTablet() && !this.isMobile(); - }, - - /** - * Escape meta symbols in jQuery selectors. - * - * @param selector - * @returns {string|void|XML|*} - */ - escapeSelector: function (selector) { - return selector.replace(/[!"$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, '\\$&'); - }, - - displaySidebar: function () { - if (!this.isDesktop() || this.isPisces() || this.isGemini()) { - return; - } - $('.sidebar-toggle').trigger('click'); - }, - - isMist: function () { - return CONFIG.scheme === 'Mist'; - }, - - isPisces: function () { - return CONFIG.scheme === 'Pisces'; - }, - - isGemini: function () { - return CONFIG.scheme === 'Gemini'; - }, - - getScrollbarWidth: function () { - var $div = $('
').addClass('scrollbar-measure').prependTo('body'); - var div = $div[0]; - var scrollbarWidth = div.offsetWidth - div.clientWidth; - - $div.remove(); - - return scrollbarWidth; - }, - - getContentVisibilityHeight: function () { - var docHeight = $('#content').height(), - winHeight = $(window).height(), - contentVisibilityHeight = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight); - return contentVisibilityHeight; - }, - - getSidebarb2tHeight: function () { - //var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? document.getElementsByClassName('back-to-top')[0].clientHeight : 0; - var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? $('.back-to-top').height() : 0; - //var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? 24 : 0; - return sidebarb2tHeight; - }, - - getSidebarSchemePadding: function () { - var sidebarNavHeight = ($('.sidebar-nav').css('display') == 'block') ? $('.sidebar-nav').outerHeight(true) : 0, - sidebarInner = $('.sidebar-inner'), - sidebarPadding = sidebarInner.innerWidth() - sidebarInner.width(), - sidebarSchemePadding = this.isPisces() || this.isGemini() ? - ((sidebarPadding * 2) + sidebarNavHeight + (CONFIG.sidebar.offset * 2) + this.getSidebarb2tHeight()) : - ((sidebarPadding * 2) + (sidebarNavHeight / 2)); - return sidebarSchemePadding; - } - - /** - * Affix behaviour for Sidebar. - * - * @returns {Boolean} - */ -// needAffix: function () { -// return this.isPisces() || this.isGemini(); -// } -}; - -$(document).ready(function () { - - initSidebarDimension(); - - /** - * Init Sidebar & TOC inner dimensions on all pages and for all schemes. - * Need for Sidebar/TOC inner scrolling if content taller then viewport. - */ - function initSidebarDimension () { - var updateSidebarHeightTimer; - - $(window).on('resize', function () { - updateSidebarHeightTimer && clearTimeout(updateSidebarHeightTimer); - - updateSidebarHeightTimer = setTimeout(function () { - var sidebarWrapperHeight = document.body.clientHeight - NexT.utils.getSidebarSchemePadding(); - - updateSidebarHeight(sidebarWrapperHeight); - }, 0); - }); - - // Initialize Sidebar & TOC Width. - var scrollbarWidth = NexT.utils.getScrollbarWidth(); - if ($('.site-overview-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) { - $('.site-overview').css('width', 'calc(100% + ' + scrollbarWidth + 'px)'); - } - if ($('.post-toc-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) { - $('.post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)'); - } - - // Initialize Sidebar & TOC Height. - updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding()); - } - - function updateSidebarHeight (height) { - height = height || 'auto'; - $('.site-overview, .post-toc').css('max-height', height); - } - -}); diff --git a/lib/Han/dist/font/han-space.otf b/lib/Han/dist/font/han-space.otf deleted file mode 100644 index 845b1bc..0000000 Binary files a/lib/Han/dist/font/han-space.otf and /dev/null differ diff --git a/lib/Han/dist/font/han-space.woff b/lib/Han/dist/font/han-space.woff deleted file mode 100644 index 6ccc84f..0000000 Binary files a/lib/Han/dist/font/han-space.woff and /dev/null differ diff --git a/lib/Han/dist/font/han.otf b/lib/Han/dist/font/han.otf deleted file mode 100644 index 2ce2f46..0000000 Binary files a/lib/Han/dist/font/han.otf and /dev/null differ diff --git a/lib/Han/dist/font/han.woff b/lib/Han/dist/font/han.woff deleted file mode 100644 index 011e06c..0000000 Binary files a/lib/Han/dist/font/han.woff and /dev/null differ diff --git a/lib/Han/dist/font/han.woff2 b/lib/Han/dist/font/han.woff2 deleted file mode 100644 index 02c49af..0000000 Binary files a/lib/Han/dist/font/han.woff2 and /dev/null differ diff --git a/lib/Han/dist/han.css b/lib/Han/dist/han.css deleted file mode 100644 index 9bafab6..0000000 --- a/lib/Han/dist/han.css +++ /dev/null @@ -1,1168 +0,0 @@ -@charset "UTF-8"; - -/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ -/*! Han.css: the CSS typography framework optimised for Hanzi */ - -/* normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */ -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, -main, -menu, -nav, -section, -summary { - /* 1 */ - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; -} -audio:not([controls]) { - display: none; - height: 0; -} -progress { - vertical-align: baseline; -} -template, -[hidden] { - display: none; -} -a { - background-color: transparent; -} -a:active, -a:hover { - outline-width: 0; -} -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} -b, -strong { - font-weight: inherit; -} -b, -strong { - font-weight: bolder; -} -dfn { - font-style: italic; -} -h1 { - font-size: 2em; - margin: .67em 0; -} -mark { - background-color: #ff0; - color: #000; -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sub { - bottom: -.25em; -} -sup { - top: -.5em; -} -img { - border-style: none; -} -svg:not(:root) { - overflow: hidden; -} -code, -kbd, -pre, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} -figure { - margin: 1em 40px; -} -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} -button, -input, -select, -textarea { - font: inherit; -} -optgroup { - font-weight: bold; -} -button, -input, -select { - /* 2 */ - overflow: visible; -} -button, -input, -select, -textarea { - /* 1 */ - margin: 0; -} -button, -select { - /* 1 */ - text-transform: none; -} -button, -[type="button"], -[type="reset"], -[type="submit"] { - cursor: pointer; -} -[disabled] { - cursor: default; -} -button, -html [type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; /* 2 */ -} -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} -button:-moz-focusring, -input:-moz-focusring { - outline: 1px dotted ButtonText; -} -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: .35em .625em .75em; -} -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} -textarea { - overflow: auto; -} -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} -[type="search"] { - -webkit-appearance: textfield; -} -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -@font-face { - font-family: "Han Heiti"; - src: local("Hiragino Sans GB"), local("Lantinghei TC Extralight"), local("Lantinghei SC Extralight"), local(FZLTXHB--B51-0), local(FZLTZHK--GBK1-0), local("Pingfang SC Light"), local("Pingfang TC Light"), local("Pingfang-SC-Light"), local("Pingfang-TC-Light"), local("Pingfang SC"), local("Pingfang TC"), local("Heiti SC Light"), local(STHeitiSC-Light), local("Heiti SC"), local("Heiti TC Light"), local(STHeitiTC-Light), local("Heiti TC"), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR"), local("Noto Sans CJK JP"), local("Noto Sans CJK SC"), local("Noto Sans CJK TC"), local("Source Han Sans K"), local("Source Han Sans KR"), local("Source Han Sans JP"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Droid Sans Fallback"); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Heiti"; - src: local(YuGothic), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"); -} -@font-face { - font-family: "Han Heiti CNS"; - src: local("Pingfang TC Light"), local("Pingfang-TC-Light"), local("Pingfang TC"), local("Heiti TC Light"), local(STHeitiTC-Light), local("Heiti TC"), local("Lantinghei TC Extralight"), local(FZLTXHB--B51-0), local("Lantinghei TC"), local("Microsoft Jhenghei"), local("Microsoft Yahei"), local("Noto Sans CJK TC"), local("Source Han Sans TC"), local("Source Han Sans TW"), local("Source Han Sans TWHK"), local("Source Han Sans HK"), local("Droid Sans Fallback"); -} -@font-face { - font-family: "Han Heiti GB"; - src: local("Hiragino Sans GB"), local("Pingfang SC Light"), local("Pingfang-SC-Light"), local("Pingfang SC"), local("Lantinghei SC Extralight"), local(FZLTXHK--GBK1-0), local("Lantinghei SC"), local("Heiti SC Light"), local(STHeitiSC-Light), local("Heiti SC"), local("Microsoft Yahei"), local("Noto Sans CJK SC"), local("Source Han Sans SC"), local("Source Han Sans CN"), local("Droid Sans Fallback"); -} -@font-face { - font-family: "Han Heiti"; - font-weight: 600; - src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Lantinghei SC Demibold"), local(FZLTZHB--B51-0), local(FZLTZHK--GBK1-0), local("Pingfang-SC-Semibold"), local("Pingfang-TC-Semibold"), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Microsoft Yahei Bold"), local("Microsoft Jhenghei Bold"), local(MicrosoftYahei-Bold), local(MicrosoftJhengHeiBold), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Noto Sans CJK KR Bold"), local("Noto Sans CJK JP Bold"), local("Noto Sans CJK SC Bold"), local("Noto Sans CJK TC Bold"), local(NotoSansCJKkr-Bold), local(NotoSansCJKjp-Bold), local(NotoSansCJKsc-Bold), local(NotoSansCJKtc-Bold), local("Source Han Sans K Bold"), local(SourceHanSansK-Bold), local("Source Han Sans K"), local("Source Han Sans KR Bold"), local("Source Han Sans JP Bold"), local("Source Han Sans CN Bold"), local("Source Han Sans HK Bold"), local("Source Han Sans TW Bold"), local("Source Han Sans TWHK Bold"), local("SourceHanSansKR-Bold"), local("SourceHanSansJP-Bold"), local("SourceHanSansCN-Bold"), local("SourceHanSansHK-Bold"), local("SourceHanSansTW-Bold"), local("SourceHanSansTWHK-Bold"), local("Source Han Sans KR"), local("Source Han Sans CN"), local("Source Han Sans HK"), local("Source Han Sans TW"), local("Source Han Sans TWHK"); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Heiti"; - font-weight: 600; - src: local("YuGothic Bold"), local("Hiragino Kaku Gothic ProN W6"), local("Hiragino Kaku Gothic Pro W6"), local(YuGo-Bold), local(HiraKakuProN-W6), local(HiraKakuPro-W6); -} -@font-face { - font-family: "Han Heiti CNS"; - font-weight: 600; - src: local("Pingfang TC Semibold"), local("Pingfang-TC-Semibold"), local("Heiti TC Medium"), local("STHeitiTC-Medium"), local("Heiti TC"), local("Lantinghei TC Demibold"), local(FZLTXHB--B51-0), local("Microsoft Jhenghei Bold"), local(MicrosoftJhengHeiBold), local("Microsoft Jhenghei"), local("Microsoft Yahei Bold"), local(MicrosoftYahei-Bold), local("Noto Sans CJK TC Bold"), local(NotoSansCJKtc-Bold), local("Noto Sans CJK TC"), local("Source Han Sans TC Bold"), local("SourceHanSansTC-Bold"), local("Source Han Sans TC"), local("Source Han Sans TW Bold"), local("SourceHanSans-TW"), local("Source Han Sans TW"), local("Source Han Sans TWHK Bold"), local("SourceHanSans-TWHK"), local("Source Han Sans TWHK"), local("Source Han Sans HK"), local("SourceHanSans-HK"), local("Source Han Sans HK"); -} -@font-face { - font-family: "Han Heiti GB"; - font-weight: 600; - src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Pingfang SC Semibold"), local("Pingfang-SC-Semibold"), local("Lantinghei SC Demibold"), local(FZLTZHK--GBK1-0), local("Heiti SC Medium"), local("STHeitiSC-Medium"), local("Heiti SC"), local("Microsoft Yahei Bold"), local(MicrosoftYahei-Bold), local("Microsoft Yahei"), local("Noto Sans CJK SC Bold"), local(NotoSansCJKsc-Bold), local("Noto Sans CJK SC"), local("Source Han Sans SC Bold"), local("SourceHanSansSC-Bold"), local("Source Han Sans CN Bold"), local("SourceHanSansCN-Bold"), local("Source Han Sans SC"), local("Source Han Sans CN"); -} -@font-face { - font-family: "Han Songti"; - src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local(STSong), local("Lisong Pro"), local(SimSun), local(PMingLiU); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Songti"; - src: local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); -} -@font-face { - font-family: "Han Songti CNS"; - src: local("Songti TC Regular"), local(STSongti-TC-Regular), local("Songti TC"), local("Lisong Pro"), local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local(STSong), local(PMingLiU), local(SimSun); -} -@font-face { - font-family: "Han Songti GB"; - src: local("Songti SC Regular"), local(STSongti-SC-Regular), local("Songti SC"), local(STSong), local(SimSun), local(PMingLiU); -} -@font-face { - font-family: "Han Songti"; - font-weight: 600; - src: local("STSongti SC Bold"), local("STSongti TC Bold"), local(STSongti-SC-Bold), local(STSongti-TC-Bold), local("STSongti SC"), local("STSongti TC"); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Songti"; - font-weight: 600; - src: local("YuMincho Demibold"), local("Hiragino Mincho ProN W6"), local("Hiragino Mincho Pro W6"), local(YuMin-Demibold), local(HiraMinProN-W6), local(HiraMinPro-W6), local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"); -} -@font-face { - font-family: "Han Songti CNS"; - font-weight: 600; - src: local("STSongti TC Bold"), local("STSongti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold), local("STSongti TC"), local("STSongti SC"); -} -@font-face { - font-family: "Han Songti GB"; - font-weight: 600; - src: local("STSongti SC Bold"), local(STSongti-SC-Bold), local("STSongti SC"); -} -@font-face { - font-family: cursive; - src: local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"), local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Kaiti"; - src: local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"), local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Kaiti CNS"; - src: local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local("Kaiti TC Regular"), local(STKaiTi-TC-Regular), local("Kaiti TC"); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Kaiti GB"; - src: local("Kaiti SC Regular"), local(STKaiTi-SC-Regular), local("Kaiti SC"), local(STKaiti), local(Kai), local(Kaiti), local(DFKai-SB); -} -@font-face { - font-family: cursive; - font-weight: 600; - src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti SC Bold"), local(STKaiti-SC-Bold), local("Kaiti TC"), local("Kaiti SC"); -} -@font-face { - font-family: "Han Kaiti"; - font-weight: 600; - src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti SC Bold"), local(STKaiti-SC-Bold), local("Kaiti TC"), local("Kaiti SC"); -} -@font-face { - font-family: "Han Kaiti CNS"; - font-weight: 600; - src: local("Kaiti TC Bold"), local(STKaiTi-TC-Bold), local("Kaiti TC"); -} -@font-face { - font-family: "Han Kaiti GB"; - font-weight: 600; - src: local("Kaiti SC Bold"), local(STKaiti-SC-Bold); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Fangsong"; - src: local(STFangsong), local(FangSong); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Fangsong CNS"; - src: local(STFangsong), local(FangSong); -} -@font-face { - unicode-range: U+4E00-9FFF, U+3400-4DB5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3040-309F, U+30A0-30FF, U+3099-309E, U+FF66-FF9F, U+3007, U+31C0-31E3, U+2F00-2FD5, U+2E80-2EF3; - font-family: "Han Fangsong GB"; - src: local(STFangsong), local(FangSong); -} -@font-face { - font-family: "Biaodian Sans"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Serif"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); - unicode-range: U+FF0E; -} -@font-face { - font-family: "Biaodian Sans"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Serif"; - src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); - unicode-range: U+00B7; -} -@font-face { - font-family: "Biaodian Sans"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Serif"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Yakumono Sans"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Arial Unicode MS"), local("MS Gothic"); - unicode-range: U+2014; -} -@font-face { - font-family: "Yakumono Serif"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"), local("Microsoft Yahei"); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); - unicode-range: U+2014; -} -@font-face { - font-family: "Biaodian Sans"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Serif"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local("MS Mincho"), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Yakumono Sans"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"); - unicode-range: U+2026; -} -@font-face { - font-family: "Yakumono Serif"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); - unicode-range: U+2026; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); - unicode-range: U+201C-201D, U+2018-2019; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - font-weight: bold; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); - unicode-range: U+201C-201D, U+2018-2019; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); - unicode-range: U+201C-201D, U+2018-2019; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - font-weight: bold; - src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); - unicode-range: U+201C-201D, U+2018-2019; -} -@font-face { - font-family: "Biaodian Sans"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Serif"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local(Georgia), local("Times New Roman"), local(Arial), local("Droid Sans Fallback"); - unicode-range: U+25CF; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("MS Gothic"); - unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); - unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU); - unicode-range: U+3002, U+FF0C, U+3001; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU), local("MS Gothic"); - unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); - unicode-range: U+FF0D, U+FF0F, U+FF3C; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: local(STSongti-TC-Regular), local("Lisong Pro"), local("Heiti TC"), local(PMingLiU); - unicode-range: U+3002, U+FF0C, U+3001; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); - unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local("MS Gothic"); - unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local("Songti SC"), local(STSongti), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local("MS Mincho"); - unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); - unicode-range: U+FF0D, U+FF0F, U+FF3C; -} -@font-face { - font-family: "Biaodian Pro Sans"; - src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); - unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; -} -@font-face { - font-family: "Biaodian Pro Serif"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); - unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); - unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); - unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Yu Gothic"), local(YuGothic), local(SimSun), local(PMingLiU); - unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local(YuMincho), local(SimSun), local(PMingLiU); - unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; -} -@font-face { - font-family: "Biaodian Basic"; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Basic"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Sans"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans CNS"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Sans GB"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Serif"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Serif CNS"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Biaodian Pro Serif GB"; - font-weight: bold; - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+2014, U+2026, U+00B7; -} -@font-face { - font-family: "Latin Italic Serif"; - src: local("Georgia Italic"), local("Times New Roman Italic"), local(Georgia-Italic), local(TimesNewRomanPS-ItalicMT), local(Times-Italic); -} -@font-face { - font-family: "Latin Italic Serif"; - font-weight: 700; - src: local("Georgia Bold Italic"), local("Times New Roman Bold Italic"), local(Georgia-BoldItalic), local(TimesNewRomanPS-BoldItalicMT), local(Times-Italic); -} -@font-face { - font-family: "Latin Italic Sans"; - src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); -} -@font-face { - font-family: "Latin Italic Sans"; - font-weight: 700; - src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral TF Sans"; - src: local(Skia), local("Neutraface 2 Text"), local(Candara), local(Corbel); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral TF Serif"; - src: local(Georgia), local("Hoefler Text"), local("Big Caslon"); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral TF Italic Serif"; - src: local("Georgia Italic"), local("Hoefler Text Italic"), local(Georgia-Italic), local(HoeflerText-Italic); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral LF Sans"; - src: local("Helvetica Neue"), local(Helvetica), local(Arial); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral LF Italic Sans"; - src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral LF Italic Sans"; - font-weight: bold; - src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral LF Serif"; - src: local(Palatino), local("Palatino Linotype"), local("Times New Roman"); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral LF Italic Serif"; - src: local("Palatino Italic"), local("Palatino Italic Linotype"), local("Times New Roman Italic"), local(Palatino-Italic), local(Palatino-Italic-Linotype), local(TimesNewRomanPS-ItalicMT); -} -@font-face { - unicode-range: U+0030-0039; - font-family: "Numeral LF Italic Serif"; - font-weight: bold; - src: local("Palatino Bold Italic"), local("Palatino Bold Italic Linotype"), local("Times New Roman Bold Italic"), local(Palatino-BoldItalic), local(Palatino-BoldItalic-Linotype), local(TimesNewRomanPS-BoldItalicMT); -} -@font-face { - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; - font-family: "Zhuyin Kaiti"; -} -@font-face { - unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; - font-family: "Zhuyin Heiti"; - src: local("Hiragino Sans GB"), local("Heiti TC"), local("Microsoft Jhenghei"), url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); -} -@font-face { - font-family: "Zhuyin Heiti"; - src: local("Heiti TC"), local("Microsoft Jhenghei"), url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - unicode-range: U+3127; -} -@font-face { - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - font-family: "Zhuyin Heiti"; - unicode-range: U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+31B4, U+31B5, U+31B6, U+31B7, U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; -} -@font-face { - src: url("./font/han.woff2?v3.3.0") format("woff2"), url("./font/han.woff?v3.3.0") format("woff"), url("./font/han.otf?v3.3.0") format("opentype"); - font-family: "Romanization Sans"; - unicode-range: U+0307, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; -} -html:lang(zh-Latn), -html:lang(ja-Latn), -html:not(:lang(zh)):not(:lang(ja)), -html *:lang(zh-Latn), -html *:lang(ja-Latn), -html *:not(:lang(zh)):not(:lang(ja)), -article strong:lang(zh-Latn), -article strong:lang(ja-Latn), -article strong:not(:lang(zh)):not(:lang(ja)), -article strong *:lang(zh-Latn), -article strong *:lang(ja-Latn), -article strong *:not(:lang(zh)):not(:lang(ja)) { - font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; -} -html:lang(zh), -html:lang(zh-Hant), -[lang^="zh"], -[lang*="Hant"], -[lang="zh-TW"], -[lang="zh-HK"], -article strong:lang(zh), -article strong:lang(zh-Hant) { - font-family: "Biaodian Pro Sans CNS", "Helvetica Neue", Helvetica, Arial, "Zhuyin Heiti", "Han Heiti", sans-serif; -} -html:lang(zh).no-unicoderange, -html:lang(zh-Hant).no-unicoderange, -.no-unicoderange [lang^="zh"], -.no-unicoderange [lang*="Hant"], -.no-unicoderange [lang="zh-TW"], -.no-unicoderange [lang="zh-HK"], -.no-unicoderange article strong:lang(zh), -.no-unicoderange article strong:lang(zh-Hant) { - font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; -} -html:lang(zh-Hans), -html:lang(zh-CN), -[lang*="Hans"], -[lang="zh-CN"], -article strong:lang(zh-Hans), -article strong:lang(zh-CN) { - font-family: "Biaodian Pro Sans GB", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; -} -html:lang(zh-Hans).no-unicoderange, -html:lang(zh-CN).no-unicoderange, -.no-unicoderange [lang*="Hans"], -.no-unicoderange [lang="zh-CN"], -.no-unicoderange article strong:lang(zh-Hans), -.no-unicoderange article strong:lang(zh-CN) { - font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; -} -html:lang(ja), -[lang^="ja"], -article strong:lang(ja) { - font-family: "Yakumono Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; -} -html:lang(ja).no-unicoderange, -.no-unicoderange [lang^="ja"], -.no-unicoderange article strong:lang(ja) { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} -article blockquote i:lang(zh-Latn), -article blockquote var:lang(zh-Latn), -article blockquote i:lang(ja-Latn), -article blockquote var:lang(ja-Latn), -article blockquote i:not(:lang(zh)):not(:lang(ja)), -article blockquote var:not(:lang(zh)):not(:lang(ja)), -article blockquote i *:lang(zh-Latn), -article blockquote var *:lang(zh-Latn), -article blockquote i *:lang(ja-Latn), -article blockquote var *:lang(ja-Latn), -article blockquote i *:not(:lang(zh)):not(:lang(ja)), -article blockquote var *:not(:lang(zh)):not(:lang(ja)) { - font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; -} -article blockquote i:lang(zh), -article blockquote var:lang(zh), -article blockquote i:lang(zh-Hant), -article blockquote var:lang(zh-Hant) { - font-family: "Biaodian Pro Sans CNS", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Zhuyin Heiti", "Han Heiti", sans-serif; -} -.no-unicoderange article blockquote i:lang(zh), -.no-unicoderange article blockquote var:lang(zh), -.no-unicoderange article blockquote i:lang(zh-Hant), -.no-unicoderange article blockquote var:lang(zh-Hant) { - font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; -} -.no-unicoderange article blockquote i:lang(zh), -.no-unicoderange article blockquote var:lang(zh), -.no-unicoderange article blockquote i:lang(zh-Hant), -.no-unicoderange article blockquote var:lang(zh-Hant) { - font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; -} -article blockquote i:lang(zh-Hans), -article blockquote var:lang(zh-Hans), -article blockquote i:lang(zh-CN), -article blockquote var:lang(zh-CN) { - font-family: "Biaodian Pro Sans GB", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; -} -.no-unicoderange article blockquote i:lang(zh-Hans), -.no-unicoderange article blockquote var:lang(zh-Hans), -.no-unicoderange article blockquote i:lang(zh-CN), -.no-unicoderange article blockquote var:lang(zh-CN) { - font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; -} -article blockquote i:lang(ja), -article blockquote var:lang(ja) { - font-family: "Yakumono Sans", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; -} -.no-unicoderange article blockquote i:lang(ja), -.no-unicoderange article blockquote var:lang(ja) { - font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; -} -article figure blockquote:lang(zh-Latn), -article figure blockquote:lang(ja-Latn), -article figure blockquote:not(:lang(zh)):not(:lang(ja)), -article figure blockquote *:lang(zh-Latn), -article figure blockquote *:lang(ja-Latn), -article figure blockquote *:not(:lang(zh)):not(:lang(ja)) { - font-family: Georgia, "Times New Roman", "Han Songti", cursive, serif; -} -article figure blockquote:lang(zh), -article figure blockquote:lang(zh-Hant) { - font-family: "Biaodian Pro Serif CNS", "Numeral LF Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Songti", serif; -} -.no-unicoderange article figure blockquote:lang(zh), -.no-unicoderange article figure blockquote:lang(zh-Hant) { - font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Songti", serif; -} -article figure blockquote:lang(zh-Hans), -article figure blockquote:lang(zh-CN) { - font-family: "Biaodian Pro Serif GB", "Numeral LF Serif", Georgia, "Times New Roman", "Han Songti GB", serif; -} -.no-unicoderange article figure blockquote:lang(zh-Hans), -.no-unicoderange article figure blockquote:lang(zh-CN) { - font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Songti GB", serif; -} -article figure blockquote:lang(ja) { - font-family: "Yakumono Serif", "Numeral LF Serif", Georgia, "Times New Roman", serif; -} -.no-unicoderange article figure blockquote:lang(ja) { - font-family: "Numeral LF Serif", Georgia, "Times New Roman", serif; -} -article blockquote:lang(zh-Latn), -article blockquote:lang(ja-Latn), -article blockquote:not(:lang(zh)):not(:lang(ja)), -article blockquote *:lang(zh-Latn), -article blockquote *:lang(ja-Latn), -article blockquote *:not(:lang(zh)):not(:lang(ja)) { - font-family: Georgia, "Times New Roman", "Han Kaiti", cursive, serif; -} -article blockquote:lang(zh), -article blockquote:lang(zh-Hant) { - font-family: "Biaodian Pro Serif CNS", "Numeral LF Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Kaiti", cursive, serif; -} -.no-unicoderange article blockquote:lang(zh), -.no-unicoderange article blockquote:lang(zh-Hant) { - font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; -} -article blockquote:lang(zh-Hans), -article blockquote:lang(zh-CN) { - font-family: "Biaodian Pro Serif GB", "Numeral LF Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; -} -.no-unicoderange article blockquote:lang(zh-Hans), -.no-unicoderange article blockquote:lang(zh-CN) { - font-family: "Numeral LF Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; -} -article blockquote:lang(ja) { - font-family: "Yakumono Serif", "Numeral LF Serif", Georgia, "Times New Roman", cursive, serif; -} -.no-unicoderange article blockquote:lang(ja) { - font-family: "Numeral LF Serif", Georgia, "Times New Roman", cursive, serif; -} -i:lang(zh-Latn), -var:lang(zh-Latn), -i:lang(ja-Latn), -var:lang(ja-Latn), -i:not(:lang(zh)):not(:lang(ja)), -var:not(:lang(zh)):not(:lang(ja)), -i *:lang(zh-Latn), -var *:lang(zh-Latn), -i *:lang(ja-Latn), -var *:lang(ja-Latn), -i *:not(:lang(zh)):not(:lang(ja)), -var *:not(:lang(zh)):not(:lang(ja)) { - font-family: "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; -} -i:lang(zh), -var:lang(zh), -i:lang(zh-Hant), -var:lang(zh-Hant) { - font-family: "Biaodian Pro Serif CNS", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Zhuyin Kaiti", "Han Kaiti", cursive, serif; -} -.no-unicoderange i:lang(zh), -.no-unicoderange var:lang(zh), -.no-unicoderange i:lang(zh-Hant), -.no-unicoderange var:lang(zh-Hant) { - font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti", cursive, serif; -} -i:lang(zh-Hans), -var:lang(zh-Hans), -i:lang(zh-CN), -var:lang(zh-CN) { - font-family: "Biaodian Pro Serif GB", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; -} -.no-unicoderange i:lang(zh-Hans), -.no-unicoderange var:lang(zh-Hans), -.no-unicoderange i:lang(zh-CN), -.no-unicoderange var:lang(zh-CN) { - font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", "Han Kaiti GB", cursive, serif; -} -i:lang(ja), -var:lang(ja) { - font-family: "Yakumono Serif", "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", cursive, serif; -} -.no-unicoderange i:lang(ja), -.no-unicoderange var:lang(ja) { - font-family: "Numeral LF Italic Serif", "Latin Italic Serif", Georgia, "Times New Roman", cursive, serif; -} -code:lang(zh-Latn), -kbd:lang(zh-Latn), -samp:lang(zh-Latn), -pre:lang(zh-Latn), -code:lang(ja-Latn), -kbd:lang(ja-Latn), -samp:lang(ja-Latn), -pre:lang(ja-Latn), -code:not(:lang(zh)):not(:lang(ja)), -kbd:not(:lang(zh)):not(:lang(ja)), -samp:not(:lang(zh)):not(:lang(ja)), -pre:not(:lang(zh)):not(:lang(ja)), -code *:lang(zh-Latn), -kbd *:lang(zh-Latn), -samp *:lang(zh-Latn), -pre *:lang(zh-Latn), -code *:lang(ja-Latn), -kbd *:lang(ja-Latn), -samp *:lang(ja-Latn), -pre *:lang(ja-Latn), -code *:not(:lang(zh)):not(:lang(ja)), -kbd *:not(:lang(zh)):not(:lang(ja)), -samp *:not(:lang(zh)):not(:lang(ja)), -pre *:not(:lang(zh)):not(:lang(ja)) { - font-family: Menlo, Consolas, Courier, "Han Heiti", monospace, monospace, sans-serif; -} -code:lang(zh), -kbd:lang(zh), -samp:lang(zh), -pre:lang(zh), -code:lang(zh-Hant), -kbd:lang(zh-Hant), -samp:lang(zh-Hant), -pre:lang(zh-Hant) { - font-family: "Biaodian Pro Sans CNS", Menlo, Consolas, Courier, "Zhuyin Heiti", "Han Heiti", monospace, monospace, sans-serif; -} -.no-unicoderange code:lang(zh), -.no-unicoderange kbd:lang(zh), -.no-unicoderange samp:lang(zh), -.no-unicoderange pre:lang(zh), -.no-unicoderange code:lang(zh-Hant), -.no-unicoderange kbd:lang(zh-Hant), -.no-unicoderange samp:lang(zh-Hant), -.no-unicoderange pre:lang(zh-Hant) { - font-family: Menlo, Consolas, Courier, "Han Heiti", monospace, monospace, sans-serif; -} -code:lang(zh-Hans), -kbd:lang(zh-Hans), -samp:lang(zh-Hans), -pre:lang(zh-Hans), -code:lang(zh-CN), -kbd:lang(zh-CN), -samp:lang(zh-CN), -pre:lang(zh-CN) { - font-family: "Biaodian Pro Sans GB", Menlo, Consolas, Courier, "Han Heiti GB", monospace, monospace, sans-serif; -} -.no-unicoderange code:lang(zh-Hans), -.no-unicoderange kbd:lang(zh-Hans), -.no-unicoderange samp:lang(zh-Hans), -.no-unicoderange pre:lang(zh-Hans), -.no-unicoderange code:lang(zh-CN), -.no-unicoderange kbd:lang(zh-CN), -.no-unicoderange samp:lang(zh-CN), -.no-unicoderange pre:lang(zh-CN) { - font-family: Menlo, Consolas, Courier, "Han Heiti GB", monospace, monospace, sans-serif; -} -code:lang(ja), -kbd:lang(ja), -samp:lang(ja), -pre:lang(ja) { - font-family: "Yakumono Sans", Menlo, Consolas, Courier, monospace, monospace, sans-serif; -} -.no-unicoderange code:lang(ja), -.no-unicoderange kbd:lang(ja), -.no-unicoderange samp:lang(ja), -.no-unicoderange pre:lang(ja) { - font-family: Menlo, Consolas, Courier, monospace, monospace, sans-serif; -} -html, -.no-unicoderange h-char.bd-liga, -.no-unicoderange h-char[unicode="b7"], -ruby h-zhuyin, -h-ruby h-zhuyin, -ruby h-zhuyin h-diao, -h-ruby h-zhuyin h-diao, -ruby.romanization rt, -h-ruby.romanization rt, -ruby [annotation] rt, -h-ruby [annotation] rt { - -moz-font-feature-settings: "liga"; - -ms-font-feature-settings: "liga"; - -webkit-font-feature-settings: "liga"; - font-feature-settings: "liga"; -} -html, -[lang^="zh"], -[lang*="Hant"], -[lang="zh-TW"], -[lang="zh-HK"], -[lang*="Hans"], -[lang="zh-CN"], -article strong, -code, -kbd, -samp, -pre, -article blockquote i, -article blockquote var { - -moz-font-feature-settings: "liga=1, locl=0"; - -ms-font-feature-settings: "liga", "locl" 0; - -webkit-font-feature-settings: "liga", "locl" 0; - font-feature-settings: "liga", "locl" 0; -} -.no-unicoderange h-char.bd-cop:lang(zh-Hant), -.no-unicoderange h-char.bd-cop:lang(zh-TW), -.no-unicoderange h-char.bd-cop:lang(zh-HK) { - font-family: -apple-system, "Han Heiti CNS"; -} -.no-unicoderange h-char.bd-liga, -.no-unicoderange h-char[unicode="b7"] { - font-family: "Biaodian Basic", "Han Heiti"; -} -.no-unicoderange h-char[unicode="2018"]:lang(zh-Hans), -.no-unicoderange h-char[unicode="2019"]:lang(zh-Hans), -.no-unicoderange h-char[unicode="201c"]:lang(zh-Hans), -.no-unicoderange h-char[unicode="201d"]:lang(zh-Hans), -.no-unicoderange h-char[unicode="2018"]:lang(zh-CN), -.no-unicoderange h-char[unicode="2019"]:lang(zh-CN), -.no-unicoderange h-char[unicode="201c"]:lang(zh-CN), -.no-unicoderange h-char[unicode="201d"]:lang(zh-CN) { - font-family: "Han Heiti GB"; -} -i, -var { - font-style: inherit; -} -.no-unicoderange ruby h-zhuyin, -.no-unicoderange h-ruby h-zhuyin, -.no-unicoderange ruby h-zhuyin h-diao, -.no-unicoderange h-ruby h-zhuyin h-diao { - font-family: "Zhuyin Kaiti", cursive, serif; -} -ruby h-diao, -h-ruby h-diao { - font-family: "Zhuyin Kaiti", cursive, serif; -} -ruby.romanization rt, -h-ruby.romanization rt, -ruby [annotation] rt, -h-ruby [annotation] rt { - font-family: "Romanization Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; -} diff --git a/lib/Han/dist/han.js b/lib/Han/dist/han.js deleted file mode 100644 index 75976c6..0000000 --- a/lib/Han/dist/han.js +++ /dev/null @@ -1,3005 +0,0 @@ -/*! - * 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co - * Han.css: the CSS typography framework optimised for Hanzi - */ - -void function( global, factory ) { - - // CommonJS - if ( typeof module === 'object' && typeof module.exports === 'object' ) { - module.exports = factory( global, true ) - // AMD - } else if ( typeof define === 'function' && define.amd ) { - define(function() { return factory( global, true ) }) - // Global namespace - } else { - factory( global ) - } - -}( typeof window !== 'undefined' ? window : this, function( window, noGlobalNS ) { - -'use strict' - -var document = window.document - -var root = document.documentElement - -var body = document.body - -var VERSION = '3.3.0' - -var ROUTINE = [ - // Initialise the condition with feature-detecting - // classes (Modernizr-alike), binding onto the root - // element, possibly ``. - 'initCond', - - // Address element normalisation - 'renderElem', - - // Handle Biaodian - /* 'jinzify', */ - 'renderJiya', - 'renderHanging', - - // Address Biaodian correction - 'correctBiaodian', - - // Address Hanzi and Western script mixed spacing - 'renderHWS', - - // Address presentational correction to combining ligatures - 'substCombLigaWithPUA' - - // Address semantic correction to inaccurate characters - // **Note:** inactivated by default - /* 'substInaccurateChar', */ -] - -// Define Han -var Han = function( context, condition ) { - return new Han.fn.init( context, condition ) -} - -var init = function() { - if ( arguments[ 0 ] ) { - this.context = arguments[ 0 ] - } - if ( arguments[ 1 ] ) { - this.condition = arguments[ 1 ] - } - return this -} - -Han.version = VERSION - -Han.fn = Han.prototype = { - version: VERSION, - - constructor: Han, - - // Body as the default target context - context: body, - - // Root element as the default condition - condition: root, - - // Default rendering routine - routine: ROUTINE, - - init: init, - - setRoutine: function( routine ) { - if ( Array.isArray( routine )) { - this.routine = routine - } - return this - }, - - // Note that the routine set up here will execute - // only once. The method won't alter the routine in - // the instance or in the prototype chain. - render: function( routine ) { - var it = this - var routine = Array.isArray( routine ) - ? routine - : this.routine - - routine - .forEach(function( method ) { - if ( - typeof method === 'string' && - typeof it[ method ] === 'function' - ) { - it[ method ]() - } else if ( - Array.isArray( method ) && - typeof it[ method[0] ] === 'function' - ) { - it[ method.shift() ].apply( it, method ) - } - }) - return this - } -} - -Han.fn.init.prototype = Han.fn - -/** - * Shortcut for `render()` under the default - * situation. - * - * Once initialised, replace `Han.init` with the - * instance for future usage. - */ -Han.init = function() { - return Han.init = Han().render() -} - -var UNICODE = { - /** - * Western punctuation (西文標點符號) - */ - punct: { - base: '[\u2026,.;:!?\u203D_]', - sing: '[\u2010-\u2014\u2026]', - middle: '[\\\/~\\-&\u2010-\u2014_]', - open: '[\'"‘“\\(\\[\u00A1\u00BF\u2E18\u00AB\u2039\u201A\u201C\u201E]', - close: '[\'"”’\\)\\]\u00BB\u203A\u201B\u201D\u201F]', - end: '[\'"”’\\)\\]\u00BB\u203A\u201B\u201D\u201F\u203C\u203D\u2047-\u2049,.;:!?]', - }, - - /** - * CJK biaodian (CJK標點符號) - */ - biaodian: { - base: '[︰.、,。:;?!ー]', - liga: '[—…⋯]', - middle: '[·\/-゠\uFF06\u30FB\uFF3F]', - open: '[「『《〈(〔[{【〖]', - close: '[」』》〉)〕]}】〗]', - end: '[」』》〉)〕]}】〗︰.、,。:;?!ー]' - }, - - /** - * CJK-related blocks (CJK相關字符區段) - * - * 1. 中日韓統一意音文字:[\u4E00-\u9FFF] - Basic CJK unified ideographs - * 2. 擴展-A區:[\u3400-\u4DB5] - Extended-A - * 3. 擴展-B區:[\u20000-\u2A6D6]([\uD840-\uD869][\uDC00-\uDED6]) - Extended-B - * 4. 擴展-C區:[\u2A700-\u2B734](\uD86D[\uDC00-\uDF3F]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD869[\uDF00-\uDFFF]) - Extended-C - * 5. 擴展-D區:[\u2B740-\u2B81D](急用漢字,\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]) - Extended-D - * 6. 擴展-E區:[\u2B820-\u2F7FF](暫未支援) - Extended-E (not supported yet) - * 7. 擴展-F區(暫未支援) - Extended-F (not supported yet) - * 8. 筆畫區:[\u31C0-\u31E3] - Strokes - * 9. 意音數字「〇」:[\u3007] - Ideographic number zero - * 10. 相容意音文字及補充:[\uF900-\uFAFF][\u2F800-\u2FA1D](不使用) - Compatibility ideograph and supplement (not supported) - - 12 exceptions: - [\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29] - - https://zh.wikipedia.org/wiki/中日韓統一表意文字#cite_note-1 - - * 11. 康熙字典及簡化字部首:[\u2F00-\u2FD5\u2E80-\u2EF3] - Kangxi and supplement radicals - * 12. 意音文字描述字元:[\u2FF0-\u2FFA] - Ideographic description characters - */ - hanzi: { - base: '[\u4E00-\u9FFF\u3400-\u4DB5\u31C0-\u31E3\u3007\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD800-\uDBFF][\uDC00-\uDFFF]', - desc: '[\u2FF0-\u2FFA]', - radical: '[\u2F00-\u2FD5\u2E80-\u2EF3]' - }, - - /** - * Latin script blocks (拉丁字母區段) - * - * 1. 基本拉丁字母:A-Za-z - Basic Latin - * 2. 阿拉伯數字:0-9 - Digits - * 3. 補充-1:[\u00C0-\u00FF] - Latin-1 supplement - * 4. 擴展-A區:[\u0100-\u017F] - Extended-A - * 5. 擴展-B區:[\u0180-\u024F] - Extended-B - * 5. 擴展-C區:[\u2C60-\u2C7F] - Extended-C - * 5. 擴展-D區:[\uA720-\uA7FF] - Extended-D - * 6. 附加區:[\u1E00-\u1EFF] - Extended additional - * 7. 變音組字符:[\u0300-\u0341\u1DC0-\u1DFF] - Combining diacritical marks - */ - latin: { - base: '[A-Za-z0-9\u00C0-\u00FF\u0100-\u017F\u0180-\u024F\u2C60-\u2C7F\uA720-\uA7FF\u1E00-\u1EFF]', - combine: '[\u0300-\u0341\u1DC0-\u1DFF]' - }, - - /** - * Elli̱niká (Greek) script blocks (希臘字母區段) - * - * 1. 希臘字母及擴展:[\u0370–\u03FF\u1F00-\u1FFF] - Basic Greek & Greek Extended - * 2. 阿拉伯數字:0-9 - Digits - * 3. 希臘字母變音組字符:[\u0300-\u0345\u1DC0-\u1DFF] - Combining diacritical marks - */ - ellinika: { - base: '[0-9\u0370-\u03FF\u1F00-\u1FFF]', - combine: '[\u0300-\u0345\u1DC0-\u1DFF]' - }, - - /** - * Kirillica (Cyrillic) script blocks (西里爾字母區段) - * - * 1. 西里爾字母及補充:[\u0400-\u0482\u048A-\u04FF\u0500-\u052F] - Basic Cyrillic and supplement - * 2. 擴展B區:[\uA640-\uA66E\uA67E-\uA697] - Extended-B - * 3. 阿拉伯數字:0-9 - Digits - * 4. 西里爾字母組字符:[\u0483-\u0489\u2DE0-\u2DFF\uA66F-\uA67D\uA69F](位擴展A、B區) - Cyrillic combining diacritical marks (in extended-A, B) - */ - kirillica: { - base: '[0-9\u0400-\u0482\u048A-\u04FF\u0500-\u052F\uA640-\uA66E\uA67E-\uA697]', - combine: '[\u0483-\u0489\u2DE0-\u2DFF\uA66F-\uA67D\uA69F]' - }, - - /** - * Kana (假名) - * - * 1. 日文假名:[\u30A2\u30A4\u30A6\u30A8\u30AA-\u30FA\u3042\u3044\u3046\u3048\u304A-\u3094\u309F\u30FF] - Japanese Kana - * 2. 假名補充[\u1B000\u1B001](\uD82C[\uDC00-\uDC01]) - Kana supplement - * 3. 日文假名小寫:[\u3041\u3043\u3045\u3047\u3049\u30A1\u30A3\u30A5\u30A7\u30A9\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u31F0-\u31FF] - Japanese small Kana - * 4. 假名組字符:[\u3099-\u309C] - Kana combining characters - * 5. 半形假名:[\uFF66-\uFF9F] - Halfwidth Kana - * 6. 符號:[\u309D\u309E\u30FB-\u30FE] - Marks - */ - kana: { - base: '[\u30A2\u30A4\u30A6\u30A8\u30AA-\u30FA\u3042\u3044\u3046\u3048\u304A-\u3094\u309F\u30FF]|\uD82C[\uDC00-\uDC01]', - small: '[\u3041\u3043\u3045\u3047\u3049\u30A1\u30A3\u30A5\u30A7\u30A9\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u31F0-\u31FF]', - combine: '[\u3099-\u309C]', - half: '[\uFF66-\uFF9F]', - mark: '[\u30A0\u309D\u309E\u30FB-\u30FE]' - }, - - /** - * Eonmun (Hangul, 諺文) - * - * 1. 諺文音節:[\uAC00-\uD7A3] - Eonmun (Hangul) syllables - * 2. 諺文字母:[\u1100-\u11FF\u314F-\u3163\u3131-\u318E\uA960-\uA97C\uD7B0-\uD7FB] - Eonmun (Hangul) letters - * 3. 半形諺文字母:[\uFFA1-\uFFDC] - Halfwidth Eonmun (Hangul) letters - */ - eonmun: { - base: '[\uAC00-\uD7A3]', - letter: '[\u1100-\u11FF\u314F-\u3163\u3131-\u318E\uA960-\uA97C\uD7B0-\uD7FB]', - half: '[\uFFA1-\uFFDC]' - }, - - /** - * Zhuyin (注音符號, Mandarin & Dialect Phonetic Symbols) - * - * 1. 國語注音、方言音符號:[\u3105-\u312D][\u31A0-\u31BA] - Bopomofo phonetic symbols - * 2. 平上去聲調號:[\u02D9\u02CA\u02C5\u02C7\u02EA\u02EB\u02CB] (**註:**國語三聲包含乙個不合規範的符號) - Level, rising, departing tones - * 3. 入聲調號:[\u31B4-\u31B7][\u0358\u030d]? - Checked (entering) tones - */ - zhuyin: { - base: '[\u3105-\u312D\u31A0-\u31BA]', - initial: '[\u3105-\u3119\u312A-\u312C\u31A0-\u31A3]', - medial: '[\u3127-\u3129]', - final: '[\u311A-\u3129\u312D\u31A4-\u31B3\u31B8-\u31BA]', - tone: '[\u02D9\u02CA\u02C5\u02C7\u02CB\u02EA\u02EB]', - checked: '[\u31B4-\u31B7][\u0358\u030d]?' - } -} - -var TYPESET = (function() { - var rWhite = '[\\x20\\t\\r\\n\\f]' - // Whitespace characters - // http://www.w3.org/TR/css3-selectors/#whitespace - - var rPtOpen = UNICODE.punct.open - var rPtClose = UNICODE.punct.close - var rPtEnd = UNICODE.punct.end - var rPtMid = UNICODE.punct.middle - var rPtSing = UNICODE.punct.sing - var rPt = rPtOpen + '|' + rPtEnd + '|' + rPtMid - - var rBDOpen = UNICODE.biaodian.open - var rBDClose = UNICODE.biaodian.close - var rBDEnd = UNICODE.biaodian.end - var rBDMid = UNICODE.biaodian.middle - var rBDLiga = UNICODE.biaodian.liga + '{2}' - var rBD = rBDOpen + '|' + rBDEnd + '|' + rBDMid - - var rKana = UNICODE.kana.base + UNICODE.kana.combine + '?' - var rKanaS = UNICODE.kana.small + UNICODE.kana.combine + '?' - var rKanaH = UNICODE.kana.half - var rEon = UNICODE.eonmun.base + '|' + UNICODE.eonmun.letter - var rEonH = UNICODE.eonmun.half - - var rHan = UNICODE.hanzi.base + '|' + UNICODE.hanzi.desc + '|' + UNICODE.hanzi.radical + '|' + rKana - - var rCbn = UNICODE.ellinika.combine - var rLatn = UNICODE.latin.base + rCbn + '*' - var rGk = UNICODE.ellinika.base + rCbn + '*' - - var rCyCbn = UNICODE.kirillica.combine - var rCy = UNICODE.kirillica.base + rCyCbn + '*' - - var rAlph = rLatn + '|' + rGk + '|' + rCy - - // For words like `it's`, `Jones’s` or `'99` - var rApo = '[\u0027\u2019]' - var rChar = rHan + '|(?:' + rAlph + '|' + rApo + ')+' - - var rZyS = UNICODE.zhuyin.initial - var rZyJ = UNICODE.zhuyin.medial - var rZyY = UNICODE.zhuyin.final - var rZyD = UNICODE.zhuyin.tone + '|' + UNICODE.zhuyin.checked - - return { - /* Character-level selector (字級選擇器) - */ - char: { - punct: { - all: new RegExp( '(' + rPt + ')', 'g' ), - open: new RegExp( '(' + rPtOpen + ')', 'g' ), - end: new RegExp( '(' + rPtEnd + ')', 'g' ), - sing: new RegExp( '(' + rPtSing + ')', 'g' ) - }, - - biaodian: { - all: new RegExp( '(' + rBD + ')', 'g' ), - open: new RegExp( '(' + rBDOpen + ')', 'g' ), - close: new RegExp( '(' + rBDClose + ')', 'g' ), - end: new RegExp( '(' + rBDEnd + ')', 'g' ), - liga: new RegExp( '(' + rBDLiga + ')', 'g' ) - }, - - hanzi: new RegExp( '(' + rHan + ')', 'g' ), - - latin: new RegExp( '(' + rLatn + ')', 'ig' ), - ellinika: new RegExp( '(' + rGk + ')', 'ig' ), - kirillica: new RegExp( '(' + rCy + ')', 'ig' ), - - kana: new RegExp( '(' + rKana + '|' + rKanaS + '|' + rKanaH + ')', 'g' ), - eonmun: new RegExp( '(' + rEon + '|' + rEonH + ')', 'g' ) - }, - - /* Word-level selectors (詞級選擇器) - */ - group: { - biaodian: [ - new RegExp( '((' + rBD + '){2,})', 'g' ), - new RegExp( '(' + rBDLiga + rBDOpen + ')', 'g' ) - ], - punct: null, - hanzi: new RegExp( '(' + rHan + ')+', 'g' ), - western: new RegExp( '(' + rLatn + '|' + rGk + '|' + rCy + '|' + rPt + ')+', 'ig' ), - kana: new RegExp( '(' + rKana + '|' + rKanaS + '|' + rKanaH + ')+', 'g' ), - eonmun: new RegExp( '(' + rEon + '|' + rEonH + '|' + rPt + ')+', 'g' ) - }, - - /* Punctuation Rules (禁則) - */ - jinze: { - hanging: new RegExp( rWhite + '*([、,。.])(?!' + rBDEnd + ')', 'ig' ), - touwei: new RegExp( '(' + rBDOpen + '+)(' + rChar + ')(' + rBDEnd + '+)', 'ig' ), - tou: new RegExp( '(' + rBDOpen + '+)(' + rChar + ')', 'ig' ), - wei: new RegExp( '(' + rChar + ')(' + rBDEnd + '+)', 'ig' ), - middle: new RegExp( '(' + rChar + ')(' + rBDMid + ')(' + rChar + ')', 'ig' ) - }, - - zhuyin: { - form: new RegExp( '^\u02D9?(' + rZyS + ')?(' + rZyJ + ')?(' + rZyY + ')?(' + rZyD + ')?$' ), - diao: new RegExp( '(' + rZyD + ')', 'g' ) - }, - - /* Hanzi and Western mixed spacing (漢字西文混排間隙) - * - Basic mode - * - Strict mode - */ - hws: { - base: [ - new RegExp( '('+ rHan + ')(' + rAlph + '|' + rPtOpen + ')', 'ig' ), - new RegExp( '('+ rAlph + '|' + rPtEnd + ')(' + rHan + ')', 'ig' ) - ], - - strict: [ - new RegExp( '('+ rHan + ')' + rWhite + '?(' + rAlph + '|' + rPtOpen + ')', 'ig' ), - new RegExp( '('+ rAlph + '|' + rPtEnd + ')' + rWhite + '?(' + rHan + ')', 'ig' ) - ] - }, - - // The feature displays the following characters - // in its variant form for font consistency and - // presentational reason. Meanwhile, this won't - // alter the original character in the DOM. - 'display-as': { - 'ja-font-for-hant': [ - // '夠 够', - '查 査', - '啟 啓', - '鄉 鄕', - '值 値', - '污 汚' - ], - - 'comb-liga-pua': [ - [ '\u0061[\u030d\u0358]', '\uDB80\uDC61' ], - [ '\u0065[\u030d\u0358]', '\uDB80\uDC65' ], - [ '\u0069[\u030d\u0358]', '\uDB80\uDC69' ], - [ '\u006F[\u030d\u0358]', '\uDB80\uDC6F' ], - [ '\u0075[\u030d\u0358]', '\uDB80\uDC75' ], - - [ '\u31B4[\u030d\u0358]', '\uDB8C\uDDB4' ], - [ '\u31B5[\u030d\u0358]', '\uDB8C\uDDB5' ], - [ '\u31B6[\u030d\u0358]', '\uDB8C\uDDB6' ], - [ '\u31B7[\u030d\u0358]', '\uDB8C\uDDB7' ] - ], - - 'comb-liga-vowel': [ - [ '\u0061[\u030d\u0358]', '\uDB80\uDC61' ], - [ '\u0065[\u030d\u0358]', '\uDB80\uDC65' ], - [ '\u0069[\u030d\u0358]', '\uDB80\uDC69' ], - [ '\u006F[\u030d\u0358]', '\uDB80\uDC6F' ], - [ '\u0075[\u030d\u0358]', '\uDB80\uDC75' ] - ], - - 'comb-liga-zhuyin': [ - [ '\u31B4[\u030d\u0358]', '\uDB8C\uDDB4' ], - [ '\u31B5[\u030d\u0358]', '\uDB8C\uDDB5' ], - [ '\u31B6[\u030d\u0358]', '\uDB8C\uDDB6' ], - [ '\u31B7[\u030d\u0358]', '\uDB8C\uDDB7' ] - ] - }, - - // The feature actually *converts* the character - // in the DOM for semantic reason. - // - // Note that this could be aggressive. - 'inaccurate-char': [ - [ '[\u2022\u2027]', '\u00B7' ], - [ '\u22EF\u22EF', '\u2026\u2026' ], - [ '\u2500\u2500', '\u2014\u2014' ], - [ '\u2035', '\u2018' ], - [ '\u2032', '\u2019' ], - [ '\u2036', '\u201C' ], - [ '\u2033', '\u201D' ] - ] - } -})() - -Han.UNICODE = UNICODE -Han.TYPESET = TYPESET - -// Aliases -Han.UNICODE.cjk = Han.UNICODE.hanzi -Han.UNICODE.greek = Han.UNICODE.ellinika -Han.UNICODE.cyrillic = Han.UNICODE.kirillica -Han.UNICODE.hangul = Han.UNICODE.eonmun -Han.UNICODE.zhuyin.ruyun = Han.UNICODE.zhuyin.checked - -Han.TYPESET.char.cjk = Han.TYPESET.char.hanzi -Han.TYPESET.char.greek = Han.TYPESET.char.ellinika -Han.TYPESET.char.cyrillic = Han.TYPESET.char.kirillica -Han.TYPESET.char.hangul = Han.TYPESET.char.eonmun - -Han.TYPESET.group.hangul = Han.TYPESET.group.eonmun -Han.TYPESET.group.cjk = Han.TYPESET.group.hanzi - -var $ = { - /** - * Query selectors which return arrays of the resulted - * node lists. - */ - id: function( selector, $context ) { - return ( $context || document ).getElementById( selector ) - }, - - tag: function( selector, $context ) { - return this.makeArray( - ( $context || document ).getElementsByTagName( selector ) - ) - }, - - qs: function( selector, $context ) { - return ( $context || document ).querySelector( selector ) - }, - - qsa: function( selector, $context ) { - return this.makeArray( - ( $context || document ).querySelectorAll( selector ) - ) - }, - - parent: function( $node, selector ) { - return selector - ? (function() { - if ( typeof $.matches !== 'function' ) return - - while (!$.matches( $node, selector )) { - if ( - !$node || - $node === document.documentElement - ) { - $node = undefined - break - } - $node = $node.parentNode - } - return $node - })() - : $node - ? $node.parentNode : undefined - }, - - /** - * Create a document fragment, a text node with text - * or an element with/without classes. - */ - create: function( name, clazz ) { - var $elmt = '!' === name - ? document.createDocumentFragment() - : '' === name - ? document.createTextNode( clazz || '' ) - : document.createElement( name ) - - try { - if ( clazz ) { - $elmt.className = clazz - } - } catch (e) {} - - return $elmt - }, - - /** - * Clone a DOM node (text, element or fragment) deeply - * or childlessly. - */ - clone: function( $node, deep ) { - return $node.cloneNode( - typeof deep === 'boolean' - ? deep - : true - ) - }, - - /** - * Remove a node (text, element or fragment). - */ - remove: function( $node ) { - return $node.parentNode.removeChild( $node ) - }, - - /** - * Set attributes all in once with an object. - */ - setAttr: function( target, attr ) { - if ( typeof attr !== 'object' ) return - var len = attr.length - - // Native `NamedNodeMap``: - if ( - typeof attr[0] === 'object' && - 'name' in attr[0] - ) { - for ( var i = 0; i < len; i++ ) { - if ( attr[ i ].value !== undefined ) { - target.setAttribute( attr[ i ].name, attr[ i ].value ) - } - } - - // Plain object: - } else { - for ( var name in attr ) { - if ( - attr.hasOwnProperty( name ) && - attr[ name ] !== undefined - ) { - target.setAttribute( name, attr[ name ] ) - } - } - } - return target - }, - - /** - * Indicate whether or not the given node is an - * element. - */ - isElmt: function( $node ) { - return $node && $node.nodeType === Node.ELEMENT_NODE - }, - - /** - * Indicate whether or not the given node should - * be ignored (`` or comments). - */ - isIgnorable: function( $node ) { - if ( !$node ) return false - - return ( - $node.nodeName === 'WBR' || - $node.nodeType === Node.COMMENT_NODE - ) - }, - - /** - * Convert array-like objects into real arrays. - */ - makeArray: function( object ) { - return Array.prototype.slice.call( object ) - }, - - /** - * Extend target with an object. - */ - extend: function( target, object ) { - if (( - typeof target === 'object' || - typeof target === 'function' ) && - typeof object === 'object' - ) { - for ( var name in object ) { - if (object.hasOwnProperty( name )) { - target[ name ] = object[ name ] - } - } - } - return target - } -} - -var Fibre = -/*! - * Fibre.js v0.2.1 | MIT License | github.com/ethantw/fibre.js - * Based on findAndReplaceDOMText - */ - -function( Finder ) { - -'use strict' - -var VERSION = '0.2.1' -var NON_INLINE_PROSE = Finder.NON_INLINE_PROSE -var AVOID_NON_PROSE = Finder.PRESETS.prose.filterElements - -var global = window || {} -var document = global.document || undefined - -function matches( node, selector, bypassNodeType39 ) { - var Efn = Element.prototype - var matches = Efn.matches || Efn.mozMatchesSelector || Efn.msMatchesSelector || Efn.webkitMatchesSelector - - if ( node instanceof Element ) { - return matches.call( node, selector ) - } else if ( bypassNodeType39 ) { - if ( /^[39]$/.test( node.nodeType )) return true - } - return false -} - -if ( typeof document === 'undefined' ) throw new Error( 'Fibre requires a DOM-supported environment.' ) - -var Fibre = function( context, preset ) { - return new Fibre.fn.init( context, preset ) -} - -Fibre.version = VERSION -Fibre.matches = matches - -Fibre.fn = Fibre.prototype = { - constructor: Fibre, - - version: VERSION, - - finder: [], - - context: undefined, - - portionMode: 'retain', - - selector: {}, - - preset: 'prose', - - init: function( context, noPreset ) { - if ( !!noPreset ) this.preset = null - - this.selector = { - context: null, - filter: [], - avoid: [], - boundary: [] - } - - if ( !context ) { - throw new Error( 'A context is required for Fibre to initialise.' ) - } else if ( context instanceof Node ) { - if ( context instanceof Document ) this.context = context.body || context - else this.context = context - } else if ( typeof context === 'string' ) { - this.context = document.querySelector( context ) - this.selector.context = context - } - return this - }, - - filterFn: function( node ) { - var filter = this.selector.filter.join( ', ' ) || '*' - var avoid = this.selector.avoid.join( ', ' ) || null - var result = matches( node, filter, true ) && !matches( node, avoid ) - return ( this.preset === 'prose' ) ? AVOID_NON_PROSE( node ) && result : result - }, - - boundaryFn: function( node ) { - var boundary = this.selector.boundary.join( ', ' ) || null - var result = matches( node, boundary ) - return ( this.preset === 'prose' ) ? NON_INLINE_PROSE( node ) || result : result - }, - - filter: function( selector ) { - if ( typeof selector === 'string' ) { - this.selector.filter.push( selector ) - } - return this - }, - - endFilter: function( all ) { - if ( all ) { - this.selector.filter = [] - } else { - this.selector.filter.pop() - } - return this - }, - - avoid: function( selector ) { - if ( typeof selector === 'string' ) { - this.selector.avoid.push( selector ) - } - return this - }, - - endAvoid: function( all ) { - if ( all ) { - this.selector.avoid = [] - } else { - this.selector.avoid.pop() - } - return this - }, - - addBoundary: function( selector ) { - if ( typeof selector === 'string' ) { - this.selector.boundary.push( selector ) - } - return this - }, - - removeBoundary: function() { - this.selector.boundary = [] - return this - }, - - setMode: function( portionMode ) { - this.portionMode = portionMode === 'first' ? 'first' : 'retain' - return this - }, - - replace: function( regexp, newSubStr ) { - var it = this - it.finder.push(Finder( it.context, { - find: regexp, - replace: newSubStr, - filterElements: function( currentNode ) { - return it.filterFn( currentNode ) - }, - forceContext: function( currentNode ) { - return it.boundaryFn( currentNode ) - }, - portionMode: it.portionMode - })) - return it - }, - - wrap: function( regexp, strElemName ) { - var it = this - it.finder.push(Finder( it.context, { - find: regexp, - wrap: strElemName, - filterElements: function( currentNode ) { - return it.filterFn( currentNode ) - }, - forceContext: function( currentNode ) { - return it.boundaryFn( currentNode ) - }, - portionMode: it.portionMode - })) - return it - }, - - revert: function( level ) { - var max = this.finder.length - var level = Number( level ) || ( level === 0 ? Number(0) : - ( level === 'all' ? max : 1 )) - - if ( typeof max === 'undefined' || max === 0 ) return this - else if ( level > max ) level = max - - for ( var i = level; i > 0; i-- ) { - this.finder.pop().revert() - } - return this - } -} - -// Deprecated API(s) -Fibre.fn.filterOut = Fibre.fn.avoid - -// Make sure init() inherit from Fibre() -Fibre.fn.init.prototype = Fibre.fn - -return Fibre - -}( - -/** - * findAndReplaceDOMText v 0.4.3 - * @author James Padolsey http://james.padolsey.com - * @license http://unlicense.org/UNLICENSE - * - * Matches the text of a DOM node against a regular expression - * and replaces each match (or node-separated portions of the match) - * in the specified element. - */ - (function() { - - var PORTION_MODE_RETAIN = 'retain' - var PORTION_MODE_FIRST = 'first' - var doc = document - var toString = {}.toString - var hasOwn = {}.hasOwnProperty - function isArray(a) { - return toString.call(a) == '[object Array]' - } - - function escapeRegExp(s) { - return String(s).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') - } - - function exposed() { - // Try deprecated arg signature first: - return deprecated.apply(null, arguments) || findAndReplaceDOMText.apply(null, arguments) - } - - function deprecated(regex, node, replacement, captureGroup, elFilter) { - if ((node && !node.nodeType) && arguments.length <= 2) { - return false - } - var isReplacementFunction = typeof replacement == 'function' - if (isReplacementFunction) { - replacement = (function(original) { - return function(portion, match) { - return original(portion.text, match.startIndex) - } - }(replacement)) - } - - // Awkward support for deprecated argument signature (<0.4.0) - var instance = findAndReplaceDOMText(node, { - - find: regex, - - wrap: isReplacementFunction ? null : replacement, - replace: isReplacementFunction ? replacement : '$' + (captureGroup || '&'), - - prepMatch: function(m, mi) { - - // Support captureGroup (a deprecated feature) - - if (!m[0]) throw 'findAndReplaceDOMText cannot handle zero-length matches' - if (captureGroup > 0) { - var cg = m[captureGroup] - m.index += m[0].indexOf(cg) - m[0] = cg - } - - m.endIndex = m.index + m[0].length - m.startIndex = m.index - m.index = mi - return m - }, - filterElements: elFilter - }) - exposed.revert = function() { - return instance.revert() - } - return true - } - - /** - * findAndReplaceDOMText - * - * Locates matches and replaces with replacementNode - * - * @param {Node} node Element or Text node to search within - * @param {RegExp} options.find The regular expression to match - * @param {String|Element} [options.wrap] A NodeName, or a Node to clone - * @param {String|Function} [options.replace='$&'] What to replace each match with - * @param {Function} [options.filterElements] A Function to be called to check whether to - * process an element. (returning true = process element, - * returning false = avoid element) - */ - function findAndReplaceDOMText(node, options) { - return new Finder(node, options) - } - - exposed.NON_PROSE_ELEMENTS = { - br:1, hr:1, - // Media / Source elements: - script:1, style:1, img:1, video:1, audio:1, canvas:1, svg:1, map:1, object:1, - // Input elements - input:1, textarea:1, select:1, option:1, optgroup: 1, button:1 - } - exposed.NON_CONTIGUOUS_PROSE_ELEMENTS = { - - // Elements that will not contain prose or block elements where we don't - // want prose to be matches across element borders: - - // Block Elements - address:1, article:1, aside:1, blockquote:1, dd:1, div:1, - dl:1, fieldset:1, figcaption:1, figure:1, footer:1, form:1, h1:1, h2:1, h3:1, - h4:1, h5:1, h6:1, header:1, hgroup:1, hr:1, main:1, nav:1, noscript:1, ol:1, - output:1, p:1, pre:1, section:1, ul:1, - // Other misc. elements that are not part of continuous inline prose: - br:1, li: 1, summary: 1, dt:1, details:1, rp:1, rt:1, rtc:1, - // Media / Source elements: - script:1, style:1, img:1, video:1, audio:1, canvas:1, svg:1, map:1, object:1, - // Input elements - input:1, textarea:1, select:1, option:1, optgroup: 1, button:1, - // Table related elements: - table:1, tbody:1, thead:1, th:1, tr:1, td:1, caption:1, col:1, tfoot:1, colgroup:1 - - } - exposed.NON_INLINE_PROSE = function(el) { - return hasOwn.call(exposed.NON_CONTIGUOUS_PROSE_ELEMENTS, el.nodeName.toLowerCase()) - } - // Presets accessed via `options.preset` when calling findAndReplaceDOMText(): - exposed.PRESETS = { - prose: { - forceContext: exposed.NON_INLINE_PROSE, - filterElements: function(el) { - return !hasOwn.call(exposed.NON_PROSE_ELEMENTS, el.nodeName.toLowerCase()) - } - } - } - exposed.Finder = Finder - /** - * Finder -- encapsulates logic to find and replace. - */ - function Finder(node, options) { - - var preset = options.preset && exposed.PRESETS[options.preset] - options.portionMode = options.portionMode || PORTION_MODE_RETAIN - if (preset) { - for (var i in preset) { - if (hasOwn.call(preset, i) && !hasOwn.call(options, i)) { - options[i] = preset[i] - } - } - } - - this.node = node - this.options = options - // ENable match-preparation method to be passed as option: - this.prepMatch = options.prepMatch || this.prepMatch - this.reverts = [] - this.matches = this.search() - if (this.matches.length) { - this.processMatches() - } - - } - - Finder.prototype = { - - /** - * Searches for all matches that comply with the instance's 'match' option - */ - search: function() { - - var match - var matchIndex = 0 - var offset = 0 - var regex = this.options.find - var textAggregation = this.getAggregateText() - var matches = [] - var self = this - regex = typeof regex === 'string' ? RegExp(escapeRegExp(regex), 'g') : regex - matchAggregation(textAggregation) - function matchAggregation(textAggregation) { - for (var i = 0, l = textAggregation.length; i < l; ++i) { - - var text = textAggregation[i] - if (typeof text !== 'string') { - // Deal with nested contexts: (recursive) - matchAggregation(text) - continue - } - - if (regex.global) { - while (match = regex.exec(text)) { - matches.push(self.prepMatch(match, matchIndex++, offset)) - } - } else { - if (match = text.match(regex)) { - matches.push(self.prepMatch(match, 0, offset)) - } - } - - offset += text.length - } - } - - return matches - }, - - /** - * Prepares a single match with useful meta info: - */ - prepMatch: function(match, matchIndex, characterOffset) { - - if (!match[0]) { - throw new Error('findAndReplaceDOMText cannot handle zero-length matches') - } - - match.endIndex = characterOffset + match.index + match[0].length - match.startIndex = characterOffset + match.index - match.index = matchIndex - return match - }, - - /** - * Gets aggregate text within subject node - */ - getAggregateText: function() { - - var elementFilter = this.options.filterElements - var forceContext = this.options.forceContext - return getText(this.node) - /** - * Gets aggregate text of a node without resorting - * to broken innerText/textContent - */ - function getText(node, txt) { - - if (node.nodeType === 3) { - return [node.data] - } - - if (elementFilter && !elementFilter(node)) { - return [] - } - - var txt = [''] - var i = 0 - if (node = node.firstChild) do { - - if (node.nodeType === 3) { - txt[i] += node.data - continue - } - - var innerText = getText(node) - if ( - forceContext && - node.nodeType === 1 && - (forceContext === true || forceContext(node)) - ) { - txt[++i] = innerText - txt[++i] = '' - } else { - if (typeof innerText[0] === 'string') { - // Bridge nested text-node data so that they're - // not considered their own contexts: - // I.e. ['some', ['thing']] -> ['something'] - txt[i] += innerText.shift() - } - if (innerText.length) { - txt[++i] = innerText - txt[++i] = '' - } - } - } while (node = node.nextSibling) - return txt - } - - }, - - /** - * Steps through the target node, looking for matches, and - * calling replaceFn when a match is found. - */ - processMatches: function() { - - var matches = this.matches - var node = this.node - var elementFilter = this.options.filterElements - var startPortion, - endPortion, - innerPortions = [], - curNode = node, - match = matches.shift(), - atIndex = 0, // i.e. nodeAtIndex - matchIndex = 0, - portionIndex = 0, - doAvoidNode, - nodeStack = [node] - out: while (true) { - - if (curNode.nodeType === 3) { - - if (!endPortion && curNode.length + atIndex >= match.endIndex) { - - // We've found the ending - endPortion = { - node: curNode, - index: portionIndex++, - text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex), - indexInMatch: atIndex - match.startIndex, - indexInNode: match.startIndex - atIndex, // always zero for end-portions - endIndexInNode: match.endIndex - atIndex, - isEnd: true - } - } else if (startPortion) { - // Intersecting node - innerPortions.push({ - node: curNode, - index: portionIndex++, - text: curNode.data, - indexInMatch: atIndex - match.startIndex, - indexInNode: 0 // always zero for inner-portions - }) - } - - if (!startPortion && curNode.length + atIndex > match.startIndex) { - // We've found the match start - startPortion = { - node: curNode, - index: portionIndex++, - indexInMatch: 0, - indexInNode: match.startIndex - atIndex, - endIndexInNode: match.endIndex - atIndex, - text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex) - } - } - - atIndex += curNode.data.length - } - - doAvoidNode = curNode.nodeType === 1 && elementFilter && !elementFilter(curNode) - if (startPortion && endPortion) { - - curNode = this.replaceMatch(match, startPortion, innerPortions, endPortion) - // processMatches has to return the node that replaced the endNode - // and then we step back so we can continue from the end of the - // match: - - atIndex -= (endPortion.node.data.length - endPortion.endIndexInNode) - startPortion = null - endPortion = null - innerPortions = [] - match = matches.shift() - portionIndex = 0 - matchIndex++ - if (!match) { - break; // no more matches - } - - } else if ( - !doAvoidNode && - (curNode.firstChild || curNode.nextSibling) - ) { - // Move down or forward: - if (curNode.firstChild) { - nodeStack.push(curNode) - curNode = curNode.firstChild - } else { - curNode = curNode.nextSibling - } - continue - } - - // Move forward or up: - while (true) { - if (curNode.nextSibling) { - curNode = curNode.nextSibling - break - } - curNode = nodeStack.pop() - if (curNode === node) { - break out - } - } - - } - - }, - - /** - * Reverts ... TODO - */ - revert: function() { - // Reversion occurs backwards so as to avoid nodes subsequently - // replaced during the matching phase (a forward process): - for (var l = this.reverts.length; l--;) { - this.reverts[l]() - } - this.reverts = [] - }, - - prepareReplacementString: function(string, portion, match, matchIndex) { - var portionMode = this.options.portionMode - if ( - portionMode === PORTION_MODE_FIRST && - portion.indexInMatch > 0 - ) { - return '' - } - string = string.replace(/\$(\d+|&|`|')/g, function($0, t) { - var replacement - switch(t) { - case '&': - replacement = match[0] - break - case '`': - replacement = match.input.substring(0, match.startIndex) - break - case '\'': - replacement = match.input.substring(match.endIndex) - break - default: - replacement = match[+t] - } - return replacement - }) - if (portionMode === PORTION_MODE_FIRST) { - return string - } - - if (portion.isEnd) { - return string.substring(portion.indexInMatch) - } - - return string.substring(portion.indexInMatch, portion.indexInMatch + portion.text.length) - }, - - getPortionReplacementNode: function(portion, match, matchIndex) { - - var replacement = this.options.replace || '$&' - var wrapper = this.options.wrap - if (wrapper && wrapper.nodeType) { - // Wrapper has been provided as a stencil-node for us to clone: - var clone = doc.createElement('div') - clone.innerHTML = wrapper.outerHTML || new XMLSerializer().serializeToString(wrapper) - wrapper = clone.firstChild - } - - if (typeof replacement == 'function') { - replacement = replacement(portion, match, matchIndex) - if (replacement && replacement.nodeType) { - return replacement - } - return doc.createTextNode(String(replacement)) - } - - var el = typeof wrapper == 'string' ? doc.createElement(wrapper) : wrapper - replacement = doc.createTextNode( - this.prepareReplacementString( - replacement, portion, match, matchIndex - ) - ) - if (!replacement.data) { - return replacement - } - - if (!el) { - return replacement - } - - el.appendChild(replacement) - return el - }, - - replaceMatch: function(match, startPortion, innerPortions, endPortion) { - - var matchStartNode = startPortion.node - var matchEndNode = endPortion.node - var preceedingTextNode - var followingTextNode - if (matchStartNode === matchEndNode) { - - var node = matchStartNode - if (startPortion.indexInNode > 0) { - // Add `before` text node (before the match) - preceedingTextNode = doc.createTextNode(node.data.substring(0, startPortion.indexInNode)) - node.parentNode.insertBefore(preceedingTextNode, node) - } - - // Create the replacement node: - var newNode = this.getPortionReplacementNode( - endPortion, - match - ) - node.parentNode.insertBefore(newNode, node) - if (endPortion.endIndexInNode < node.length) { // ????? - // Add `after` text node (after the match) - followingTextNode = doc.createTextNode(node.data.substring(endPortion.endIndexInNode)) - node.parentNode.insertBefore(followingTextNode, node) - } - - node.parentNode.removeChild(node) - this.reverts.push(function() { - if (preceedingTextNode === newNode.previousSibling) { - preceedingTextNode.parentNode.removeChild(preceedingTextNode) - } - if (followingTextNode === newNode.nextSibling) { - followingTextNode.parentNode.removeChild(followingTextNode) - } - newNode.parentNode.replaceChild(node, newNode) - }) - return newNode - } else { - // Replace matchStartNode -> [innerMatchNodes...] -> matchEndNode (in that order) - - preceedingTextNode = doc.createTextNode( - matchStartNode.data.substring(0, startPortion.indexInNode) - ) - followingTextNode = doc.createTextNode( - matchEndNode.data.substring(endPortion.endIndexInNode) - ) - var firstNode = this.getPortionReplacementNode( - startPortion, - match - ) - var innerNodes = [] - for (var i = 0, l = innerPortions.length; i < l; ++i) { - var portion = innerPortions[i] - var innerNode = this.getPortionReplacementNode( - portion, - match - ) - portion.node.parentNode.replaceChild(innerNode, portion.node) - this.reverts.push((function(portion, innerNode) { - return function() { - innerNode.parentNode.replaceChild(portion.node, innerNode) - } - }(portion, innerNode))) - innerNodes.push(innerNode) - } - - var lastNode = this.getPortionReplacementNode( - endPortion, - match - ) - matchStartNode.parentNode.insertBefore(preceedingTextNode, matchStartNode) - matchStartNode.parentNode.insertBefore(firstNode, matchStartNode) - matchStartNode.parentNode.removeChild(matchStartNode) - matchEndNode.parentNode.insertBefore(lastNode, matchEndNode) - matchEndNode.parentNode.insertBefore(followingTextNode, matchEndNode) - matchEndNode.parentNode.removeChild(matchEndNode) - this.reverts.push(function() { - preceedingTextNode.parentNode.removeChild(preceedingTextNode) - firstNode.parentNode.replaceChild(matchStartNode, firstNode) - followingTextNode.parentNode.removeChild(followingTextNode) - lastNode.parentNode.replaceChild(matchEndNode, lastNode) - }) - return lastNode - } - } - - } - return exposed -}()) - -); - -var isNodeNormalizeNormal = (function() { - //// Disabled `Node.normalize()` for temp due to - //// issue below in IE11. - //// See: http://stackoverflow.com/questions/22337498/why-does-ie11-handle-node-normalize-incorrectly-for-the-minus-symbol - var div = $.create( 'div' ) - - div.appendChild($.create( '', '0-' )) - div.appendChild($.create( '', '2' )) - div.normalize() - - return div.firstChild.length !== 2 -})() - -function getFuncOrElmt( obj ) { - return ( - typeof obj === 'function' || - obj instanceof Element - ) - ? obj - : undefined -} - -function createBDGroup( portion ) { - var clazz = portion.index === 0 && portion.isEnd - ? 'biaodian cjk' - : 'biaodian cjk portion ' + ( - portion.index === 0 - ? 'is-first' - : portion.isEnd - ? 'is-end' - : 'is-inner' - ) - - var $elmt = $.create( 'h-char-group', clazz ) - $elmt.innerHTML = portion.text - return $elmt -} - -function createBDChar( char ) { - var div = $.create( 'div' ) - var unicode = char.charCodeAt( 0 ).toString( 16 ) - - div.innerHTML = ( - '' + char + '' - ) - return div.firstChild -} - -function getBDType( char ) { - return char.match( TYPESET.char.biaodian.open ) - ? 'bd-open' - : char.match( TYPESET.char.biaodian.close ) - ? 'bd-close bd-end' - : char.match( TYPESET.char.biaodian.end ) - ? ( - /(?:\u3001|\u3002|\uff0c)/i.test( char ) - ? 'bd-end bd-cop' - : 'bd-end' - ) - : char.match(new RegExp( UNICODE.biaodian.liga )) - ? 'bd-liga' - : char.match(new RegExp( UNICODE.biaodian.middle )) - ? 'bd-middle' - : '' -} - -$.extend( Fibre.fn, { - normalize: function() { - if ( isNodeNormalizeNormal ) { - this.context.normalize() - } - return this - }, - - // Force punctuation & biaodian typesetting rules to be applied. - jinzify: function( selector ) { - return ( - this - .filter( selector || null ) - .avoid( 'h-jinze' ) - .replace( - TYPESET.jinze.touwei, - function( portion, match ) { - var elem = $.create( 'h-jinze', 'touwei' ) - elem.innerHTML = match[0] - return (( portion.index === 0 && portion.isEnd ) || portion.index === 1 ) ? elem : '' - } - ) - .replace( - TYPESET.jinze.wei, - function( portion, match ) { - var elem = $.create( 'h-jinze', 'wei' ) - elem.innerHTML = match[0] - return portion.index === 0 ? elem : '' - } - ) - .replace( - TYPESET.jinze.tou, - function( portion, match ) { - var elem = $.create( 'h-jinze', 'tou' ) - elem.innerHTML = match[0] - return (( portion.index === 0 && portion.isEnd ) || portion.index === 1 ) - ? elem : '' - } - ) - .replace( - TYPESET.jinze.middle, - function( portion, match ) { - var elem = $.create( 'h-jinze', 'middle' ) - elem.innerHTML = match[0] - return (( portion.index === 0 && portion.isEnd ) || portion.index === 1 ) - ? elem : '' - } - ) - .endAvoid() - .endFilter() - ) - }, - - groupify: function( option ) { - var option = $.extend({ - biaodian: false, - //punct: false, - hanzi: false, // Includes Kana - kana: false, - eonmun: false, - western: false // Includes Latin, Greek and Cyrillic - }, option || {}) - - this.avoid( 'h-word, h-char-group' ) - - if ( option.biaodian ) { - this.replace( - TYPESET.group.biaodian[0], createBDGroup - ).replace( - TYPESET.group.biaodian[1], createBDGroup - ) - } - - if ( option.hanzi || option.cjk ) { - this.wrap( - TYPESET.group.hanzi, $.clone($.create( 'h-char-group', 'hanzi cjk' )) - ) - } - if ( option.western ) { - this.wrap( - TYPESET.group.western, $.clone($.create( 'h-word', 'western' )) - ) - } - if ( option.kana ) { - this.wrap( - TYPESET.group.kana, $.clone($.create( 'h-char-group', 'kana' )) - ) - } - if ( option.eonmun || option.hangul ) { - this.wrap( - TYPESET.group.eonmun, $.clone($.create( 'h-word', 'eonmun hangul' )) - ) - } - - this.endAvoid() - return this - }, - - charify: function( option ) { - var option = $.extend({ - avoid: true, - biaodian: false, - punct: false, - hanzi: false, // Includes Kana - latin: false, - ellinika: false, - kirillica: false, - kana: false, - eonmun: false - }, option || {}) - - if ( option.avoid ) { - this.avoid( 'h-char' ) - } - - if ( option.biaodian ) { - this.replace( - TYPESET.char.biaodian.all, - getFuncOrElmt( option.biaodian ) - || - function( portion ) { return createBDChar( portion.text ) } - ).replace( - TYPESET.char.biaodian.liga, - getFuncOrElmt( option.biaodian ) - || - function( portion ) { return createBDChar( portion.text ) } - ) - } - if ( option.hanzi || option.cjk ) { - this.wrap( - TYPESET.char.hanzi, - getFuncOrElmt( option.hanzi || option.cjk ) - || - $.clone($.create( 'h-char', 'hanzi cjk' )) - ) - } - if ( option.punct ) { - this.wrap( - TYPESET.char.punct.all, - getFuncOrElmt( option.punct ) - || - $.clone($.create( 'h-char', 'punct' )) - ) - } - if ( option.latin ) { - this.wrap( - TYPESET.char.latin, - getFuncOrElmt( option.latin ) - || - $.clone($.create( 'h-char', 'alphabet latin' )) - ) - } - if ( option.ellinika || option.greek ) { - this.wrap( - TYPESET.char.ellinika, - getFuncOrElmt( option.ellinika || option.greek ) - || - $.clone($.create( 'h-char', 'alphabet ellinika greek' )) - ) - } - if ( option.kirillica || option.cyrillic ) { - this.wrap( - TYPESET.char.kirillica, - getFuncOrElmt( option.kirillica || option.cyrillic ) - || - $.clone($.create( 'h-char', 'alphabet kirillica cyrillic' )) - ) - } - if ( option.kana ) { - this.wrap( - TYPESET.char.kana, - getFuncOrElmt( option.kana ) - || - $.clone($.create( 'h-char', 'kana' )) - ) - } - if ( option.eonmun || option.hangul ) { - this.wrap( - TYPESET.char.eonmun, - getFuncOrElmt( option.eonmun || option.hangul ) - || - $.clone($.create( 'h-char', 'eonmun hangul' )) - ) - } - - this.endAvoid() - return this - } -}) - -$.extend( Han, { - isNodeNormalizeNormal: isNodeNormalizeNormal, - find: Fibre, - createBDGroup: createBDGroup, - createBDChar: createBDChar -}) - -$.matches = Han.find.matches - -void [ - 'setMode', - 'wrap', 'replace', 'revert', - 'addBoundary', 'removeBoundary', - 'avoid', 'endAvoid', - 'filter', 'endFilter', - 'jinzify', 'groupify', 'charify' -].forEach(function( method ) { - Han.fn[ method ] = function() { - if ( !this.finder ) { - // Share the same selector - this.finder = Han.find( this.context ) - } - - this.finder[ method ]( arguments[ 0 ], arguments[ 1 ] ) - return this - } -}) - -var Locale = {} - -function writeOnCanvas( text, font ) { - var canvas = $.create( 'canvas' ) - var context - - canvas.width = '50' - canvas.height = '20' - canvas.style.display = 'none' - - body.appendChild( canvas ) - - context = canvas.getContext( '2d' ) - context.textBaseline = 'top' - context.font = '15px ' + font + ', sans-serif' - context.fillStyle = 'black' - context.strokeStyle = 'black' - context.fillText( text, 0, 0 ) - - return { - node: canvas, - context: context, - remove: function() { - $.remove( canvas, body ) - } - } -} - -function compareCanvases( treat, control ) { - var ret - var a = treat.context - var b = control.context - - try { - for ( var j = 1; j <= 20; j++ ) { - for ( var i = 1; i <= 50; i++ ) { - if ( - typeof ret === 'undefined' && - a.getImageData(i, j, 1, 1).data[3] !== b.getImageData(i, j, 1, 1).data[3] - ) { - ret = false - break - } else if ( typeof ret === 'boolean' ) { - break - } - - if ( i === 50 && j === 20 && typeof ret === 'undefined' ) { - ret = true - } - } - } - - // Remove and clean from memory - treat.remove() - control.remove() - treat = null - control = null - - return ret - } catch (e) {} - return false -} - -function detectFont( treat, control, text ) { - var treat = treat - var control = control || 'sans-serif' - var text = text || '辭Q' - var ret - - control = writeOnCanvas( text, control ) - treat = writeOnCanvas( text, treat ) - - return !compareCanvases( treat, control ) -} - -Locale.writeOnCanvas = writeOnCanvas -Locale.compareCanvases = compareCanvases -Locale.detectFont = detectFont - -Locale.support = (function() { - - var PREFIX = 'Webkit Moz ms'.split(' ') - - // Create an element for feature detecting - // (in `testCSSProp`) - var elem = $.create( 'h-test' ) - - function testCSSProp( prop ) { - var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1) - var allProp = ( prop + ' ' + PREFIX.join( ucProp + ' ' ) + ucProp ).split(' ') - var ret - - allProp.forEach(function( prop ) { - if ( typeof elem.style[ prop ] === 'string' ) { - ret = true - } - }) - return ret || false - } - - function injectElementWithStyle( rule, callback ) { - var fakeBody = body || $.create( 'body' ) - var div = $.create( 'div' ) - var container = body ? div : fakeBody - var callback = typeof callback === 'function' ? callback : function() {} - var style, ret, docOverflow - - style = [ '' ].join('') - - container.innerHTML += style - fakeBody.appendChild( div ) - - if ( !body ) { - fakeBody.style.background = '' - fakeBody.style.overflow = 'hidden' - docOverflow = root.style.overflow - - root.style.overflow = 'hidden' - root.appendChild( fakeBody ) - } - - // Callback - ret = callback( container, rule ) - - // Remove the injected scope - $.remove( container ) - if ( !body ) { - root.style.overflow = docOverflow - } - return !!ret - } - - function getStyle( elem, prop ) { - var ret - - if ( window.getComputedStyle ) { - ret = document.defaultView.getComputedStyle( elem, null ).getPropertyValue( prop ) - } else if ( elem.currentStyle ) { - // for IE - ret = elem.currentStyle[ prop ] - } - return ret - } - - return { - columnwidth: testCSSProp( 'columnWidth' ), - - fontface: (function() { - var ret - - injectElementWithStyle( - '@font-face { font-family: font; src: url("//"); }', - function( node, rule ) { - var style = $.qsa( 'style', node )[0] - var sheet = style.sheet || style.styleSheet - var cssText = sheet ? - ( sheet.cssRules && sheet.cssRules[0] ? - sheet.cssRules[0].cssText : sheet.cssText || '' - ) : '' - - ret = /src/i.test( cssText ) && - cssText.indexOf( rule.split(' ')[0] ) === 0 - } - ) - - return ret - })(), - - ruby: (function() { - var ruby = $.create( 'ruby' ) - var rt = $.create( 'rt' ) - var rp = $.create( 'rp' ) - var ret - - ruby.appendChild( rp ) - ruby.appendChild( rt ) - root.appendChild( ruby ) - - // Browsers that support ruby hide the `` via `display: none` - ret = ( - getStyle( rp, 'display' ) === 'none' || - // but in IE, `` has `display: inline`, so the test needs other conditions: - getStyle( ruby, 'display' ) === 'ruby' && - getStyle( rt, 'display' ) === 'ruby-text' - ) ? true : false - - // Remove and clean from memory - root.removeChild( ruby ) - ruby = null - rt = null - rp = null - - return ret - })(), - - 'ruby-display': (function() { - var div = $.create( 'div' ) - - div.innerHTML = '' - return div.querySelector( 'h-test-a' ).style.display === 'ruby' && div.querySelector( 'h-test-b' ).style.display === 'ruby-text-container' - })(), - - 'ruby-interchar': (function() { - var IC = 'inter-character' - var div = $.create( 'div' ) - var css - - div.innerHTML = '' - css = div.querySelector( 'h-test' ).style - return css.rubyPosition === IC || css.WebkitRubyPosition === IC || css.MozRubyPosition === IC || css.msRubyPosition === IC - })(), - - textemphasis: testCSSProp( 'textEmphasis' ), - - // Address feature support test for `unicode-range` via - // detecting whether it's Arial (supported) or - // Times New Roman (not supported). - unicoderange: (function() { - var ret - - injectElementWithStyle( - '@font-face{font-family:test-for-unicode-range;src:local(Arial),local("Droid Sans")}@font-face{font-family:test-for-unicode-range;src:local("Times New Roman"),local(Times),local("Droid Serif");unicode-range:U+270C}', - function() { - ret = !Locale.detectFont( - 'test-for-unicode-range', // treatment group - 'Arial, "Droid Sans"', // control group - 'Q' // ASCII characters only - ) - } - ) - return ret - })(), - - writingmode: testCSSProp( 'writingMode' ) - } -})() - -Locale.initCond = function( target ) { - var target = target || root - var ret = '' - var clazz - - for ( var feature in Locale.support ) { - clazz = ( Locale.support[ feature ] ? '' : 'no-' ) + feature - - target.classList.add( clazz ) - ret += clazz + ' ' - } - return ret -} - -var SUPPORT_IC = Locale.support[ 'ruby-interchar' ] - -// 1. Simple ruby polyfill; -// 2. Inter-character polyfill for Zhuyin -function renderSimpleRuby( $ruby ) { - var frag = $.create( '!' ) - var clazz = $ruby.classList - var $rb, $ru - - frag.appendChild( $.clone( $ruby )) - - $ - .tag( 'rt', frag.firstChild ) - .forEach(function( $rt ) { - var $rb = $.create( '!' ) - var airb = [] - var irb - - // Consider the previous nodes the implied - // ruby base - do { - irb = ( irb || $rt ).previousSibling - if ( !irb || irb.nodeName.match( /((?:h\-)?r[ubt])/i )) break - - $rb.insertBefore( $.clone( irb ), $rb.firstChild ) - airb.push( irb ) - } while ( !irb.nodeName.match( /((?:h\-)?r[ubt])/i )) - - // Create a real `` to append. - $ru = clazz.contains( 'zhuyin' ) ? createZhuyinRu( $rb, $rt ) : createNormalRu( $rb, $rt ) - - // Replace the ruby text with the new ``, - // and remove the original implied ruby base(s) - try { - $rt.parentNode.replaceChild( $ru, $rt ) - airb.map( $.remove ) - } catch ( e ) {} - }) - return createCustomRuby( frag ) -} - -function renderInterCharRuby( $ruby ) { - var frag = $.create( '!' ) - frag.appendChild( $.clone( $ruby )) - - $ - .tag( 'rt', frag.firstChild ) - .forEach(function( $rt ) { - var $rb = $.create( '!' ) - var airb = [] - var irb, $zhuyin - - // Consider the previous nodes the implied - // ruby base - do { - irb = ( irb || $rt ).previousSibling - if ( !irb || irb.nodeName.match( /((?:h\-)?r[ubt])/i )) break - - $rb.insertBefore( $.clone( irb ), $rb.firstChild ) - airb.push( irb ) - } while ( !irb.nodeName.match( /((?:h\-)?r[ubt])/i )) - - $zhuyin = $.create( 'rt' ) - $zhuyin.innerHTML = getZhuyinHTML( $rt ) - $rt.parentNode.replaceChild( $zhuyin, $rt ) - }) - return frag.firstChild -} - -// 3. Complex ruby polyfill -// - Double-lined annotation; -// - Right-angled annotation. -function renderComplexRuby( $ruby ) { - var frag = $.create( '!' ) - var clazz = $ruby.classList - var $cloned, $rb, $ru, maxspan - - frag.appendChild( $.clone( $ruby )) - $cloned = frag.firstChild - - $rb = $ru = $.tag( 'rb', $cloned ) - maxspan = $rb.length - - // First of all, deal with Zhuyin containers - // individually - // - // Note that we only support one single Zhuyin - // container in each complex ruby - void function( $rtc ) { - if ( !$rtc ) return - - $ru = $ - .tag( 'rt', $rtc ) - .map(function( $rt, i ) { - if ( !$rb[ i ] ) return - var ret = createZhuyinRu( $rb[ i ], $rt ) - - try { - $rb[ i ].parentNode.replaceChild( ret, $rb[ i ] ) - } catch ( e ) {} - return ret - }) - - // Remove the container once it's useless - $.remove( $rtc ) - $cloned.setAttribute( 'rightangle', 'true' ) - }( $cloned.querySelector( 'rtc.zhuyin' )) - - // Then, normal annotations other than Zhuyin - $ - .qsa( 'rtc:not(.zhuyin)', $cloned ) - .forEach(function( $rtc, order ) { - var ret - ret = $ - .tag( 'rt', $rtc ) - .map(function( $rt, i ) { - var rbspan = Number( $rt.getAttribute( 'rbspan' ) || 1 ) - var span = 0 - var aRb = [] - var $rb, ret - - if ( rbspan > maxspan ) rbspan = maxspan - - do { - try { - $rb = $ru.shift() - aRb.push( $rb ) - } catch (e) {} - - if ( typeof $rb === 'undefined' ) break - span += Number( $rb.getAttribute( 'span' ) || 1 ) - } while ( rbspan > span ) - - if ( rbspan < span ) { - if ( aRb.length > 1 ) { - console.error( 'An impossible `rbspan` value detected.', ruby ) - return - } - aRb = $.tag( 'rb', aRb[0] ) - $ru = aRb.slice( rbspan ).concat( $ru ) - aRb = aRb.slice( 0, rbspan ) - span = rbspan - } - - ret = createNormalRu( aRb, $rt, { - 'class': clazz, - span: span, - order: order - }) - - try { - aRb[0].parentNode.replaceChild( ret, aRb.shift() ) - aRb.map( $.remove ) - } catch (e) {} - return ret - }) - $ru = ret - if ( order === 1 ) $cloned.setAttribute( 'doubleline', 'true' ) - - // Remove the container once it's useless - $.remove( $rtc ) - }) - return createCustomRuby( frag ) -} - -// Create a new fake `` element so the -// style sheets will render it as a polyfill, -// which also helps to avoid the UA style. -function createCustomRuby( frag ) { - var $ruby = frag.firstChild - var hruby = $.create( 'h-ruby' ) - - hruby.innerHTML = $ruby.innerHTML - $.setAttr( hruby, $ruby.attributes ) - hruby.normalize() - return hruby -} - -function simplifyRubyClass( elem ) { - if ( !elem instanceof Element ) return elem - var clazz = elem.classList - - if ( clazz.contains( 'pinyin' )) clazz.add( 'romanization' ) - else if ( clazz.contains( 'romanization' )) clazz.add( 'annotation' ) - else if ( clazz.contains( 'mps' )) clazz.add( 'zhuyin' ) - else if ( clazz.contains( 'rightangle' )) clazz.add( 'complex' ) - return elem -} - -/** - * Create and return a new `` element - * according to the given contents - */ -function createNormalRu( $rb, $rt, attr ) { - var $ru = $.create( 'h-ru' ) - var $rt = $.clone( $rt ) - var attr = attr || {} - attr.annotation = 'true' - - if ( Array.isArray( $rb )) { - $ru.innerHTML = $rb.map(function( rb ) { - if ( typeof rb === 'undefined' ) return '' - return rb.outerHTML - }).join('') + $rt.outerHTML - } else { - $ru.appendChild( $.clone( $rb )) - $ru.appendChild( $rt ) - } - - $.setAttr( $ru, attr ) - return $ru -} - -/** - * Create and return a new `` element - * in Zhuyin form - */ -function createZhuyinRu( $rb, $rt ) { - var $rb = $.clone( $rb ) - - // Create an element to return - var $ru = $.create( 'h-ru' ) - $ru.setAttribute( 'zhuyin', true ) - - // - - // - - // - - // - - // - - // - - // - - $ru.appendChild( $rb ) - $ru.innerHTML += getZhuyinHTML( $rt ) - return $ru -} - -/** - * Create a Zhuyin-form HTML string - */ -function getZhuyinHTML( rt ) { - // #### Explanation #### - // * `zhuyin`: the entire phonetic annotation - // * `yin`: the plain pronunciation (w/out tone) - // * `diao`: the tone - // * `len`: the length of the plain pronunciation (`yin`) - var zhuyin = typeof rt === 'string' ? rt : rt.textContent - var yin, diao, len - - yin = zhuyin.replace( TYPESET.zhuyin.diao, '' ) - len = yin ? yin.length : 0 - diao = zhuyin - .replace( yin, '' ) - .replace( /[\u02C5]/g, '\u02C7' ) - .replace( /[\u030D]/g, '\u0358' ) - return len === 0 ? '' : '' + yin + '' + diao + '' -} - -/** - * Normalize `ruby` elements - */ -$.extend( Locale, { - - // Address normalisation for both simple and complex - // rubies (interlinear annotations) - renderRuby: function( context, target ) { - var target = target || 'ruby' - var $target = $.qsa( target, context ) - - $.qsa( 'rtc', context ) - .concat( $target ).map( simplifyRubyClass ) - - $target - .forEach(function( $ruby ) { - var clazz = $ruby.classList - var $new - - if ( clazz.contains( 'complex' )) $new = renderComplexRuby( $ruby ) - else if ( clazz.contains( 'zhuyin' )) $new = SUPPORT_IC ? renderInterCharRuby( $ruby ) : renderSimpleRuby( $ruby ) - - // Finally, replace it - if ( $new ) $ruby.parentNode.replaceChild( $new, $ruby ) - }) - }, - - simplifyRubyClass: simplifyRubyClass, - getZhuyinHTML: getZhuyinHTML, - renderComplexRuby: renderComplexRuby, - renderSimpleRuby: renderSimpleRuby, - renderInterCharRuby: renderInterCharRuby - - // ### TODO list ### - // - // * Debug mode - // * Better error-tolerance -}) - -/** - * Normalisation rendering mechanism - */ -$.extend( Locale, { - - // Render and normalise the given context by routine: - // - // ruby -> u, ins -> s, del -> em - // - renderElem: function( context ) { - this.renderRuby( context ) - this.renderDecoLine( context ) - this.renderDecoLine( context, 's, del' ) - this.renderEm( context ) - }, - - // Traverse all target elements and address - // presentational corrections if any two of - // them are adjacent to each other. - renderDecoLine: function( context, target ) { - var $$target = $.qsa( target || 'u, ins', context ) - var i = $$target.length - - traverse: while ( i-- ) { - var $this = $$target[ i ] - var $prev = null - - // Ignore all `` and comments in between, - // and add class `.adjacent` once two targets - // are next to each other. - ignore: do { - $prev = ( $prev || $this ).previousSibling - - if ( !$prev ) { - continue traverse - } else if ( $$target[ i-1 ] === $prev ) { - $this.classList.add( 'adjacent' ) - } - } while ( $.isIgnorable( $prev )) - } - }, - - // Traverse all target elements to render - // emphasis marks. - renderEm: function( context, target ) { - var method = target ? 'qsa' : 'tag' - var target = target || 'em' - var $target = $[ method ]( target, context ) - - $target - .forEach(function( elem ) { - var $elem = Han( elem ) - - if ( Locale.support.textemphasis ) { - $elem - .avoid( 'rt, h-char' ) - .charify({ biaodian: true, punct: true }) - } else { - $elem - .avoid( 'rt, h-char, h-char-group' ) - .jinzify() - .groupify({ western: true }) - .charify({ - hanzi: true, - biaodian: true, - punct: true, - latin: true, - ellinika: true, - kirillica: true - }) - } - }) - } -}) - -Han.normalize = Locale -Han.localize = Locale -Han.support = Locale.support -Han.detectFont = Locale.detectFont - -Han.fn.initCond = function() { - this.condition.classList.add( 'han-js-rendered' ) - Han.normalize.initCond( this.condition ) - return this -} - -void [ - 'Elem', - 'DecoLine', - 'Em', - 'Ruby' -].forEach(function( elem ) { - var method = 'render' + elem - - Han.fn[ method ] = function( target ) { - Han.normalize[ method ]( this.context, target ) - return this - } -}) - -$.extend( Han.support, { - // Assume that all devices support Heiti for we - // use `sans-serif` to do the comparison. - heiti: true, - // 'heiti-gb': true, - - songti: Han.detectFont( '"Han Songti"' ), - 'songti-gb': Han.detectFont( '"Han Songti GB"' ), - - kaiti: Han.detectFont( '"Han Kaiti"' ), - // 'kaiti-gb': Han.detectFont( '"Han Kaiti GB"' ), - - fangsong: Han.detectFont( '"Han Fangsong"' ) - // 'fangsong-gb': Han.detectFont( '"Han Fangsong GB"' ) -}) - -Han.correctBiaodian = function( context ) { - var context = context || document - var finder = Han.find( context ) - - finder - .avoid( 'h-char' ) - .replace( /([‘“])/g, function( portion ) { - var $char = Han.createBDChar( portion.text ) - $char.classList.add( 'bd-open', 'punct' ) - return $char - }) - .replace( /([’”])/g, function( portion ) { - var $char = Han.createBDChar( portion.text ) - $char.classList.add( 'bd-close', 'bd-end', 'punct' ) - return $char - }) - - return Han.support.unicoderange - ? finder - : finder.charify({ biaodian: true }) -} - -Han.correctBasicBD = Han.correctBiaodian -Han.correctBD = Han.correctBiaodian - -$.extend( Han.fn, { - biaodian: null, - - correctBiaodian: function() { - this.biaodian = Han.correctBiaodian( this.context ) - return this - }, - - revertCorrectedBiaodian: function() { - try { - this.biaodian.revert( 'all' ) - } catch (e) {} - return this - } -}) - -// Legacy support (deprecated): -Han.fn.correctBasicBD = Han.fn.correctBiaodian -Han.fn.revertBasicBD = Han.fn.revertCorrectedBiaodian - -var hws = '<>' - -var $hws = $.create( 'h-hws' ) -$hws.setAttribute( 'hidden', '' ) -$hws.innerHTML = ' ' - -function sharingSameParent( $a, $b ) { - return $a && $b && $a.parentNode === $b.parentNode -} - -function properlyPlaceHWSBehind( $node, text ) { - var $elmt = $node - var text = text || '' - - if ( - $.isElmt( $node.nextSibling ) || - sharingSameParent( $node, $node.nextSibling ) - ) { - return text + hws - } else { - // One of the parental elements of the current text - // node would definitely have a next sibling, since - // it is of the first portion and not `isEnd`. - while ( !$elmt.nextSibling ) { - $elmt = $elmt.parentNode - } - if ( $node !== $elmt ) { - $elmt.insertAdjacentHTML( 'afterEnd', '' ) - } - } - return text -} - -function firstStepLabel( portion, mat ) { - return portion.isEnd && portion.index === 0 - ? mat[1] + hws + mat[2] - : portion.index === 0 - ? properlyPlaceHWSBehind( portion.node, portion.text ) - : portion.text -} - -function real$hwsElmt( portion ) { - return portion.index === 0 - ? $.clone( $hws ) - : '' -} - -var last$hwsIdx - -function apostrophe( portion ) { - var $elmt = portion.node.parentNode - - if ( portion.index === 0 ) { - last$hwsIdx = portion.endIndexInNode-2 - } - - if ( - $elmt.nodeName.toLowerCase() === 'h-hws' && ( - portion.index === 1 || portion.indexInMatch === last$hwsIdx - )) { - $elmt.classList.add( 'quote-inner' ) - } - return portion.text -} - -function curveQuote( portion ) { - var $elmt = portion.node.parentNode - - if ( $elmt.nodeName.toLowerCase() === 'h-hws' ) { - $elmt.classList.add( 'quote-outer' ) - } - return portion.text -} - -$.extend( Han, { - renderHWS: function( context, strict ) { - // Elements to be filtered according to the - // HWS rendering mode. - var AVOID = strict - ? 'textarea, code, kbd, samp, pre' - : 'textarea' - - var mode = strict ? 'strict' : 'base' - var context = context || document - var finder = Han.find( context ) - - finder - .avoid( AVOID ) - - // Basic situations: - // - 字a => 字a - // - A字 => A字 - .replace( Han.TYPESET.hws[ mode ][0], firstStepLabel ) - .replace( Han.TYPESET.hws[ mode ][1], firstStepLabel ) - - // Convert text nodes `` into real element nodes: - .replace( new RegExp( '(' + hws + ')+', 'g' ), real$hwsElmt ) - - // Deal with: - // - '' => '字' - // - "" => "字" - .replace( /([\'"])\s(.+?)\s\1/g, apostrophe ) - - // Deal with: - // - “字” - // - ‘字’ - .replace( /\s[‘“]/g, curveQuote ) - .replace( /[’”]\s/g, curveQuote ) - .normalize() - - // Return the finder instance for future usage - return finder - } -}) - -$.extend( Han.fn, { - renderHWS: function( strict ) { - Han.renderHWS( this.context, strict ) - return this - }, - - revertHWS: function() { - $.tag( 'h-hws', this.context ) - .forEach(function( hws ) { - $.remove( hws ) - }) - this.HWS = [] - return this - } -}) - -var HANGABLE_CLASS = 'bd-hangable' -var HANGABLE_AVOID = 'h-char.bd-hangable' -var HANGABLE_CS_HTML = '' - -var matches = Han.find.matches - -function detectSpaceFont() { - var div = $.create( 'div' ) - var ret - - div.innerHTML = 'a ba b' - body.appendChild( div ) - ret = div.firstChild.offsetWidth !== div.lastChild.offsetWidth - $.remove( div ) - return ret -} - -function insertHangableCS( $jinze ) { - var $cs = $jinze.nextSibling - - if ( $cs && matches( $cs, 'h-cs.jinze-outer' )) { - $cs.classList.add( 'hangable-outer' ) - } else { - $jinze.insertAdjacentHTML( - 'afterend', - HANGABLE_CS_HTML - ) - } -} - -Han.support['han-space'] = detectSpaceFont() - -$.extend( Han, { - detectSpaceFont: detectSpaceFont, - isSpaceFontLoaded: detectSpaceFont(), - - renderHanging: function( context ) { - var context = context || document - var finder = Han.find( context ) - - finder - .avoid( 'textarea, code, kbd, samp, pre' ) - .avoid( HANGABLE_AVOID ) - .replace( - TYPESET.jinze.hanging, - function( portion ) { - if ( /^[\x20\t\r\n\f]+$/.test( portion.text )) { - return '' - } - - var $elmt = portion.node.parentNode - var $jinze, $new, $bd, biaodian - - if ( $jinze = $.parent( $elmt, 'h-jinze' )) { - insertHangableCS( $jinze ) - } - - biaodian = portion.text.trim() - - $new = Han.createBDChar( biaodian ) - $new.innerHTML = '' + biaodian + '' - $new.classList.add( HANGABLE_CLASS ) - - $bd = $.parent( $elmt, 'h-char.biaodian' ) - - return !$bd - ? $new - : (function() { - $bd.classList.add( HANGABLE_CLASS ) - - return matches( $elmt, 'h-inner, h-inner *' ) - ? biaodian - : $new.firstChild - })() - } - ) - return finder - } -}) - -$.extend( Han.fn, { - renderHanging: function() { - var classList = this.condition.classList - Han.isSpaceFontLoaded = detectSpaceFont() - - if ( - Han.isSpaceFontLoaded && - classList.contains( 'no-han-space' ) - ) { - classList.remove( 'no-han-space' ) - classList.add( 'han-space' ) - } - - Han.renderHanging( this.context ) - return this - }, - - revertHanging: function() { - $.qsa( - 'h-char.bd-hangable, h-cs.hangable-outer', - this.context - ).forEach(function( $elmt ) { - var classList = $elmt.classList - classList.remove( 'bd-hangable' ) - classList.remove( 'hangable-outer' ) - }) - return this - } -}) - -var JIYA_CLASS = 'bd-jiya' -var JIYA_AVOID = 'h-char.bd-jiya' -var CONSECUTIVE_CLASS = 'bd-consecutive' -var JIYA_CS_HTML = '' - -var matches = Han.find.matches - -function trimBDClass( clazz ) { - return clazz.replace( - /(biaodian|cjk|bd-jiya|bd-consecutive|bd-hangable)/gi, '' - ).trim() -} - -function charifyBiaodian( portion ) { - var biaodian = portion.text - var $elmt = portion.node.parentNode - var $bd = $.parent( $elmt, 'h-char.biaodian' ) - var $new = Han.createBDChar( biaodian ) - var $jinze - - $new.innerHTML = '' + biaodian + '' - $new.classList.add( JIYA_CLASS ) - - if ( $jinze = $.parent( $elmt, 'h-jinze' )) { - insertJiyaCS( $jinze ) - } - - return !$bd - ? $new - : (function() { - $bd.classList.add( JIYA_CLASS ) - - return matches( $elmt, 'h-inner, h-inner *' ) - ? biaodian - : $new.firstChild - })() -} - -var prevBDType, $$prevCS - -function locateConsecutiveBD( portion ) { - var prev = prevBDType - var $elmt = portion.node.parentNode - var $bd = $.parent( $elmt, 'h-char.biaodian' ) - var $jinze = $.parent( $bd, 'h-jinze' ) - var classList - - classList = $bd.classList - - if ( prev ) { - $bd.setAttribute( 'prev', prev ) - } - - if ( $$prevCS && classList.contains( 'bd-open' )) { - $$prevCS.pop().setAttribute( 'next', 'bd-open' ) - } - - $$prevCS = undefined - - if ( portion.isEnd ) { - prevBDType = undefined - classList.add( CONSECUTIVE_CLASS, 'end-portion' ) - } else { - prevBDType = trimBDClass($bd.getAttribute( 'class' )) - classList.add( CONSECUTIVE_CLASS ) - } - - if ( $jinze ) { - $$prevCS = locateCS( $jinze, { - prev: prev, - 'class': trimBDClass($bd.getAttribute( 'class' )) - }) - } - return portion.text -} - -function insertJiyaCS( $jinze ) { - if ( - matches( $jinze, '.tou, .touwei' ) && - !matches( $jinze.previousSibling, 'h-cs.jiya-outer' ) - ) { - $jinze.insertAdjacentHTML( 'beforebegin', JIYA_CS_HTML ) - } - if ( - matches( $jinze, '.wei, .touwei' ) && - !matches( $jinze.nextSibling, 'h-cs.jiya-outer' ) - ) { - $jinze.insertAdjacentHTML( 'afterend', JIYA_CS_HTML ) - } -} - -function locateCS( $jinze, attr ) { - var $prev, $next - - if (matches( $jinze, '.tou, .touwei' )) { - $prev = $jinze.previousSibling - - if (matches( $prev, 'h-cs' )) { - $prev.className = 'jinze-outer jiya-outer' - $prev.setAttribute( 'prev', attr.prev ) - } - } - if (matches( $jinze, '.wei, .touwei' )) { - $next = $jinze.nextSibling - - if (matches( $next, 'h-cs' )) { - $next.className = 'jinze-outer jiya-outer ' + attr[ 'class' ] - $next.removeAttribute( 'prev' ) - } - } - return [ $prev, $next ] -} - -Han.renderJiya = function( context ) { - var context = context || document - var finder = Han.find( context ) - - finder - .avoid( 'textarea, code, kbd, samp, pre, h-cs' ) - - .avoid( JIYA_AVOID ) - .charify({ - avoid: false, - biaodian: charifyBiaodian - }) - // End avoiding `JIYA_AVOID`: - .endAvoid() - - .avoid( 'textarea, code, kbd, samp, pre, h-cs' ) - .replace( TYPESET.group.biaodian[0], locateConsecutiveBD ) - .replace( TYPESET.group.biaodian[1], locateConsecutiveBD ) - - return finder -} - -$.extend( Han.fn, { - renderJiya: function() { - Han.renderJiya( this.context ) - return this - }, - - revertJiya: function() { - $.qsa( - 'h-char.bd-jiya, h-cs.jiya-outer', - this.context - ).forEach(function( $elmt ) { - var classList = $elmt.classList - classList.remove( 'bd-jiya' ) - classList.remove( 'jiya-outer' ) - }) - return this - } -}) - -var QUERY_RU_W_ANNO = 'h-ru[annotation]' -var SELECTOR_TO_IGNORE = 'textarea, code, kbd, samp, pre' - -function createCompareFactory( font, treat, control ) { - return function() { - var a = Han.localize.writeOnCanvas( treat, font ) - var b = Han.localize.writeOnCanvas( control, font ) - return Han.localize.compareCanvases( a, b ) - } -} - -function isVowelCombLigaNormal() { - return createCompareFactory( '"Romanization Sans"', '\u0061\u030D', '\uDB80\uDC61' ) -} - -function isVowelICombLigaNormal() { - return createCompareFactory( '"Romanization Sans"', '\u0069\u030D', '\uDB80\uDC69' ) -} - -function isZhuyinCombLigaNormal() { - return createCompareFactory( '"Zhuyin Kaiti"', '\u31B4\u0358', '\uDB8C\uDDB4' ) -} - -function createSubstFactory( regexToSubst ) { - return function( context ) { - var context = context || document - var finder = Han.find( context ).avoid( SELECTOR_TO_IGNORE ) - - regexToSubst - .forEach(function( pattern ) { - finder - .replace( - new RegExp( pattern[ 0 ], 'ig' ), - function( portion, match ) { - var ret = $.clone( charCombLiga ) - - // Put the original content in an inner container - // for better presentational effect of hidden text - ret.innerHTML = '' + match[0] + '' - ret.setAttribute( 'display-as', pattern[ 1 ] ) - return portion.index === 0 ? ret : '' - } - ) - }) - return finder - } -} - -var charCombLiga = $.create( 'h-char', 'comb-liga' ) - -$.extend( Han, { - isVowelCombLigaNormal: isVowelCombLigaNormal(), - isVowelICombLigaNormal: isVowelICombLigaNormal(), - isZhuyinCombLigaNormal: isZhuyinCombLigaNormal(), - - isCombLigaNormal: isVowelICombLigaNormal()(), // ### Deprecated - - substVowelCombLiga: createSubstFactory( Han.TYPESET[ 'display-as' ][ 'comb-liga-vowel' ] ), - substZhuyinCombLiga: createSubstFactory( Han.TYPESET[ 'display-as' ][ 'comb-liga-zhuyin' ] ), - substCombLigaWithPUA: createSubstFactory( Han.TYPESET[ 'display-as' ][ 'comb-liga-pua' ] ), - - substInaccurateChar: function( context ) { - var context = context || document - var finder = Han.find( context ) - - finder.avoid( SELECTOR_TO_IGNORE ) - - Han.TYPESET[ 'inaccurate-char' ] - .forEach(function( pattern ) { - finder - .replace( - new RegExp( pattern[ 0 ], 'ig' ), - pattern[ 1 ] - ) - }) - } -}) - -$.extend( Han.fn, { - 'comb-liga-vowel': null, - 'comb-liga-vowel-i': null, - 'comb-liga-zhuyin': null, - 'inaccurate-char': null, - - substVowelCombLiga: function() { - this['comb-liga-vowel'] = Han.substVowelCombLiga( this.context ) - return this - }, - - substVowelICombLiga: function() { - this['comb-liga-vowel-i'] = Han.substVowelICombLiga( this.context ) - return this - }, - - substZhuyinCombLiga: function() { - this['comb-liga-zhuyin'] = Han.substZhuyinCombLiga( this.context ) - return this - }, - - substCombLigaWithPUA: function() { - if ( !Han.isVowelCombLigaNormal()) { - this['comb-liga-vowel'] = Han.substVowelCombLiga( this.context ) - } else if ( !Han.isVowelICombLigaNormal()) { - this['comb-liga-vowel-i'] = Han.substVowelICombLiga( this.context ) - } - - if ( !Han.isZhuyinCombLigaNormal()) { - this['comb-liga-zhuyin'] = Han.substZhuyinCombLiga( this.context ) - } - return this - }, - - revertVowelCombLiga: function() { - try { - this['comb-liga-vowel'].revert( 'all' ) - } catch (e) {} - return this - }, - - revertVowelICombLiga: function() { - try { - this['comb-liga-vowel-i'].revert( 'all' ) - } catch (e) {} - return this - }, - - revertZhuyinCombLiga: function() { - try { - this['comb-liga-zhuyin'].revert( 'all' ) - } catch (e) {} - return this - }, - - revertCombLigaWithPUA: function() { - try { - this['comb-liga-vowel'].revert( 'all' ) - this['comb-liga-vowel-i'].revert( 'all' ) - this['comb-liga-zhuyin'].revert( 'all' ) - } catch (e) {} - return this - }, - - substInaccurateChar: function() { - this['inaccurate-char'] = Han.substInaccurateChar( this.context ) - return this - }, - - revertInaccurateChar: function() { - try { - this['inaccurate-char'].revert( 'all' ) - } catch (e) {} - return this - } -}) - -window.addEventListener( 'DOMContentLoaded', function() { - var initContext - - // Use the shortcut under the default situation - if ( root.classList.contains( 'han-init' )) { - Han.init() - - // Consider ‘a configured context’ the special - // case of the default situation. Will have to - // replace the `Han.init` with the instance as - // well (for future usage). - } else if ( initContext = document.querySelector( '.han-init-context' )) { - Han.init = Han( initContext ).render() - } -}) - -// Expose to global namespace -if ( typeof noGlobalNS === 'undefined' || noGlobalNS === false ) { - window.Han = Han -} - -return Han -}); - diff --git a/lib/Han/dist/han.min.css b/lib/Han/dist/han.min.css deleted file mode 100644 index 29c753e..0000000 --- a/lib/Han/dist/han.min.css +++ /dev/null @@ -1,6 +0,0 @@ -@charset "UTF-8"; - -/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ -/*! Han.css: the CSS typography framework optimised for Hanzi */ - -progress,sub,sup{vertical-align:baseline}button,hr,input,select{overflow:visible}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{cursor:pointer}[disabled]{cursor:default}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button:-moz-focusring,input:-moz-focusring{outline:ButtonText dotted 1px}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:"Han Heiti";src:local("Hiragino Sans GB"),local("Lantinghei TC Extralight"),local("Lantinghei SC Extralight"),local(FZLTXHB--B51-0),local(FZLTZHK--GBK1-0),local("Pingfang SC Light"),local("Pingfang TC Light"),local("Pingfang-SC-Light"),local("Pingfang-TC-Light"),local("Pingfang SC"),local("Pingfang TC"),local("Heiti SC Light"),local(STHeitiSC-Light),local("Heiti SC"),local("Heiti TC Light"),local(STHeitiTC-Light),local("Heiti TC"),local("Microsoft Yahei"),local("Microsoft Jhenghei"),local("Noto Sans CJK KR"),local("Noto Sans CJK JP"),local("Noto Sans CJK SC"),local("Noto Sans CJK TC"),local("Source Han Sans K"),local("Source Han Sans KR"),local("Source Han Sans JP"),local("Source Han Sans CN"),local("Source Han Sans HK"),local("Source Han Sans TW"),local("Source Han Sans TWHK"),local("Droid Sans Fallback")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Heiti";src:local(YuGothic),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro")}@font-face{font-family:"Han Heiti CNS";src:local("Pingfang TC Light"),local("Pingfang-TC-Light"),local("Pingfang TC"),local("Heiti TC Light"),local(STHeitiTC-Light),local("Heiti TC"),local("Lantinghei TC Extralight"),local(FZLTXHB--B51-0),local("Lantinghei TC"),local("Microsoft Jhenghei"),local("Microsoft Yahei"),local("Noto Sans CJK TC"),local("Source Han Sans TC"),local("Source Han Sans TW"),local("Source Han Sans TWHK"),local("Source Han Sans HK"),local("Droid Sans Fallback")}@font-face{font-family:"Han Heiti GB";src:local("Hiragino Sans GB"),local("Pingfang SC Light"),local("Pingfang-SC-Light"),local("Pingfang SC"),local("Lantinghei SC Extralight"),local(FZLTXHK--GBK1-0),local("Lantinghei SC"),local("Heiti SC Light"),local(STHeitiSC-Light),local("Heiti SC"),local("Microsoft Yahei"),local("Noto Sans CJK SC"),local("Source Han Sans SC"),local("Source Han Sans CN"),local("Droid Sans Fallback")}@font-face{font-family:"Han Heiti";font-weight:600;src:local("Hiragino Sans GB W6"),local(HiraginoSansGB-W6),local("Lantinghei TC Demibold"),local("Lantinghei SC Demibold"),local(FZLTZHB--B51-0),local(FZLTZHK--GBK1-0),local("Pingfang-SC-Semibold"),local("Pingfang-TC-Semibold"),local("Heiti SC Medium"),local("STHeitiSC-Medium"),local("Heiti SC"),local("Heiti TC Medium"),local("STHeitiTC-Medium"),local("Heiti TC"),local("Microsoft Yahei Bold"),local("Microsoft Jhenghei Bold"),local(MicrosoftYahei-Bold),local(MicrosoftJhengHeiBold),local("Microsoft Yahei"),local("Microsoft Jhenghei"),local("Noto Sans CJK KR Bold"),local("Noto Sans CJK JP Bold"),local("Noto Sans CJK SC Bold"),local("Noto Sans CJK TC Bold"),local(NotoSansCJKkr-Bold),local(NotoSansCJKjp-Bold),local(NotoSansCJKsc-Bold),local(NotoSansCJKtc-Bold),local("Source Han Sans K Bold"),local(SourceHanSansK-Bold),local("Source Han Sans K"),local("Source Han Sans KR Bold"),local("Source Han Sans JP Bold"),local("Source Han Sans CN Bold"),local("Source Han Sans HK Bold"),local("Source Han Sans TW Bold"),local("Source Han Sans TWHK Bold"),local("SourceHanSansKR-Bold"),local("SourceHanSansJP-Bold"),local("SourceHanSansCN-Bold"),local("SourceHanSansHK-Bold"),local("SourceHanSansTW-Bold"),local("SourceHanSansTWHK-Bold"),local("Source Han Sans KR"),local("Source Han Sans CN"),local("Source Han Sans HK"),local("Source Han Sans TW"),local("Source Han Sans TWHK")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Heiti";font-weight:600;src:local("YuGothic Bold"),local("Hiragino Kaku Gothic ProN W6"),local("Hiragino Kaku Gothic Pro W6"),local(YuGo-Bold),local(HiraKakuProN-W6),local(HiraKakuPro-W6)}@font-face{font-family:"Han Heiti CNS";font-weight:600;src:local("Pingfang TC Semibold"),local("Pingfang-TC-Semibold"),local("Heiti TC Medium"),local("STHeitiTC-Medium"),local("Heiti TC"),local("Lantinghei TC Demibold"),local(FZLTXHB--B51-0),local("Microsoft Jhenghei Bold"),local(MicrosoftJhengHeiBold),local("Microsoft Jhenghei"),local("Microsoft Yahei Bold"),local(MicrosoftYahei-Bold),local("Noto Sans CJK TC Bold"),local(NotoSansCJKtc-Bold),local("Noto Sans CJK TC"),local("Source Han Sans TC Bold"),local("SourceHanSansTC-Bold"),local("Source Han Sans TC"),local("Source Han Sans TW Bold"),local("SourceHanSans-TW"),local("Source Han Sans TW"),local("Source Han Sans TWHK Bold"),local("SourceHanSans-TWHK"),local("Source Han Sans TWHK"),local("Source Han Sans HK"),local("SourceHanSans-HK"),local("Source Han Sans HK")}@font-face{font-family:"Han Heiti GB";font-weight:600;src:local("Hiragino Sans GB W6"),local(HiraginoSansGB-W6),local("Pingfang SC Semibold"),local("Pingfang-SC-Semibold"),local("Lantinghei SC Demibold"),local(FZLTZHK--GBK1-0),local("Heiti SC Medium"),local("STHeitiSC-Medium"),local("Heiti SC"),local("Microsoft Yahei Bold"),local(MicrosoftYahei-Bold),local("Microsoft Yahei"),local("Noto Sans CJK SC Bold"),local(NotoSansCJKsc-Bold),local("Noto Sans CJK SC"),local("Source Han Sans SC Bold"),local("SourceHanSansSC-Bold"),local("Source Han Sans CN Bold"),local("SourceHanSansCN-Bold"),local("Source Han Sans SC"),local("Source Han Sans CN")}@font-face{font-family:"Han Songti";src:local("Songti SC Regular"),local(STSongti-SC-Regular),local("Songti SC"),local("Songti TC Regular"),local(STSongti-TC-Regular),local("Songti TC"),local(STSong),local("Lisong Pro"),local(SimSun),local(PMingLiU)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Songti";src:local(YuMincho),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho")}@font-face{font-family:"Han Songti CNS";src:local("Songti TC Regular"),local(STSongti-TC-Regular),local("Songti TC"),local("Lisong Pro"),local("Songti SC Regular"),local(STSongti-SC-Regular),local("Songti SC"),local(STSong),local(PMingLiU),local(SimSun)}@font-face{font-family:"Han Songti GB";src:local("Songti SC Regular"),local(STSongti-SC-Regular),local("Songti SC"),local(STSong),local(SimSun),local(PMingLiU)}@font-face{font-family:"Han Songti";font-weight:600;src:local("STSongti SC Bold"),local("STSongti TC Bold"),local(STSongti-SC-Bold),local(STSongti-TC-Bold),local("STSongti SC"),local("STSongti TC")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Songti";font-weight:600;src:local("YuMincho Demibold"),local("Hiragino Mincho ProN W6"),local("Hiragino Mincho Pro W6"),local(YuMin-Demibold),local(HiraMinProN-W6),local(HiraMinPro-W6),local(YuMincho),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro")}@font-face{font-family:"Han Songti CNS";font-weight:600;src:local("STSongti TC Bold"),local("STSongti SC Bold"),local(STSongti-TC-Bold),local(STSongti-SC-Bold),local("STSongti TC"),local("STSongti SC")}@font-face{font-family:"Han Songti GB";font-weight:600;src:local("STSongti SC Bold"),local(STSongti-SC-Bold),local("STSongti SC")}@font-face{font-family:cursive;src:local("Kaiti TC Regular"),local(STKaiTi-TC-Regular),local("Kaiti TC"),local("Kaiti SC"),local(STKaiti),local(BiauKai),local("標楷體"),local(DFKaiShu-SB-Estd-BF),local(Kaiti),local(DFKai-SB)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Kaiti";src:local("Kaiti TC Regular"),local(STKaiTi-TC-Regular),local("Kaiti TC"),local("Kaiti SC"),local(STKaiti),local(BiauKai),local("標楷體"),local(DFKaiShu-SB-Estd-BF),local(Kaiti),local(DFKai-SB)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Kaiti CNS";src:local(BiauKai),local("標楷體"),local(DFKaiShu-SB-Estd-BF),local("Kaiti TC Regular"),local(STKaiTi-TC-Regular),local("Kaiti TC")}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Kaiti GB";src:local("Kaiti SC Regular"),local(STKaiTi-SC-Regular),local("Kaiti SC"),local(STKaiti),local(Kai),local(Kaiti),local(DFKai-SB)}@font-face{font-family:cursive;font-weight:600;src:local("Kaiti TC Bold"),local(STKaiTi-TC-Bold),local("Kaiti SC Bold"),local(STKaiti-SC-Bold),local("Kaiti TC"),local("Kaiti SC")}@font-face{font-family:"Han Kaiti";font-weight:600;src:local("Kaiti TC Bold"),local(STKaiTi-TC-Bold),local("Kaiti SC Bold"),local(STKaiti-SC-Bold),local("Kaiti TC"),local("Kaiti SC")}@font-face{font-family:"Han Kaiti CNS";font-weight:600;src:local("Kaiti TC Bold"),local(STKaiTi-TC-Bold),local("Kaiti TC")}@font-face{font-family:"Han Kaiti GB";font-weight:600;src:local("Kaiti SC Bold"),local(STKaiti-SC-Bold)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Fangsong";src:local(STFangsong),local(FangSong)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Fangsong CNS";src:local(STFangsong),local(FangSong)}@font-face{unicode-range:U+4E00-9FFF,U+3400-4DB5,U+20000-2A6D6,U+2A700-2B734,U+2B740-2B81D,U+FA0E-FA0F,U+FA11,U+FA13-FA14,U+FA1F,U+FA21,U+FA23,U+FA24,U+FA27-FA29,U+3040-309F,U+30A0-30FF,U+3099-309E,U+FF66-FF9F,U+3007,U+31C0-31E3,U+2F00-2FD5,U+2E80-2EF3;font-family:"Han Fangsong GB";src:local(STFangsong),local(FangSong)}@font-face{font-family:"Biaodian Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("MS Gothic"),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local(SimSun);unicode-range:U+FF0E}@font-face{font-family:"Biaodian Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Serif";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Serif";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Songti SC"),local(STSong),local("Heiti SC"),local(SimSun);unicode-range:U+00B7}@font-face{font-family:"Biaodian Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Yakumono Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Arial Unicode MS"),local("MS Gothic");unicode-range:U+2014}@font-face{font-family:"Yakumono Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho"),local("Microsoft Yahei");unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Sans CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Serif CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Sans GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Pro Serif GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSong),local("Microsoft Yahei"),local(SimSun);unicode-range:U+2014}@font-face{font-family:"Biaodian Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(Meiryo),local("MS Gothic"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local("MS Mincho"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Yakumono Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(Meiryo),local("MS Gothic");unicode-range:U+2026}@font-face{font-family:"Yakumono Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho");unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Serif";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Serif CNS";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSongti),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Sans GB"),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Serif GB";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype"),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Songti SC"),local(STSongti),local(SimSun),local(PMingLiU);unicode-range:U+2026}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Pro Sans GB";font-weight:700;src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Lisong Pro"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Pro Serif GB";font-weight:700;src:local("Lisong Pro"),local("Heiti SC"),local(STHeiti),local(SimSun),local(PMingLiU);unicode-range:U+201C-201D,U+2018-2019}@font-face{font-family:"Biaodian Sans";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Serif";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Serif";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans CNS";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Serif CNS";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans GB";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Serif GB";src:local(Georgia),local("Times New Roman"),local(Arial),local("Droid Sans Fallback");unicode-range:U+25CF}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("MS Gothic");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Heiti TC"),local("Lihei Pro"),local("Microsoft Jhenghei"),local(PMingLiU);unicode-range:U+3002,U+FF0C,U+3001}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Heiti TC"),local("Lihei Pro"),local("Microsoft Jhenghei"),local(PMingLiU),local("MS Gothic");unicode-range:U+FF1B,U+FF1A,U+FF1F,U+FF01}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("MS Mincho");unicode-range:U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Serif CNS";src:local(STSongti-TC-Regular),local("Lisong Pro"),local("Heiti TC"),local(PMingLiU);unicode-range:U+3002,U+FF0C,U+3001}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local(PMingLiU),local("MS Mincho");unicode-range:U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local(SimSun),local("MS Gothic");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01,U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Songti SC"),local(STSongti),local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Hiragino Sans GB"),local("Heiti SC"),local(STHeiti),local(SimSun),local("MS Mincho");unicode-range:U+3002,U+FF0C,U+3001,U+FF1B,U+FF1A,U+FF1F,U+FF01}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local(PMingLiU),local("MS Mincho");unicode-range:U+FF0D,U+FF0F,U+FF3C}@font-face{font-family:"Biaodian Pro Sans";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Yu Gothic"),local(YuGothic),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Serif";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Yu Mincho"),local(YuMincho),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Sans CNS";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Yu Gothic"),local(YuGothic),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Serif CNS";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Yu Mincho"),local(YuMincho),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Sans GB";src:local("Hiragino Kaku Gothic ProN"),local("Hiragino Kaku Gothic Pro"),local("Yu Gothic"),local(YuGothic),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Pro Serif GB";src:local("Hiragino Mincho ProN"),local("Hiragino Mincho Pro"),local("Yu Mincho"),local(YuMincho),local(SimSun),local(PMingLiU);unicode-range:U+300C-300F,U+300A-300B,U+3008-3009,U+FF08-FF09,U+3014-3015}@font-face{font-family:"Biaodian Basic";src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Basic";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Sans";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans CNS";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Sans GB";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Serif";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Serif CNS";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Biaodian Pro Serif GB";font-weight:700;src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+2014,U+2026,U+00B7}@font-face{font-family:"Latin Italic Serif";src:local("Georgia Italic"),local("Times New Roman Italic"),local(Georgia-Italic),local(TimesNewRomanPS-ItalicMT),local(Times-Italic)}@font-face{font-family:"Latin Italic Serif";font-weight:700;src:local("Georgia Bold Italic"),local("Times New Roman Bold Italic"),local(Georgia-BoldItalic),local(TimesNewRomanPS-BoldItalicMT),local(Times-Italic)}@font-face{font-family:"Latin Italic Sans";src:local("Helvetica Neue Italic"),local("Helvetica Oblique"),local("Arial Italic"),local(HelveticaNeue-Italic),local(Helvetica-LightOblique),local(Arial-ItalicMT)}@font-face{font-family:"Latin Italic Sans";font-weight:700;src:local("Helvetica Neue Bold Italic"),local("Helvetica Bold Oblique"),local("Arial Bold Italic"),local(HelveticaNeue-BoldItalic),local(Helvetica-BoldOblique),local(Arial-BoldItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral TF Sans";src:local(Skia),local("Neutraface 2 Text"),local(Candara),local(Corbel)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral TF Serif";src:local(Georgia),local("Hoefler Text"),local("Big Caslon")}@font-face{unicode-range:U+0030-0039;font-family:"Numeral TF Italic Serif";src:local("Georgia Italic"),local("Hoefler Text Italic"),local(Georgia-Italic),local(HoeflerText-Italic)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Sans";src:local("Helvetica Neue"),local(Helvetica),local(Arial)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Sans";src:local("Helvetica Neue Italic"),local("Helvetica Oblique"),local("Arial Italic"),local(HelveticaNeue-Italic),local(Helvetica-LightOblique),local(Arial-ItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Sans";font-weight:700;src:local("Helvetica Neue Bold Italic"),local("Helvetica Bold Oblique"),local("Arial Bold Italic"),local(HelveticaNeue-BoldItalic),local(Helvetica-BoldOblique),local(Arial-BoldItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Serif";src:local(Palatino),local("Palatino Linotype"),local("Times New Roman")}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Serif";src:local("Palatino Italic"),local("Palatino Italic Linotype"),local("Times New Roman Italic"),local(Palatino-Italic),local(Palatino-Italic-Linotype),local(TimesNewRomanPS-ItalicMT)}@font-face{unicode-range:U+0030-0039;font-family:"Numeral LF Italic Serif";font-weight:700;src:local("Palatino Bold Italic"),local("Palatino Bold Italic Linotype"),local("Times New Roman Bold Italic"),local(Palatino-BoldItalic),local(Palatino-BoldItalic-Linotype),local(TimesNewRomanPS-BoldItalicMT)}@font-face{src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+3105-312D,U+31A0-31BA,U+02D9,U+02CA,U+02C5,U+02C7,U+02CB,U+02EA-02EB,U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075;font-family:"Zhuyin Kaiti"}@font-face{unicode-range:U+3105-312D,U+31A0-31BA,U+02D9,U+02CA,U+02C5,U+02C7,U+02CB,U+02EA-02EB,U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075;font-family:"Zhuyin Heiti";src:local("Hiragino Sans GB"),local("Heiti TC"),local("Microsoft Jhenghei"),url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype")}@font-face{font-family:"Zhuyin Heiti";src:local("Heiti TC"),local("Microsoft Jhenghei"),url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");unicode-range:U+3127}@font-face{src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");font-family:"Zhuyin Heiti";unicode-range:U+02D9,U+02CA,U+02C5,U+02C7,U+02CB,U+02EA-02EB,U+31B4,U+31B5,U+31B6,U+31B7,U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075}@font-face{src:url(./font/han.woff2?v3.3.0) format("woff2"),url(./font/han.woff?v3.3.0) format("woff"),url(./font/han.otf?v3.3.0) format("opentype");font-family:"Romanization Sans";unicode-range:U+0307,U+030D,U+0358,U+F31B4-F31B7,U+F0061,U+F0065,U+F0069,U+F006F,U+F0075}article strong :lang(ja-Latn),article strong :lang(zh-Latn),article strong :not(:lang(zh)):not(:lang(ja)),article strong:lang(ja-Latn),article strong:lang(zh-Latn),article strong:not(:lang(zh)):not(:lang(ja)),html :lang(ja-Latn),html :lang(zh-Latn),html :not(:lang(zh)):not(:lang(ja)),html:lang(ja-Latn),html:lang(zh-Latn),html:not(:lang(zh)):not(:lang(ja)){font-family:"Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}[lang*=Hant],[lang=zh-TW],[lang=zh-HK],[lang^=zh],article strong:lang(zh),article strong:lang(zh-Hant),html:lang(zh),html:lang(zh-Hant){font-family:"Biaodian Pro Sans CNS","Helvetica Neue",Helvetica,Arial,"Zhuyin Heiti","Han Heiti",sans-serif}.no-unicoderange [lang*=Hant],.no-unicoderange [lang=zh-TW],.no-unicoderange [lang=zh-HK],.no-unicoderange [lang^=zh],.no-unicoderange article strong:lang(zh),.no-unicoderange article strong:lang(zh-Hant),html:lang(zh).no-unicoderange,html:lang(zh-Hant).no-unicoderange{font-family:"Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}[lang*=Hans],[lang=zh-CN],article strong:lang(zh-CN),article strong:lang(zh-Hans),html:lang(zh-CN),html:lang(zh-Hans){font-family:"Biaodian Pro Sans GB","Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}.no-unicoderange [lang*=Hans],.no-unicoderange [lang=zh-CN],.no-unicoderange article strong:lang(zh-CN),.no-unicoderange article strong:lang(zh-Hans),html:lang(zh-CN).no-unicoderange,html:lang(zh-Hans).no-unicoderange{font-family:"Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}[lang^=ja],article strong:lang(ja),html:lang(ja){font-family:"Yakumono Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.no-unicoderange [lang^=ja],.no-unicoderange article strong:lang(ja),html:lang(ja).no-unicoderange{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}article blockquote i :lang(ja-Latn),article blockquote i :lang(zh-Latn),article blockquote i :not(:lang(zh)):not(:lang(ja)),article blockquote i:lang(ja-Latn),article blockquote i:lang(zh-Latn),article blockquote i:not(:lang(zh)):not(:lang(ja)),article blockquote var :lang(ja-Latn),article blockquote var :lang(zh-Latn),article blockquote var :not(:lang(zh)):not(:lang(ja)),article blockquote var:lang(ja-Latn),article blockquote var:lang(zh-Latn),article blockquote var:not(:lang(zh)):not(:lang(ja)){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}article blockquote i:lang(zh),article blockquote i:lang(zh-Hant),article blockquote var:lang(zh),article blockquote var:lang(zh-Hant){font-family:"Biaodian Pro Sans CNS","Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Zhuyin Heiti","Han Heiti",sans-serif}.no-unicoderange article blockquote i:lang(zh),.no-unicoderange article blockquote i:lang(zh-Hant),.no-unicoderange article blockquote var:lang(zh),.no-unicoderange article blockquote var:lang(zh-Hant){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif}article blockquote i:lang(zh-CN),article blockquote i:lang(zh-Hans),article blockquote var:lang(zh-CN),article blockquote var:lang(zh-Hans){font-family:"Biaodian Pro Sans GB","Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}.no-unicoderange article blockquote i:lang(zh-CN),.no-unicoderange article blockquote i:lang(zh-Hans),.no-unicoderange article blockquote var:lang(zh-CN),.no-unicoderange article blockquote var:lang(zh-Hans){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti GB",sans-serif}article blockquote i:lang(ja),article blockquote var:lang(ja){font-family:"Yakumono Sans","Latin Italic Sans","Helvetica Neue",Helvetica,Arial,sans-serif}.no-unicoderange article blockquote i:lang(ja),.no-unicoderange article blockquote var:lang(ja){font-family:"Latin Italic Sans","Helvetica Neue",Helvetica,Arial,sans-serif}article figure blockquote :lang(ja-Latn),article figure blockquote :lang(zh-Latn),article figure blockquote :not(:lang(zh)):not(:lang(ja)),article figure blockquote:lang(ja-Latn),article figure blockquote:lang(zh-Latn),article figure blockquote:not(:lang(zh)):not(:lang(ja)){font-family:Georgia,"Times New Roman","Han Songti",cursive,serif}article figure blockquote:lang(zh),article figure blockquote:lang(zh-Hant){font-family:"Biaodian Pro Serif CNS","Numeral LF Serif",Georgia,"Times New Roman","Zhuyin Kaiti","Han Songti",serif}.no-unicoderange article figure blockquote:lang(zh),.no-unicoderange article figure blockquote:lang(zh-Hant){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Songti",serif}article figure blockquote:lang(zh-CN),article figure blockquote:lang(zh-Hans){font-family:"Biaodian Pro Serif GB","Numeral LF Serif",Georgia,"Times New Roman","Han Songti GB",serif}.no-unicoderange article figure blockquote:lang(zh-CN),.no-unicoderange article figure blockquote:lang(zh-Hans){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Songti GB",serif}article figure blockquote:lang(ja){font-family:"Yakumono Serif","Numeral LF Serif",Georgia,"Times New Roman",serif}.no-unicoderange article figure blockquote:lang(ja){font-family:"Numeral LF Serif",Georgia,"Times New Roman",serif}article blockquote :lang(ja-Latn),article blockquote :lang(zh-Latn),article blockquote :not(:lang(zh)):not(:lang(ja)),article blockquote:lang(ja-Latn),article blockquote:lang(zh-Latn),article blockquote:not(:lang(zh)):not(:lang(ja)){font-family:Georgia,"Times New Roman","Han Kaiti",cursive,serif}article blockquote:lang(zh),article blockquote:lang(zh-Hant){font-family:"Biaodian Pro Serif CNS","Numeral LF Serif",Georgia,"Times New Roman","Zhuyin Kaiti","Han Kaiti",cursive,serif}.no-unicoderange article blockquote:lang(zh),.no-unicoderange article blockquote:lang(zh-Hant){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Kaiti",cursive,serif}article blockquote:lang(zh-CN),article blockquote:lang(zh-Hans){font-family:"Biaodian Pro Serif GB","Numeral LF Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}.no-unicoderange article blockquote:lang(zh-CN),.no-unicoderange article blockquote:lang(zh-Hans){font-family:"Numeral LF Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}article blockquote:lang(ja){font-family:"Yakumono Serif","Numeral LF Serif",Georgia,"Times New Roman",cursive,serif}.no-unicoderange article blockquote:lang(ja){font-family:"Numeral LF Serif",Georgia,"Times New Roman",cursive,serif}i :lang(ja-Latn),i :lang(zh-Latn),i :not(:lang(zh)):not(:lang(ja)),i:lang(ja-Latn),i:lang(zh-Latn),i:not(:lang(zh)):not(:lang(ja)),var :lang(ja-Latn),var :lang(zh-Latn),var :not(:lang(zh)):not(:lang(ja)),var:lang(ja-Latn),var:lang(zh-Latn),var:not(:lang(zh)):not(:lang(ja)){font-family:"Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti",cursive,serif}i:lang(zh),i:lang(zh-Hant),var:lang(zh),var:lang(zh-Hant){font-family:"Biaodian Pro Serif CNS","Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Zhuyin Kaiti","Han Kaiti",cursive,serif}.no-unicoderange i:lang(zh),.no-unicoderange i:lang(zh-Hant),.no-unicoderange var:lang(zh),.no-unicoderange var:lang(zh-Hant){font-family:"Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti",cursive,serif}i:lang(zh-CN),i:lang(zh-Hans),var:lang(zh-CN),var:lang(zh-Hans){font-family:"Biaodian Pro Serif GB","Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}.no-unicoderange i:lang(zh-CN),.no-unicoderange i:lang(zh-Hans),.no-unicoderange var:lang(zh-CN),.no-unicoderange var:lang(zh-Hans){font-family:"Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman","Han Kaiti GB",cursive,serif}i:lang(ja),var:lang(ja){font-family:"Yakumono Serif","Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman",cursive,serif}.no-unicoderange i:lang(ja),.no-unicoderange var:lang(ja){font-family:"Numeral LF Italic Serif","Latin Italic Serif",Georgia,"Times New Roman",cursive,serif}code :lang(ja-Latn),code :lang(zh-Latn),code :not(:lang(zh)):not(:lang(ja)),code:lang(ja-Latn),code:lang(zh-Latn),code:not(:lang(zh)):not(:lang(ja)),kbd :lang(ja-Latn),kbd :lang(zh-Latn),kbd :not(:lang(zh)):not(:lang(ja)),kbd:lang(ja-Latn),kbd:lang(zh-Latn),kbd:not(:lang(zh)):not(:lang(ja)),pre :lang(ja-Latn),pre :lang(zh-Latn),pre :not(:lang(zh)):not(:lang(ja)),pre:lang(ja-Latn),pre:lang(zh-Latn),pre:not(:lang(zh)):not(:lang(ja)),samp :lang(ja-Latn),samp :lang(zh-Latn),samp :not(:lang(zh)):not(:lang(ja)),samp:lang(ja-Latn),samp:lang(zh-Latn),samp:not(:lang(zh)):not(:lang(ja)){font-family:Menlo,Consolas,Courier,"Han Heiti",monospace,monospace,sans-serif}code:lang(zh),code:lang(zh-Hant),kbd:lang(zh),kbd:lang(zh-Hant),pre:lang(zh),pre:lang(zh-Hant),samp:lang(zh),samp:lang(zh-Hant){font-family:"Biaodian Pro Sans CNS",Menlo,Consolas,Courier,"Zhuyin Heiti","Han Heiti",monospace,monospace,sans-serif}.no-unicoderange code:lang(zh),.no-unicoderange code:lang(zh-Hant),.no-unicoderange kbd:lang(zh),.no-unicoderange kbd:lang(zh-Hant),.no-unicoderange pre:lang(zh),.no-unicoderange pre:lang(zh-Hant),.no-unicoderange samp:lang(zh),.no-unicoderange samp:lang(zh-Hant){font-family:Menlo,Consolas,Courier,"Han Heiti",monospace,monospace,sans-serif}code:lang(zh-CN),code:lang(zh-Hans),kbd:lang(zh-CN),kbd:lang(zh-Hans),pre:lang(zh-CN),pre:lang(zh-Hans),samp:lang(zh-CN),samp:lang(zh-Hans){font-family:"Biaodian Pro Sans GB",Menlo,Consolas,Courier,"Han Heiti GB",monospace,monospace,sans-serif}.no-unicoderange code:lang(zh-CN),.no-unicoderange code:lang(zh-Hans),.no-unicoderange kbd:lang(zh-CN),.no-unicoderange kbd:lang(zh-Hans),.no-unicoderange pre:lang(zh-CN),.no-unicoderange pre:lang(zh-Hans),.no-unicoderange samp:lang(zh-CN),.no-unicoderange samp:lang(zh-Hans){font-family:Menlo,Consolas,Courier,"Han Heiti GB",monospace,monospace,sans-serif}code:lang(ja),kbd:lang(ja),pre:lang(ja),samp:lang(ja){font-family:"Yakumono Sans",Menlo,Consolas,Courier,monospace,monospace,sans-serif}.no-unicoderange code:lang(ja),.no-unicoderange kbd:lang(ja),.no-unicoderange pre:lang(ja),.no-unicoderange samp:lang(ja){font-family:Menlo,Consolas,Courier,monospace,monospace,sans-serif}.no-unicoderange h-char.bd-liga,.no-unicoderange h-char[unicode=b7],h-ruby [annotation] rt,h-ruby h-zhuyin,h-ruby h-zhuyin h-diao,h-ruby.romanization rt,html,ruby [annotation] rt,ruby h-zhuyin,ruby h-zhuyin h-diao,ruby.romanization rt{-moz-font-feature-settings:"liga";-ms-font-feature-settings:"liga";-webkit-font-feature-settings:"liga";font-feature-settings:"liga"}[lang*=Hant],[lang*=Hans],[lang=zh-TW],[lang=zh-HK],[lang=zh-CN],[lang^=zh],article blockquote i,article blockquote var,article strong,code,html,kbd,pre,samp{-moz-font-feature-settings:"liga=1, locl=0";-ms-font-feature-settings:"liga","locl" 0;-webkit-font-feature-settings:"liga","locl" 0;font-feature-settings:"liga","locl" 0}.no-unicoderange h-char.bd-cop:lang(zh-HK),.no-unicoderange h-char.bd-cop:lang(zh-Hant),.no-unicoderange h-char.bd-cop:lang(zh-TW){font-family:-apple-system,"Han Heiti CNS"}.no-unicoderange h-char.bd-liga,.no-unicoderange h-char[unicode=b7]{font-family:"Biaodian Basic","Han Heiti"}.no-unicoderange h-char[unicode="2018"]:lang(zh-CN),.no-unicoderange h-char[unicode="2018"]:lang(zh-Hans),.no-unicoderange h-char[unicode="2019"]:lang(zh-CN),.no-unicoderange h-char[unicode="2019"]:lang(zh-Hans),.no-unicoderange h-char[unicode="201c"]:lang(zh-CN),.no-unicoderange h-char[unicode="201c"]:lang(zh-Hans),.no-unicoderange h-char[unicode="201d"]:lang(zh-CN),.no-unicoderange h-char[unicode="201d"]:lang(zh-Hans){font-family:"Han Heiti GB"}i,var{font-style:inherit}.no-unicoderange h-ruby h-zhuyin,.no-unicoderange h-ruby h-zhuyin h-diao,.no-unicoderange ruby h-zhuyin,.no-unicoderange ruby h-zhuyin h-diao,h-ruby h-diao,ruby h-diao{font-family:"Zhuyin Kaiti",cursive,serif}h-ruby [annotation] rt,h-ruby.romanization rt,ruby [annotation] rt,ruby.romanization rt{font-family:"Romanization Sans","Helvetica Neue",Helvetica,Arial,"Han Heiti",sans-serif} \ No newline at end of file diff --git a/lib/Han/dist/han.min.js b/lib/Han/dist/han.min.js deleted file mode 100644 index a557ad3..0000000 --- a/lib/Han/dist/han.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! 漢字標準格式 v3.3.0 | MIT License | css.hanzi.co */ -/*! Han.css: the CSS typography framework optimised for Hanzi */ - -void function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,!0):"function"==typeof define&&define.amd?define(function(){return b(a,!0)}):b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){return"function"==typeof a||a instanceof Element?a:void 0}function d(a){var b=0===a.index&&a.isEnd?"biaodian cjk":"biaodian cjk portion "+(0===a.index?"is-first":a.isEnd?"is-end":"is-inner"),c=S.create("h-char-group",b);return c.innerHTML=a.text,c}function e(a){var b=S.create("div"),c=a.charCodeAt(0).toString(16);return b.innerHTML=''+a+"",b.firstChild}function f(a){return a.match(R["char"].biaodian.open)?"bd-open":a.match(R["char"].biaodian.close)?"bd-close bd-end":a.match(R["char"].biaodian.end)?/(?:\u3001|\u3002|\uff0c)/i.test(a)?"bd-end bd-cop":"bd-end":a.match(new RegExp(Q.biaodian.liga))?"bd-liga":a.match(new RegExp(Q.biaodian.middle))?"bd-middle":""}function g(a,b){var c,d=S.create("canvas");return d.width="50",d.height="20",d.style.display="none",L.appendChild(d),c=d.getContext("2d"),c.textBaseline="top",c.font="15px "+b+", sans-serif",c.fillStyle="black",c.strokeStyle="black",c.fillText(a,0,0),{node:d,context:c,remove:function(){S.remove(d,L)}}}function h(a,b){var c,d=a.context,e=b.context;try{for(var f=1;20>=f;f++)for(var g=1;50>=g;g++){if("undefined"==typeof c&&d.getImageData(g,f,1,1).data[3]!==e.getImageData(g,f,1,1).data[3]){c=!1;break}if("boolean"==typeof c)break;50===g&&20===f&&"undefined"==typeof c&&(c=!0)}return a.remove(),b.remove(),a=null,b=null,c}catch(h){}return!1}function i(a,b,c){var a=a,b=b||"sans-serif",c=c||"\u8fadQ";return b=g(c,b),a=g(c,a),!h(a,b)}function j(a){var b,c=S.create("!"),d=a.classList;return c.appendChild(S.clone(a)),S.tag("rt",c.firstChild).forEach(function(a){var c,e=S.create("!"),f=[];do{if(c=(c||a).previousSibling,!c||c.nodeName.match(/((?:h\-)?r[ubt])/i))break;e.insertBefore(S.clone(c),e.firstChild),f.push(c)}while(!c.nodeName.match(/((?:h\-)?r[ubt])/i));b=d.contains("zhuyin")?p(e,a):o(e,a);try{a.parentNode.replaceChild(b,a),f.map(S.remove)}catch(g){}}),m(c)}function k(a){var b=S.create("!");return b.appendChild(S.clone(a)),S.tag("rt",b.firstChild).forEach(function(a){var b,c,d=S.create("!"),e=[];do{if(b=(b||a).previousSibling,!b||b.nodeName.match(/((?:h\-)?r[ubt])/i))break;d.insertBefore(S.clone(b),d.firstChild),e.push(b)}while(!b.nodeName.match(/((?:h\-)?r[ubt])/i));c=S.create("rt"),c.innerHTML=q(a),a.parentNode.replaceChild(c,a)}),b.firstChild}function l(a){var b,c,d,e,f=S.create("!"),g=a.classList;return f.appendChild(S.clone(a)),b=f.firstChild,c=d=S.tag("rb",b),e=c.length,void function(a){a&&(d=S.tag("rt",a).map(function(a,b){if(c[b]){var d=p(c[b],a);try{c[b].parentNode.replaceChild(d,c[b])}catch(e){}return d}}),S.remove(a),b.setAttribute("rightangle","true"))}(b.querySelector("rtc.zhuyin")),S.qsa("rtc:not(.zhuyin)",b).forEach(function(a,c){var f;f=S.tag("rt",a).map(function(a,b){var f,h,i=Number(a.getAttribute("rbspan")||1),j=0,k=[];i>e&&(i=e);do{try{f=d.shift(),k.push(f)}catch(l){}if("undefined"==typeof f)break;j+=Number(f.getAttribute("span")||1)}while(i>j);if(j>i){if(k.length>1)return void console.error("An impossible `rbspan` value detected.",ruby);k=S.tag("rb",k[0]),d=k.slice(i).concat(d),k=k.slice(0,i),j=i}h=o(k,a,{"class":g,span:j,order:c});try{k[0].parentNode.replaceChild(h,k.shift()),k.map(S.remove)}catch(l){}return h}),d=f,1===c&&b.setAttribute("doubleline","true"),S.remove(a)}),m(f)}function m(a){var b=a.firstChild,c=S.create("h-ruby");return c.innerHTML=b.innerHTML,S.setAttr(c,b.attributes),c.normalize(),c}function n(a){if(!a instanceof Element)return a;var b=a.classList;return b.contains("pinyin")?b.add("romanization"):b.contains("romanization")?b.add("annotation"):b.contains("mps")?b.add("zhuyin"):b.contains("rightangle")&&b.add("complex"),a}function o(a,b,c){var d=S.create("h-ru"),b=S.clone(b),c=c||{};return c.annotation="true",Array.isArray(a)?d.innerHTML=a.map(function(a){return"undefined"==typeof a?"":a.outerHTML}).join("")+b.outerHTML:(d.appendChild(S.clone(a)),d.appendChild(b)),S.setAttr(d,c),d}function p(a,b){var a=S.clone(a),c=S.create("h-ru");return c.setAttribute("zhuyin",!0),c.appendChild(a),c.innerHTML+=q(b),c}function q(a){var b,c,d,e="string"==typeof a?a:a.textContent;return b=e.replace(R.zhuyin.diao,""),d=b?b.length:0,c=e.replace(b,"").replace(/[\u02C5]/g,"\u02c7").replace(/[\u030D]/g,"\u0358"),0===d?"":''+b+""+c+""}function r(a,b){return a&&b&&a.parentNode===b.parentNode}function s(a,b){var c=a,b=b||"";if(S.isElmt(a.nextSibling)||r(a,a.nextSibling))return b+X;for(;!c.nextSibling;)c=c.parentNode;return a!==c&&c.insertAdjacentHTML("afterEnd",""),b}function t(a,b){return a.isEnd&&0===a.index?b[1]+X+b[2]:0===a.index?s(a.node,a.text):a.text}function u(a){return 0===a.index?S.clone(Y):""}function v(a){var b=a.node.parentNode;return 0===a.index&&(Z=a.endIndexInNode-2),"h-hws"!==b.nodeName.toLowerCase()||1!==a.index&&a.indexInMatch!==Z||b.classList.add("quote-inner"),a.text}function w(a){var b=a.node.parentNode;return"h-hws"===b.nodeName.toLowerCase()&&b.classList.add("quote-outer"),a.text}function x(){var a,b=S.create("div");return b.innerHTML="a ba b",L.appendChild(b),a=b.firstChild.offsetWidth!==b.lastChild.offsetWidth,S.remove(b),a}function y(a){var b=a.nextSibling;b&&ba(b,"h-cs.jinze-outer")?b.classList.add("hangable-outer"):a.insertAdjacentHTML("afterend",aa)}function z(a){return a.replace(/(biaodian|cjk|bd-jiya|bd-consecutive|bd-hangable)/gi,"").trim()}function A(a){var b,c=a.text,d=a.node.parentNode,e=S.parent(d,"h-char.biaodian"),f=O.createBDChar(c);return f.innerHTML=""+c+"",f.classList.add(ea),(b=S.parent(d,"h-jinze"))&&C(b),e?function(){return e.classList.add(ea),ba(d,"h-inner, h-inner *")?c:f.firstChild}():f}function B(a){var b,c=ca,d=a.node.parentNode,e=S.parent(d,"h-char.biaodian"),f=S.parent(e,"h-jinze");return b=e.classList,c&&e.setAttribute("prev",c),da&&b.contains("bd-open")&&da.pop().setAttribute("next","bd-open"),da=void 0,a.isEnd?(ca=void 0,b.add(ga,"end-portion")):(ca=z(e.getAttribute("class")),b.add(ga)),f&&(da=D(f,{prev:c,"class":z(e.getAttribute("class"))})),a.text}function C(a){ba(a,".tou, .touwei")&&!ba(a.previousSibling,"h-cs.jiya-outer")&&a.insertAdjacentHTML("beforebegin",ha),ba(a,".wei, .touwei")&&!ba(a.nextSibling,"h-cs.jiya-outer")&&a.insertAdjacentHTML("afterend",ha)}function D(a,b){var c,d;return ba(a,".tou, .touwei")&&(c=a.previousSibling,ba(c,"h-cs")&&(c.className="jinze-outer jiya-outer",c.setAttribute("prev",b.prev))),ba(a,".wei, .touwei")&&(d=a.nextSibling,ba(d,"h-cs")&&(d.className="jinze-outer jiya-outer "+b["class"],d.removeAttribute("prev"))),[c,d]}function E(a,b,c){return function(){var d=O.localize.writeOnCanvas(b,a),e=O.localize.writeOnCanvas(c,a);return O.localize.compareCanvases(d,e)}}function F(){return E('"Romanization Sans"',"a\u030d","\udb80\udc61")}function G(){return E('"Romanization Sans"',"i\u030d","\udb80\udc69")}function H(){return E('"Zhuyin Kaiti"',"\u31b4\u0358","\udb8c\uddb4")}function I(a){return function(b){var b=b||J,c=O.find(b).avoid(ia);return a.forEach(function(a){c.replace(new RegExp(a[0],"ig"),function(b,c){var d=S.clone(ja);return d.innerHTML=""+c[0]+"",d.setAttribute("display-as",a[1]),0===b.index?d:""})}),c}}var J=a.document,K=J.documentElement,L=J.body,M="3.3.0",N=["initCond","renderElem","renderJiya","renderHanging","correctBiaodian","renderHWS","substCombLigaWithPUA"],O=function(a,b){return new O.fn.init(a,b)},P=function(){return arguments[0]&&(this.context=arguments[0]),arguments[1]&&(this.condition=arguments[1]),this};O.version=M,O.fn=O.prototype={version:M,constructor:O,context:L,condition:K,routine:N,init:P,setRoutine:function(a){return Array.isArray(a)&&(this.routine=a),this},render:function(a){var b=this,a=Array.isArray(a)?a:this.routine;return a.forEach(function(a){"string"==typeof a&&"function"==typeof b[a]?b[a]():Array.isArray(a)&&"function"==typeof b[a[0]]&&b[a.shift()].apply(b,a)}),this}},O.fn.init.prototype=O.fn,O.init=function(){return O.init=O().render()};var Q={punct:{base:"[\u2026,.;:!?\u203d_]",sing:"[\u2010-\u2014\u2026]",middle:"[\\/~\\-&\u2010-\u2014_]",open:"['\"\u2018\u201c\\(\\[\xa1\xbf\u2e18\xab\u2039\u201a\u201c\u201e]",close:"['\"\u201d\u2019\\)\\]\xbb\u203a\u201b\u201d\u201f]",end:"['\"\u201d\u2019\\)\\]\xbb\u203a\u201b\u201d\u201f\u203c\u203d\u2047-\u2049,.;:!?]"},biaodian:{base:"[\ufe30\uff0e\u3001\uff0c\u3002\uff1a\uff1b\uff1f\uff01\u30fc]",liga:"[\u2014\u2026\u22ef]",middle:"[\xb7\uff3c\uff0f\uff0d\u30a0\uff06\u30fb\uff3f]",open:"[\u300c\u300e\u300a\u3008\uff08\u3014\uff3b\uff5b\u3010\u3016]",close:"[\u300d\u300f\u300b\u3009\uff09\u3015\uff3d\uff5d\u3011\u3017]",end:"[\u300d\u300f\u300b\u3009\uff09\u3015\uff3d\uff5d\u3011\u3017\ufe30\uff0e\u3001\uff0c\u3002\uff1a\uff1b\uff1f\uff01\u30fc]"},hanzi:{base:"[\u4e00-\u9fff\u3400-\u4db5\u31c0-\u31e3\u3007\ufa0e\ufa0f\ufa11\ufa13\ufa14\ufa1f\ufa21\ufa23\ufa24\ufa27-\ufa29]|[\ud800-\udbff][\udc00-\udfff]",desc:"[\u2ff0-\u2ffa]",radical:"[\u2f00-\u2fd5\u2e80-\u2ef3]"},latin:{base:"[A-Za-z0-9\xc0-\xff\u0100-\u017f\u0180-\u024f\u2c60-\u2c7f\ua720-\ua7ff\u1e00-\u1eff]",combine:"[\u0300-\u0341\u1dc0-\u1dff]"},ellinika:{base:"[0-9\u0370-\u03ff\u1f00-\u1fff]",combine:"[\u0300-\u0345\u1dc0-\u1dff]"},kirillica:{base:"[0-9\u0400-\u0482\u048a-\u04ff\u0500-\u052f\ua640-\ua66e\ua67e-\ua697]",combine:"[\u0483-\u0489\u2de0-\u2dff\ua66f-\ua67d\ua69f]"},kana:{base:"[\u30a2\u30a4\u30a6\u30a8\u30aa-\u30fa\u3042\u3044\u3046\u3048\u304a-\u3094\u309f\u30ff]|\ud82c[\udc00-\udc01]",small:"[\u3041\u3043\u3045\u3047\u3049\u30a1\u30a3\u30a5\u30a7\u30a9\u3063\u3083\u3085\u3087\u308e\u3095\u3096\u30c3\u30e3\u30e5\u30e7\u30ee\u30f5\u30f6\u31f0-\u31ff]",combine:"[\u3099-\u309c]",half:"[\uff66-\uff9f]",mark:"[\u30a0\u309d\u309e\u30fb-\u30fe]"},eonmun:{base:"[\uac00-\ud7a3]",letter:"[\u1100-\u11ff\u314f-\u3163\u3131-\u318e\ua960-\ua97c\ud7b0-\ud7fb]",half:"[\uffa1-\uffdc]"},zhuyin:{base:"[\u3105-\u312d\u31a0-\u31ba]",initial:"[\u3105-\u3119\u312a-\u312c\u31a0-\u31a3]",medial:"[\u3127-\u3129]","final":"[\u311a-\u3129\u312d\u31a4-\u31b3\u31b8-\u31ba]",tone:"[\u02d9\u02ca\u02c5\u02c7\u02cb\u02ea\u02eb]",checked:"[\u31b4-\u31b7][\u0358\u030d]?"}},R=function(){var a="[\\x20\\t\\r\\n\\f]",b=Q.punct.open,c=(Q.punct.close,Q.punct.end),d=Q.punct.middle,e=Q.punct.sing,f=b+"|"+c+"|"+d,g=Q.biaodian.open,h=Q.biaodian.close,i=Q.biaodian.end,j=Q.biaodian.middle,k=Q.biaodian.liga+"{2}",l=g+"|"+i+"|"+j,m=Q.kana.base+Q.kana.combine+"?",n=Q.kana.small+Q.kana.combine+"?",o=Q.kana.half,p=Q.eonmun.base+"|"+Q.eonmun.letter,q=Q.eonmun.half,r=Q.hanzi.base+"|"+Q.hanzi.desc+"|"+Q.hanzi.radical+"|"+m,s=Q.ellinika.combine,t=Q.latin.base+s+"*",u=Q.ellinika.base+s+"*",v=Q.kirillica.combine,w=Q.kirillica.base+v+"*",x=t+"|"+u+"|"+w,y="['\u2019]",z=r+"|(?:"+x+"|"+y+")+",A=Q.zhuyin.initial,B=Q.zhuyin.medial,C=Q.zhuyin["final"],D=Q.zhuyin.tone+"|"+Q.zhuyin.checked;return{"char":{punct:{all:new RegExp("("+f+")","g"),open:new RegExp("("+b+")","g"),end:new RegExp("("+c+")","g"),sing:new RegExp("("+e+")","g")},biaodian:{all:new RegExp("("+l+")","g"),open:new RegExp("("+g+")","g"),close:new RegExp("("+h+")","g"),end:new RegExp("("+i+")","g"),liga:new RegExp("("+k+")","g")},hanzi:new RegExp("("+r+")","g"),latin:new RegExp("("+t+")","ig"),ellinika:new RegExp("("+u+")","ig"),kirillica:new RegExp("("+w+")","ig"),kana:new RegExp("("+m+"|"+n+"|"+o+")","g"),eonmun:new RegExp("("+p+"|"+q+")","g")},group:{biaodian:[new RegExp("(("+l+"){2,})","g"),new RegExp("("+k+g+")","g")],punct:null,hanzi:new RegExp("("+r+")+","g"),western:new RegExp("("+t+"|"+u+"|"+w+"|"+f+")+","ig"),kana:new RegExp("("+m+"|"+n+"|"+o+")+","g"),eonmun:new RegExp("("+p+"|"+q+"|"+f+")+","g")},jinze:{hanging:new RegExp(a+"*([\u3001\uff0c\u3002\uff0e])(?!"+i+")","ig"),touwei:new RegExp("("+g+"+)("+z+")("+i+"+)","ig"),tou:new RegExp("("+g+"+)("+z+")","ig"),wei:new RegExp("("+z+")("+i+"+)","ig"),middle:new RegExp("("+z+")("+j+")("+z+")","ig")},zhuyin:{form:new RegExp("^\u02d9?("+A+")?("+B+")?("+C+")?("+D+")?$"),diao:new RegExp("("+D+")","g")},hws:{base:[new RegExp("("+r+")("+x+"|"+b+")","ig"),new RegExp("("+x+"|"+c+")("+r+")","ig")],strict:[new RegExp("("+r+")"+a+"?("+x+"|"+b+")","ig"),new RegExp("("+x+"|"+c+")"+a+"?("+r+")","ig")]},"display-as":{"ja-font-for-hant":["\u67e5 \u67fb","\u555f \u5553","\u9109 \u9115","\u503c \u5024","\u6c61 \u6c5a"],"comb-liga-pua":[["a[\u030d\u0358]","\udb80\udc61"],["e[\u030d\u0358]","\udb80\udc65"],["i[\u030d\u0358]","\udb80\udc69"],["o[\u030d\u0358]","\udb80\udc6f"],["u[\u030d\u0358]","\udb80\udc75"],["\u31b4[\u030d\u0358]","\udb8c\uddb4"],["\u31b5[\u030d\u0358]","\udb8c\uddb5"],["\u31b6[\u030d\u0358]","\udb8c\uddb6"],["\u31b7[\u030d\u0358]","\udb8c\uddb7"]],"comb-liga-vowel":[["a[\u030d\u0358]","\udb80\udc61"],["e[\u030d\u0358]","\udb80\udc65"],["i[\u030d\u0358]","\udb80\udc69"],["o[\u030d\u0358]","\udb80\udc6f"],["u[\u030d\u0358]","\udb80\udc75"]],"comb-liga-zhuyin":[["\u31b4[\u030d\u0358]","\udb8c\uddb4"],["\u31b5[\u030d\u0358]","\udb8c\uddb5"],["\u31b6[\u030d\u0358]","\udb8c\uddb6"],["\u31b7[\u030d\u0358]","\udb8c\uddb7"]]},"inaccurate-char":[["[\u2022\u2027]","\xb7"],["\u22ef\u22ef","\u2026\u2026"],["\u2500\u2500","\u2014\u2014"],["\u2035","\u2018"],["\u2032","\u2019"],["\u2036","\u201c"],["\u2033","\u201d"]]}}();O.UNICODE=Q,O.TYPESET=R,O.UNICODE.cjk=O.UNICODE.hanzi,O.UNICODE.greek=O.UNICODE.ellinika,O.UNICODE.cyrillic=O.UNICODE.kirillica,O.UNICODE.hangul=O.UNICODE.eonmun,O.UNICODE.zhuyin.ruyun=O.UNICODE.zhuyin.checked,O.TYPESET["char"].cjk=O.TYPESET["char"].hanzi,O.TYPESET["char"].greek=O.TYPESET["char"].ellinika,O.TYPESET["char"].cyrillic=O.TYPESET["char"].kirillica,O.TYPESET["char"].hangul=O.TYPESET["char"].eonmun,O.TYPESET.group.hangul=O.TYPESET.group.eonmun,O.TYPESET.group.cjk=O.TYPESET.group.hanzi;var S={id:function(a,b){return(b||J).getElementById(a)},tag:function(a,b){return this.makeArray((b||J).getElementsByTagName(a))},qs:function(a,b){return(b||J).querySelector(a)},qsa:function(a,b){return this.makeArray((b||J).querySelectorAll(a))},parent:function(a,b){return b?function(){if("function"==typeof S.matches){for(;!S.matches(a,b);){if(!a||a===J.documentElement){a=void 0;break}a=a.parentNode}return a}}():a?a.parentNode:void 0},create:function(a,b){var c="!"===a?J.createDocumentFragment():""===a?J.createTextNode(b||""):J.createElement(a);try{b&&(c.className=b)}catch(d){}return c},clone:function(a,b){return a.cloneNode("boolean"==typeof b?b:!0)},remove:function(a){return a.parentNode.removeChild(a)},setAttr:function(a,b){if("object"==typeof b){var c=b.length;if("object"==typeof b[0]&&"name"in b[0])for(var d=0;c>d;d++)void 0!==b[d].value&&a.setAttribute(b[d].name,b[d].value);else for(var e in b)b.hasOwnProperty(e)&&void 0!==b[e]&&a.setAttribute(e,b[e]);return a}},isElmt:function(a){return a&&a.nodeType===Node.ELEMENT_NODE},isIgnorable:function(a){return a?"WBR"===a.nodeName||a.nodeType===Node.COMMENT_NODE:!1},makeArray:function(a){return Array.prototype.slice.call(a)},extend:function(a,b){if(("object"==typeof a||"function"==typeof a)&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}},T=function(b){function c(a,b,c){var d=Element.prototype,e=d.matches||d.mozMatchesSelector||d.msMatchesSelector||d.webkitMatchesSelector;return a instanceof Element?e.call(a,b):c&&/^[39]$/.test(a.nodeType)?!0:!1}var d="0.2.1",e=b.NON_INLINE_PROSE,f=b.PRESETS.prose.filterElements,g=a||{},h=g.document||void 0;if("undefined"==typeof h)throw new Error("Fibre requires a DOM-supported environment.");var i=function(a,b){return new i.fn.init(a,b)};return i.version=d,i.matches=c,i.fn=i.prototype={constructor:i,version:d,finder:[],context:void 0,portionMode:"retain",selector:{},preset:"prose",init:function(a,b){if(b&&(this.preset=null),this.selector={context:null,filter:[],avoid:[],boundary:[]},!a)throw new Error("A context is required for Fibre to initialise.");return a instanceof Node?a instanceof Document?this.context=a.body||a:this.context=a:"string"==typeof a&&(this.context=h.querySelector(a),this.selector.context=a),this},filterFn:function(a){var b=this.selector.filter.join(", ")||"*",d=this.selector.avoid.join(", ")||null,e=c(a,b,!0)&&!c(a,d);return"prose"===this.preset?f(a)&&e:e},boundaryFn:function(a){var b=this.selector.boundary.join(", ")||null,d=c(a,b);return"prose"===this.preset?e(a)||d:d},filter:function(a){return"string"==typeof a&&this.selector.filter.push(a),this},endFilter:function(a){return a?this.selector.filter=[]:this.selector.filter.pop(),this},avoid:function(a){return"string"==typeof a&&this.selector.avoid.push(a),this},endAvoid:function(a){return a?this.selector.avoid=[]:this.selector.avoid.pop(),this},addBoundary:function(a){return"string"==typeof a&&this.selector.boundary.push(a),this},removeBoundary:function(){return this.selector.boundary=[],this},setMode:function(a){return this.portionMode="first"===a?"first":"retain",this},replace:function(a,c){var d=this;return d.finder.push(b(d.context,{find:a,replace:c,filterElements:function(a){return d.filterFn(a)},forceContext:function(a){return d.boundaryFn(a)},portionMode:d.portionMode})),d},wrap:function(a,c){var d=this;return d.finder.push(b(d.context,{find:a,wrap:c,filterElements:function(a){return d.filterFn(a)},forceContext:function(a){return d.boundaryFn(a)},portionMode:d.portionMode})),d},revert:function(a){var b=this.finder.length,a=Number(a)||(0===a?Number(0):"all"===a?b:1);if("undefined"==typeof b||0===b)return this;a>b&&(a=b);for(var c=a;c>0;c--)this.finder.pop().revert();return this}},i.fn.filterOut=i.fn.avoid,i.fn.init.prototype=i.fn,i}(function(){function a(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function b(){return c.apply(null,arguments)||d.apply(null,arguments)}function c(a,c,e,f,g){if(c&&!c.nodeType&&arguments.length<=2)return!1;var h="function"==typeof e;h&&(e=function(a){return function(b,c){return a(b.text,c.startIndex)}}(e));var i=d(c,{find:a,wrap:h?null:e,replace:h?e:"$"+(f||"&"),prepMatch:function(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";if(f>0){var c=a[f];a.index+=a[0].indexOf(c),a[0]=c}return a.endIndex=a.index+a[0].length,a.startIndex=a.index,a.index=b,a},filterElements:g});return b.revert=function(){return i.revert()},!0}function d(a,b){return new e(a,b)}function e(a,c){var d=c.preset&&b.PRESETS[c.preset];if(c.portionMode=c.portionMode||f,d)for(var e in d)i.call(d,e)&&!i.call(c,e)&&(c[e]=d[e]);this.node=a,this.options=c,this.prepMatch=c.prepMatch||this.prepMatch,this.reverts=[],this.matches=this.search(),this.matches.length&&this.processMatches()}var f="retain",g="first",h=J,i=({}.toString,{}.hasOwnProperty);return b.NON_PROSE_ELEMENTS={br:1,hr:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1},b.NON_CONTIGUOUS_PROSE_ELEMENTS={address:1,article:1,aside:1,blockquote:1,dd:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,nav:1,noscript:1,ol:1,output:1,p:1,pre:1,section:1,ul:1,br:1,li:1,summary:1,dt:1,details:1,rp:1,rt:1,rtc:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1,table:1,tbody:1,thead:1,th:1,tr:1,td:1,caption:1,col:1,tfoot:1,colgroup:1},b.NON_INLINE_PROSE=function(a){return i.call(b.NON_CONTIGUOUS_PROSE_ELEMENTS,a.nodeName.toLowerCase())},b.PRESETS={prose:{forceContext:b.NON_INLINE_PROSE,filterElements:function(a){return!i.call(b.NON_PROSE_ELEMENTS,a.nodeName.toLowerCase())}}},b.Finder=e,e.prototype={search:function(){function b(a){for(var g=0,j=a.length;j>g;++g){var k=a[g];if("string"==typeof k){if(f.global)for(;c=f.exec(k);)h.push(i.prepMatch(c,d++,e));else(c=k.match(f))&&h.push(i.prepMatch(c,0,e));e+=k.length}else b(k)}}var c,d=0,e=0,f=this.options.find,g=this.getAggregateText(),h=[],i=this;return f="string"==typeof f?RegExp(a(f),"g"):f,b(g),h},prepMatch:function(a,b,c){if(!a[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return a.endIndex=c+a.index+a[0].length,a.startIndex=c+a.index,a.index=b,a},getAggregateText:function(){function a(d,e){if(3===d.nodeType)return[d.data];if(b&&!b(d))return[];var e=[""],f=0;if(d=d.firstChild)do if(3!==d.nodeType){var g=a(d);c&&1===d.nodeType&&(c===!0||c(d))?(e[++f]=g,e[++f]=""):("string"==typeof g[0]&&(e[f]+=g.shift()),g.length&&(e[++f]=g,e[++f]=""))}else e[f]+=d.data;while(d=d.nextSibling);return e}var b=this.options.filterElements,c=this.options.forceContext;return a(this.node)},processMatches:function(){var a,b,c,d=this.matches,e=this.node,f=this.options.filterElements,g=[],h=e,i=d.shift(),j=0,k=0,l=0,m=[e];a:for(;;){if(3===h.nodeType&&(!b&&h.length+j>=i.endIndex?b={node:h,index:l++,text:h.data.substring(i.startIndex-j,i.endIndex-j),indexInMatch:j-i.startIndex,indexInNode:i.startIndex-j,endIndexInNode:i.endIndex-j,isEnd:!0}:a&&g.push({node:h,index:l++,text:h.data,indexInMatch:j-i.startIndex,indexInNode:0}),!a&&h.length+j>i.startIndex&&(a={node:h,index:l++,indexInMatch:0,indexInNode:i.startIndex-j,endIndexInNode:i.endIndex-j,text:h.data.substring(i.startIndex-j,i.endIndex-j)}),j+=h.data.length),c=1===h.nodeType&&f&&!f(h),a&&b){if(h=this.replaceMatch(i,a,g,b),j-=b.node.data.length-b.endIndexInNode,a=null,b=null,g=[],i=d.shift(),l=0,k++,!i)break}else if(!c&&(h.firstChild||h.nextSibling)){h.firstChild?(m.push(h),h=h.firstChild):h=h.nextSibling;continue}for(;;){if(h.nextSibling){h=h.nextSibling;break}if(h=m.pop(),h===e)break a}}},revert:function(){for(var a=this.reverts.length;a--;)this.reverts[a]();this.reverts=[]},prepareReplacementString:function(a,b,c,d){var e=this.options.portionMode;return e===g&&b.indexInMatch>0?"":(a=a.replace(/\$(\d+|&|`|')/g,function(a,b){var d;switch(b){case"&":d=c[0];break;case"`":d=c.input.substring(0,c.startIndex);break;case"'":d=c.input.substring(c.endIndex);break;default:d=c[+b]}return d}),e===g?a:b.isEnd?a.substring(b.indexInMatch):a.substring(b.indexInMatch,b.indexInMatch+b.text.length))},getPortionReplacementNode:function(a,b,c){var d=this.options.replace||"$&",e=this.options.wrap;if(e&&e.nodeType){var f=h.createElement("div");f.innerHTML=e.outerHTML||(new XMLSerializer).serializeToString(e),e=f.firstChild}if("function"==typeof d)return d=d(a,b,c),d&&d.nodeType?d:h.createTextNode(String(d));var g="string"==typeof e?h.createElement(e):e;return d=h.createTextNode(this.prepareReplacementString(d,a,b,c)),d.data&&g?(g.appendChild(d),g):d},replaceMatch:function(a,b,c,d){var e,f,g=b.node,i=d.node;if(g===i){var j=g;b.indexInNode>0&&(e=h.createTextNode(j.data.substring(0,b.indexInNode)),j.parentNode.insertBefore(e,j));var k=this.getPortionReplacementNode(d,a);return j.parentNode.insertBefore(k,j),d.endIndexInNoden;++n){var p=c[n],q=this.getPortionReplacementNode(p,a);p.node.parentNode.replaceChild(q,p.node),this.reverts.push(function(a,b){return function(){b.parentNode.replaceChild(a.node,b)}}(p,q)),m.push(q)}var r=this.getPortionReplacementNode(d,a);return g.parentNode.insertBefore(e,g),g.parentNode.insertBefore(l,g),g.parentNode.removeChild(g),i.parentNode.insertBefore(r,i),i.parentNode.insertBefore(f,i),i.parentNode.removeChild(i),this.reverts.push(function(){e.parentNode.removeChild(e),l.parentNode.replaceChild(g,l),f.parentNode.removeChild(f),r.parentNode.replaceChild(i,r)}),r}},b}()),U=function(){var a=S.create("div");return a.appendChild(S.create("","0-")),a.appendChild(S.create("","2")),a.normalize(),2!==a.firstChild.length}();S.extend(T.fn,{normalize:function(){return U&&this.context.normalize(),this},jinzify:function(a){return this.filter(a||null).avoid("h-jinze").replace(R.jinze.touwei,function(a,b){var c=S.create("h-jinze","touwei");return c.innerHTML=b[0],0===a.index&&a.isEnd||1===a.index?c:""}).replace(R.jinze.wei,function(a,b){var c=S.create("h-jinze","wei");return c.innerHTML=b[0],0===a.index?c:""}).replace(R.jinze.tou,function(a,b){var c=S.create("h-jinze","tou");return c.innerHTML=b[0],0===a.index&&a.isEnd||1===a.index?c:""}).replace(R.jinze.middle,function(a,b){var c=S.create("h-jinze","middle");return c.innerHTML=b[0],0===a.index&&a.isEnd||1===a.index?c:""}).endAvoid().endFilter()},groupify:function(a){var a=S.extend({biaodian:!1,hanzi:!1,kana:!1,eonmun:!1,western:!1},a||{});return this.avoid("h-word, h-char-group"),a.biaodian&&this.replace(R.group.biaodian[0],d).replace(R.group.biaodian[1],d),(a.hanzi||a.cjk)&&this.wrap(R.group.hanzi,S.clone(S.create("h-char-group","hanzi cjk"))),a.western&&this.wrap(R.group.western,S.clone(S.create("h-word","western"))),a.kana&&this.wrap(R.group.kana,S.clone(S.create("h-char-group","kana"))),(a.eonmun||a.hangul)&&this.wrap(R.group.eonmun,S.clone(S.create("h-word","eonmun hangul"))),this.endAvoid(),this},charify:function(a){var a=S.extend({avoid:!0,biaodian:!1,punct:!1,hanzi:!1,latin:!1,ellinika:!1,kirillica:!1,kana:!1,eonmun:!1},a||{});return a.avoid&&this.avoid("h-char"),a.biaodian&&this.replace(R["char"].biaodian.all,c(a.biaodian)||function(a){return e(a.text)}).replace(R["char"].biaodian.liga,c(a.biaodian)||function(a){return e(a.text)}),(a.hanzi||a.cjk)&&this.wrap(R["char"].hanzi,c(a.hanzi||a.cjk)||S.clone(S.create("h-char","hanzi cjk"))),a.punct&&this.wrap(R["char"].punct.all,c(a.punct)||S.clone(S.create("h-char","punct"))),a.latin&&this.wrap(R["char"].latin,c(a.latin)||S.clone(S.create("h-char","alphabet latin"))),(a.ellinika||a.greek)&&this.wrap(R["char"].ellinika,c(a.ellinika||a.greek)||S.clone(S.create("h-char","alphabet ellinika greek"))),(a.kirillica||a.cyrillic)&&this.wrap(R["char"].kirillica,c(a.kirillica||a.cyrillic)||S.clone(S.create("h-char","alphabet kirillica cyrillic"))),a.kana&&this.wrap(R["char"].kana,c(a.kana)||S.clone(S.create("h-char","kana"))),(a.eonmun||a.hangul)&&this.wrap(R["char"].eonmun,c(a.eonmun||a.hangul)||S.clone(S.create("h-char","eonmun hangul"))),this.endAvoid(),this}}),S.extend(O,{isNodeNormalizeNormal:U,find:T,createBDGroup:d,createBDChar:e}),S.matches=O.find.matches,void["setMode","wrap","replace","revert","addBoundary","removeBoundary","avoid","endAvoid","filter","endFilter","jinzify","groupify","charify"].forEach(function(a){O.fn[a]=function(){return this.finder||(this.finder=O.find(this.context)),this.finder[a](arguments[0],arguments[1]),this}});var V={};V.writeOnCanvas=g,V.compareCanvases=h,V.detectFont=i,V.support=function(){function b(a){var b,c=a.charAt(0).toUpperCase()+a.slice(1),d=(a+" "+e.join(c+" ")+c).split(" ");return d.forEach(function(a){"string"==typeof f.style[a]&&(b=!0)}),b||!1}function c(a,b){var c,d,e,f=L||S.create("body"),g=S.create("div"),h=L?g:f,b="function"==typeof b?b:function(){};return c=[""].join(""),h.innerHTML+=c,f.appendChild(g),L||(f.style.background="",f.style.overflow="hidden",e=K.style.overflow,K.style.overflow="hidden",K.appendChild(f)),d=b(h,a),S.remove(h),L||(K.style.overflow=e),!!d}function d(b,c){var d;return a.getComputedStyle?d=J.defaultView.getComputedStyle(b,null).getPropertyValue(c):b.currentStyle&&(d=b.currentStyle[c]),d}var e="Webkit Moz ms".split(" "),f=S.create("h-test");return{columnwidth:b("columnWidth"),fontface:function(){var a;return c('@font-face { font-family: font; src: url("//"); }',function(b,c){var d=S.qsa("style",b)[0],e=d.sheet||d.styleSheet,f=e?e.cssRules&&e.cssRules[0]?e.cssRules[0].cssText:e.cssText||"":"";a=/src/i.test(f)&&0===f.indexOf(c.split(" ")[0])}),a}(),ruby:function(){var a,b=S.create("ruby"),c=S.create("rt"),e=S.create("rp");return b.appendChild(e),b.appendChild(c),K.appendChild(b),a="none"===d(e,"display")||"ruby"===d(b,"display")&&"ruby-text"===d(c,"display")?!0:!1,K.removeChild(b),b=null,c=null,e=null,a}(),"ruby-display":function(){var a=S.create("div");return a.innerHTML='',"ruby"===a.querySelector("h-test-a").style.display&&"ruby-text-container"===a.querySelector("h-test-b").style.display}(),"ruby-interchar":function(){var a,b="inter-character",c=S.create("div");return c.innerHTML='',a=c.querySelector("h-test").style,a.rubyPosition===b||a.WebkitRubyPosition===b||a.MozRubyPosition===b||a.msRubyPosition===b}(),textemphasis:b("textEmphasis"),unicoderange:function(){var a;return c('@font-face{font-family:test-for-unicode-range;src:local(Arial),local("Droid Sans")}@font-face{font-family:test-for-unicode-range;src:local("Times New Roman"),local(Times),local("Droid Serif");unicode-range:U+270C}',function(){a=!V.detectFont("test-for-unicode-range",'Arial, "Droid Sans"',"Q")}),a}(),writingmode:b("writingMode")}}(),V.initCond=function(a){var b,a=a||K,c="";for(var d in V.support)b=(V.support[d]?"":"no-")+d,a.classList.add(b),c+=b+" ";return c};var W=V.support["ruby-interchar"];S.extend(V,{renderRuby:function(a,b){var b=b||"ruby",c=S.qsa(b,a);S.qsa("rtc",a).concat(c).map(n),c.forEach(function(a){var b,c=a.classList;c.contains("complex")?b=l(a):c.contains("zhuyin")&&(b=W?k(a):j(a)),b&&a.parentNode.replaceChild(b,a)})},simplifyRubyClass:n,getZhuyinHTML:q,renderComplexRuby:l,renderSimpleRuby:j,renderInterCharRuby:k}),S.extend(V,{renderElem:function(a){this.renderRuby(a),this.renderDecoLine(a),this.renderDecoLine(a,"s, del"),this.renderEm(a)},renderDecoLine:function(a,b){var c=S.qsa(b||"u, ins",a),d=c.length;a:for(;d--;){var e=c[d],f=null;do{if(f=(f||e).previousSibling,!f)continue a;c[d-1]===f&&e.classList.add("adjacent")}while(S.isIgnorable(f))}},renderEm:function(a,b){var c=b?"qsa":"tag",b=b||"em",d=S[c](b,a);d.forEach(function(a){var b=O(a);V.support.textemphasis?b.avoid("rt, h-char").charify({biaodian:!0,punct:!0}):b.avoid("rt, h-char, h-char-group").jinzify().groupify({western:!0}).charify({hanzi:!0,biaodian:!0,punct:!0,latin:!0,ellinika:!0,kirillica:!0})})}}),O.normalize=V,O.localize=V,O.support=V.support,O.detectFont=V.detectFont,O.fn.initCond=function(){return this.condition.classList.add("han-js-rendered"),O.normalize.initCond(this.condition),this},void["Elem","DecoLine","Em","Ruby"].forEach(function(a){var b="render"+a;O.fn[b]=function(a){return O.normalize[b](this.context,a),this}}),S.extend(O.support,{heiti:!0,songti:O.detectFont('"Han Songti"'),"songti-gb":O.detectFont('"Han Songti GB"'),kaiti:O.detectFont('"Han Kaiti"'),fangsong:O.detectFont('"Han Fangsong"')}),O.correctBiaodian=function(a){var a=a||J,b=O.find(a);return b.avoid("h-char").replace(/([\u2018\u201c])/g,function(a){var b=O.createBDChar(a.text);return b.classList.add("bd-open","punct"),b}).replace(/([\u2019\u201d])/g,function(a){var b=O.createBDChar(a.text);return b.classList.add("bd-close","bd-end","punct"),b}),O.support.unicoderange?b:b.charify({biaodian:!0})},O.correctBasicBD=O.correctBiaodian,O.correctBD=O.correctBiaodian,S.extend(O.fn,{biaodian:null,correctBiaodian:function(){return this.biaodian=O.correctBiaodian(this.context),this},revertCorrectedBiaodian:function(){try{this.biaodian.revert("all")}catch(a){}return this}}),O.fn.correctBasicBD=O.fn.correctBiaodian,O.fn.revertBasicBD=O.fn.revertCorrectedBiaodian;var X="<>",Y=S.create("h-hws");Y.setAttribute("hidden",""),Y.innerHTML=" ";var Z;S.extend(O,{renderHWS:function(a,b){var c=b?"textarea, code, kbd, samp, pre":"textarea",d=b?"strict":"base",a=a||J,e=O.find(a); -return e.avoid(c).replace(O.TYPESET.hws[d][0],t).replace(O.TYPESET.hws[d][1],t).replace(new RegExp("("+X+")+","g"),u).replace(/([\'"])\s(.+?)\s\1/g,v).replace(/\s[\u2018\u201c]/g,w).replace(/[\u2019\u201d]\s/g,w).normalize(),e}}),S.extend(O.fn,{renderHWS:function(a){return O.renderHWS(this.context,a),this},revertHWS:function(){return S.tag("h-hws",this.context).forEach(function(a){S.remove(a)}),this.HWS=[],this}});var $="bd-hangable",_="h-char.bd-hangable",aa='',ba=O.find.matches;O.support["han-space"]=x(),S.extend(O,{detectSpaceFont:x,isSpaceFontLoaded:x(),renderHanging:function(a){var a=a||J,b=O.find(a);return b.avoid("textarea, code, kbd, samp, pre").avoid(_).replace(R.jinze.hanging,function(a){if(/^[\x20\t\r\n\f]+$/.test(a.text))return"";var b,c,d,e,f=a.node.parentNode;return(b=S.parent(f,"h-jinze"))&&y(b),e=a.text.trim(),c=O.createBDChar(e),c.innerHTML=""+e+"",c.classList.add($),d=S.parent(f,"h-char.biaodian"),d?function(){return d.classList.add($),ba(f,"h-inner, h-inner *")?e:c.firstChild}():c}),b}}),S.extend(O.fn,{renderHanging:function(){var a=this.condition.classList;return O.isSpaceFontLoaded=x(),O.isSpaceFontLoaded&&a.contains("no-han-space")&&(a.remove("no-han-space"),a.add("han-space")),O.renderHanging(this.context),this},revertHanging:function(){return S.qsa("h-char.bd-hangable, h-cs.hangable-outer",this.context).forEach(function(a){var b=a.classList;b.remove("bd-hangable"),b.remove("hangable-outer")}),this}});var ca,da,ea="bd-jiya",fa="h-char.bd-jiya",ga="bd-consecutive",ha='',ba=O.find.matches;O.renderJiya=function(a){var a=a||J,b=O.find(a);return b.avoid("textarea, code, kbd, samp, pre, h-cs").avoid(fa).charify({avoid:!1,biaodian:A}).endAvoid().avoid("textarea, code, kbd, samp, pre, h-cs").replace(R.group.biaodian[0],B).replace(R.group.biaodian[1],B),b},S.extend(O.fn,{renderJiya:function(){return O.renderJiya(this.context),this},revertJiya:function(){return S.qsa("h-char.bd-jiya, h-cs.jiya-outer",this.context).forEach(function(a){var b=a.classList;b.remove("bd-jiya"),b.remove("jiya-outer")}),this}});var ia="textarea, code, kbd, samp, pre",ja=S.create("h-char","comb-liga");return S.extend(O,{isVowelCombLigaNormal:F(),isVowelICombLigaNormal:G(),isZhuyinCombLigaNormal:H(),isCombLigaNormal:G()(),substVowelCombLiga:I(O.TYPESET["display-as"]["comb-liga-vowel"]),substZhuyinCombLiga:I(O.TYPESET["display-as"]["comb-liga-zhuyin"]),substCombLigaWithPUA:I(O.TYPESET["display-as"]["comb-liga-pua"]),substInaccurateChar:function(a){var a=a||J,b=O.find(a);b.avoid(ia),O.TYPESET["inaccurate-char"].forEach(function(a){b.replace(new RegExp(a[0],"ig"),a[1])})}}),S.extend(O.fn,{"comb-liga-vowel":null,"comb-liga-vowel-i":null,"comb-liga-zhuyin":null,"inaccurate-char":null,substVowelCombLiga:function(){return this["comb-liga-vowel"]=O.substVowelCombLiga(this.context),this},substVowelICombLiga:function(){return this["comb-liga-vowel-i"]=O.substVowelICombLiga(this.context),this},substZhuyinCombLiga:function(){return this["comb-liga-zhuyin"]=O.substZhuyinCombLiga(this.context),this},substCombLigaWithPUA:function(){return O.isVowelCombLigaNormal()?O.isVowelICombLigaNormal()||(this["comb-liga-vowel-i"]=O.substVowelICombLiga(this.context)):this["comb-liga-vowel"]=O.substVowelCombLiga(this.context),O.isZhuyinCombLigaNormal()||(this["comb-liga-zhuyin"]=O.substZhuyinCombLiga(this.context)),this},revertVowelCombLiga:function(){try{this["comb-liga-vowel"].revert("all")}catch(a){}return this},revertVowelICombLiga:function(){try{this["comb-liga-vowel-i"].revert("all")}catch(a){}return this},revertZhuyinCombLiga:function(){try{this["comb-liga-zhuyin"].revert("all")}catch(a){}return this},revertCombLigaWithPUA:function(){try{this["comb-liga-vowel"].revert("all"),this["comb-liga-vowel-i"].revert("all"),this["comb-liga-zhuyin"].revert("all")}catch(a){}return this},substInaccurateChar:function(){return this["inaccurate-char"]=O.substInaccurateChar(this.context),this},revertInaccurateChar:function(){try{this["inaccurate-char"].revert("all")}catch(a){}return this}}),a.addEventListener("DOMContentLoaded",function(){var a;K.classList.contains("han-init")?O.init():(a=J.querySelector(".han-init-context"))&&(O.init=O(a).render())}),("undefined"==typeof b||b===!1)&&(a.Han=O),O}); \ No newline at end of file diff --git a/lib/algolia-instant-search/instantsearch.min.css b/lib/algolia-instant-search/instantsearch.min.css deleted file mode 100644 index 590f6f9..0000000 --- a/lib/algolia-instant-search/instantsearch.min.css +++ /dev/null @@ -1 +0,0 @@ -/*! instantsearch.js 1.5.0 | © Algolia Inc. and other contributors; Licensed MIT | github.com/algolia/instantsearch.js */.ais-search-box--powered-by{font-size:.8em;text-align:right;margin-top:2px}.ais-search-box--powered-by-link{display:inline-block;width:45px;height:16px;text-indent:101%;overflow:hidden;white-space:nowrap;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAAAgCAYAAABwzXTcAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjVlhTJlAAAIJElEQVRoQ+1Za2xURRTugqJVEBAlhICBRFEQeRfodssqiDZaS8vu3dsXVlAbxReJwVfAoqJ/sBqE3S1IgqgBrY9EQ6KJiUAokUfpvQUKogIBlKbyEEUolNL6ndkzw9129+72YaFJv+Rk737nzMyZ756dmXs3oQtd6EJ7oaioqJvX603kr1cl8vPzb+TLzo3MzMx+Xk0r03y+0x5Ne4vpqwoohjeQ4yHYcaYiwcGfVz+ysrIGQfBGsqtWdE37lvLz+nwnmVLIyMjoBd9GxPwL/wKmOw4zCgr6YPBNSGILEviYaVt0dtHxK/DK/BFXq2lad3Z1DJDUqzIBYZrmYldUdLToI4r29HCWmLozUPmEK2AUOgOmRysttRXKTnSPxzMWfD37q0B13DJTUFBwPQatlgKKJJAsu6Oio0VPDlQsTgmajWEWMOaxOyLsRCdQccGez87OHshUxwAJzZbiIYFKkaSmXdJ1fRiHRERHi+4MGk+mBMwXnSVGPj7nQPS3qeLZHRGxRL9ScCAxk8Ur92Rnj5VCItHlHBMRrRDdQRXl8/nG4eaOp5uKz57sC8OkoDEkOWCO5K8CtJRgabnT6TfuS/ZXOKet2duPXVHRDqI7svLz+yPnJCxH07ANuGFDiQ+5WwF0NkWJrOuziEOCm5n7Jy8v7yYRGAHxio4kEyHuK+j3oIyXRr8o2G/wrUXMGIonQbFe18Kq3Ms39By/orw3KnsxKr06fHkxLjkDxubkEuNhMVAE2Ikuni98vsMYtwafQaYVwLvQ9qg1X2mI/xXzyuXQlgGNP+NO/kxLS7tOcOhMda7rz4rACIhH9Ky8vEGY+G4ZZ2ua9hi1gbhvQvBDScu3DUC1j8X1YSV0wDgLsX9m7tJl3lw9onRPDzGoBTFFp1NLyL+WaQUU5GSZG+IuIeYCrhskJ3ivN6o+EYFJDuCOaNBipuXGepI73gMq4k8pluh0E5GsXLoo8U1IMgPLyhDYYExqNL6/Lv1S9FT/7sHOkp0TXCvNYbgBp0hUfB6A2D6rsKn+7YMh9nvOoHkxJL6xLiGhMSzXtoiOfHqDn41ch5MmFC+O1ihEtDnP7c5QHDeJDTSQx8QGTH4E0wLwLWVfo0fXU5kOQyzR0ecL0o/EvoI1O95ZlzcpugAmiKVjKwu+1f2+0Yc9As5VZb3gX4JfQn9XwEyH+HUi1m/kc4hAW0S3A3J9TeaNOWQybQ8aEA0O8IDbmFagM6zsFP5PmA5DTNF5WUH7c7QZMR2GaKK7Ssw0FvyMe2XlIKYVUkrMR4Q/YB6b4t85HKIv5Pj9CY2Xq/3/Ep2qX+aN4prPtD0w2ftlI0z2GaatsJ5qztLPinkFO9Fzc3P7ghfrH/r5nulmiCY6qnhVSEQz4gkKIvvJD2sQS8yqfb3wifWeuN2jOazdRIewibQszszJuYO0yMnJuUXmjbZFHGYPTHAdN7iQOWtWxKMXfPNkx5FujJ3oEHOk9KGfpUw3QzTRsWHuCAloZDFlQaMDN+Ugqrocy8tUJulG/Mg34lGm2iR6YWHhteDnIq8diLmo8gwV0zH5HTGxRcddu1kOhg6PotGCKKbWdVg5N1eIIfpo1VbT3mW6GWxE30cCulbscjOlkLRsb7+UQGUuVOvGlABu0JdC9IChCqS1olNlg9+ocqOY0PG2FrHi1YHi4xJd15+2NorTaLO9h7sQsBOdTieqLX5VTDdD9OXFLCMBm26MdqANV7QpMXWm2iK69VS1AXmm0AmGfOIX4PUmS398omPjFME0oKZtsTPEqDM22qljJcFOdLTtDv4E+2vkM0BT2FR6sRAwaJQyZYuJ2Gyx5NSj2htSPzDpiVGg1aLzfga+mqqeaQX6L0HmjRh70a27Lib5KdNRgZjelsSq3W73NewKEx1xYaITwJVY/IuYDkM00Scv2zGOBETF1+MkM4npqIDga8RNwhMqUwKtFt3n+13wmlbGVBhaJDom9o4MxoQfYtoW6PQLNYDXqx65cX2r4n2+j5hWoN0e/BmOoeUpgDFH0qsFXA+FPQ5/lezDKjoBoq8Ta3TQ/MPl3zWK6XBAOMQtCglu1qcsN8NeScvcIV5d01cadqIjF9o8qd0p+rODaYW4RedBjnBwjbVq7QChPJYBPmda9Ef9sO88fC/NnDnzLnYL4MFqBvk4xt6aiO5ebfSBoLu5gmtxXZzsr0hyBXb1xRFxYHKwwivXfrJkv/EyN1VAn4tk/8hvPebyIK3J5ItR6Qssee1Ageh4drkbn7dT4fC8ZL/RRUeDqZZA2zeIVqAd7eSnud05JKEee3GtnsyEYUlhlwK4MWi3HiZeOVjsF/g+VN+biE6gN4nOYOV3UtiIhvO5028+xU3CgD5vg7B/yzFwXSf3FzvR6Y9s+Lar3GwMbW1Ex7kbHW0iw12bwHRcQPILVVtdn8Y0wYF+52LwChhV+3PMN8N0TARVQu9bJtKLMFAO5HGvSh7VFIpsikaHeNQPGt9A5JMkNG2asP2wJfSuhgMjwpOdPQp5fY0xTiD/vUxL0X8Q88JphWkF8Q5K1+dj7hVoby2Yi+Bq0G4nPkvRdjo36XiI5aaF/zNiUur9DN0Mpu3gmFx8JHH8inKxRLQUcmlpKWhesN4Zc+b0aukcrwSivuynR2lUkHjHjqo53lpBumABKjcRolbBluJ6FpaWKVTNWJ4eQLXQXnD5DwJ852ZdaAsgsvoTwM5wU1Z3hp9spwCqeigELcbS8RPE/QvX9M6iAd/rcH0YtrbJptyFdoYD1dwjPT39hnifD7rQhTiRkPAfxnOcWpCmnRwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;vertical-align:middle}.ais-pagination--item{display:inline-block;padding:3px}.ais-range-slider--value,.ais-range-slider--value-sub{font-size:.8em;padding-top:15px}.ais-pagination--item__disabled{visibility:hidden}.ais-hierarchical-menu--list__lvl1,.ais-hierarchical-menu--list__lvl2{margin-left:10px}.ais-range-slider--target{position:relative;direction:ltr;background:#F3F4F7;height:6px;margin-top:2em;margin-bottom:2em}.ais-range-slider--base{height:100%;position:relative;z-index:1;border-top:1px solid #DDD;border-bottom:1px solid #DDD;border-left:2px solid #DDD;border-right:2px solid #DDD}.ais-range-slider--origin{position:absolute;right:0;top:0;left:0;bottom:0}.ais-range-slider--connect{background:#46AEDA}.ais-range-slider--background{background:#F3F4F7}.ais-range-slider--handle{width:20px;height:20px;position:relative;z-index:1;background:#FFF;border:1px solid #46AEDA;border-radius:50%;cursor:pointer}.ais-range-slider--handle-lower{left:-10px;bottom:7px}.ais-range-slider--handle-upper{right:10px;bottom:7px}.ais-range-slider--tooltip{position:absolute;background:#FFF;top:-22px;font-size:.8em}.ais-range-slider--pips{box-sizing:border-box;position:absolute;height:3em;top:100%;left:0;width:100%}.ais-range-slider--value{width:40px;position:absolute;text-align:center;margin-left:-20px}.ais-range-slider--marker{position:absolute;background:#DDD;margin-left:-1px;width:1px;height:5px}.ais-range-slider--marker-sub{background:#DDD;width:2px;margin-left:-2px;height:13px}.ais-range-slider--marker-large{background:#DDD;width:2px;margin-left:-2px;height:12px}.ais-star-rating--star,.ais-star-rating--star__empty{display:inline-block;width:1em;height:1em}.ais-range-slider--marker-large:first-child{margin-left:0}.ais-star-rating--item{vertical-align:middle}.ais-star-rating--item__active{font-weight:700}.ais-star-rating--star:before{content:'\2605';color:#FBAE00}.ais-star-rating--star__empty:before{content:'\2606';color:#FBAE00}.ais-star-rating--link__disabled .ais-star-rating--star:before,.ais-star-rating--link__disabled .ais-star-rating--star__empty:before{color:#C9C9C9}.ais-root__collapsible .ais-header{cursor:pointer}.ais-root__collapsed .ais-body,.ais-root__collapsed .ais-footer{display:none} \ No newline at end of file diff --git a/lib/algolia-instant-search/instantsearch.min.js b/lib/algolia-instant-search/instantsearch.min.js deleted file mode 100644 index 2bd5d59..0000000 --- a/lib/algolia-instant-search/instantsearch.min.js +++ /dev/null @@ -1,15 +0,0 @@ -/*! instantsearch.js 1.5.0 | © Algolia Inc. and other contributors; Licensed MIT | github.com/algolia/instantsearch.js */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.instantsearch=t():e.instantsearch=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o);e.exports=i["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),n(2),n(3);var o=n(4),i=r(o),a=n(5),s=r(a),u=n(99),l=r(u),c=n(222),f=r(c),p=n(400),d=r(p),h=n(404),m=r(h),v=n(408),g=r(v),y=n(411),b=r(y),_=n(416),C=r(_),w=n(420),x=r(w),P=n(422),E=r(P),R=n(424),S=r(R),O=n(425),T=r(O),k=n(432),N=r(k),j=n(437),A=r(j),M=n(439),F=r(M),I=n(443),D=r(I),U=n(444),L=r(U),H=n(447),V=r(H),B=n(450),q=r(B),W=n(220),K=r(W),Q=(0,i["default"])(s["default"]);Q.widgets={clearAll:f["default"],currentRefinedValues:d["default"],hierarchicalMenu:m["default"],hits:g["default"],hitsPerPageSelector:b["default"],menu:C["default"],refinementList:x["default"],numericRefinementList:E["default"],numericSelector:S["default"],pagination:T["default"],priceRanges:N["default"],searchBox:A["default"],rangeSlider:F["default"],sortBySelector:D["default"],starRating:L["default"],stats:V["default"],toggle:q["default"]},Q.version=K["default"],Q.createQueryString=l["default"].url.getQueryStringFromState,t["default"]=Q},function(e,t){"use strict";Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e})},function(e,t){"use strict";var n={};if(!Object.setPrototypeOf&&!n.__proto__){var r=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:r.call(Object,e)}}},function(e,t){"use strict";function n(e){var t=function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return new(r.apply(e,[null].concat(n)))};return t.__proto__=e,t.prototype=e.prototype,t}var r=Function.prototype.bind;e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){return"#"}function u(e,t){if(!t.getConfiguration)return e;var n=t.getConfiguration(e);return(0,y["default"])({},e,n,function(e,t){return Array.isArray(e)?(0,_["default"])(e,t):void 0})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;te;e+=2){var t=re[e],n=re[e+1];t(n),re[e]=void 0,re[e+1]=void 0}G=0}function v(){try{var e=n(11);return Q=e.runOnLoop||e.runOnContext,f()}catch(t){return h()}}function g(e,t){var n=this,r=n._state;if(r===se&&!e||r===ue&&!t)return this;var o=new this.constructor(b),i=n._result;if(r){var a=arguments[r-1];X(function(){F(r,o,a,i)})}else N(n,o,e,t);return o}function y(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(b);return S(n,e),n}function b(){}function _(){return new TypeError("You cannot resolve a promise with itself")}function C(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return le.error=t,le}}function x(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function P(e,t,n){X(function(e){var r=!1,o=x(n,t,function(n){r||(r=!0,t!==n?S(e,n):T(e,n))},function(t){r||(r=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,k(e,o))},e)}function E(e,t){t._state===se?T(e,t._result):t._state===ue?k(e,t._result):N(t,void 0,function(t){S(e,t)},function(t){k(e,t)})}function R(e,t,n){t.constructor===e.constructor&&n===oe&&constructor.resolve===ie?E(e,t):n===le?k(e,le.error):void 0===n?T(e,t):s(n)?P(e,t,n):T(e,t)}function S(e,t){e===t?k(e,_()):a(t)?R(e,t,w(t)):T(e,t)}function O(e){e._onerror&&e._onerror(e._result),j(e)}function T(e,t){e._state===ae&&(e._result=t,e._state=se,0!==e._subscribers.length&&X(j,e))}function k(e,t){e._state===ae&&(e._state=ue,e._result=t,X(O,e))}function N(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+se]=n,o[i+ue]=r,0===i&&e._state&&X(j,e)}function j(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,a=0;aa;a++)N(r.resolve(e[a]),void 0,t,n);return o}function L(e){var t=this,n=new t(b);return k(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function V(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(e){this._id=he++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&H(),this instanceof B?I(this,e):V())}function q(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&T(this.promise,this._result))):k(this.promise,this._validationError())}function W(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(e.Promise=me)}var K;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,$,z,Y=K,G=0,X=function(e,t){re[G]=e,re[G+1]=t,G+=2,2===G&&($?$(m):z())},J="undefined"!=typeof window?window:void 0,Z=J||{},ee=Z.MutationObserver||Z.WebKitMutationObserver,te="undefined"!=typeof e&&"[object process]"==={}.toString.call(e),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3);z=te?c():ee?p():ne?d():void 0===J?v():h();var oe=g,ie=y,ae=void 0,se=1,ue=2,le=new A,ce=new A,fe=D,pe=U,de=L,he=0,me=B;B.all=fe,B.race=pe,B.resolve=ie,B.reject=de,B._setScheduler=u,B._setAsap=l,B._asap=X,B.prototype={constructor:B,then:oe,"catch":function(e){return this.then(null,e)}};var ve=q;q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&e>n;n++)this._eachEntry(t[n],n)},q.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===ie){var o=w(e);if(o===oe&&e._state!==ae)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===me){var i=new n(b);R(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},q.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ae&&(this._remaining--,e===ue?k(r,n):this._result[t]=n),0===this._remaining&&T(r,this._result)},q.prototype._willSettleAt=function(e,t){var n=this;N(e,void 0,function(e){n._settledAt(se,t,e)},function(e){n._settledAt(ue,t,e)})};var ge=W,ye={Promise:me,polyfill:ge};n(12).amd?(r=function(){return ye}.call(t,n,t,i),!(void 0!==r&&(i.exports=r))):"undefined"!=typeof i&&i.exports?i.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),ge()}).call(this)}).call(t,n(9),function(){return this}(),n(10)(e))},function(e,t){function n(){l=!1,a.length?u=a.concat(u):c=-1,u.length&&r()}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(a=u,u=[];++c1)for(var n=1;n=u.hosts[e.hostType].length&&(d||!h)?u._promise.reject(r):(u.hostIndex[e.hostType]=++u.hostIndex[e.hostType]%u.hosts[e.hostType].length,r instanceof c.RequestTimeout?v():(d||(f=1/0),t(n,s)))}function v(){return u.hostIndex[e.hostType]=++u.hostIndex[e.hostType]%u.hosts[e.hostType].length,s.timeout=u.requestTimeout*(f+1),t(n,s)}var g;if(u._useCache&&(g=e.url),u._useCache&&r&&(g+="_body_"+s.body),u._useCache&&a&&void 0!==a[g])return i("serving response from cache"),u._promise.resolve(JSON.parse(a[g]));if(f>=u.hosts[e.hostType].length)return!h||d?(i("could not get any response"),u._promise.reject(new c.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+u.applicationID))):(i("switching to fallback"),f=0,s.method=e.fallback.method,s.url=e.fallback.url,s.jsonBody=e.fallback.body,s.jsonBody&&(s.body=l(s.jsonBody)),o=u._computeRequestHeaders(),s.timeout=u.requestTimeout*(f+1),u.hostIndex[e.hostType]=0,d=!0,t(u._request.fallback,s));var y=u.hosts[e.hostType][u.hostIndex[e.hostType]]+s.url,b={body:s.body,jsonBody:s.jsonBody,method:s.method,headers:o,timeout:s.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",b.method,y,b.headers,b.timeout),n===u._request.fallback&&i("using fallback"),n.call(u,y,b).then(p,m)}var r,o,i=n(42)("algoliasearch:"+e.url),a=e.cache,u=this,f=0,d=!1,h=u._useFallback&&u._request.fallback&&e.fallback;this.apiKey.length>p&&void 0!==e.body&&void 0!==e.body.params?(e.body.apiKey=this.apiKey,o=this._computeRequestHeaders(!1)):o=this._computeRequestHeaders(),void 0!==e.body&&(r=l(e.body)),i("request start");var m=t(u._request,{url:e.url,method:e.method,body:r,jsonBody:e.body,timeout:u.requestTimeout*(f+1)});return e.callback?void m.then(function(t){s(function(){e.callback(null,t)},u._setTimeout||setTimeout)},function(t){s(function(){e.callback(t)},u._setTimeout||setTimeout)}):m},_getSearchParams:function(e,t){if(void 0===e||null===e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?l(e[n]):e[n]));return t},_computeRequestHeaders:function(e){var t=n(15),r={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return e!==!1&&(r["x-algolia-api-key"]=this.apiKey),this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},r.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,n){var r=this;return 1!==arguments.length&&"function"!=typeof t||(n=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:n})},addObjects:function(e,t){var r=n(34),o="Usage: index.addObjects(arrayOfObjects[, callback])";if(!r(e))throw new Error(o);for(var i=this,a={requests:[]},s=0;sa&&(t=a),"published"!==e.status?c._promise.delay(t).then(n):e})}function r(e){s(function(){t(null,e)},c._setTimeout||setTimeout)}function o(e){s(function(){t(e)},c._setTimeout||setTimeout)}var i=100,a=5e3,u=0,l=this,c=l.as,f=n();return t?void f.then(r,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var n=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){var o=n(34),i="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!o(e))throw new Error(i);1!==arguments.length&&"function"!=typeof t||(r=t,t=null);var a={acl:e};return t&&(a.validity=t.validity,a.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,a.maxHitsPerQuery=t.maxHitsPerQuery,a.description=t.description,t.queryParameters&&(a.queryParameters=this.as._getSearchParams(t.queryParameters,"")),a.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:a,hostType:"write",callback:r})},addUserKeyWithValidity:u(function(e,t,n){return this.addUserKey(e,t,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,o){var i=n(34),a="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!i(t))throw new Error(a);2!==arguments.length&&"function"!=typeof r||(o=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.description=r.description,r.queryParameters&&(s.queryParameters=this.as._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:s,hostType:"write",callback:o})},_search:function(e,t,n){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:n})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},function(e,t,n){"use strict";function r(e,t){var r=n(15),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=e||"Unknown error",t&&r(t,function(e,t){o[t]=e})}function o(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return i(n,r),n}var i=n(7);i(r,Error),e.exports={AlgoliaSearchError:r,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","