diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..063b0e4 --- /dev/null +++ b/.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/AppleALC-to-AppleHDA/index.html b/AppleALC-to-AppleHDA/index.html deleted file mode 100644 index b69582b..0000000 --- a/AppleALC-to-AppleHDA/index.html +++ /dev/null @@ -1,694 +0,0 @@ - - - - - - - 使用AppleALC自制声卡驱动 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 使用AppleALC自制声卡驱动 -

使用AppleALC自制声卡驱动

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

-

Mac下进入网课直播间软件和系统组件卡死,经排查发现问题在万能声卡驱动VoodooHDA,开始研究通过AppleALC原生注入声卡驱动

- - -
-

感谢黑果小兵的教程

-
-

分析

我的设备是台式机,有四个显卡输出,两个音频线输出,显卡输出已经有了,但是我没有自带音箱的显示屏,音频输出需要依靠一前一后两个音频输出,后面接音箱,前面接耳机

-

通过Ubuntu提取关键信息

这里使用Ubuntu19.04提取Code/acpi,并找到有效节点
做成系统启动u盘之后,开机选择启动项,用livecd(不用安装)启动系统

-

这样启动的系统root密码为空,可以用sudo passwd root来设置密码

-

提取Codec/acpi

组合键CTRL+ALT+t打开终端

-
cd ~/Desktop/ # 进入用户桌面
-cp /proc/asound/card0/codec* . # 将codec开头的文件复制到当时位置
-sudo cp -R /sys/firmware/acpi/tables .  # 将acpi/tables目录复制到当时位置,tables目录包括了全部的DSDT和SSDT
-ll   # 列表
-sudo chown -R ubuntu:ubuntu *   # 将当前目录下所有文件及目录所有人修改为ubuntu
-ll   # 列表
-
-

找出有效节点

终端输入dmesg | grep snd_hda_codec_realtek结果如下

-
ubuntu@ubuntu:~$ dmesg | grep snd_hda_codec_realtek
-[   19.282672] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
-[   19.282673] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
-[   19.282674] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
-[   19.282675] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
-[   19.282675] snd_hda_codec_realtek hdaudioC0D0:    inputs:
-[   19.282676] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x18
-[   19.282676] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1b
-
-

经过整理,有效节点为

-
    -
  • 0x14 Speakerout
  • -
  • 0x21 HP out
  • -
  • 0x18 Mic in
  • -
  • 0x1b Line in
  • -
-

这种方法比在Mac下通过verbit.sh codec#0提取信息再整理有效节点方便得多,也不会出错:
注意这里Address: 0,后面会用上

-
user$./verbit.sh codec#0
-Verbs from Linux Codec Dump File: codec#0
-
-Codec: Realtek ALC671   Address: 0   DevID: 283903601 (0x10ec0671)
-
-   Jack   Color  Description                  Node     PinDefault             Original Verbs
---------------------------------------------------------------------------------------------------------
-Unknown Unknown  Line Out at Ext N/A         18 0x12   0x40000000   01271c00 01271d00 01271e00 01271f40
-    1/8   Green  Line Out at Ext Rear        20 0x14   0x01014010   01471c10 01471d40 01471e01 01471f01
-    1/8   Black  Speaker at Ext Rear         23 0x17   0x411111f0   01771cf0 01771d11 01771e11 01771f41
- Mic at Ext Rear    0x18 0x18                        27365440 01871c40 01871d90     01871ea1 01871f01  
-    1/8   Black  Speaker at Ext Rear         25 0x19   0x411111f0   01971cf0 01971d11 01971e11 01971f41
-    1/8   Black  Speaker at Ext Rear         26 0x1a   0x411111f0   01a71cf0 01a71d11 01a71e11 01a71f41
- Line In at Ext Rear    0x1b 0x1b                        25243696 01b71c30 01b71d30     01b71e81 01b71f01  
-  ATAPI   Green  SPDIF Out at Ext N/A        29 0x1d   0x40434601   01d71c01 01d71d46 01d71e43 01d71f40
-    1/8   Black  Speaker at Ext Rear         30 0x1e   0x411111f0   01e71cf0 01e71d11 01e71e11 01e71f41
-    1/8   Black  HP Out at Ext Front         33 0x21   0x02211020   02171c20 02171d10 02171e21 02171f02
---------------------------------------------------------------------------------------------------------
-
-
-   Jack   Color  Description                  Node     PinDefault             Modified Verbs
---------------------------------------------------------------------------------------------------------
-Unknown Unknown  Line Out at Ext N/A         18 0x12   0x40000000   01271c00 01271d00 01271e00 01271f40
-    1/8   Green  Line Out at Ext Rear        20 0x14   0x01014010   01471c50 01471d40 01471e01 01471f01
- Mic at Ext Rear    0x18 0x18                        27365440 01871c40 01871d90     01871ea1 01871f01  
- Line In at Ext Rear    0x1b 0x1b                        25243696 01b71c30 01b71d30     01b71e81 01b71f01  
-  ATAPI   Green  SPDIF Out at Ext N/A        29 0x1d   0x40434601   01d71c60 01d71d40 01d71e43 01d71f40
-    1/8   Black  HP Out at Ext Front         33 0x21   0x02211020   02171c20 02171d10 02171e21 02171f01
---------------------------------------------------------------------------------------------------------
-
-Modified Verbs in One Line: 01271c00 01271d00 01271e00 01271f40 01471c50 01471d40 01471e01 01471f01 01871c40 01871d90 01871ea1 01871f01 01b71c30 01b71d30 01b71e81 01b71f01 01d71c60 01d71d40 01d71e43 01d71f40 02171c20 02171d10 02171e21 02171f01
---------------------------------------------------------------------------------------------------------
-
-

整理有效路径

先把之前的数据整理成表格

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
有效节点10进制设备名称
0x1420Speakerout
0x2133HP out
0x1824Mic in
0x1b27Line in
-

生成路径图

使用codecgraph生成pathmap图

-
# 准备codecgraph命令
-brew install graphviz
-
-

graphviz环境两天没下载成功,只好寻找其他解决办法,还真有

-

getdump获取节点

gitdump是万能声卡驱动VoodooHDA自带的程序

-
sudo cp ~/Downloads/getdump /usr/local/bin  # 将getdump命令复制到/usr/local/bin目录下
-sudo chmod +x /usr/local/bin/getdump        # 为getdump添加执行权限
-getdump > ~/Desktop/voodoo_dump.txt
-
-

用它可以生成一份voodoo_dump.txt的文件,里面会有两段以DUMPING Playback/Record Paths开头的文字描述,这里面即包括了有效节点,同时也包括了有效的路径,问题迎刃而解

-
+-------------------------------+
-| DUMPING Playback/Record Paths |
-+-------------------------------+
-
-Playback:
-
-    nid=33 [pin: Headphones (Black Front)]
-      |
-      + <- nid=13 [audio mixer] [src: mix] bindSeq=00000001
-
-             |
-             + <- nid=3 [audio output] [src: pcm] bindSeq=00000001
-
-
-Record:
-
-    nid=9 [audio input]
-      |
-      + <- nid=34 [audio selector] [src: speaker, mic] bindSeq=00000001
-
-             |
-             + <- nid=24 [pin: Microphone (Pink Rear)] [src: mic] bindSeq=00000001
-
-             + <- nid=29 [beep widget]
-
- - - - - - - - - - - - - - - -
有效节点10进制设备名称路径
0x2133HP out33->13->3
-
+-------------------------------+
-| DUMPING Playback/Record Paths |
-+-------------------------------+
-
-Playback:
-
-    nid=20 [pin: Line-out (Green Rear)]
-      |
-      + <- nid=12 [audio mixer] [src: mix] bindSeq=00000001
-
-             |
-             + <- nid=2 [audio output] [src: pcm] bindSeq=00000001
-
-
-Record:
-
-    nid=8 [audio input]
-      |
-      + <- nid=35 [audio mixer] [src: mix] bindSeq=00000001
-
-             |
-             + <- nid=27 [pin: Line-in (Blue Rear)] [src: line] bindSeq=00000001
-
-             + <- nid=29 [beep widget]
-
-Input Mix:
-
-    nid=12 [audio mixer]
-      |
-      + <- nid=2 [audio output] [src: pcm] bindSeq=00000001
-
-
-    nid=13 [audio mixer]
-      |
-      + <- nid=3 [audio output] [src: pcm] bindSeq=00000001
-
-
-    nid=35 [audio mixer]
-      |
-      + <- nid=27 [pin: Line-in (Blue Rear)] [src: line] bindSeq=00000001
-
-      + <- nid=29 [beep widget]
-
- - - - - - - - - - - - - - - -
有效节点10进制设备名称路径
0x1420Speakerout20->12->2
-

这里会发现没有记录麦克风节点,其实这台电脑前面的(Black Front)应该是输入输出二合一接口,但Ubuntu没有识别到麦克风,再加上我没有麦克,暂时不搞了

-

整理ConfigData

查看驱动中的

我用PlistEdit pro打开PinConfigs.kext里的info.plist中搜索671,找到两组数据,复制这两组中ConfigData一栏的数据

-

LayoutID:12
01871C20 01871D30 01871E81 01871F01 02171C30 02171D40 02171E01 02171F01 02170C02

-

LayoutID:15
21771C10 21771D00 21771E13 21771F90 21471C20 21471D10 21471E21 21471F02 21470C02 22171C30 22171D40 22171E11 22171F91 22170C02 21971C50 21971D10 21971E81 21971F02 21871C60 21871D30 21871E81 21871F01

-

整理一下

-

12

-
01871C20 01871D30 01871E81 01871F01 
-02171C30 02171D40 02171E01 02171F01 02170C02 
-
-

节点为0x18 0x21

-

15

-
21771C10 21771D00 21771E13 21771F90 21471C20 21471D10 21471E21 21471F02 21470C02 
-22171C30 22171D40 22171E11 22171F91 22170C02 
-21971C50 21971D10 21971E81 21971F02 
-21871C60 21871D30 21871E81 21871F01 
-
-

节点为0x21 0x22 0x21 0x21

-

怪不得注入这两个id声卡没反应,原来这俩和我们的情况不一样

-

提取并整理自己的

整理格式

翻出之前的ALC671_dump.txt整理一下格式

-
    -
  • [Fixed]是内部设备
  • -
  • [Jack]是通过插孔进行连接的外部设备
  • -
  • [N/A]是其它未知设备
  • -
-

0x411111f0是名字后面带N/A的是[N/A],因为是台式机没有内部设备,剩下的是[Jack]。
两个Jack设备刚好和之前整理的表格对上了

-
   Jack   Color  Description                  Node     PinDefault  
--------------------------------------------------------------------
-Unknown Unknown  [N/A]  Line Out             18 0x12   0x40000000  
-    1/8   Green  [Jack] Line Out             20 0x14   0x01014010  
-    1/8   Black  [N/A]  Speaker at Ext Rear  23 0x17   0x411111f0  
-    1/8   Black  [N/A]  Speaker at Ext Rear  25 0x19   0x411111f0  
-    1/8   Black  [N/A]  Speaker at Ext Rear  26 0x1a   0x411111f0  
-  ATAPI   Green  [N/A]  SPDIF Out at Ext N/A 29 0x1d   0x40434601  
-    1/8   Black  [N/A]  Speaker at Ext Rear  30 0x1e   0x411111f0  
-    1/8   Black  [Jack] HP Out               33 0x21   0x02211020  
--------------------------------------------------------------------
-
-

PinDefault进行小端转换
把 0x40000000拆成 0x 40 00 00 00,去掉0x再调换顺序即可

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nodec d e fDescription
1200 00 00 40[N/A] Line Out
1410 40 01 01[Jack] Line Out
17f0 11 11 41[N/A] Speaker at Ext Rear
19f0 11 11 41[N/A] Speaker at Ext Rear
1af0 11 11 41[N/A] Speaker at Ext Rear
1d01 46 43 40[N/A] SPDIF Out at Ext N/A
1ef0 11 11 41[N/A] Speaker at Ext Rear
2120 10 21 02[Jack] HP Out
-

修正数据

然后修正数据,让它看起来更Apple

-

首先[N/A]都当成无效节点,按照Apple的规范,使用f0 00 00 40来屏蔽

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nodec d e fDescription
12f0 00 00 40[N/A] Line Out
1410 40 01 01[Jack] Line Out
17f0 00 00 40[N/A] Speaker at Ext Rear
19f0 00 00 40[N/A] Speaker at Ext Rear
1af0 00 00 40[N/A] Speaker at Ext Rear
1df0 00 00 40[N/A] SPDIF Out at Ext N/A
1ef0 00 00 40[N/A] Speaker at Ext Rear
2120 10 21 02[Jack] HP Out
-

整理数据

最终ConfigData的计算公式为:

-
Final Config:
-Address + Node + 71c +【c】
-Address + Node + 71d +【d】
-Address + Node + 71e +【e】
-Address + Node + 71f +【f】
-
-

整理出来之后

-
01271cf0 01271d00 01271e00 01271f40
-01471c10 01471d40 01471e01 01471f01
-01771cf0 01771d00 01771e00 01771f40
-01971cf0 01971d00 01971e00 01971f40
-01a71cf0 01a71d00 01a71e00 01a71f40
-01d71cf0 01d71d00 01d71e00 01d71f40
-01e71cf0 01e71d00 01e71e00 01e71f40
-02171c20 02171d10 02171e21 02171f02 02170c02 
-
-

可以发现最后一行多了一段,因为

-
-

具有EAPD的节点需要添加参数SET_EAPD_BTLENABLE,转换成数值为0x70c,完整的数值为:Address+节点+70c+02,即:01470c02,它通过hda-verb可以执行,比如CodecCommander就是调用的hda-verb执行的命令.
一个简单判断EAPD节点的方法:那就是它通常会位于Speaker OutHP Out这两个输出节点上.至于其它教程提到过的关于01470c02是组神奇的代码,可以让外放发声的说法是错误的,它可能刚好声卡的Speaker Out的输出节点是0x14而已.如果您的Speaker Out输出节点是0x16,那么就需要把它修改为01670c02,当然要遵守这个公式:Address+节点+71c+02

-
-

去掉格式,数据整理成最终的01271cf0 01271d00 01271e00 01271f40 01471c10 01471d40 01471e01 01471f01 01771cf0 01771d00 01771e00 01771f40 01971cf0 01971d00 01971e00 01971f40 01a71cf0 01a71d00 01a71e00 01a71f40 01d71cf0 01d71d00 01d71e00 01d71f40 01e71cf0 01e71d00 01e71e00 01e71f40 02171c20 02171d10 02171e21 02171f02 02170c02

-

2020-2-28-00:55未完待续

-
-

2020-3-3-22:03
使用USB声卡解决问题

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CNAME b/CNAME deleted file mode 100644 index 8e4b11a..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.feios.me \ No newline at end of file diff --git a/Dactyl-ManuForm-Keyboard/index.html b/Dactyl-ManuForm-Keyboard/index.html deleted file mode 100644 index 587f3cd..0000000 --- a/Dactyl-ManuForm-Keyboard/index.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - Ergonomic keyboards - Dactyl-ManuForm - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- Ergonomic keyboards - Dactyl-ManuForm -

Ergonomic keyboards - Dactyl-ManuForm

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

-

God said,” Let there be light,” and there was light.

- - -

Why make this …

Some time ago, I use the Logi G502 mouse with high intensity for one year, Because of the heavy weight of this mouse, my wrist often hurts after a year.

-

I think it’s time to change.

-

First of all, I gave up the G502 and switched to Microsoft Sculpt Ergonomic Desktop, The keyboard has an arc-shaped design. When typing, the wrist does not have to be bent too much, but is in a comfortable position. I used it for the next two years, I love it, it allowed I can take my job more longer, even 12 hours a day!

-

One day, I saw the AM-Hatsu, This is a keyboard, it is completely different from the traditional shape of the keyboard, and has exquisite design and high-end processing methods, but it is also accompanied by high prices😢.

-

So, though searching, I found a series of tutorials and projects to realize it at a very low cost, let’s start.

-

Product

Named Jokul Version

-

Overlook

- - - - - - - - - - -
IMG_1134.jpgIMG_1137.jpg
IMG_1136.jpgIMG_1135.jpg
-

How to use

At first glance, maybe you dont know this kind of keyboard why named ergonomics keyboard. but I do bet you’ll find out, just take hand in the keyboard. The keys is so fit the length and radian of your finger, that you will have are magic feeling that the key is finding your finger when you typing! And at this time, you will feel that when typing in a normal keyboard, your fingers need to find those keys.

-

Fingers can travel shorter distances and tap keys with less wrist movement in typing, and get more stable typing speed.

- - - -

Typing test

Chinese avg 90wpm
English avg 70wpm

-

Screenshots

- -

IMG_1138.jpg

-

IMG_1140.jpg

-

IMG_1139.jpg

-

-

Videos

- - - - 可能是目前全站最快的分体、立体键盘中文打字测试(已划水) - - ​ - - - www.bilibili.com - - - - 图标 - - -

-

- - - - 【打字测试】是的,这确实是一把(一对)键盘 - - ​ - - - www.bilibili.com - - - - 图标 - - -

-

References

Hardware

Project: [Github]dactyl-manuform. AM-Hastu keyboard also base on this.

-

In this project, I improved the design in somewhere we cant see that at most time: [Github Inside]1u pcb

-

Benefit from 1u pcb, I can add hotswap socket and backlight support in this keyboard. God said,” Let there be light,” and there was light.

-

IMG_0248.jpg

-

IMG_0255.jpg

-

Software

Usually, we use qmk firmware to implement the software part of the keyboard.

-

About how to make this kind keyboard that best for you, there are online dactyl generator, and the guidance to teach you how to generate that.

-

Dont know what materials I need? Here is Bill of materials.

-

How to make it

Step

    -
  1. Generate your case and plate, find 3d print company or by yourself to print.
  2. -
  3. Purchase all required materials
  4. -
  5. Find the right one or customize your layout in online
  6. -
  7. Assemble
  8. -
  9. Install QMK Toolbox and Flashing. Or you can run those in bash too.
  10. -
-
make handwired/dactyl_manuform/4x6:feios:avrdude-split-left
-
-make handwired/dactyl_manuform/4x6:feios:avrdude-split-right
-
-
    -
  1. option Install Via and make appropriate via json file, Via allows you to quickly customize your keyboard layout
  2. -
-

Files by me

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/GPMS-Design/index.html b/GPMS-Design/index.html deleted file mode 100644 index 9ad4eee..0000000 --- a/GPMS-Design/index.html +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - 毕业设计管理系统概念设计 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 毕业设计管理系统概念设计 -

毕业设计管理系统概念设计

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

-

因为Windows Vista惊艳的效果,导致最喜欢圆角+轻拟物+磨砂玻璃的设计。processing

- - -

第一次设计

非常简单粗暴,圆角+磨砂玻璃,用花哨的背景体现半透明效果

-

Login.png

-

第二次设计

具像化地展现毕业设计所需流程

-

login 1.png

-

login 2.png

-

home 1.png

-

第三次设计

当前最新设计,以下是figma中完成的概念图,圆角+轻拟物+磨砂玻璃,并且支持暗黑模式热切换。

-

home page.png

-

home page light.png

- - -

- - - - 毕设管理系统的终极是什么样子?这是我的答案 - - ​ - - - www.bilibili.com - - - - 图标 - - -

-
导师添加任务书
-- 增删改查
-导师提交审核
-- 提交
-- 查看状态
-专家审核任务书
-- 查看列表
-- 通过&打回
-- 填写指导意见
-学生申请选题
-- 查看列表
-- 提交选题申请(选题理由)
-导师确认学生选择
-- 查看列表
-- 查看选题学生
-- 通过
-学生上传开题报告&文献翻译
-- 上传
-- 查看文件上传状态和文件
-- 查看审核状态和指导意见
-导师审核
-- 查看列表
-- 通过&打回
-- 填写指导意见
-学生上传中期情况检查表
-- 上传
-- 查看文件上传状态和文件
-- 查看审核状态和指导意见
-学生填写毕业设计指导记录表
-- 填写内容
-- 查看教师指导意见
-导师审核中期情况检查表
-- 查看内容
-- 通过&打回
-- 填写教师指导意见
-导师填写毕业设计指导记录表
-- 查看内容
-- 填写教师指导意见
-教务分配答辩小组
-- 查看答辩小组信息
-- 增删改查组内用户
-学生上传最终论文
-- 上传
-- 查看文件上传状态和文件
-导师审阅论文
-- 查看列表
-- 查看文件
-- 通过&打回
-- 填写分数
-答辩小组审阅论文
-- 查看列表
-- 查看文件
-- 填写分数
-答辩小组配置答辩分数&评语
-- 查看列表
-- 查看文件
-- 填写分数
-
- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/GRE-Learning-notes/index.html b/GRE-Learning-notes/index.html deleted file mode 100644 index f4f88fa..0000000 --- a/GRE-Learning-notes/index.html +++ /dev/null @@ -1,719 +0,0 @@ - - - - - - - GRE笔记 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- GRE笔记 -

GRE笔记

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

-

power

- - -

GRE写作

2.27

国人思维模式

i am thinking of a topic

-

idon’t want to say mytopic , but i am sure that you know it
“只可意会不可言传”

-

练习1

过去的人冬天没有暖气, 出门见不到汽车, 连吃肉都困难, 哪有什么幸福可言?
people used to have no heating in winter and no cars to go out ,even eating meat is difficulr , how can there be any happiness

-

翻译可以改成
过去的人们感觉不幸福, 因为没有暖气, 他们在冬天会感觉到寒冷; 没有汽车, 难以到达远方; 很难找到肉吃, 没有营养
people in the past didn’t feel happy. They felt cold without radiators ; they found it hard to reach remote places without automobiles; they were malnourished without meat on their tables.

-

练习2

出国留学可以学习知识, 增强阅历, 为未来打下基础!
Study abroad can learn knowledge, stong experience, for future plant basic.
主语应该是人,不是不是出国留学这件事

-

accumulate积累

-

翻译可以改成
出国留学帮助我们学习知识, 增强阅历,为未来做准备/
通过出国留学,我们可以学习知识, 增强阅历, 为未来作准备

-
    -
  • 省略的主宾要还原
  • -
-

练习3

越来越多的孩子有网瘾, 分数下降的很厉害, 身心健康也受到危害.

-

越来越多的孩子正在承受网瘾的折磨, 这使得他们的分数下降得很厉害, 畏怯使得他们的身心健康也受到危害

-

越来越多
more and more
an increasing number of

-

使
make
let / allow
lead to /reslt in

-

An increasing number of students are (suffering) from the internet addiction , which results in their falling grades and poor mental and physical conditions.

-

练习4

学习艺术可以陶冶情操

-

Apreciating arts and music is a [character education].
Appreciating arts and music hlps students [mold(塑造) and shape] their characters.
Appreciating arts and music teaches [values and virtues].
[陶冶情操]

-

3.5

cogent 强有力的
well-articulated 表达清晰的
insightful 富有洞察力的
issue 不一定要绝对的反对或同意
combustion 运行
quandaries 困境

-
    -
  1. The assumption is that an increased reliance on technology negates the need for people to think creatively to love previews quandaries
  2. -
  3. This reliance on technology does not necessarily preclude the creativity that marks the human species
  4. -
-

short circuits 短路,漏电
preclude 排除,阻止
scale 需求
proliferation 增殖,扩散
horse-and-buggy过时的
inconceivable 不可想象的
ruling party 统治党派
maverick 持不同意见的
rebuttal 反驳
layman 门外汉
vaccines 疫苗

-

3.12

Argument的写作特点
conclusion + Assumption + Evidence
第1段 —— 开头段:归纳论点,论据,指明逻辑漏洞个数
第2-4段 —— 正文段:分类攻击各个逻辑错误(独立与组合结构最好)

-
    -
  1. 开头 C(结论) —— E(论证) —— F(Flaw:指出原文缺点)
  2. -
  3. 先提出原文漏洞再给出理由反驳
  4. -
-

3.19

常见逻辑错误及分析方法

    -
  1. 调查数据相关
  2. -
-
    -
  • 有偏采样
    抽样对象与结论中的对象不一定是一样的
  • -
-

3.26

实验对比(Test and control group Fallacy)是否存在相同性质主客观的对比

-

百分比陷阱(Falso Ratio Fallacy) (charitable 慈善)
基数不一定相同(没有一定的基数,百分比是无意义的)
假设百分比小的基数较小,百分比较大/基数较大,百分比较小

-

4.2

因果关系类

    -
  1. 急于概括 (Hasty-Generalization Fallacy)
  2. -
  3. 后此谬误 (The “After this, therefore” fallacy)
  4. -
  5. 因果倒置 (The fallacy of confusing the cause and the effect)
  6. -
-

4.9

比较类比

-
    -
  • 错误类比(The fallacy of faulty analogy)(wholesale outlet批发)
  • -
  • 同等谬误(The All things are equal Fallacy)
  • -
-
-

王大锤去年参加了超级女声得了第一,今年,她应该还会得第一
(时间不一样,比赛赛制也不一定一样)
foam economy 通货膨胀
The arguer claims that ( Deer haven Acres should adopt resection on lands caping and housing painting ) because ( the nearby Brookville adopted than 7 years ago and their preparing values tripled.)指出这个推断是有问题的:This is an unwarranted assumption because things rarely remain the same from place to place.指出推断不成立的可能性:Important factors cannot be denied for as 房价上升不一定因为这个限制/这个限制并不一定适合DA 结尾:All these factors mentioned above can serve to weaken the larger claim

-
-

4.16

    -
  1. 整体推个体(The general doesn’t equal a specific fallacy)
  2. -
-

整体情况不等于个体情况,因为可能存在exception
Lacking evidence that 个体(M镇选民) reflect this general tendiety it is entirely possible that 与整体相方可能性(全国选民) trend of Monreotown might be just the opposite.
2. 偷换概念(A fallacy of inconsistent connotation and extension)
比较题目中所出现的概念和其定义是否能够匹配,是否存在其他合理定义
The arguer fails to establish the meaning of the vague concept of job satisfaction Accordingly, the author has drawn the conclusion too However, job satisfaction may be defined in other terms such as More career development Travelling rashly due to the due to the ignorance of other of other definitions of job satisfaction

-

GRE文化

2.24

哥伦布 洋流 西印度群岛 葡萄牙 西班牙

-

1.The Age of Exploration (大航海时代)
哥伦布(1492年第一次航行) 圣萨瓦尔多
第一个国家:葡萄牙,黑奴贸易

-
    -
  1. 自然条件恶劣
  2. -
  3. 好战
  4. -
  5. 强大王权
  6. -
-

开启航海时代 —— 葡萄牙、西班牙、荷兰
*王室支持

-

西经46‘37’为界线(最初)葡萄牙和西班牙
印尼
衰落的原因: 沉迷消费和享乐/未重视本国工商业
哥伦布四次航海

-
    -
  1. 1492年 - 1492年。发现
  2. -
  3. 1493年。殖民
  4. -
  5. 1598年 南美洲
  6. -
  7. 1502年(水上通道)
  8. -
-

3.2

The Colonial America
Nashville -> 法国有关 Saint -> 西班牙有关
Emigration/immigration (迁出)殖民/(迁入)殖民
Puritans 清教徒(pure纯洁的)pilgrims 朝圣者
puritanism 清教 protestantism 新教

-

3.9

美国独立战争 1775-1783
参战方:美利坚合众国,法国,西班牙,英国,荷兰
主要指挥官:华盛顿
性质:资产阶级运动,民族解放运动
原因:英国殖民统治阻碍了美国资本主义发展
导火索:1773年波士顿倾茶事件
审理:约克镇战役(1781年)
北美殖民经济分布:北部造船业发达,中部盛产粮食,南部盛行种植园经济

-
    -
  • 1775年莱克星顿枪声
  • -
  • 1755年建军
  • -
  • 1776年7月4日《独立宣言》建国
  • -
  • 1787年《1787年宪法》
  • -
  • 1783年英国承认美国独立
    七年战争后,英国提出向北美殖民地征税,激起北美反抗
  • -
-

3.16

    -
  • 1783年后再次以西扩张,通过购买、掠夺、殖民等手段(运动主体)
  • -
  • 1803年,美国从法国1500万买了路易斯安那区域
  • -
  • 1820年和1819从西班牙夺得佛罗里达
  • -
  • 1846年,强迫英国定约,将北纬49‘线延伸到大西洋沿岸
  • -
  • 1846年-1853年,美墨战争爆发,多的墨西哥大片领土
  • -
  • 1853年,美国已将国界延伸到太平洋的沿岸
  • -
  • 1848难,加利福尼亚发现金矿
  • -
  • 1867年以720万美元买下了阿拉斯加
  • -
  • 1894年,美国推翻夏威夷国
  • -
  • 1898年,美西战争后,又兼并了夏威夷群岛
  • -
-

3.23

1861年4月12日,林肯怼南方宣战,南北战争爆发
1854年被房间里共和党,1860年林肯上台,南方黑奴州纷纷独立,在1861年2月组成“美利坚株洲联盟”定里士满,戴维斯任总统。

-

转折:1862年林肯政府颁布《宅地法》《解放黑人》《奴隶制宣言》
局限性:只是废除了南北叛乱的奴隶制,虽然黑人被解放了,但没有获得拜仁一样的权利。

-

3.30

Reconstruction (1865 - 1877)

-

美国发展的重要时期

    -
  • 1607 - 1733 英属北美殖民地的建立
  • -
  • 1774 - 1783 独立战争
  • -
  • 1781 - 1814 独立的民族主权国家的建立
  • -
  • 1814 - 1861 南北战争前南北经济、政治、外交政策的不同发展时期
  • -
  • 1861 - 1877 南北战争及战后重建
  • -
  • 1877 - 1900 19世纪后半叶经济迅速发展(镀金时代)
  • -
  • 1889 - 1914 第一次世界大战前的发展
  • -
  • 1914 - 1903 第一次世界大战至20世纪20年末的美国
  • -
  • 1930 - 1940 20世纪30年代的美国
  • -
  • 1941 - 1945 第二次世界大战
  • -
  • 1945 - now 第二次世界大战后
  • -
-

主要重建方面

联邦的恢复,南方社会的转型,颁布积极法案来保障黑人的权利

-

Ten - Percent Plan (赦免宣言)

    -
  1. 只要有百分之十的南方州人民投票愿意回到联邦并且接受宪法第十三修正案,他们就能恢复自己在议院的合法席位
  2. -
  3. Redical Republican 共和党激进派
  4. -
  5. 1865 - 1866 年间出台各类“黑人法典”限制和人产权,经营权,限制黑人工种,变相奴隶制
  6. -
  7. 国会共和党人先后通过了《1866年民权法案》和宪法第十四、十五修正案,保障黑人的公民权和投票权。
  8. -
-

4.13

镀金时代:
1877 - 1917年,由马克·吐温透出“The fold Age”而命名。美国工业迅速发展,走向了集中,垄断。19世纪末20世纪初属于美国资本家强取豪夺时期,为了自己利益不顾工人死活。

-

进步主义:
只在18 - 19世纪美国盛行的一种社会主义思潮和运动,商业领导着蛇娜方式改变。工业化加强,城市化进程加大,意识形态宗教。商业垄断出行问题:政治腐败严重,资本家一工人,白人与黑人,男人与女人之间的尖锐矛盾

-

4.20

一战中的美国
1914年6月28,奥匈帝国皇储斐迪南大公夫妇被枪杀,成为一战导火索
开始标志:奥匈帝国对塞尔维亚宣战/结束,德国宣布投降
主要同盟:德、奥匈、奥斯曼
主要同盟:英、法、俄罗斯帝国、美国

-

4.26

民族主义:不同民族的思想出现分化,国力强盛民族意志逐渐增强,向境外延伸
军国主义:常备军,防备军
帝国主义:扩张领土,寻找殖民地
1916.5 - 1917.1美国德国冲突不断
凡尔赛条约(the Treaty of Versailles)一战结束

-

4.27

The Roaring Twenties(咆哮的20年代)(1919 - 1929)
1912:泰坦尼克号沉船
1913:不锈钢的发明
1914:巴拿马运河完成
1920.1.17:美国宪法第18修正案——禁酒法案

-

GRE语文

2.24

###长难句

-
-

yet those(那些人 着重强调) <-(修饰)[who stress the achievement of a general consensus among the colonists] / cannot fully understand that (consensus) <-(修饰)[without understanding the (conflicts)] <-修饰(that) had to be overcome or repressed in order to reach it.

-
-

consensus名词 general 形容词修饰名词
repressed动词

-

cannot fully understand 不能完全理解
overcome克服
repressed压迫

-

从句的部分不应该成为主干的部分, 所以可以去掉
consensus作为主干词,剩余内容都是为了修饰它
所以整句的可以简化为
yet those cannot fully understand it

-

who stress the (achievement肯定general consensus) of a general consensus among the colonists
在没能达成一致的意见的情况下, 会出现一些必须要被压迫下去的冲突
达成一致意见之前可能会出现一些冲突.
在达成一致意见之前首先要了解那些冲突
没能完全了解冲突的统一意见,
[那些人]<-[在没能达成一致意见的情况下]无法完全{[理解]<-[不了解(冲突)<-(去客服或者压迫)]}它

-

填空

-

(far from) viewing Jefferson as a skeptical (but) enlightened intellectual,== historians of the 1960’s portrayed him as a doctrinaire thinker,==补充说明-> eager to fill the young with his political orthodoxy while censoring ideas he did not like.

-
-

far from…but…=not…but…
portrayed 把..看成
doctronaire 形容词 教条主义
eager to do something 渴望做某事

-
-
-

The Chinese, [(who) began systematic astronomical and weather observations shortly after the ancient Egyptians], were assiduous record-keepers, and because of this, can claim humanity’s logest continuous documentation of natural events

-
-

中国人紧随古埃及人其后,开启了系统的天文学和天文观测学,可以称之为在自然形象记录方面,是人类目前为止最长的记录保持着

-

assiduous形容词
because of this正因如此
democray

-
-

十五岁的小张今年十五岁了

-
-

例题一

选两个同义词来适合填空内容

-
-

Congress is having great difficulty developing a consensus on energy policy, primarily because the policy objective of various members of Congress rest on such _____ assumptions

-
-

(A) commonplace 频繁的
(B) trivial 琐碎的
(C) explicit 清楚的,明白的,明确的
(D) disparate 不同的
(E) divergent 分歧的
(F) fundamental 基本的

-

assumptions 假设
DE
遇到填空题先判定需要填词的词性,可以知道这句话中包括了because,有知道结果部分是一个完整的信息,描述的部分是达成一致方面有困难,结果是没有一致意见
要考虑填词的词性, 功能

-

2.26

-

The increase (in the numbers of married women employed outside the home in the twentieth century) had less to do with (the mechanization of housework and an increase in leisure time for those women) than it did with high marriage rates (that shrank the available pool of single women workers , previously, in many cases, the inly women employers would hire) .

-
-

后置定语分成三种形式 to do,被动形式, doing非谓语动词
the best man to do the job 他是做这项工作的最佳人选

-

mechanization 机械化

-

GRE背景下的同义/反义关系

-
    -
  1. 广义的同义
  2. -
-
    -
  • 同义词
  • -
  • 上下义词
  • -
  • 感情色彩相同
  • -
  • 正负方向相同
  • -
-
    -
  1. 广义的反义
      -
    • 反义词
    • -
    • 感情色彩相反
    • -
    • 正负方向相反
    • -
    • 与极端次相对的中性词
    • -
    -
  2. -
-

Many welfare reformers would substitute a single , federal
Financed income support (system) / (for) the existing ____ of overlapping (programs).
A. Welter 混乱
B. hodgepode 大杂烩
C. Paucity 缺乏
D. Core 核心
E. Functionalism 功能主义
F. participation 参与

-

In many science fiction films, the (opposition) of good and evil is portrayed as a ___ between technology, which is ____, and the errant(错误的) will of a depraved(堕落的) intellectual.
blank(i) blank(ii)
A.fusion D.dehumanizing
B.struggle E.unfettered
C.parallel F.beneficent

-

B F

-

3.2

-

The physicist rightly dreads precise argument, since an argument that is convincing only if it is precise / loses all its force if the assumptions on which it is based are slightly changed, whereas an argument that is convincing though imprecise may well be stable under small perturbations of its underlying assumptions.

-
-
-

Although the feeding activities of whales and walruses give the seafloor of the bering shelf a ++devastated ++ appearance, these activities seem to e actually beneficial to the area, enhancing its productivity.

-
-
-

Heavily perfumed white flowers, such as gardenias, were favorites with collectors in the eighteenth century, when scent was valued much ore highly than it is teal.

-
-
-

Dreams are uninformative in and of themselves, but when combined with other data, they can tell us much about the dreamer.

-
-
-

Queen Elizabeth I has quite correctly been called a _____ Of the arts, because many young artist received her patronage.
A. Connoisseur 赞赏家
B. Critic
C. friend
D. scourge
E. judge

-
-
-

The transition from the Paleolithic to the Neolithic era is viewed by most art historians as a ____ because , instead of an increasingly ____ pictorial art but we find degeneration.
A. milestone … debased
B. consolidation … diverse
C. calamity … aberrant
D. regression ... sophisticated
E. continuation … improved

-
-
-

Despite ___ on taking rare tamarins from their habitat the illegal trade in the tiny monkeys remains ____
A. commendations … obligatory
B. consultations … illicit
C. prohibitions ... active

-
-
-

representing a round world on a flat surface is impossible without some ____ ; the Mercator projection may shows Greenland as over ten times larger than Mexico, a country in fact only slightly smaller than Greenland
A. oversight 疏忽
B. simplification 简化
C. clarification 澄清
D. distortion 歪曲
E. superficiality 表面
F. warping 歪曲

-
-

3.4

-

(In order to understand the nature of the ecologist’s investigation), we may think of the density - dependent affects on growth parameters as 吧..看作 the “signal” ecologists are trying to isolate and interpret, / one that tends to make the population increase from relatively low values or decrease from relatively 相对地 high ones, while the density independent effects act to produce “noise” in the population dynamics.

-
-
-

Yellow fever黄热病, (插入语成分)->[the disease that killed 4,000 Philadelphians in 11793, and so ____ Memphis, Thnnessee, that the city lost its charter,] has reappeared再次出现 after nearly two decades in ____ in the Weatern Hemisphere.
A. terrorized恐怖 … contention争论
B. ravaged损坏 … secret秘密
C. disabled使…无能 … quarantine隔离
D. corrupted腐败 … quiescence静止
E. decimated*摧毁* ... abeyance*中止*

-
-
-

Melodramas音乐剧 which did not present neutral situations were popular precisely because they off the audience观众 a world ____ of ____
A. bereft … theatricality
B. composed … adversity
C. full … circumstantiality
D. deprived … polarity
E. devoid ... neutrality

-
-
-

Many paintings of the American southwest convey a feeling of iodation and loneliness that mirrors映射(对等关系) the ____ lands they depict 描绘
A. lush 丰富的
B. sprawling 不规则的
C. desdate 荒凉的
D. gaudy 华而不实的
E. monumental

-
-
-

Old age, even in cultures where it is , is often vital with
A. venerated*受人尊敬的* ... ambivalence*矛盾*
B. rara … surprise
C. ignored … condescension
D. feared … dismay
E. honored … respect

-
-

3.9

-

This preference for exogamy, gutman suggests, may have derived from West African rules / governing marriage, which, (though they differed from one tribal group to another, all involved some kind of prohibition against unions with close kin.)主从复合句 which引导主句all

-
-
-

Many industries are so ____ by the impact of government sanctions, equipment failure, and foreign competition that they are beginning to rely on industrial psychologists to ____ what remains of employee morale.
A. estranged疏远 … guard护卫
B. beleaguered*围困* ... salvage*救赎*
C. overruled … undermine
D. encouraged … determine
E. restrained … confirm

-
-
-

Whereas biologists must maintain a ____ attitude toward the subjects of their research, social scientists must, paradoxically 与之相互矛盾的是, combine personal involvement参与度 and scholarly学术的 ____
A. scorupulous小心翼翼 … sympathy
B. careful … abandon
C. casual … precision精确
D. passive … passion
E. disinterested*客观的,公正的* ... detachment*分离*

-
-
-

Although the revelation that one of the contestants竞争者 was a friend left the judge (open to)处于…境地 charges指控 of lack of the judge remained ailment in her assertion观点 that acquaintance熟识的关系 did not necessarily imply ____
A. prudence谨慎 … rdeance
B. detachment …foreknowledge预言
C. exoneration免罪 … impropriety不适当
D. prejudice偏见 … preference
E. disinterestedness ... partiality*部分*

-
-
-

The highly publicized redesign of the car is essentially ____ the exterior外部的 has been updated but the engine remains unchanged.
A. intuitive直觉的
B. cosmetic*化妆品*
C. superficial表面的
D. consequential重要的
E. retroactive可追溯的
F. momentous极其重要的

-
-
-

Many of our memories are ____, escaping our consciousness just as we strain to recall a face or a name.
A. elusive*难懂的*
B. pervasive普遍的
C. unvaried
D. insensitive感觉迟钝的
E. unaffected
F. slippery*滑的*

-
-
-

Although Caroline Gordon was rigorously objective in her journalistic writing, her lively and ____ private correspondence ____ a delightful capacity能力 for biting commentary on the social scene.
A. incisive敏锐的
B. dispassicnate客观的
C. exuberant热情的
D. exhibited展现
E. decried公开谴责
F. minimized最小化

-
-

3.11

-

The historian Frederick j,Turner wrote in the 1890’s [ that the agrarian discontent不满 that had been developing steadily in the united states since about 1870 ] had been precipitated by the closing of the internal frontier that is, the depletion消耗 of available new land needed for further expansion of the American farming system.

-
-

两大原则: 公平原则,重复原则
self-isolation 自我隔离
quarantine 隔离
confirmed case 确诊病例
suspected case 疑似
imported case 输入型病例
close contact 密切接触
incubation period 潜伏期
disinfection 消毒
postpone the reopening of schools 延迟开学

-
-

For more than a century, geologists have felt comfortable with the idea that geological processes, although very, are also ____ and so are capable of shaping the Earth given enough time.
A. minute微小的 … sporadic零星的
B. slow ... steady*可识别的*
C. complex … discernible
D. unpredictable … constant
E. ponderous沉重的 … intermittent间隙的

-
-
-

An effective member of a debating team must for clearly on the ____ issue and avoid ____ argument.
A. equivocal可疑的
B. principal主要的
C. comprehensive综合的
D. obstreperous吵闹的
E. peripheral次要的
F. pertinent*相关的*

-
-
-

The ____ with which merchants and landowners in early-nineteenth-century Maryland and Virginia ____ Joshua Johnstair professional services attests证实 to his artistic skill as a portrait painter.
A. avidness渴望
B. diffidence
C. disgust
D. sought
E. replaced
F. overlooked

-
-
-

The man’s colleagues characterized him as ____ because he imitable, quarrelsome坏脾气 disposition
A. crabby
B. disingenuous
C. sanctimonious
D. cantankerous
E. artful
F. tyrannical

-
-

3.16

-

But these of who 宾从 hoped, with Kolb, that 宾从 Kolb’s,newly published complete edition of Proust’s correspondence for 1909 would document*=record* the process in greater detail are disappointed.

-
-
-

____ as =though(倒装句中) Mario’s misdeed was. his grandmother, always blind to his faults, pretended to be unaware of it,
A. accidental
B. apt
C. random
D. flagrant
E. covert

-
-

省略句

-

The most frustrating periods of any diet节食 are the inevitable不可避免 ____, when weight loss ____ if not stops.
A. moods … accelerates
B. feasts … halts
C. holidays … contracts
D. plateaus ... slows
E. meals … ceases

-
-

主语从句

-

(It is ironic讽刺 that the ____ insights of the great thinkers) are voiced so often that they have become were ____.
A. original … cliches
B. banal … beliefs
C. dubious … habits
D. philosophical ... questions
E. abstract … ideas

-
-
-

If it true that 主从 morality cannot exist without religion, then does not the. erosion侵蚀 of religion herald预示 the ____ of morality?
A. regulation
B. basis
C. belief
D. collapse
E. value

-
-
-

After winning the lottery, John bought sports cars, built a mansion, and wore designer suit; however, by thus ____ his ____, he alienated his friends.
A. enduring忍受
B. flaunting*炫耀*
C. calculating计算
D. hardship
E. prosperity*财产*
F. image

-
-
-

The study of biology, once considered they key to solving nature’s mysteries, has instead served to emphasize nature’s incredible ____.
A. tranquility安静
B. immobility静止
C. intricacy*复杂*
D. desirability
E. complexity
F. stability

-
-
-

In 1575 Venetians instituted an annual celebration to ____ the end of the ____ that had struck the city.
A. commemorate纪念
B. lament抱怨
C. solemnize
D. prospenity富有
E. plague*瘟疫*
F. fame流言

-
-

3.18

-

But these beliefs about (peptide hormones) were questioned after laboratory found that [antiserums to peptide hormones],when injected into the brain, bind in places. Other than the hypothalamus, indicating that either the hormones or substances that cross-react交叉反应 with the antiserums are present.

-
-

定语从句

-

(The disjunction between educational objectives that stress independence and individuality and those that emphasize obedience to rules and cooperation with others) reflects a ____ that arises from the values on which these objectives are based.
A. conflict
B. redundancy
C. gain
D. [redoctabo;otu
E. wisdom

-
-

宾语从句

-

The poet W.H Auden believed that the greatest poets of his age were almost irresponsible ,that the possession of goat gifts ____ to abuse them.
A. negates使…否定 … temptation诱惑
B. controls … resolution
C. engenders*使...导致* ... propensity*倾向*
D. tempers调和 … proclivity倾向
E. obviates消除 … inclination倾向

-
-
-

Most pioneers ____ this alley on their journey to the west because its rugged terrain an frequent Landslides made it a ____ place for travelers.
A. skirted绕行
B. enjoyed
C. encompassed
D. fascinating
E. necessary
F. hazardous

-
-
-

Ballads often praise popular figures who have performed feats that many perceive as, such as defending the poor or resisting authority权威.
A. admirable
B. inescapable
C. plausible
D. unjust
E. legitimate
F. derate

-
-

3.23

-

It is one of nature’s great ironies that the availability of nitrogen in the soil frequently sets an upper limit上限 on plant growth even though (the plants leaves are bathed沉浸 in a sea of nitrogen gas氮气).

-
-

非谓语动词

-

No longer considered ____, the belief that all of puerto Rico’s indigenous Taino people perished centuries ago appears to be a ____ now that modern Taino descendants have come froward
A. conclusive … reality出现
B. tenable ... misconception
C. mythical … possibility
D. erroneous … delusion
E. hypothetical … digression

-
-

否定加比较

-

Camuther’s latest literary criticism ____ her reputation名声 for trenchant commentary评论; despite its intriguing有趣 title and the fulsome praise on its dust jacket外表, it is nothing more than a collection of ____.
A. reinforces加强 … pronouncements声明
B. belies ... platitudes*陈词滥调*
C. prejudices … insights
D. advances … aphorisms格言
E. undermines破坏 … judgments

-
-

Not-until

-

We ad not realized how much people ____ the library’s old borrowing policy until we received complaints once it had been ____.
A. enjoyed … continued
B. disliked … administered
C. respected … imitated
D. ignored … lauded
E. appreciated ... superseded

-
-
-

The rover’s imposition of martial law婚姻法 on the once peaceful community was the last straw, so far as the lawmakers were concerned, the legislature refuser to function until martial law was ____.
A. reaffirmed重申
B. reiterated
C. inaugurated创新
D. rescinded*解除*
E. prolonged延长

-
-
-

the serious purpose of the paper-airplane flying contest, which attracted many novel and sometimes truly ____ entires, was too determine whether是否 any ____ aerodynamic空气动力学 designs could be discover.
A. derivative非原创的
B. bizarre*古怪的*
C. mundane平凡的
D. conventional传统的
E. aesthetic美感的
F. revolutionary

-
-
-

Carson presents her case so strongly and logically that only the prejudiced or the ____ will attempt to ____ her.
A. gullible容易被骗的
B. contradict理性的
C. obstinate固执的
D. contradict反驳
E. champion支持
F. safeguard保护

-
-

3.25

-

If she defines feminist criticism as objective and scientific a said, verifiable, intellectual method / that anyone, whether man or woman, can perform - the definition not only preludes the critic - as - artist approach, bur may, also impede (accomplishment of the utilitarian objectives of those) who seek to change the academic establishment and its thinking especially about sex roles.

-
-
-

Irony can, after a fashion勉强, become a mode of escape: to laugh at terrors fo life is in some sense to ____ them.
A. overstate夸张
B. revitalize使…复活
C. corroborate证实
D. evade*逃避*
E. license许可

-
-
-

Lotoya’s ____ is shown by her ability to be ____ :she can see her own faults more clearly than anyone else can.
A. cynicism洞察力 … self-destructive
B. open-mindedness愤世嫉俗 … complacent
C. insightfulness开放 … self-destructive自满
D. open-mindedness … complacent
E. insightfulness ... self-critical

-
-
-

Paradoxically自相矛盾的, the senator was both a ____ and ____, she publicly defended the rights and wisdom of the people, but she often spoke with a disdainful air of superiority.
A. demagogue煽动者 … a maverick持不同意见的人
B. conservative保守派 … an anarch无政府主义
C. populist平凡主义者 … an elitist精英主义
D. moderate稳健的 … a reactionary反动派
E. partisan‌党羽 … a snob势力小人

-
-
-

Over the year the anthropologist’s opinions had ____ , he refused to derate new ideas and nothing could change his mind.
A. digressed离题
B. proliferate增殖
C. ossified硬化
D. deviated脱离
E. calcified钙化
F. incubated孵化

-
-

3.30

-

In the early twentieth century, the idea that pianists should be musician - scholars whose playing reflected the way composers wanted their music to sound replaced the notion that pianists should be virtuosos whose perform thrilled audiences with emotional daring and showy displays of technique

-
-

标点符号

The mountain road wad distinctly ____, it twisted back and forth along the contours of the hillside
A. panoramic全景的
B. precipitous急剧的
C. serpentine*蛇形的*
D. circumscribed受限制的
E. retrograde倒退的

-

正负评价

-

Given the ____ state of the published evidence we do not argue have that exposure to low-level microwave energy is either hazardous or safe.
A. inconclusive不确定的
B. satisfactory满意的
C. definitive
D. immaculate完美的
E. exemplary典范的

-
-
-

The success of votes of a native son ____ author James Baldwin as one of the most ____ essayists of his time
A. buoyed鼓励 … irrelevant无关的
B. established*确定* ... prominent*有名望的*
C. surrendered投降 … prolific多产的
D. decried谴责 … cynical怀疑的
E. categorized分类 … mundane平凡的

-
-
-

Unfortunately, his damaging attacks on the ramifications影响 of the economic policy have been ____ by his wholehearted acceptance of that policy’s underlying assumptions.
A. aupplemented
B. undermined削弱
C. wasted
D. diverted转移
E. redeemed补救

-
-

4.1

-

Although the passenger pigeons鸽子, now extinct灭绝, were abundant in eighteenth-and nineteenth-century America, archaeological at twelfth-century cahokia sites in the present day united states examined household food trash and found that traces of passenger pigeon were quite rare.

-
-
-

Parts of seventeenth-century Chinese pleasure gardens were not necessarily intended打算 to look ____; they were designed expressly to evoke the agreeable melancholy忧伤 resulting from a sense of the ____ of natural beauty and human glory
A. beautiful … immutability
B. cheerful ... transitorirtess
C. colorful … abstractness
D. luxuriant … simplicity
E. conventional … wildness

-
-
-

Toni Cade Bambara’s novels are engrossing because the protagonists, in striving to achieve, are not simply ____ character.
A. passive顺从的
B. independent
C. abandoned
D. redundant
E. resigned放纵的
F. autonomous独立的

-
-

4.8

-

During periods of social and cultural stability, many academies are so firmly contumely controlled by ____ that all real creative work must be done by the ____.
A. dogmatists ... disenfranchised
B. managers … reactionaries
C. reformers …dissatisfied
D. imposters … academicions
E. specialists … elite

-
-
-

New data measuring the ____ of land beneath the oceans permit accurate精确的 generalizations about the topography地势 of the seafloor.
A. models
B. contours轮廓
C. remnants
D. outlines
E. pigments
F. vestige残余

-
-
-

Excessive secrecy tends to ____ excessive curiosity and thus serves to ____ the very impulses against which it guards
A. inhibit
B. satisfy
C. invite
D. deride
E. provoke
F. limit

-
-

4.13

-

Edith wharton sought寻求 in her memoir to present herself as having achieved a harmonious和谐 wholeness by having ____ the conflicting elements元素 of her lift
A. affirmed判定
B. highlighted强调
C. reconciled
D. confined
E. identified

-
-
-

Once a duckling小鸭子 has identified a parent, the instinctive本能的 bona becomes纽带 a powerful ____ for additional learning since, by ____ the parent, the duckling can acquire further information that is not genetically transmitted.
A. impulse推动 … surpassing
B. referent … recognizing
C. force … acknowledging
D. inspiration … emulating模仿
E. channel ... mimicking

-
-
-

He felt it would be ____, in view of考虑到 the intense ____ that would likely follow, to make the sacrifice / required ignorer to gain such little advantage负面的表达.
A. charitable … growth
B. welcomed … prejudice
C. futile … encouragement
D. academic … acclaim称赞
E. unrealistic*不切实际的* ... turmoil*混乱*

-
-
-

In frigid regions a layer of permafrost under the soil surface prevents water from sinking deep into the soil, and so the water ____ the land, helping to create bog沼泽地 and ____ conditions.
A. freezes*凝固*
B. parches干燥
C. inundates淹没
D. tropical热带
E. swamp沼泽地
F. desert

-
-

4.15

impartiality 公正
sham 骗局
take side 站…一边
feel free to do 随意做某事
provided 假如
ascribed to 归因于
dichotomies 分歧
rank with 与…并列
confront 面子
preternatural 超自然的
odds 不平等
minor 小众的

-

4.20

-

Dominant interests often benefit most from ____ of governmental interference in business, since they are able to take care of themselves if left alone.
A. intensification强烈
B. authorization权威
C. centralization中心化
D. improvisation即兴创作
E. elmination*削弱*

-
-

4.22

-

Kagan maintains that an infant’s reactions to its first stressful experiences are part of a natural process o development, not harbingers先驱 of childhood unhappiness or ____ signs of adolescent青春期 anxiety.
A. prophetic
B. normal
C. monotonous单调的
D. virtual
E. typical

-
-
-

An investigation that is ____ can occasionally yield new facts, even notable ones, but typically the appear of such facts is the result of a search in a define direction.
A. timely
B. unguided
C. consistent
D. uncomplicated
E. subjective

-
-

4.27

apparent 显然的
fluid 流动的
egalitarian 平等主义的
ephemeral 短暂的
iconoclastic 打破旧习的
inordinately 过渡地
mercurial 活泼的
plutocratic 财阀的

-

4.29

-

It is (i) ____ that so many portrait肖像 paintings hang in art museums, since the subject matter主题 seems to dictate a status closer to pictures in the family photograph album than to high art. But perhaps it is the artistic skill with which the portraits are painted that (ii) ____ their presence in art museums.
i : A. surprising B. understandable C. irrelevant
ii: D. challenge E. justifies F. changes

-
-
-

In stark contrast形成鲜明对比 to his later , Simpson was largely politics during his colleges years, despite the fact that the campus he attended was rife with充满着 political activity.
A. activism*行动主义*
B. apathy冷漠
C. affability亲切
D. devoted to致力于
E. indifferent to无兴趣
F. shaped by

-
-
-

As my eyesight began to ____, I spent a lot of time writing about it - both forms and “ eye journals “ - desiring what I caw as I looked out through damaged eyes.
A. deteriorate*恶化*
B. sharpen
C. improve
D. decline
E. recover
F. adjust

-
-
-

The judge’s standing in the legal community though shaken by phony allegations虚假的指控 of wrongdoing, emerged, at long last最后, ____.
A. unqualified不合格的
B. undiminished
C. undecided
D. undamaged
E. unresolved
F. unprincipled

-
-
-

Mordem agricultural practices have been extremely sully in increasing the productivity of major food crops, yet despite heavy use of pesticides, ____ losses to diseases and insect pests are sustained each year.
A. incongruous不协调的
B. reasonable
C. significant
D. considerable
E. equitable
F. forturtous

-
-

gre.jpg

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Hexmoe/index.html b/Hexmoe/index.html deleted file mode 100644 index 8ed86ca..0000000 Binary files a/Hexmoe/index.html and /dev/null differ diff --git a/Hexo/index.html b/Hexo/index.html deleted file mode 100644 index 9d2b4e1..0000000 Binary files a/Hexo/index.html and /dev/null differ diff --git a/Magic-Trackpad-2/index.html b/Magic-Trackpad-2/index.html deleted file mode 100644 index da105f6..0000000 --- a/Magic-Trackpad-2/index.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - 记一次购买 Trackpad 2 的体验 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 记一次购买 Trackpad 2 的体验 -

记一次购买 Trackpad 2 的体验

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

-

京东自营Trackpad2发了880-100的卷,蹲了很久直接购入

- - -

编辑中…

-

起因

大概在几个星期前
最近电脑用的比较多,目前使用的罗技G502 Hero比较重,我不是习武之人,在日常的重度使用下手腕不堪重负。只好思考解决办法,使用最多的是Final Cut Pro,想到mac的触控板似乎可以在一定程度上代替鼠标,而且因为丰富的手势操作,不仅可以在手腕移动更短距离的情况下实现同样的操作,左手也可以少按一些快捷键(比如按住Shift横向滚动页面、command + +/-缩放页面)。

-

Final Cut上不能像Adobe软件那样按住alt键滑动滚轮缩放页面,因为在触控板上可以二指缩放,对于我这种依赖这款软件剪辑的人来说,也算是一个增加生产力的工具了。

-

购买

寻找

既然有这个想法了,那就找找有什么好一点的价格。当前正值iPadOS 13.4更新,支持Trackpad 2连接,市场价格有些许上涨。
我这种穷人,首先想到的是看价格,第一代Trackpad 300r左右,第二代800r左右,

-

选择渠道

发了优惠卷之后,这款产品冷门产品瞬间变得抢手了起来,导致日常没货。要知道国行全新白色版Trackpad2在闲鱼也就这个价了。

-

以下是2020-04-10的价格

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
平台型号价格
闲鱼美版全新黑/白799/699
淘宝拆机黑/白825/725
淘宝港版全新黑/白899/815
京东自营全新黑/白875/825
-

其中

-
    -
  • 闲鱼的全新要打个❓
  • -
  • 淘宝拆机在几年前价格450左右
  • -
  • 京东常年900以上
  • -
-

最后决定jd自营购买

-

黑色版本不知道是因为货少还是卖的火爆,没货,选择了京东的到货通知功能,发现可以到货直接购买,但是直接购买不能使用优惠卷没有选择

-

我想着优惠卷到4月15号截止,没事慢慢等

-

上周昨天下午4:33京东给我发邮件,黑色补货了。4:36我看到邮件赶到现场,没货

-

(省略…)

-

- - - - Apple TrackPad 妙控板/无线触控板2代 - 银色 适用MacBookjksdjfaldkjflaskdjflasjkdflaksdjflaskfjlksdjflkasjdflkajflaksdj - - ​ - - - item.jd.com - - - - 图标 - - -

-

最后买了银色版,等待到货

-

使用体验

网卡换成DW1820a提供无线连接

-

记录一下电量消耗时间线

-
    -
  • 4.18 100%
  • -
  • 4.22 96%
  • -
  • 5.6 71%
  • -
  • 5.13 62% 怎么说呢。。。摸几下手腕就痛了,目前无法替代鼠标
  • -
  • 6.7 30% 持续吃灰中
  • -
  • 6.23 14%
  • -
  • 6.28 6%
  • -
  • 7.4 2% 提示电量不足
  • -
-

这段时间没管

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/My-feeling-about-Apple-and-Microsoft/index.html b/My-feeling-about-Apple-and-Microsoft/index.html deleted file mode 100644 index 0234af9..0000000 --- a/My-feeling-about-Apple-and-Microsoft/index.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - 我对于iOS/macOS/Android/Windows感性的感受 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 我对于iOS/macOS/Android/Windows感性的感受 -

我对于iOS/macOS/Android/Windows感性的感受

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

-

这篇文章的起因是在b站主页翻到了一个介绍苹果交互体验的视频,发现地下评论有一些人带节奏,我想着用我自己多年的玩机经验来一个特别的评论,有感而发,越写越长,就有了以下文章

- - -
-

即使是最简单的加密方式,也可以阻止90%的访问者

-
-
-

QQ飞车手游这种需要极其精确操作的游戏,国服记录基本都是用ios设备刷出来的(偶尔跑法革新会出现安卓破国服),职业比赛也是iPhone。这游戏玩到一定实力会发现安卓反应慢一点。同样的unity3d引擎打包成ios和安卓平台客户端,我想没有平台歧视问题,我想还是系统原因。

-

玩机几年,安卓刷过各种系统,框架什么的也折腾过一圈

-

从感性的角度想,安卓用起来像一个戴着面具的人,你不知道他真正长什么样,有种所有界面由他控制的感觉,而且是一个为应用服务的系统,会首先顾及应用的感受。比如点错一个应用,马上退回主界面,会发现过段时间自己跳到屏幕上,说明虽然退回了主界面,面具底下的他还在加载这个应用;应用需要知道你的什么信息,只会征求你的意见,至于你选啥不影响(比如不给权限直接退出应用)以前miui问你是否给定位权限,实际上就算选否也不会影响他定位。用安卓的时候总感觉第三方应用在告诉我:爱用用不用gun。

-

ios像一个个性鲜明的管家,是一个为用户服务的系统,用户说什么做什么(应用一旦不在主界面立即暂停运行),知道什么时候该干什么不该干什么(系统垃圾、内存根据当前使用情况自动分配,完全不需要用户插手),需要了解你的某些信息之前都会问你一遍。用ios第三方应用会感觉ios一直在给应用强调:服务好我的用户,不然gun。

-

ios都是系统接管通知,众所周知的原因谷歌gms服务国内无法使用,应用必须后台驻留才能接收通知,统一推送联盟一直没有完成,微信、qq这些重要通知没接入mipush等厂商的推送服务,再加上安卓开发混乱,不按开发标准存储文件导致安卓文件管理混乱,导致备份资料困难,别能不能像ios备份恢复后连微信还在输入框的消息都能还原。
现在来说win和mac

-

win像一个不听话的小孩,你不管(用)他的时候就乱跑(系统服务占用大量cpu)而且有些事情还难管(比如自动更新)老得教训他;mac像听话的小孩,不用的时候静静地在那等着你的下一步操作。

-

视频链接 评论位于#1822

-
    -
  • links, formatting, and tags supported
  • -
  • list syntax required (any unordered or ordered list supported)
  • -
  • this is a complete item
  • -
  • this is an incomplete item
  • -
- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PY.html b/PY.html deleted file mode 100644 index 0216052..0000000 --- a/PY.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - 我的朋友 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
- - -
-
- -
- -

    -
  • feios time
  • -
-

    -
  • L4zily's Blog
  • -
-
- -
-
- - - -
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/To-DW1820a/MCNES.jpg b/To-DW1820a/MCNES.jpg deleted file mode 100644 index d621466..0000000 Binary files a/To-DW1820a/MCNES.jpg and /dev/null differ diff --git a/To-DW1820a/index.html b/To-DW1820a/index.html deleted file mode 100644 index b9cb871..0000000 --- a/To-DW1820a/index.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - - - - 驱动DW1820a网卡 | 成功airdrop, Handoff - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 驱动DW1820a网卡 | 成功airdrop, Handoff -

驱动DW1820a网卡 | 成功airdrop, Handoff

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

-

电脑原装的rtl8821ce不支持Hackintosh,购入Trackpad之后想着不能一直插着线用,需要一个可以驱动的网卡

- - -

选择网卡

有几种网卡可以选择

-
    -
  • DW1820a
  • -
  • DW1560 免驱
  • -
  • BCM94360CD pcie拓展卡 免驱
  • -
-

最后考虑到价格在黑果小兵那里购入DW1820a,此时这款网卡已经涨价到带运费158元人民币的程度了

-

- - - - 插入DW1820a的正确姿势 | 黑果小兵 - - ​ - - - blog.daliansky.net - - - - 图标 - - -

-
▲驱动教程
- - - -
- 我的折腾过程 -已经屏蔽好针脚,前三后二。插上之后直接可以驱动wifi,这样的话只需要安装蓝牙驱动就行。 - -

但是麻烦的事情来了,Clover中放入蓝牙驱动开机依然没有蓝牙。

-

排查发现没有识别到网卡的蓝牙usb设备。经过群里大佬指点,需要在在DSDT里打开usb port。
对了,黑果小兵那里买来可以加售后群并且提供一定的技术支持,如果没群里大佬指点,我可能因为不能驱动蓝牙放弃这款网卡。对于这钟业余Hackintosh玩家,怎能想到问题出在这上面😂

-

这时候电脑里面有两个相关文件

-
    -
  • DSDT.aml
  • -
  • SSDT-UIAC.aml
  • -
-

这两个文件不是完全对应我的主板,查看之后发现SDT-UIAC.aml里面有usb接口定义。

-

因为dsdt在引导中作为补充加载,所以首先想到删除这个文件,果然成功识别到。

-

至此无线和蓝牙成功驱动

-

最后添加启动参数brcmfx-country=#a更改国家代码,开启所有信道,不过对我似乎只是多显示了,实际并没有启用。。
屏幕快照 2020-04-23 下午9.54.28.png

-
- -

目前有一个小bug,重置路由之后,网卡搜到的型号变少(虽然这个问题明显不是重置路由造成的,但重置路由之后立马出现这个问题,中途没有其他操作),并且路由的5gwifi设置成自动信道就无法搜索到,手动添加网络也不行。把路由固定到149信道之后才能正常连接。但问题是,自动信道模式下信道通常也是149

-

?屏幕快照 2020-04-23 下午9.49.37.png

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/about.html b/about.html deleted file mode 100644 index 9b31b2b..0000000 --- a/about.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - 关于博客 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 关于博客 -

关于博客

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

- -

- -

我就是我

颜色不一样的烟火


-

Email: i@feios.me

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aplayer-and-dplayer/index.html b/aplayer-and-dplayer/index.html deleted file mode 100644 index 4d31594..0000000 --- a/aplayer-and-dplayer/index.html +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - - Hexo中的媒体播放器 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- Hexo中的媒体播放器 -

Hexo中的媒体播放器

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

-

APlayer、DPlayer 和 cPlayer

- - -

安装

在blog根目录

-
$ npm install hexo-tag-aplayer --save
-$ npm install hexo-tag-dplayer --save
-
-

APlayer

使用

{% aplayer title author url [picture_url, narrow, autoplay, width:xxx, lrc:xxx] %}
-
-

标签参数

    -
  • title : 曲目标题
  • -
  • author: 曲目作者
  • -
  • url: 音乐文件 URL 地址
  • -
  • picture_url: (可选) 音乐对应的图片地址
  • -
  • narrow: (可选)播放器袖珍风格
  • -
  • autoplay: (可选) 自动播放,移动端浏览器暂时不支持此功能
  • -
  • width:xxx: (可选) 播放器宽度 (默认: 100%)
  • -
  • lrc:xxx: (可选)歌词文件 URL 地址
  • -
-

MeingJS

新版本支持QQ音乐、网易云音乐、虾米、酷狗、百度等平台的音乐播放
只需要在博客配置文件_config.yml添加设置就能使用

-
aplayer:
-  meting: true
-
-
<!-- 简单示例 (id, server, type)  -->
-{% meting "10755" "netease" "album" %}
-
-<!-- 进阶示例 -->
-{% meting "10755" "netease" "album" "autoplay" "mutex:true" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%}
-
- -
- - -
- -

有关 meting 的选项列表如下:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
选项默认值描述
id必须值歌曲 id / 播放列表 id / 相册 id / 搜索关键字
server必须值音乐平台: netease, tencent, kugou, xiami, baidu
type必须值song, playlist, album, search, artist
fixedfalse开启固定模式
minifalse开启迷你模式
loopall列表循环模式:all, one,none
orderlist列表播放模式: list, random
volume0.7播放器音量
lrctype0歌词格式类型
listfoldedfalse指定音乐播放列表是否折叠
storagenamemetingjsLocalStorage 中存储播放器设定的键名
autoplaytrue自动播放,移动端浏览器暂时不支持此功能
mutextrue该选项开启时,如果同页面有其他 aplayer 播放,该播放器会暂停
listmaxheight340px播放列表的最大长度
preloadauto音乐文件预载入模式,可选项: none, metadata, auto
theme#ad7a86播放器风格色彩设置
-

文档

Github | hexo-tag-aplayer

-

DPlayer

使用

{% dplayer key=value ... %}
-
-<!--key的值-->
-dplayer options:
-    'autoplay', 'loop', 'screenshot', 'hotkey', 'mutex', 'dmunlimited' : bool options, use "yes" "y" "true" "1" "on" or just without value to enable
-    'preload', 'theme', 'lang', 'logo', 'url', 'pic', 'thumbnails', 'vidtype', 'suburl', 'subtype', 'subbottom', 'subcolor', 'subcolor', 'id', 'api', 'token', 'addition', 'dmuser' : string arguments
-    'volume', 'maximum' : number arguments
-container options:
-    'width', 'height' : string, used in container element style
-other:
-    'code' : value of this key will be append to script tag
-
-
<!--演示-->
-{% dplayer "url=https://blog-1256021060.cos.ap-shanghai.myqcloud.com/videos/Screenshots-transitions.mp4"  "loop=yes" "theme=#FADFA3" "autoplay=false" %}
-
-
-

文档

Github | hexo-tag-dplayer

-

cPlayer

安装

npm install hexo-tag-cplayer --save
-
-

使用

{% cplayer [autoplay] [yaml|cson|json] %}
-# type your config here
-{% endcplayer %}
-
-

博客配置文件_config.yml中添加设置

-
cplayer:
-  meting: true
-
-

范例

{% cplayer autoplay %}
-- name: チルドレンレコード # 名字
-  artist: 96猫,伊東歌詞太郎 # 艺术家
-  poster: https://cplayer.js.org/801422833716a4f0f96ff6dff1f77dfe.jpg # 音乐海报
-  src: https://cplayer.js.org/8af423669c27d265bb129d04a927044f.mp3 # 音乐资源链接
-- 188550 # 网易云音乐 ID
-{% endcplayer %}
-
- -
- - - -

文档

Github | hexo-tag-cplayer

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/01/index.html b/archives/2020/01/index.html deleted file mode 100644 index 83712e1..0000000 --- a/archives/2020/01/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020/1 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/02/index.html b/archives/2020/02/index.html deleted file mode 100644 index d495d6a..0000000 --- a/archives/2020/02/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020/2 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/03/index.html b/archives/2020/03/index.html deleted file mode 100644 index 8dea7a5..0000000 --- a/archives/2020/03/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020/3 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/04/index.html b/archives/2020/04/index.html deleted file mode 100644 index 91f7a72..0000000 --- a/archives/2020/04/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020/4 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/05/index.html b/archives/2020/05/index.html deleted file mode 100644 index fde6806..0000000 --- a/archives/2020/05/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020/5 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/index.html b/archives/2020/index.html deleted file mode 100644 index 6686a33..0000000 --- a/archives/2020/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2020/page/2/index.html b/archives/2020/page/2/index.html deleted file mode 100644 index 9156a1d..0000000 --- a/archives/2020/page/2/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - 文章归档:2020 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2021/02/index.html b/archives/2021/02/index.html deleted file mode 100644 index 3fd5670..0000000 --- a/archives/2021/02/index.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - 文章归档:2021/2 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - - -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2021/index.html b/archives/2021/index.html deleted file mode 100644 index 82f7d92..0000000 --- a/archives/2021/index.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - 文章归档:2021 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - - -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2022/03/index.html b/archives/2022/03/index.html deleted file mode 100644 index f97cb13..0000000 --- a/archives/2022/03/index.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - 文章归档:2022/3 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - - -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2022/04/index.html b/archives/2022/04/index.html deleted file mode 100644 index 05e6e52..0000000 --- a/archives/2022/04/index.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - 文章归档:2022/4 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - - -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/2022/index.html b/archives/2022/index.html deleted file mode 100644 index cb64a02..0000000 --- a/archives/2022/index.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - 文章归档:2022 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - - -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/index.html b/archives/index.html deleted file mode 100644 index f474869..0000000 --- a/archives/index.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 文章归档 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archives/page/2/index.html b/archives/page/2/index.html deleted file mode 100644 index c02b38e..0000000 --- a/archives/page/2/index.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 文章归档 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/css/APlayer.min.css b/assets/css/APlayer.min.css deleted file mode 100644 index 12b5583..0000000 --- a/assets/css/APlayer.min.css +++ /dev/null @@ -1,3 +0,0 @@ -.aplayer{background:#fff;font-family:Arial,Helvetica,sans-serif;margin:5px;box-shadow:0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);border-radius:2px;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:normal;position:relative}.aplayer *{box-sizing:content-box}.aplayer svg{width:100%;height:100%}.aplayer svg circle,.aplayer svg path{fill:#fff}.aplayer.aplayer-withlist .aplayer-info{border-bottom:1px solid #e9e9e9}.aplayer.aplayer-withlist .aplayer-list{display:block}.aplayer.aplayer-withlist .aplayer-icon-order,.aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu{display:inline}.aplayer.aplayer-withlrc .aplayer-pic{height:90px;width:90px}.aplayer.aplayer-withlrc .aplayer-info{margin-left:90px;height:90px;padding:10px 7px 0}.aplayer.aplayer-withlrc .aplayer-lrc{display:block}.aplayer.aplayer-narrow{width:66px}.aplayer.aplayer-narrow .aplayer-info,.aplayer.aplayer-narrow .aplayer-list{display:none}.aplayer.aplayer-narrow .aplayer-body,.aplayer.aplayer-narrow .aplayer-pic{height:66px;width:66px}.aplayer.aplayer-fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;overflow:visible;max-width:400px;box-shadow:none}.aplayer.aplayer-fixed .aplayer-list{margin-bottom:65px;border:1px solid #eee;border-bottom:none}.aplayer.aplayer-fixed .aplayer-body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;background:#fff;padding-right:18px;transition:all .3s ease;max-width:400px}.aplayer.aplayer-fixed .aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before{display:none}.aplayer.aplayer-fixed .aplayer-info{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid #e9e9e9}.aplayer.aplayer-fixed .aplayer-info .aplayer-music{width:calc(100% - 105px)}.aplayer.aplayer-fixed .aplayer-miniswitcher{display:block}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info{display:block;-webkit-transform:scaleX(0);transform:scaleX(0)}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{width:66px!important}.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon{-webkit-transform:rotateY(0);transform:rotateY(0)}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-lrc,.aplayer.aplayer-fixed .aplayer-icon-play{display:inline-block}.aplayer.aplayer-fixed .aplayer-icon-back,.aplayer.aplayer-fixed .aplayer-icon-forward,.aplayer.aplayer-fixed .aplayer-icon-menu,.aplayer.aplayer-fixed .aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.aplayer.aplayer-fixed .aplayer-icon-back{right:75px}.aplayer.aplayer-fixed .aplayer-icon-play{right:50px}.aplayer.aplayer-fixed .aplayer-icon-forward{right:25px}.aplayer.aplayer-fixed .aplayer-icon-menu{right:0}.aplayer.aplayer-arrow .aplayer-icon-loop,.aplayer.aplayer-arrow .aplayer-icon-order,.aplayer.aplayer-mobile .aplayer-icon-volume-down{display:none}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon{display:block}.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-body{position:relative}.aplayer .aplayer-icon{width:15px;height:15px;border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:12px;margin:0;display:inline-block}.aplayer .aplayer-icon path{transition:all .2s ease-in-out}.aplayer .aplayer-icon-back,.aplayer .aplayer-icon-forward,.aplayer .aplayer-icon-lrc,.aplayer .aplayer-icon-order,.aplayer .aplayer-icon-play{display:none}.aplayer .aplayer-icon-lrc-inactivity svg{opacity:.4}.aplayer .aplayer-icon-forward{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.aplayer .aplayer-lrc-content{display:none}.aplayer .aplayer-pic{position:relative;float:left;height:66px;width:66px;background-size:cover;background-position:50%;transition:all .3s ease;cursor:pointer}.aplayer .aplayer-pic:hover .aplayer-button{opacity:1}.aplayer .aplayer-pic .aplayer-button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px rgba(0,0,0,.2);background:rgba(0,0,0,.2);transition:all .1s ease}.aplayer .aplayer-pic .aplayer-button path{fill:#fff}.aplayer .aplayer-pic .aplayer-hide{display:none}.aplayer .aplayer-pic .aplayer-play{width:26px;height:26px;border:2px solid #fff;bottom:50%;right:50%;margin:0 -15px -15px 0}.aplayer .aplayer-pic .aplayer-play svg{position:absolute;top:3px;left:4px;height:20px;width:20px}.aplayer .aplayer-pic .aplayer-pause{width:16px;height:16px;border:2px solid #fff;bottom:4px;right:4px}.aplayer .aplayer-pic .aplayer-pause svg{position:absolute;top:2px;left:2px;height:12px;width:12px}.aplayer .aplayer-info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.aplayer .aplayer-info .aplayer-music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.aplayer .aplayer-info .aplayer-music .aplayer-title{font-size:14px}.aplayer .aplayer-info .aplayer-music .aplayer-author{font-size:12px;color:#666}.aplayer .aplayer-info .aplayer-controller{position:relative;display:flex}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar{position:relative;height:2px;width:100%;background:#cdcdcd}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded{position:absolute;left:0;top:0;bottom:0;background:#aaa;height:2px;transition:all .5s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played{position:absolute;left:0;top:0;bottom:0;height:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:10px;width:10px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.aplayer .aplayer-info .aplayer-controller .aplayer-time{position:relative;right:0;bottom:4px;height:17px;color:#999;font-size:11px;padding-left:7px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner{vertical-align:middle}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon{cursor:pointer;transition:all .2s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#666}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop{margin-right:2px}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path{fill:#000}.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu,.aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all .2s ease-in-out}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active{height:40px}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar{position:absolute;bottom:0;right:10px;width:5px;height:35px;background:#aaa;border-radius:2.5px;overflow:hidden}.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume{position:absolute;bottom:0;right:0;width:5px;transition:all .1s ease}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon{display:none}.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg{position:absolute;-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.aplayer .aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.aplayer .aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,#fff 0,hsla(0,0%,100%,0));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.aplayer .aplayer-lrc:after,.aplayer .aplayer-lrc:before{position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" "}.aplayer .aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,hsla(0,0%,100%,0) 0,hsla(0,0%,100%,.8));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.aplayer .aplayer-lrc p{font-size:12px;color:#666;line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden}.aplayer .aplayer-lrc p.aplayer-lrc-current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.aplayer .aplayer-lrc.aplayer-lrc-hide{display:none}.aplayer .aplayer-lrc .aplayer-lrc-contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:default}.aplayer .aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.aplayer .aplayer-list.aplayer-list-hide{max-height:0!important}.aplayer .aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.aplayer .aplayer-list ol::-webkit-scrollbar{width:5px}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb{border-radius:3px;background-color:#eee}.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover{background-color:#ccc}.aplayer .aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid #e9e9e9;cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0}.aplayer .aplayer-list ol li:first-child{border-top:none}.aplayer .aplayer-list ol li:hover{background:#efefef}.aplayer .aplayer-list ol li.aplayer-list-light{background:#e9e9e9}.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur{display:inline-block}.aplayer .aplayer-list ol li .aplayer-list-cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-index{color:#666;margin-right:12px;cursor:pointer}.aplayer .aplayer-list ol li .aplayer-list-author{color:#666;float:right;cursor:pointer}.aplayer .aplayer-notice{opacity:0;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none;background-color:#f4f4f5;color:#909399}.aplayer .aplayer-miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:#e6e6e6;width:18px;border-radius:0 2px 2px 0}.aplayer .aplayer-miniswitcher .aplayer-icon{height:100%;width:100%;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);transition:all .3s ease}.aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#666}.aplayer .aplayer-miniswitcher .aplayer-icon:hover path{fill:#000}@-webkit-keyframes aplayer-roll{0%{left:0}to{left:-100%}}@keyframes aplayer-roll{0%{left:0}to{left:-100%}}@-webkit-keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} - -/*# sourceMappingURL=APlayer.min.css.map*/ \ No newline at end of file diff --git a/assets/css/DPlayer.min.css b/assets/css/DPlayer.min.css deleted file mode 100644 index 878ba62..0000000 --- a/assets/css/DPlayer.min.css +++ /dev/null @@ -1,4 +0,0 @@ -button[data-balloon]{overflow:visible}[data-balloon]{position:relative;cursor:pointer}[data-balloon]:after{font-family:sans-serif!important;font-weight:400!important;font-style:normal!important;text-shadow:none!important;font-size:12px!important;background:hsla(0,0%,7%,.9);border-radius:4px;color:#fff;content:attr(data-balloon);padding:.5em 1em;white-space:nowrap}[data-balloon]:after,[data-balloon]:before{filter:alpha(opactiy=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-moz-opacity:0;-khtml-opacity:0;opacity:0;pointer-events:none;transition:all .18s ease-out .18s;position:absolute;z-index:10}[data-balloon]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002C14.285 12.002 8.594 0 2.658 0z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;content:""}[data-balloon]:hover:after,[data-balloon]:hover:before,[data-balloon][data-balloon-visible]:after,[data-balloon][data-balloon-visible]:before{filter:alpha(opactiy=100);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";-moz-opacity:1;-khtml-opacity:1;opacity:1;pointer-events:auto}[data-balloon].font-awesome:after{font-family:FontAwesome}[data-balloon][data-balloon-break]:after{white-space:pre}[data-balloon][data-balloon-blunt]:after,[data-balloon][data-balloon-blunt]:before{transition:none}[data-balloon][data-balloon-pos=up]:after{margin-bottom:11px}[data-balloon][data-balloon-pos=up]:after,[data-balloon][data-balloon-pos=up]:before{bottom:100%;left:50%;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up]:before{margin-bottom:5px}[data-balloon][data-balloon-pos=up]:hover:after,[data-balloon][data-balloon-pos=up]:hover:before,[data-balloon][data-balloon-pos=up][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=up-left]:after{left:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-left]:after,[data-balloon][data-balloon-pos=up-left]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-left]:before{left:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-left]:hover:after,[data-balloon][data-balloon-pos=up-left]:hover:before,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=up-right]:after{right:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-right]:after,[data-balloon][data-balloon-pos=up-right]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-right]:before{right:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-right]:hover:after,[data-balloon][data-balloon-pos=up-right]:hover:before,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=down]:after{margin-top:11px}[data-balloon][data-balloon-pos=down]:after,[data-balloon][data-balloon-pos=down]:before{left:50%;top:100%;-webkit-transform:translate(-50%,-10px);transform:translate(-50%,-10px)}[data-balloon][data-balloon-pos=down]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;margin-top:5px}[data-balloon][data-balloon-pos=down]:hover:after,[data-balloon][data-balloon-pos=down]:hover:before,[data-balloon][data-balloon-pos=down][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=down-left]:after{left:0;margin-top:11px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;left:5px;margin-top:5px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]:hover:after,[data-balloon][data-balloon-pos=down-left]:hover:before,[data-balloon][data-balloon-pos=down-left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down-left][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=down-right]:after{right:0;margin-top:11px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-right]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;right:5px;margin-top:5px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-right]:hover:after,[data-balloon][data-balloon-pos=down-right]:hover:before,[data-balloon][data-balloon-pos=down-right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down-right][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=left]:after{margin-right:11px;right:100%;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}[data-balloon][data-balloon-pos=left]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M0 33.342V1.338c0 6 12.002 11.627 12.002 16.002C12.002 21.715 0 27.406 0 33.342z'/%3E%3C/svg%3E");background-size:100% auto;width:6px;height:18px;margin-right:5px;right:100%;top:50%;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%)}[data-balloon][data-balloon-pos=left]:hover:after,[data-balloon][data-balloon-pos=left]:hover:before,[data-balloon][data-balloon-pos=left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=left][data-balloon-visible]:before{-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-balloon][data-balloon-pos=right]:after{left:100%;margin-left:11px;top:50%;-webkit-transform:translate(-10px,-50%);transform:translate(-10px,-50%)}[data-balloon][data-balloon-pos=right]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='36'%3E%3Cpath fill='rgba(17, 17, 17, 0.9)' d='M12 2.658v32.004c0-6-12.002-11.627-12.002-16.002C-.002 14.285 12 8.594 12 2.658z'/%3E%3C/svg%3E");background-size:100% auto;width:6px;height:18px;left:100%;margin-left:5px;top:50%;-webkit-transform:translate(-10px,-50%);transform:translate(-10px,-50%)}[data-balloon][data-balloon-pos=right]:hover:after,[data-balloon][data-balloon-pos=right]:hover:before,[data-balloon][data-balloon-pos=right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=right][data-balloon-visible]:before{-webkit-transform:translateY(-50%);transform:translateY(-50%)}[data-balloon][data-balloon-length=small]:after{white-space:normal;width:80px}[data-balloon][data-balloon-length=medium]:after{white-space:normal;width:150px}[data-balloon][data-balloon-length=large]:after{white-space:normal;width:260px}[data-balloon][data-balloon-length=xlarge]:after{white-space:normal;width:380px}@media screen and (max-width:768px){[data-balloon][data-balloon-length=xlarge]:after{white-space:normal;width:90vw}}[data-balloon][data-balloon-length=fit]:after{white-space:normal;width:100%} -@-webkit-keyframes my-face{2%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}4%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}6%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}8%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}10%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}12%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}14%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}16%{-webkit-transform:translateY(-.5px) rotate(-1.5deg);transform:translateY(-.5px) rotate(-1.5deg)}18%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}20%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}22%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}24%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}26%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}28%{-webkit-transform:translateY(.5px) rotate(1.5deg);transform:translateY(.5px) rotate(1.5deg)}30%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}32%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}34%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}36%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}38%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}40%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}42%{-webkit-transform:translateY(2.5px) rotate(-1.5deg);transform:translateY(2.5px) rotate(-1.5deg)}44%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}46%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}48%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}50%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}52%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}54%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}56%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}58%{-webkit-transform:translateY(.5px) rotate(2.5deg);transform:translateY(.5px) rotate(2.5deg)}60%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}62%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}64%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}66%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}68%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}70%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}72%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}74%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}76%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}78%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}80%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}82%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}84%{-webkit-transform:translateY(1.5px) rotate(2.5deg);transform:translateY(1.5px) rotate(2.5deg)}86%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}88%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}90%{-webkit-transform:translateY(2.5px) rotate(-.5deg);transform:translateY(2.5px) rotate(-.5deg)}92%{-webkit-transform:translateY(.5px) rotate(-.5deg);transform:translateY(.5px) rotate(-.5deg)}94%{-webkit-transform:translateY(2.5px) rotate(.5deg);transform:translateY(2.5px) rotate(.5deg)}96%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}98%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}0%,to{-webkit-transform:translate(0) rotate(0deg);transform:translate(0) rotate(0deg)}}@keyframes my-face{2%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}4%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}6%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}8%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}10%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}12%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}14%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}16%{-webkit-transform:translateY(-.5px) rotate(-1.5deg);transform:translateY(-.5px) rotate(-1.5deg)}18%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}20%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}22%{-webkit-transform:translateY(.5px) rotate(-1.5deg);transform:translateY(.5px) rotate(-1.5deg)}24%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}26%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}28%{-webkit-transform:translateY(.5px) rotate(1.5deg);transform:translateY(.5px) rotate(1.5deg)}30%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}32%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}34%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}36%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}38%{-webkit-transform:translateY(1.5px) rotate(-1.5deg);transform:translateY(1.5px) rotate(-1.5deg)}40%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}42%{-webkit-transform:translateY(2.5px) rotate(-1.5deg);transform:translateY(2.5px) rotate(-1.5deg)}44%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}46%{-webkit-transform:translateY(-1.5px) rotate(2.5deg);transform:translateY(-1.5px) rotate(2.5deg)}48%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}50%{-webkit-transform:translateY(.5px) rotate(.5deg);transform:translateY(.5px) rotate(.5deg)}52%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}54%{-webkit-transform:translateY(-1.5px) rotate(1.5deg);transform:translateY(-1.5px) rotate(1.5deg)}56%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}58%{-webkit-transform:translateY(.5px) rotate(2.5deg);transform:translateY(.5px) rotate(2.5deg)}60%{-webkit-transform:translateY(2.5px) rotate(2.5deg);transform:translateY(2.5px) rotate(2.5deg)}62%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}64%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}66%{-webkit-transform:translateY(1.5px) rotate(-.5deg);transform:translateY(1.5px) rotate(-.5deg)}68%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}70%{-webkit-transform:translateY(1.5px) rotate(.5deg);transform:translateY(1.5px) rotate(.5deg)}72%{-webkit-transform:translateY(2.5px) rotate(1.5deg);transform:translateY(2.5px) rotate(1.5deg)}74%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}76%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}78%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}80%{-webkit-transform:translateY(1.5px) rotate(1.5deg);transform:translateY(1.5px) rotate(1.5deg)}82%{-webkit-transform:translateY(-.5px) rotate(.5deg);transform:translateY(-.5px) rotate(.5deg)}84%{-webkit-transform:translateY(1.5px) rotate(2.5deg);transform:translateY(1.5px) rotate(2.5deg)}86%{-webkit-transform:translateY(-1.5px) rotate(-1.5deg);transform:translateY(-1.5px) rotate(-1.5deg)}88%{-webkit-transform:translateY(-.5px) rotate(2.5deg);transform:translateY(-.5px) rotate(2.5deg)}90%{-webkit-transform:translateY(2.5px) rotate(-.5deg);transform:translateY(2.5px) rotate(-.5deg)}92%{-webkit-transform:translateY(.5px) rotate(-.5deg);transform:translateY(.5px) rotate(-.5deg)}94%{-webkit-transform:translateY(2.5px) rotate(.5deg);transform:translateY(2.5px) rotate(.5deg)}96%{-webkit-transform:translateY(-.5px) rotate(1.5deg);transform:translateY(-.5px) rotate(1.5deg)}98%{-webkit-transform:translateY(-1.5px) rotate(-.5deg);transform:translateY(-1.5px) rotate(-.5deg)}0%,to{-webkit-transform:translate(0) rotate(0deg);transform:translate(0) rotate(0deg)}}.dplayer{position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:1}.dplayer *{box-sizing:content-box}.dplayer svg{width:100%;height:100%}.dplayer svg circle,.dplayer svg path{fill:#fff}.dplayer:-webkit-full-screen{width:100%;height:100%;background:#000;position:fixed;z-index:100000;left:0;top:0;margin:0;padding:0;-webkit-transform:translate(0);transform:translate(0)}.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-top.dplayer-danmaku-move{-webkit-animation:danmaku-center 6s linear;animation:danmaku-center 6s linear;-webkit-animation-play-state:inherit;animation-play-state:inherit}.dplayer:-webkit-full-screen .dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move{-webkit-animation:danmaku 8s linear;animation:danmaku 8s linear;-webkit-animation-play-state:inherit;animation-play-state:inherit}.dplayer.dplayer-live .dplayer-bar-wrap,.dplayer.dplayer-live.dplayer-no-danmaku .dplayer-setting,.dplayer.dplayer-live .dplayer-setting-loop,.dplayer.dplayer-live .dplayer-setting-speed,.dplayer.dplayer-live .dplayer-time,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-comment,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-danmaku,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-danunlimit,.dplayer.dplayer-no-danmaku .dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box .dplayer-setting-showdan,.dplayer.dplayer-no-danmaku .dplayer-danmaku{display:none}.dplayer.dplayer-arrow .dplayer-danmaku{font-size:18px}.dplayer.dplayer-arrow .dplayer-icon{margin:0 -3px}.dplayer.dplayer-playing .dplayer-danmaku .dplayer-danmaku-move{-webkit-animation-play-state:running;animation-play-state:running}@media (min-width:900px){.dplayer.dplayer-playing .dplayer-controller,.dplayer.dplayer-playing .dplayer-controller-mask{opacity:0}.dplayer.dplayer-playing:hover .dplayer-controller,.dplayer.dplayer-playing:hover .dplayer-controller-mask{opacity:1}}.dplayer.dplayer-loading .dplayer-bezel .diplayer-loading-icon{display:block}.dplayer.dplayer-loading .dplayer-danmaku,.dplayer.dplayer-loading .dplayer-danmaku-move,.dplayer.dplayer-paused .dplayer-danmaku,.dplayer.dplayer-paused .dplayer-danmaku-move{-webkit-animation-play-state:paused;animation-play-state:paused}.dplayer.dplayer-hide-controller{cursor:none}.dplayer.dplayer-hide-controller .dplayer-controller,.dplayer.dplayer-hide-controller .dplayer-controller-mask{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.dplayer.dplayer-show-controller .dplayer-controller,.dplayer.dplayer-show-controller .dplayer-controller-mask{opacity:1}.dplayer.dplayer-fulled{position:fixed;z-index:100000;left:0;top:0;width:100%;height:100%}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-camera-icon,.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-volume{display:none}.dplayer.dplayer-mobile .dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:static;display:inline-block}.dplayer.dplayer-mobile .dplayer-bar-time{display:none}.dplayer-web-fullscreen-fix{position:fixed;top:0;left:0;margin:0;padding:0}[data-balloon]:before{display:none}[data-balloon]:after{padding:.3em .7em;background:hsla(0,0%,7%,.7)}[data-balloon][data-balloon-pos=up]:after{margin-bottom:0}.dplayer-bezel{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff;pointer-events:none}.dplayer-bezel .dplayer-bezel-icon{position:absolute;top:50%;left:50%;margin:-26px 0 0 -26px;height:52px;width:52px;padding:12px;box-sizing:border-box;background:rgba(0,0,0,.5);border-radius:50%;opacity:0;pointer-events:none}.dplayer-bezel .dplayer-bezel-icon.dplayer-bezel-transition{-webkit-animation:bezel-hide .5s linear;animation:bezel-hide .5s linear}@-webkit-keyframes bezel-hide{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(2);transform:scale(2)}}@keyframes bezel-hide{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}to{opacity:0;-webkit-transform:scale(2);transform:scale(2)}}.dplayer-bezel .dplayer-danloading{position:absolute;top:50%;margin-top:-7px;width:100%;text-align:center;font-size:14px;line-height:14px;-webkit-animation:my-face 5s infinite ease-in-out;animation:my-face 5s infinite ease-in-out}.dplayer-bezel .diplayer-loading-icon{display:none;position:absolute;top:50%;left:50%;margin:-18px 0 0 -18px;height:36px;width:36px;pointer-events:none}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-hide{display:none}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot{-webkit-animation:diplayer-loading-dot-fade .8s ease infinite;animation:diplayer-loading-dot-fade .8s ease infinite;opacity:0;-webkit-transform-origin:4px 4px;transform-origin:4px 4px}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-7{-webkit-animation-delay:.7s;animation-delay:.7s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-6{-webkit-animation-delay:.6s;animation-delay:.6s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-5{-webkit-animation-delay:.5s;animation-delay:.5s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-4{-webkit-animation-delay:.4s;animation-delay:.4s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-3{-webkit-animation-delay:.3s;animation-delay:.3s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-2{-webkit-animation-delay:.2s;animation-delay:.2s}.dplayer-bezel .diplayer-loading-icon .diplayer-loading-dot.diplayer-loading-dot-1{-webkit-animation-delay:.1s;animation-delay:.1s}@-webkit-keyframes diplayer-loading-dot-fade{0%{opacity:.7;-webkit-transform:scale(1.2);transform:scale(1.2)}50%{opacity:.25;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:.25;-webkit-transform:scale(.85);transform:scale(.85)}}@keyframes diplayer-loading-dot-fade{0%{opacity:.7;-webkit-transform:scale(1.2);transform:scale(1.2)}50%{opacity:.25;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:.25;-webkit-transform:scale(.85);transform:scale(.85)}}.dplayer-controller-mask{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom;height:98px;width:100%}.dplayer-controller,.dplayer-controller-mask{position:absolute;bottom:0;transition:all .3s ease}.dplayer-controller{left:0;right:0;height:41px;padding:0 20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dplayer-controller.dplayer-controller-comment .dplayer-icons{display:none}.dplayer-controller.dplayer-controller-comment .dplayer-icons.dplayer-comment-box{display:block}.dplayer-controller .dplayer-bar-wrap{padding:5px 0;cursor:pointer;position:absolute;bottom:33px;width:calc(100% - 40px);height:3px}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-bar .dplayer-played .dplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-bar-wrap:hover .dplayer-highlight{display:block;width:8px;-webkit-transform:translateX(-4px);transform:translateX(-4px);top:4px;height:40%}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight{z-index:12;position:absolute;top:5px;width:6px;height:20%;border-radius:6px;background-color:#fff;text-align:center;-webkit-transform:translateX(-3px);transform:translateX(-3px);transition:all .2s ease-in-out}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover .dplayer-highlight-text{display:block}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-preview,.dplayer-controller .dplayer-bar-wrap .dplayer-highlight:hover~.dplayer-bar-time{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-highlight .dplayer-highlight-text{display:none;position:absolute;left:50%;top:-24px;padding:5px 8px;background-color:rgba(0,0,0,.62);color:#fff;border-radius:4px;font-size:12px;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview{position:absolute;background:#fff;pointer-events:none;display:none;background-size:16000px 100%}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-preview-canvas{position:absolute;width:100%;height:100%;z-index:1;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time{position:absolute;left:0;top:-20px;border-radius:4px;padding:5px 7px;background-color:rgba(0,0,0,.62);color:#fff;font-size:12px;text-align:center;opacity:1;transition:opacity .1s ease-in-out;word-wrap:normal;word-break:normal;z-index:2;pointer-events:none}.dplayer-controller .dplayer-bar-wrap .dplayer-bar-time.hidden{opacity:0}.dplayer-controller .dplayer-bar-wrap .dplayer-bar{position:relative;height:3px;width:100%;background:hsla(0,0%,100%,.2);cursor:pointer}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded{background:hsla(0,0%,100%,.4);transition:all .5s ease}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-loaded,.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played{position:absolute;left:0;top:0;bottom:0;height:3px;will-change:width}.dplayer-controller .dplayer-bar-wrap .dplayer-bar .dplayer-played .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.dplayer-controller .dplayer-icons{height:38px;position:absolute;bottom:0}.dplayer-controller .dplayer-icons.dplayer-comment-box{display:none;position:absolute;transition:all .3s ease-in-out;z-index:2;height:38px;bottom:0;left:20px;right:20px;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-icon{position:absolute;left:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-send-icon{position:absolute;right:0;top:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box{position:absolute;background:rgba(28,28,28,.9);bottom:41px;left:0;box-shadow:0 0 25px rgba(0,0,0,.3);border-radius:4px;padding:10px 10px 16px;font-size:14px;width:204px;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box.dplayer-comment-setting-open{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box input[type=radio]{display:none}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box label{cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-title{font-size:13px;color:#fff;line-height:30px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type .dplayer-comment-setting-title{margin-bottom:6px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(2) span{border-radius:4px 0 0 4px}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type label:nth-child(4) span{border-radius:0 4px 4px 0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type span{width:33%;padding:4px 6px;line-height:16px;display:inline-block;font-size:12px;color:#fff;border:1px solid #fff;margin-right:-1px;box-sizing:border-box;text-align:center;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-type input:checked+span{background:#e4e4e6;color:#1c1c1c}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color{font-size:0}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color label{font-size:0;padding:6px;display:inline-block}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span{width:22px;height:22px;display:inline-block;border-radius:50%;box-sizing:border-box;cursor:pointer}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-setting-box .dplayer-comment-setting-color span:hover{-webkit-animation:my-face 5s infinite ease-in-out;animation:my-face 5s infinite ease-in-out}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input{outline:none;border:none;padding:8px 31px;font-size:14px;line-height:18px;text-align:center;border-radius:4px;background:none;margin:0;height:100%;box-sizing:border-box;width:100%;color:#fff}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-webkit-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input:-ms-input-placeholder,.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-input-placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::placeholder{color:#fff;opacity:.8}.dplayer-controller .dplayer-icons.dplayer-comment-box .dplayer-comment-input::-ms-clear{display:none}.dplayer-controller .dplayer-icons.dplayer-icons-left .dplayer-icon{padding:7px}.dplayer-controller .dplayer-icons.dplayer-icons-right{right:20px}.dplayer-controller .dplayer-icons.dplayer-icons-right .dplayer-icon{padding:8px}.dplayer-controller .dplayer-icons .dplayer-live-badge,.dplayer-controller .dplayer-icons .dplayer-time{line-height:38px;color:#eee;text-shadow:0 0 2px rgba(0,0,0,.5);vertical-align:middle;font-size:13px;cursor:default}.dplayer-controller .dplayer-icons .dplayer-live-dot{display:inline-block;width:6px;height:6px;vertical-align:4%;margin-right:5px;content:"";border-radius:6px}.dplayer-controller .dplayer-icons .dplayer-icon{width:40px;height:100%;border:none;background-color:transparent;outline:none;cursor:pointer;vertical-align:middle;box-sizing:border-box;display:inline-block}.dplayer-controller .dplayer-icons .dplayer-icon .dplayer-icon-content{transition:all .2s ease-in-out;opacity:.8}.dplayer-controller .dplayer-icons .dplayer-icon:hover .dplayer-icon-content{opacity:1}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-quality-icon{color:#fff;width:auto;line-height:22px;font-size:14px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-comment-icon{padding:10px 9px 9px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-setting-icon{padding-top:8.5px}.dplayer-controller .dplayer-icons .dplayer-icon.dplayer-volume-icon{width:43px}.dplayer-controller .dplayer-icons .dplayer-volume{position:relative;display:inline-block;cursor:pointer;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume:hover .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar{width:45px}.dplayer-controller .dplayer-icons .dplayer-volume.dplayer-volume-active .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap{display:inline-block;margin:0 10px 0 -5px;vertical-align:middle;height:100%}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar{position:relative;top:17px;width:0;height:3px;background:#aaa;transition:all .3s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;will-change:width}.dplayer-controller .dplayer-icons .dplayer-volume .dplayer-volume-bar-wrap .dplayer-volume-bar .dplayer-volume-bar-inner .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;-webkit-transform:scale(0);transform:scale(0)}.dplayer-controller .dplayer-icons .dplayer-setting,.dplayer-controller .dplayer-icons .dplayer-subtitle-btn{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box{position:absolute;right:0;bottom:50px;-webkit-transform:scale(0);transform:scale(0);width:150px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 0;transition:all .3s ease-in-out;overflow:hidden;z-index:2}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box>div.dplayer-setting-origin-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-open{-webkit-transform:scale(1);transform:scale(1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-narrow{width:70px;height:180px;text-align:center}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-origin-panel{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-box.dplayer-setting-box-speed .dplayer-setting-speed-panel{display:block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item{height:30px;padding:5px 10px;box-sizing:border-box;cursor:pointer;position:relative}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-item:hover,.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-speed-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku{padding:5px 0}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-label{padding:0 10px;display:inline}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku:hover .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-label{display:none}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku.dplayer-setting-danmaku-active .dplayer-danmaku-bar-wrap{display:inline-block}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap{padding:0 10px;box-sizing:border-box;display:none;vertical-align:middle;height:100%;width:100%}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar{position:relative;top:8.5px;width:100%;height:3px;background:#fff;transition:all .3s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar .dplayer-danmaku-bar-inner{position:absolute;bottom:0;left:0;height:100%;transition:all .1s ease;background:#aaa;will-change:width}.dplayer-controller .dplayer-icons .dplayer-setting .dplayer-setting-danmaku .dplayer-danmaku-bar-wrap .dplayer-danmaku-bar .dplayer-danmaku-bar-inner .dplayer-thumb{position:absolute;top:0;right:5px;margin-top:-4px;margin-right:-10px;height:11px;width:11px;border-radius:50%;cursor:pointer;transition:all .3s ease-in-out;background:#aaa}.dplayer-controller .dplayer-icons .dplayer-full{display:inline-block;height:100%;position:relative}.dplayer-controller .dplayer-icons .dplayer-full:hover .dplayer-full-in-icon{display:block}.dplayer-controller .dplayer-icons .dplayer-full .dplayer-full-in-icon{position:absolute;top:-30px;z-index:1;display:none}.dplayer-controller .dplayer-icons .dplayer-quality{position:relative;display:inline-block;height:100%;z-index:2}.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-list,.dplayer-controller .dplayer-icons .dplayer-quality:hover .dplayer-quality-mask{display:block}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-mask{display:none;position:absolute;bottom:38px;left:-18px;width:80px;padding-bottom:12px}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-list{display:none;font-size:12px;width:80px;border-radius:2px;background:rgba(28,28,28,.9);padding:5px 0;transition:all .3s ease-in-out;overflow:hidden;color:#fff;text-align:center}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item{height:25px;box-sizing:border-box;cursor:pointer;line-height:25px}.dplayer-controller .dplayer-icons .dplayer-quality .dplayer-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-controller .dplayer-icons .dplayer-comment{display:inline-block;height:100%}.dplayer-controller .dplayer-icons .dplayer-label{color:#eee;font-size:13px;display:inline-block;vertical-align:middle;white-space:nowrap}.dplayer-controller .dplayer-icons .dplayer-toggle{width:32px;height:20px;text-align:center;font-size:0;vertical-align:middle;position:absolute;top:5px;right:10px}.dplayer-controller .dplayer-icons .dplayer-toggle input{max-height:0;max-width:0;display:none}.dplayer-controller .dplayer-icons .dplayer-toggle input+label{display:inline-block;position:relative;box-shadow:inset 0 0 0 0 #dfdfdf;border:1px solid #dfdfdf;height:20px;width:32px;border-radius:10px;box-sizing:border-box;cursor:pointer;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after,.dplayer-controller .dplayer-icons .dplayer-toggle input+label:before{content:"";position:absolute;display:block;height:18px;width:18px;top:0;left:0;border-radius:15px;transition:.2s ease-in-out}.dplayer-controller .dplayer-icons .dplayer-toggle input+label:after{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label{border-color:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:before{width:30px;background:hsla(0,0%,100%,.5)}.dplayer-controller .dplayer-icons .dplayer-toggle input:checked+label:after{left:12px}.dplayer-danmaku{position:absolute;left:0;right:0;top:0;bottom:0;font-size:22px;color:#fff}.dplayer-danmaku .dplayer-danmaku-item{display:inline-block;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;white-space:nowrap;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.dplayer-danmaku .dplayer-danmaku-item--demo{position:absolute;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-right{position:absolute;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move{will-change:transform;-webkit-animation:danmaku 5s linear;animation:danmaku 5s linear;-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes danmaku{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes danmaku{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.dplayer-danmaku .dplayer-danmaku-bottom,.dplayer-danmaku .dplayer-danmaku-top{position:absolute;width:100%;text-align:center;visibility:hidden}.dplayer-danmaku .dplayer-danmaku-bottom.dplayer-danmaku-move,.dplayer-danmaku .dplayer-danmaku-top.dplayer-danmaku-move{will-change:visibility;-webkit-animation:danmaku-center 4s linear;animation:danmaku-center 4s linear;-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes danmaku-center{0%{visibility:visible}to{visibility:visible}}@keyframes danmaku-center{0%{visibility:visible}to{visibility:visible}}.dplayer-logo{pointer-events:none;position:absolute;left:20px;top:20px;max-width:50px;max-height:50px}.dplayer-logo img{max-width:100%;max-height:100%;background:none}.dplayer-menu{position:absolute;width:170px;border-radius:2px;background:rgba(28,28,28,.85);padding:5px 0;overflow:hidden;z-index:3;display:none}.dplayer-menu.dplayer-menu-show{display:block}.dplayer-menu .dplayer-menu-item{height:30px;box-sizing:border-box;cursor:pointer}.dplayer-menu .dplayer-menu-item:hover{background-color:hsla(0,0%,100%,.1)}.dplayer-menu .dplayer-menu-item a{padding:0 10px;line-height:30px;color:#eee;font-size:13px;display:inline-block;vertical-align:middle;width:100%;box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-menu .dplayer-menu-item a:hover{text-decoration:none}.dplayer-notice{opacity:0;position:absolute;bottom:60px;left:20px;font-size:14px;border-radius:2px;background:rgba(28,28,28,.9);padding:7px 20px;transition:all .3s ease-in-out;overflow:hidden;color:#fff;pointer-events:none}.dplayer-subtitle{position:absolute;bottom:40px;width:90%;left:5%;text-align:center;color:#fff;text-shadow:.5px .5px .5px rgba(0,0,0,.5);font-size:20px}.dplayer-subtitle.dplayer-subtitle-hide{display:none}.dplayer-mask{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;display:none}.dplayer-mask.dplayer-mask-show{display:block}.dplayer-video-wrap{position:relative;background:#000;font-size:0;width:100%;height:100%}.dplayer-video-wrap .dplayer-video{width:100%;height:100%;display:none}.dplayer-video-wrap .dplayer-video-current{display:block}.dplayer-video-wrap .dplayer-video-prepare{display:none}.dplayer-info-panel{position:absolute;top:10px;left:10px;width:400px;background:rgba(28,28,28,.8);padding:10px;color:#fff;font-size:12px;border-radius:2px}.dplayer-info-panel-hide{display:none}.dplayer-info-panel .dplayer-info-panel-close{cursor:pointer;position:absolute;right:10px;top:10px}.dplayer-info-panel .dplayer-info-panel-item>span{display:inline-block;vertical-align:middle;line-height:15px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dplayer-info-panel .dplayer-info-panel-item-title{width:100px;text-align:right;margin-right:10px}.dplayer-info-panel .dplayer-info-panel-item-data{width:260px} - -/*# sourceMappingURL=DPlayer.min.css.map*/ \ No newline at end of file diff --git a/assets/js/APlayer.min.js b/assets/js/APlayer.min.js deleted file mode 100644 index 6ba17e3..0000000 --- a/assets/js/APlayer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("APlayer",[],t):"object"==typeof exports?exports.APlayer=t():e.APlayer=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=41)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=/mobile/i.test(window.navigator.userAgent),a={secondToTime:function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),i=Math.floor(e-3600*t-60*n);return(t>0?[t,n,i]:[n,i]).map(function(e){return e<10?"0"+e:""+e}).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,i=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==e;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-i},getElementViewTop:function(e,t){for(var n,i=e.offsetTop,a=e.offsetParent;null!==a;)i+=a.offsetTop,a=a.offsetParent;return n=document.body.scrollTop+document.documentElement.scrollTop,t?i:i-n},isMobile:i,storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},nameMap:{dragStart:i?"touchstart":"mousedown",dragMove:i?"touchmove":"mousemove",dragEnd:i?"touchend":"mouseup"},randomOrder:function(e){return function(e){for(var t=e.length-1;t>=0;t--){var n=Math.floor(Math.random()*(t+1)),i=e[n];e[n]=e[t],e[t]=i}return e}([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t\n ',t+=r(n+s),t+='\n ',t+=r(e.name),t+='\n ',t+=r(e.artist),t+="\n\n"}),t}},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=g(n(33)),a=g(n(32)),r=g(n(31)),o=g(n(30)),s=g(n(29)),l=g(n(28)),u=g(n(27)),c=g(n(26)),p=g(n(25)),d=g(n(24)),h=g(n(23)),y=g(n(22)),f=g(n(21)),v=g(n(20)),m=g(n(19));function g(e){return e&&e.__esModule?e:{default:e}}var w={play:i.default,pause:a.default,volumeUp:r.default,volumeDown:o.default,volumeOff:s.default,orderRandom:l.default,orderList:u.default,menu:c.default,loopAll:p.default,loopOne:d.default,loopNone:h.default,loading:y.default,right:f.default,skip:v.default,lrc:m.default};t.default=w},function(e,t,n){"use strict";var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){"use strict";var i,a,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};void 0===(a="function"==typeof(i=function(){if("object"===("undefined"==typeof window?"undefined":r(window))&&void 0!==document.querySelectorAll&&void 0!==window.pageYOffset&&void 0!==history.pushState){var e=function(e,t,n,i){return n>i?t:e+(t-e)*((a=n/i)<.5?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1);var a},t=function(t,n,i,a){n=n||500;var r=(a=a||window).scrollTop||window.pageYOffset;if("number"==typeof t)var o=parseInt(t);else var o=function(e,t){return"HTML"===e.nodeName?-t:e.getBoundingClientRect().top+t}(t,r);var s=Date.now(),l=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,15)};!function u(){var c=Date.now()-s;a!==window?a.scrollTop=e(r,o,c,n):window.scroll(0,e(r,o,c,n)),c>n?"function"==typeof i&&i(t):l(u)}()},n=function(e){if(!e.defaultPrevented){e.preventDefault(),location.hash!==this.hash&&window.history.pushState(null,null,this.hash);var n=document.getElementById(this.hash.substring(1));if(!n)return;t(n,500,function(e){location.replace("#"+e.id)})}};return document.addEventListener("DOMContentLoaded",function(){for(var e,t=document.querySelectorAll('a[href^="#"]:not([href="#"])'),i=t.length;e=t[--i];)e.addEventListener("click",n,!1)}),t}})?i.call(t,n,t,e):i)||(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1),n=0===this.audios.length;this.player.template.listOl.innerHTML+=(0,a.default)({theme:this.player.options.theme,audio:e,index:this.audios.length+1}),this.audios=this.audios.concat(e),t&&this.audios.length>1&&this.player.container.classList.add("aplayer-withlist"),this.player.randomOrder=r.default.randomOrder(this.audios.length),this.player.template.listCurs=this.player.container.querySelectorAll(".aplayer-list-cur"),this.player.template.listCurs[this.audios.length-1].style.backgroundColor=e.theme||this.player.options.theme,n&&("random"===this.player.options.order?this.switch(this.player.randomOrder[0]):this.switch(0))}},{key:"remove",value:function(e){if(this.player.events.trigger("listremove",{index:e}),this.audios[e])if(this.audios.length>1){var t=this.player.container.querySelectorAll(".aplayer-list li");t[e].remove(),this.audios.splice(e,1),this.player.lrc&&this.player.lrc.remove(e),e===this.index&&(this.audios[e]?this.switch(e):this.switch(e-1)),this.index>e&&this.index--;for(var n=e;nt&&!e.player.audio.paused&&(e.player.container.classList.remove("aplayer-loading"),i=!1),t=n)},100)}},{key:"enable",value:function(e){this["enable"+e+"Checker"]=!0,"fps"===e&&this.initfpsChecker()}},{key:"disable",value:function(e){this["enable"+e+"Checker"]=!1}},{key:"destroy",value:function(){var e=this;this.types.forEach(function(t){e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"])})}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1?"one"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop?(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll):"all"===e.player.options.loop&&(e.player.options.loop="one",e.player.template.loop.innerHTML=r.default.loopOne):"one"===e.player.options.loop||"all"===e.player.options.loop?(e.player.options.loop="none",e.player.template.loop.innerHTML=r.default.loopNone):"none"===e.player.options.loop&&(e.player.options.loop="all",e.player.template.loop.innerHTML=r.default.loopAll)})}},{key:"initMenuButton",value:function(){var e=this;this.player.template.menu.addEventListener("click",function(){e.player.list.toggle()})}},{key:"initMiniSwitcher",value:function(){var e=this;this.player.template.miniSwitcher.addEventListener("click",function(){e.player.setMode("mini"===e.player.mode?"normal":"mini")})}},{key:"initSkipButton",value:function(){var e=this;this.player.template.skipBackButton.addEventListener("click",function(){e.player.skipBack()}),this.player.template.skipForwardButton.addEventListener("click",function(){e.player.skipForward()}),this.player.template.skipPlayButton.addEventListener("click",function(){e.player.toggle()})}},{key:"initLrcButton",value:function(){var e=this;this.player.template.lrcButton.addEventListener("click",function(){e.player.template.lrcButton.classList.contains("aplayer-icon-lrc-inactivity")?(e.player.template.lrcButton.classList.remove("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.show()):(e.player.template.lrcButton.classList.add("aplayer-icon-lrc-inactivity"),e.player.lrc&&e.player.lrc.hide())})}}]),e}();t.default=s},function(e,t,n){var i=n(2);e.exports=function(e){"use strict";e=e||{};var t="",n=i.$each,a=e.lyrics,r=(e.$value,e.$index,i.$escape);return n(a,function(e,n){t+="\n \n"}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.player.audio.currentTime;if(this.index>this.current.length-1||e=this.current[this.index+1][0])for(var t=0;t=this.current[t][0]&&(!this.current[t+1]||e=200&&n.status<300||304===n.status?t.parsed[e]=t.parse(n.responseText):(t.player.notice("LRC file request fails: status "+n.status),t.parsed[e]=[["00:00","Not available"]]),t.container.innerHTML=(0,o.default)({lyrics:t.parsed[e]}),t.update(0),t.current=t.parsed[e])};var i=this.player.list.audios[e].lrc;n.open("get",i,!0),n.send(null)}else this.player.list.audios[e].lrc?this.parsed[e]=this.parse(this.player.list.audios[e].lrc):this.parsed[e]=[["00:00","Not available"]];this.container.innerHTML=(0,o.default)({lyrics:this.parsed[e]}),this.update(0),this.current=this.parsed[e]}},{key:"parse",value:function(e){if(e){for(var t=(e=e.replace(/([^\]^\n])\[/g,function(e,t){return t+"\n["})).split("\n"),n=[],i=t.length,a=0;a/g,"").replace(/^\s+|\s+$/g,"");if(r)for(var s=r.length,l=0;l]/;a.$escape=function(e){return function(e){var t=""+e,n=r.exec(t);if(!n)return e;var i="",a=void 0,o=void 0,s=void 0;for(a=n.index,o=0;a\n \n
',t+=s.play,t+='
\n \n \n
\n
\n\n
\n
\n
\n'):(t+='\n
\n
\n
',t+=s.play,t+='
\n
\n
\n
\n No audio\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n ',t+=s.loading,t+='\n \n
\n
\n
\n
\n \n 00:00 / 00:00\n \n \n ',t+=s.skip,t+='\n \n \n ',t+=s.play,t+='\n \n \n ',t+=s.skip,t+='\n \n
\n \n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n '},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,n){"use strict";var i,a,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var u,c=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):d=-1,c.length&&y())}function y(){if(!p){var e=l(h);p=!0;for(var t=c.length;t;){for(u=c,c=[];++d1)for(var n=1;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(35),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=setTimeout;function a(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function o(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void l(t.promise,e)}s(t.promise,i)}else(1===e._state?s:l)(t.promise,e._value)})):e._deferreds.push(t)}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":n(t))||"function"==typeof t)){var i=t.then;if(t instanceof r)return e._state=3,e._value=t,void u(e);if("function"==typeof i)return void c((a=i,o=t,function(){a.apply(o,arguments)}),e)}e._state=1,e._value=t,u(e)}catch(t){l(e,t)}var a,o}function l(e,t){e._state=2,e._value=t,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t1&&this.container.classList.add("aplayer-withlist"),r.default.isMobile&&this.container.classList.add("aplayer-mobile"),this.arrow=this.container.offsetWidth<=300,this.arrow&&this.container.classList.add("aplayer-arrow"),this.container=this.options.container,2===this.options.lrcType||!0===this.options.lrcType)for(var n=this.container.getElementsByClassName("aplayer-lrc-content"),i=0;i1?(e.notice("An audio error has occurred, player will skip forward in 2 seconds."),t=setTimeout(function(){e.skipForward(),e.paused||e.play()},2e3)):1===e.list.audios.length&&e.notice("An audio error has occurred.")}),this.events.on("listswitch",function(){t&&clearTimeout(t)}),this.on("ended",function(){"none"===e.options.loop?"list"===e.options.order?e.list.index0&&void 0!==arguments[0]?arguments[0]:this.list.audios[this.list.index].theme||this.options.theme,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.list.index;(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&this.list.audios[t]&&(this.list.audios[t].theme=e),this.template.listCurs[t]&&(this.template.listCurs[t].style.backgroundColor=e),t===this.list.index&&(this.template.pic.style.backgroundColor=e,this.template.played.style.background=e,this.template.thumb.style.background=e,this.template.volume.style.background=e)}},{key:"seek",value:function(e){e=Math.max(e,0),e=Math.min(e,this.duration),this.audio.currentTime=e,this.bar.set("played",e/this.duration,"width"),this.template.ptime.innerHTML=r.default.secondToTime(e)}},{key:"setUIPlaying",value:function(){var e=this;if(this.paused&&(this.paused=!1,this.template.button.classList.remove("aplayer-play"),this.template.button.classList.add("aplayer-pause"),this.template.button.innerHTML="",setTimeout(function(){e.template.button.innerHTML=o.default.pause},100),this.template.skipPlayButton.innerHTML=o.default.pause),this.timer.enable("loading"),this.options.mutex)for(var t=0;t=.95?this.template.volumeButton.innerHTML=o.default.volumeUp:this.volume()>0?this.template.volumeButton.innerHTML=o.default.volumeDown:this.template.volumeButton.innerHTML=o.default.volumeOff}},{key:"volume",value:function(e,t){return e=parseFloat(e),isNaN(e)||(e=Math.max(e,0),e=Math.min(e,1),this.bar.set("volume",e,"height"),t||this.storage.set("volume",e),this.audio.volume=e,this.audio.muted&&(this.audio.muted=!1),this.switchVolumeIcon()),this.audio.muted?0:this.audio.volume}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"toggle",value:function(){this.template.button.classList.contains("aplayer-play")?this.play():this.template.button.classList.contains("aplayer-pause")&&this.pause()}},{key:"switchAudio",value:function(e){this.list.switch(e)}},{key:"addAudio",value:function(e){this.list.add(e)}},{key:"removeAudio",value:function(e){this.list.remove(e)}},{key:"destroy",value:function(){m.splice(m.indexOf(this),1),this.pause(),this.container.innerHTML="",this.audio.src="",this.timer.destroy(),this.events.trigger("destroy")}},{key:"setMode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"normal";this.mode=e,"mini"===e?this.container.classList.add("aplayer-narrow"):"normal"===e&&this.container.classList.remove("aplayer-narrow")}},{key:"notice",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("noticeshow",{text:e}),n&&(this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("noticehide")},n))}},{key:"prevIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return this.list.index-1<0?this.list.audios.length-1:this.list.index-1;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return 0===e?this.randomOrder[this.randomOrder.length-1]:this.randomOrder[e-1]}}},{key:"nextIndex",value:function(){if(!(this.list.audios.length>1))return 0;if("list"===this.options.order)return(this.list.index+1)%this.list.audios.length;if("random"===this.options.order){var e=this.randomOrder.indexOf(this.list.index);return e===this.randomOrder.length-1?this.randomOrder[0]:this.randomOrder[e+1]}}},{key:"skipBack",value:function(){this.list.switch(this.prevIndex())}},{key:"skipForward",value:function(){this.list.switch(this.nextIndex())}},{key:"duration",get:function(){return isNaN(this.audio.duration)?0:this.audio.duration}}],[{key:"version",get:function(){return"1.10.1"}}]),e}();t.default=g},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(40);var i,a=n(38),r=(i=a)&&i.__esModule?i:{default:i};console.log("\n %c APlayer v1.10.1 af84efb %c http://aplayer.js.org \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=r.default}]).default}); -//# sourceMappingURL=APlayer.min.js.map \ No newline at end of file diff --git a/assets/js/DPlayer.min.js b/assets/js/DPlayer.min.js deleted file mode 100644 index 9922b02..0000000 --- a/assets/js/DPlayer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("DPlayer",[],t):"object"==typeof exports?exports.DPlayer=t():e.DPlayer=t()}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=78)}([function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=n(11),o=n(65),r=Object.prototype.toString;function s(e){return"[object Array]"===r.call(e)}function l(e){return null!==e&&"object"===(void 0===e?"undefined":i(e))}function c(e){return"[object Function]"===r.call(e)}function u(e,t){if(null!==e&&void 0!==e)if("object"!==(void 0===e?"undefined":i(e))&&(e=[e]),s(e))for(var n=0,a=e.length;n0?[t,n,i]:[n,i]).map(function(e){return e<10?"0"+e:""+e}).join(":")},getElementViewLeft:function(e){var t=e.offsetLeft,n=e.offsetParent,i=document.body.scrollLeft+document.documentElement.scrollLeft;if(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)for(;null!==n&&n!==e;)t+=n.offsetLeft,n=n.offsetParent;else for(;null!==n;)t+=n.offsetLeft,n=n.offsetParent;return t-i},getBoundingClientRectViewLeft:function(e){var t=document.documentElement.scrollTop;if(e.getBoundingClientRect){if("number"!=typeof this.getBoundingClientRectViewLeft.offset){var n=document.createElement("div");n.style.cssText="position:absolute;top:0;left:0;",document.body.appendChild(n),this.getBoundingClientRectViewLeft.offset=-n.getBoundingClientRect().top-t,document.body.removeChild(n),n=null}var i=e.getBoundingClientRect(),a=this.getBoundingClientRectViewLeft.offset;return i.left+a}return this.getElementViewLeft(e)},getScrollPosition:function(){return{left:window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},setScrollPosition:function(e){var t=e.left,n=void 0===t?0:t,i=e.top,a=void 0===i?0:i;this.isFirefox?(document.documentElement.scrollLeft=n,document.documentElement.scrollTop=a):window.scrollTo(n,a)},isMobile:i,isFirefox:/firefox/i.test(window.navigator.userAgent),isChrome:/chrome/i.test(window.navigator.userAgent),storage:{set:function(e,t){localStorage.setItem(e,t)},get:function(e){return localStorage.getItem(e)}},cumulativeOffset:function(e){var t=0,n=0;do{t+=e.offsetTop||0,n+=e.offsetLeft||0,e=e.offsetParent}while(e);return{top:t,left:n}},nameMap:{dragStart:i?"touchstart":"mousedown",dragMove:i?"touchmove":"mousemove",dragEnd:i?"touchend":"mouseup"},color2Number:function(e){return"#"===e[0]&&(e=e.substr(1)),3===e.length&&(e=""+e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),parseInt(e,16)+0&16777215},number2Color:function(e){return"#"+("00000"+e.toString(16)).slice(-6)},number2Type:function(e){switch(e){case 0:return"right";case 1:return"top";case 2:return"bottom";default:return"right"}}};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=b(n(46)),a=b(n(45)),o=b(n(44)),r=b(n(43)),s=b(n(42)),l=b(n(41)),c=b(n(40)),u=b(n(39)),d=b(n(38)),p=b(n(37)),h=b(n(36)),f=b(n(35)),y=b(n(34)),m=b(n(33)),v=b(n(32)),g=b(n(31));function b(e){return e&&e.__esModule?e:{default:e}}var w={play:i.default,pause:a.default,volumeUp:o.default,volumeDown:r.default,volumeOff:s.default,full:l.default,fullWeb:c.default,setting:u.default,right:d.default,comment:p.default,commentOff:h.default,send:f.default,pallette:y.default,camera:m.default,subtitle:v.default,loading:g.default};t.default=w},function(e,t,n){"use strict";(function(t){var i=n(0),a=n(63),o={"Content-Type":"application/x-www-form-urlencoded"};function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,l={adapter:("undefined"!=typeof XMLHttpRequest?s=n(10):void 0!==t&&(s=n(10)),s),transformRequest:[function(e,t){return a(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){l.headers[e]={}}),i.forEach(["post","put","patch"],function(e){l.headers[e]=i.merge(o)}),e.exports=l}).call(this,n(12))},function(e,t,n){"use strict";var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){var i=n(6);e.exports=function(e){"use strict";var t="",n=(e=e||{}).enableSubtitle,a=e.subtitle,o=e.current,r=e.pic,s=i.$escape,l=e.screenshot,c=e.preload,u=e.url;n=a&&"webvtt"===a.type;return t+='\n\n ",n&&(t+='\n \n '),t+="\n"}},function(e,t,n){"use strict";e.exports=n(29)},function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var i=n(61);e.exports=function(e,t,n,a,o){var r=new Error(e);return i(r,t,n,a,o)}},function(e,t,n){"use strict";var i=n(0),a=n(62),o=n(60),r=n(59),s=n(58),l=n(9),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(57);e.exports=function(e){return new Promise(function(t,u){var d=e.data,p=e.headers;i.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest,f="onreadystatechange",y=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,f="onload",y=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var m=e.auth.username||"",v=e.auth.password||"";p.Authorization="Basic "+c(m+":"+v)}if(h.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[f]=function(){if(h&&(4===h.readyState||y)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?r(h.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:e,request:h};a(t,u,i),h=null}},h.onerror=function(){u(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){u(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},i.isStandardBrowserEnv()){var g=n(56),b=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;b&&(p[e.xsrfHeaderName]=b)}if("setRequestHeader"in h&&i.forEach(p,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),u(e),h=null)}),void 0===d&&(d=null),h.send(d)})}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i1)for(var n=1;n=n.width?(this.player.template.menu.style.right=n.width-e+"px",this.player.template.menu.style.left="initial"):(this.player.template.menu.style.left=e+"px",this.player.template.menu.style.right="initial"),t+this.player.template.menu.offsetHeight>=n.height?(this.player.template.menu.style.bottom=n.height-t+"px",this.player.template.menu.style.top="initial"):(this.player.template.menu.style.top=t+"px",this.player.template.menu.style.bottom="initial"),this.player.template.mask.classList.add("dplayer-mask-show"),this.shown=!0,this.player.events.trigger("contextmenu_show")}},{key:"hide",value:function(){this.player.template.mask.classList.remove("dplayer-mask-show"),this.player.template.menu.classList.remove("dplayer-menu-show"),this.shown=!1,this.player.events.trigger("contextmenu_hide")}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.options.hotkey&&document.addEventListener("keydown",function(e){if(t.focus){var n=document.activeElement.tagName.toUpperCase(),i=document.activeElement.getAttribute("contenteditable");if("INPUT"!==n&&"TEXTAREA"!==n&&""!==i&&"true"!==i){var a=e||window.event,o=void 0;switch(a.keyCode){case 32:a.preventDefault(),t.toggle();break;case 37:a.preventDefault(),t.seek(t.video.currentTime-5),t.controller.setAutoHide();break;case 39:a.preventDefault(),t.seek(t.video.currentTime+5),t.controller.setAutoHide();break;case 38:a.preventDefault(),o=t.volume()+.1,t.volume(o);break;case 40:a.preventDefault(),o=t.volume()-.1,t.volume(o)}}}}),document.addEventListener("keydown",function(e){switch((e||window.event).keyCode){case 27:t.fullScreen.isFullScreen("web")&&t.fullScreen.cancel("web")}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=function(){function e(e,t){for(var n=0;n'+e.player.options.highlight[n].text+"",e.player.template.playedBarWrap.insertBefore(i,e.player.template.playedBarTime)}}})}},{key:"initThumbnails",value:function(){var e=this;this.player.options.video.thumbnails&&(this.thumbnails=new o.default({container:this.player.template.barPreview,barWidth:this.player.template.barWrap.offsetWidth,url:this.player.options.video.thumbnails,events:this.player.events}),this.player.on("loadedmetadata",function(){e.thumbnails.resize(160,e.player.video.videoHeight/e.player.video.videoWidth*160)}))}},{key:"initPlayedBar",value:function(){var e=this,t=function(t){var n=((t.clientX||t.changedTouches[0].clientX)-a.default.getBoundingClientRectViewLeft(e.player.template.playedBarWrap))/e.player.template.playedBarWrap.clientWidth;n=Math.max(n,0),n=Math.min(n,1),e.player.bar.set("played",n,"width"),e.player.template.ptime.innerHTML=a.default.secondToTime(n*e.player.video.duration)},n=function n(i){document.removeEventListener(a.default.nameMap.dragEnd,n),document.removeEventListener(a.default.nameMap.dragMove,t);var o=((i.clientX||i.changedTouches[0].clientX)-a.default.getBoundingClientRectViewLeft(e.player.template.playedBarWrap))/e.player.template.playedBarWrap.clientWidth;o=Math.max(o,0),o=Math.min(o,1),e.player.bar.set("played",o,"width"),e.player.seek(e.player.bar.get("played")*e.player.video.duration),e.player.timer.enable("progress")};this.player.template.playedBarWrap.addEventListener(a.default.nameMap.dragStart,function(){e.player.timer.disable("progress"),document.addEventListener(a.default.nameMap.dragMove,t),document.addEventListener(a.default.nameMap.dragEnd,n)}),this.player.template.playedBarWrap.addEventListener(a.default.nameMap.dragMove,function(t){if(e.player.video.duration){var n=a.default.cumulativeOffset(e.player.template.playedBarWrap).left,i=(t.clientX||t.changedTouches[0].clientX)-n;if(i<0||i>e.player.template.playedBarWrap.offsetWidth)return;var o=e.player.video.duration*(i/e.player.template.playedBarWrap.offsetWidth);a.default.isMobile&&e.thumbnails&&e.thumbnails.show(),e.thumbnails&&e.thumbnails.move(i),e.player.template.playedBarTime.style.left=i-(o>=3600?25:20)+"px",e.player.template.playedBarTime.innerText=a.default.secondToTime(o),e.player.template.playedBarTime.classList.remove("hidden")}}),this.player.template.playedBarWrap.addEventListener(a.default.nameMap.dragEnd,function(){a.default.isMobile&&e.thumbnails&&e.thumbnails.hide()}),a.default.isMobile||(this.player.template.playedBarWrap.addEventListener("mouseenter",function(){e.player.video.duration&&(e.thumbnails&&e.thumbnails.show(),e.player.template.playedBarTime.classList.remove("hidden"))}),this.player.template.playedBarWrap.addEventListener("mouseleave",function(){e.player.video.duration&&(e.thumbnails&&e.thumbnails.hide(),e.player.template.playedBarTime.classList.add("hidden"))}))}},{key:"initFullButton",value:function(){var e=this;this.player.template.browserFullButton.addEventListener("click",function(){e.player.fullScreen.toggle("browser")}),this.player.template.webFullButton.addEventListener("click",function(){e.player.fullScreen.toggle("web")})}},{key:"initVolumeButton",value:function(){var e=this,t=function(t){var n=t||window.event,i=((n.clientX||n.changedTouches[0].clientX)-a.default.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap)-5.5)/35;e.player.volume(i)},n=function n(){document.removeEventListener(a.default.nameMap.dragEnd,n),document.removeEventListener(a.default.nameMap.dragMove,t),e.player.template.volumeButton.classList.remove("dplayer-volume-active")};this.player.template.volumeBarWrapWrap.addEventListener("click",function(t){var n=t||window.event,i=((n.clientX||n.changedTouches[0].clientX)-a.default.getBoundingClientRectViewLeft(e.player.template.volumeBarWrap)-5.5)/35;e.player.volume(i)}),this.player.template.volumeBarWrapWrap.addEventListener(a.default.nameMap.dragStart,function(){document.addEventListener(a.default.nameMap.dragMove,t),document.addEventListener(a.default.nameMap.dragEnd,n),e.player.template.volumeButton.classList.add("dplayer-volume-active")}),this.player.template.volumeButtonIcon.addEventListener("click",function(){e.player.video.muted?(e.player.video.muted=!1,e.player.switchVolumeIcon(),e.player.bar.set("volume",e.player.volume(),"width")):(e.player.video.muted=!0,e.player.template.volumeIcon.innerHTML=r.default.volumeOff,e.player.bar.set("volume",0,"width"))})}},{key:"initQualityButton",value:function(){var e=this;this.player.options.video.quality&&this.player.template.qualityList.addEventListener("click",function(t){t.target.classList.contains("dplayer-quality-item")&&e.player.switchQuality(t.target.dataset.index)})}},{key:"initScreenshotButton",value:function(){var e=this;this.player.options.screenshot&&this.player.template.camareButton.addEventListener("click",function(){var t=document.createElement("canvas");t.width=e.player.video.videoWidth,t.height=e.player.video.videoHeight,t.getContext("2d").drawImage(e.player.video,0,0,t.width,t.height);var n=void 0;t.toBlob(function(e){n=URL.createObjectURL(e);var t=document.createElement("a");t.href=n,t.download="DPlayer.png",t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(n)}),e.player.events.trigger("screenshot",n)})}},{key:"initSubtitleButton",value:function(){var e=this;this.player.options.subtitle&&(this.player.events.on("subtitle_show",function(){e.player.template.subtitleButton.dataset.balloon=e.player.tran("Hide subtitle"),e.player.template.subtitleButtonInner.style.opacity="",e.player.user.set("subtitle",1)}),this.player.events.on("subtitle_hide",function(){e.player.template.subtitleButton.dataset.balloon=e.player.tran("Show subtitle"),e.player.template.subtitleButtonInner.style.opacity="0.4",e.player.user.set("subtitle",0)}),this.player.template.subtitleButton.addEventListener("click",function(){e.player.subtitle.toggle()}))}},{key:"setAutoHide",value:function(){var e=this;this.show(),clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(function(){!e.player.video.played.length||e.player.paused||e.disableAutoHide||e.hide()},3e3)}},{key:"show",value:function(){this.player.container.classList.remove("dplayer-hide-controller")}},{key:"hide",value:function(){this.player.container.classList.add("dplayer-hide-controller"),this.player.setting.hide(),this.player.comment&&this.player.comment.hide()}},{key:"isShow",value:function(){return!this.player.container.classList.contains("dplayer-hide-controller")}},{key:"toggle",value:function(){this.isShow()?this.hide():this.show()}},{key:"destroy",value:function(){clearTimeout(this.autoHideTimer)}}]),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nt&&!e.player.video.paused&&(e.player.container.classList.remove("dplayer-loading"),i=!1),t=n)},100)}},{key:"initfpsChecker",value:function(){var e=this;window.requestAnimationFrame(function(){if(e.enablefpsChecker)if(e.initfpsChecker(),e.fpsStart){e.fpsIndex++;var t=new Date;t-e.fpsStart>1e3&&(e.player.infoPanel.fps(e.fpsIndex/(t-e.fpsStart)*1e3),e.fpsStart=new Date,e.fpsIndex=0)}else e.fpsStart=new Date,e.fpsIndex=0;else e.fpsStart=0,e.fpsIndex=0})}},{key:"initinfoChecker",value:function(){var e=this;this.infoChecker=setInterval(function(){e.enableinfoChecker&&e.player.infoPanel.update()},1e3)}},{key:"enable",value:function(e){this["enable"+e+"Checker"]=!0,"fps"===e&&this.initfpsChecker()}},{key:"disable",value:function(e){this["enable"+e+"Checker"]=!1}},{key:"destroy",value:function(){var e=this;this.types.map(function(t){return e["enable"+t+"Checker"]=!1,e[t+"Checker"]&&clearInterval(e[t+"Checker"]),t})}}]),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;case"web":return this.player.container.classList.contains("dplayer-fulled")}}},{key:"request",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser",t="browser"===e?"web":"browser",n=this.isFullScreen(t);switch(n||(this.lastScrollPosition=r.default.getScrollPosition()),e){case"browser":this.player.container.requestFullscreen?this.player.container.requestFullscreen():this.player.container.mozRequestFullScreen?this.player.container.mozRequestFullScreen():this.player.container.webkitRequestFullscreen?this.player.container.webkitRequestFullscreen():this.player.video.webkitEnterFullscreen?this.player.video.webkitEnterFullscreen():this.player.video.webkitEnterFullScreen?this.player.video.webkitEnterFullScreen():this.player.container.msRequestFullscreen&&this.player.container.msRequestFullscreen();break;case"web":this.player.container.classList.add("dplayer-fulled"),document.body.classList.add("dplayer-web-fullscreen-fix"),this.player.events.trigger("webfullscreen")}n&&this.cancel(t)}},{key:"cancel",value:function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser"){case"browser":document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitCancelFullscreen?document.webkitCancelFullscreen():document.msCancelFullScreen?document.msCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen();break;case"web":this.player.container.classList.remove("dplayer-fulled"),document.body.classList.remove("dplayer-web-fullscreen-fix"),this.player.events.trigger("webfullscreen_cancel")}}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browser";this.isFullScreen(e)?this.cancel(e):this.request(e)}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nparseFloat(t.time);)n.push(t),t=this.dan[++this.danIndex];this.draw(n)}window.requestAnimationFrame(function(){e.frame()})}},{key:"opacity",value:function(e){if(void 0!==e){for(var t=this.container.getElementsByClassName("dplayer-danmaku-item"),n=0;n'+e[a].text+"":o.innerHTML=e[a].text,o.style.opacity=t._opacity,o.style.color=s.default.number2Color(e[a].color),o.addEventListener("animationend",function(){t.container.removeChild(o)});var r=t._measure(e[a].text),l=void 0;switch(e[a].type){case"right":(l=u(o,e[a].type,r))>=0&&(o.style.width=r+1+"px",o.style.top=n*l+"px",o.style.transform="translateX(-"+i+"px)");break;case"top":(l=u(o,e[a].type))>=0&&(o.style.top=n*l+"px");break;case"bottom":(l=u(o,e[a].type))>=0&&(o.style.bottom=n*l+"px");break;default:console.error("Can't handled danmaku type: "+e[a].type)}l>=0&&(o.classList.add("dplayer-danmaku-move"),d.appendChild(o))},h=0;h=this.options.time()){this.danIndex=e;break}this.danIndex=this.dan.length}}},{key:"clear",value:function(){this.danTunnel={right:{},top:{},bottom:{}},this.danIndex=0,this.options.container.innerHTML="",this.events&&this.events.trigger("danmaku_clear")}},{key:"htmlEncode",value:function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}},{key:"resize",value:function(){for(var e=this.container.offsetWidth,t=this.container.getElementsByClassName("dplayer-danmaku-item"),n=0;n]/;a.$escape=function(e){return function(e){var t=""+e,n=o.exec(t);if(!n)return e;var i="",a=void 0,r=void 0,s=void 0;for(a=n.index,r=0;a\n
\n '),a+='\n
\n
\n
\n
\n
\n \n ',r.danmaku&&(a+='\n ',a+=s(l("Danmaku is loading")),a+="\n "),a+='\n ',a+=c.loading,a+='\n
\n\n
\n
\n
\n \n
\n
\n
',a+=s(l("Set danmaku color")),a+='
\n \n \n \n \n \n \n
\n
\n
',a+=s(l("Set danmaku type")),a+='
\n \n \n \n
\n
\n \n ',a+=c.send,a+='\n \n
\n
\n \n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n 0:00 /\n 0:00\n \n ',r.live&&(a+='\n ',a+=s(l("Live")),a+="\n "),a+='\n
\n
\n ',r.video.quality&&(a+='\n
\n \n
\n
\n ',d(r.video.quality,function(e,t){a+='\n
',a+=s(e.name),a+="
\n "}),a+="\n
\n
\n
\n "),a+="\n ",r.screenshot&&(a+='\n
\n
\n "),a+='\n
\n \n
\n ",r.subtitle&&(a+='\n
\n \n
\n "),a+='\n
\n \n
\n
\n
\n ',a+=s(l("Speed")),a+='\n
',a+=c.right,a+='
\n
\n
\n ',a+=s(l("Loop")),a+='\n
\n \n \n
\n
\n
\n ',a+=s(l("Show danmaku")),a+='\n
\n \n \n
\n
\n
\n ',a+=s(l("Unlimited danmaku")),a+='\n
\n \n \n
\n
\n
\n ',a+=s(l("Opacity for danmaku")),a+='\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n 0.5\n
\n
\n 0.75\n
\n
\n ',a+=s(l("Normal")),a+='\n
\n
\n 1.25\n
\n
\n 1.5\n
\n
\n 2\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
[x]
\n
\n Player version\n \n
\n
\n Player FPS\n \n
\n
\n Video type\n \n
\n
\n Video url\n \n
\n
\n Video resolution\n \n
\n
\n Video duration\n \n
\n ',r.danmaku&&(a+='\n
\n Danamku id\n \n
\n
\n Danamku api\n \n
\n
\n Danamku amount\n \n
\n '),a+='\n
\n
\n ',d(r.contextmenu,function(e,t){a+='\n
\n ',a+=s(l(e.text)),a+="\n
\n "}),a+='\n
\n
'}},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new a;t=t<<8|n}return r}},function(e,t,n){"use strict";var i=n(0);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=i.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var i=n(0),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,r={};return e?(i.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=i.trim(e.substr(0,o)).toLowerCase(),n=i.trim(e.substr(o+1)),t){if(r[t]&&a.indexOf(t)>=0)return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}}),r):r}},function(e,t,n){"use strict";var i=n(0);function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var r=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),r.push(a(t)+"="+a(e))}))}),o=r.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},function(e,t,n){"use strict";e.exports=function(e,t,n,i,a){return e.config=t,n&&(e.code=n),e.request=i,e.response=a,e}},function(e,t,n){"use strict";var i=n(9);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var i=n(0);e.exports=function(e,t){i.forEach(e,function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])})}},function(e,t,n){"use strict";var i=n(3),a=n(0),o=n(55),r=n(54);function s(e){this.defaults=e,this.interceptors={request:new o,response:new o}}s.prototype.request=function(e){"string"==typeof e&&(e=a.merge({url:arguments[0]},arguments[1])),(e=a.merge(i,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[r,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},a.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,n){return this.request(a.merge(n||{},{method:e,url:t}))}}),a.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,n,i){return this.request(a.merge(i||{},{method:e,url:t,data:n}))}}),e.exports=s},function(e,t,n){"use strict";function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(i(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var i=n(0),a=n(11),o=n(64),r=n(3);function s(e){var t=new o(e),n=a(o.prototype.request,t);return i.extend(n,o.prototype,t),i.extend(n,t),n}var l=s(r);l.Axios=o,l.create=function(e){return s(i.merge(r,e))},l.Cancel=n(7),l.CancelToken=n(50),l.isCancel=n(8),l.all=function(e){return Promise.all(e)},l.spread=n(49),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";e.exports=n(66)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a=n(67),o=(i=a)&&i.__esModule?i:{default:i};t.default={send:function(e){o.default.post(e.url,e.data).then(function(t){var n=t.data;n&&0===n.code?e.success&&e.success(n):e.error&&e.error(n&&n.msg)}).catch(function(t){console.error(t),e.error&&e.error()})},read:function(e){o.default.get(e.url).then(function(t){var n=t.data;n&&0===n.code?e.success&&e.success(n.data.map(function(e){return{time:e[0],type:e[1],color:e[2],author:e[3],text:e[4]}})):e.error&&e.error(n&&n.msg)}).catch(function(t){console.error(t),e.error&&e.error()})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(68),r=(i=o)&&i.__esModule?i:{default:i};t.default=function(e){var t={container:e.element||document.getElementsByClassName("dplayer")[0],live:!1,autoplay:!1,theme:"#b7daff",loop:!1,lang:(navigator.language||navigator.browserLanguage).toLowerCase(),screenshot:!1,hotkey:!0,preload:"metadata",volume:.7,apiBackend:r.default,video:{},contextmenu:[],mutex:!0};for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n]);return e.video&&!e.video.type&&(e.video.type="auto"),"object"===a(e.danmaku)&&e.danmaku&&!e.danmaku.user&&(e.danmaku.user="DIYgod"),e.subtitle&&(!e.subtitle.type&&(e.subtitle.type="webvtt"),!e.subtitle.fontSize&&(e.subtitle.fontSize="20px"),!e.subtitle.bottom&&(e.subtitle.bottom="40px"),!e.subtitle.color&&(e.subtitle.color="#fff")),e.video.quality&&(e.video.url=e.video.quality[e.video.defaultQuality].url),e.lang&&(e.lang=e.lang.toLowerCase()),e.contextmenu=e.contextmenu.concat([{text:"Video info",click:function(e){e.infoPanel.triggle()}},{text:"About author",link:"https://diygod.me"},{text:"DPlayer v1.25.0",link:"https://github.com/MoePlayer/DPlayer"}]),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}},function(e,t,n){"use strict";(function(e,t){!function(e,n){if(!e.setImmediate){var i,a,o,r,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick(function(){f(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):i=function(e){setTimeout(f,0,e)}:(r="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&f(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),i=function(t){e.postMessage(r+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(71),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=n(70),r=(i=o)&&i.__esModule?i:{default:i};var s=setTimeout;function l(){}function c(e){if(!(this instanceof c))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function u(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,c._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var i;try{i=n(e._value)}catch(e){return void p(t.promise,e)}d(t.promise,i)}else(1===e._state?d:p)(t.promise,e._value)})):e._deferreds.push(t)}function d(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":a(t))||"function"==typeof t)){var n=t.then;if(t instanceof c)return e._state=3,e._value=t,void h(e);if("function"==typeof n)return void f((i=n,o=t,function(){i.apply(o,arguments)}),e)}e._state=1,e._value=t,h(e)}catch(t){p(e,t)}var i,o}function p(e,t){e._state=2,e._value=t,h(e)}function h(e){2===e._state&&0===e._deferreds.length&&c._immediateFn(function(){e._handled||c._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;te&&this.notice(this.tran("REW")+" "+(this.video.currentTime-e).toFixed(0)+" "+this.tran("s")),this.video.currentTime=e,this.danmaku&&this.danmaku.seek(),this.bar.set("played",e/this.video.duration,"width"),this.template.ptime.innerHTML=o.default.secondToTime(e)}},{key:"play",value:function(){var e=this;if(this.paused=!1,this.video.paused&&this.bezel.switch(c.default.play),this.template.playButton.innerHTML=c.default.pause,a.default.resolve(this.video.play()).catch(function(){e.pause()}).then(function(){}),this.timer.enable("loading"),this.container.classList.remove("dplayer-paused"),this.container.classList.add("dplayer-playing"),this.danmaku&&this.danmaku.play(),this.options.mutex)for(var t=0;t=.95?this.template.volumeIcon.innerHTML=c.default.volumeUp:this.volume()>0?this.template.volumeIcon.innerHTML=c.default.volumeDown:this.template.volumeIcon.innerHTML=c.default.volumeOff}},{key:"volume",value:function(e,t,n){if(e=parseFloat(e),!isNaN(e)){e=Math.max(e,0),e=Math.min(e,1),this.bar.set("volume",e,"width");var i=(100*e).toFixed(0)+"%";this.template.volumeBarWrapWrap.dataset.balloon=i,t||this.user.set("volume",e),n||this.notice(this.tran("Volume")+" "+(100*e).toFixed(0)+"%"),this.video.volume=e,this.video.muted&&(this.video.muted=!1),this.switchVolumeIcon()}return this.video.volume}},{key:"toggle",value:function(){this.video.paused?this.play():this.pause()}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"switchVideo",value:function(e,t){this.pause(),this.video.poster=e.pic?e.pic:"",this.video.src=e.url,this.initMSE(this.video,e.type||"auto"),t&&(this.template.danmakuLoading.style.display="block",this.bar.set("played",0,"width"),this.bar.set("loaded",0,"width"),this.template.ptime.innerHTML="00:00",this.template.danmaku.innerHTML="",this.danmaku&&this.danmaku.reload({id:t.id,address:t.api,token:t.token,maximum:t.maximum,addition:t.addition,user:t.user}))}},{key:"initMSE",value:function(e,t){var n=this;if(this.type=t,this.options.video.customType&&this.options.video.customType[t])"[object Function]"===Object.prototype.toString.call(this.options.video.customType[t])?this.options.video.customType[t](this.video,this):console.error("Illegal customType: "+t);else switch("auto"===this.type&&(/m3u8(#|\?|$)/i.exec(e.src)?this.type="hls":/.flv(#|\?|$)/i.exec(e.src)?this.type="flv":/.mpd(#|\?|$)/i.exec(e.src)?this.type="dash":this.type="normal"),"hls"===this.type&&(e.canPlayType("application/x-mpegURL")||e.canPlayType("application/vnd.apple.mpegURL"))&&(this.type="normal"),this.type){case"hls":if(Hls)if(Hls.isSupported()){var i=new Hls;i.loadSource(e.src),i.attachMedia(e)}else this.notice("Error: Hls is not supported.");else this.notice("Error: Can't find Hls.");break;case"flv":if(flvjs&&flvjs.isSupported())if(flvjs.isSupported()){var a=flvjs.createPlayer({type:"flv",url:e.src});a.attachMediaElement(e),a.load()}else this.notice("Error: flvjs is not supported.");else this.notice("Error: Can't find flvjs.");break;case"dash":dashjs?dashjs.MediaPlayer().create().initialize(e,e.src,!1):this.notice("Error: Can't find dashjs.");break;case"webtorrent":if(WebTorrent)if(WebTorrent.WEBRTC_SUPPORT){this.container.classList.add("dplayer-loading");var o=new WebTorrent,r=e.src;o.add(r,function(e){e.files.find(function(e){return e.name.endsWith(".mp4")}).renderTo(n.video,{autoplay:n.options.autoplay},function(){n.container.classList.remove("dplayer-loading")})})}else this.notice("Error: Webtorrent is not supported.");else this.notice("Error: Can't find Webtorrent.")}}},{key:"initVideo",value:function(e,t){var n=this;this.initMSE(e,t),this.on("durationchange",function(){1!==e.duration&&e.duration!==1/0&&(n.template.dtime.innerHTML=o.default.secondToTime(e.duration))}),this.on("progress",function(){var t=e.buffered.length?e.buffered.end(e.buffered.length-1)/e.duration:0;n.bar.set("loaded",t,"width")}),this.on("error",function(){n.video.error&&n.tran&&n.notice&&(n.type,n.notice(n.tran("Video load failed"),-1))}),this.on("ended",function(){n.bar.set("played",1,"width"),n.setting.loop?(n.seek(0),n.play()):n.pause(),n.danmaku&&(n.danmaku.danIndex=0)}),this.on("play",function(){n.paused&&n.play()}),this.on("pause",function(){n.paused||n.pause()}),this.on("timeupdate",function(){n.bar.set("played",n.video.currentTime/n.video.duration,"width");var e=o.default.secondToTime(n.video.currentTime);n.template.ptime.innerHTML!==e&&(n.template.ptime.innerHTML=e)});for(var i=function(t){e.addEventListener(n.events.videoEvents[t],function(){n.events.trigger(n.events.videoEvents[t])})},a=0;a1&&void 0!==arguments[1]?arguments[1]:2e3,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8;this.template.notice.innerHTML=e,this.template.notice.style.opacity=i,this.noticeTime&&clearTimeout(this.noticeTime),this.events.trigger("notice_show",e),n>0&&(this.noticeTime=setTimeout(function(){t.template.notice.style.opacity=0,t.events.trigger("notice_hide")},n))}},{key:"resize",value:function(){this.danmaku&&this.danmaku.resize(),this.events.trigger("resize")}},{key:"speed",value:function(e){this.video.playbackRate=e}},{key:"destroy",value:function(){M.splice(M.indexOf(this),1),this.pause(),this.controller.destroy(),this.timer.destroy(),this.video.src="",this.container.innerHTML="",this.events.trigger("destroy")}}],[{key:"version",get:function(){return"1.25.0"}}]),e}();t.default=_},,,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(77);var i,a=n(74),o=(i=a)&&i.__esModule?i:{default:i};console.log("\n %c DPlayer v1.25.0 fdcf45b %c http://dplayer.js.org \n\n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),t.default=o.default}]).default}); -//# sourceMappingURL=DPlayer.min.js.map \ No newline at end of file diff --git a/assets/js/Meting.min.js b/assets/js/Meting.min.js deleted file mode 100644 index 1ec934c..0000000 --- a/assets/js/Meting.min.js +++ /dev/null @@ -1 +0,0 @@ -'use strict';console.log('\n %c MetingJS v1.2.0 %c https://github.com/metowolf/MetingJS \n','color: #fadfa3; background: #030307; padding:5px 0;','background: #fadfa3; padding:5px 0;');var aplayers=[],loadMeting=function(){function a(a,b){var c={container:a,audio:b,mini:null,fixed:null,autoplay:!1,mutex:!0,lrcType:3,listFolded:!1,preload:'auto',theme:'#2980b9',loop:'all',order:'list',volume:null,listMaxHeight:null,customAudioType:null,storageName:'metingjs'};if(b.length){b[0].lrc||(c.lrcType=0);var d={};for(var e in c){var f=e.toLowerCase();(a.dataset.hasOwnProperty(f)||a.dataset.hasOwnProperty(e)||null!==c[e])&&(d[e]=a.dataset[f]||a.dataset[e]||c[e],('true'===d[e]||'false'===d[e])&&(d[e]='true'==d[e]))}aplayers.push(new APlayer(d))}}var b='https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r';'undefined'!=typeof meting_api&&(b=meting_api);for(var f=0;fh.status||304===h.status)){var b=JSON.parse(h.responseText);a(d,b)}},h.open('get',g,!0),h.send(null)}else if(d.dataset.url){var i=[{name:d.dataset.name||d.dataset.title||'Audio name',artist:d.dataset.artist||d.dataset.author||'Audio artist',url:d.dataset.url,cover:d.dataset.cover||d.dataset.pic,lrc:d.dataset.lrc,type:d.dataset.type||'auto'}];a(d,i)}},e=0;e - - - - - - 配置frp内网穿透 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 配置frp内网穿透 -

配置frp内网穿透

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

-

通过frp stcp实现windows远程连接

- - -

开始使用

为何要用 frp

国内特殊的互联网环境导致个人的家庭宽带很难获得外网ip,导致无法在外网访问自家的内网。通过使用一台具有外网ip的主机进行frp内网穿透,可以方便的在外网访问内网,不过对于远程桌面这种信息敏感的应用场景,需要更安全的配置方法。

-

frp带给我们stcp的方法来更安全地突破内网限制。
以下是官方给的原理图

-

architecture.png

-

下载地址

- - - - fatedier/frp: A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. - - ​ - - - github.com - - - - 图标 - - -

-

基本使用方法(Windows 远程桌面)

单独使用这种最基本的连接方式不够安全,通常情况下建议只用于入门和测试设备之间是否能连通

-

服务端

以当前版本 0.35.1 为例,在linux下配置服务端:

-
// 下载
-$ wget https://github.com/fatedier/frp/releases/download/v0.35.1/frp_0.35.1_linux_amd64.tar.gz
-// 解压
-$ tar -zxvf frp_0.35.1_linux_amd64.tar.gz
-// 进入文件目录
-$ cd frp_0.35.1_linux_amd64
-// 编辑服务端配置文件
-$ vi frps.ini
-
-
//frps.ini
-
-[common]
-bind_port = 7000
-
-
// 启动服务端
-$ ./frps -c ./frps.ini
-
-

客户端

Windows / Mac 下载解压即可
win: https://github.com/fatedier/frp/releases/download/v0.35.1/frp_0.35.1_windows_amd64.zip
win+r 打开cmd,在文件目录下执行start frpc.exe即可启动,文章底部有更好的办法

-

mac: https://github.com/fatedier/frp/releases/download/v0.35.1/frp_0.35.1_darwin_amd64.tar.gz
进入“终端”,在目录下输入指令./frpc -c ./frpc.ini

-
// frpc.ini
-
-[common]
-server_addr = x.x.x.x
-server_port = 7000
-
-[ssh]
-type = tcp
-local_ip = 127.0.0.1
-local_port = 3389
-remote_port = 3389
-
-

设置“允许远程连接到此计算机”
IMG_5297.jpg

-

通过这些设置之后,你电脑的3389端口会暴露到外网,在任何有网的地方访问x.x.x.x即可连接
IMG_5296.jpg

-

生产环境用法

stcp

这是一种更安全的连接方法,相当于连接远程的一方要念对暗号才能打开大门,在此之前,端口不会暴露在互联网上,增加了安全性

-

IMG_5295.png
*图片来自网络

-

服务端

在有外网ip的机器上,

-
# frps.ini
-
-[common]
-bind_port = 7000
-// token 鉴权
-authentication_method = token
-token = token
-// 只允许 tls 连接
-tls_only = true
-
-// 网页状态面板
-dashboard_port = 8888
-dashboard_user = admin
-dashboard_pwd = admin
-
-

通过 ./frps -c ./frps.ini 启动服务端

-

客户端 1

在需要通过外网访问的机器上

-
# frpc.ini
-
-[common]
-server_addr = x.x.x.x
-server_port = 7000
-authentication_method = token
-token = token
-tls_enable = true
-
-[frp_visitor]
-type = stcp
-# stcp 的访问者
-role = visitor
-# 要访问的 stcp 代理的名字
-server_name = frp
-# 只有 sk 一致的用户才能访问到此服务
-sk = token
-# 绑定本地端口用于访问 远程桌面 服务
-bind_addr = 127.0.0.1
-bind_port = 6000
-# true 启用加密
-use_encryption = false
-# true 启用压缩
-use_compression = false
-
-

通过 ./frpc -c ./frpc.ini 启动客户端

-

客户端 2

在需要连接远程的机器上

-
# frpc.ini
-
-[common]
-server_addr = x.x.x.x
-server_port = 7000
-authentication_method = token
-token = token
-tls_enable = true
-
-[frp]
-type = stcp
-sk = token
-local_ip = 127.0.0.1
-local_port = 3389
-# true 启用加密
-use_encryption = false
-# true 启用压缩
-use_compression = false
-
-

通过 ./frpc -c ./frpc.ini 启动客户端

-
-

xtcp

这是一种基于stcp上的p2p(点对点)的连接方法,理论上延迟更低。但是目前功能开发不够完善,还不太稳定,建议还是首选stcp。

-

IMG_5294.png
*图片来自网络

-

frpc.ini 中的 type = stcp 改成 xtcp即可

-

服务端

不变

-

客户端 1

在需要通过外网访问的机器上

-
# frpc.ini
-
-[common]
-server_addr = x.x.x.x
-server_port = 7000
-authentication_method = token
-token = token
-tls_enable = true
-
-[frp_visitor]
-type = xtcp
-# stcp 的访问者
-role = visitor
-# 要访问的 stcp 代理的名字
-server_name = frp
-# 只有 sk 一致的用户才能访问到此服务
-sk = token
-# 绑定本地端口用于访问 远程桌面 服务
-bind_addr = 127.0.0.1
-bind_port = 6000
-# true 启用加密
-use_encryption = false
-# true 启用压缩
-use_compression = false
-
-

通过 ./frpc -c ./frpc.ini 启动客户端

-

客户端 2

在需要连接远程的机器上

-
# frpc.ini
-
-[common]
-server_addr = x.x.x.x
-server_port = 7000
-authentication_method = token
-token = token
-tls_enable = true
-
-[frp]
-type = xtcp
-sk = token
-local_ip = 127.0.0.1
-local_port = 3389
-# true 启用加密
-use_encryption = false
-# true 启用压缩
-use_compression = false
-
-

通过 ./frpc -c ./frpc.ini 启动客户端

-
-

建立本地 http 服务器

官方示例

- - - - 通过自定义域名访问内网的 Web 服务 - - ​ - - - gofrp.org - - - - 图标 - - -

-

服务端

# frps.ini
-
-[common]
-bind_port = 7000
-// token 鉴权
-authentication_method = token
-token = token
-// 只允许 tls 连接
-tls_only = true
-
-// 
-vhost_http_port = 8080
-
-// 网页状态面板
-dashboard_port = 8888
-dashboard_user = admin
-dashboard_pwd = admin
-
-

客户端

[common]
-server_addr = x.x.x.x
-server_port = 7000
-token = token
-tls_enable = true
-
-[web]
-type = http
-local_port = #port
-custom_domains = #domains
-
-

更优雅的使用方式

网上其他教程都简单粗暴的地直接运行命令启动frp,但显然不够优雅,基于这个原因我研究了两种更优雅的使用方式

-

进程守护脚本

这个东西一旦不小心关闭,远程就无法进行下去。
所以做了一个守护脚本,30s自动检测进程是否存在,一定程度上避免了因为意外关闭导致的麻烦

-

1007AADA-3180-4A59-8E80-738D1F5E0A19.png

-
@ECHO OFF
-setlocal enabledelayedexpansion
-
-
-
-rem 设置进程检测延迟, 单位 (秒)
-set /a check_delay = 30
-
-
-
-mode 82,12
-set "d=%~p0"
-set "d=%d:\= %"
-for %%a in (%d%) do set name=%%a
-set /a var=0
-start frpc.exe
-:loop
-set /a var=%1+1
-set /a var2=%var%-1
-if %var2%==0 (set num= ) else (set num= 已重启 !var2! 次 restart_service.txt中具有详细信息)
-title %name% 进程守护%num%
-echo ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
-echo ┃             ______     ______     __  __               ┃ 
-echo ┃            /\___  \   /\___  \   /\ \_\ \              ┃ 
-echo ┃            \/_/  /__  \/_/  /__  \ \____ \              ┃
-echo ┃              /\_____\   /\_____\  \/\_____\             ┃
-echo ┃              \/_____/   \/_____/   \/_____/             ┃
-echo ┃                                        ┃
-echo ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
-echo 正在守护 %name% 进程, 当前 %check_delay%s 检测一次, 延迟可在文件中修改
-tasklist|find /i "frpc.exe"
-if %errorlevel%==0 (
-goto true
-) else (
-goto false
-)
-goto :loop
-
-:true
-echo 日期:%DATE% 时间:%time%  ok
-ping -n %check_delay% -w 500 127.1>nul
-cls
-goto loop
-
-:false
-start frpc.exe
-echo 未检测到进程
-echo 启动 %name% ...
-echo 程序重新启动于 日期:%DATE% 时间:%time% >> restart_service.txt
-ping -n 5 -w 500 127.1>nul
-cls
-call :loop %var%
-
-
-

通过 Windows 服务的方式运行 (推荐)

优势

这种方法无运行窗口,开机以服务方式启动。放在启动项的方式,则需要登录之后才能运行

-

85915105-5192-4D6B-A265-705339045196.png

-

- - - - winsw/winsw: A wrapper executable that can run any executable as a Windows service, in a permissive license. - - ​ - - - github.com - - - - 图标 - - -

-

我下载的版本: https://github.com/winsw/winsw/releases/download/v2.10.2/WinSW.NET4.exe

-

下载之后,把文件放在frp目录下,新建一个‘文件名’+.xml的文件,比如WinSW.NET4.xml,并写上以下内容

-
// WinSW.NET4.xml
-
-<service>
-<id>frp</id>
-<name>frp</name>
-<description>Frp Client</description>
-<executable>frpc</executable>
-<arguments>-c frpc.ini</arguments>
-<logmode>reset</logmode>
-</service>
-
-

便捷管理

新建一个cmd,复制以下内容,就能便捷管理了

-

7E5DEE14-1725-481F-A1AB-6BADACFAE6D7.png

-
// 安装服务.cmd
-
-    @ECHO OFF
-    :home
-    title frp 注册成 Windows 服务
-    cls
-    echo 当前服务运行状态:
-    WinSW.NET4.exe status
-    echo ---------------------------------------------------------------
-    echo     请选择任务。
-    echo ---------------------------------------------------------------
-    echo     [1]安装服务
-    echo     [2]安装服务并启动
-    echo     [3]启动服务
-    echo     [4]停止服务并等待,直到它实际上停止为止
-    echo     [5]卸载服务
-    echo     [6]退出脚本。
-    echo ---------------------------------------------------------------
-
-    choice /n /c 12345678 /m "请输入数字选择:"
-    cls
-    if errorlevel 6 exit
-    if errorlevel 5 goto uninstall
-    if errorlevel 4 goto stopwait
-    if errorlevel 3 goto start
-    if errorlevel 2 goto installandstart
-    if errorlevel 1 goto install
-    
-    :install
-    WinSW.NET4.exe install
-    goto choice
-
-    :installandstart
-    WinSW.NET4.exe install
-    WinSW.NET4.exe start
-    goto choice
-
-    :start
-    WinSW.NET4.exe start
-    goto choice
-
-    :stopwait
-    WinSW.NET4.exe stopwait
-    goto choice
-
-    :uninstall
-    WinSW.NET4.exe stop
-    WinSW.NET4.exe uninstall
-    goto choice
-
-    :choice
-    echo ---------------------------------------------------------------
-    echo     [1]返回
-    echo     [2]退出脚本
-    echo ---------------------------------------------------------------
-    choice /n /c 12 /m "请输入数字选择:"
-    cls
-    if errorlevel 2 exit
-    if errorlevel 1 goto home
-
- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build-frp-server/pinned-octocat.svg b/build-frp-server/pinned-octocat.svg deleted file mode 100644 index 634e055..0000000 --- a/build-frp-server/pinned-octocat.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git "a/categories/\344\275\234\345\223\201/index.html" "b/categories/\344\275\234\345\223\201/index.html" deleted file mode 100644 index 170c1c9..0000000 --- "a/categories/\344\275\234\345\223\201/index.html" +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 分类:作品 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\345\255\246\344\271\240/index.html" "b/categories/\345\255\246\344\271\240/index.html" deleted file mode 100644 index 9f4349c..0000000 --- "a/categories/\345\255\246\344\271\240/index.html" +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 分类:学习 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\346\212\230\350\205\276/index.html" "b/categories/\346\212\230\350\205\276/index.html" deleted file mode 100644 index d868cdb..0000000 --- "a/categories/\346\212\230\350\205\276/index.html" +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 分类:折腾 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\346\212\230\350\205\276/page/2/index.html" "b/categories/\346\212\230\350\205\276/page/2/index.html" deleted file mode 100644 index a4f1bd8..0000000 --- "a/categories/\346\212\230\350\205\276/page/2/index.html" +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 分类:折腾 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git "a/categories/\350\256\276\345\244\207/index.html" "b/categories/\350\256\276\345\244\207/index.html" deleted file mode 100644 index bf2221e..0000000 --- "a/categories/\350\256\276\345\244\207/index.html" +++ /dev/null @@ -1,438 +0,0 @@ - - - - - - - 分类:设备 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- - - - - -
- - - - -

- 2022 -

- - -

- 2021 -

- - -

- 2020 -

- - -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/change-system-drive/index.html b/change-system-drive/index.html deleted file mode 100644 index dad731f..0000000 --- a/change-system-drive/index.html +++ /dev/null @@ -1,460 +0,0 @@ - - - - - - - 更换系统硬盘-记录-复盘 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 更换系统硬盘-记录-复盘 -

更换系统硬盘-记录-复盘

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

-

电脑用了一年系统分区饱爆满,换2T m2,但因为电脑只有一个m2插槽,所以需要一些奇怪的操作,之后免不了奇怪的问题。这里记录一下踩过的坑

- - -

选择容量和硬盘

原计划是扩充容量,上1T sata的海康威视e200p。1T全部给Mac系统
但是经过高人指点,决定把档位固定到2T(回想起来升级容量没有一次是完全够用的)

-
-

第一个问题: e200p 2t版本无货

-
-

后来看了一些论坛和视频,发现这款硬盘固件有问题。还好没货

-

接下来找其他sata硬盘,三星860 qvo符合我的价位,一查,速度和机械没有什么区别。
后面找到一款硬盘测速软件,发现我爆满的系统盘(128g总容量双系统加起来仅剩5g左右)读取速度在1.5g/s,sata的速度似乎不能满足我的日常体验。于是把目光转向sata硬盘,首先映入眼帘的是海康威视c2000p。
这时候有一件事情,稍后分解。

-

对比了市面上消费者比较认可的型号
*只对比我比较关注的参数
*没有2t版本选择接近的

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
型号容量颗粒寿命TBW读写缓存价格
WD SN7502TTLC 原厂12003400 MB/s 2900 MB/s2GB3629
WD SN5501TTLC 原厂6002400 MB/s 1950 MB/snull929
三星 970 EVO Plus2TTLC 原厂12003500 MB/s 3300 MB/s2GB3999
三星 860 EVO sata2TTLC 原厂1200550 MB/s 520 MB/s2GB2699
东芝 RD5001TTLC 原厂4003400 MB/s 3200 MB/s1GB1399
海康 C2000 PRO2TTLC 白片12803500 MB/s 3100 MB/snull1899
-

白片成本比原厂低1/3到1/2,所以海康才能这么便宜,但随之而来的问题是坏的风险比原厂片要高,因为缺少原厂的质检,最好的白片也比最差的原厂片质量差。
所以我承认我有赌的成分

-

为了降低数据损失的潜在风险,我打算买一个pcie转m2接口,再买一个非常稳的m2,但是事实打击了我,主板上pciex4的触点焊上了x1的接口,下面x8的触点直接没动…

-

虽然这样,我还是买了两块pciex1转接卡两块。结果上面的m2太紧怕插坏了,搁置。

-

所以现在计划是留一块机械盘备份重要数据。这块m2做好随时坏的准备(虽然网上似乎没看见过有谁坏了),明年换主板换系统盘(你不还是要换!),这块当作游戏仓库盘,坏了不心疼。

-

这时候c2000p的兄弟c2000和lite在b站被某up锤,和海康老总直播对线,但我还是头铁入了它。。。。

-

下一个问题是在哪家店入手,最好的选择应该是京东自营。但一进入京东自营的商品界面,此地区暂时无货几个大字就甩我脸上,大晚上也不知道自己怎么想到的,既然此地区无货我为什么不试试其他地区呢,全国主要区域都是有亲戚的啊。点来点去发现老家有货,此时刚好送我妹妹生日礼物,这回好说!于是在全国疫情的背景下,不远万里来相见…

-

开箱&备份&安装

开箱

QQ20200326-1.jpg
QQ20200326-0.jpg

-

备份数据

我美好的想法是这样的

-

黑苹果

直接使用自带的时间机器备份,用启动盘恢复时间机器备份

-

Windows

clone分区到移动硬盘,更换之后再clone back

-

更换硬盘

没什么可说的,拆开,装上
QQ20200326-4.jpg
开机bios设置看是否识别
QQ20200326-5.jpg
pe查看lifetime之类的数据确认是否全新(未检测是否清零),然后跑个速度(不上图了)

-

恢复数据

首先恢复黑苹果,毕竟是吃饭的工具。用黑果小兵的10.13.6 17g65 with coverbalenaEtcher制作启动盘,然后把cover替换为自己的配置。

-

这里说一下我目前的配置

-
    -
  • H370 hp
  • -
  • i5 8400
  • -
  • GTX 1066 hp
  • -
-

因为hp的残缺bios,不仅安装的时候痛苦,并且至今没有方法解决硬件加速的问题。

-

啰嗦完了继续安装,开机F9选择u盘上的cover,进入安装程序

-

无法启动黑苹果

读条一小段马上重启,打开cover中的-v啰嗦模式和don't reboot on panic(debug=0x100)查看原因
开机提示ALF, old data swfs_pid_entry <ptr>依然秒重启,甚至第一次来不及拍照。
百度搜索这个错误都是10.15.x系统出现的问题。

-

(此处省略一些字)

-

我不记得怎么解决了,没动cover配置,可能是操作失误?直到现在开机依然会弹一堆ALF, old data swfs_pid_entry <ptr>错误,但是可以正常开机和使用,猜测可能是硬盘的问题。

-

用mac安装程序附带的磁盘工具重新格式化了一遍分区,Mac和Windows各一半(结果ESP分区只给了200m,本来黑苹果应该在300m以上,但目前没遇到问题)

-

反正经过什么恢复卡死之类的问题终于成功了,我已身经百战,这点问题不是问题。

-

时间机器不显示最新备份

但是恢复这个操作出了问题 时间机器没有显示我最新备份的文件。显示最新的备份是同一个月的手动备份(我设置手动备份时间机器,一共备份过三次,这个月两次)。
我有选择吗?我没得选

-

因为上一次没有全盘备份,为了节省移动硬盘的空间,省略了例如桌面、照片等个人文件夹。
导致恢复备份之后没有备份的个人文件夹再侧边栏名字变成英文,点开显示“找不到原身”。

-

这不是大问题,反正数据都还在原来的硬盘,再倒一遍折腾得起。

-

开始折腾windows,比想象中的问题大

-

clone分区软件闪退

使用clone分区的软件DiskGeniusclone回去,进度条走20%左右软件闪退,再次打开检测不到所有磁盘,反复两次、切换版本问题依然存在,更换软件恢复如图所示,速度极其慢(16m/s左右)
(图)待补充
终于恢复好了

-

win找不到启动文件

开机显示 无法加载应用程序或操作系统 0xc000000e。

-

当时首先想到的解决办法是买一个m2硬盘盒,接到电脑上直接原盘clone不经过移动硬盘中转(我也不想再经历一遍那么慢的速度了,而且pe系统因为没有显卡驱动,风扇会维持到最大速度,整个机箱轻微震动)
经过分析,这个问题是因为硬盘参数变化,从旧硬盘复制过来的引导文件无法找到启动文件导致的。

-

但是再下单硬盘盒之前解决了这个问题,首先重新安装同样版本系统,安装程序会重新设置适合的启动项,我们只要这个启动项。安装程序还会把旧系统移动到windows.old文件夹。所以我们可以安装完之后进入pe,从根目录删除并且替换windows.old里的文件(先删除再复制更稳妥)
QQ20200326-2.jpg

-
-

注意这里只会把系统文件移动到windows.old,如果根目录有其他文件/文件夹,复制前要看好

-
-

系统可以进去了,但是除了设置,所有uwp都无法打开(包括Windows Store)
QQ20200326-0.png

-

这里我错误操作了导致要重新操作上面的步骤,其实到这一步之后打开管理员powershell执行Get-AppxPackage -AllUsers| Foreach{Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}重新注册uwp即可

-

下单硬盘盒,到手发现ngff硬盘盒不支持nvme硬盘,退货。结果还是把原硬盘插回电脑了。。。
QQ20200326-3.jpg
重新备份时间机器,打开备份界面看读条,发现这次不是全量备份,10g的大小像是补充备份,听到机械硬盘读写时特殊的声音,我相信文件一定复制过去了。结果出乎意料,备份之后的最新备份依然是这个月上一次备份时间。

-

折腾的仅要告诉我,哪里出问题就去哪找问题,进入时间机器的磁盘,挨个找文件,查看备份结构。果然文件确实复制过去了,但是隐藏在一个后缀为.inprogress的包内,猜测这是一个补充备份机制,但是不知道为什么这个机制没有在恢复的时候生效。

-

不过这不是问题,重新换回新硬盘,从时间机器的磁盘直接复制文件到相应的位置。

-

“不支持的备份盘格式”

直接复制到系统盘提示“不支持的备份盘格式”,只好先复制到电脑里的机械硬盘,再复制需要的文件到系统盘的相应位置,这时候以为解决了。Mac用了不到一年,可能对它的理解还不太深。
(后来从大佬那里了解到:timemachine的文件格式可能和mac的磁盘格式有关系)

-

文件权限异常

紧接上一个问题之后。所有复制过来的文件都出现一个问题,目录下所有编辑操作都需要验证管理员密码,导致一些需要读取相应文件的软件无法正常运行
1
Mac和Linux有共通的地方,依照对linux系统的理解,先检查文件夹权限,发现权限异常的文件夹权限不一样
屏幕快照 2020-03-26 上午12.40.20.png
首先执行sudo chmod -R 755 *依然不行
屏幕快照 2020-03-26 上午12.41.09.png
排查后发现还有一个特征,权限后面有一个@。
@代表额外权限
通过指令ls -laeO@查看额外权限
其中有一条group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
经过百度,使用以下指令解决
chmod -R -a "group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown" *
QQ20200326-3.png

-
-

复盘的时候发现(包装、贴纸序列号、发票序列号)和(电脑识别到的序列号)不一致,没想到京东自营会出这种错误,不知道是否翻车

-
-
-

4.23更新

-

最后Windows迁移方法是拔掉显卡,通过空出来的pcie插槽用m2转接卡实现同时接连个m2硬盘,然后用DiskGenius克隆、恢复分区,最后检查下分区id是否和之前硬盘一致就大功告成了

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/css/style.css b/css/style.css deleted file mode 100644 index fb4edd1..0000000 --- a/css/style.css +++ /dev/null @@ -1,1306 +0,0 @@ -*, -*::after, -*::before { - box-sizing: border-box; -} -a { - text-decoration: none; -} -body { - max-width: 1200px; - margin: auto !important; -} -#nexmoe-background .nexmoe-bg { - opacity: 0.3; - background-size: cover; - filter: blur(30px); - height: 100vh; - width: 100%; - position: fixed; - top: 0; - left: 0; - z-index: -1; -} -#nexmoe-background .mdui-appbar { - padding: 10px; - display: none; -} -#nexmoe-background .mdui-appbar img { - width: 100%; -} -@media screen and (max-width: 1023px) { - .nexmoe-bg { - position: relative; - } - .mdui-appbar { - display: block !important; - } -} -#nexmoe-header { - margin-left: -240px; -} -#nexmoe-header .mdui-drawer { - left: unset; - scrollbar-width: none; -} -#nexmoe-header .mdui-drawer::-webkit-scrollbar { - display: none; -} -#nexmoe-header .nexmoe-avatar, -#nexmoe-header .nexmoe-avatar img { - width: 100%; - font-size: 0 0; - border-radius: 80px; - -webkit-border-radius: 80px; - -moz-border-radius: 80px; - box-shadow: inset 0 -1px 0 #333 sf; - -webkit-transition: -webkit-transform 1.5s ease-out; - -moz-transition: -moz-transform 1.5s ease-out; - transition: transform 1.5s ease-out; -} -#nexmoe-header .nexmoe-avatar { - margin: 45px; - z-index: 4; - position: relative; - font-size: 0; - width: calc(100% - 90px); - overflow: hidden; - border-radius: 100%; - box-shadow: 0 0.3rem 2rem rgba(161,177,204,0.6); -} -#nexmoe-header .nexmoe-avatar a { - padding-bottom: 100%; - display: block; - height: 0; -} -#nexmoe-header .nexmoe-count { - padding: 0 30px; - margin-bottom: 30px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -#nexmoe-header .nexmoe-count div { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - text-align: center; - color: #a3a8ae; -} -#nexmoe-header .nexmoe-count div span { - color: #363636; - display: block; -} -#nexmoe-header .nexmoe-search input { - border: none !important; - background-color: transparent; - padding: 20px; - box-sizing: border-box; - outline: none; -} -#nexmoe-header .nexmoe-social { - padding: 5px; -} -#nexmoe-header .nexmoe-social a { - width: 36px; - height: 36px; - line-height: 36px; - margin: 5px; - border-radius: 100%; - display: inline-block; - text-align: center; - color: #606266; - transition: ease-out 0.18s; -} -#nexmoe-header .nexmoe-social-buttom .main { - width: 38px; - height: 38px; - line-height: 36px; - margin: 5px; - border-radius: 100%; - display: inline-block; - text-align: center; - transition: ease-out 0.18s; -} -#nexmoe-header .nexmoe-social-buttom-bilibili { - width: 36px; - height: 36px; - line-height: 36px; - margin: 5px; - border-radius: 100%; - display: inline-block; - text-align: center; - color: #606266; - transition: ease-out 0.18s; - box-shadow: 0 10px 10px -2px rgba(231,106,141,0.32); -} -#nexmoe-header .nexmoe-social-buttom-bilibili:hover { - transform: translateY(-5px); - -webkit-transform: translateY(-5px); - -webkit-box-shadow: 0 15px 14px -2px rgba(231,106,141,0.3); - box-shadow: 0 15px 14px -2px rgba(231,106,141,0.3); -} -#nexmoe-header .nexmoe-social-buttom-github { - width: 36px; - height: 36px; - line-height: 36px; - margin: 5px; - border-radius: 100%; - display: inline-block; - text-align: center; - color: #606266; - transition: ease-out 0.18s; - box-shadow: 0 10px 10px -2px rgba(165,165,165,0.6); -} -#nexmoe-header .nexmoe-social-buttom-github:hover { - transform: translateY(-5px); - -webkit-transform: translateY(-5px); - -webkit-box-shadow: 0 15px 14px -2px rgba(165,165,165,0.58); - box-shadow: 0 15px 14px -2px rgba(165,165,165,0.58); -} -#nexmoe-header .nexmoe-list { - padding: 8px 20px; -} -#nexmoe-header .nexmoe-list .nexmoe-list-item { - padding: 0 36px; - color: #9ca2a8; - transition: all 0.35s; - border-radius: 15px; - margin-bottom: 10px; - text-align: center; -} -#nexmoe-header .nexmoe-list .nexmoe-list-item.active, -#nexmoe-header .nexmoe-list .nexmoe-list-item.active i { - text-shadow: 0 1px rgba(255,255,255,0.5); - color: #5d6b7d; -} -#nexmoe-header .nexmoe-list .nexmoe-list-item.active { - opacity: 0.9; - position: relative; -/* display: inline-block; */ - background: #d3dce6; - background: -webkit-linear-gradient(bottom, rgba(255,255,255,0.5), rgba(255,255,255,0) 10px) #d3dce6; - background: linear-gradient(0deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 10px) #d3dce6; - border-radius: 13px; - border: 1px solid #acbacc; -/* padding: 5px 15px; */ - -webkit-box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 13px 15px rgba(31,45,61,0.15); - box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 13px 15px rgba(31,45,61,0.15); - max-width: 100%; - -webkit-transition: 0.25s; - transition: 0.25s; - background-image: repeating-linear-gradient(90deg, #d3dce6, rgba(198,211,226,0.431) 1em, rgba(198,211,226,0.431) 1em, rgba(198,211,226,0.431) 50%); - background-size: 1em 1em; -} -#nexmoe-header .nexmoe-list .nexmoe-list-item.active:after { - display: block; - position: absolute; - left: 4px; - top: 0; - right: 4px; - height: 20px; - border-radius: 10px; - background: rgba(255,255,255,0.5); - background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(rgba(255,255,255,0.2))); - background: -webkit-linear-gradient(#fff, rgba(255,255,255,0.2)); - background: linear-gradient(#fff, rgba(255,255,255,0.2)); -} -#nexmoe-header .nexmoe-list .nexmoe-list-item i { - font-size: 22px; - color: #9ca2a8; -} -#nexmoe-header .nexmoe-list .nexmoe-list-item .mdui-list-item-content { - margin-left: 0px; - transition: all 0.35s; -} -#nexmoe-header .nexmoe-widget-wrap { - box-shadow: 0 0 1rem rgba(161,177,204,0.4); - background: linear-gradient(225deg, #e6e6e6, #fff); - margin: 20px; - border-radius: 15px; - overflow: hidden; - white-space: normal; - -webkit-box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 13px 15px rgba(31,45,61,0.15); - box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 13px 15px rgba(31,45,61,0.15); -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget-title { - font-size: 1.2em; - font-weight: normal; - padding: 12px 10px 10px; - margin: 0; -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget ul { - list-style-type: none; - padding: 0; - margin: 0px; -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget ul li { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - transition: all 0.35s; - position: relative; -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget ul li a { - padding: 14px 10px; - display: block; - color: #606266; -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget ul li:hover { - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e0e0e0), color-stop(35%, #eee), color-stop(100%, #fafafa)); -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget ul li:last-child { - border-bottom: none; -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget .category-list-count { - display: inline-block; - width: 26px; - height: 26px; - line-height: 26px; - text-align: center; - border-radius: 100%; - color: #cc3d53; - background: radial-gradient(circle at 50% 150%, #fff4f6, #e6e6e6 10%, #ffd1d8 80%, #ffc5cf 100%); - box-shadow: inset 0 0 2px 0px rgba(105,0,0,0.1); - position: absolute; - right: 10px; - top: 10px; -} -#nexmoe-header .nexmoe-widget-wrap .nexmoe-widget .category-list-count:before { - content: ""; - display: block; -/*position: absolute; - left: 4px; - top: 0; - right: 4px; - height: 20px; - border-radius: 10px; - background: rgba(255,255,255,0.5); - background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(rgba(255,255,255,0.2))); - background: -webkit-linear-gradient(#fff, rgba(255,255,255,0.2)); - background: linear-gradient(#fff, rgba(255,255,255,0.2)); - position: absolute; - top: 1%; - left: 5%; - width: 90%; - height: 90%; - border-radius: 50%; - background: radial-gradient(circle at 50% 0px, #ffffff, rgba(255, 255, 255, 0) 58%); - filter: blur(2px); - z-index: 2;*/ - content: ""; - display: block; - position: absolute; - left: 4px; - top: 2px; - right: 4px; - height: 12px; - border-radius: 100%; - background: rgba(255,255,255,0.8); - background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(rgba(255,255,255,0.2))); - background: -webkit-linear-gradient(#fff, rgba(255,255,255,0.2)); - background: linear-gradient(#fff, rgba(255,255,255,0.2)); - filter: blur(2px); - z-index: 2; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud { - padding: 10px; - padding-bottom: 5px; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a { - border-radius: 15px; - padding: 5px 10px; - color: #fff; - font-size: 12px !important; - display: inline-block; - margin-bottom: 5px; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:before { - content: "# "; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+1) { - background-color: rgba(255,78,106,0.15); - color: rgba(255,78,106,0.8); -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+2) { - background-color: rgba(255,170,115,0.15); - color: #ffaa73; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+3) { - background-color: rgba(254,212,102,0.15); - color: #fed466; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+4) { - background-color: rgba(60,220,130,0.15); - color: #3cdc82; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+5) { - background-color: rgba(100,220,240,0.15); - color: #64dcf0; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+6) { - background-color: rgba(100,185,255,0.15); - color: #64b9ff; -} -#nexmoe-header .nexmoe-widget-wrap .tagcloud a:nth-child(7n+7) { - background-color: rgba(180,180,255,0.15); - color: #b4b4ff; -} -#nexmoe-header .nexmoe-widget-wrap:first-child { - margin-top: 0; -} -#nexmoe-header .nexmoe-copyright { - padding: 0 30px; - text-align: center; - color: #777; - white-space: normal; - margin-bottom: 20px; -} -#nexmoe-header .nexmoe-copyright a { - color: #ff4e6a; -} -@media screen and (max-width: 1024px) { - #nexmoe-header { - margin-left: 0; - } - #nexmoe-header .mdui-drawer { - left: 0; - } -} -#nexmoe-content { - position: relative; -} -#nexmoe-content .nexmoe-primary { - box-shadow: 0 0 1rem rgba(161,177,204,0.4); - background-color: #fff; - -webkit-box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 13px 15px rgba(31,45,61,0.15); - box-shadow: 0 0 0 1px rgba(255,255,255,0.4) inset, 0 13px 15px rgba(31,45,61,0.15); - border-radius: 30px 30px 0px 0px; - background: linear-gradient(0deg, rgba(212,241,255,0.3), rgba(212,241,255,0) 50px) #fff; - float: left; - width: 100%; - padding: 25px; - position: absolute; - min-height: 100vh; -} -#nexmoe-content .nexmoe-primary .nexmoe-page-nav { - list-style: none; - text-align: center; - display: inline-block; - color: #ddd; - background-color: #f5f6f5; - border-radius: 15px; - margin-top: -10px; - box-shadow: inset 0px 3px 10px -2px #d5d5d5; -} -#nexmoe-content .nexmoe-primary .nexmoe-page-nav .prev { - margin-left: 8px; -} -#nexmoe-content .nexmoe-primary .nexmoe-page-nav .page-number, -#nexmoe-content .nexmoe-primary .nexmoe-page-nav .extend { - color: #999; - border-radius: 15px; - width: 35px; - height: 35px; - line-height: 35px; - margin-right: 8px; - float: left; -} -#nexmoe-content .nexmoe-primary .nexmoe-page-nav .current { - color: #fff; - opacity: 0.9; - background: -webkit-radial-gradient(75% 25%, circle farthest-corner, #ff7a60 0, #e6162d 100%); - background: radial-gradient(circle farthest-corner at 75% 25%, #ff7a60 0, #e6162d 100%); - -webkit-box-shadow: 0 5px 10px -2px #ff4e6a; - box-shadow: 0px 5px 10px -2px #ff4e6a; - transition: 0.5s; -} -#nexmoe-content .nexmoe-posts { - position: relative; -} -#nexmoe-content .nexmoe-posts .nexmoe-post { - width: 100%; - margin-bottom: 40px; -} -#nexmoe-content .nexmoe-posts .nexmoe-post article p:first-child { - margin-top: 0; -} -#nexmoe-content .nexmoe-posts .nexmoe-post article p:last-child { - margin-bottom: 0; -} -#nexmoe-content .nexmoe-posts .nexmoe-post-meta { - margin: 10px 0 !important; -} -#nexmoe-content .nexmoe-posts .nexmoe-post:last-child { - margin-bottom: 25px; -} -#nexmoe-content .nexmoe-post .nexmoe-post-cover { - width: 100%; - position: relative; - overflow: hidden; - border-radius: 15px; - min-height: 75px; - background-color: #eee; -} -#nexmoe-content .nexmoe-post .nexmoe-post-cover img { - width: 100%; - display: block; - opacity: 0; - transition: opacity 400ms ease-in; - position: absolute; - left: 0; - top: 0; - border-radius: 15px; -} -#nexmoe-content .nexmoe-post .nexmoe-post-cover img.lazyloaded { - opacity: 1; -} -#nexmoe-content .nexmoe-post .nexmoe-post-cover h1 { - color: #fff; - font-size: 2em; - text-shadow: 0 0 20px rgba(10,17,25,0.6); - font-weight: normal; - margin: 0; - margin-top: 10px; - padding-left: 1px; - position: absolute; - bottom: 0; - width: 100%; - box-sizing: border-box; - text-transform: none; - z-index: 1; - margin: 0; - padding: 10px; -} -#nexmoe-content .nexmoe-post .nexmoe-post-cover h1:after { - background-image: -moz-linear-gradient(to top, rgba(10,17,25,0.2) 10%, rgba(10,17,25,0) 100%); - background-image: -webkit-linear-gradient(to top, rgba(10,17,25,0.2) 10%, rgba(10,17,25,0) 100%); - background-image: -ms-linear-gradient(to top, rgba(10,17,25,0.2) 10%, rgba(10,17,25,0) 100%); - background-image: linear-gradient(to top, rgba(10,17,25,0.2) 10%, rgba(10,17,25,0.06) 65%, rgba(10,17,25,0) 100%); - -moz-pointer-events: none; - -webkit-pointer-events: none; - -ms-pointer-events: none; - pointer-events: none; - border-radius: 0px 0px 15px 15px; - background-size: cover; - content: ''; - display: block; - height: 100%; - left: 0; - position: absolute; - bottom: 0; - width: 100%; - z-index: -1; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta { - margin: 25px 0px; - font-size: 0; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a { - border-radius: 20px; - padding: 10px 18px; - color: #fff; - font-size: 14px; - display: inline-block; - margin-bottom: 5px; - margin-right: 10px; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a .nexmoefont { - font-size: 14px; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:before, -#nexmoe-content .nexmoe-post .nexmoe-post-meta i:before { - margin-right: 5px; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+1) { - background-color: rgba(255,78,106,0.15); - color: #ff4e6a; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+2) { - background-color: rgba(255,170,115,0.15); - color: #ffaa73; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+3) { - background-color: rgba(254,212,102,0.15); - color: #fed466; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+4) { - background-color: rgba(60,220,130,0.15); - color: #3cdc82; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+5) { - background-color: rgba(100,220,240,0.15); - color: #64dcf0; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+6) { - background-color: rgba(100,185,255,0.15); - color: #64b9ff; -} -#nexmoe-content .nexmoe-post .nexmoe-post-meta a:nth-child(7n+7) { - background-color: rgba(180,180,255,0.15); - color: #b4b4ff; -} -#nexmoe-content .nexmoe-post .nexmoe-post-copyright { - margin-bottom: 20px; - border-radius: 6px; - padding: 20px; - color: #2a2e2e; - background-color: #fff; - line-height: 1.5em; - position: relative; -} -#nexmoe-content .nexmoe-post .nexmoe-post-copyright i { - position: absolute; - top: -10px; - left: 13px; - font-size: 20px; - background: #f8f8f8; - color: #666; - border-radius: 100%; - text-align: center; - line-height: 24px; - padding: 2px; - height: 30px; - width: 30px; - border: 1px solid #eee; -} -#nexmoe-content .nexmoe-post .nexmoe-post-copyright a { - color: #ff4e6a; -} -#nexmoe-content .nexmoe-post-footer { - background-color: #f5f6f5; - padding: 25px; - margin: -25px; - margin-top: 0; - box-shadow: inset 0px 3px 20px 0px #e2e2e2; - background-image: linear-gradient(90deg, rgba(213,225,239,0.102) 28%, rgba(255,255,255,0) 0); - background-size: 1em 1em; -} -#nexmoe-content::after { - clear: both; - display: table; - content: ' '; -} -@media screen and (max-width: 1024px) { - #nexmoe-content .nexmoe-primary { - width: 100%; - position: relative; - min-height: 100vh; - } - #nexmoe-content .nexmoe-secondary { - display: none; - } -} -@media screen and (min-width: 1024px) { - body { - padding-left: 80px; - } - #nexmoe-header .mdui-drawer-close { - -webkit-transform: translateX(-160px); - transform: translateX(-160px); - } - #nexmoe-header .mdui-drawer-close .nexmoe-avatar { - padding: 16px; - width: 80px; - margin-left: 160px; - margin-top: 8px; - } - #nexmoe-header .mdui-drawer-close .nexmoe-count { - padding: 16px; - width: 80px; - margin-left: 160px; - display: block; - } - #nexmoe-header .mdui-drawer-close .nexmoe-count div { - display: block; - margin-bottom: 10px; - } - #nexmoe-header .mdui-drawer-close .nexmoe-count div:last-child { - margin-bottom: 0; - } - #nexmoe-header .mdui-drawer-close .mdui-list { - margin-left: 160px; - } - #nexmoe-header .mdui-drawer-close .nexmoe-list-item { - padding: 0 17px; - color: #9ca2a8; - } - #nexmoe-header .mdui-drawer-close .mdui-list-item-icon~.mdui-list-item-content { - margin-left: 32px; - } - #nexmoe-header .mdui-drawer-close .nexmoe-list { - padding: 8px 10px; - } -} -article { - color: #444; - font-family: microsoft yahei; -} -article p { - line-height: 24px; -} -article code { - background-color: rgba(27,31,35,0.05); - border-radius: 6px; - font-size: 85%; - padding: 0.2em 0.4em; -} -article code::-webkit-scrollbar { - width: 10px; - height: 10px; -} -article code::-webkit-scrollbar-thumb { - border-radius: 6px; - background-color: #888; -} -article pre { - border-radius: 15px; - overflow: hidden; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin: 25px 0; - padding: 15px; - padding-top: 15px; - padding-right: 0px; - padding-bottom: 15px; - padding-left: 0px; - position: relative; - background: #282c34; - line-height: 1.3em; -} -article pre::before { - background: #282c34; - height: 32px; - margin-bottom: 0; - display: block; -} -article pre::after { - position: absolute; - border-radius: 50%; - background: #ff5f56; - width: 12px; - height: 12px; - top: 0; - left: 12px; - margin-top: 12px; - -webkit-box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f; - box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f; -} -article pre code { - position: relative; - border: none; - border-radius: 0; - font-size: 100%; - font-family: Consolas; -} -article pre code::after { - color: #5c6370; - position: absolute; - top: 0.5em; - bottom: 0.5em; - left: 0; - text-align: left; - clip: rect(-100px 2em 9999px 0); - clip: rect(-100px 5ch 9999px 0); - overflow: hidden; - padding: 1px 0; - padding-left: 12px; - background: #282c34; -} -article a { - -webkit-transition: all 0.35s ease-in; - transition: all 0.35s ease-in; - color: #ff4e6a; - text-decoration: none; - position: relative; - word-wrap: break-word; -} -article a:hover, -article a:focus { - color: #ff4e6a; -} -article a::after { - -webkit-transition: width 0.35s; - transition: width 0.35s; - content: ""; - right: 0; - width: 0; - bottom: -2px; - position: absolute; - border-bottom: 1px solid; -} -article a:hover::after { - left: 0; - width: 100%; -} -/* article a:hover { - text-decoration: underline; -}*/ -article p { - margin: 25px 0; - position: relative; -} -article p::after { - content: ""; - clear: both; - display: block; -} -article del { - color: #999; - font-size: 0.9em; -} -article table.nexmoe-album { - margin: -5px; - max-width: calc(100% + 10px); -} -article table.nexmoe-album + .nexmoe-album { - margin-top: 5px; -} -article table.nexmoe-album, -article table.nexmoe-album thead, -article table.nexmoe-album th, -article table.nexmoe-album td { - border: none; - box-shadow: none; -} -article table.nexmoe-album * { - background-color: transparent !important; -} -article table.nexmoe-album th, -article table.nexmoe-album td { - padding: 5px; - height: 300px; -} -article table.nexmoe-album th a::after, -article table.nexmoe-album td a::after { - display: none; -} -@media screen and (max-width: 1024px) { - article table.nexmoe-album th, - article table.nexmoe-album td { - height: 100px; - } -} -article table.nexmoe-album img { - width: 100%; - height: 100%; - object-fit: cover; -} -article img { - display: block; - border-radius: 6px; -} -article img.lazyload, -article img.lazyloading { - opacity: 0; - transition: opacity 400ms ease-in; -} -article img.lazyloaded { - opacity: 1; -} -article h1, -article h2, -article h3, -article h4, -article h5, -article h6 { - color: #111; - margin: 25px 0; -} -article h4, -article h5, -article h6 { - position: relative; -} -article h4:before, -article h5:before, -article h6:before { - display: inline-block; - width: 1em; - content: '#'; - color: #ff4e6a; -} -article h1 { - font-size: 2.5em; -} -article h2 { - font-size: 1.7em; - position: relative; - padding-bottom: 10px; -} -article h2:before { - content: ""; - width: 100%; - padding: 0px 25px; - border-bottom: 1px solid #eee; - position: absolute; - bottom: -1px; - left: -25px; - box-sizing: unset; -} -article h2:after { - transition: all 0.35s ease-in; - content: ""; - position: absolute; - background: #ff4e6a; - width: 1em; - height: 5px; - bottom: -3px; - left: 0; - border-radius: 6px; - box-shadow: 0 2px 12px rgba(255,78,106,0.85); -} -article h2:hover:after { - width: 2em; -} -article h3 { - font-size: 1.3em; -} -article h4 { - font-size: 1.15em; -} -article h5 { - font-size: 1em; -} -article h6 { - font-size: 0.9em; -} -article blockquote { - color: #666; - margin: 25px 0; - padding: 0.1em 2.2em; - background-color: #f8f8f8; - line-height: 28px; - position: relative; - border-radius: 6px; - border: 1px solid #eee; - font-family: sf pro sc, sf pro display, sf pro icons, aos icons, pingfang sc, helvetica neue, helvetica, arial, sans-serif; -} -article blockquote:before { - content: "\201C"; - top: 15px; - left: 10px; - position: absolute; - color: #888; - font-size: 3em; -} -article blockquote:after { - content: "\201D"; - bottom: -8px; - right: 10px; - position: absolute; - color: #888; - font-size: 3em; -} -article hr { - display: block; - border: 0; - border-top: 1px dashed #ccc; - margin: 25px 0; - padding: 0; -} -article sub, -article sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -article sup { - top: -0.5em; -} -article sub { - bottom: -0.25em; -} -article ul { - padding: 0 0 0 2em; - margin-top: 0; -} -article ul .mdui-checkbox { - padding-left: 22px; - height: 18px; -} -article ul .mdui-checkbox-icon { - top: 4px; -} -article ol { - padding: 0 0 0 2.5em; - margin-top: 0; -} -article > ol { - list-style-type: none; - counter-reset: item; -} -article > ol > li { - position: relative; -} -article > ol > li::before { - content: counter(item); - counter-increment: item; - position: absolute; - top: 0; - left: -2.5em; - height: 1.5rem; - width: 1.5rem; - text-align: center; - border-radius: 100%; - background-color: rgba(255,78,106,0.1); - color: #ff4e6a; -} -article li { - line-height: 24px; -} -article li p { - margin: 0 !important; -} -article dd { - margin: 0 0 0 2em; -} -article table { - color: #5b6064; - border-spacing: 0; - text-align: center; - border-collapse: collapse; - -webkit-box-shadow: 0 0 0 1px #eee; - box-shadow: 0 0 0 1px #eee; - display: inline-block; - max-width: 100%; - white-space: nowrap; - margin: auto; - border-radius: 6px; -} -article table::-webkit-scrollbar { - width: 6px; - height: 6px; -} -article table::-webkit-scrollbar-thumb { - background-color: #888; -} -article table thead { - border-bottom: 1px solid #eee; - background-color: #f8f8f8; -} -article table thead tr { - background-color: #f8f8f8; -} -article table th { - border-right: 1px solid #eee; - padding: 13px 26px; - font-weight: 400; -} -article table td { - border-right: 1px solid #eee; - padding: 13px 26px; -} -article table th:last-child, -article table td:last-child { - border: none; -} -article table tr { - background-color: #fff; -} -article table tr:nth-child(2n) { - background-color: #f8f8f8; -} -article img, -article canvas, -article iframe, -article video, -article svg, -article select, -article textarea { - width: auto; - max-width: 100%; -} -details ul { - padding-left: 1.7em; -} -summary { - cursor: pointer; -} -summary i { - margin-right: 0.3em; - width: 24px; -} -summary .remove { - display: none; -} -details[open] > summary .add { - display: none; -} -details[open] > summary .remove { - display: inline-block; -} -.aplayer { - -webkit-box-shadow: 0 0 0 1px #eee !important; - box-shadow: 0 0 0 1px #eee !important; - border-radius: 6px !important; - margin: 25px 0 !important; -} -.aplayer .aplayer-info { - padding: 9px 7px 0 10px !important; -} -.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap { - margin-left: 1px !important; - padding-right: 3px; -} -.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar, -.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded, -.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played { - height: 6px !important; - border-radius: 6px !important; -} -.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb { - height: 12px !important; - width: 12px !important; - right: 3px !important; - -webkit-box-shadow: 0 0 5px 0 rgba(0,0,0,0.18) !important; - box-shadow: 0 0 5px 0 rgba(0,0,0,0.18) !important; - -webkit-transition: all 0.35s ease-in; - transition: all 0.35s ease-in; -} -.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar, -.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume { - border-radius: 6px; - width: 6px; -} -.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar { - right: 10.5px; -} -.aplayer .aplayer-list ol li { - border-top: none !important; -} -.aplayer .aplayer-list ol li.aplayer-list-light { - background: #f8f8f8 !important; -} -article .mdui-btn { - background-color: #ff4e6a; - color: #fff; - border-radius: 6px; -} -article .mdui-btn:focus, -article .mdui-btn:hover { - background-color: #ff4e6a; - color: #fff; -} -font.douyin { - text-shadow: -2px 0 rgba(0,255,255,0.5), 2px 0 rgba(255,0,0,0.5); - animation: shake-it 0.5s reverse infinite cubic-bezier(0.68, -0.55, 0.27, 1.55); -} -.nexmoe-post-right { - margin: 0px -25px; - text-align: right; -} -.nexmoe-valign { - display: -webkit-box !important; - display: -webkit-flex !important; - display: -ms-flexbox !important; - display: flex !important; - -webkit-box-align: center !important; - -webkit-align-items: center !important; - -ms-flex-align: center !important; - align-items: center !important; - height: 100%; -} -.nexmoe-post-right .nexmoe-fixed { - position: fixed; - z-index: 1000; - height: 100vh; - display: inline-block; - top: 0; -} -@media screen and (max-width: 1024px) { - .nexmoe-post-right { - margin: 25px 0px; - text-align: left; - } - .nexmoe-post-right .nexmoe-fixed { - position: relative; - height: auto; - border: 1px solid #eee; - border-radius: 15px; - } -} -.nexmoe-post-right .nexmoe-toc { - margin-left: 16px; - width: 240px; - text-align: left; -} -.nexmoe-post-right .nexmoe-toc a { - color: rgba(0,0,0,0.6); -} -.nexmoe-post-right .nexmoe-toc ol { - padding-left: 1em; -} -.nexmoe-post-right .nexmoe-toc li { - margin: 1em 0; -} -.nexmoe-post-right .nexmoe-toc > ol { - padding-left: 0; -} -.nexmoe-toc * { - list-style: none; -} -photos img { - width: 25%; -} -.nexmoe-rainbow a:nth-child(7n+1) { - background-color: rgba(255,78,106,0.15); - color: #ff4e6a; -} -.nexmoe-rainbow a:nth-child(7n+2) { - background-color: rgba(255,118,30,0.15); - color: #ff761e; -} -.nexmoe-rainbow a:nth-child(7n+3) { - background-color: rgba(255,185,0,0.15); - color: #ffb900; -} -.nexmoe-rainbow a:nth-child(7n+4) { - background-color: rgba(51,213,122,0.15); - color: #33d57a; -} -.nexmoe-rainbow a:nth-child(7n+5) { - background-color: rgba(0,219,255,0.15); - color: #00dbff; -} -.nexmoe-rainbow a:nth-child(7n+6) { - background-color: rgba(26,152,255,0.15); - color: #1a98ff; -} -.nexmoe-rainbow a:nth-child(7n+7) { - background-color: rgba(144,144,255,0.15); - color: #9090ff; -} -.nexmoe-archives .tagcloud { - margin-bottom: 13px; - font-size: 0; -} -.nexmoe-archives .categories { - margin-bottom: 12px; - font-size: 0; -} -.nexmoe-archives .tagcloud a { - border-radius: 15px; - padding: 6px 12px; - font-size: 15px !important; - display: inline-block; - margin-bottom: 7px; - margin-right: 7px; -} -.nexmoe-archives .tagcloud a:before { - content: "# "; -} -.nexmoe-archives .tagcloud a span:before { - content: " "; -} -.nexmoe-archives .categories a { - border-radius: 12px; - padding: 12px; - font-size: 16px; - display: inline-block; - margin-bottom: 8px; - margin-right: 8px; - width: calc(20% - 6.4px); -} -.nexmoe-archives .categories a:nth-child(5n+5) { - margin-right: 0; -} -.nexmoe-archives .categories a span { - pointer-events: none; -} -@media screen and (max-width: 768px) { - .nexmoe-archives .categories a { - width: calc(50% - 4px); - } - .nexmoe-archives .categories a:nth-child(2n+2) { - margin-right: 0; - } - .nexmoe-archives .categories a:nth-child(5n+5) { - margin-right: 8px; - } -} -.nexmoe-archives .categories a span { - margin-top: 5px; - display: block; -} -.nexmoe-archives .categories a span:after { - content: " Articles"; -} -.nexmoe-archives article > *:first-child { - margin-top: 0; -} -.nexmoe-archives article > *:last-child { - margin-bottom: 0; -} -.nexmoe-archives ul { - list-style: none; - padding-left: 0 !important; -} -.nexmoe-archives li { - position: relative; - padding: 10px 0; - padding-left: 25px; -} -.nexmoe-archives li:last-child:after { - display: none; -} -.nexmoe-archives ul span { - margin-right: 15px; -} -@-moz-keyframes shake-it { - 0% { - text-shadow: 0 0 rgba(0,255,255,0.5), 0 0 rgba(255,0,0,0.5); - } - 25% { - text-shadow: -1px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 50% { - text-shadow: -3px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 100% { - text-shadow: 1px 0 rgba(0,255,255,0.5), 3px 0 rgba(255,0,0,0.5); - } -} -@-webkit-keyframes shake-it { - 0% { - text-shadow: 0 0 rgba(0,255,255,0.5), 0 0 rgba(255,0,0,0.5); - } - 25% { - text-shadow: -1px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 50% { - text-shadow: -3px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 100% { - text-shadow: 1px 0 rgba(0,255,255,0.5), 3px 0 rgba(255,0,0,0.5); - } -} -@-o-keyframes shake-it { - 0% { - text-shadow: 0 0 rgba(0,255,255,0.5), 0 0 rgba(255,0,0,0.5); - } - 25% { - text-shadow: -1px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 50% { - text-shadow: -3px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 100% { - text-shadow: 1px 0 rgba(0,255,255,0.5), 3px 0 rgba(255,0,0,0.5); - } -} -@keyframes shake-it { - 0% { - text-shadow: 0 0 rgba(0,255,255,0.5), 0 0 rgba(255,0,0,0.5); - } - 25% { - text-shadow: -1px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 50% { - text-shadow: -3px 0 rgba(0,255,255,0.5), 1px 0 rgba(255,0,0,0.5); - } - 100% { - text-shadow: 1px 0 rgba(0,255,255,0.5), 3px 0 rgba(255,0,0,0.5); - } -} diff --git a/css/zoom.css b/css/zoom.css deleted file mode 100644 index 727e3f2..0000000 --- a/css/zoom.css +++ /dev/null @@ -1,50 +0,0 @@ -img[data-action="zoom"] { - cursor: pointer; - cursor: -webkit-zoom-in; - cursor: -moz-zoom-in; -} -.zoom-img, -.zoom-img-wrap { - position: relative; - z-index: 5999; - -webkit-transition: all 300ms; - -o-transition: all 300ms; - transition: all 300ms; -} -img.zoom-img { - cursor: pointer; - cursor: -webkit-zoom-out; - cursor: -moz-zoom-out; - -webkit-transition: all 300ms; - -o-transition: all 300ms; - transition: all 300ms; -} -.zoom-overlay { - z-index: 5998; - background: #fff8; - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - pointer-events: none; - filter: "alpha(opacity=0)"; - opacity: 0; - -webkit-transition: opacity 300ms; - -o-transition: opacity 300ms; - transition: opacity 300ms; - backdrop-filter: saturate(180%) blur(20px); - -webkit-backdrop-filter: saturate(180%) blur(20px); -} -.zoom-overlay-open .zoom-overlay { - filter: "alpha(opacity=100)"; - opacity: 1; -} -.zoom-overlay-open, -.zoom-overlay-transitioning { - cursor: default; -} - -body.zoom-overlay-open #body,body.zoom-overlay-transitioning #body,body.zoom-overlay-open .table-responsive{ - overflow:scroll -} diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index e8a73d7..0000000 Binary files a/favicon.ico and /dev/null differ diff --git a/fonts-in-vscode/index.html b/fonts-in-vscode/index.html deleted file mode 100644 index 1b12633..0000000 --- a/fonts-in-vscode/index.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - 为编程而生的字体 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 为编程而生的字体 -

为编程而生的字体

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

-

1月16号,JetBrains推出了一种优化代码观感的字体:JetBrains Mono

-

看到这个消息第一反应很正常,近些年文字辨识度代替了美观程度成了新的潮流,苹果为了在Apple Watch的小屏幕上有更好的体验,重新设计了中文字体“苹方”,还有谷歌的思源黑体和小米的小米兰亭等等

-

所以在体验这款字体之前,我思维定势般的以为这个字体只有代码可读性上的优化…

- - -
-

在当今的大部分时间里,我们作为开发人员都在看代码。我们一直在寻找最佳字体,以使我们更容易在屏幕上查看文本。但是,许多流行字体中的逻辑并不总是考虑到通读代码和阅读书本之间的区别。我们的眼睛以非常不同的方式沿代码移动,通常必须垂直移动和水平移动,这与阅读书籍不同,因为它们总是沿同一方向沿文本滑动。

-

因此,在使用JetBrains Mono进行开发时,除其他外,重点研究了在长时间使用代码期间可能导致眼睛疲劳的问题。我们考虑了字母的大小和形状等问题;它们之间的空间量,自然以等宽字体设计的平衡;一些看起来不必要的细节和符号之间不清楚的区别,例如I和l;还要和开发字体时的编程连字。
来源:it之家 | JetBrains推出编程字体Mono:更适合程序开发人员

-
-

开始以为只是优化了阅读体验,但是打开官网往下翻之后,才知道这个字体有多厉害

-

一个特殊的效果

作为一个编程字体,不仅优化了代码的辨识度,还有一个很牛逼的特性:可以把一些符号转换成更容易辨识的样子
屏幕快照 2020-01-22 上午1.25.51.png
屏幕快照 2020-01-22 上午1.25.43.png

-

vscode中的效果

vscode中需要在setting.json中配置字体连字以实现上面的效果

-
{
-  "editor.fontLigatures": true, //字体连字
-  "editor.fontSize": 12, //设置字体大小
-  "editor.fontWeight": "normal", //字体粗细
-  "window.zoomLevel": 1, //字体粗细,可选normal,bold,"100"~"900"
-  "terminal.integrated.fontFamily": "Fira Mono for Powerline", //终端字体
-  "editor.fontFamily": "JetBrains Mono" 
-}
-
-

这款字体只有英文,所以中文需要搭配其他字体

-

JetBrains Mono + 苹方

1.1
1.2

-

默认字体对照组 Menlo

2.1
2.2

-

JetBrains Mono + sleek

3.1
3.2

-

字体本身来说刚改完有点不习惯,之后越看越舒服

-

之后我发现原来在此之前,微软也有一款为编程优化的字体cascadia code

-

sleek

最后推荐这个一直很喜欢的sleek字体,贴吧上找到了miui的mtz格式文件,下载之后把后缀改成zip解压即可

-

guide

-

show

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/hello-world/index.html b/hello-world/index.html deleted file mode 100644 index caae272..0000000 --- a/hello-world/index.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - Hello World - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- Hello World -

Hello World

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

-

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

- - -

Quick Start

Create a new post

$ hexo new "My New Post"
-
-

More info: Writing

-

Run server

$ hexo server
-
-

More info: Server

-

Generate static files

$ hexo generate
-
-

More info: Generating

-

Deploy to remote sites

$ hexo deploy
-
-

More info: Deployment

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/avatar.png b/images/avatar.png deleted file mode 100644 index b1a4987..0000000 Binary files a/images/avatar.png and /dev/null differ diff --git a/images/cover.jpg b/images/cover.jpg deleted file mode 100644 index 74119e2..0000000 Binary files a/images/cover.jpg and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 1d6e9da..0000000 --- a/index.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- - -
- 毕业设计管理系统概念设计 -

毕业设计管理系统概念设计

-
- -
- - - - - -
- -

因为Windows Vista惊艳的效果,导致最喜欢圆角+轻拟物+磨砂玻璃的设计。processing

- -
-
- -
- - -
- Ergonomic keyboards - Dactyl-ManuForm -

Ergonomic keyboards - Dactyl-ManuForm

-
- -
- - - - - -
- -

God said,” Let there be light,” and there was light.

- -
-
- -
- - -
- 配置frp内网穿透 -

配置frp内网穿透

-
- -
- - - - - -
- -

通过frp stcp实现windows远程连接

- -
-
- -
- - -
- 体验·拟物设计的巅峰 -

体验·拟物设计的巅峰

-
- -
- - - - - -
- -

⚠️超多图片预警,内容包括

-
    -
  1. PD安装旧版Mac
  2. -
  3. 体验拟物化设计
  4. -
- -
-
- -
- - -
- 驱动DW1820a网卡 | 成功airdrop, Handoff -

驱动DW1820a网卡 | 成功airdrop, Handoff

-
- -
- - - - - -
- -

电脑原装的rtl8821ce不支持Hackintosh,购入Trackpad之后想着不能一直插着线用,需要一个可以驱动的网卡

- -
-
- -
- - -
- 记一次购买 Trackpad 2 的体验 -

记一次购买 Trackpad 2 的体验

-
- -
- - - - - -
- -

京东自营Trackpad2发了880-100的卷,蹲了很久直接购入

- -
-
- -
- - -
- 更换系统硬盘-记录-复盘 -

更换系统硬盘-记录-复盘

-
- -
- - - - - -
- -

电脑用了一年系统分区饱爆满,换2T m2,但因为电脑只有一个m2插槽,所以需要一些奇怪的操作,之后免不了奇怪的问题。这里记录一下踩过的坑

- -
-
- -
- - -
- Minecraft服务器 -

Minecraft服务器

-
- -
- - - - - -
- -

MCNES可以分开理解,MC代表Minecraft;NES代表最初的乐趣。这是一个送给老朋友的礼物🎁

- -
-
- -
- - -
- 魔改主题:nexmoe质感设计 -

魔改主题:nexmoe质感设计

-
- -
- - - - - -
- -

首先,感谢大佬开发出本主题,代码思路清晰、格式优雅

-

初试Hexo,挑选主题的时候在众多主题中一眼看中它,发现开发者特别眼熟… - -

-
- -
- - -
- 使用AppleALC自制声卡驱动 -

使用AppleALC自制声卡驱动

-
- -
- - - - - -
- -

Mac下进入网课直播间软件和系统组件卡死,经排查发现问题在万能声卡驱动VoodooHDA,开始研究通过AppleALC原生注入声卡驱动

- -
-
- -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/install-Hexo/index.html b/install-Hexo/index.html deleted file mode 100644 index 79fb738..0000000 --- a/install-Hexo/index.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - - 安装Hexo小记 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 安装Hexo小记 -

安装Hexo小记

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

-

Hexo: A fast, simple & powerful blog framework (官网介绍)

-

维护服务器是一件很麻烦的事情,有没有一种办法可以长期存在并且不用维护呢,Github page + Hexo是一个方案

- - -

流程

Github page _ Hexo1.png

-

准备工作

安装Hexo前,电脑需要以下环境

-
    -
  • Node.js (Node.js 版本需不低于 8.10,建议使用 Node.js 10.0 及以上版本)
  • -
  • Git
  • -
-

mac系统可以用homebrew安装

-

安装到本地(Mac)

$ npm install hexo-cli -g
-
-

1

-

在电脑中选好一个存放博客的路径 然后

-
$ hexo init blog #‘blog’可以自定义
-$ cd blog
-
-

显示Start blogging with Hexo!则安装成功

-

2

-

启动本地服务器

-
$ hexo s
-
-

如果出现

-
-

INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

-
-

则代表正常启动,它就是属于你的博客,接下来就要修改内容了

-

3

-

如果端口被占用有几种办法

-
方法1 (Mac)
-lsof -i tcp:4000 #查看端口4000被谁占用
-kill <PID> #杀死对应进程PID
-
-方法2
-hexo server -p <port> #在其他端口运行
-
-方法3
-reboot #重启你的电脑
-
-

配置博客

按照自己的需求更改../blog/_config.yml中内容,以下是我的配置,主要内容已注释

-
# Hexo Configuration
-## Docs: https://hexo.io/docs/configuration.html
-## Source: https://github.com/hexojs/hexo/
-
-# Site
-title: feios time #网站标题
-subtitle: '' #网站副标题
-description: 'feios time' #网站描述
-keywords: feios,blog #网站的关键词。使用半角逗号 , 分隔多个关键词。
-author: feios #您的名字
-language: zh-CN #网站使用的语言
-timezone: 'Asia/Shanghai' #时区
-
-# URL
-## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
-url: http://www.feios.me
-root: /
-permalink: :title/ #默认 :year/:month/:day/:title/
-permalink_defaults:
-pretty_urls:
-  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
-  trailing_html: true # Set to false to remove trailing '.html' from permalinks
-
-

按照上面的配置修改完之后变成这样,已经有你的样子了。但是不是觉得还少了点什么呢?

-

4

-

没错,还缺一个自己喜欢的主题

-

配置主题

以下是我找主题的几个地方
Hexo | Themes
CSDN | Hexo 好看的主题推荐
知乎 | 有哪些好看的 Hexo 主题?

-

接下来以我选择的Nexmoe主题为例,按照文档执行以下操作

-
cd themes # 载入主题目录
-git clone https://github.com/nexmoe/hexo-theme-nexmoe.git nexmoe # 安装
-cd nexmoe # 进入 Nexmoe 主题目录
-npm i --save hexo-wordcount
-# Node 版本 7.6.0 之前,请安装 2.x 版本 (Node.js v7.6.0 and previous) 
-# npm install hexo-wordcount@2 --save
-cp -i _config.example.yml _config.yml
-
-

参考文档:Nexmoe Github | Nexmoe Docs

-

5

-

在站点配置文件_config.yml中修改主题为我们刚安装好的主题nexmoe

-
# Extensions
-## Plugins: https://hexo.io/plugins/
-## Themes: https://hexo.io/themes/
-theme: nexmoe
-
-

因为这主题内置代码高亮,为了避免冲突需要禁用_config.yml中的highlight

-
highlight:
-  enable: false 
-
-

重启Hexo服务

-

6

-

Github page

1.注册Github

2.新建repository

界面右上角+号
7

-

如果想通过(你的用户名).github.io访问你的博客,按照以下方式设置
8

-

3.启用Github page

repository - Settings 选择master分支

-

9

-

4.绑定域名(可选)

CNAME usename.github.io 主机记录随意,其他默认

-

10

-

注意:如果自定义域名,需要在博客source目录下新建一个CNAME在里面写上你绑定的域名,不然后续更新之后域名要重新绑定

-

[2020.01.12 12:57] 本文编辑到这里此博客还没有进行下面的操作,现在我clone到Github之后在编辑余下的内容

-
-

[2020.01.12 14:55] 经过多种方法尝试之后成功了

-

5.clone到Github

Hexo官网教程
因为现在github只能把页面部署在master分支,所以官网通过机器人通过clone到master的文件部署到gh-page的方法已经不能用了

-

现在的办法是连接Hexo和git,分两部分:Hexo的设置和通过git连接到github,这时候git的作用就体现出来了。

-

在站点配置文件_config.yml底部找到并修改

-
# Deployment
-## Docs: https://hexo.io/docs/deployment.html
-deploy:
-  type: git
-  repo: git@github.com:feiosme/feiosme.github.io.git
-  branch: master
-
-

repo这一栏可以到github repository页面clone or download中找到
注意:这个弹窗默认是HTTPS链接,点击右上角use SSH(图中因为已经是SSH界面,所以右上角是use HTTPS)

-

11

-

在终端blog目录中运行如下命令,安装连接插件

-
$ npm install hexo-deployer-git --save
-
-

到这一步Hexo这边设置好了
开始设置git连接到Github的部分

-

如果是第一次用git,需要先设置用户名和邮箱,和github账号一致

-
$ git config --global user.name "githubusename"
-$ git config --global user.email githubusename@example.com
-
-

使用ssh-keygen生成私钥和公钥

-
$ ssh-keygen -t rsa
-
-

如果不知道什么意思,一路回车就可以了

-

12

-

我们得到一个id_rsa.pub
Github 头像菜单下 Setting - SSH and GPG keys - New SSH Key 中把id_rsa.pub中的内容复制过去

-

13

-

测试是否成功添加ssh

-
$ ssh -T git@github.com
-
-

连接成功是这个样子的

-

14

-

我们打通了git到GitHub的通道,在前面设置Hexo的步骤中又告诉了Hexo你希望把它部署到Github的哪个repository
相当于说明了小区和门牌号,现在可以指哪打哪了

-

发布第一篇文章

$ hexo new [layout] <title>
-例如
-$ hexo new 安装Hexo小记 #如果忽略[layout]会设置成post
-
-

使用makedown编辑好文章之后

-
$ hexo d -g
-
-

以下是我更新这篇文章的截图

-

15

-

好了,教程到此结束

-
-

链接

本文参考的文档&教程

来自还没关掉的标签页
Github | 一个比较特别的 Hexo 主题
Nexmoe 主题文档
Hexo | 文档
cnbolgs | hexo从零开始到搭建完整
简书 | GitHub+Hexo搭建个人博客(三)Hexo个性化配置进阶
csdn | hexo下使用markdown语法绘制流程图
csdn | hexo史上最全搭建教程
cnblogs | MarkDown和流程图诠释你的代码
segmentfault | hexo-admin后台管理博客
简书 | 使用Github搭建属于自己的博客
cnblogs | 在github上搭建个人博客并在线更新
简书 | 使用hexo搭建github博客
Github | 关于自定义域名和 GitHub 页面
csdn | Sourcetree无法推送-已解决

-

增强插件

hexo-tag-aplayer:音频播放器
hexo-tag-dplayer:视频播放器
hexo-filter-flowchart:显示流程图

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/js/app.js b/js/app.js deleted file mode 100644 index b34a0d5..0000000 --- a/js/app.js +++ /dev/null @@ -1,43 +0,0 @@ -const getRealPath = (pathname, desc = false) => { - if (!pathname) { - pathname = window.location.pathname; - } - let names = pathname.split("/"); - if (desc === false) { - for (let i = names.length - 1; i >= 0; --i) { - let name = names[i].trim(); - if (name.length > 0 && name !== "/" && name !== "index.html") { - return name; - } - } - } else { - for (let i = 0; i < names.length; ++i) { - let name = names[i].trim(); - if (name.length > 0 && name !== "/" && name !== "index.html") { - return name; - } - } - } - return "/"; -}; -let links = document.querySelectorAll(".nexmoe-list-item"); -let rootRealPath = getRealPath(window.location.pathname, true); -for (let link of links) { - let linkPath = link.getAttribute("href"); - if (linkPath && getRealPath(linkPath, true) === rootRealPath) { - link.className = "active nexmoe-list-item mdui-list-item mdui-ripple"; - } -} - -var $ = mdui.JQ; -$("table") - .has("img") - .addClass("nexmoe-album"); - -$("#nexmoe-sidebar a").addClass("mdui-ripple"); -mdui.mutation(); - -function search() { - window.open($("#search_form").attr("action_e") + " " + $("#search_value").val()); - return false; -} \ No newline at end of file diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js deleted file mode 100644 index eb0a8b4..0000000 --- a/js/bootstrap.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Bootstrap v3.4.1 (https://getbootstrap.com/) - * Copyright 2011-2019 Twitter, Inc. - * Licensed under the MIT license - */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(idocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-dc.width?"left":"left"==s&&l.left-ha.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(n[t+1]===undefined||e .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n= ($(window).width() - Zoom.OFFSET)) return - - this._activeZoomClose(true) - - this._activeZoom = new Zoom(target) - this._activeZoom.zoomImage() - - // todo(fat): probably worth throttling this - this._$window.on('scroll.zoom', $.proxy(this._scrollHandler, this)) - - this._$document.on('keyup.zoom', $.proxy(this._keyHandler, this)) - this._$document.on('touchstart.zoom', $.proxy(this._touchStart, this)) - - // we use a capturing phase here to prevent unintended js events - // sadly no useCapture in jquery api (http://bugs.jquery.com/ticket/14953) - if (document.addEventListener) { - document.addEventListener('click', this._boundClick, true) - } else { - document.attachEvent('onclick', this._boundClick, true) - } - - if ('bubbles' in e) { - if (e.bubbles) e.stopPropagation() - } else { - // Internet Explorer before version 9 - e.cancelBubble = true - } - } - - ZoomService.prototype._activeZoomClose = function (forceDispose) { - if (!this._activeZoom) return - - if (forceDispose) { - this._activeZoom.dispose() - } else { - this._activeZoom.close() - } - - this._$window.off('.zoom') - this._$document.off('.zoom') - - document.removeEventListener('click', this._boundClick, true) - - this._activeZoom = null - } - - ZoomService.prototype._scrollHandler = function (e) { - if (this._initialScrollPosition === null) this._initialScrollPosition = $(window).scrollTop() - var deltaY = this._initialScrollPosition - $(window).scrollTop() - if (Math.abs(deltaY) >= 40) this._activeZoomClose() - } - - ZoomService.prototype._keyHandler = function (e) { - if (e.keyCode == 27) this._activeZoomClose() - } - - ZoomService.prototype._clickHandler = function (e) { - if (e.preventDefault) e.preventDefault() - else event.returnValue = false - - if ('bubbles' in e) { - if (e.bubbles) e.stopPropagation() - } else { - // Internet Explorer before version 9 - e.cancelBubble = true - } - - this._activeZoomClose() - } - - ZoomService.prototype._touchStart = function (e) { - this._initialTouchPosition = e.touches[0].pageY - $(e.target).on('touchmove.zoom', $.proxy(this._touchMove, this)) - } - - ZoomService.prototype._touchMove = function (e) { - if (Math.abs(e.touches[0].pageY - this._initialTouchPosition) > 10) { - this._activeZoomClose() - $(e.target).off('touchmove.zoom') - } - } - - - /** - * The zoom object - */ - function Zoom (img) { - this._fullHeight = - this._fullWidth = - this._overlay = - this._targetImageWrap = null - - this._targetImage = img - - this._$body = $(document.body) - } - - Zoom.OFFSET = 80 - Zoom._MAX_WIDTH = 2560 - Zoom._MAX_HEIGHT = 4096 - - Zoom.prototype.zoomImage = function () { - var img = document.createElement('img') - img.onload = $.proxy(function () { - this._fullHeight = Number(img.height) - this._fullWidth = Number(img.width) - this._zoomOriginal() - }, this) - img.src = this._targetImage.src - } - - Zoom.prototype._zoomOriginal = function () { - this._targetImageWrap = document.createElement('div') - this._targetImageWrap.className = 'zoom-img-wrap' - - this._targetImage.parentNode.insertBefore(this._targetImageWrap, this._targetImage) - this._targetImageWrap.appendChild(this._targetImage) - - $(this._targetImage) - .addClass('zoom-img') - .attr('data-action', 'zoom-out') - - this._overlay = document.createElement('div') - this._overlay.className = 'zoom-overlay' - - document.body.appendChild(this._overlay) - - this._calculateZoom() - this._triggerAnimation() - } - - Zoom.prototype._calculateZoom = function () { - this._targetImage.offsetWidth // repaint before animating - - var originalFullImageWidth = this._fullWidth - var originalFullImageHeight = this._fullHeight - - var scrollTop = $(window).scrollTop() - - var maxScaleFactor = originalFullImageWidth / this._targetImage.width - - var viewportHeight = ($(window).height() - Zoom.OFFSET) - var viewportWidth = ($(window).width() - Zoom.OFFSET) - - var imageAspectRatio = originalFullImageWidth / originalFullImageHeight - var viewportAspectRatio = viewportWidth / viewportHeight - - if (originalFullImageWidth < viewportWidth && originalFullImageHeight < viewportHeight) { - this._imgScaleFactor = maxScaleFactor - - } else if (imageAspectRatio < viewportAspectRatio) { - this._imgScaleFactor = (viewportHeight / originalFullImageHeight) * maxScaleFactor - - } else { - this._imgScaleFactor = (viewportWidth / originalFullImageWidth) * maxScaleFactor - } - } - - Zoom.prototype._triggerAnimation = function () { - this._targetImage.offsetWidth // repaint before animating - - var imageOffset = $(this._targetImage).offset() - var scrollTop = $(window).scrollTop() - - var viewportY = scrollTop + ($(window).height() / 2) - var viewportX = ($(window).width() / 2) - - var imageCenterY = imageOffset.top + (this._targetImage.height / 2) - var imageCenterX = imageOffset.left + (this._targetImage.width / 2) - - this._translateY = viewportY - imageCenterY - this._translateX = viewportX - imageCenterX - - var targetTransform = 'scale(' + this._imgScaleFactor + ')' - var imageWrapTransform = 'translate(' + this._translateX + 'px, ' + this._translateY + 'px)' - - if ($.support.transition) { - imageWrapTransform += ' translateZ(0)' - } - - $(this._targetImage) - .css({ - '-webkit-transform': targetTransform, - '-ms-transform': targetTransform, - 'transform': targetTransform - }) - - $(this._targetImageWrap) - .css({ - '-webkit-transform': imageWrapTransform, - '-ms-transform': imageWrapTransform, - 'transform': imageWrapTransform - }) - - this._$body.addClass('zoom-overlay-open') - } - - Zoom.prototype.close = function () { - this._$body - .removeClass('zoom-overlay-open') - .addClass('zoom-overlay-transitioning') - - // we use setStyle here so that the correct vender prefix for transform is used - $(this._targetImage) - .css({ - '-webkit-transform': '', - '-ms-transform': '', - 'transform': '' - }) - - $(this._targetImageWrap) - .css({ - '-webkit-transform': '', - '-ms-transform': '', - 'transform': '' - }) - - if (!$.support.transition) { - return this.dispose() - } - - $(this._targetImage) - .one($.support.transition.end, $.proxy(this.dispose, this)) - .emulateTransitionEnd(300) - } - - Zoom.prototype.dispose = function () { - if (this._targetImageWrap && this._targetImageWrap.parentNode) { - $(this._targetImage) - .removeClass('zoom-img') - .attr('data-action', 'zoom') - - this._targetImageWrap.parentNode.replaceChild(this._targetImage, this._targetImageWrap) - this._overlay.parentNode.removeChild(this._overlay) - - this._$body.removeClass('zoom-overlay-transitioning') - } - } - - // wait for dom ready (incase script included before body) - $(function () { - new ZoomService().listen() - }) - -}(jQuery) diff --git a/js/zoom.min.js b/js/zoom.min.js deleted file mode 100644 index f012801..0000000 --- a/js/zoom.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * zoom.js - It's the best way to zoom an image - * @version v0.0.2 - * @link https://github.com/fat/zoom.js - * @license MIT - */ - -+function(t){function o(){this._activeZoom=this._initialScrollPosition=this._initialTouchPosition=this._touchMoveListener=null,this._$document=t(document),this._$window=t(window),this._$body=t(document.body),this._boundClick=t.proxy(this._clickHandler,this)}function i(o){this._fullHeight=this._fullWidth=this._overlay=this._targetImageWrap=null,this._targetImage=o,this._$body=t(document.body)}o.prototype.listen=function(){this._$body.on("click",'[data-action="zoom"]',t.proxy(this._zoom,this))},o.prototype._zoom=function(o){var e=o.target;if(e&&"IMG"==e.tagName&&!this._$body.hasClass("zoom-overlay-open"))return o.metaKey||o.ctrlKey?window.open(o.target.getAttribute("data-original")||o.target.src,"_blank"):void(e.width>=t(window).width()-i.OFFSET||(this._activeZoomClose(!0),this._activeZoom=new i(e),this._activeZoom.zoomImage(),this._$window.on("scroll.zoom",t.proxy(this._scrollHandler,this)),this._$document.on("keyup.zoom",t.proxy(this._keyHandler,this)),this._$document.on("touchstart.zoom",t.proxy(this._touchStart,this)),document.addEventListener?document.addEventListener("click",this._boundClick,!0):document.attachEvent("onclick",this._boundClick,!0),"bubbles"in o?o.bubbles&&o.stopPropagation():o.cancelBubble=!0))},o.prototype._activeZoomClose=function(t){this._activeZoom&&(t?this._activeZoom.dispose():this._activeZoom.close(),this._$window.off(".zoom"),this._$document.off(".zoom"),document.removeEventListener("click",this._boundClick,!0),this._activeZoom=null)},o.prototype._scrollHandler=function(o){null===this._initialScrollPosition&&(this._initialScrollPosition=t(window).scrollTop());var i=this._initialScrollPosition-t(window).scrollTop();Math.abs(i)>=40&&this._activeZoomClose()},o.prototype._keyHandler=function(t){27==t.keyCode&&this._activeZoomClose()},o.prototype._clickHandler=function(t){t.preventDefault?t.preventDefault():event.returnValue=!1,"bubbles"in t?t.bubbles&&t.stopPropagation():t.cancelBubble=!0,this._activeZoomClose()},o.prototype._touchStart=function(o){this._initialTouchPosition=o.touches[0].pageY,t(o.target).on("touchmove.zoom",t.proxy(this._touchMove,this))},o.prototype._touchMove=function(o){Math.abs(o.touches[0].pageY-this._initialTouchPosition)>10&&(this._activeZoomClose(),t(o.target).off("touchmove.zoom"))},i.OFFSET=80,i._MAX_WIDTH=2560,i._MAX_HEIGHT=4096,i.prototype.zoomImage=function(){var o=document.createElement("img");o.onload=t.proxy(function(){this._fullHeight=Number(o.height),this._fullWidth=Number(o.width),this._zoomOriginal()},this),o.src=this._targetImage.src},i.prototype._zoomOriginal=function(){this._targetImageWrap=document.createElement("div"),this._targetImageWrap.className="zoom-img-wrap",this._targetImage.parentNode.insertBefore(this._targetImageWrap,this._targetImage),this._targetImageWrap.appendChild(this._targetImage),t(this._targetImage).addClass("zoom-img").attr("data-action","zoom-out"),this._overlay=document.createElement("div"),this._overlay.className="zoom-overlay",document.body.appendChild(this._overlay),this._calculateZoom(),this._triggerAnimation()},i.prototype._calculateZoom=function(){this._targetImage.offsetWidth;var o=this._fullWidth,e=this._fullHeight,a=(t(window).scrollTop(),o/this._targetImage.width),s=t(window).height()-i.OFFSET,r=t(window).width()-i.OFFSET,n=o/e,h=r/s;this._imgScaleFactor=r>o&&s>e?a:h>n?s/e*a:r/o*a},i.prototype._triggerAnimation=function(){this._targetImage.offsetWidth;var o=t(this._targetImage).offset(),i=t(window).scrollTop(),e=i+t(window).height()/2,a=t(window).width()/2,s=o.top+this._targetImage.height/2,r=o.left+this._targetImage.width/2;this._translateY=e-s,this._translateX=a-r;var n="scale("+this._imgScaleFactor+")",h="translate("+this._translateX+"px, "+this._translateY+"px) translateZ(0px)";t.support.transition&&(h+=" translateZ(0px)"),t(this._targetImage).css({"-webkit-transform":n,"-ms-transform":n,transform:n}),t(this._targetImageWrap).css({"-webkit-transform":h,"-ms-transform":h,transform:h}),this._$body.addClass("zoom-overlay-open")},i.prototype.close=function(){return this._$body.removeClass("zoom-overlay-open").addClass("zoom-overlay-transitioning"),t(this._targetImage).css({"-webkit-transform":"","-ms-transform":"",transform:""}),t(this._targetImageWrap).css({"-webkit-transform":"","-ms-transform":"",transform:""}),t.support.transition?void t(this._targetImage).one(t.support.transition.end,t.proxy(this.dispose,this)).emulateTransitionEnd(300):this.dispose()},i.prototype.dispose=function(){this._targetImageWrap&&this._targetImageWrap.parentNode&&(t(this._targetImage).removeClass("zoom-img").attr("data-action","zoom"),this._targetImageWrap.parentNode.replaceChild(this._targetImage,this._targetImageWrap),this._overlay.parentNode.removeChild(this._overlay),this._$body.removeClass("zoom-overlay-transitioning"))},t(function(){(new o).listen()})}(jQuery); \ No newline at end of file diff --git a/lib/iconfont/demo.css b/lib/iconfont/demo.css deleted file mode 100644 index a67054a..0000000 --- a/lib/iconfont/demo.css +++ /dev/null @@ -1,539 +0,0 @@ -/* Logo 字体 */ -@font-face { - font-family: "iconfont logo"; - src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); - src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), - url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); -} - -.logo { - font-family: "iconfont logo"; - font-size: 160px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/* tabs */ -.nav-tabs { - position: relative; -} - -.nav-tabs .nav-more { - position: absolute; - right: 0; - bottom: 0; - height: 42px; - line-height: 42px; - color: #666; -} - -#tabs { - border-bottom: 1px solid #eee; -} - -#tabs li { - cursor: pointer; - width: 100px; - height: 40px; - line-height: 40px; - text-align: center; - font-size: 16px; - border-bottom: 2px solid transparent; - position: relative; - z-index: 1; - margin-bottom: -1px; - color: #666; -} - - -#tabs .active { - border-bottom-color: #f00; - color: #222; -} - -.tab-container .content { - display: none; -} - -/* 页面布局 */ -.main { - padding: 30px 100px; - width: 960px; - margin: 0 auto; -} - -.main .logo { - color: #333; - text-align: left; - margin-bottom: 30px; - line-height: 1; - height: 110px; - margin-top: -50px; - overflow: hidden; - *zoom: 1; -} - -.main .logo a { - font-size: 160px; - color: #333; -} - -.helps { - margin-top: 40px; -} - -.helps pre { - padding: 20px; - margin: 10px 0; - border: solid 1px #e7e1cd; - background-color: #fffdef; - overflow: auto; -} - -.icon_lists { - width: 100% !important; - overflow: hidden; - *zoom: 1; -} - -.icon_lists li { - width: 100px; - margin-bottom: 10px; - margin-right: 20px; - text-align: center; - list-style: none !important; - cursor: default; -} - -.icon_lists li .code-name { - line-height: 1.2; -} - -.icon_lists .icon { - display: block; - height: 100px; - line-height: 100px; - font-size: 42px; - margin: 10px auto; - color: #333; - -webkit-transition: font-size 0.25s linear, width 0.25s linear; - -moz-transition: font-size 0.25s linear, width 0.25s linear; - transition: font-size 0.25s linear, width 0.25s linear; -} - -.icon_lists .icon:hover { - font-size: 100px; -} - -.icon_lists .svg-icon { - /* 通过设置 font-size 来改变图标大小 */ - width: 1em; - /* 图标和文字相邻时,垂直对齐 */ - vertical-align: -0.15em; - /* 通过设置 color 来改变 SVG 的颜色/fill */ - fill: currentColor; - /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示 - normalize.css 中也包含这行 */ - overflow: hidden; -} - -.icon_lists li .name, -.icon_lists li .code-name { - color: #666; -} - -/* markdown 样式 */ -.markdown { - color: #666; - font-size: 14px; - line-height: 1.8; -} - -.highlight { - line-height: 1.5; -} - -.markdown img { - vertical-align: middle; - max-width: 100%; -} - -.markdown h1 { - color: #404040; - font-weight: 500; - line-height: 40px; - margin-bottom: 24px; -} - -.markdown h2, -.markdown h3, -.markdown h4, -.markdown h5, -.markdown h6 { - color: #404040; - margin: 1.6em 0 0.6em 0; - font-weight: 500; - clear: both; -} - -.markdown h1 { - font-size: 28px; -} - -.markdown h2 { - font-size: 22px; -} - -.markdown h3 { - font-size: 16px; -} - -.markdown h4 { - font-size: 14px; -} - -.markdown h5 { - font-size: 12px; -} - -.markdown h6 { - font-size: 12px; -} - -.markdown hr { - height: 1px; - border: 0; - background: #e9e9e9; - margin: 16px 0; - clear: both; -} - -.markdown p { - margin: 1em 0; -} - -.markdown>p, -.markdown>blockquote, -.markdown>.highlight, -.markdown>ol, -.markdown>ul { - width: 80%; -} - -.markdown ul>li { - list-style: circle; -} - -.markdown>ul li, -.markdown blockquote ul>li { - margin-left: 20px; - padding-left: 4px; -} - -.markdown>ul li p, -.markdown>ol li p { - margin: 0.6em 0; -} - -.markdown ol>li { - list-style: decimal; -} - -.markdown>ol li, -.markdown blockquote ol>li { - margin-left: 20px; - padding-left: 4px; -} - -.markdown code { - margin: 0 3px; - padding: 0 5px; - background: #eee; - border-radius: 3px; -} - -.markdown strong, -.markdown b { - font-weight: 600; -} - -.markdown>table { - border-collapse: collapse; - border-spacing: 0px; - empty-cells: show; - border: 1px solid #e9e9e9; - width: 95%; - margin-bottom: 24px; -} - -.markdown>table th { - white-space: nowrap; - color: #333; - font-weight: 600; -} - -.markdown>table th, -.markdown>table td { - border: 1px solid #e9e9e9; - padding: 8px 16px; - text-align: left; -} - -.markdown>table th { - background: #F7F7F7; -} - -.markdown blockquote { - font-size: 90%; - color: #999; - border-left: 4px solid #e9e9e9; - padding-left: 0.8em; - margin: 1em 0; -} - -.markdown blockquote p { - margin: 0; -} - -.markdown .anchor { - opacity: 0; - transition: opacity 0.3s ease; - margin-left: 8px; -} - -.markdown .waiting { - color: #ccc; -} - -.markdown h1:hover .anchor, -.markdown h2:hover .anchor, -.markdown h3:hover .anchor, -.markdown h4:hover .anchor, -.markdown h5:hover .anchor, -.markdown h6:hover .anchor { - opacity: 1; - display: inline-block; -} - -.markdown>br, -.markdown>p>br { - clear: both; -} - - -.hljs { - display: block; - background: white; - padding: 0.5em; - color: #333333; - overflow-x: auto; -} - -.hljs-comment, -.hljs-meta { - color: #969896; -} - -.hljs-string, -.hljs-variable, -.hljs-template-variable, -.hljs-strong, -.hljs-emphasis, -.hljs-quote { - color: #df5000; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-type { - color: #a71d5d; -} - -.hljs-literal, -.hljs-symbol, -.hljs-bullet, -.hljs-attribute { - color: #0086b3; -} - -.hljs-section, -.hljs-name { - color: #63a35c; -} - -.hljs-tag { - color: #333333; -} - -.hljs-title, -.hljs-attr, -.hljs-selector-id, -.hljs-selector-class, -.hljs-selector-attr, -.hljs-selector-pseudo { - color: #795da3; -} - -.hljs-addition { - color: #55a532; - background-color: #eaffea; -} - -.hljs-deletion { - color: #bd2c00; - background-color: #ffecec; -} - -.hljs-link { - text-decoration: underline; -} - -/* 代码高亮 */ -/* PrismJS 1.15.0 -https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ -/** - * prism.js default theme for JavaScript, CSS and HTML - * Based on dabblet (http://dabblet.com) - * @author Lea Verou - */ -code[class*="language-"], -pre[class*="language-"] { - color: black; - background: none; - text-shadow: 0 1px white; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -pre[class*="language-"]::-moz-selection, -pre[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, -code[class*="language-"] ::-moz-selection { - text-shadow: none; - background: #b3d4fc; -} - -pre[class*="language-"]::selection, -pre[class*="language-"] ::selection, -code[class*="language-"]::selection, -code[class*="language-"] ::selection { - text-shadow: none; - background: #b3d4fc; -} - -@media print { - - code[class*="language-"], - pre[class*="language-"] { - text-shadow: none; - } -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -:not(pre)>code[class*="language-"], -pre[class*="language-"] { - background: #f5f2f0; -} - -/* Inline code */ -:not(pre)>code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: slategray; -} - -.token.punctuation { - color: #999; -} - -.namespace { - opacity: .7; -} - -.token.property, -.token.tag, -.token.boolean, -.token.number, -.token.constant, -.token.symbol, -.token.deleted { - color: #905; -} - -.token.selector, -.token.attr-name, -.token.string, -.token.char, -.token.builtin, -.token.inserted { - color: #690; -} - -.token.operator, -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #9a6e3a; - background: hsla(0, 0%, 100%, .5); -} - -.token.atrule, -.token.attr-value, -.token.keyword { - color: #07a; -} - -.token.function, -.token.class-name { - color: #DD4A68; -} - -.token.regex, -.token.important, -.token.variable { - color: #e90; -} - -.token.important, -.token.bold { - font-weight: bold; -} - -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} diff --git a/lib/iconfont/demo_index.html b/lib/iconfont/demo_index.html deleted file mode 100644 index 27166a1..0000000 --- a/lib/iconfont/demo_index.html +++ /dev/null @@ -1,837 +0,0 @@ - - - - - IconFont Demo - - - - - - - - - - - -
-

- -
-
-
    - -
  • - -
    rss
    -
    &#xe7ea;
    -
  • - -
  • - -
    steam
    -
    &#xe722;
    -
  • - -
  • - -
    battlenet
    -
    &#xe604;
    -
  • - -
  • - -
    youtube
    -
    &#xe733;
    -
  • - -
  • - -
    info-circle
    -
    &#xe77e;
    -
  • - -
  • - -
    area chart
    -
    &#xe7af;
    -
  • - -
  • - -
    container
    -
    &#xe7b0;
    -
  • - -
  • - -
    home
    -
    &#xe7c6;
    -
  • - -
  • - -
    right
    -
    &#xe7eb;
    -
  • - -
  • - -
    left
    -
    &#xe7ec;
    -
  • - -
  • - -
    menu
    -
    &#xe7f5;
    -
  • - -
  • - -
    unordered list
    -
    &#xe7f4;
    -
  • - -
  • - -
    ellipsis
    -
    &#xe7fc;
    -
  • - -
  • - -
    telegram
    -
    &#xe646;
    -
  • - -
  • - -
    time-circle-fill
    -
    &#xe848;
    -
  • - -
  • - -
    calendar-fill
    -
    &#xe84d;
    -
  • - -
  • - -
    app store-fill
    -
    &#xe853;
    -
  • - -
  • - -
    eye-fill
    -
    &#xe869;
    -
  • - -
  • - -
    tag-fill
    -
    &#xe86e;
    -
  • - -
  • - -
    tags-fill
    -
    &#xe86f;
    -
  • - -
  • - -
    mail-fill
    -
    &#xe870;
    -
  • - -
  • - -
    zhihu
    -
    &#xe87c;
    -
  • - -
  • - -
    QQ
    -
    &#xe882;
    -
  • - -
  • - -
    weibo
    -
    &#xe883;
    -
  • - -
  • - -
    wechat-fill
    -
    &#xe884;
    -
  • - -
  • - -
    Github
    -
    &#xe60b;
    -
  • - -
  • - -
    dribbble
    -
    &#xeaab;
    -
  • - -
  • - -
    twitter
    -
    &#xe617;
    -
  • - -
  • - -
    bilibili_tv
    -
    &#xe60f;
    -
  • - -
-
-

Unicode 引用

-
- -

Unicode 是字体在网页端最原始的应用方式,特点是:

-
    -
  • 兼容性最好,支持 IE6+,及所有现代浏览器。
  • -
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • -
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • -
-
-

注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式

-
-

Unicode 使用步骤如下:

-

第一步:拷贝项目下面生成的 @font-face

-
@font-face {
-  font-family: 'nexmoefont';
-  src: url('iconfont.eot');
-  src: url('iconfont.eot?#iefix') format('embedded-opentype'),
-      url('iconfont.woff2') format('woff2'),
-      url('iconfont.woff') format('woff'),
-      url('iconfont.ttf') format('truetype'),
-      url('iconfont.svg#nexmoefont') format('svg');
-}
-
-

第二步:定义使用 iconfont 的样式

-
.nexmoefont {
-  font-family: "nexmoefont" !important;
-  font-size: 16px;
-  font-style: normal;
-  -webkit-font-smoothing: antialiased;
-  -moz-osx-font-smoothing: grayscale;
-}
-
-

第三步:挑选相应图标并获取字体编码,应用于页面

-
-<span class="nexmoefont">&#x33;</span>
-
-
-

"nexmoefont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

-
-
-
-
-
    - -
  • - -
    - rss -
    -
    .icon-rss -
    -
  • - -
  • - -
    - steam -
    -
    .icon-steam -
    -
  • - -
  • - -
    - battlenet -
    -
    .icon-battlenet -
    -
  • - -
  • - -
    - youtube -
    -
    .icon-youtube -
    -
  • - -
  • - -
    - info-circle -
    -
    .icon-info-circle -
    -
  • - -
  • - -
    - area chart -
    -
    .icon-areachart -
    -
  • - -
  • - -
    - container -
    -
    .icon-container -
    -
  • - -
  • - -
    - home -
    -
    .icon-home -
    -
  • - -
  • - -
    - right -
    -
    .icon-right -
    -
  • - -
  • - -
    - left -
    -
    .icon-left -
    -
  • - -
  • - -
    - menu -
    -
    .icon-menu -
    -
  • - -
  • - -
    - unordered list -
    -
    .icon-unorderedlist -
    -
  • - -
  • - -
    - ellipsis -
    -
    .icon-ellipsis -
    -
  • - -
  • - -
    - telegram -
    -
    .icon-telegram -
    -
  • - -
  • - -
    - time-circle-fill -
    -
    .icon-time-circle-fill -
    -
  • - -
  • - -
    - calendar-fill -
    -
    .icon-calendar-fill -
    -
  • - -
  • - -
    - app store-fill -
    -
    .icon-appstore-fill -
    -
  • - -
  • - -
    - eye-fill -
    -
    .icon-eye-fill -
    -
  • - -
  • - -
    - tag-fill -
    -
    .icon-tag-fill -
    -
  • - -
  • - -
    - tags-fill -
    -
    .icon-tags-fill -
    -
  • - -
  • - -
    - mail-fill -
    -
    .icon-mail-fill -
    -
  • - -
  • - -
    - zhihu -
    -
    .icon-zhihu -
    -
  • - -
  • - -
    - QQ -
    -
    .icon-QQ -
    -
  • - -
  • - -
    - weibo -
    -
    .icon-weibo -
    -
  • - -
  • - -
    - wechat-fill -
    -
    .icon-wechat-fill -
    -
  • - -
  • - -
    - Github -
    -
    .icon-github -
    -
  • - -
  • - -
    - dribbble -
    -
    .icon-dribbble -
    -
  • - -
  • - -
    - twitter -
    -
    .icon-twitter -
    -
  • - -
  • - -
    - bilibili_tv -
    -
    .icon-bilibili -
    -
  • - -
-
-

font-class 引用

-
- -

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

-

与 Unicode 使用方式相比,具有如下特点:

-
    -
  • 兼容性良好,支持 IE8+,及所有现代浏览器。
  • -
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • -
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • -
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • -
-

使用步骤如下:

-

第一步:引入项目下面生成的 fontclass 代码:

-
<link rel="stylesheet" href="./iconfont.css">
-
-

第二步:挑选相应图标并获取类名,应用于页面:

-
<span class="nexmoefont icon-xxx"></span>
-
-
-

" - nexmoefont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

-
-
-
-
-
    - -
  • - -
    rss
    -
    #icon-rss
    -
  • - -
  • - -
    steam
    -
    #icon-steam
    -
  • - -
  • - -
    battlenet
    -
    #icon-battlenet
    -
  • - -
  • - -
    youtube
    -
    #icon-youtube
    -
  • - -
  • - -
    info-circle
    -
    #icon-info-circle
    -
  • - -
  • - -
    area chart
    -
    #icon-areachart
    -
  • - -
  • - -
    container
    -
    #icon-container
    -
  • - -
  • - -
    home
    -
    #icon-home
    -
  • - -
  • - -
    right
    -
    #icon-right
    -
  • - -
  • - -
    left
    -
    #icon-left
    -
  • - -
  • - -
    menu
    -
    #icon-menu
    -
  • - -
  • - -
    unordered list
    -
    #icon-unorderedlist
    -
  • - -
  • - -
    ellipsis
    -
    #icon-ellipsis
    -
  • - -
  • - -
    telegram
    -
    #icon-telegram
    -
  • - -
  • - -
    time-circle-fill
    -
    #icon-time-circle-fill
    -
  • - -
  • - -
    calendar-fill
    -
    #icon-calendar-fill
    -
  • - -
  • - -
    app store-fill
    -
    #icon-appstore-fill
    -
  • - -
  • - -
    eye-fill
    -
    #icon-eye-fill
    -
  • - -
  • - -
    tag-fill
    -
    #icon-tag-fill
    -
  • - -
  • - -
    tags-fill
    -
    #icon-tags-fill
    -
  • - -
  • - -
    mail-fill
    -
    #icon-mail-fill
    -
  • - -
  • - -
    zhihu
    -
    #icon-zhihu
    -
  • - -
  • - -
    QQ
    -
    #icon-QQ
    -
  • - -
  • - -
    weibo
    -
    #icon-weibo
    -
  • - -
  • - -
    wechat-fill
    -
    #icon-wechat-fill
    -
  • - -
  • - -
    Github
    -
    #icon-github
    -
  • - -
  • - -
    dribbble
    -
    #icon-dribbble
    -
  • - -
  • - -
    twitter
    -
    #icon-twitter
    -
  • - -
  • - -
    bilibili_tv
    -
    #icon-bilibili
    -
  • - -
-
-

Symbol 引用

-
- -

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 - 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

-
    -
  • 支持多色图标了,不再受单色限制。
  • -
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • -
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • -
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • -
-

使用步骤如下:

-

第一步:引入项目下面生成的 symbol 代码:

-
<script src="./iconfont.js"></script>
-
-

第二步:加入通用 CSS 代码(引入一次就行):

-
<style>
-.icon {
-  width: 1em;
-  height: 1em;
-  vertical-align: -0.15em;
-  fill: currentColor;
-  overflow: hidden;
-}
-</style>
-
-

第三步:挑选相应图标并获取类名,应用于页面:

-
<svg class="icon" aria-hidden="true">
-  <use xlink:href="#icon-xxx"></use>
-</svg>
-
-
-
- -
-
- - - diff --git a/lib/iconfont/iconfont.css b/lib/iconfont/iconfont.css deleted file mode 100644 index 02c386e..0000000 --- a/lib/iconfont/iconfont.css +++ /dev/null @@ -1,133 +0,0 @@ -@font-face {font-family: "nexmoefont"; - src: url('iconfont.eot?t=1581230946722'); /* IE9 */ - src: url('iconfont.eot?t=1581230946722#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABHUAAsAAAAAIAgAABGEAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHGAqreKJaATYCJAN4Cz4ABCAFhQUHgmEbYRoz0nLSCgzZf33AjaGQg/oFDojEIHSYKLYXCbYWSTWcwd4bduI62MfahwVbTuryt2hbF/yz2YvgaT9z3t8NwRHKU1GngR0WJKKqcVWtNHUyYVmC4Wmb/+7ecSCod4j2YEpauWFjnahgAOrWp66CzVUgFi6NqD+XHS5++ItGPzdXb+U0vzYAxb8HZvgHlsZleWVfRsVzuq+Ah+EQGtoBy7xtb5HWE2pvgFRsTB2pymlNucAVrpGq/t8Rd0J29mRQ4G0uA5xqufzdc7WqBggYwMHk/mqttDsBQEWwLsKQMO/kzR7ObR/08z7x3gV2Q0BGId3xA7IKsAK0ETYVJaLlx0UYHx/2bu2BFeSiWWqzPP07yydQt80bcra7uKsqY+bABu/o5WPVRJhcMjZUrWVDvrkcn5RUiw/FZYWP3uePqbIbVQqlhGV78+L8maMB9mQy/De4pzm660lY5UdCD5ApesbU2AED1vPEuikW8yvJXOmvvjlIG1re8KiEBbWq7cOzw9nwa/9SUtOaTm+FosnAfzM1ybaQk+EXMmeA8cCwK4ceJ74hAwUTuRjxhnmv4xvGWiErKat07n/i1dQ1NbR0dHHZ4LFlx54DR05cgCij6zch3pEVW8AAkzyJAYdnHRgQ2nJwANoEUOBpMxTyFAyDeDLDVagE2AZUBmwHqgDOAlUBH4EC8AmoBvgMVAf8AmoCfgdqAP4FT4uRkqfDSM3TBUZaNAeYDjQPmAO0AJgLtAjQAy0BVgAtA4xAK4BCoFVAEXjWgMnAVjYAbOt89gDvKH+m2leYZeY5kqw677WTWUqCs3SILStAcmwhSWeoKE/3tgmlQmcXOqmYKErPyYZqzg6LSqiqIFvN5+YXq+osrIA3S2WngGyqxoiazy4mUVygQrXAIi87n8zNzDy5RM3O1u3L1LmuqUxEF4SuUAjUrCmHtMgiv/y0tIV53sfgs/8l/NRMpyAMEkaszRIA+JgjJNguJrruF7DkoqX+FV/doWjfc+eMyoPPaPMv338NA+3wLbFsJtpinxMofPPgSmd1ZRTTu/TpVTzryxXHixhC80xNxbOBlXwx35F1BC6VFSOxUdLLPclBpjRH2ms11q7GOru/4GpkRSFjeFJaw0Inkdn1aP8NiUlf1/R6zy0V2yn1Y/tDcfBUrSfnjsRzu8bgPOnEgqVJTN91XBM6i8xRadJpnRYV2aMX6q8nSgZbuTk+9dSa6MG8F1crlUVuOj3FxVRuHXu6QXYvSxgzj5lDhUUuFnqUyZWC5RsfKZtJuVGg72LxhvF7RbGWiQK4eL6Wdbh0qCjri9yBzxviO/jHvPqxNIonrP5P68UV/u/c+FIh68ffpza7HSAJrFePjv1diHYX0PY1aYDd02HSTwRTFiRaCtURx6nMzU1nRpJL4/IkwL7VqlSfaaYta0IUQN3cYErBvWmUFyZBpp/4PRegS9unbV6KpQ/WIgALm6MgLi+GqXlNOY2vbqhEU6gV1cztWMICrW1q+B5CKXmpKHzgt0GAnBQI/MTgl2JKATAVdrb/1MGIAjy9vc1VU9zJ/d/AY2Abyc5POQC+0RHq5l8vVC+49qF10ZI1w91c7cscSxVsv9riaNXB4NrlNf+0VqeTT8z73r4+uNW9ca+0ru/mEtskY/PsXnDdMmLYDKRyjKiuWNSxnzM1Px8Ce0coqqd9fVZgCfeuGhAF9SjKCTkYgCNVJY+noww74Vigk4COkA+/+vGbv4+qrqKvZ21v0wRAt2bksZa+YKQ7Wdi9RdkT9/0H4T3vbmsnBzXM7K6Rh9PeVJDw23fYn04E8zaDGVufPirD3oQUvI/pfsJsIoHRwoCP80Kd/paGLAelV0FzDUxFTVA6qLigp8eAvaMl2AjG5o3NFA5FhUQjOp3EmD+oQNawwta6+xRbNHRRK+yKTpHuhRTfkGuvrLUwHy0H9qLBEgR6zhvuQLktZ27ultlXGoG4xJ7YPvayaPwzUaKFva8XPJCACj2Unc+zbEYcfnWBEsVm19XrAxduXOveSQhjnFPaettsekfuv55HurrHMR+f7vacunM/3pe03xDMXkp8aRKDhmrG8JUViahvfeDBEeN+ZH6MMrz5j3xui7TjOhJL5LdQ/x41ZFgcp4pBqyRKjR5ih+NQfzYX9gAp7c4MTZpKiKX9cEfObUEvV3i4kaNQP05DzoxyBnhLDSvyXbVOLGE+D/XpcKnenHra1I+eWH7uUVP3P0OymgLf5oMl3C8eKIcMatVjY9qmm9uux0G07nZ8fcFEK1lfNNyvR8t3km8WonERyhfzw/nfruzF8Eq7+rqmtKmX667Cq8EGXpnrC5ixIHG5fMDpfxQ+8R8HD5v92pS60TbFa8nfiT/rERaLzZ7zxbJ7yEfNYUia6Fhzt0C2ysfj0jlX9oKxn7WmoFwU2dozHRF9I/21m2yoFj0buwZZQkWvrX+vsy1B/Fg33izte7gufLOw76MLHf63U2kmtBPzxk6yp1vwciylkhI9bMOBtYdcrLQs6xtw4Vydwbm3ufWao85jmo7JiK/opqPrD0/J1GXlZKsS6Gps6/eL1/Ta94t7DzrX2jfJupu+uqu+bS4NWyR9Aw51dWLzGjvlal/zWPM4+VSK84lErto61srSuP+A0fK6iFCTB00EHIv3qAoKVL1eYwmK1BBx1oylk590djyevIxpHUxkkPEEWsMkl965vZQL5MYgZ7W6Y7s61dlFrd7R4TTHnlf8OFMwn/ixb6dIY+WlFZ1IcBHFytz5waa4B6eQpJycJDUGyc1pdtE2MER9INsyhcHSCUlJE6TBQ3uYKTNzVAiFTNESscbg35+Mbr/8suMdnF1ZPhvl/8aVlUAec1ihZMfm0BRdU6mvEmRoIpGm5PWNHxfb+kcuP6W2ojj8Pi/o26URjAcKNTKL9yaKlqyyorC5HvmizOxWhtYOBn5Pd9u3rgqL5r5UyWxsE6fXH/gdnGWG5AjTJopRq3A1qPXIXjkz2403FVWMDR0ZyV6Vn1zJoKjx0oD5eKzQRZJZoWsXhbOd+RqU+RBak+MQJ3GaDYzJPXVj4qIp9C2MUwU69DpZEvd0kvRjUU2A1iJKeU2jips8UxNPa8pry7OCp8QlfrFS4TYmvksk5CjPOyzzWSdOk0c+A/oV8baG2bA8RHQFBsdumXvk2TjhNrHW24qgb46cG84p2rKtJj8gKA9NzdAmjGstsQHxO01VQg8NGY9Lqcb9QQ9hFanE93LxfWRilZuJcxuTiO/Lbu/anAR+J3CFiiPYv/9iynRkSWGMNuG88muBN25AmFooxS7UOdwfbnLnW1GF/jRO4jR1CUYapm3X47Scxrc73GCN5fgchSON78YrA2/cXLFcpzt82Aa24yAYKgzWXGuF1HvFhXly/wu5XGP12/i31UZubnT1qOZ4+QThvXlU9Xv/e5cNNO6P0/RUvD3WQiA8oNRY0GByNjU1CRlBwzyp3ZSXS3zIumz9Zf2DpVTja+4UbrtUvG6k6Hl67hr8V39yYmAhQ83STXV0FDqWmlEYmFl1QABu9YSHHyj1AuTG5ySNK3Ban4bPiS0pd4BQ9LjyhUWanBPuTNb6w1bO/OrPzzoiKEwE7wzLs6Y64HcQFLGIrztKrmQn22e8U6Z43JRnjLOqbau/WbJz8MPmubPKVKBXvVjGn43X9iwWYrxeU/+5YWocmEv0Ansu1+p2NfP6FT0YoQAe6zdFb3fdru8KRqCD/kwTU54J35g6r9qNpV7AP6v1xNfBwa8EzXK1W++lEOEHDrjKI9uSkdxcRJmSKYUxKhkI69jDl3PAdjmfIbx1Kytr5kwhy19L9DWlPWgEzw68nL50qRA6+bjs8HGCQuIlPkGt1q12+iK9jGw9OIu1cdOnf/kcr1sUEuzsvL96XW0ICEOfT0LBU06YFfZLR+hUn+GG4XQZFIpBcENkhCM1nSqKTBkMTwlEbbo28XcWo/FwaiGwkBa3P3L9q2rGcWQ+s3VrwtvhSQYllGYW95HkrtOXQkGmo2A9KbiKOfaVeY6ufhqkPKENTNfvUFDCziJZaVuKzd5idOay9BK/NpYVAkBQhcvuN6LRcMPSw4WwBC4+Ctclivtmt0MGksT6GagUS6SZhQtn5fD3ILaY7AZ+zorJhdJMiThQ+ZOFJIHzdArtsXKiWBdDT/OaH+Clnb6uPUWgV4QLNspDbp8OX3HaebuSj+4KDV/b36o/s3Mn5b3zRh81dklVd97VrfnCgZNvxo6/UZ/hGBFHas9H7OufqQaO9gvP3i6oT9alj58C4lxIbVR5kDm3LUqreRy7Qs6YeW/JOrADu1GPZpFD8d6zWU0ZFokw0TRnFmcOqzH90NuY0jQb7MAtDLa5W1cuR8rQvXXoPKuwqSHFHAx9i2IWBsyNcs8rZwTw9eRWETq1d038KBuT2CRZIl5yOjMQuEt52zb/LBSdULdqPupotIZo16VE/Nb6YyxthxuuY6KHUciCN4mg4TQproeIU0wg/1rAHH38chZxiUzgOfImE4dJ3eVhASqnpTPGU7Eaz1nOWcZiMMtylpPGKyHeb5TTYlWpZmLEPB9roThriOXPfFkQV/qWm1euyrMx5HFT2tTuV4Oc08khtnrcvAjNRNNQdjQlEf6MuqVlxGYyan+4Nu+my6Kp7KD62BdDWe9PFFaddRVPE4pLTtffvnf15K+9TYsyWBK5RONErnIPXLCAK9TfwBwdMWK6saQwRn30wmdnAopByutNvFnsIoeeBYHzpq5LnjZxrs+InLGlWyY7nPFfgbaMLRkxsV7yiHCzy1vW0KBjMtz+Ibt8eD/zhUdbQ8a4yzd2/uNGDVQZfL0WemyJnOr53Kl8pETS5ZE/xbLK8Yz1qPEVIHTnBGgVko5ZzmC2jYwJVDP7fGKTwOjEZaPiHDKnIhl/LQd7fPpkVKLu/IoqttMm7pIZU01bBk23h7spVheEgxGaOwMqVaNTkFOD0WgQWby1rqJG1Dc9bUCJ0DSS+BtC0ROViDPT2ofA18oEBRmX7ewT84sDE3MmqCrWO4s90e3suPZ15UHO/ibewlstRNptmSSd5E4LbzJgwbVlFeST5qWDBWV7UXsSg5ZhyNLn5cJbv7gGMgnhFSv0/Q5gtdn8L+YFVsORAJgvRLwZxgCunGHGDETsx3FRUSfWgD5P9qPXMt92FvqYtmWj/wEAoLe9UFhOKcbXo7c/JB05AID5WiYMvtZa5sFUDkkyXo8Ojj2Inp1xxwD0jD9i9T0tx4m0BB1C/FcZbeL3o2/L7B/NTD4WgbGQyw1CvTfjo58wZWV7Hpz0c9UX2F5m92EiEfE7i/MvbMbDyZdzCW3PjO8buxKAHyvCzoxshR+niBlKuCHj0cDCBdh+F3kkQ/LPAB0MAwGf51rTFyDwoY/JKADYPBEAM0m08fesFrvagmbshG41B8U0fA7EJiXYQP85DBxhc3BsCXPYvNwWzMFz0YTkEQDw9ObMQdh6n4OydolB08BPhmHg/xwG+0BMOEaGwxy2rJgXk0MaBTCOoQW5ys6KTAxWbCGDgJOPCKUHFB//Qzi1S/AhL+BEMajtapOz6gYBfK0c0qG4ErHKcvRqt6oYnIuq4vgKI6tSpLper62pBisTfW0gDgNNQE7JnPXixIgCO1YMZDjxh8FgD6sHL+w5GpfuFeTFyRI63riytbKpRW4E05H52dTJQeGKysJSUoP1I0/ZtZPAcWekVGZvr8AQK2ULuXJtTY5k64qrt7b4OcQA9oG9XYJAJVlRNd0wLdtxPR+XDR5bduw5cOTEmYth+ASGh+b7lNpJoH0/0yIOAdI9x73sMwwp2Lg0xMahrxnalPrVkL6JQTQFcKuMHm2mopSWg5WWR9iP9yFyDkbuKEkPzlGVKPUEDgVrPxPyuOBmS0vOjY2+Y1yuObGurqokkc3xPZz98aIL0oe0nO41uWzbl5LKfeP+vn0EZXGo6UOKkj+lU5Aosl7OlLHcHLpyJBFwLyNHMrRWAwAAAA==') format('woff2'), - url('iconfont.woff?t=1581230946722') format('woff'), - url('iconfont.ttf?t=1581230946722') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ - url('iconfont.svg?t=1581230946722#nexmoefont') format('svg'); /* iOS 4.1- */ -} - -.nexmoefont { - font-family: "nexmoefont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-rss:before { - content: "\e7ea"; -} - -.icon-steam:before { - content: "\e722"; -} - -.icon-battlenet:before { - content: "\e604"; -} - -.icon-youtube:before { - content: "\e733"; -} - -.icon-info-circle:before { - content: "\e77e"; -} - -.icon-areachart:before { - content: "\e7af"; -} - -.icon-container:before { - content: "\e7b0"; -} - -.icon-home:before { - content: "\e7c6"; -} - -.icon-right:before { - content: "\e7eb"; -} - -.icon-left:before { - content: "\e7ec"; -} - -.icon-menu:before { - content: "\e7f5"; -} - -.icon-unorderedlist:before { - content: "\e7f4"; -} - -.icon-ellipsis:before { - content: "\e7fc"; -} - -.icon-telegram:before { - content: "\e646"; -} - -.icon-time-circle-fill:before { - content: "\e848"; -} - -.icon-calendar-fill:before { - content: "\e84d"; -} - -.icon-appstore-fill:before { - content: "\e853"; -} - -.icon-eye-fill:before { - content: "\e869"; -} - -.icon-tag-fill:before { - content: "\e86e"; -} - -.icon-tags-fill:before { - content: "\e86f"; -} - -.icon-mail-fill:before { - content: "\e870"; -} - -.icon-zhihu:before { - content: "\e87c"; -} - -.icon-QQ:before { - content: "\e882"; -} - -.icon-weibo:before { - content: "\e883"; -} - -.icon-wechat-fill:before { - content: "\e884"; -} - -.icon-github:before { - content: "\e60b"; -} - -.icon-dribbble:before { - content: "\eaab"; -} - -.icon-twitter:before { - content: "\e617"; -} - -.icon-bilibili:before { - content: "\e60f"; -} - diff --git a/lib/iconfont/iconfont.eot b/lib/iconfont/iconfont.eot deleted file mode 100644 index bce044e..0000000 Binary files a/lib/iconfont/iconfont.eot and /dev/null differ diff --git a/lib/iconfont/iconfont.js b/lib/iconfont/iconfont.js deleted file mode 100644 index 3547263..0000000 --- a/lib/iconfont/iconfont.js +++ /dev/null @@ -1 +0,0 @@ -!function(a){var c,e='',t=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var t=function(){document.removeEventListener("DOMContentLoaded",t,!1),c()};document.addEventListener("DOMContentLoaded",t,!1)}else document.attachEvent&&(o=c,i=a.document,h=!1,(e=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(e,50)}l()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,l())});function l(){h||(h=!0,o())}var o,i,h,e}(function(){var c,t,l,o,i,h;(c=document.createElement("div")).innerHTML=e,e=null,(t=c.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",l=t,(o=document.body).firstChild?(i=l,(h=o.firstChild).parentNode.insertBefore(i,h)):o.appendChild(l))})}(window); \ No newline at end of file diff --git a/lib/iconfont/iconfont.json b/lib/iconfont/iconfont.json deleted file mode 100644 index c03c8d0..0000000 --- a/lib/iconfont/iconfont.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"1038733","name":"hexo-theme-nexmoe","font_family":"nexmoefont","css_prefix_text":"icon-","description":"","glyphs":[{"icon_id":"929736","name":"rss","font_class":"rss","unicode":"e7ea","unicode_decimal":59370},{"icon_id":"1899043","name":"steam","font_class":"steam","unicode":"e722","unicode_decimal":59170},{"icon_id":"3743130","name":"battlenet","font_class":"battlenet","unicode":"e604","unicode_decimal":58884},{"icon_id":"3780842","name":"youtube","font_class":"youtube","unicode":"e733","unicode_decimal":59187},{"icon_id":"4765727","name":"info-circle","font_class":"info-circle","unicode":"e77e","unicode_decimal":59262},{"icon_id":"4766297","name":"area chart","font_class":"areachart","unicode":"e7af","unicode_decimal":59311},{"icon_id":"4766438","name":"container","font_class":"container","unicode":"e7b0","unicode_decimal":59312},{"icon_id":"4766685","name":"home","font_class":"home","unicode":"e7c6","unicode_decimal":59334},{"icon_id":"4767011","name":"right","font_class":"right","unicode":"e7eb","unicode_decimal":59371},{"icon_id":"4767012","name":"left","font_class":"left","unicode":"e7ec","unicode_decimal":59372},{"icon_id":"4767059","name":"menu","font_class":"menu","unicode":"e7f5","unicode_decimal":59381},{"icon_id":"4767060","name":"unordered list","font_class":"unorderedlist","unicode":"e7f4","unicode_decimal":59380},{"icon_id":"4767094","name":"ellipsis","font_class":"ellipsis","unicode":"e7fc","unicode_decimal":59388},{"icon_id":"4904445","name":"telegram","font_class":"telegram","unicode":"e646","unicode_decimal":58950},{"icon_id":"4936512","name":"time-circle-fill","font_class":"time-circle-fill","unicode":"e848","unicode_decimal":59464},{"icon_id":"4936544","name":"calendar-fill","font_class":"calendar-fill","unicode":"e84d","unicode_decimal":59469},{"icon_id":"4936584","name":"app store-fill","font_class":"appstore-fill","unicode":"e853","unicode_decimal":59475},{"icon_id":"4936668","name":"eye-fill","font_class":"eye-fill","unicode":"e869","unicode_decimal":59497},{"icon_id":"4936683","name":"tag-fill","font_class":"tag-fill","unicode":"e86e","unicode_decimal":59502},{"icon_id":"4936685","name":"tags-fill","font_class":"tags-fill","unicode":"e86f","unicode_decimal":59503},{"icon_id":"4936690","name":"mail-fill","font_class":"mail-fill","unicode":"e870","unicode_decimal":59504},{"icon_id":"4936957","name":"zhihu","font_class":"zhihu","unicode":"e87c","unicode_decimal":59516},{"icon_id":"4936984","name":"QQ","font_class":"QQ","unicode":"e882","unicode_decimal":59522},{"icon_id":"4936987","name":"weibo","font_class":"weibo","unicode":"e883","unicode_decimal":59523},{"icon_id":"4936991","name":"wechat-fill","font_class":"wechat-fill","unicode":"e884","unicode_decimal":59524},{"icon_id":"5004906","name":"Github","font_class":"github","unicode":"e60b","unicode_decimal":58891},{"icon_id":"6742514","name":"dribbble","font_class":"dribbble","unicode":"eaab","unicode_decimal":60075},{"icon_id":"6845552","name":"twitter","font_class":"twitter","unicode":"e617","unicode_decimal":58903},{"icon_id":"6978316","name":"bilibili_tv","font_class":"bilibili","unicode":"e60f","unicode_decimal":58895}]} \ No newline at end of file diff --git a/lib/iconfont/iconfont.svg b/lib/iconfont/iconfont.svg deleted file mode 100644 index ddbaa84..0000000 --- a/lib/iconfont/iconfont.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - -Created by iconfont - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/iconfont/iconfont.ttf b/lib/iconfont/iconfont.ttf deleted file mode 100644 index 30870ff..0000000 Binary files a/lib/iconfont/iconfont.ttf and /dev/null differ diff --git a/lib/iconfont/iconfont.woff b/lib/iconfont/iconfont.woff deleted file mode 100644 index a84b76b..0000000 Binary files a/lib/iconfont/iconfont.woff and /dev/null differ diff --git a/lib/iconfont/iconfont.woff2 b/lib/iconfont/iconfont.woff2 deleted file mode 100644 index 82d5eb1..0000000 Binary files a/lib/iconfont/iconfont.woff2 and /dev/null differ diff --git a/lib/mdui_043tiny/css/mdui.css b/lib/mdui_043tiny/css/mdui.css deleted file mode 100644 index ac3c441..0000000 --- a/lib/mdui_043tiny/css/mdui.css +++ /dev/null @@ -1,8064 +0,0 @@ -/*! - * mdui v0.4.3 (https://mdui.org) - * Copyright 2016-2019 zdhxiong - * Licensed under MIT - */ - -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -/* Document - ========================================================================== */ -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. - */ -html { - line-height: 1.15; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ -} -/* Sections - ========================================================================== */ -/** - * Remove the margin in all browsers. - */ -body { - margin: 0; -} -/** - * Render the `main` element consistently in IE. - */ -main { - display: block; -} -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ -h1 { - margin: .67em 0; - font-size: 2em; -} -/* Grouping content - ========================================================================== */ -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ -hr { - /* 1 */ - height: 0; - -webkit-box-sizing: content-box; - box-sizing: content-box; - /* 1 */ - overflow: visible; - /* 2 */ -} -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ -pre { - font-family: monospace, monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} -/* Text-level semantics - ========================================================================== */ -/** - * Remove the gray background on active links in IE 10. - */ -a { - background-color: transparent; -} -/** - * 1. Remove the bottom border in Chrome 57- - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ -abbr[title] { - /* 1 */ - text-decoration: underline; - text-decoration: underline dotted; - border-bottom: none; - /* 2 */ - - -webkit-text-decoration: underline dotted; - -moz-text-decoration: underline dotted; - /* 2 */ -} -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ -b, -strong { - font-weight: bolder; -} -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ -code, -kbd, -samp { - font-family: monospace, monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} -/** - * Add the correct font size in all browsers. - */ -small { - font-size: 80%; -} -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} -sub { - bottom: -.25em; -} -sup { - top: -.5em; -} -/* Embedded content - ========================================================================== */ -/** - * Remove the border on images inside links in IE 10. - */ -img { - border-style: none; -} -/* Forms - ========================================================================== */ -/** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. - */ -button, -input, -optgroup, -select, -textarea { - /* 1 */ - margin: 0; - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - line-height: 1.15; - /* 2 */ -} -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ -button, -input { - /* 1 */ - overflow: visible; -} -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ -button, -select { - /* 1 */ - text-transform: none; -} -/** - * Correct the inability to style clickable types in iOS and Safari. - */ -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; -} -/** - * Remove the inner border and padding in Firefox. - */ -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - padding: 0; - border-style: none; -} -/** - * Restore the focus styles unset by the previous rule. - */ -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} -/** - * Correct the padding in Firefox. - */ -fieldset { - padding: .35em .75em .625em; -} -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ -legend { - /* 2 */ - display: table; - /* 1 */ - max-width: 100%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 1 */ - color: inherit; - /* 3 */ - white-space: normal; - /* 1 */ -} -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ -progress { - vertical-align: baseline; -} -/** - * Remove the default vertical scrollbar in IE 10+. - */ -textarea { - overflow: auto; -} -/** - * 1. Add the correct box sizing in IE 10. - * 2. Remove the padding in IE 10. - */ -[type="checkbox"], -[type="radio"] { - -webkit-box-sizing: border-box; - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 2 */ -} -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ -[type="search"] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} -/** - * Remove the inner padding in Chrome and Safari on macOS. - */ -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} -/* Interactive - ========================================================================== */ -/* - * Add the correct display in Edge, IE 10+, and Firefox. - */ -details { - display: block; -} -/* - * Add the correct display in all browsers. - */ -summary { - display: list-item; -} -/* Misc - ========================================================================== */ -/** - * Add the correct display in IE 10+. - */ -template { - display: none; -} -/** - * Add the correct display in IE 10. - */ -[hidden] { - display: none; -} -/** - * ============================================================================= - * ************ 公共样式 ************ - * ============================================================================= - */ -body { - font-family: Roboto, Noto, Helvetica, Arial, sans-serif; - font-size: 14px; - color: rgba(0, 0, 0, .87); - background-color: #fff; -} -@media (min-width: 600px) { - body { - font-size: 14.5px; - } -} -@media (min-width: 1024px) { - body { - font-size: 15px; - } -} -body *::-webkit-scrollbar { - width: 5px; - height: 5px; - background: transparent; -} -@media (min-width: 1024px) { - body *::-webkit-scrollbar { - width: 8px; - height: 8px; - } -} -body *::-webkit-scrollbar-thumb { - background: rgba(0, 0, 0, .2); -} -body.mdui-theme-layout-dark *::-webkit-scrollbar { - width: 5px; - height: 5px; - background: transparent; -} -@media (min-width: 1024px) { - body.mdui-theme-layout-dark *::-webkit-scrollbar { - width: 8px; - height: 8px; - } -} -body.mdui-theme-layout-dark *::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, .3); -} -* { - -webkit-tap-highlight-color: transparent; -} -/* 锁定屏幕 */ -body.mdui-locked { - overflow: hidden; -} -/* 遮罩层 */ -.mdui-overlay { - position: fixed; - top: -5000px; - right: -5000px; - bottom: -5000px; - left: -5000px; - z-index: 2000; - visibility: hidden; - background: rgba(0, 0, 0, .2); - opacity: 0; - -webkit-transition-duration: .3s; - transition-duration: .3s; - -webkit-transition-property: opacity, visibility; - transition-property: opacity, visibility; - - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - will-change: opacity; - backdrop-filter: saturate(180%) blur(5px); - -webkit-backdrop-filter: saturate(180%) blur(5px); -} -/* 显示遮罩层 */ -.mdui-overlay-show { - visibility: visible; - opacity: 1; -} -/* 取消 transition 过渡效果 */ -.mdui-no-transition { - -webkit-transition-property: none !important; - transition-property: none !important; -} -/** - * ============================================================================= - * ************ Global dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark { - color: #fff; - background-color: #303030; -} -/** - * ============================================================================= - * ************ Icon 图标 ************ - * ============================================================================= - */ -.mdui-icon, -.mdui-icon::before { - font-size: 24px; - font-style: normal; - font-weight: normal; - line-height: 1; - color: inherit; - text-transform: none; - letter-spacing: normal; - word-wrap: normal; - white-space: nowrap; - /* Preferred icon size */ - vertical-align: middle; - - direction: ltr; -} -.mdui-icon { - display: inline-block; - text-align: center; -} -.mdui-icon::before { - display: block !important; - width: 24px; - height: 24px; -} -/** - * ============================================================================= - * ************ Typography 排版 ************ - * ============================================================================= - */ -/* .mdui-typo-display-4 */ -.mdui-typo-display-4, -.mdui-typo-display-4-opacity { - font-size: 112px; - font-weight: 300; - letter-spacing: -.04em; -} -.mdui-typo-display-4-opacity { - opacity: .54; -} -/* .mdui-typo-display-3 */ -.mdui-typo-display-3, -.mdui-typo-display-3-opacity { - font-size: 56px; - font-weight: 400; - letter-spacing: -.02em; -} -.mdui-typo-display-3-opacity { - opacity: .54; -} -/* .mdui-typo-display-2 */ -.mdui-typo-display-2, -.mdui-typo-display-2-opacity { - font-size: 45px; - font-weight: 400; - letter-spacing: 0; -} -.mdui-typo-display-2-opacity { - opacity: .54; -} -/* .mdui-typo-display-1 */ -.mdui-typo-display-1, -.mdui-typo-display-1-opacity { - font-size: 34px; - font-weight: 400; - letter-spacing: 0; -} -.mdui-typo-display-1-opacity { - opacity: .54; -} -/* .mdui-typo-headline */ -.mdui-typo-headline, -.mdui-typo-headline-opacity { - font-size: 24px; - font-weight: 400; - - -moz-osx-font-smoothing: grayscale; -} -.mdui-typo-headline-opacity { - opacity: .87; -} -/* .mdui-typo-title */ -.mdui-typo-title, -.mdui-typo-title-opacity { - font-size: 20px; - font-weight: 500; - letter-spacing: .02em; -} -.mdui-typo-title-opacity { - opacity: .87; -} -.mdui-typo-subheading, -.mdui-typo-subheading-opacity { - font-size: 16px; - font-weight: 400; - letter-spacing: .04em; -} -.mdui-typo-subheading-opacity { - opacity: .87; -} -.mdui-typo-body-2, -.mdui-typo-body-2-opacity { - font-size: 14px; - font-weight: 500; - letter-spacing: .04em; -} -.mdui-typo-body-2-opacity { - opacity: .87; -} -.mdui-typo-body-1, -.mdui-typo-body-1-opacity { - font-size: 14px; - font-weight: 400; - letter-spacing: .04em; -} -.mdui-typo-body-1-opacity { - opacity: .87; -} -.mdui-typo-caption, -.mdui-typo-caption-opacity { - font-size: 12px; - font-weight: 400; - letter-spacing: .08em; -} -.mdui-typo-caption-opacity { - opacity: .54; -} -.mdui-typo { - line-height: 1.8; - word-wrap: break-word; - /* a */ - /* small */ - /* blockquote */ - /* mark */ - /* h1 - h6 */ - /* code */ - /* pre code */ - /* abbr */ - /* ins */ - /* u */ - /* del */ - /* hr */ - /* pre */ - /* kbd */ - /* ul / ol */ - /* img */ -} -.mdui-typo address, -.mdui-typo caption, -.mdui-typo cite, -.mdui-typo code, -.mdui-typo dfn, -.mdui-typo th { - font-style: normal; - font-weight: 400; -} -.mdui-typo caption, -.mdui-typo th { - text-align: left; -} -.mdui-typo q:before, -.mdui-typo q:after { - content: ''; -} -.mdui-typo pre, -.mdui-typo code, -.mdui-typo kbd, -.mdui-typo samp, -.mdui-typo pre tt { - font-family: Consolas, Courier, 'Courier New', monospace; -} -.mdui-typo figcaption { - font-size: 80%; - color: rgba(0, 0, 0, .54); -} -.mdui-typo [draggable], -.mdui-typo [draggable="true"] { - cursor: move; -} -.mdui-typo [draggable="false"] { - cursor: inherit; -} -.mdui-typo p, -.mdui-typo pre, -.mdui-typo ul, -.mdui-typo ol, -.mdui-typo dl, -.mdui-typo form, -.mdui-typo hr, -.mdui-typo figure, -.mdui-typo table, -.mdui-typo .mdui-table, -.mdui-typo .mdui-table-fluid { - margin: 0 0 1.2em 0; -} -.mdui-typo a { - position: relative; - display: inline-block; - overflow: hidden; - color: #ff4081; - text-decoration: none; - vertical-align: top; - outline: none; -} -.mdui-typo a:before { - position: absolute; - top: auto; - bottom: 1px; - left: 0; - width: 100%; - height: 1px; - content: ' '; - background-color: #ff4081; - -webkit-transition: all .2s; - transition: all .2s; - -webkit-transform: scaleX(0); - transform: scaleX(0); - - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} -.mdui-typo a:hover:before, -.mdui-typo a:focus:before { - -webkit-transform: scaleX(1); - transform: scaleX(1); -} -.mdui-typo small { - font-size: 80%; -} -.mdui-typo blockquote { - padding-left: 1em; - margin: 1em 3em 1em 2em; - font-weight: 400; - border-left: 4px solid rgba(0, 0, 0, .12); -} -@media only screen and (max-width: 599px) { - .mdui-typo blockquote { - margin: 1em 0; - } -} -.mdui-typo blockquote footer { - font-size: 86%; - color: rgba(0, 0, 0, .54); -} -.mdui-typo mark { - padding: 2px; - margin: 0 5px; - background: #fffdd1; - border-bottom: 1px solid #ffedce; -} -.mdui-typo h1, -.mdui-typo h2, -.mdui-typo h3, -.mdui-typo h4, -.mdui-typo h5, -.mdui-typo h6 { - margin-top: 1.2em; - margin-bottom: .6em; - font-family: inherit; - font-weight: 400; - line-height: 1.35; - color: inherit; -} -.mdui-typo h1 small, -.mdui-typo h2 small, -.mdui-typo h3 small, -.mdui-typo h4 small, -.mdui-typo h5 small, -.mdui-typo h6 small { - font-size: 65%; - font-weight: 400; - line-height: 1; - color: rgba(0, 0, 0, .54); -} -.mdui-typo h1 { - font-size: 2em; -} -.mdui-typo h2 { - font-size: 1.8em; -} -.mdui-typo h3 { - font-size: 1.6em; -} -.mdui-typo h4 { - font-size: 1.4em; -} -.mdui-typo h5 { - font-size: 1.2em; -} -.mdui-typo h6 { - font-size: 1.1em; -} -.mdui-typo code { - padding: 2px 6px; - color: #c7254e; - background-color: #f7f7f9; - border-radius: 2px; -} -.mdui-typo pre code { - padding: 0; - font-size: inherit; - line-height: 1.7; - color: inherit; - background-color: transparent; - border-radius: 0; -} -.mdui-typo abbr[title] { - text-decoration: none; - cursor: help; - border-bottom: 1px dotted; -} -.mdui-typo ins { - text-decoration: none; - border-bottom: 1px solid ; -} -.mdui-typo u { - text-decoration: none; - border-bottom: 1px solid; -} -.mdui-typo del { - text-decoration: line-through; -} -.mdui-typo hr { - height: 10px; - margin-bottom: .8em; - border: none; - border-bottom: 1px solid rgba(0, 0, 0, .12); -} -.mdui-typo pre { - padding: 12px 16px; - overflow-x: auto; - -webkit-overflow-scrolling: touch; - border: 1px solid rgba(0, 0, 0, .12); - border-radius: 2px; -} -.mdui-typo kbd { - padding: 2px 6px; - font-size: 90%; - color: #fff; - background-color: #333; - border-radius: 2px; -} -.mdui-typo ul { - padding-left: 2em; - list-style: disc; -} -.mdui-typo ol { - padding-left: 2em; - list-style: decimal; -} -.mdui-typo li ul, -.mdui-typo li ol { - margin: .8em 0; -} -.mdui-typo li ul { - list-style: circle; -} -.mdui-typo img { - max-width: 100%; -} -/** - * ============================================================================= - * ************ Typo 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-typo a { - color: #ffd740; -} -.mdui-theme-accent-amber .mdui-typo a:before { - background-color: #ffd740; -} -.mdui-theme-accent-blue .mdui-typo a { - color: #448aff; -} -.mdui-theme-accent-blue .mdui-typo a:before { - background-color: #448aff; -} -.mdui-theme-accent-cyan .mdui-typo a { - color: #18ffff; -} -.mdui-theme-accent-cyan .mdui-typo a:before { - background-color: #18ffff; -} -.mdui-theme-accent-deep-orange .mdui-typo a { - color: #ff6e40; -} -.mdui-theme-accent-deep-orange .mdui-typo a:before { - background-color: #ff6e40; -} -.mdui-theme-accent-deep-purple .mdui-typo a { - color: #7c4dff; -} -.mdui-theme-accent-deep-purple .mdui-typo a:before { - background-color: #7c4dff; -} -.mdui-theme-accent-green .mdui-typo a { - color: #69f0ae; -} -.mdui-theme-accent-green .mdui-typo a:before { - background-color: #69f0ae; -} -.mdui-theme-accent-indigo .mdui-typo a { - color: #536dfe; -} -.mdui-theme-accent-indigo .mdui-typo a:before { - background-color: #536dfe; -} -.mdui-theme-accent-light-blue .mdui-typo a { - color: #40c4ff; -} -.mdui-theme-accent-light-blue .mdui-typo a:before { - background-color: #40c4ff; -} -.mdui-theme-accent-light-green .mdui-typo a { - color: #b2ff59; -} -.mdui-theme-accent-light-green .mdui-typo a:before { - background-color: #b2ff59; -} -.mdui-theme-accent-lime .mdui-typo a { - color: #eeff41; -} -.mdui-theme-accent-lime .mdui-typo a:before { - background-color: #eeff41; -} -.mdui-theme-accent-orange .mdui-typo a { - color: #ffab40; -} -.mdui-theme-accent-orange .mdui-typo a:before { - background-color: #ffab40; -} -.mdui-theme-accent-pink .mdui-typo a { - color: #ff4081; -} -.mdui-theme-accent-pink .mdui-typo a:before { - background-color: #ff4081; -} -.mdui-theme-accent-purple .mdui-typo a { - color: #e040fb; -} -.mdui-theme-accent-purple .mdui-typo a:before { - background-color: #e040fb; -} -.mdui-theme-accent-red .mdui-typo a { - color: #ff5252; -} -.mdui-theme-accent-red .mdui-typo a:before { - background-color: #ff5252; -} -.mdui-theme-accent-teal .mdui-typo a { - color: #64ffda; -} -.mdui-theme-accent-teal .mdui-typo a:before { - background-color: #64ffda; -} -.mdui-theme-accent-yellow .mdui-typo a { - color: #ff0; -} -.mdui-theme-accent-yellow .mdui-typo a:before { - background-color: #ff0; -} -/** - * ============================================================================= - * ************ Typo dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-typo blockquote { - border-left-color: rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-typo blockquote footer { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-typo figcaption { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-typo mark { - background: #aaa; - border-bottom-color: #bbb; -} -.mdui-theme-layout-dark .mdui-typo h1 small, -.mdui-theme-layout-dark .mdui-typo h2 small, -.mdui-theme-layout-dark .mdui-typo h3 small, -.mdui-theme-layout-dark .mdui-typo h4 small, -.mdui-theme-layout-dark .mdui-typo h5 small, -.mdui-theme-layout-dark .mdui-typo h6 small { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-typo code { - color: #ffcdd2; - background-color: #424242; -} -.mdui-theme-layout-dark .mdui-typo pre { - background: #424242; - border-color: rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-typo kbd { - background: #424242; -} -.mdui-theme-layout-dark .mdui-typo hr { - border-color: rgba(255, 255, 255, .12); -} -/** - * ============================================================================= - * ************ Headroom ************ - * ============================================================================= - */ -.mdui-headroom { - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1) !important; - transition: all .3s cubic-bezier(.4, 0, .2, 1) !important; -} -/* 固定在顶部时 */ -.mdui-headroom-pinned-top { - -webkit-transform: translate3d(0, 0, 0) !important; - transform: translate3d(0, 0, 0) !important; -} -/* 在顶部隐藏时 */ -.mdui-headroom-unpinned-top { - -webkit-box-shadow: none !important; - box-shadow: none !important; - -webkit-transform: translate3d(0, -100%, 0) !important; - transform: translate3d(0, -100%, 0) !important; -} -/* 固定在底部时 */ -.mdui-headroom-pinned-down { - -webkit-transform: translate3d(0, 0, 0) !important; - transform: translate3d(0, 0, 0) !important; -} -/* 在底部隐藏时 */ -.mdui-headroom-unpinned-down { - -webkit-box-shadow: none !important; - box-shadow: none !important; - -webkit-transform: translate3d(0, 100%, 0) !important; - transform: translate3d(0, 100%, 0) !important; -} -/* 固定应用栏中的工具栏 */ -.mdui-headroom-pinned-toolbar { - -webkit-transform: translate3d(0, 0, 0) !important; - transform: translate3d(0, 0, 0) !important; -} -/* 隐藏应用栏中的工具栏 */ -.mdui-headroom-unpinned-toolbar { - -webkit-transform: translate3d(0, -56px, 0) !important; - transform: translate3d(0, -56px, 0) !important; -} -@media (min-width: 600px) { - .mdui-headroom-unpinned-toolbar { - -webkit-transform: translate3d(0, -64px, 0) !important; - transform: translate3d(0, -64px, 0) !important; - } -} -@media (orientation: landscape) and (max-width: 959px) { - .mdui-headroom-unpinned-toolbar { - -webkit-transform: translate3d(0, -48px, 0) !important; - transform: translate3d(0, -48px, 0) !important; - } -} -/** - * ============================================================================= - * ************ Collapse 折叠插件 ************ - * ============================================================================= - */ -.mdui-collapse-item-header .mdui-collapse-item-arrow, -.mdui-collapse-item-header.mdui-collapse-item-arrow { - -webkit-transition: -webkit-transform .3s cubic-bezier(.4, 0, .2, 1); - transition: -webkit-transform .3s cubic-bezier(.4, 0, .2, 1); - transition: transform .3s cubic-bezier(.4, 0, .2, 1); - transition: transform .3s cubic-bezier(.4, 0, .2, 1), -webkit-transform .3s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: rotate(0); - transform: rotate(0); - - will-change: transform; -} -.mdui-collapse-item-body { - height: 0; - padding-top: 0; - padding-bottom: 0; - margin-top: 0; - margin-bottom: 0; - overflow: hidden; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1); - - will-change: height; -} -.mdui-collapse-item-body .mdui-list-item { - padding-left: 72px; -} -.mdui-collapse-item-open > .mdui-collapse-item-header .mdui-collapse-item-arrow, -.mdui-collapse-item-open > .mdui-collapse-item-header.mdui-collapse-item-arrow { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} -.mdui-collapse-item-open > .mdui-collapse-item-body { - height: auto; -} -/** - * ============================================================================= - * ************ Table 表格 ************ - * ============================================================================= - */ -.mdui-table { - position: relative; - width: 100%; - border-spacing: 0; - border-collapse: separate; - background-color: #fff; - border: 1px solid rgba(0, 0, 0, .12); - border-bottom: none; - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -.mdui-table tbody tr { - position: relative; - -webkit-transition: background-color .28s cubic-bezier(.4, 0, .2, 1); - transition: background-color .28s cubic-bezier(.4, 0, .2, 1); -} -.mdui-table th, -.mdui-table td { - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 12px 28px; - text-align: left; - vertical-align: middle; - border-bottom: 1px solid rgba(0, 0, 0, .12); -} -.mdui-table th:last-child, -.mdui-table td:last-child { - padding-right: 24px; -} -.mdui-table th:first-child, -.mdui-table td:first-child { - padding-right: 0; - padding-left: 24px; -} -.mdui-table th:nth-child(2), -.mdui-table td:nth-child(2) { - padding-left: 24px; -} -.mdui-table th { - overflow: hidden; - font-size: 13px; - font-weight: 700; - line-height: 32px; - color: rgba(0, 0, 0, .54); - text-overflow: ellipsis; - white-space: nowrap; -} -.mdui-table td { - font-size: 14px; - line-height: 24px; - color: rgba(0, 0, 0, .87); -} -/* 每一行前面的复选框 */ -.mdui-table-cell-checkbox { - padding-top: 0 !important; - padding-bottom: 0!important; - padding-left: 24px !important; -} -.mdui-table-cell-checkbox .mdui-checkbox { - margin-top: 7px; -} -.mdui-table-cell-checkbox + td, -.mdui-table-cell-checkbox + th { - padding-left: 6px !important; -} -th.mdui-table-cell-checkbox .mdui-checkbox { - margin-top: 11px; -} -/* 鼠标悬浮时行背景加深 */ -.mdui-table-hoverable tbody tr:hover { - background-color: #eee; -} -/* 表格放到该元素内,使表格产生滚动条时只在该元素内滚动 */ -.mdui-table-fluid { - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; - border: 1px solid rgba(0, 0, 0, .12); - border-bottom: none; - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -.mdui-table-fluid .mdui-table { - margin: 0; - border: none; - -webkit-box-shadow: none; - box-shadow: none; -} -/* 数字列,右对齐 */ -.mdui-table-col-numeric { - text-align: right !important; -} -/* 行处于选中状态 */ -.mdui-table-row-selected { - background-color: #f5f5f5; -} -/** - * ============================================================================= - * ************ Table dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-table { - background-color: #303030; - border: 1px solid rgba(255, 255, 255, .12); - border-bottom: none; -} -.mdui-theme-layout-dark .mdui-table th, -.mdui-theme-layout-dark .mdui-table td { - border-bottom: 1px solid rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-table th { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-table td { - color: #fff; -} -.mdui-theme-layout-dark .mdui-table-hoverable tbody tr:hover { - background-color: #616161; -} -.mdui-theme-layout-dark .mdui-table-fluid { - border: 1px solid rgba(255, 255, 255, .12); - border-bottom: none; -} -.mdui-theme-layout-dark .mdui-table-fluid .mdui-table { - border: none; - -webkit-box-shadow: none; - box-shadow: none; -} -.mdui-theme-layout-dark .mdui-table-row-selected { - background-color: #424242; -} -/** - * ============================================================================= - * ************ Divider 分割线 ************ - * ============================================================================= - */ -.mdui-divider, -.mdui-divider-light, -.mdui-divider-dark, -.mdui-divider-inset, -.mdui-divider-inset-light, -.mdui-divider-inset-dark { - height: 1px; - margin: -1px 0 0 0; - border: none; -} -.mdui-divider-inset, -.mdui-divider-inset-light, -.mdui-divider-inset-dark { - margin-left: 72px; -} -.mdui-divider, -.mdui-divider-inset { - background-color: rgba(0, 0, 0, .12); -} -.mdui-theme-layout-dark .mdui-divider, -.mdui-theme-layout-dark .mdui-divider-inset { - background-color: rgba(255, 255, 255, .12); -} -.mdui-divider-light, -.mdui-divider-inset-light { - background-color: rgba(255, 255, 255, .12); -} -.mdui-divider-dark, -.mdui-divider-inset-dark { - background-color: rgba(0, 0, 0, .12); -} -/** - * ============================================================================= - * ************ Media 媒体工具 ************ - * ============================================================================= - */ -/* 响应式图片和视频 */ -.mdui-img-fluid, -.mdui-video-fluid { - display: block; - max-width: 100%; - height: auto; -} -/* 圆角图片 */ -.mdui-img-rounded { - border-radius: 2px; -} -/* 圆形图片 */ -.mdui-img-circle { - border-radius: 50%; -} -.mdui-video-container { - position: relative; - height: 0; - padding-bottom: 56.25%; - overflow: hidden; -} -.mdui-video-container iframe, -.mdui-video-container object, -.mdui-video-container embed { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -/** - * ============================================================================= - * ************ 涟漪动画 ************ - * ============================================================================= - */ -.mdui-ripple { - position: relative; - overflow: hidden; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -/* Ripple */ -.mdui-ripple-wave { - position: absolute !important; - top: 0; - left: 0; - z-index: 1; - padding: 0; - margin: 0; - font-size: 0; - pointer-events: none; - background-color: rgba(0, 0, 0, .1); - border-radius: 50%; - -webkit-transition-duration: 1400ms; - transition-duration: 1400ms; - -webkit-transform: translate3d(0px, 0px, 0) scale(0); - transform: translate3d(0px, 0px, 0) scale(0); -} -/* 有背景色的默认使用白色涟漪 */ -.mdui-ripple[class*="mdui-color-"] .mdui-ripple-wave { - background-color: rgba(255, 255, 255, .3); -} -/* 白色涟漪 */ -.mdui-ripple-white .mdui-ripple-wave { - background-color: rgba(255, 255, 255, .3) !important; -} -/* 黑色涟漪 */ -.mdui-ripple-black .mdui-ripple-wave { - background-color: rgba(0, 0, 0, .1) !important; -} -.mdui-ripple-wave-fill { - opacity: .35; - -webkit-transition-duration: 300ms; - transition-duration: 300ms; -} -.mdui-ripple-wave-out { - opacity: 0; - -webkit-transition-duration: 600ms; - transition-duration: 600ms; -} -/** - * ============================================================================= - * ************ Ripple 颜色 ************ - * ============================================================================= - */ -.mdui-ripple-amber .mdui-ripple-wave { - background-color: rgba(255, 193, 7, .3) !important; -} -.mdui-ripple-blue .mdui-ripple-wave { - background-color: rgba(33, 150, 243, .3) !important; -} -.mdui-ripple-blue-grey .mdui-ripple-wave { - background-color: rgba(96, 125, 139, .3) !important; -} -.mdui-ripple-brown .mdui-ripple-wave { - background-color: rgba(121, 85, 72, .3) !important; -} -.mdui-ripple-cyan .mdui-ripple-wave { - background-color: rgba(0, 188, 212, .3) !important; -} -.mdui-ripple-deep-orange .mdui-ripple-wave { - background-color: rgba(255, 87, 34, .3) !important; -} -.mdui-ripple-deep-purple .mdui-ripple-wave { - background-color: rgba(103, 58, 183, .3) !important; -} -.mdui-ripple-green .mdui-ripple-wave { - background-color: rgba(76, 175, 80, .3) !important; -} -.mdui-ripple-grey .mdui-ripple-wave { - background-color: rgba(158, 158, 158, .3) !important; -} -.mdui-ripple-indigo .mdui-ripple-wave { - background-color: rgba(63, 81, 181, .3) !important; -} -.mdui-ripple-light-blue .mdui-ripple-wave { - background-color: rgba(3, 169, 244, .3) !important; -} -.mdui-ripple-light-green .mdui-ripple-wave { - background-color: rgba(139, 195, 74, .3) !important; -} -.mdui-ripple-lime .mdui-ripple-wave { - background-color: rgba(205, 220, 57, .3) !important; -} -.mdui-ripple-orange .mdui-ripple-wave { - background-color: rgba(255, 152, 0, .3) !important; -} -.mdui-ripple-pink .mdui-ripple-wave { - background-color: rgba(233, 30, 99, .3) !important; -} -.mdui-ripple-purple .mdui-ripple-wave { - background-color: rgba(156, 39, 176, .3) !important; -} -.mdui-ripple-red .mdui-ripple-wave { - background-color: rgba(244, 67, 54, .3) !important; -} -.mdui-ripple-teal .mdui-ripple-wave { - background-color: rgba(0, 150, 136, .3) !important; -} -.mdui-ripple-yellow .mdui-ripple-wave { - background-color: rgba(255, 235, 59, .3) !important; -} -/** - * ============================================================================= - * ************ Ripple dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-ripple-wave { - background-color: rgba(255, 255, 255, .3); -} -/** - * ============================================================================= - * ************ Text Field 文本框 ************ - * ============================================================================= - */ -/* 文本框外层 */ -.mdui-textfield { - position: relative; - padding-top: 16px; - padding-bottom: 8px; - overflow: hidden; -} -.mdui-textfield-has-bottom { - padding-bottom: 28px; -} -/* 输入框 */ -.mdui-textfield-input { - display: block; - width: 100%; - height: 36px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-appearance: none; - padding: 8px 0; - margin: 0; - overflow: hidden; - font-family: inherit; - font-size: 16px; - line-height: 20px; - color: rgba(0, 0, 0, .87); - resize: none; - background: none; - border: none; - border-bottom: 1px solid rgba(0, 0, 0, .42); - border-radius: 0; - outline: none; - -webkit-box-shadow: none; - box-shadow: none; - -webkit-transition-timing-function: cubic-bezier(.4, 0, .2, 1); - transition-timing-function: cubic-bezier(.4, 0, .2, 1); - -webkit-transition-duration: .2s; - transition-duration: .2s; - -webkit-transition-property: border-bottom-color, padding-right, -webkit-box-shadow; - transition-property: border-bottom-color, padding-right, -webkit-box-shadow; - transition-property: border-bottom-color, padding-right, box-shadow; - transition-property: border-bottom-color, padding-right, box-shadow, -webkit-box-shadow; - - -moz-appearance: none; - appearance: none; -} -.mdui-textfield-input::-webkit-input-placeholder { - color: inherit; - opacity: .42; -} -.mdui-textfield-input:not([disabled]):hover { - cursor: pointer; - border-bottom: 1px solid rgba(0, 0, 0, .87); - -webkit-box-shadow: 0 1px 0 0 rgba(0, 0, 0, .87); - box-shadow: 0 1px 0 0 rgba(0, 0, 0, .87); -} -.mdui-textfield-input[rows] { - height: auto !important; - overflow: auto; - -webkit-overflow-scrolling: touch; -} -/* 文本框 label */ -.mdui-textfield-label { - display: block; - width: 100%; - font-size: 16px; - color: rgba(0, 0, 0, .54); - pointer-events: none; - -webkit-transition: all .2s; - transition: all .2s; - -webkit-transform: scale(.75) translateY(0); - transform: scale(.75) translateY(0); - -webkit-transform-origin: left; - transform-origin: left; -} -/* 表单验证错误提示、帮助文本提示 */ -.mdui-textfield-error, -.mdui-textfield-helper { - position: absolute; - bottom: 8px; - height: 12px; - overflow: hidden; - font-size: 12px; - line-height: 12px; - text-overflow: ellipsis; - white-space: nowrap; -} -.mdui-textfield-error { - color: rgba(255, 23, 68, .87); - visibility: hidden; -} -.mdui-textfield-helper { - color: rgba(0, 0, 0, .54); -} -/* 表单中的图标 - ========== */ -.mdui-textfield .mdui-icon { - position: absolute; - bottom: 8px; - padding: 6px; - color: rgba(0, 0, 0, .54); -} -.mdui-textfield .mdui-icon ~ .mdui-textfield-label, -.mdui-textfield .mdui-icon ~ .mdui-textfield-input, -.mdui-textfield .mdui-icon ~ .mdui-textfield-error, -.mdui-textfield .mdui-icon ~ .mdui-textfield-helper, -.mdui-textfield .mdui-icon ~ .mdui-textfield-flex-wrap { - width: calc(100% - 56px); - margin-left: 56px; -} -.mdui-textfield-has-bottom .mdui-icon { - bottom: 28px; -} -/* 聚焦状态的文本框 - ============= */ -.mdui-textfield-focus .mdui-textfield-input, -.mdui-textfield-focus .mdui-textfield-input:hover { - border-bottom-color: #c51162; - -webkit-box-shadow: 0 1px 0 0 #c51162; - box-shadow: 0 1px 0 0 #c51162; -} -.mdui-textfield-focus .mdui-textfield-label, -.mdui-textfield-focus .mdui-icon { - color: rgba(197, 17, 98, .87); -} -/* 含有浮动标签的文本框 - ================ */ -.mdui-textfield-floating-label .mdui-textfield-label { - color: rgba(0, 0, 0, .35); - -webkit-transform: scale(1) translateY(27px); - transform: scale(1) translateY(27px); -} -.mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-textfield-floating-label.mdui-textfield-not-empty .mdui-textfield-label { - color: rgba(0, 0, 0, .65); - -webkit-transform: scale(.75) translateY(0); - transform: scale(.75) translateY(0); -} -.mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label { - color: #e91e63; -} -/* 可展开文本框,默认向右展开 - ========== */ -.mdui-textfield-expandable { - width: 36px; - min-height: 36px; - padding: 1px 0; - -webkit-transition: width .3s cubic-bezier(.4, 0, .2, 1); - transition: width .3s cubic-bezier(.4, 0, .2, 1); -} -.mdui-textfield-expandable .mdui-icon { - bottom: 0; - padding: 0; -} -.mdui-textfield-expandable .mdui-textfield-input { - width: calc(100% - 36px); - padding-right: 0; - margin-left: 36px; -} -.mdui-textfield-expandable .mdui-textfield-icon { - position: absolute; - top: 0; - left: 0; -} -.mdui-textfield-expandable .mdui-textfield-close { - position: absolute; - top: 0; - right: 0; - -webkit-transform: scale(0); - transform: scale(0); -} -.mdui-textfield-expandable.mdui-textfield-expanded { - width: 100%; -} -.mdui-textfield-expandable.mdui-textfield-expanded .mdui-textfield-input { - padding-right: 36px; -} -.mdui-textfield-expandable.mdui-textfield-expanded .mdui-textfield-close { - -webkit-transform: scale(1); - transform: scale(1); -} -/* 表单验证不通过 - =========== */ -.mdui-textfield-invalid .mdui-textfield-input, -.mdui-textfield-invalid-html5 .mdui-textfield-input, -.mdui-textfield-invalid.mdui-textfield-focus .mdui-textfield-input, -.mdui-textfield-invalid-html5.mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ff1744 !important; - -webkit-box-shadow: 0 1px 0 0 #ff1744 !important; - box-shadow: 0 1px 0 0 #ff1744 !important; -} -.mdui-textfield-invalid .mdui-textfield-label, -.mdui-textfield-invalid-html5 .mdui-textfield-label { - color: #ff1744 !important; -} -.mdui-textfield-invalid.mdui-textfield-floating-label .mdui-textfield-label, -.mdui-textfield-invalid-html5.mdui-textfield-floating-label .mdui-textfield-label { - color: rgba(255, 23, 68, .35) !important; -} -.mdui-textfield-invalid.mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-textfield-invalid-html5.mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-textfield-invalid.mdui-textfield-floating-label.mdui-textfield-not-empty .mdui-textfield-label, -.mdui-textfield-invalid-html5.mdui-textfield-floating-label.mdui-textfield-not-empty .mdui-textfield-label { - color: #ff1744 !important; -} -.mdui-textfield-invalid .mdui-textfield-error, -.mdui-textfield-invalid-html5 .mdui-textfield-error { - visibility: visible; -} -.mdui-textfield-invalid .mdui-textfield-error + .mdui-textfield-helper, -.mdui-textfield-invalid-html5 .mdui-textfield-error + .mdui-textfield-helper { - visibility: hidden; -} -/* 禁用表单 - ====== */ -.mdui-textfield-disabled .mdui-textfield-label, -.mdui-textfield-disabled .mdui-textfield-input::-webkit-input-placeholder { - color: rgba(0, 0, 0, .38); -} -.mdui-textfield-disabled .mdui-textfield-input { - color: rgba(0, 0, 0, .42); - cursor: default; -} -.mdui-textfield-disabled .mdui-textfield-input { - border-bottom: 1px dashed rgba(0, 0, 0, .42); -} -/* 字数统计 - ====== */ -.mdui-textfield-counter { - position: absolute; - right: 8px; - bottom: 8px; - height: 12px; - font-size: 12px; - line-height: 12px; - color: rgba(0, 0, 0, .54); -} -/** - * ============================================================================= - * ************ Textfield dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-textfield-input { - color: #fff; - border-bottom-color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-textfield-input::-webkit-input-placeholder { - color: rgba(255, 255, 255, .5); -} -.mdui-theme-layout-dark .mdui-textfield-input:not([disabled]):hover { - border-bottom-color: #fff; - -webkit-box-shadow: 0 1px 0 0 #fff; - box-shadow: 0 1px 0 0 #fff; -} -.mdui-theme-layout-dark .mdui-textfield .mdui-icon { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-textfield-label { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-textfield-floating-label .mdui-textfield-label { - color: rgba(255, 255, 255, .35); -} -.mdui-theme-layout-dark .mdui-textfield-error { - color: #ff1744; -} -.mdui-theme-layout-dark .mdui-textfield-helper { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-textfield-counter { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input, -.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input:hover { - border-bottom-color: #ff4081; - -webkit-box-shadow: 0 1px 0 0 #ff4081; - box-shadow: 0 1px 0 0 #ff4081; -} -.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label { - color: #ff4081; -} -.mdui-theme-layout-dark .mdui-textfield-disabled .mdui-textfield-label, -.mdui-theme-layout-dark .mdui-textfield-disabled .mdui-textfield-input::-webkit-input-placeholder { - color: rgba(255, 255, 255, .5); -} -.mdui-theme-layout-dark .mdui-textfield-disabled .mdui-textfield-input { - color: rgba(255, 255, 255, .5); -} -.mdui-theme-layout-dark .mdui-textfield-disabled .mdui-textfield-input { - border-bottom-color: rgba(255, 255, 255, .7); -} -/** - * ============================================================================= - * ************ Textfield 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ffab00; - -webkit-box-shadow: 0 1px 0 0 #ffab00; - box-shadow: 0 1px 0 0 #ffab00; -} -.mdui-theme-accent-amber .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-amber .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-amber .mdui-textfield-focus .mdui-icon { - color: rgba(255, 171, 0, .87); -} -.mdui-theme-accent-amber.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ffd740; - -webkit-box-shadow: 0 1px 0 0 #ffd740; - box-shadow: 0 1px 0 0 #ffd740; -} -.mdui-theme-accent-amber.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-amber.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-amber.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #ffd740; -} -.mdui-theme-accent-blue .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #2962ff; - -webkit-box-shadow: 0 1px 0 0 #2962ff; - box-shadow: 0 1px 0 0 #2962ff; -} -.mdui-theme-accent-blue .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-blue .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-blue .mdui-textfield-focus .mdui-icon { - color: rgba(41, 98, 255, .87); -} -.mdui-theme-accent-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #448aff; - -webkit-box-shadow: 0 1px 0 0 #448aff; - box-shadow: 0 1px 0 0 #448aff; -} -.mdui-theme-accent-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #448aff; -} -.mdui-theme-accent-cyan .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #00b8d4; - -webkit-box-shadow: 0 1px 0 0 #00b8d4; - box-shadow: 0 1px 0 0 #00b8d4; -} -.mdui-theme-accent-cyan .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-cyan .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-cyan .mdui-textfield-focus .mdui-icon { - color: rgba(0, 184, 212, .87); -} -.mdui-theme-accent-cyan.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #18ffff; - -webkit-box-shadow: 0 1px 0 0 #18ffff; - box-shadow: 0 1px 0 0 #18ffff; -} -.mdui-theme-accent-cyan.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-cyan.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-cyan.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #18ffff; -} -.mdui-theme-accent-deep-orange .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #dd2c00; - -webkit-box-shadow: 0 1px 0 0 #dd2c00; - box-shadow: 0 1px 0 0 #dd2c00; -} -.mdui-theme-accent-deep-orange .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-orange .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-orange .mdui-textfield-focus .mdui-icon { - color: rgba(221, 44, 0, .87); -} -.mdui-theme-accent-deep-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ff6e40; - -webkit-box-shadow: 0 1px 0 0 #ff6e40; - box-shadow: 0 1px 0 0 #ff6e40; -} -.mdui-theme-accent-deep-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #ff6e40; -} -.mdui-theme-accent-deep-purple .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #6200ea; - -webkit-box-shadow: 0 1px 0 0 #6200ea; - box-shadow: 0 1px 0 0 #6200ea; -} -.mdui-theme-accent-deep-purple .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-purple .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-purple .mdui-textfield-focus .mdui-icon { - color: rgba(98, 0, 234, .87); -} -.mdui-theme-accent-deep-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #7c4dff; - -webkit-box-shadow: 0 1px 0 0 #7c4dff; - box-shadow: 0 1px 0 0 #7c4dff; -} -.mdui-theme-accent-deep-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-deep-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #7c4dff; -} -.mdui-theme-accent-green .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #00c853; - -webkit-box-shadow: 0 1px 0 0 #00c853; - box-shadow: 0 1px 0 0 #00c853; -} -.mdui-theme-accent-green .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-green .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-green .mdui-textfield-focus .mdui-icon { - color: rgba(0, 200, 83, .87); -} -.mdui-theme-accent-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #69f0ae; - -webkit-box-shadow: 0 1px 0 0 #69f0ae; - box-shadow: 0 1px 0 0 #69f0ae; -} -.mdui-theme-accent-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #69f0ae; -} -.mdui-theme-accent-indigo .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #304ffe; - -webkit-box-shadow: 0 1px 0 0 #304ffe; - box-shadow: 0 1px 0 0 #304ffe; -} -.mdui-theme-accent-indigo .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-indigo .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-indigo .mdui-textfield-focus .mdui-icon { - color: rgba(48, 79, 254, .87); -} -.mdui-theme-accent-indigo.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #536dfe; - -webkit-box-shadow: 0 1px 0 0 #536dfe; - box-shadow: 0 1px 0 0 #536dfe; -} -.mdui-theme-accent-indigo.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-indigo.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-indigo.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #536dfe; -} -.mdui-theme-accent-light-blue .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #0091ea; - -webkit-box-shadow: 0 1px 0 0 #0091ea; - box-shadow: 0 1px 0 0 #0091ea; -} -.mdui-theme-accent-light-blue .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-blue .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-blue .mdui-textfield-focus .mdui-icon { - color: rgba(0, 145, 234, .87); -} -.mdui-theme-accent-light-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #40c4ff; - -webkit-box-shadow: 0 1px 0 0 #40c4ff; - box-shadow: 0 1px 0 0 #40c4ff; -} -.mdui-theme-accent-light-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-blue.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #40c4ff; -} -.mdui-theme-accent-light-green .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #64dd17; - -webkit-box-shadow: 0 1px 0 0 #64dd17; - box-shadow: 0 1px 0 0 #64dd17; -} -.mdui-theme-accent-light-green .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-green .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-green .mdui-textfield-focus .mdui-icon { - color: rgba(100, 221, 23, .87); -} -.mdui-theme-accent-light-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #b2ff59; - -webkit-box-shadow: 0 1px 0 0 #b2ff59; - box-shadow: 0 1px 0 0 #b2ff59; -} -.mdui-theme-accent-light-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-light-green.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #b2ff59; -} -.mdui-theme-accent-lime .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #aeea00; - -webkit-box-shadow: 0 1px 0 0 #aeea00; - box-shadow: 0 1px 0 0 #aeea00; -} -.mdui-theme-accent-lime .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-lime .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-lime .mdui-textfield-focus .mdui-icon { - color: rgba(174, 234, 0, .87); -} -.mdui-theme-accent-lime.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #eeff41; - -webkit-box-shadow: 0 1px 0 0 #eeff41; - box-shadow: 0 1px 0 0 #eeff41; -} -.mdui-theme-accent-lime.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-lime.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-lime.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #eeff41; -} -.mdui-theme-accent-orange .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ff6d00; - -webkit-box-shadow: 0 1px 0 0 #ff6d00; - box-shadow: 0 1px 0 0 #ff6d00; -} -.mdui-theme-accent-orange .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-orange .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-orange .mdui-textfield-focus .mdui-icon { - color: rgba(255, 109, 0, .87); -} -.mdui-theme-accent-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ffab40; - -webkit-box-shadow: 0 1px 0 0 #ffab40; - box-shadow: 0 1px 0 0 #ffab40; -} -.mdui-theme-accent-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-orange.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #ffab40; -} -.mdui-theme-accent-pink .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #c51162; - -webkit-box-shadow: 0 1px 0 0 #c51162; - box-shadow: 0 1px 0 0 #c51162; -} -.mdui-theme-accent-pink .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-pink .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-pink .mdui-textfield-focus .mdui-icon { - color: rgba(197, 17, 98, .87); -} -.mdui-theme-accent-pink.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ff4081; - -webkit-box-shadow: 0 1px 0 0 #ff4081; - box-shadow: 0 1px 0 0 #ff4081; -} -.mdui-theme-accent-pink.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-pink.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-pink.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #ff4081; -} -.mdui-theme-accent-purple .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #a0f; - -webkit-box-shadow: 0 1px 0 0 #a0f; - box-shadow: 0 1px 0 0 #a0f; -} -.mdui-theme-accent-purple .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-purple .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-purple .mdui-textfield-focus .mdui-icon { - color: rgba(170, 0, 255, .87); -} -.mdui-theme-accent-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #e040fb; - -webkit-box-shadow: 0 1px 0 0 #e040fb; - box-shadow: 0 1px 0 0 #e040fb; -} -.mdui-theme-accent-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-purple.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #e040fb; -} -.mdui-theme-accent-red .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #d50000; - -webkit-box-shadow: 0 1px 0 0 #d50000; - box-shadow: 0 1px 0 0 #d50000; -} -.mdui-theme-accent-red .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-red .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-red .mdui-textfield-focus .mdui-icon { - color: rgba(213, 0, 0, .87); -} -.mdui-theme-accent-red.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ff5252; - -webkit-box-shadow: 0 1px 0 0 #ff5252; - box-shadow: 0 1px 0 0 #ff5252; -} -.mdui-theme-accent-red.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-red.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-red.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #ff5252; -} -.mdui-theme-accent-teal .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #00bfa5; - -webkit-box-shadow: 0 1px 0 0 #00bfa5; - box-shadow: 0 1px 0 0 #00bfa5; -} -.mdui-theme-accent-teal .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-teal .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-teal .mdui-textfield-focus .mdui-icon { - color: rgba(0, 191, 165, .87); -} -.mdui-theme-accent-teal.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #64ffda; - -webkit-box-shadow: 0 1px 0 0 #64ffda; - box-shadow: 0 1px 0 0 #64ffda; -} -.mdui-theme-accent-teal.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-teal.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-teal.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #64ffda; -} -.mdui-theme-accent-yellow .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ffd600; - -webkit-box-shadow: 0 1px 0 0 #ffd600; - box-shadow: 0 1px 0 0 #ffd600; -} -.mdui-theme-accent-yellow .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-yellow .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-yellow .mdui-textfield-focus .mdui-icon { - color: rgba(255, 214, 0, .87); -} -.mdui-theme-accent-yellow.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-input { - border-bottom-color: #ff0; - -webkit-box-shadow: 0 1px 0 0 #ff0; - box-shadow: 0 1px 0 0 #ff0; -} -.mdui-theme-accent-yellow.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-yellow.mdui-theme-layout-dark .mdui-textfield-focus .mdui-textfield-floating-label.mdui-textfield-focus .mdui-textfield-label, -.mdui-theme-accent-yellow.mdui-theme-layout-dark .mdui-textfield-focus .mdui-icon { - color: #ff0; -} -/** - * ============================================================================= - * ************ Checkbox 复选框 ************ - * ============================================================================= - */ -.mdui-checkbox { - position: relative; - display: inline-block; - height: 36px; - padding-left: 36px; - line-height: 36px; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.mdui-checkbox input[type="checkbox"] { - position: absolute; - width: 0; - height: 0; - overflow: hidden; - opacity: 0; -} -/* 透明的圆形,用于生成圆形阴影 */ -.mdui-checkbox-icon { - position: absolute; - top: 9px; - left: 0; - display: inline-block; - width: 18px; - height: 18px; - vertical-align: middle; - background-color: transparent; - border: none; - border-radius: 18px; - -webkit-transition: -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .14s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); -} -.mdui-checkbox-icon:after { - position: absolute; - top: 0; - left: 0; - z-index: 0; - width: 18px; - height: 18px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - content: ' '; - border: 2px solid rgba(0, 0, 0, .54); - border-radius: 2px; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1); -} -.mdui-checkbox-icon:before { - position: absolute; - top: 2px; - left: 0; - z-index: 1; - width: 8px; - height: 13px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - content: ' '; - border-right: 2px solid #fff; - border-bottom: 2px solid #fff; - opacity: 0; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: rotateZ(37deg) scale(0); - transform: rotateZ(37deg) scale(0); - -webkit-transform-origin: 100% 100%; - transform-origin: 100% 100%; -} -/* 各种状态的图标 */ -.mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after { - background-color: #ff4081; - border-color: #ff4081; -} -.mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:before { - opacity: 1; - -webkit-transform: rotateZ(37deg) scale(1); - transform: rotateZ(37deg) scale(1); -} -.mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ff4081; - border-color: #ff4081; -} -.mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:before { - top: 8px; - left: 3px; - width: 12px; - height: 0; - border-right: none; - border-bottom: 2px solid #fff; - border-radius: 1px; - opacity: 1; - -webkit-transform: rotateZ(0) scale(1); - transform: rotateZ(0) scale(1); -} -.mdui-checkbox input[type="checkbox"]:disabled + .mdui-checkbox-icon:after { - border-color: rgba(0, 0, 0, .26); -} -.mdui-checkbox input[type="checkbox"]:disabled:checked + .mdui-checkbox-icon:after, -.mdui-checkbox input[type="checkbox"]:disabled:indeterminate + .mdui-checkbox-icon:after { - background-color: rgba(0, 0, 0, .26) !important; - border-color: transparent !important; -} -/* 阴影 */ -.mdui-checkbox:active input[type="checkbox"] + .mdui-checkbox-icon, -.mdui-checkbox input[type="checkbox"]:focus + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(0, 0, 0, .1); - box-shadow: 0 0 0 15px rgba(0, 0, 0, .1); -} -.mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); - box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); -} -/** - * ============================================================================= - * ************ Checkbox 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-amber .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ffd740; - border-color: #ffd740; -} -.mdui-theme-accent-amber .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-amber .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-amber .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-amber .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 215, 64, .16); - box-shadow: 0 0 0 15px rgba(255, 215, 64, .16); -} -.mdui-theme-accent-blue .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-blue .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #448aff; - border-color: #448aff; -} -.mdui-theme-accent-blue .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-blue .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-blue .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-blue .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(68, 138, 255, .16); - box-shadow: 0 0 0 15px rgba(68, 138, 255, .16); -} -.mdui-theme-accent-cyan .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-cyan .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #18ffff; - border-color: #18ffff; -} -.mdui-theme-accent-cyan .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-cyan .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-cyan .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-cyan .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(24, 255, 255, .16); - box-shadow: 0 0 0 15px rgba(24, 255, 255, .16); -} -.mdui-theme-accent-deep-orange .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-deep-orange .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ff6e40; - border-color: #ff6e40; -} -.mdui-theme-accent-deep-orange .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-deep-orange .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-deep-orange .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-deep-orange .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 110, 64, .16); - box-shadow: 0 0 0 15px rgba(255, 110, 64, .16); -} -.mdui-theme-accent-deep-purple .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-deep-purple .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #7c4dff; - border-color: #7c4dff; -} -.mdui-theme-accent-deep-purple .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-deep-purple .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-deep-purple .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-deep-purple .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(124, 77, 255, .16); - box-shadow: 0 0 0 15px rgba(124, 77, 255, .16); -} -.mdui-theme-accent-green .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-green .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #69f0ae; - border-color: #69f0ae; -} -.mdui-theme-accent-green .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-green .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-green .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-green .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(105, 240, 174, .16); - box-shadow: 0 0 0 15px rgba(105, 240, 174, .16); -} -.mdui-theme-accent-indigo .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-indigo .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #536dfe; - border-color: #536dfe; -} -.mdui-theme-accent-indigo .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-indigo .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-indigo .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-indigo .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(83, 109, 254, .16); - box-shadow: 0 0 0 15px rgba(83, 109, 254, .16); -} -.mdui-theme-accent-light-blue .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-light-blue .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #40c4ff; - border-color: #40c4ff; -} -.mdui-theme-accent-light-blue .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-light-blue .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-light-blue .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-light-blue .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(64, 196, 255, .16); - box-shadow: 0 0 0 15px rgba(64, 196, 255, .16); -} -.mdui-theme-accent-light-green .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-light-green .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #b2ff59; - border-color: #b2ff59; -} -.mdui-theme-accent-light-green .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-light-green .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-light-green .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-light-green .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(178, 255, 89, .16); - box-shadow: 0 0 0 15px rgba(178, 255, 89, .16); -} -.mdui-theme-accent-lime .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-lime .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #eeff41; - border-color: #eeff41; -} -.mdui-theme-accent-lime .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-lime .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-lime .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-lime .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(238, 255, 65, .16); - box-shadow: 0 0 0 15px rgba(238, 255, 65, .16); -} -.mdui-theme-accent-orange .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-orange .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ffab40; - border-color: #ffab40; -} -.mdui-theme-accent-orange .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-orange .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-orange .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-orange .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 171, 64, .16); - box-shadow: 0 0 0 15px rgba(255, 171, 64, .16); -} -.mdui-theme-accent-pink .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-pink .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ff4081; - border-color: #ff4081; -} -.mdui-theme-accent-pink .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-pink .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-pink .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-pink .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); - box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); -} -.mdui-theme-accent-purple .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-purple .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #e040fb; - border-color: #e040fb; -} -.mdui-theme-accent-purple .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-purple .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-purple .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-purple .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(224, 64, 251, .16); - box-shadow: 0 0 0 15px rgba(224, 64, 251, .16); -} -.mdui-theme-accent-red .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-red .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ff5252; - border-color: #ff5252; -} -.mdui-theme-accent-red .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-red .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-red .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-red .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 82, 82, .16); - box-shadow: 0 0 0 15px rgba(255, 82, 82, .16); -} -.mdui-theme-accent-teal .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-teal .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #64ffda; - border-color: #64ffda; -} -.mdui-theme-accent-teal .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-teal .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-teal .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-teal .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(100, 255, 218, .16); - box-shadow: 0 0 0 15px rgba(100, 255, 218, .16); -} -.mdui-theme-accent-yellow .mdui-checkbox input[type="checkbox"]:checked + .mdui-checkbox-icon:after, -.mdui-theme-accent-yellow .mdui-checkbox input[type="checkbox"]:indeterminate + .mdui-checkbox-icon:after { - background-color: #ff0; - border-color: #ff0; -} -.mdui-theme-accent-yellow .mdui-checkbox:active input[type="checkbox"]:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-yellow .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):checked + .mdui-checkbox-icon, -.mdui-theme-accent-yellow .mdui-checkbox:active input[type="checkbox"]:not(:disabled):indeterminate + .mdui-checkbox-icon, -.mdui-theme-accent-yellow .mdui-checkbox input[type="checkbox"]:focus:not(:disabled):indeterminate + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 255, 0, .16); - box-shadow: 0 0 0 15px rgba(255, 255, 0, .16); -} -/** - * ============================================================================= - * ************ Checkbox dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-checkbox-icon:after { - border-color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-checkbox-icon:before { - border-right-color: #303030 !important; - border-bottom-color: #303030 !important; -} -.mdui-theme-layout-dark .mdui-checkbox input[type="checkbox"]:disabled + .mdui-checkbox-icon:after { - border-color: rgba(255, 255, 255, .3); -} -.mdui-theme-layout-dark .mdui-checkbox input[type="checkbox"]:disabled:checked + .mdui-checkbox-icon:after, -.mdui-theme-layout-dark .mdui-checkbox input[type="checkbox"]:disabled:indeterminate + .mdui-checkbox-icon:after { - background-color: rgba(255, 255, 255, .3) !important; - border-color: transparent !important; -} -.mdui-theme-layout-dark .mdui-checkbox:active input[type="checkbox"] + .mdui-checkbox-icon, -.mdui-theme-layout-dark .mdui-checkbox input[type="checkbox"]:focus + .mdui-checkbox-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 255, 255, .1); - box-shadow: 0 0 0 15px rgba(255, 255, 255, .1); -} -/** - * ============================================================================= - * ************ Radio 单选框 ************ - * ============================================================================= - */ -.mdui-radio { - position: relative; - display: inline-block; - height: 36px; - padding-left: 36px; - line-height: 36px; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.mdui-radio input { - position: absolute; - width: 0; - height: 0; - overflow: hidden; - opacity: 0; -} -/* 图标外圈 */ -.mdui-radio-icon { - position: absolute; - top: 9px; - left: 0; - display: inline-block; - width: 18px; - height: 18px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - vertical-align: middle; - border: 2px solid rgba(0, 0, 0, .54); - border-radius: 18px; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1), box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1), box-shadow .14s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); -} -.mdui-radio-icon:before { - position: absolute; - top: 0; - left: 0; - width: 14px; - height: 14px; - content: ' '; - background-color: #ff4081; - border-radius: 14px; - opacity: 0; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: scale(0); - transform: scale(0); -} -/* 选中状态的图标 */ -.mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ff4081; -} -.mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - opacity: 1; - -webkit-transform: scale(.68); - transform: scale(.68); -} -/* 禁用状态的图标 */ -.mdui-radio input[type="radio"]:disabled + .mdui-radio-icon { - border-color: rgba(0, 0, 0, .26) !important; -} -/* 禁用且选中状态的图标 */ -.mdui-radio input[type="radio"]:disabled:checked + .mdui-radio-icon:before { - background-color: rgba(0, 0, 0, .26) !important; -} -/* 未选中、禁用时 按下的阴影 */ -.mdui-radio:active input[type="radio"] + .mdui-radio-icon, -.mdui-radio input[type="radio"]:focus + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(0, 0, 0, .1); - box-shadow: 0 0 0 15px rgba(0, 0, 0, .1); -} -/* 已选中时按下的阴影 */ -.mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); - box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); -} -/** - * ============================================================================= - * ************ Radio 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ffd740; -} -.mdui-theme-accent-amber .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #ffd740; -} -.mdui-theme-accent-amber .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-amber .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 215, 64, .16); - box-shadow: 0 0 0 15px rgba(255, 215, 64, .16); -} -.mdui-theme-accent-blue .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #448aff; -} -.mdui-theme-accent-blue .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #448aff; -} -.mdui-theme-accent-blue .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-blue .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(68, 138, 255, .16); - box-shadow: 0 0 0 15px rgba(68, 138, 255, .16); -} -.mdui-theme-accent-cyan .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #18ffff; -} -.mdui-theme-accent-cyan .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #18ffff; -} -.mdui-theme-accent-cyan .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-cyan .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(24, 255, 255, .16); - box-shadow: 0 0 0 15px rgba(24, 255, 255, .16); -} -.mdui-theme-accent-deep-orange .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ff6e40; -} -.mdui-theme-accent-deep-orange .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #ff6e40; -} -.mdui-theme-accent-deep-orange .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-deep-orange .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 110, 64, .16); - box-shadow: 0 0 0 15px rgba(255, 110, 64, .16); -} -.mdui-theme-accent-deep-purple .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #7c4dff; -} -.mdui-theme-accent-deep-purple .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #7c4dff; -} -.mdui-theme-accent-deep-purple .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-deep-purple .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(124, 77, 255, .16); - box-shadow: 0 0 0 15px rgba(124, 77, 255, .16); -} -.mdui-theme-accent-green .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #69f0ae; -} -.mdui-theme-accent-green .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #69f0ae; -} -.mdui-theme-accent-green .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-green .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(105, 240, 174, .16); - box-shadow: 0 0 0 15px rgba(105, 240, 174, .16); -} -.mdui-theme-accent-indigo .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #536dfe; -} -.mdui-theme-accent-indigo .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #536dfe; -} -.mdui-theme-accent-indigo .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-indigo .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(83, 109, 254, .16); - box-shadow: 0 0 0 15px rgba(83, 109, 254, .16); -} -.mdui-theme-accent-light-blue .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #40c4ff; -} -.mdui-theme-accent-light-blue .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #40c4ff; -} -.mdui-theme-accent-light-blue .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-light-blue .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(64, 196, 255, .16); - box-shadow: 0 0 0 15px rgba(64, 196, 255, .16); -} -.mdui-theme-accent-light-green .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #b2ff59; -} -.mdui-theme-accent-light-green .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #b2ff59; -} -.mdui-theme-accent-light-green .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-light-green .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(178, 255, 89, .16); - box-shadow: 0 0 0 15px rgba(178, 255, 89, .16); -} -.mdui-theme-accent-lime .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #eeff41; -} -.mdui-theme-accent-lime .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #eeff41; -} -.mdui-theme-accent-lime .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-lime .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(238, 255, 65, .16); - box-shadow: 0 0 0 15px rgba(238, 255, 65, .16); -} -.mdui-theme-accent-orange .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ffab40; -} -.mdui-theme-accent-orange .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #ffab40; -} -.mdui-theme-accent-orange .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-orange .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 171, 64, .16); - box-shadow: 0 0 0 15px rgba(255, 171, 64, .16); -} -.mdui-theme-accent-pink .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ff4081; -} -.mdui-theme-accent-pink .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #ff4081; -} -.mdui-theme-accent-pink .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-pink .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); - box-shadow: 0 0 0 15px rgba(255, 64, 129, .16); -} -.mdui-theme-accent-purple .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #e040fb; -} -.mdui-theme-accent-purple .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #e040fb; -} -.mdui-theme-accent-purple .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-purple .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(224, 64, 251, .16); - box-shadow: 0 0 0 15px rgba(224, 64, 251, .16); -} -.mdui-theme-accent-red .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ff5252; -} -.mdui-theme-accent-red .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #ff5252; -} -.mdui-theme-accent-red .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-red .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 82, 82, .16); - box-shadow: 0 0 0 15px rgba(255, 82, 82, .16); -} -.mdui-theme-accent-teal .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #64ffda; -} -.mdui-theme-accent-teal .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #64ffda; -} -.mdui-theme-accent-teal .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-teal .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(100, 255, 218, .16); - box-shadow: 0 0 0 15px rgba(100, 255, 218, .16); -} -.mdui-theme-accent-yellow .mdui-radio input[type="radio"]:checked + .mdui-radio-icon { - border-color: #ff0; -} -.mdui-theme-accent-yellow .mdui-radio input[type="radio"]:checked + .mdui-radio-icon:before { - background-color: #ff0; -} -.mdui-theme-accent-yellow .mdui-radio:active input[type="radio"]:checked:not(:disabled) + .mdui-radio-icon, -.mdui-theme-accent-yellow .mdui-radio input[type="radio"]:focus:checked:not(:disabled) + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 255, 0, .16); - box-shadow: 0 0 0 15px rgba(255, 255, 0, .16); -} -/** - * ============================================================================= - * ************ Radio dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-radio-icon { - border-color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-radio input[type="radio"]:disabled + .mdui-radio-icon { - border-color: rgba(255, 255, 255, .3) !important; -} -.mdui-theme-layout-dark .mdui-radio input[type="radio"]:disabled:checked + .mdui-radio-icon:before { - background-color: rgba(255, 255, 255, .3) !important; -} -.mdui-theme-layout-dark .mdui-radio:active input[type="radio"] + .mdui-radio-icon, -.mdui-theme-layout-dark .mdui-radio input[type="radio"]:focus + .mdui-radio-icon { - -webkit-box-shadow: 0 0 0 15px rgba(255, 255, 255, .1); - box-shadow: 0 0 0 15px rgba(255, 255, 255, .1); -} -/** - * ============================================================================= - * ************ Switch 单选框 ************ - * ============================================================================= - */ -.mdui-switch { - display: inline-block; - height: 36px; - line-height: 36px; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.mdui-switch input { - position: absolute; - width: 0; - height: 0; - overflow: hidden; - opacity: 0; -} -/* 图标轨道 */ -.mdui-switch-icon { - position: relative; - display: inline-block; - width: 36px; - height: 14px; - vertical-align: middle; - background-color: rgba(0, 0, 0, .38); - border-radius: 14px; - -webkit-transition: background-color .3s cubic-bezier(.4, 0, .2, 1); - transition: background-color .3s cubic-bezier(.4, 0, .2, 1); -} -.mdui-switch-icon:before { - position: absolute; - top: -3px; - left: -3px; - display: inline-block; - width: 20px; - height: 20px; - content: ' '; - background-color: #fafafa; - border-radius: 20px; - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12); - -webkit-transition: background-color .3s cubic-bezier(.4, 0, .2, 1), left .3s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: background-color .3s cubic-bezier(.4, 0, .2, 1), left .3s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .14s cubic-bezier(.4, 0, .2, 1), background-color .3s cubic-bezier(.4, 0, .2, 1), left .3s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .14s cubic-bezier(.4, 0, .2, 1), background-color .3s cubic-bezier(.4, 0, .2, 1), left .3s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .14s cubic-bezier(.4, 0, .2, 1); -} -/* 选中状态的图标 */ -.mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 64, 129, .5); -} -.mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - left: 20px; - background-color: #ff4081; -} -/* 未选中时或禁用时 按下的阴影 */ -.mdui-switch:active input[type="checkbox"] + .mdui-switch-icon:before, -.mdui-switch input[type="checkbox"]:focus + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(0, 0, 0, .1); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(0, 0, 0, .1); -} -/* 已选中时按下的阴影 */ -.mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 64, 129, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 64, 129, .16); -} -/* 禁用状态 */ -.mdui-switch input[type="checkbox"]:disabled + .mdui-switch-icon { - background-color: rgba(0, 0, 0, .12) !important; -} -.mdui-switch input[type="checkbox"]:disabled + .mdui-switch-icon:before { - background-color: #bdbdbd !important; -} -/** - * ============================================================================= - * ************ Switch 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 215, 64, .5); -} -.mdui-theme-accent-amber .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ffd740; -} -.mdui-theme-accent-amber .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-amber .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 215, 64, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 215, 64, .16); -} -.mdui-theme-accent-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(68, 138, 255, .5); -} -.mdui-theme-accent-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #448aff; -} -.mdui-theme-accent-blue .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-blue .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(68, 138, 255, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(68, 138, 255, .16); -} -.mdui-theme-accent-cyan .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(24, 255, 255, .5); -} -.mdui-theme-accent-cyan .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #18ffff; -} -.mdui-theme-accent-cyan .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-cyan .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(24, 255, 255, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(24, 255, 255, .16); -} -.mdui-theme-accent-deep-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 110, 64, .5); -} -.mdui-theme-accent-deep-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff6e40; -} -.mdui-theme-accent-deep-orange .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-deep-orange .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 110, 64, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 110, 64, .16); -} -.mdui-theme-accent-deep-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(124, 77, 255, .5); -} -.mdui-theme-accent-deep-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #7c4dff; -} -.mdui-theme-accent-deep-purple .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-deep-purple .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(124, 77, 255, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(124, 77, 255, .16); -} -.mdui-theme-accent-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(105, 240, 174, .5); -} -.mdui-theme-accent-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #69f0ae; -} -.mdui-theme-accent-green .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-green .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(105, 240, 174, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(105, 240, 174, .16); -} -.mdui-theme-accent-indigo .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(83, 109, 254, .5); -} -.mdui-theme-accent-indigo .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #536dfe; -} -.mdui-theme-accent-indigo .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-indigo .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(83, 109, 254, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(83, 109, 254, .16); -} -.mdui-theme-accent-light-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(64, 196, 255, .5); -} -.mdui-theme-accent-light-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #40c4ff; -} -.mdui-theme-accent-light-blue .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-light-blue .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(64, 196, 255, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(64, 196, 255, .16); -} -.mdui-theme-accent-light-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(178, 255, 89, .5); -} -.mdui-theme-accent-light-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #b2ff59; -} -.mdui-theme-accent-light-green .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-light-green .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(178, 255, 89, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(178, 255, 89, .16); -} -.mdui-theme-accent-lime .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(238, 255, 65, .5); -} -.mdui-theme-accent-lime .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #eeff41; -} -.mdui-theme-accent-lime .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-lime .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(238, 255, 65, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(238, 255, 65, .16); -} -.mdui-theme-accent-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 171, 64, .5); -} -.mdui-theme-accent-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ffab40; -} -.mdui-theme-accent-orange .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-orange .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 171, 64, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 171, 64, .16); -} -.mdui-theme-accent-pink .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 64, 129, .5); -} -.mdui-theme-accent-pink .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff4081; -} -.mdui-theme-accent-pink .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-pink .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 64, 129, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 64, 129, .16); -} -.mdui-theme-accent-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(224, 64, 251, .5); -} -.mdui-theme-accent-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #e040fb; -} -.mdui-theme-accent-purple .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-purple .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(224, 64, 251, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(224, 64, 251, .16); -} -.mdui-theme-accent-red .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 82, 82, .5); -} -.mdui-theme-accent-red .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff5252; -} -.mdui-theme-accent-red .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-red .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 82, 82, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 82, 82, .16); -} -.mdui-theme-accent-teal .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(100, 255, 218, .5); -} -.mdui-theme-accent-teal .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #64ffda; -} -.mdui-theme-accent-teal .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-teal .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(100, 255, 218, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(100, 255, 218, .16); -} -.mdui-theme-accent-yellow .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 255, 0, .5); -} -.mdui-theme-accent-yellow .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff0; -} -.mdui-theme-accent-yellow .mdui-switch:active input[type="checkbox"]:checked:not(:disabled) + .mdui-switch-icon:before, -.mdui-theme-accent-yellow .mdui-switch input[type="checkbox"]:focus:checked:not(:disabled) + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 255, 0, .16); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 255, 0, .16); -} -/** - * ============================================================================= - * ************ Radio dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-switch-icon { - background-color: rgba(255, 255, 255, .3); -} -.mdui-theme-layout-dark .mdui-switch-icon:before { - background-color: #bdbdbd; -} -.mdui-theme-layout-dark.mdui-theme-accent-amber .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 229, 127, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-amber .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ffe57f; -} -.mdui-theme-layout-dark.mdui-theme-accent-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(130, 177, 255, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #82b1ff; -} -.mdui-theme-layout-dark.mdui-theme-accent-cyan .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(132, 255, 255, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-cyan .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #84ffff; -} -.mdui-theme-layout-dark.mdui-theme-accent-deep-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 158, 128, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-deep-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff9e80; -} -.mdui-theme-layout-dark.mdui-theme-accent-deep-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(179, 136, 255, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-deep-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #b388ff; -} -.mdui-theme-layout-dark.mdui-theme-accent-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(185, 246, 202, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #b9f6ca; -} -.mdui-theme-layout-dark.mdui-theme-accent-indigo .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(140, 158, 255, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-indigo .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #8c9eff; -} -.mdui-theme-layout-dark.mdui-theme-accent-light-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(128, 216, 255, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-light-blue .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #80d8ff; -} -.mdui-theme-layout-dark.mdui-theme-accent-light-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(204, 255, 144, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-light-green .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ccff90; -} -.mdui-theme-layout-dark.mdui-theme-accent-lime .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(244, 255, 129, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-lime .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #f4ff81; -} -.mdui-theme-layout-dark.mdui-theme-accent-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 209, 128, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-orange .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ffd180; -} -.mdui-theme-layout-dark.mdui-theme-accent-pink .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 128, 171, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-pink .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff80ab; -} -.mdui-theme-layout-dark.mdui-theme-accent-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(234, 128, 252, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-purple .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ea80fc; -} -.mdui-theme-layout-dark.mdui-theme-accent-red .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 138, 128, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-red .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ff8a80; -} -.mdui-theme-layout-dark.mdui-theme-accent-teal .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(167, 255, 235, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-teal .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #a7ffeb; -} -.mdui-theme-layout-dark.mdui-theme-accent-yellow .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon { - background-color: rgba(255, 255, 141, .5); -} -.mdui-theme-layout-dark.mdui-theme-accent-yellow .mdui-switch input[type="checkbox"]:checked + .mdui-switch-icon:before { - background-color: #ffff8d; -} -.mdui-theme-layout-dark .mdui-switch:active input[type="checkbox"] + .mdui-switch-icon:before, -.mdui-theme-layout-dark .mdui-switch input[type="checkbox"]:focus + .mdui-switch-icon:before { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 255, 255, .1); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 0 15px rgba(255, 255, 255, .1); -} -.mdui-theme-layout-dark .mdui-switch input[type="checkbox"]:disabled + .mdui-switch-icon { - background-color: rgba(255, 255, 255, .1) !important; -} -.mdui-theme-layout-dark .mdui-switch input[type="checkbox"]:disabled + .mdui-switch-icon:before { - background-color: #424242 !important; -} -/** - * ============================================================================= - * ************ Slider 滑块 ************ - * ============================================================================= - */ -.mdui-slider { - position: relative; - display: block; - width: 100%; - height: 36px; -} -.mdui-slider input[type="range"] { - position: absolute; - top: 50%; - z-index: 2; - width: 100%; - height: 20px; - -webkit-appearance: none; - margin-top: -10px; - cursor: pointer; - opacity: 0; - - -moz-appearance: none; - appearance: none; -} -.mdui-slider-track, -.mdui-slider-fill { - position: absolute; - top: 50%; - height: 2px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin-top: -1px; -} -.mdui-slider-track:before, -.mdui-slider-fill:before { - display: block; - width: 100%; - height: 100%; - content: ' '; -} -/* 轨道 */ -.mdui-slider-track { - right: 0; -} -.mdui-slider-track:before { - background-color: #bdbdbd; - -webkit-transition: background-color .3s cubic-bezier(.4, 0, .2, 1); - transition: background-color .3s cubic-bezier(.4, 0, .2, 1); -} -/* 已滑动部分 */ -.mdui-slider-fill { - left: 0; -} -.mdui-slider-fill:before { - background-color: #ff4081; -} -/* 滑块 */ -.mdui-slider-thumb { - position: absolute; - top: 50%; - width: 12px; - height: 12px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin-top: -6px; - background-color: #ff4081; - border: 2px solid #ff4081; - border-radius: 50%; - -webkit-transition: background .45s cubic-bezier(.4, 0, .2, 1), border-color .45s cubic-bezier(.4, 0, .2, 1), border-radius .2s cubic-bezier(.4, 0, .2, 1), -webkit-transform .2s cubic-bezier(.4, 0, .2, 1); - transition: background .45s cubic-bezier(.4, 0, .2, 1), border-color .45s cubic-bezier(.4, 0, .2, 1), border-radius .2s cubic-bezier(.4, 0, .2, 1), -webkit-transform .2s cubic-bezier(.4, 0, .2, 1); - transition: background .45s cubic-bezier(.4, 0, .2, 1), border-color .45s cubic-bezier(.4, 0, .2, 1), transform .2s cubic-bezier(.4, 0, .2, 1), border-radius .2s cubic-bezier(.4, 0, .2, 1); - transition: background .45s cubic-bezier(.4, 0, .2, 1), border-color .45s cubic-bezier(.4, 0, .2, 1), transform .2s cubic-bezier(.4, 0, .2, 1), border-radius .2s cubic-bezier(.4, 0, .2, 1), -webkit-transform .2s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: translate(-50%); - transform: translate(-50%); - - will-change: background, border-color, transform, border-radius; -} -/** - * ============================================================================= - * ************ Slider 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-slider-fill:before { - background-color: #ffd740; -} -.mdui-theme-accent-amber .mdui-slider-thumb { - background-color: #ffd740; - border: 2px solid #ffd740; -} -.mdui-theme-accent-blue .mdui-slider-fill:before { - background-color: #448aff; -} -.mdui-theme-accent-blue .mdui-slider-thumb { - background-color: #448aff; - border: 2px solid #448aff; -} -.mdui-theme-accent-cyan .mdui-slider-fill:before { - background-color: #18ffff; -} -.mdui-theme-accent-cyan .mdui-slider-thumb { - background-color: #18ffff; - border: 2px solid #18ffff; -} -.mdui-theme-accent-deep-orange .mdui-slider-fill:before { - background-color: #ff6e40; -} -.mdui-theme-accent-deep-orange .mdui-slider-thumb { - background-color: #ff6e40; - border: 2px solid #ff6e40; -} -.mdui-theme-accent-deep-purple .mdui-slider-fill:before { - background-color: #7c4dff; -} -.mdui-theme-accent-deep-purple .mdui-slider-thumb { - background-color: #7c4dff; - border: 2px solid #7c4dff; -} -.mdui-theme-accent-green .mdui-slider-fill:before { - background-color: #69f0ae; -} -.mdui-theme-accent-green .mdui-slider-thumb { - background-color: #69f0ae; - border: 2px solid #69f0ae; -} -.mdui-theme-accent-indigo .mdui-slider-fill:before { - background-color: #536dfe; -} -.mdui-theme-accent-indigo .mdui-slider-thumb { - background-color: #536dfe; - border: 2px solid #536dfe; -} -.mdui-theme-accent-light-blue .mdui-slider-fill:before { - background-color: #40c4ff; -} -.mdui-theme-accent-light-blue .mdui-slider-thumb { - background-color: #40c4ff; - border: 2px solid #40c4ff; -} -.mdui-theme-accent-light-green .mdui-slider-fill:before { - background-color: #b2ff59; -} -.mdui-theme-accent-light-green .mdui-slider-thumb { - background-color: #b2ff59; - border: 2px solid #b2ff59; -} -.mdui-theme-accent-lime .mdui-slider-fill:before { - background-color: #eeff41; -} -.mdui-theme-accent-lime .mdui-slider-thumb { - background-color: #eeff41; - border: 2px solid #eeff41; -} -.mdui-theme-accent-orange .mdui-slider-fill:before { - background-color: #ffab40; -} -.mdui-theme-accent-orange .mdui-slider-thumb { - background-color: #ffab40; - border: 2px solid #ffab40; -} -.mdui-theme-accent-pink .mdui-slider-fill:before { - background-color: #ff4081; -} -.mdui-theme-accent-pink .mdui-slider-thumb { - background-color: #ff4081; - border: 2px solid #ff4081; -} -.mdui-theme-accent-purple .mdui-slider-fill:before { - background-color: #e040fb; -} -.mdui-theme-accent-purple .mdui-slider-thumb { - background-color: #e040fb; - border: 2px solid #e040fb; -} -.mdui-theme-accent-red .mdui-slider-fill:before { - background-color: #ff5252; -} -.mdui-theme-accent-red .mdui-slider-thumb { - background-color: #ff5252; - border: 2px solid #ff5252; -} -.mdui-theme-accent-teal .mdui-slider-fill:before { - background-color: #64ffda; -} -.mdui-theme-accent-teal .mdui-slider-thumb { - background-color: #64ffda; - border: 2px solid #64ffda; -} -.mdui-theme-accent-yellow .mdui-slider-fill:before { - background-color: #ff0; -} -.mdui-theme-accent-yellow .mdui-slider-thumb { - background-color: #ff0; - border: 2px solid #ff0; -} -/** - * ============================================================================= - * ============ Slider 的不同状态 ============ - * ============================================================================= - */ -/* 鼠标按下状态 */ -.mdui-slider-focus .mdui-slider-track:before { - background-color: #9e9e9e; -} -.mdui-slider-focus .mdui-slider-thumb { - -webkit-transform: translate(-50%) scale(1.6); - transform: translate(-50%) scale(1.6); -} -/* 滑块值为 0 */ -.mdui-slider-zero .mdui-slider-thumb { - background-color: #fff; - border-color: #bdbdbd; -} -/* 滑块值为 0,且鼠标按下 */ -.mdui-slider-zero.mdui-slider-focus .mdui-slider-thumb { - border-color: #9e9e9e; -} -/* 禁用状态 */ -.mdui-slider-disabled input[type="range"] { - cursor: default; -} -.mdui-slider-disabled .mdui-slider-track:before { - background-color: #bdbdbd; -} -.mdui-slider-disabled .mdui-slider-fill:before { - background-color: #bdbdbd; -} -.mdui-slider-disabled .mdui-slider-thumb { - background-color: #bdbdbd; - border-color: transparent !important; - -webkit-transform: translate(-50%) scale(.72); - transform: translate(-50%) scale(.72); -} -/** - * ============================================================================= - * ============ 间续型滑块 ============ - * ============================================================================= - */ -.mdui-slider-discrete .mdui-slider-thumb { - width: 30px; - height: 30px; - margin-top: -15px; - margin-left: -15px; - border: none; - -webkit-transform: rotate(-45deg) scale(.4); - transform: rotate(-45deg) scale(.4); -} -.mdui-slider-discrete .mdui-slider-thumb span { - position: absolute; - top: 9px; - left: -1px; - width: 100%; - font-size: 12px; - color: #fff; - text-align: center; - opacity: 0; - -webkit-transition: opacity .25s cubic-bezier(.4, 0, .2, 1); - transition: opacity .25s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); -} -.mdui-slider-discrete.mdui-slider-focus .mdui-slider-thumb { - border-radius: 15px 15px 15px 0; - -webkit-transform: rotate(-45deg) scale(1) translate(22px, -22px); - transform: rotate(-45deg) scale(1) translate(22px, -22px); -} -.mdui-slider-discrete.mdui-slider-focus .mdui-slider-thumb span { - opacity: 1; -} -.mdui-slider-discrete.mdui-slider-zero .mdui-slider-thumb { - background-color: #323232; -} -.mdui-slider-discrete.mdui-slider-zero.mdui-slider-focus .mdui-slider-thumb { - background-color: #bdbdbd; -} -.mdui-slider-discrete.mdui-slider-disabled .mdui-slider-thumb { - -webkit-transform: rotate(-45deg) scale(.288); - transform: rotate(-45deg) scale(.288); -} -.mdui-slider-discrete.mdui-slider-zero.mdui-slider-disabled .mdui-slider-thumb { - background-color: #bdbdbd; -} -/** - * ============================================================================= - * ************ Slider dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-slider-track:before { - background-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-focus .mdui-slider-track:before { - background-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-zero .mdui-slider-thumb { - background-color: #303030; - border-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-zero.mdui-slider-focus .mdui-slider-thumb { - border-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-disabled .mdui-slider-track:before { - background-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-disabled .mdui-slider-fill:before { - background-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-disabled .mdui-slider-thumb { - background-color: #4c4c4c; -} -.mdui-theme-layout-dark .mdui-slider-discrete.mdui-slider-zero .mdui-slider-thumb { - background-color: #fefefe; -} -.mdui-theme-layout-dark .mdui-slider-discrete.mdui-slider-zero.mdui-slider-focus .mdui-slider-thumb { - background-color: #5c5c5c; -} -.mdui-theme-layout-dark .mdui-slider-discrete.mdui-slider-zero.mdui-slider-disabled .mdui-slider-thumb { - background-color: #4c4c4c; -} -/** - * ============================================================================= - * ************ Button 按钮 ************ - * ============================================================================= - */ -/* 默认为 Flat 扁平按钮 */ -.mdui-btn, -.mdui-fab { - position: relative; - display: inline-block; - min-width: 88px; - height: 36px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 0 16px; - margin: 0; - overflow: hidden; - font-size: 14px; - font-weight: 500; - line-height: 36px; - color: inherit; - text-align: center; - text-decoration: none; - text-transform: uppercase; - letter-spacing: .04em; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - zoom: 1; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background: rgba(255, 255, 255, 0); - /*磨砂按钮*/ - /*-webkit-backdrop-filter: blur(20px);*/ - /*backdrop-filter: blur(20px);*/ - border: none; - border-radius: 2px; - outline: none; - -webkit-transition: all .2s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1); - transition: all .2s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1); - transition: all .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, 1, 1); - transition: all .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1); - - will-change: box-shadow; - -webkit-user-drag: none; -} -.mdui-btn:hover, -.mdui-fab:hover { - background-color: rgba(0, 0, 0, .1); -} -.mdui-btn:not(.mdui-ripple):active, -.mdui-fab:not(.mdui-ripple):active { - background-color: rgba(0, 0, 0, .165); -} -.mdui-btn[class*="mdui-color-"]:hover, -.mdui-fab[class*="mdui-color-"]:hover { - opacity: .87; -} -.mdui-btn:not(.mdui-ripple)[class*="mdui-color-"]:active, -.mdui-fab:not(.mdui-ripple)[class*="mdui-color-"]:active { - opacity: .76; -} -/* 按钮内的图标 */ -.mdui-btn .mdui-icon-left, -.mdui-btn .mdui-icon-right, -.mdui-btn .mdui-icon-left::before, -.mdui-btn .mdui-icon-right::before { - height: inherit; - font-size: 1.3em; - line-height: inherit; -} -.mdui-btn .mdui-icon-left { - float: left; - margin-right: .4em; -} -.mdui-btn .mdui-icon-right { - float: right; - margin-left: .4em; -} -input.mdui-btn[type="submit"] { - -webkit-appearance: none; - - -moz-appearance: none; - appearance: none; -} -/* Raised button 浮动按钮 */ -.mdui-btn-raised { - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -.mdui-btn-raised:hover { - -webkit-box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); - box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); -} -.mdui-btn-raised:active { - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); -} -/* 禁用按钮 */ -.mdui-btn[disabled], -.mdui-fab[disabled], -.mdui-btn[disabled]:hover, -.mdui-fab[disabled]:hover, -.mdui-btn[disabled]:active, -.mdui-fab[disabled]:active, -.mdui-btn[disabled]:focus, -.mdui-fab[disabled]:focus { - color: rgba(0, 0, 0, .26) !important; - cursor: default !important; - background-color: transparent !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; - opacity: 1 !important; -} -.mdui-btn[disabled] .mdui-icon, -.mdui-fab[disabled] .mdui-icon, -.mdui-btn[disabled]:hover .mdui-icon, -.mdui-fab[disabled]:hover .mdui-icon, -.mdui-btn[disabled]:active .mdui-icon, -.mdui-fab[disabled]:active .mdui-icon, -.mdui-btn[disabled]:focus .mdui-icon, -.mdui-fab[disabled]:focus .mdui-icon { - color: rgba(0, 0, 0, .26) !important; -} -/* 禁用状态浮动按钮和浮动操作按钮 */ -.mdui-btn-raised[disabled], -.mdui-fab[disabled], -.mdui-btn-raised[disabled]:hover, -.mdui-fab[disabled]:hover, -.mdui-btn-raised[disabled]:active, -.mdui-fab[disabled]:active, -.mdui-btn-raised[disabled]:focus, -.mdui-fab[disabled]:focus { - background-color: rgba(0, 0, 0, .12) !important; - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12) !important; - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12) !important; -} -/* 加粗按钮文本 */ -.mdui-btn-bold { - font-weight: bold; -} -/* 图标按钮 */ -.mdui-btn-icon { - width: 36px; - min-width: 36px; - height: 36px; - padding: 0; - margin-right: 0; - margin-left: 0; - overflow: hidden; - font-size: 24px; - line-height: normal; - border-radius: 50%; -} -.mdui-btn-icon .mdui-icon { - position: absolute; - top: 50%; - left: 50%; - width: 24px; - line-height: 24px; - -webkit-transform: translate(-12px, -12px); - transform: translate(-12px, -12px); -} -.mdui-btn-icon.mdui-ripple { - -webkit-transform: translateZ(0); - transform: translateZ(0); -} -/* 按钮 100% 宽度 */ -.mdui-btn-block { - display: block; - width: 100%; -} -/* 密集型按钮 */ -.mdui-btn-dense { - height: 32px; - font-size: 13px; - line-height: 32px; -} -.mdui-btn-dense.mdui-btn-icon { - width: 32px; - min-width: 32px; -} -/* 按钮组 */ -.mdui-btn-group { - position: relative; - display: inline-block; - vertical-align: middle; -} -.mdui-btn-group .mdui-btn { - float: left; - min-width: inherit; - padding: 0 12px; - color: rgba(0, 0, 0, .54); - border-radius: 0; -} -.mdui-btn-group .mdui-btn:before { - position: absolute; - top: 0; - bottom: 0; - left: 0; - content: ' '; - border-left: 1px solid transparent; -} -.mdui-btn-group .mdui-btn:first-child { - border-top-left-radius: 2px; - border-bottom-left-radius: 2px; -} -.mdui-btn-group .mdui-btn:first-child:before { - border-left: none; -} -.mdui-btn-group .mdui-btn:last-child { - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} -.mdui-btn-group .mdui-btn.mdui-btn-active { - color: rgba(0, 0, 0, .87); - background-color: rgba(0, 0, 0, .215); -} -.mdui-btn-group .mdui-btn.mdui-btn-active + .mdui-btn-active:before { - border-left: 1px solid rgba(0, 0, 0, .145); -} -/** - * ============================================================================= - * ************ Button dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-btn:hover, -.mdui-theme-layout-dark .mdui-fab:hover { - background-color: rgba(255, 255, 255, .1); -} -.mdui-theme-layout-dark .mdui-btn:not(.mdui-ripple):active, -.mdui-theme-layout-dark .mdui-fab:not(.mdui-ripple):active { - background-color: rgba(255, 255, 255, .165); -} -.mdui-theme-layout-dark .mdui-btn[class*="mdui-color-"]:hover, -.mdui-theme-layout-dark .mdui-fab[class*="mdui-color-"]:hover { - opacity: .87; -} -.mdui-theme-layout-dark .mdui-btn:not(.mdui-ripple)[class*="mdui-color-"]:active, -.mdui-theme-layout-dark .mdui-fab:not(.mdui-ripple)[class*="mdui-color-"]:active { - opacity: .76; -} -.mdui-theme-layout-dark .mdui-btn[disabled], -.mdui-theme-layout-dark .mdui-fab[disabled], -.mdui-theme-layout-dark .mdui-btn[disabled]:hover, -.mdui-theme-layout-dark .mdui-fab[disabled]:hover, -.mdui-theme-layout-dark .mdui-btn[disabled]:active, -.mdui-theme-layout-dark .mdui-fab[disabled]:active, -.mdui-theme-layout-dark .mdui-btn[disabled]:focus, -.mdui-theme-layout-dark .mdui-fab[disabled]:focus { - color: rgba(255, 255, 255, .3) !important; - background-color: transparent !important; -} -.mdui-theme-layout-dark .mdui-btn[disabled] .mdui-icon, -.mdui-theme-layout-dark .mdui-fab[disabled] .mdui-icon, -.mdui-theme-layout-dark .mdui-btn[disabled]:hover .mdui-icon, -.mdui-theme-layout-dark .mdui-fab[disabled]:hover .mdui-icon, -.mdui-theme-layout-dark .mdui-btn[disabled]:active .mdui-icon, -.mdui-theme-layout-dark .mdui-fab[disabled]:active .mdui-icon, -.mdui-theme-layout-dark .mdui-btn[disabled]:focus .mdui-icon, -.mdui-theme-layout-dark .mdui-fab[disabled]:focus .mdui-icon { - color: rgba(255, 255, 255, .3) !important; -} -.mdui-theme-layout-dark .mdui-btn-raised[disabled], -.mdui-theme-layout-dark .mdui-fab[disabled], -.mdui-theme-layout-dark .mdui-btn-raised[disabled]:hover, -.mdui-theme-layout-dark .mdui-fab[disabled]:hover, -.mdui-theme-layout-dark .mdui-btn-raised[disabled]:active, -.mdui-theme-layout-dark .mdui-fab[disabled]:active, -.mdui-theme-layout-dark .mdui-btn-raised[disabled]:focus, -.mdui-theme-layout-dark .mdui-fab[disabled]:focus { - background-color: rgba(255, 255, 255, .12) !important; -} -/** - * ============================================================================= - * ************ Fab 浮动操作按钮 ************ - * ============================================================================= - */ -/* 浮动操作按钮 */ -.mdui-fab { - width: 56px; - min-width: 56px; - height: 56px; - padding: 0 !important; - margin: auto; - overflow: hidden; - font-size: 24px; - line-height: normal !important; - border-radius: 50%; - -webkit-box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); -} -.mdui-fab:hover { - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); -} -.mdui-fab:active { - -webkit-box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 12px 17px 2px rgba(0, 0, 0, .14), 0 5px 22px 4px rgba(0, 0, 0, .12); - box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 12px 17px 2px rgba(0, 0, 0, .14), 0 5px 22px 4px rgba(0, 0, 0, .12); -} -.mdui-fab .mdui-icon { - position: absolute; - top: 0; - left: 0; - width: 24px; - margin-top: 16px; - margin-left: 16px; - line-height: 24px; -} -/* mini 型浮动操作按钮 */ -.mdui-fab-mini { - width: 40px; - min-width: 40px; - height: 40px; -} -.mdui-fab-mini .mdui-icon { - margin-top: 8px; - margin-left: 8px; -} -/* 固定到右下角的 FAB 按钮 */ -.mdui-fab-fixed, -.mdui-fab-wrapper { - position: fixed !important; - /* 手机平板上距离屏幕右下角 16px */ - right: 16px; - bottom: 16px; -} -@media (min-width: 1024px) { - .mdui-fab-fixed, - .mdui-fab-wrapper { - /* 电脑上距离屏幕右下角 24px */ - right: 24px; - bottom: 24px; - } -} -/* 含菜单的浮动操作按钮 */ -.mdui-fab-wrapper { - position: relative; - z-index: 4000; - width: 56px; - height: 56px; - padding-top: 8px; - text-align: center; -} -.mdui-fab-wrapper > .mdui-fab .mdui-icon:not(.mdui-fab-opened) { - opacity: 1; - -webkit-transition: all .2s cubic-bezier(.4, 0, .2, 1); - transition: all .2s cubic-bezier(.4, 0, .2, 1); - - will-change: opacity, transform; -} -.mdui-fab-wrapper > .mdui-fab .mdui-icon.mdui-fab-opened { - opacity: 0; - -webkit-transition: all .2s cubic-bezier(.4, 0, .2, 1); - transition: all .2s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: rotate(225deg); - transform: rotate(225deg); - - will-change: opacity, transform; -} -.mdui-fab-wrapper > .mdui-fab.mdui-fab-opened .mdui-icon:not(.mdui-fab-opened) { - opacity: 0; - -webkit-transform: rotate(225deg); - transform: rotate(225deg); -} -.mdui-fab-wrapper > .mdui-fab.mdui-fab-opened .mdui-icon.mdui-fab-opened { - opacity: 1; - -webkit-transform: rotate(360deg); - transform: rotate(360deg); -} -.mdui-fab-wrapper > .mdui-fab-mini { - margin-top: 8px; -} -.mdui-fab-wrapper .mdui-fab-dial { - position: absolute; - right: 0; - bottom: 64px; - left: 0; - height: 0; - text-align: center; - visibility: visible; -} -.mdui-fab-wrapper .mdui-fab-dial .mdui-fab { - margin: 8px 0; - opacity: 0; - -webkit-transition: color .2s cubic-bezier(.4, 0, .2, 1), opacity 150ms cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-transform 150ms cubic-bezier(.4, 0, .2, 1); - transition: color .2s cubic-bezier(.4, 0, .2, 1), opacity 150ms cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-transform 150ms cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .2s cubic-bezier(.4, 0, 1, 1), color .2s cubic-bezier(.4, 0, .2, 1), transform 150ms cubic-bezier(.4, 0, .2, 1), opacity 150ms cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .2s cubic-bezier(.4, 0, 1, 1), color .2s cubic-bezier(.4, 0, .2, 1), transform 150ms cubic-bezier(.4, 0, .2, 1), opacity 150ms cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-transform 150ms cubic-bezier(.4, 0, .2, 1); - -webkit-transform: scale(0); - transform: scale(0); -} -.mdui-fab-wrapper .mdui-fab-dial.mdui-fab-dial-show .mdui-fab { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); -} -/* 添加类 .mdui-fab-hide 以动画的形式隐藏按钮 */ -.mdui-fab, -.mdui-fab-mini, -.mdui-fab-wrapper { - -webkit-transition: all .2s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-transform .2s; - transition: all .2s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-transform .2s; - transition: all .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, 1, 1), transform .2s; - transition: all .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, 1, 1), transform .2s, -webkit-box-shadow .2s cubic-bezier(.4, 0, 1, 1), -webkit-transform .2s; - -webkit-transform: scale(1) translateZ(0); - transform: scale(1) translateZ(0); - - /*background: radial-gradient(circle at 50% 120%, #81e8f6, #76deef 10%, #055194 80%, #062745 100%); - background: radial-gradient(circle at 50% 120%, #81e8f678, #76deef85 10%, #05519485 80%, #0627458a 100%);*/ - background: radial-gradient(circle at 50% 120%, #81e8f638, #dbf3f79c 10%, #05519440 80%, #06274545 100%); - /*background-color: rgba(0,0,0,.1);*/ - backdrop-filter: saturate(180%) blur(20px); - -webkit-backdrop-filter: saturate(180%) blur(20px); - - will-change: transform; -} -.mdui-fab:before { - content: ""; - position: absolute; - top: 1%; - left: 5%; - width: 90%; - height: 90%; - border-radius: 50%; - background: radial-gradient(circle at 50% 0px, #ffffff, rgba(255, 255, 255, 0) 58%); - filter: blur(5px); z-index: 2; -} -.mdui-fab.mdui-fab-hide, -.mdui-fab-mini.mdui-fab-hide, -.mdui-fab-wrapper.mdui-fab-hide { - -webkit-transform: scale(0) translateZ(0); - transform: scale(0) translateZ(0); -} -/** - * ============================================================================= - * ************ Select 下拉选择 ************ - * ============================================================================= - */ -.mdui-select { - position: relative; - display: inline-block; - max-width: 100%; - height: 36px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -webkit-appearance: none; - padding-right: 24px; - padding-left: 0; - font-family: Roboto, Noto, Helvetica, Arial, sans-serif; - font-size: 16px; - vertical-align: middle; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20d%3D%22m-0.00254%2C2.5l5%2C5l5%2C-5l-10%2C0z%22%20fill%3D%22%23000000%22%20opacity%3D%220.54%22%2F%3E%3C%2Fsvg%3E%0A"); - background-repeat: no-repeat; - background-position: right center; - border: none; - border-bottom: 1px solid rgba(0, 0, 0, .12); - outline: none; - -webkit-transition-timing-function: cubic-bezier(.4, 0, .2, 1); - transition-timing-function: cubic-bezier(.4, 0, .2, 1); - -webkit-transition-duration: .2s; - transition-duration: .2s; - -webkit-transition-property: background-color, background-position-x, -webkit-box-shadow; - transition-property: background-color, background-position-x, -webkit-box-shadow; - transition-property: background-color, box-shadow, background-position-x; - transition-property: background-color, box-shadow, background-position-x, -webkit-box-shadow; - - -moz-appearance: none; - appearance: none; - will-change: background-color, box-shadow, background-position-x; -} -.mdui-select.mdui-select-open { - border-bottom: none; -} -.mdui-select-position-top { - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20d%3D%22m-0.00254%2C2.5l5%2C5l5%2C-5l-10%2C0z%22%20fill%3D%22%23000000%22%20opacity%3D%220.54%22%20transform%3D%22rotate(-180%205%2C5)%22%2F%3E%3C%2Fsvg%3E%0A"); -} -/* 底部和顶部菜单的样式 */ -.mdui-select-open.mdui-select-position-top, -.mdui-select-open.mdui-select-position-bottom { - z-index: 99999; - background-color: #fff; - background-position-x: calc(100% - 12px); - border-radius: 2px; -} -.mdui-select-open.mdui-select-position-top { - border-top: 1px solid rgba(0, 0, 0, .12); - border-bottom: 2px solid transparent; - border-top-left-radius: 0; - border-top-right-radius: 0; - -webkit-box-shadow: 0 10px 10px -3px rgba(0, 0, 0, .2), 0 0 14px 1px rgba(0, 0, 0, .14), 0 -7px 24px 2px rgba(0, 0, 0, .12); - box-shadow: 0 10px 10px -3px rgba(0, 0, 0, .2), 0 0 14px 1px rgba(0, 0, 0, .14), 0 -7px 24px 2px rgba(0, 0, 0, .12); -} -.mdui-select-open.mdui-select-position-top .mdui-select-menu { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - -webkit-box-shadow: 0 -4px 4px -2px rgba(0, 0, 0, .06), 8px 0 8px -4px rgba(0, 0, 0, .12), -8px 0 8px -4px rgba(0, 0, 0, .12); - box-shadow: 0 -4px 4px -2px rgba(0, 0, 0, .06), 8px 0 8px -4px rgba(0, 0, 0, .12), -8px 0 8px -4px rgba(0, 0, 0, .12); -} -.mdui-select-open.mdui-select-position-bottom { - border-bottom: 1px solid rgba(0, 0, 0, .12); - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); -} -.mdui-select-open.mdui-select-position-bottom .mdui-select-menu { - border-top-left-radius: 0; - border-top-right-radius: 0; - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 9px 9px 1px rgba(0, 0, 0, .14), 0 8px 8px 2px rgba(0, 0, 0, .06); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 9px 9px 1px rgba(0, 0, 0, .14), 0 8px 8px 2px rgba(0, 0, 0, .06); -} -/* 当前选中项文本 */ -.mdui-select-selected { - position: absolute; - top: 50%; - right: 24px; - left: 0; - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - -webkit-transition: left .2s cubic-bezier(0, 0, .2, 1); - transition: left .2s cubic-bezier(0, 0, .2, 1); - -webkit-transform: translateY(-50%); - transform: translateY(-50%); -} -.mdui-select-open .mdui-select-selected { - right: 32px; - left: 16px; -} -.mdui-select-open.mdui-select-position-auto .mdui-select-selected { - visibility: hidden; -} -/* 菜单 */ -.mdui-select-menu { - position: relative; - z-index: 99999; - height: 36px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin: 0 -24px 0 0; - overflow-y: scroll; - -webkit-overflow-scrolling: touch; - color: rgba(0, 0, 0, .87); - cursor: default; - visibility: hidden; - background-color: #fff; - border-radius: 2px; - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - opacity: 0; - -webkit-transition-timing-function: cubic-bezier(0, 0, .2, 1); - transition-timing-function: cubic-bezier(0, 0, .2, 1); - -webkit-transition-duration: .2s; - transition-duration: .2s; - -webkit-transition-property: opacity, visibility, -webkit-transform; - transition-property: opacity, visibility, -webkit-transform; - transition-property: transform, opacity, visibility; - transition-property: transform, opacity, visibility, -webkit-transform; - -webkit-transform: scale(1, 0); - transform: scale(1, 0); - - will-change: transform, opacity, visibility; -} -.mdui-select-open .mdui-select-menu { - overflow-y: hidden; - visibility: visible; - opacity: 1; - -webkit-transform: scale(1, 1); - transform: scale(1, 1); -} -.mdui-select-closing .mdui-select-menu { - overflow-y: hidden; - visibility: visible; - -webkit-box-shadow: none; - box-shadow: none; - opacity: 0; - -webkit-transform: scale(1, 1); - transform: scale(1, 1); -} -/* 菜单项 */ -.mdui-select-menu-item { - height: 48px; - padding: 0 16px; - overflow: hidden; - line-height: 48px; - text-overflow: ellipsis; - white-space: nowrap; - cursor: pointer; -} -.mdui-select-menu-item:hover { - background-color: #eee; -} -.mdui-select-menu-item:first-child { - margin-top: 8px; -} -.mdui-select-menu-item:last-child { - margin-bottom: 8px; -} -.mdui-select-menu-item[disabled] { - color: rgba(0, 0, 0, .38) !important; - cursor: default; -} -.mdui-select-menu-item[disabled]:hover { - background-color: inherit !important; -} -.mdui-select-menu-item[selected] { - color: #ff4081; -} -/* 原生 select 组件 */ -select.mdui-select { - background-color: transparent; -} -select.mdui-select option { - color: rgba(0, 0, 0, .87); -} -select.mdui-select::-ms-expand { - display: none; -} -/* 原生多选 select 组件 */ -select.mdui-select[multiple] { - height: auto; - padding: 0; - font-size: 15px; - cursor: default; - background-color: #fff; - background-image: none; - border: 1px solid rgba(0, 0, 0, .38); -} -select.mdui-select[multiple] optgroup { - padding: 0 0 0 16px; - margin: 8px 0 0 0; - color: rgba(0, 0, 0, .38); -} -select.mdui-select[multiple] optgroup:last-child { - margin-bottom: 8px; -} -select.mdui-select[multiple] optgroup:not(:first-child) { - padding-top: 8px; - border-top: 1px solid rgba(0, 0, 0, .12); -} -select.mdui-select[multiple] option { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 32px; - padding: 0 16px; - margin: 0 0 0 -16px; - color: rgba(0, 0, 0, .87); - - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; -} -select.mdui-select[multiple] option:first-child { - margin-top: 8px; -} -select.mdui-select[multiple] option:last-child { - margin-bottom: 8px; -} -/** - * ============================================================================= - * ************ Select 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-select-menu-item[selected] { - color: #ffc107; -} -.mdui-theme-accent-blue .mdui-select-menu-item[selected] { - color: #2196f3; -} -.mdui-theme-accent-cyan .mdui-select-menu-item[selected] { - color: #00bcd4; -} -.mdui-theme-accent-deep-orange .mdui-select-menu-item[selected] { - color: #ff5722; -} -.mdui-theme-accent-deep-purple .mdui-select-menu-item[selected] { - color: #673ab7; -} -.mdui-theme-accent-green .mdui-select-menu-item[selected] { - color: #4caf50; -} -.mdui-theme-accent-indigo .mdui-select-menu-item[selected] { - color: #3f51b5; -} -.mdui-theme-accent-light-blue .mdui-select-menu-item[selected] { - color: #03a9f4; -} -.mdui-theme-accent-light-green .mdui-select-menu-item[selected] { - color: #8bc34a; -} -.mdui-theme-accent-lime .mdui-select-menu-item[selected] { - color: #cddc39; -} -.mdui-theme-accent-orange .mdui-select-menu-item[selected] { - color: #ff9800; -} -.mdui-theme-accent-pink .mdui-select-menu-item[selected] { - color: #e91e63; -} -.mdui-theme-accent-purple .mdui-select-menu-item[selected] { - color: #9c27b0; -} -.mdui-theme-accent-red .mdui-select-menu-item[selected] { - color: #f44336; -} -.mdui-theme-accent-teal .mdui-select-menu-item[selected] { - color: #009688; -} -.mdui-theme-accent-yellow .mdui-select-menu-item[selected] { - color: #ffeb3b; -} -/** - * ============================================================================= - * ************ Select dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-select { - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20d%3D%22m-0.00254%2C2.5l5%2C5l5%2C-5l-10%2C0z%22%20fill%3D%22%23FFFFFF%22%2F%3E%3C%2Fsvg%3E%0A"); - border-bottom: 1px solid rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-select-position-top { - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2010%2010%22%3E%3Cpath%20d%3D%22m-0.00254%2C2.5l5%2C5l5%2C-5l-10%2C0z%22%20fill%3D%22%23FFFFFF%22%20transform%3D%22rotate(-180%205%2C5)%22%2F%3E%3C%2Fsvg%3E%0A"); -} -.mdui-theme-layout-dark .mdui-select-open.mdui-select-position-top, -.mdui-theme-layout-dark .mdui-select-open.mdui-select-position-bottom { - background-color: #424242; -} -.mdui-theme-layout-dark .mdui-select-open.mdui-select-position-top { - border-top: 1px solid rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-select-open.mdui-select-position-bottom { - border-bottom: 1px solid rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-select-menu { - color: #fff; - background-color: #424242; -} -.mdui-theme-layout-dark .mdui-select-menu-item:hover { - background-color: #616161; -} -.mdui-theme-layout-dark .mdui-select-menu-item[disabled] { - color: rgba(255, 255, 255, .5) !important; -} -.mdui-theme-layout-dark select.mdui-select { - color: #fff; - background-color: #303030; -} -.mdui-theme-layout-dark select.mdui-select option { - color: #fff; - background-color: #303030; -} -.mdui-theme-layout-dark select.mdui-select[multiple] { - border: 1px solid rgba(255, 255, 255, .5); -} -.mdui-theme-layout-dark select.mdui-select[multiple] optgroup { - color: rgba(255, 255, 255, .5); -} -.mdui-theme-layout-dark select.mdui-select[multiple] optgroup:not(:first-child) { - border-top: 1px solid rgba(255, 255, 255, .12); -} -/** - * ============================================================================= - * ************ Grid 网格系统 ************ - * ============================================================================= - */ -.mdui-container, -.mdui-container-fluid { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-right: 8px; - padding-left: 8px; - margin-right: auto; - margin-left: auto; -} -.mdui-container:after, -.mdui-container-fluid:after { - display: table; - clear: both; - content: ''; -} -.mdui-container { - width: 96%; - max-width: 1280px; -} -@media (min-width: 600px) { - .mdui-container { - width: 94%; - } -} -@media (min-width: 1024px) { - .mdui-container { - width: 92%; - } -} -.mdui-row, -[class*="mdui-row-"] { - margin-right: -8px; - margin-left: -8px; -} -.mdui-row:after, -[class*="mdui-row-"]:after { - display: table; - clear: both; - content: ''; -} -[class*="mdui-col-xs-"], -[class*="mdui-col-sm-"], -[class*="mdui-col-md-"], -[class*="mdui-col-lg-"], -[class*="mdui-col-xl-"], -.mdui-col { - position: relative; - min-height: 1px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-right: 8px; - padding-left: 8px; -} -/* 取消列间距 */ -.mdui-row-gapless .mdui-col, -.mdui-row-gapless [class*="mdui-col-xs-"], -.mdui-row-gapless [class*="mdui-col-sm-"], -.mdui-row-gapless [class*="mdui-col-md-"], -.mdui-row-gapless [class*="mdui-col-lg-"], -.mdui-row-gapless [class*="mdui-col-xl-"] { - padding-right: 0; - padding-left: 0; -} -.mdui-row-gapless .mdui-row, -.mdui-row-gapless [class*="mdui-row-"] { - margin-right: 0; - margin-left: 0; -} -.mdui-col-xs-1 { - float: left; - width: 8.333333%; -} -.mdui-col-offset-xs-1 { - margin-left: 8.333333%; -} -.mdui-row-xs-1 .mdui-col { - float: left; - width: 100%; -} -.mdui-col-xs-2 { - float: left; - width: 16.666667%; -} -.mdui-col-offset-xs-2 { - margin-left: 16.666667%; -} -.mdui-row-xs-2 .mdui-col { - float: left; - width: 50%; -} -.mdui-col-xs-3 { - float: left; - width: 25%; -} -.mdui-col-offset-xs-3 { - margin-left: 25%; -} -.mdui-row-xs-3 .mdui-col { - float: left; - width: 33.333333%; -} -.mdui-col-xs-4 { - float: left; - width: 33.333333%; -} -.mdui-col-offset-xs-4 { - margin-left: 33.333333%; -} -.mdui-row-xs-4 .mdui-col { - float: left; - width: 25%; -} -.mdui-col-xs-5 { - float: left; - width: 41.666667%; -} -.mdui-col-offset-xs-5 { - margin-left: 41.666667%; -} -.mdui-row-xs-5 .mdui-col { - float: left; - width: 20%; -} -.mdui-col-xs-6 { - float: left; - width: 50%; -} -.mdui-col-offset-xs-6 { - margin-left: 50%; -} -.mdui-row-xs-6 .mdui-col { - float: left; - width: 16.666667%; -} -.mdui-col-xs-7 { - float: left; - width: 58.333333%; -} -.mdui-col-offset-xs-7 { - margin-left: 58.333333%; -} -.mdui-row-xs-7 .mdui-col { - float: left; - width: 14.285714%; -} -.mdui-col-xs-8 { - float: left; - width: 66.666667%; -} -.mdui-col-offset-xs-8 { - margin-left: 66.666667%; -} -.mdui-row-xs-8 .mdui-col { - float: left; - width: 12.5%; -} -.mdui-col-xs-9 { - float: left; - width: 75%; -} -.mdui-col-offset-xs-9 { - margin-left: 75%; -} -.mdui-row-xs-9 .mdui-col { - float: left; - width: 11.111111%; -} -.mdui-col-xs-10 { - float: left; - width: 83.333333%; -} -.mdui-col-offset-xs-10 { - margin-left: 83.333333%; -} -.mdui-row-xs-10 .mdui-col { - float: left; - width: 10%; -} -.mdui-col-xs-11 { - float: left; - width: 91.666667%; -} -.mdui-col-offset-xs-11 { - margin-left: 91.666667%; -} -.mdui-row-xs-11 .mdui-col { - float: left; - width: 9.090909%; -} -.mdui-col-xs-12 { - float: left; - width: 100%; -} -.mdui-col-offset-xs-12 { - margin-left: 100%; -} -.mdui-row-xs-12 .mdui-col { - float: left; - width: 8.333333%; -} -@media (min-width: 600px) { - .mdui-col-sm-1 { - float: left; - width: 8.333333%; - } - .mdui-col-offset-sm-1 { - margin-left: 8.333333%; - } - .mdui-row-sm-1 .mdui-col { - float: left; - width: 100%; - } - .mdui-col-sm-2 { - float: left; - width: 16.666667%; - } - .mdui-col-offset-sm-2 { - margin-left: 16.666667%; - } - .mdui-row-sm-2 .mdui-col { - float: left; - width: 50%; - } - .mdui-col-sm-3 { - float: left; - width: 25%; - } - .mdui-col-offset-sm-3 { - margin-left: 25%; - } - .mdui-row-sm-3 .mdui-col { - float: left; - width: 33.333333%; - } - .mdui-col-sm-4 { - float: left; - width: 33.333333%; - } - .mdui-col-offset-sm-4 { - margin-left: 33.333333%; - } - .mdui-row-sm-4 .mdui-col { - float: left; - width: 25%; - } - .mdui-col-sm-5 { - float: left; - width: 41.666667%; - } - .mdui-col-offset-sm-5 { - margin-left: 41.666667%; - } - .mdui-row-sm-5 .mdui-col { - float: left; - width: 20%; - } - .mdui-col-sm-6 { - float: left; - width: 50%; - } - .mdui-col-offset-sm-6 { - margin-left: 50%; - } - .mdui-row-sm-6 .mdui-col { - float: left; - width: 16.666667%; - } - .mdui-col-sm-7 { - float: left; - width: 58.333333%; - } - .mdui-col-offset-sm-7 { - margin-left: 58.333333%; - } - .mdui-row-sm-7 .mdui-col { - float: left; - width: 14.285714%; - } - .mdui-col-sm-8 { - float: left; - width: 66.666667%; - } - .mdui-col-offset-sm-8 { - margin-left: 66.666667%; - } - .mdui-row-sm-8 .mdui-col { - float: left; - width: 12.5%; - } - .mdui-col-sm-9 { - float: left; - width: 75%; - } - .mdui-col-offset-sm-9 { - margin-left: 75%; - } - .mdui-row-sm-9 .mdui-col { - float: left; - width: 11.111111%; - } - .mdui-col-sm-10 { - float: left; - width: 83.333333%; - } - .mdui-col-offset-sm-10 { - margin-left: 83.333333%; - } - .mdui-row-sm-10 .mdui-col { - float: left; - width: 10%; - } - .mdui-col-sm-11 { - float: left; - width: 91.666667%; - } - .mdui-col-offset-sm-11 { - margin-left: 91.666667%; - } - .mdui-row-sm-11 .mdui-col { - float: left; - width: 9.090909%; - } - .mdui-col-sm-12 { - float: left; - width: 100%; - } - .mdui-col-offset-sm-12 { - margin-left: 100%; - } - .mdui-row-sm-12 .mdui-col { - float: left; - width: 8.333333%; - } -} -@media (min-width: 1024px) { - .mdui-col-md-1 { - float: left; - width: 8.333333%; - } - .mdui-col-offset-md-1 { - margin-left: 8.333333%; - } - .mdui-row-md-1 .mdui-col { - float: left; - width: 100%; - } - .mdui-col-md-2 { - float: left; - width: 16.666667%; - } - .mdui-col-offset-md-2 { - margin-left: 16.666667%; - } - .mdui-row-md-2 .mdui-col { - float: left; - width: 50%; - } - .mdui-col-md-3 { - float: left; - width: 25%; - } - .mdui-col-offset-md-3 { - margin-left: 25%; - } - .mdui-row-md-3 .mdui-col { - float: left; - width: 33.333333%; - } - .mdui-col-md-4 { - float: left; - width: 33.333333%; - } - .mdui-col-offset-md-4 { - margin-left: 33.333333%; - } - .mdui-row-md-4 .mdui-col { - float: left; - width: 25%; - } - .mdui-col-md-5 { - float: left; - width: 41.666667%; - } - .mdui-col-offset-md-5 { - margin-left: 41.666667%; - } - .mdui-row-md-5 .mdui-col { - float: left; - width: 20%; - } - .mdui-col-md-6 { - float: left; - width: 50%; - } - .mdui-col-offset-md-6 { - margin-left: 50%; - } - .mdui-row-md-6 .mdui-col { - float: left; - width: 16.666667%; - } - .mdui-col-md-7 { - float: left; - width: 58.333333%; - } - .mdui-col-offset-md-7 { - margin-left: 58.333333%; - } - .mdui-row-md-7 .mdui-col { - float: left; - width: 14.285714%; - } - .mdui-col-md-8 { - float: left; - width: 66.666667%; - } - .mdui-col-offset-md-8 { - margin-left: 66.666667%; - } - .mdui-row-md-8 .mdui-col { - float: left; - width: 12.5%; - } - .mdui-col-md-9 { - float: left; - width: 75%; - } - .mdui-col-offset-md-9 { - margin-left: 75%; - } - .mdui-row-md-9 .mdui-col { - float: left; - width: 11.111111%; - } - .mdui-col-md-10 { - float: left; - width: 83.333333%; - } - .mdui-col-offset-md-10 { - margin-left: 83.333333%; - } - .mdui-row-md-10 .mdui-col { - float: left; - width: 10%; - } - .mdui-col-md-11 { - float: left; - width: 91.666667%; - } - .mdui-col-offset-md-11 { - margin-left: 91.666667%; - } - .mdui-row-md-11 .mdui-col { - float: left; - width: 9.090909%; - } - .mdui-col-md-12 { - float: left; - width: 100%; - } - .mdui-col-offset-md-12 { - margin-left: 100%; - } - .mdui-row-md-12 .mdui-col { - float: left; - width: 8.333333%; - } -} -@media (min-width: 1440px) { - .mdui-col-lg-1 { - float: left; - width: 8.333333%; - } - .mdui-col-offset-lg-1 { - margin-left: 8.333333%; - } - .mdui-row-lg-1 .mdui-col { - float: left; - width: 100%; - } - .mdui-col-lg-2 { - float: left; - width: 16.666667%; - } - .mdui-col-offset-lg-2 { - margin-left: 16.666667%; - } - .mdui-row-lg-2 .mdui-col { - float: left; - width: 50%; - } - .mdui-col-lg-3 { - float: left; - width: 25%; - } - .mdui-col-offset-lg-3 { - margin-left: 25%; - } - .mdui-row-lg-3 .mdui-col { - float: left; - width: 33.333333%; - } - .mdui-col-lg-4 { - float: left; - width: 33.333333%; - } - .mdui-col-offset-lg-4 { - margin-left: 33.333333%; - } - .mdui-row-lg-4 .mdui-col { - float: left; - width: 25%; - } - .mdui-col-lg-5 { - float: left; - width: 41.666667%; - } - .mdui-col-offset-lg-5 { - margin-left: 41.666667%; - } - .mdui-row-lg-5 .mdui-col { - float: left; - width: 20%; - } - .mdui-col-lg-6 { - float: left; - width: 50%; - } - .mdui-col-offset-lg-6 { - margin-left: 50%; - } - .mdui-row-lg-6 .mdui-col { - float: left; - width: 16.666667%; - } - .mdui-col-lg-7 { - float: left; - width: 58.333333%; - } - .mdui-col-offset-lg-7 { - margin-left: 58.333333%; - } - .mdui-row-lg-7 .mdui-col { - float: left; - width: 14.285714%; - } - .mdui-col-lg-8 { - float: left; - width: 66.666667%; - } - .mdui-col-offset-lg-8 { - margin-left: 66.666667%; - } - .mdui-row-lg-8 .mdui-col { - float: left; - width: 12.5%; - } - .mdui-col-lg-9 { - float: left; - width: 75%; - } - .mdui-col-offset-lg-9 { - margin-left: 75%; - } - .mdui-row-lg-9 .mdui-col { - float: left; - width: 11.111111%; - } - .mdui-col-lg-10 { - float: left; - width: 83.333333%; - } - .mdui-col-offset-lg-10 { - margin-left: 83.333333%; - } - .mdui-row-lg-10 .mdui-col { - float: left; - width: 10%; - } - .mdui-col-lg-11 { - float: left; - width: 91.666667%; - } - .mdui-col-offset-lg-11 { - margin-left: 91.666667%; - } - .mdui-row-lg-11 .mdui-col { - float: left; - width: 9.090909%; - } - .mdui-col-lg-12 { - float: left; - width: 100%; - } - .mdui-col-offset-lg-12 { - margin-left: 100%; - } - .mdui-row-lg-12 .mdui-col { - float: left; - width: 8.333333%; - } -} -@media (min-width: 1920px) { - .mdui-col-xl-1 { - float: left; - width: 8.333333%; - } - .mdui-col-offset-xl-1 { - margin-left: 8.333333%; - } - .mdui-row-xl-1 .mdui-col { - float: left; - width: 100%; - } - .mdui-col-xl-2 { - float: left; - width: 16.666667%; - } - .mdui-col-offset-xl-2 { - margin-left: 16.666667%; - } - .mdui-row-xl-2 .mdui-col { - float: left; - width: 50%; - } - .mdui-col-xl-3 { - float: left; - width: 25%; - } - .mdui-col-offset-xl-3 { - margin-left: 25%; - } - .mdui-row-xl-3 .mdui-col { - float: left; - width: 33.333333%; - } - .mdui-col-xl-4 { - float: left; - width: 33.333333%; - } - .mdui-col-offset-xl-4 { - margin-left: 33.333333%; - } - .mdui-row-xl-4 .mdui-col { - float: left; - width: 25%; - } - .mdui-col-xl-5 { - float: left; - width: 41.666667%; - } - .mdui-col-offset-xl-5 { - margin-left: 41.666667%; - } - .mdui-row-xl-5 .mdui-col { - float: left; - width: 20%; - } - .mdui-col-xl-6 { - float: left; - width: 50%; - } - .mdui-col-offset-xl-6 { - margin-left: 50%; - } - .mdui-row-xl-6 .mdui-col { - float: left; - width: 16.666667%; - } - .mdui-col-xl-7 { - float: left; - width: 58.333333%; - } - .mdui-col-offset-xl-7 { - margin-left: 58.333333%; - } - .mdui-row-xl-7 .mdui-col { - float: left; - width: 14.285714%; - } - .mdui-col-xl-8 { - float: left; - width: 66.666667%; - } - .mdui-col-offset-xl-8 { - margin-left: 66.666667%; - } - .mdui-row-xl-8 .mdui-col { - float: left; - width: 12.5%; - } - .mdui-col-xl-9 { - float: left; - width: 75%; - } - .mdui-col-offset-xl-9 { - margin-left: 75%; - } - .mdui-row-xl-9 .mdui-col { - float: left; - width: 11.111111%; - } - .mdui-col-xl-10 { - float: left; - width: 83.333333%; - } - .mdui-col-offset-xl-10 { - margin-left: 83.333333%; - } - .mdui-row-xl-10 .mdui-col { - float: left; - width: 10%; - } - .mdui-col-xl-11 { - float: left; - width: 91.666667%; - } - .mdui-col-offset-xl-11 { - margin-left: 91.666667%; - } - .mdui-row-xl-11 .mdui-col { - float: left; - width: 9.090909%; - } - .mdui-col-xl-12 { - float: left; - width: 100%; - } - .mdui-col-offset-xl-12 { - margin-left: 100%; - } - .mdui-row-xl-12 .mdui-col { - float: left; - width: 8.333333%; - } -} -/** - * ============================================================================= - * ************ Toolbar 工具栏 ************ - * ============================================================================= - */ -.mdui-toolbar { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 100%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; -} -.mdui-toolbar > * { - margin: 0 16px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.mdui-toolbar[class*="mdui-color-"]:not(.mdui-color-transparent) .mdui-btn:hover { - background-color: rgba(255, 255, 255, .1); -} -.mdui-toolbar[class*="mdui-color-"]:not(.mdui-color-transparent) .mdui-btn:active { - background-color: rgba(255, 255, 255, .165); -} -.mdui-toolbar > a { - color: inherit; - text-decoration: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.mdui-toolbar > .mdui-btn-icon { - width: 48px; - min-width: 48px; - height: 48px; -} -@media (orientation: landscape) and (max-width: 959px) { - .mdui-toolbar > .mdui-btn-icon { - width: 40px; - min-width: 40px; - height: 40px; - } -} -.mdui-toolbar > .mdui-btn-icon .mdui-icon { - height: 24px; - line-height: 24px; -} -.mdui-toolbar .mdui-icon { - color: inherit; -} -.mdui-toolbar-spacer { - margin: 0; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} -/* 手机 */ -.mdui-toolbar { - height: 56px; - line-height: 56px; -} -.mdui-toolbar > .mdui-btn { - margin: 0 4px; -} -.mdui-toolbar > .mdui-btn + .mdui-btn { - margin-left: 0; -} -@media (min-width: 600px) { - .mdui-appbar .mdui-toolbar { - height: 64px; - line-height: 64px; - } - .mdui-appbar .mdui-toolbar > .mdui-btn { - margin: 0 8px; - } - .mdui-appbar .mdui-toolbar > .mdui-btn + .mdui-btn { - margin-left: 0; - } -} -@media (orientation: landscape) and (max-width: 959px) { - .mdui-appbar .mdui-toolbar { - height: 48px; - line-height: 48px; - } - .mdui-appbar .mdui-toolbar > .mdui-btn { - margin: 0 4px; - } - .mdui-appbar .mdui-toolbar > .mdui-btn + .mdui-btn { - margin-left: 0; - } -} -/** - * ============================================================================= - * ************ Appbar 应用栏 ************ - * ============================================================================= - */ -.mdui-appbar { - z-index: 1000; - -webkit-box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); - box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); -} -/* appbar 固定在顶部 */ -.mdui-appbar-fixed { - position: fixed; - top: 0; - right: 0; - left: 0; - -webkit-transition-timing-function: cubic-bezier(0, 0, .2, 1); - transition-timing-function: cubic-bezier(0, 0, .2, 1); - -webkit-transition-duration: .3s; - transition-duration: .3s; - -webkit-transition-property: left, right; - transition-property: left, right; - - will-change: left, right; -} -/* 左侧留出抽屉栏的距离 */ -@media (min-width: 1024px) { - .mdui-drawer-body-left .mdui-appbar-inset.mdui-appbar-fixed { - left: 240px; - } -} -@media (min-width: 1024px) { - .mdui-drawer-body-right .mdui-appbar-inset.mdui-appbar-fixed { - right: 240px; - } -} -/* 含工具栏 */ -.mdui-appbar-with-toolbar { - padding-top: 56px; -} -@media (min-width: 600px) { - .mdui-appbar-with-toolbar { - padding-top: 64px; - } -} -@media (orientation: landscape) and (max-width: 959px) { - .mdui-appbar-with-toolbar { - padding-top: 48px; - } -} -/* 含 Tab */ -.mdui-appbar-with-tab { - padding-top: 48px; -} -/* 含大 Tab */ -.mdui-appbar-with-tab-larger { - padding-top: 72px; -} -/* 含工具栏和 Tab */ -.mdui-appbar-with-toolbar.mdui-appbar-with-tab { - padding-top: 104px; -} -@media (min-width: 600px) { - .mdui-appbar-with-toolbar.mdui-appbar-with-tab { - padding-top: 112px; - } -} -@media (orientation: landscape) and (max-width: 959px) { - .mdui-appbar-with-toolbar.mdui-appbar-with-tab { - padding-top: 96px; - } -} -/* 含工具栏和大 Tab */ -.mdui-appbar-with-toolbar.mdui-appbar-with-tab-larger { - padding-top: 128px; -} -@media (min-width: 600px) { - .mdui-appbar-with-toolbar.mdui-appbar-with-tab-larger { - padding-top: 136px; - } -} -@media (orientation: landscape) and (max-width: 959px) { - .mdui-appbar-with-toolbar.mdui-appbar-with-tab-larger { - padding-top: 120px; - } -} -/** - * ============================================================================= - * ************ Appbar dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-appbar > [class*="mdui-color-"]:not(.mdui-color-transparent) { - color: #fff !important; - background-color: #212121 !important; -} -/** - * ============================================================================= - * ************ Card 卡片 ************ - * ============================================================================= - */ -/* 卡片 */ -.mdui-card { - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; - overflow: hidden; - color: #000; - background-color: #fff; - border-radius: 2px; - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -/** - * ===================== 头部,包含头像、标题、副标题 - */ -.mdui-card-header { - position: relative; - height: 72px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 16px; -} -/* 卡片头部头像 */ -.mdui-card-header-avatar { - float: left; - width: 40px; - height: 40px; - border-radius: 50%; -} -/* 卡片头部标题 */ -.mdui-card-header-title { - display: block; - margin-left: 52px; - overflow: hidden; - font-size: 16px; - font-weight: 500; - line-height: 20px; - text-overflow: ellipsis; - white-space: nowrap; - opacity: .87; -} -/* 卡片头部副标题 */ -.mdui-card-header-subtitle { - display: block; - margin-left: 52px; - overflow: hidden; - font-size: 14px; - font-weight: 400; - line-height: 20px; - text-overflow: ellipsis; - white-space: nowrap; - opacity: .54; -} -/** - * =========================== 主标题区域 - */ -.mdui-card-primary { - position: relative; - padding: 24px 16px 16px 16px; -} -/* 主标题区域标题 */ -.mdui-card-primary-title { - display: block; - font-size: 24px; - line-height: 36px; - opacity: .87; -} -/* 主标题区域副标题 */ -.mdui-card-primary-subtitle { - display: block; - font-size: 14px; - line-height: 24px; - opacity: .54; -} -/** - * ============================ 内容区域 - */ -.mdui-card-content { - position: relative; - padding: 16px; - font-size: 14px; - line-height: 24px; -} -/** - * ============================ 卡片菜单 - */ -.mdui-card-menu { - position: absolute; - top: 16px; - right: 16px; - z-index: 1; -} -.mdui-card-menu .mdui-btn { - margin-left: 8px; -} -/** - * =========================== 按钮区域 - */ -.mdui-card-actions { - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 8px; -} -.mdui-card-actions:before, -.mdui-card-actions:after { - display: table; - content: " "; -} -.mdui-card-actions:after { - clear: both; -} -.mdui-card-actions:before, -.mdui-card-actions:after { - display: table; - content: " "; -} -.mdui-card-actions:after { - clear: both; -} -.mdui-card-actions .mdui-btn { - max-width: 100%; - margin: 0 8px 0 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.mdui-card-actions .mdui-btn-icon { - width: 36px; - height: 36px; - margin: 0 8px; -} -/* 使按钮竖向排列 */ -.mdui-card-actions-stacked .mdui-btn { - display: block; - margin: 0 0 4px 0; -} -.mdui-card-actions-stacked .mdui-btn:last-child { - margin: 0; -} -/** - * ============================= 媒体元素区域 - */ -.mdui-card-media { - position: relative; -} -.mdui-card-media img, -.mdui-card-media video { - display: block; - width: 100%; -} -/* 覆盖在媒体元素上的内容 */ -.mdui-card-media-covered { - position: absolute; - right: 0; - bottom: 0; - left: 0; - color: #fff; - background: rgba(0, 0, 0, .2); - /* 覆盖在媒体元素上的标题 */ -} -.mdui-card-media-covered .mdui-card-primary-title { - opacity: 1; -} -.mdui-card-media-covered .mdui-card-primary-subtitle { - opacity: .7; -} -/* 覆盖在媒体元素顶部 */ -.mdui-card-media-covered-top { - top: 0; - bottom: auto; -} -/* 覆盖层透明 */ -.mdui-card-media-covered-transparent { - background: transparent; -} -/* 覆盖层渐变 */ -.mdui-card-media-covered-gradient { - background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .26)), to(rgba(0, 0, 0, 0))); - background: linear-gradient(to top, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0)); -} -.mdui-card-media-covered-gradient.mdui-card-media-covered-top { - background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .26)), to(rgba(0, 0, 0, 0))); - background: linear-gradient(to bottom, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0)); -} -/** - * ============================================================================= - * ************ Card dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-card { - color: #fff; - background-color: #424242; -} -/** - * ============================================================================= - * ************ Tab ************ - * ============================================================================= - * - * 在手机上选项卡始终平分或可滚动,在平板以上的设备上默认左对齐,可以选择居中对齐,或全宽等分 - */ -/* 选项卡,默认的选项卡为全宽 */ -.mdui-tab { - position: relative; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - min-height: 48px; - max-height: 72px; - padding: 0; - margin: 0 auto; - overflow-x: auto; - overflow-y: hidden; - -webkit-overflow-scrolling: touch; - white-space: nowrap; -} -.mdui-tab a { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - min-width: 72px; - min-height: 48px; - max-height: 72px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 12px; - overflow: hidden; - font-size: 14px; - color: inherit; - text-align: center; - text-decoration: none; - text-overflow: ellipsis; - text-transform: uppercase; - cursor: pointer; - flex-direction: column; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - outline: none; - opacity: .7; - - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; -} -.mdui-tab a .mdui-icon { - opacity: .7; -} -@media (min-width: 600px) { - .mdui-tab a { - min-width: 99px; - max-width: 264px; - padding: 12px 24px; - - -webkit-box-flex: 0; - -webkit-flex: none; - -ms-flex: none; - flex: none; - } -} -@media (min-width: 1024px) { - .mdui-tab a { - min-width: 112px; - } -} -@media (min-width: 1440px) { - .mdui-tab a { - min-width: 136px; - } -} -@media (min-width: 1920px) { - .mdui-tab a { - min-width: 160px; - } -} -.mdui-tab a label { - display: block; - width: 100%; - cursor: pointer; -} -.mdui-tab a .mdui-icon + label { - margin-top: 8px; -} -.mdui-tab a[disabled] { - cursor: default; - opacity: .38; -} -.mdui-tab a[disabled] label { - cursor: default; -} -.mdui-tab .mdui-tab-active { - color: #3f51b5; - opacity: 1; -} -.mdui-tab .mdui-tab-active .mdui-icon { - opacity: 1; -} -/* 选项卡居中 */ -@media (min-width: 600px) { - .mdui-tab-centered:before { - content: ' '; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; - } - .mdui-tab-centered:after { - content: ' '; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; - } - .mdui-tab-centered a { - -webkit-box-flex: 0; - -webkit-flex: none; - -ms-flex: none; - flex: none; - } -} -/* 选项卡始终全宽等分 */ -.mdui-tab-full-width a { - max-width: none; - - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; -} -/* 可横向滚动的选项卡 */ -.mdui-tab-scrollable { - padding-left: 56px; -} -.mdui-tab-scrollable a { - -webkit-box-flex: 0; - -webkit-flex: none; - -ms-flex: none; - flex: none; -} -@media (max-width: 599px) { - .mdui-tab-scrollable { - padding-left: 60px; - } -} -/* 下划线指示器 */ -.mdui-tab-indicator { - position: absolute; - bottom: 0; - height: 2px; - background-color: #3f51b5; - -webkit-transition: all .35s cubic-bezier(.4, 0, .2, 1); - transition: all .35s cubic-bezier(.4, 0, .2, 1); - - will-change: left, width; -} -/** - * ============================================================================= - * ************ Tab 主色 ************ - * ============================================================================= - */ -.mdui-theme-primary-amber .mdui-tab .mdui-tab-active { - color: #ffc107; -} -.mdui-theme-primary-amber .mdui-tab-indicator { - background-color: #ffc107; -} -.mdui-theme-primary-blue .mdui-tab .mdui-tab-active { - color: #2196f3; -} -.mdui-theme-primary-blue .mdui-tab-indicator { - background-color: #2196f3; -} -.mdui-theme-primary-blue-grey .mdui-tab .mdui-tab-active { - color: #607d8b; -} -.mdui-theme-primary-blue-grey .mdui-tab-indicator { - background-color: #607d8b; -} -.mdui-theme-primary-brown .mdui-tab .mdui-tab-active { - color: #795548; -} -.mdui-theme-primary-brown .mdui-tab-indicator { - background-color: #795548; -} -.mdui-theme-primary-cyan .mdui-tab .mdui-tab-active { - color: #00bcd4; -} -.mdui-theme-primary-cyan .mdui-tab-indicator { - background-color: #00bcd4; -} -.mdui-theme-primary-deep-orange .mdui-tab .mdui-tab-active { - color: #ff5722; -} -.mdui-theme-primary-deep-orange .mdui-tab-indicator { - background-color: #ff5722; -} -.mdui-theme-primary-deep-purple .mdui-tab .mdui-tab-active { - color: #673ab7; -} -.mdui-theme-primary-deep-purple .mdui-tab-indicator { - background-color: #673ab7; -} -.mdui-theme-primary-green .mdui-tab .mdui-tab-active { - color: #4caf50; -} -.mdui-theme-primary-green .mdui-tab-indicator { - background-color: #4caf50; -} -.mdui-theme-primary-grey .mdui-tab .mdui-tab-active { - color: #9e9e9e; -} -.mdui-theme-primary-grey .mdui-tab-indicator { - background-color: #9e9e9e; -} -.mdui-theme-primary-indigo .mdui-tab .mdui-tab-active { - color: #3f51b5; -} -.mdui-theme-primary-indigo .mdui-tab-indicator { - background-color: #3f51b5; -} -.mdui-theme-primary-light-blue .mdui-tab .mdui-tab-active { - color: #03a9f4; -} -.mdui-theme-primary-light-blue .mdui-tab-indicator { - background-color: #03a9f4; -} -.mdui-theme-primary-light-green .mdui-tab .mdui-tab-active { - color: #8bc34a; -} -.mdui-theme-primary-light-green .mdui-tab-indicator { - background-color: #8bc34a; -} -.mdui-theme-primary-lime .mdui-tab .mdui-tab-active { - color: #cddc39; -} -.mdui-theme-primary-lime .mdui-tab-indicator { - background-color: #cddc39; -} -.mdui-theme-primary-orange .mdui-tab .mdui-tab-active { - color: #ff9800; -} -.mdui-theme-primary-orange .mdui-tab-indicator { - background-color: #ff9800; -} -.mdui-theme-primary-pink .mdui-tab .mdui-tab-active { - color: #e91e63; -} -.mdui-theme-primary-pink .mdui-tab-indicator { - background-color: #e91e63; -} -.mdui-theme-primary-purple .mdui-tab .mdui-tab-active { - color: #9c27b0; -} -.mdui-theme-primary-purple .mdui-tab-indicator { - background-color: #9c27b0; -} -.mdui-theme-primary-red .mdui-tab .mdui-tab-active { - color: #f44336; -} -.mdui-theme-primary-red .mdui-tab-indicator { - background-color: #f44336; -} -.mdui-theme-primary-teal .mdui-tab .mdui-tab-active { - color: #009688; -} -.mdui-theme-primary-teal .mdui-tab-indicator { - background-color: #009688; -} -.mdui-theme-primary-yellow .mdui-tab .mdui-tab-active { - color: #ffeb3b; -} -.mdui-theme-primary-yellow .mdui-tab-indicator { - background-color: #ffeb3b; -} -/* 带背景色的选项卡 */ -.mdui-tab[class*="mdui-color-"]:not(.mdui-color-white) .mdui-tab-active { - color: inherit; -} -.mdui-tab[class*="mdui-color-"]:not(.mdui-color-white) .mdui-tab-indicator { - background-color: #fff; -} -.mdui-tab[class*="mdui-color-"]:not(.mdui-color-white)::-webkit-scrollbar { - width: 5px; - height: 5px; - background: transparent; -} -@media (min-width: 1024px) { - .mdui-tab[class*="mdui-color-"]:not(.mdui-color-white)::-webkit-scrollbar { - width: 8px; - height: 8px; - } -} -.mdui-tab[class*="mdui-color-"]:not(.mdui-color-white)::-webkit-scrollbar-thumb { - background: rgba(255, 255, 255, .3); -} -/** - * ============================================================================= - * ************ Subheader 副标题 ************ - * ============================================================================= - * - * 用于 List 和 Grid list 组件 - */ -.mdui-subheader, -.mdui-subheader-inset { - position: relative; - height: 48px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-right: 16px; - padding-left: 16px; - overflow: hidden; - font-size: 14px; - font-weight: 500; - line-height: 48px; - color: rgba(0, 0, 0, .54); - text-overflow: ellipsis; - white-space: nowrap; - cursor: default; -} -.mdui-subheader-inset { - padding-left: 72px; -} -/** - * ============================================================================= - * ************ Subheader dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-subheader, -.mdui-theme-layout-dark .mdui-subheader-inset { - color: rgba(255, 255, 255, .7); -} -/** - * ============================================================================= - * ************ Grid List 网格列表 ************ - * ============================================================================= - */ -/* 调整网格边距 */ -.mdui-grid-list { - margin: 0 -2px; -} -.mdui-grid-list .mdui-col, -.mdui-grid-list [class*="mdui-col-xs-"], -.mdui-grid-list [class*="mdui-col-sm-"], -.mdui-grid-list [class*="mdui-col-md-"], -.mdui-grid-list [class*="mdui-col-lg-"], -.mdui-grid-list [class*="mdui-col-xl-"] { - padding-right: 2px; - padding-left: 2px; -} -/* 单元格 */ -.mdui-grid-tile { - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin-bottom: 4px; - overflow: hidden; -} -.mdui-grid-tile img { - display: block; - width: 100%; -} -/* 操作栏 */ -.mdui-grid-tile-actions { - position: absolute; - right: 0; - bottom: 0; - left: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - min-height: 48px; - max-height: 68px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 16px; - color: #fff; - background: rgba(0, 0, 0, .2); - - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; -} -.mdui-grid-tile-actions .mdui-icon { - color: #fff; -} -/* 操作栏内的文本 */ -.mdui-grid-tile-text { - overflow: hidden; - - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; -} -/* 标题 */ -.mdui-grid-tile-title { - height: 16px; - overflow: hidden; - font-size: 16px; - line-height: 16px; - text-overflow: ellipsis; - white-space: nowrap; -} -.mdui-grid-tile-title .mdui-icon { - margin-right: 8px; -} -/* 副标题 */ -.mdui-grid-tile-subtitle { - height: 18px; - margin-top: 4px; - overflow: hidden; - font-size: 12px; - line-height: 18px; - text-overflow: ellipsis; - white-space: nowrap; -} -.mdui-grid-tile-subtitle .mdui-icon { - margin-right: 8px; - font-size: 18px; -} -/* 操作栏内的按钮 */ -.mdui-grid-tile-buttons { - margin: -8px; - white-space: nowrap; - - -webkit-box-flex: 0; - -webkit-flex: none; - -ms-flex: none; - flex: none; -} -.mdui-grid-tile-buttons .mdui-btn { - margin-left: 8px; -} -.mdui-grid-tile-buttons .mdui-btn:first-child { - margin-left: 0; -} -.mdui-grid-tile-text + .mdui-grid-tile-buttons { - margin-left: 8px; -} -.mdui-grid-tile-buttons + .mdui-grid-tile-text { - margin-left: 16px; -} -/* 操作栏位于顶部 */ -.mdui-grid-tile-actions-top { - top: 0; - bottom: auto; -} -/* 操作栏背景透明 */ -.mdui-grid-tile-actions-transparent { - background: transparent; -} -/* 操作栏背景渐变 */ -.mdui-grid-tile-actions-gradient { - background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .26)), to(rgba(0, 0, 0, 0))); - background: linear-gradient(to top, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0)); -} -.mdui-grid-tile-actions-gradient.mdui-grid-tile-actions-top { - background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .26)), to(rgba(0, 0, 0, 0))); - background: linear-gradient(to bottom, rgba(0, 0, 0, .26), rgba(0, 0, 0, 0)); -} -/** - * ============================================================================= - * ************ List 列表 ************ - * ============================================================================= - */ -/* 列表 */ -.mdui-list { - padding: 8px 0; - margin: 0; - list-style: none; - background-color: transparent; -} -.mdui-list .mdui-list { - padding: 0; -} -.mdui-list > .mdui-divider, -.mdui-list > .mdui-divider-light, -.mdui-list > .mdui-divider-dark, -.mdui-list > .mdui-divider-inset, -.mdui-list > .mdui-divider-inset-light, -.mdui-list > .mdui-divider-inset-dark { - margin-top: 8px; - margin-bottom: 8px; -} -.mdui-list a { - color: inherit; - text-decoration: none; -} -.mdui-list .mdui-subheader, -.mdui-list .mdui-subheader-inset { - margin-top: 8px; -} -.mdui-list .mdui-subheader:before, -.mdui-list .mdui-subheader-inset:before { - position: absolute; - right: 0; - left: 0; - display: block; - height: 1px; - content: ' '; - background-color: rgba(0, 0, 0, .12); -} -.mdui-list .mdui-subheader:first-child, -.mdui-list .mdui-subheader-inset:first-child { - margin-top: -8px; -} -.mdui-list .mdui-subheader:first-child:before, -.mdui-list .mdui-subheader-inset:first-child:before { - background-color: transparent; -} -.mdui-list .mdui-subheader-inset:before { - left: 72px; -} -/* 列表项 */ -.mdui-list-item { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - min-height: 48px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 0 16px; - text-decoration: none; - cursor: pointer; - -webkit-transition: background-color .3s cubic-bezier(.4, 0, .2, 1); - transition: background-color .3s cubic-bezier(.4, 0, .2, 1); - - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; -} -.mdui-list-item:hover { - background-color: rgba(0, 0, 0, .08); -} -.mdui-list-item:after { - /* height: 48px;*/ - /* visibility: hidden; */ - content: ' '; -} -/* 列表项图标 */ -.mdui-list-item-icon { - width: 24px; - min-width: 24px; - height: 24px; - color: rgba(0, 0, 0, .54); -} -/* 列表项头像 */ -.mdui-list-item-avatar { - min-width: 40px; - max-width: 40px; - height: 40px; - margin-top: 8px; - margin-bottom: 8px; - line-height: 40px; - color: #fff; - text-align: center; - background-color: #bdbdbd; - border-radius: 50%; -} -.mdui-list-item-avatar img { - width: 100%; - height: 100%; - border-radius: 50%; -} -/* 列表项内容 */ -.mdui-list-item-content { - padding-top: 14px; - padding-bottom: 14px; - font-size: 16px; - font-weight: 400; - line-height: 20px; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} -/* 列表项内容的副内容 */ -.mdui-list-item-text { - font-size: 14px; - opacity: .54; -} -.mdui-list-item-title ~ .mdui-list-item-text { - margin-top: 4px; -} -/* 激活状态的列表项 */ -.mdui-list-item-active { - font-weight: 700; - background-color: rgba(0, 0, 0, .08); -} -.mdui-list-item-active .mdui-list-item-content { - font-weight: 700; -} -.mdui-list-item-active .mdui-list-item-text { - font-weight: 400; -} -/* 限制文本高度 */ -.mdui-list-item-one-line, -.mdui-list-item-two-line, -.mdui-list-item-three-line { - display: -webkit-box; - overflow: hidden; - text-overflow: ellipsis; - - -webkit-box-orient: vertical; -} -.mdui-list-item-one-line { - height: 20px; - - -webkit-line-clamp: 1; -} -.mdui-list-item-two-line { - height: 40px; - - -webkit-line-clamp: 2; -} -.mdui-list-item-three-line { - height: 60px; - - -webkit-line-clamp: 3; -} -/* 列表项内的元素间添加间距 */ -.mdui-list-item-icon ~ .mdui-list-item-content { - margin-left: 32px; -} -.mdui-checkbox ~ .mdui-list-item-content, -.mdui-radio ~ .mdui-list-item-content, -.mdui-switch ~ .mdui-list-item-content { - margin-left: 20px; -} -.mdui-list-item-avatar ~ .mdui-list-item-content { - margin-left: 16px; -} -.mdui-list-item-content ~ .mdui-list-item-icon, -.mdui-list-item-content ~ .mdui-list-item-avatar, -.mdui-list-item-content ~ .mdui-checkbox, -.mdui-list-item-content ~ .mdui-radio, -.mdui-list-item-content ~ .mdui-switch { - margin-left: 16px; -} -.mdui-list-item-content ~ .mdui-checkbox, -.mdui-list-item-content ~ .mdui-radio { - padding-left: 24px; -} -/* 密集型列表 */ -.mdui-list-dense { - padding: 4px 0; - font-size: 13px; -} -.mdui-list-dense > .mdui-divider, -.mdui-list-dense > .mdui-divider-light, -.mdui-list-dense > .mdui-divider-dark, -.mdui-list-dense > .mdui-divider-inset, -.mdui-list-dense > .mdui-divider-inset-light, -.mdui-list-dense > .mdui-divider-inset-dark { - margin-top: 4px; - margin-bottom: 4px; -} -.mdui-list-dense .mdui-subheader, -.mdui-list-dense .mdui-subheader-inset { - height: 40px; - margin-top: 4px; - font-size: 12px; - line-height: 40px; -} -.mdui-list-dense .mdui-subheader:first-child, -.mdui-list-dense .mdui-subheader-inset:first-child { - margin-top: -4px; -} -.mdui-list-dense .mdui-list-item { - min-height: 40px; -} -.mdui-list-dense .mdui-list-item:after { - height: 40px; -} -.mdui-list-dense .mdui-list-item-icon { - width: 20px; - height: 20px; - font-size: 20px; -} -.mdui-list-dense .mdui-list-item-avatar { - width: 36px; - min-width: 36px; - height: 36px; - min-height: 36px; -} -.mdui-list-dense .mdui-list-item-content { - padding-top: 11px; - padding-bottom: 11px; - font-size: 13px; - line-height: 18px; -} -.mdui-list-dense .mdui-list-item-text { - font-size: 13px; -} -.mdui-list-dense .mdui-list-item-title ~ .mdui-list-item-text { - margin-top: 2px; -} -.mdui-list-dense .mdui-list-item-one-line { - height: 18px; -} -.mdui-list-dense .mdui-list-item-two-line { - height: 36px; -} -.mdui-list-dense .mdui-list-item-three-line { - height: 54px; -} -/** - * ============================================================================= - * ************ List dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-list .mdui-subheader:before, -.mdui-theme-layout-dark .mdui-list .mdui-subheader-inset:before { - background-color: rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-list .mdui-subheader:first-child:before, -.mdui-theme-layout-dark .mdui-list .mdui-subheader-inset:first-child:before { - background-color: transparent; -} -.mdui-theme-layout-dark .mdui-list-item { - color: #fff; -} -.mdui-theme-layout-dark .mdui-list-item:hover { - background-color: rgba(255, 255, 255, .08); -} -.mdui-theme-layout-dark .mdui-list-item-icon { - color: #fff; -} -.mdui-theme-layout-dark .mdui-list-item-text { - opacity: .7; -} -.mdui-theme-layout-dark .mdui-list-item-active { - background-color: rgba(255, 255, 255, .08); -} -/** - * ============================================================================== - * ************ List inner theme ************ - * ============================================================================== - */ -[class*="mdui-color-"] .mdui-list-item { - color: inherit; -} -[class*="mdui-color-"] .mdui-list-item-icon { - color: inherit; -} -/** - * ============================================================================= - * ************ Drawer 抽屉栏导航 ************ - * ============================================================================= - */ -/* DOM 加载完后再添加 transition */ -body.mdui-loaded { - -webkit-transition: padding .3s cubic-bezier(0, 0, .2, 1); - transition: padding .3s cubic-bezier(0, 0, .2, 1); -} -body.mdui-loaded .mdui-drawer { - -webkit-transition: all .3s cubic-bezier(0, 0, .2, 1); - transition: all .3s cubic-bezier(0, 0, .2, 1); -} -/* 抽屉栏外层,默认出现在左侧且隐藏 */ -.mdui-drawer { - position: fixed; - top: 0; - bottom: 0; - left: 0; - z-index: 5000; - width: calc(100% - 56px); - max-width: 280px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin: 0; - overflow-x: hidden; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - white-space: nowrap; - - will-change: transform; -} -@media (max-width: 1023px) { - .mdui-drawer:not(.mdui-drawer-open) { - -webkit-box-shadow: none !important; - box-shadow: none !important; - } -} -@media (min-width: 600px) { - .mdui-drawer { - width: calc(100% - 64px); - max-width: 320px; - } -} -@media (min-width: 1024px) { - .mdui-drawer { - width: 240px; - max-width: none; - } - .mdui-drawer.mdui-drawer-close { - -webkit-box-shadow: none !important; - box-shadow: none !important; - } -} -/* 出现在右侧的抽屉栏 */ -.mdui-drawer-right { - right: 0; - left: auto; -} -/* 平板上的样式 */ -@media (max-width: 1023px) { - .mdui-drawer { - /* 始终有背景和阴影 */ - background-color: rgba(255, 255, 255, 0.8); - backdrop-filter: saturate(180%) blur(20px); - -webkit-backdrop-filter: saturate(180%) blur(20px); - -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); - box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); - /* 默认隐藏 */ - -webkit-transform: translateX(-330px); - transform: translateX(-330px); - } - .mdui-drawer-right { - /* 右侧 drawer 也默认隐藏 */ - -webkit-transform: translateX(330px); - transform: translateX(330px); - } -} -/* 手机上的样式 */ -@media (max-width: 599px) { - .mdui-drawer { - -webkit-transform: translateX(-290px); - transform: translateX(-290px); - } - .mdui-drawer-right { - -webkit-transform: translateX(290px); - transform: translateX(290px); - } -} -/* 强制隐藏抽屉栏 */ -.mdui-drawer-close { - -webkit-transform: translateX(-290px); - transform: translateX(-290px); -} -.mdui-drawer-close.mdui-drawer-right { - -webkit-transform: translateX(290px); - transform: translateX(290px); -} -@media (min-width: 600px) { - .mdui-drawer-close { - -webkit-transform: translateX(-330px); - transform: translateX(-330px); - } - .mdui-drawer-close.mdui-drawer-right { - -webkit-transform: translateX(330px); - transform: translateX(330px); - } -} -@media (min-width: 1024px) { - .mdui-drawer-close { - -webkit-transform: translateX(-250px); - transform: translateX(-250px); - } - .mdui-drawer-close.mdui-drawer-right { - -webkit-transform: translateX(250px); - transform: translateX(250px); - } -} -/* 强制显示抽屉栏 */ -.mdui-drawer-open { - -webkit-transform: translateX(0) !important; - transform: translateX(0) !important; -} -/* PC 上的样式 */ -@media (min-width: 1024px) { - /* 使该类所在元素获得 padding-left 或 padding-right,避免被抽屉栏覆盖住页面 */ - .mdui-drawer-body-left { - padding-left: 240px; - } - .mdui-drawer-body-right { - padding-right: 240px; - } - /* PC 上默认有上边距 */ - .mdui-appbar-with-toolbar .mdui-drawer { - top: 64px; - } - .mdui-appbar-with-tab .mdui-drawer { - top: 48px; - } - .mdui-appbar-with-tab-larger .mdui-drawer { - top: 72px; - } - .mdui-appbar-with-toolbar.mdui-appbar-with-tab .mdui-drawer { - top: 112px; - } - .mdui-appbar-with-toolbar.mdui-appbar-with-tab-larger .mdui-drawer { - top: 136px; - } -} -/* 抽屉栏不是透明时添加阴影 */ -.mdui-drawer[class*="mdui-color-"]:not(.mdui-color-transparent) { - -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); - box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); -} -/* 抽屉栏 100% 高度,覆盖在导航栏上面 */ -.mdui-drawer-full-height { - top: 0 !important; -} -/** - * ============================================================================= - * ************ Drawer dark ************ - * ============================================================================= - */ -@media (max-width: 1023px) { - .mdui-theme-layout-dark .mdui-drawer { - background-color: #42424280; - } -} -/** - * ============================================================================= - * ************ Dialog 提示框 ************ - * ============================================================================= - */ -.mdui-dialog { - position: fixed; - right: 0; - left: 0; - z-index: 6000; - display: none; - width: 92%; - min-width: 180px; - max-width: 728px; - max-height: 90%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin: auto; - overflow: hidden; - color: #000; - background-color: #fff; - border-radius: 2px; - -webkit-box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12); - box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12); - opacity: 0; - -webkit-transition-duration: .3s; - transition-duration: .3s; - -webkit-transition-property: opacity, visibility, -webkit-transform; - transition-property: opacity, visibility, -webkit-transform; - transition-property: transform, opacity, visibility; - transition-property: transform, opacity, visibility, -webkit-transform; - -webkit-transform: scale(.95); - transform: scale(.95); - - will-change: top, opacity, transform; -} -@media (min-width: 600px) { - .mdui-dialog { - width: 85%; - max-height: 85%; - } -} -@media (min-width: 1024px) { - .mdui-dialog { - width: 80%; - max-height: 80%; - } -} -/* 打开提示框 */ -.mdui-dialog-open { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); -} -/* 提示框标题 */ -.mdui-dialog-title { - -webkit-box-sizing: border-box; - box-sizing: border-box; - font-size: 20px; - font-weight: 500; - line-height: 24px; - text-align: left; -} -/* 标题固定在顶部 */ -.mdui-dialog > .mdui-dialog-title { - padding: 24px 24px 20px 24px; -} -/* 提示框内容 */ -.mdui-dialog-content { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 24px; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - font-size: 15px; - line-height: 1.5; - color: rgba(0, 0, 0, .7); -} -/* 标题随内容滚动 */ -.mdui-dialog-content > .mdui-dialog-title { - padding-bottom: 20px; -} -.mdui-dialog-title + .mdui-dialog-content { - padding-top: 0; -} -/* 提示框底部按钮 */ -.mdui-dialog-actions { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 8px; - text-align: right; -} -.mdui-dialog-actions .mdui-btn { - min-width: 64px; - margin-left: 8px; - color: #e91e63; -} -.mdui-dialog-actions .mdui-btn:first-child { - margin-left: 0; -} -/* 底部按钮滚随内容动 */ -.mdui-dialog-content > .mdui-dialog-actions { - padding-top: 32px; - margin: 0 -24px -24px -24px; -} -/* 使提示框底部按钮竖排 */ -.mdui-dialog-actions-stacked { - padding: 8px 0 8px 0; -} -.mdui-dialog-actions-stacked .mdui-btn { - width: 100%; - height: 48px; - margin: 0; - line-height: 48px !important; - text-align: right; - border-radius: 0; -} -/** - * ============================================================================= - * ************ Dialog 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-dialog-actions .mdui-btn { - color: #ffc107; -} -.mdui-theme-accent-blue .mdui-dialog-actions .mdui-btn { - color: #2196f3; -} -.mdui-theme-accent-cyan .mdui-dialog-actions .mdui-btn { - color: #00bcd4; -} -.mdui-theme-accent-deep-orange .mdui-dialog-actions .mdui-btn { - color: #ff5722; -} -.mdui-theme-accent-deep-purple .mdui-dialog-actions .mdui-btn { - color: #673ab7; -} -.mdui-theme-accent-green .mdui-dialog-actions .mdui-btn { - color: #4caf50; -} -.mdui-theme-accent-indigo .mdui-dialog-actions .mdui-btn { - color: #3f51b5; -} -.mdui-theme-accent-light-blue .mdui-dialog-actions .mdui-btn { - color: #03a9f4; -} -.mdui-theme-accent-light-green .mdui-dialog-actions .mdui-btn { - color: #8bc34a; -} -.mdui-theme-accent-lime .mdui-dialog-actions .mdui-btn { - color: #cddc39; -} -.mdui-theme-accent-orange .mdui-dialog-actions .mdui-btn { - color: #ff9800; -} -.mdui-theme-accent-pink .mdui-dialog-actions .mdui-btn { - color: #e91e63; -} -.mdui-theme-accent-purple .mdui-dialog-actions .mdui-btn { - color: #9c27b0; -} -.mdui-theme-accent-red .mdui-dialog-actions .mdui-btn { - color: #f44336; -} -.mdui-theme-accent-teal .mdui-dialog-actions .mdui-btn { - color: #009688; -} -.mdui-theme-accent-yellow .mdui-dialog-actions .mdui-btn { - color: #ffeb3b; -} -/** - * ============================================================================= - * ************ Dialog dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-dialog { - color: #fff; - background-color: #424242; -} -.mdui-theme-layout-dark .mdui-dialog-content { - color: rgba(255, 255, 255, .7); -} -/** - * ============================================================================= - * ************ Dialog alert ************ - * ============================================================================= - */ -.mdui-dialog-alert { - max-width: 448px; -} -/** - * ============================================================================= - * ************ Dialog confirm ************ - * ============================================================================= - */ -.mdui-dialog-confirm { - max-width: 448px; -} -/** - * ============================================================================= - * ************ Dialog prompt ************ - * ============================================================================= - */ -.mdui-dialog-prompt { - max-width: 448px; -} -.mdui-dialog-prompt .mdui-textfield { - padding-top: 0; -} -/** - * ============================================================================= - * ************ Shadow 阴影 ************ - * ============================================================================= - */ -.mdui-shadow-0 { - -webkit-box-shadow: none; - box-shadow: none; -} -.mdui-shadow-1 { - -webkit-box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12); - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12); -} -.mdui-shadow-2 { - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -.mdui-shadow-3 { - -webkit-box-shadow: 0 3px 3px -2px rgba(0, 0, 0, .2), 0 3px 4px 0 rgba(0, 0, 0, .14), 0 1px 8px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 3px -2px rgba(0, 0, 0, .2), 0 3px 4px 0 rgba(0, 0, 0, .14), 0 1px 8px 0 rgba(0, 0, 0, .12); -} -.mdui-shadow-4 { - -webkit-box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); - box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12); -} -.mdui-shadow-5 { - -webkit-box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 5px 8px 0 rgba(0, 0, 0, .14), 0 1px 14px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 5px 8px 0 rgba(0, 0, 0, .14), 0 1px 14px 0 rgba(0, 0, 0, .12); -} -.mdui-shadow-6 { - -webkit-box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12); -} -.mdui-shadow-7 { - -webkit-box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12); - box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12); -} -.mdui-shadow-8 { - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); -} -.mdui-shadow-9 { - -webkit-box-shadow: 0 5px 6px -3px rgba(0, 0, 0, .2), 0 9px 12px 1px rgba(0, 0, 0, .14), 0 3px 16px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 6px -3px rgba(0, 0, 0, .2), 0 9px 12px 1px rgba(0, 0, 0, .14), 0 3px 16px 2px rgba(0, 0, 0, .12); -} -.mdui-shadow-10 { - -webkit-box-shadow: 0 6px 6px -3px rgba(0, 0, 0, .2), 0 10px 14px 1px rgba(0, 0, 0, .14), 0 4px 18px 3px rgba(0, 0, 0, .12); - box-shadow: 0 6px 6px -3px rgba(0, 0, 0, .2), 0 10px 14px 1px rgba(0, 0, 0, .14), 0 4px 18px 3px rgba(0, 0, 0, .12); -} -.mdui-shadow-11 { - -webkit-box-shadow: 0 6px 7px -4px rgba(0, 0, 0, .2), 0 11px 15px 1px rgba(0, 0, 0, .14), 0 4px 20px 3px rgba(0, 0, 0, .12); - box-shadow: 0 6px 7px -4px rgba(0, 0, 0, .2), 0 11px 15px 1px rgba(0, 0, 0, .14), 0 4px 20px 3px rgba(0, 0, 0, .12); -} -.mdui-shadow-12 { - -webkit-box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 12px 17px 2px rgba(0, 0, 0, .14), 0 5px 22px 4px rgba(0, 0, 0, .12); - box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 12px 17px 2px rgba(0, 0, 0, .14), 0 5px 22px 4px rgba(0, 0, 0, .12); -} -.mdui-shadow-13 { - -webkit-box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 13px 19px 2px rgba(0, 0, 0, .14), 0 5px 24px 4px rgba(0, 0, 0, .12); - box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 13px 19px 2px rgba(0, 0, 0, .14), 0 5px 24px 4px rgba(0, 0, 0, .12); -} -.mdui-shadow-14 { - -webkit-box-shadow: 0 7px 9px -4px rgba(0, 0, 0, .2), 0 14px 21px 2px rgba(0, 0, 0, .14), 0 5px 26px 4px rgba(0, 0, 0, .12); - box-shadow: 0 7px 9px -4px rgba(0, 0, 0, .2), 0 14px 21px 2px rgba(0, 0, 0, .14), 0 5px 26px 4px rgba(0, 0, 0, .12); -} -.mdui-shadow-15 { - -webkit-box-shadow: 0 8px 9px -5px rgba(0, 0, 0, .2), 0 15px 22px 2px rgba(0, 0, 0, .14), 0 6px 28px 5px rgba(0, 0, 0, .12); - box-shadow: 0 8px 9px -5px rgba(0, 0, 0, .2), 0 15px 22px 2px rgba(0, 0, 0, .14), 0 6px 28px 5px rgba(0, 0, 0, .12); -} -.mdui-shadow-16 { - -webkit-box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); - box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12); -} -.mdui-shadow-17 { - -webkit-box-shadow: 0 8px 11px -5px rgba(0, 0, 0, .2), 0 17px 26px 2px rgba(0, 0, 0, .14), 0 6px 32px 5px rgba(0, 0, 0, .12); - box-shadow: 0 8px 11px -5px rgba(0, 0, 0, .2), 0 17px 26px 2px rgba(0, 0, 0, .14), 0 6px 32px 5px rgba(0, 0, 0, .12); -} -.mdui-shadow-18 { - -webkit-box-shadow: 0 9px 11px -5px rgba(0, 0, 0, .2), 0 18px 28px 2px rgba(0, 0, 0, .14), 0 7px 34px 6px rgba(0, 0, 0, .12); - box-shadow: 0 9px 11px -5px rgba(0, 0, 0, .2), 0 18px 28px 2px rgba(0, 0, 0, .14), 0 7px 34px 6px rgba(0, 0, 0, .12); -} -.mdui-shadow-19 { - -webkit-box-shadow: 0 9px 12px -6px rgba(0, 0, 0, .2), 0 19px 29px 2px rgba(0, 0, 0, .14), 0 7px 36px 6px rgba(0, 0, 0, .12); - box-shadow: 0 9px 12px -6px rgba(0, 0, 0, .2), 0 19px 29px 2px rgba(0, 0, 0, .14), 0 7px 36px 6px rgba(0, 0, 0, .12); -} -.mdui-shadow-20 { - -webkit-box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 20px 31px 3px rgba(0, 0, 0, .14), 0 8px 38px 7px rgba(0, 0, 0, .12); - box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 20px 31px 3px rgba(0, 0, 0, .14), 0 8px 38px 7px rgba(0, 0, 0, .12); -} -.mdui-shadow-21 { - -webkit-box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 21px 33px 3px rgba(0, 0, 0, .14), 0 8px 40px 7px rgba(0, 0, 0, .12); - box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 21px 33px 3px rgba(0, 0, 0, .14), 0 8px 40px 7px rgba(0, 0, 0, .12); -} -.mdui-shadow-22 { - -webkit-box-shadow: 0 10px 14px -6px rgba(0, 0, 0, .2), 0 22px 35px 3px rgba(0, 0, 0, .14), 0 8px 42px 7px rgba(0, 0, 0, .12); - box-shadow: 0 10px 14px -6px rgba(0, 0, 0, .2), 0 22px 35px 3px rgba(0, 0, 0, .14), 0 8px 42px 7px rgba(0, 0, 0, .12); -} -.mdui-shadow-23 { - -webkit-box-shadow: 0 11px 14px -7px rgba(0, 0, 0, .2), 0 23px 36px 3px rgba(0, 0, 0, .14), 0 9px 44px 8px rgba(0, 0, 0, .12); - box-shadow: 0 11px 14px -7px rgba(0, 0, 0, .2), 0 23px 36px 3px rgba(0, 0, 0, .14), 0 9px 44px 8px rgba(0, 0, 0, .12); -} -.mdui-shadow-24 { - -webkit-box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12); - box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12); -} -/* 鼠标悬浮时加深阴影 */ -.mdui-hoverable { - -webkit-transition: -webkit-box-shadow .25s cubic-bezier(.4, 0, .2, 1); - transition: -webkit-box-shadow .25s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .25s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .25s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .25s cubic-bezier(.4, 0, .2, 1); - - will-change: box-shadow; -} -.mdui-hoverable:hover, -.mdui-hoverable:focus { - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); -} -/** - * ============================================================================= - * ************ Tooltip 工具提示 ************ - * ============================================================================= - */ -.mdui-tooltip { - position: absolute; - z-index: 9000; - display: inline-block; - max-width: 180px; - min-height: 32px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 8px 16px; - font-size: 14px; - font-weight: 500; - line-height: 22px; - color: #fff; - text-align: left; - background-color: rgba(97, 97, 97, .9); - border-radius: 2px; - opacity: 0; - -webkit-transition-timing-function: cubic-bezier(.4, 0, .2, 1); - transition-timing-function: cubic-bezier(.4, 0, .2, 1); - -webkit-transition-duration: .15s; - transition-duration: .15s; - -webkit-transition-property: opacity, -webkit-transform; - transition-property: opacity, -webkit-transform; - transition-property: opacity, transform; - transition-property: opacity, transform, -webkit-transform; - -webkit-transform: scale(0); - transform: scale(0); - - will-change: opacity, transform; -} -@media (min-width: 1024px) { - .mdui-tooltip { - max-width: 200px; - min-height: 24px; - padding: 4px 8px; - font-size: 12px; - line-height: 18px; - } -} -/* 显示工具提示 */ -.mdui-tooltip-open { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); -} -/** - * ============================================================================= - * ************ Snackbar ************ - * ============================================================================= - */ -.mdui-snackbar { - position: fixed; - z-index: 7000; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 100%; - min-height: 48px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 0 24px 0 24px; - font-size: 14px; - line-height: 20px; - color: #fff; - background-color: #323232; - - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - will-change: transform; -} -@media (min-width: 600px) { - .mdui-snackbar { - width: auto; - min-width: 288px; - max-width: 568px; - border-radius: 2px; - } -} -.mdui-snackbar-bottom, -.mdui-snackbar-top, -.mdui-snackbar-left-top, -.mdui-snackbar-left-bottom, -.mdui-snackbar-right-top, -.mdui-snackbar-right-bottom { - -webkit-transition: -webkit-transform .3s cubic-bezier(.4, 0, .2, 1); - transition: -webkit-transform .3s cubic-bezier(.4, 0, .2, 1); - transition: transform .3s cubic-bezier(.4, 0, .2, 1); - transition: transform .3s cubic-bezier(.4, 0, .2, 1), -webkit-transform .3s cubic-bezier(.4, 0, .2, 1); -} -/* 位置 */ -.mdui-snackbar-bottom, -.mdui-snackbar-left-bottom, -.mdui-snackbar-right-bottom { - bottom: 0; -} -.mdui-snackbar-top, -.mdui-snackbar-left-top, -.mdui-snackbar-right-top { - top: 0; -} -.mdui-snackbar-top, -.mdui-snackbar-bottom { - left: 50%; -} -@media (min-width: 600px) { - .mdui-snackbar-left-top { - top: 24px; - left: 24px; - } - .mdui-snackbar-left-bottom { - bottom: 24px; - left: 24px; - } - .mdui-snackbar-right-top { - top: 24px; - right: 24px; - } - .mdui-snackbar-right-bottom { - right: 24px; - bottom: 24px; - } -} -/* 文本 */ -.mdui-snackbar-text { - position: relative; - max-width: 100%; - padding: 14px 0 14px 0; - overflow: hidden; - text-overflow: ellipsis; -} -/* 按钮 */ -.mdui-snackbar-action { - margin-right: -16px; - color: #ff80ab; - white-space: nowrap; -} -/** - * ============================================================================= - * ************ Snackbar 强调色 ************ - * ============================================================================= - */ -.mdui-theme-accent-amber .mdui-snackbar-action { - color: #ffe57f; -} -.mdui-theme-accent-blue .mdui-snackbar-action { - color: #82b1ff; -} -.mdui-theme-accent-cyan .mdui-snackbar-action { - color: #84ffff; -} -.mdui-theme-accent-deep-orange .mdui-snackbar-action { - color: #ff9e80; -} -.mdui-theme-accent-deep-purple .mdui-snackbar-action { - color: #b388ff; -} -.mdui-theme-accent-green .mdui-snackbar-action { - color: #b9f6ca; -} -.mdui-theme-accent-indigo .mdui-snackbar-action { - color: #8c9eff; -} -.mdui-theme-accent-light-blue .mdui-snackbar-action { - color: #80d8ff; -} -.mdui-theme-accent-light-green .mdui-snackbar-action { - color: #ccff90; -} -.mdui-theme-accent-lime .mdui-snackbar-action { - color: #f4ff81; -} -.mdui-theme-accent-orange .mdui-snackbar-action { - color: #ffd180; -} -.mdui-theme-accent-pink .mdui-snackbar-action { - color: #ff80ab; -} -.mdui-theme-accent-purple .mdui-snackbar-action { - color: #ea80fc; -} -.mdui-theme-accent-red .mdui-snackbar-action { - color: #ff8a80; -} -.mdui-theme-accent-teal .mdui-snackbar-action { - color: #a7ffeb; -} -.mdui-theme-accent-yellow .mdui-snackbar-action { - color: #ffff8d; -} -/** - * ============================================================================= - * ************ Snackbar dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-snackbar { - background-color: #5d5d5d; -} -/** - * ============================================================================= - * ************ Chip 纸片 ************ - * ============================================================================= - */ -.mdui-chip { - display: inline-block; - height: 32px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - margin: 2px 0; - white-space: nowrap; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-color: #e0e0e0; - border-radius: 16px; - -webkit-transition: -webkit-box-shadow .25s cubic-bezier(.4, 0, .2, 1); - transition: -webkit-box-shadow .25s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .25s cubic-bezier(.4, 0, .2, 1); - transition: box-shadow .25s cubic-bezier(.4, 0, .2, 1), -webkit-box-shadow .25s cubic-bezier(.4, 0, .2, 1); - - will-change: box-shadow; -} -.mdui-chip:hover, -.mdui-chip:focus { - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -.mdui-chip:active { - background-color: #d6d6d6; -} -/* 左侧的图标 */ -.mdui-chip-icon { - position: relative; - display: inline-block; - width: 32px; - height: 32px; - margin-right: -4px; - overflow: hidden; - font-size: 18px; - line-height: 32px; - color: #fff; - text-align: center; - vertical-align: middle; - background-color: #989898; - border-radius: 50%; -} -.mdui-chip-icon .mdui-icon { - position: absolute; - top: 4px; - left: 4px; - color: #fff; -} -/* 文本 */ -.mdui-chip-title { - display: inline-block; - height: 32px; - padding-right: 12px; - padding-left: 12px; - font-size: 14px; - line-height: 32px; - vertical-align: middle; -} -/* 删除按钮 */ -.mdui-chip-delete { - display: inline-block; - width: 24px; - height: 24px; - margin-right: 4px; - margin-left: -8px; - overflow: hidden; - text-align: center; - text-decoration: none; - vertical-align: middle; - cursor: pointer; - border-radius: 50%; - opacity: .54; - -webkit-transition: opacity .25s cubic-bezier(.4, 0, .2, 1); - transition: opacity .25s cubic-bezier(.4, 0, .2, 1); - - will-change: opacity; -} -.mdui-chip-delete:hover, -.mdui-chip-delete:focus { - opacity: .87; -} -/** - * ============================================================================= - * ************ Chip dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-chip { - background-color: #484848; -} -.mdui-theme-layout-dark .mdui-chip:active { - background-color: #5d5d5d; -} -/** - * ============================================================================= - * ************ Bottom navigation 底部导航栏 ************ - * ============================================================================= - */ -.mdui-bottom-nav { - position: relative; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - height: 56px; - padding: 0; - margin: 0 auto; - overflow: hidden; - white-space: nowrap; -} -@media (min-width: 600px) { - .mdui-bottom-nav:before { - content: ' '; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; - } - .mdui-bottom-nav:after { - content: ' '; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; - } -} -.mdui-bottom-nav a { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - min-width: 32px; - max-width: none; - padding: 8px 12px 10px 12px; - overflow: hidden; - font-size: 12px; - color: inherit; - text-align: center; - text-decoration: none; - text-overflow: ellipsis; - cursor: pointer; - flex-direction: column; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - opacity: .7; - -webkit-transition: all .2s cubic-bezier(.4, 0, .2, 1); - transition: all .2s cubic-bezier(.4, 0, .2, 1); - - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; - -ms-flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - will-change: padding; -} -@media (min-width: 600px) { - .mdui-bottom-nav a { - max-width: 144px; - } -} -.mdui-bottom-nav a .mdui-icon { - opacity: .7; -} -.mdui-bottom-nav a label { - display: block; - width: 100%; - cursor: pointer; - -webkit-transition: -webkit-transform .2s cubic-bezier(.4, 0, .2, 1); - transition: -webkit-transform .2s cubic-bezier(.4, 0, .2, 1); - transition: transform .2s cubic-bezier(.4, 0, .2, 1); - transition: transform .2s cubic-bezier(.4, 0, .2, 1), -webkit-transform .2s cubic-bezier(.4, 0, .2, 1); - - will-change: font-size; -} -.mdui-bottom-nav a .mdui-icon + label { - margin-top: 6px; -} -.mdui-bottom-nav a.mdui-bottom-nav-active { - font-size: 14px; - color: #3f51b5; - opacity: 1; -} -.mdui-bottom-nav a.mdui-bottom-nav-active .mdui-icon { - opacity: 1; -} -/* 只在激活时显示文本 */ -.mdui-bottom-nav-text-auto a { - min-width: 32px; - padding-right: 0; - padding-left: 0; -} -@media (min-width: 600px) { - .mdui-bottom-nav-text-auto a { - max-width: 156px; - } -} -.mdui-bottom-nav-text-auto a .mdui-icon { - padding-top: 16px; - -webkit-transition: padding-top .2s cubic-bezier(.4, 0, .2, 1); - transition: padding-top .2s cubic-bezier(.4, 0, .2, 1); - - will-change: padding-top; -} -.mdui-bottom-nav-text-auto a label { - -webkit-transform: scale(0); - transform: scale(0); -} -.mdui-bottom-nav-text-auto a.mdui-bottom-nav-active { - padding-right: 18px; - padding-left: 18px; -} -.mdui-bottom-nav-text-auto a.mdui-bottom-nav-active .mdui-icon { - padding-top: 0; -} -.mdui-bottom-nav-text-auto a.mdui-bottom-nav-active label { - -webkit-transform: scale(1); - transform: scale(1); -} -/* 固定到页面底部 */ -.mdui-bottom-nav-fixed { - padding-bottom: 56px; -} -.mdui-bottom-nav-fixed .mdui-bottom-nav { - position: fixed; - right: 0; - bottom: 0; - left: 0; -} -/** - * ============================================================================= - * ************ Bottom Nav 主色 ************ - * ============================================================================= - */ -.mdui-theme-primary-amber .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #ffc107; -} -.mdui-theme-primary-blue .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #2196f3; -} -.mdui-theme-primary-blue-grey .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #607d8b; -} -.mdui-theme-primary-brown .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #795548; -} -.mdui-theme-primary-cyan .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #00bcd4; -} -.mdui-theme-primary-deep-orange .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #ff5722; -} -.mdui-theme-primary-deep-purple .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #673ab7; -} -.mdui-theme-primary-green .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #4caf50; -} -.mdui-theme-primary-grey .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #9e9e9e; -} -.mdui-theme-primary-indigo .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #3f51b5; -} -.mdui-theme-primary-light-blue .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #03a9f4; -} -.mdui-theme-primary-light-green .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #8bc34a; -} -.mdui-theme-primary-lime .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #cddc39; -} -.mdui-theme-primary-orange .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #ff9800; -} -.mdui-theme-primary-pink .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #e91e63; -} -.mdui-theme-primary-purple .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #9c27b0; -} -.mdui-theme-primary-red .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #f44336; -} -.mdui-theme-primary-teal .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #009688; -} -.mdui-theme-primary-yellow .mdui-bottom-nav a.mdui-bottom-nav-active { - color: #ffeb3b; -} -/* 带背景色的底部导航栏 */ -.mdui-bottom-nav[class*="mdui-color-"] .mdui-bottom-nav-active { - color: inherit !important; -} -/** - * ============================================================================= - * ************ Progress Linear 线性进度条 ************ - * ============================================================================= - */ -/* 线性进度条 */ -.mdui-progress { - position: relative; - display: block; - width: 100%; - height: 4px; - overflow: hidden; - background-color: rgba(63, 81, 181, .2); - border-radius: 2px; -} -/* 确定进度的线性进度条 */ -.mdui-progress-determinate { - position: absolute; - top: 0; - bottom: 0; - left: 0; - background-color: #3f51b5; - -webkit-transition: width .3s linear; - transition: width .3s linear; -} -/* 不确定进度的线性进度条 */ -.mdui-progress-indeterminate { - background-color: #3f51b5; -} -.mdui-progress-indeterminate:before { - position: absolute; - top: 0; - bottom: 0; - left: 0; - content: ' '; - background-color: inherit; - -webkit-animation: mdui-progress-indeterminate 2s linear infinite; - animation: mdui-progress-indeterminate 2s linear infinite; - - will-change: left, width; -} -.mdui-progress-indeterminate:after { - position: absolute; - top: 0; - bottom: 0; - left: 0; - content: ' '; - background-color: inherit; - -webkit-animation: mdui-progress-indeterminate-short 2s linear infinite; - animation: mdui-progress-indeterminate-short 2s linear infinite; - - will-change: left, width; -} -@-webkit-keyframes mdui-progress-indeterminate { - 0% { - left: 0; - width: 0; - } - 50% { - left: 30%; - width: 70%; - } - 75% { - left: 100%; - width: 0; - } -} -@keyframes mdui-progress-indeterminate { - 0% { - left: 0; - width: 0; - } - 50% { - left: 30%; - width: 70%; - } - 75% { - left: 100%; - width: 0; - } -} -@-webkit-keyframes mdui-progress-indeterminate-short { - 0% { - left: 0; - width: 0; - } - 50% { - left: 0; - width: 0; - } - 75% { - left: 0; - width: 25%; - } - 100% { - left: 100%; - width: 0; - } -} -@keyframes mdui-progress-indeterminate-short { - 0% { - left: 0; - width: 0; - } - 50% { - left: 0; - width: 0; - } - 75% { - left: 0; - width: 25%; - } - 100% { - left: 100%; - width: 0; - } -} -/** - * ============================================================================= - * ************ Progress linear 主色 ************ - * ============================================================================= - */ -.mdui-theme-primary-amber .mdui-progress { - background-color: rgba(255, 193, 7, .2); -} -.mdui-theme-primary-amber .mdui-progress-determinate, -.mdui-theme-primary-amber .mdui-progress-indeterminate { - background-color: #ffc107; -} -.mdui-theme-primary-blue .mdui-progress { - background-color: rgba(33, 150, 243, .2); -} -.mdui-theme-primary-blue .mdui-progress-determinate, -.mdui-theme-primary-blue .mdui-progress-indeterminate { - background-color: #2196f3; -} -.mdui-theme-primary-blue-grey .mdui-progress { - background-color: rgba(96, 125, 139, .2); -} -.mdui-theme-primary-blue-grey .mdui-progress-determinate, -.mdui-theme-primary-blue-grey .mdui-progress-indeterminate { - background-color: #607d8b; -} -.mdui-theme-primary-brown .mdui-progress { - background-color: rgba(121, 85, 72, .2); -} -.mdui-theme-primary-brown .mdui-progress-determinate, -.mdui-theme-primary-brown .mdui-progress-indeterminate { - background-color: #795548; -} -.mdui-theme-primary-cyan .mdui-progress { - background-color: rgba(0, 188, 212, .2); -} -.mdui-theme-primary-cyan .mdui-progress-determinate, -.mdui-theme-primary-cyan .mdui-progress-indeterminate { - background-color: #00bcd4; -} -.mdui-theme-primary-deep-orange .mdui-progress { - background-color: rgba(255, 87, 34, .2); -} -.mdui-theme-primary-deep-orange .mdui-progress-determinate, -.mdui-theme-primary-deep-orange .mdui-progress-indeterminate { - background-color: #ff5722; -} -.mdui-theme-primary-deep-purple .mdui-progress { - background-color: rgba(103, 58, 183, .2); -} -.mdui-theme-primary-deep-purple .mdui-progress-determinate, -.mdui-theme-primary-deep-purple .mdui-progress-indeterminate { - background-color: #673ab7; -} -.mdui-theme-primary-green .mdui-progress { - background-color: rgba(76, 175, 80, .2); -} -.mdui-theme-primary-green .mdui-progress-determinate, -.mdui-theme-primary-green .mdui-progress-indeterminate { - background-color: #4caf50; -} -.mdui-theme-primary-grey .mdui-progress { - background-color: rgba(158, 158, 158, .2); -} -.mdui-theme-primary-grey .mdui-progress-determinate, -.mdui-theme-primary-grey .mdui-progress-indeterminate { - background-color: #9e9e9e; -} -.mdui-theme-primary-indigo .mdui-progress { - background-color: rgba(63, 81, 181, .2); -} -.mdui-theme-primary-indigo .mdui-progress-determinate, -.mdui-theme-primary-indigo .mdui-progress-indeterminate { - background-color: #3f51b5; -} -.mdui-theme-primary-light-blue .mdui-progress { - background-color: rgba(3, 169, 244, .2); -} -.mdui-theme-primary-light-blue .mdui-progress-determinate, -.mdui-theme-primary-light-blue .mdui-progress-indeterminate { - background-color: #03a9f4; -} -.mdui-theme-primary-light-green .mdui-progress { - background-color: rgba(139, 195, 74, .2); -} -.mdui-theme-primary-light-green .mdui-progress-determinate, -.mdui-theme-primary-light-green .mdui-progress-indeterminate { - background-color: #8bc34a; -} -.mdui-theme-primary-lime .mdui-progress { - background-color: rgba(205, 220, 57, .2); -} -.mdui-theme-primary-lime .mdui-progress-determinate, -.mdui-theme-primary-lime .mdui-progress-indeterminate { - background-color: #cddc39; -} -.mdui-theme-primary-orange .mdui-progress { - background-color: rgba(255, 152, 0, .2); -} -.mdui-theme-primary-orange .mdui-progress-determinate, -.mdui-theme-primary-orange .mdui-progress-indeterminate { - background-color: #ff9800; -} -.mdui-theme-primary-pink .mdui-progress { - background-color: rgba(233, 30, 99, .2); -} -.mdui-theme-primary-pink .mdui-progress-determinate, -.mdui-theme-primary-pink .mdui-progress-indeterminate { - background-color: #e91e63; -} -.mdui-theme-primary-purple .mdui-progress { - background-color: rgba(156, 39, 176, .2); -} -.mdui-theme-primary-purple .mdui-progress-determinate, -.mdui-theme-primary-purple .mdui-progress-indeterminate { - background-color: #9c27b0; -} -.mdui-theme-primary-red .mdui-progress { - background-color: rgba(244, 67, 54, .2); -} -.mdui-theme-primary-red .mdui-progress-determinate, -.mdui-theme-primary-red .mdui-progress-indeterminate { - background-color: #f44336; -} -.mdui-theme-primary-teal .mdui-progress { - background-color: rgba(0, 150, 136, .2); -} -.mdui-theme-primary-teal .mdui-progress-determinate, -.mdui-theme-primary-teal .mdui-progress-indeterminate { - background-color: #009688; -} -.mdui-theme-primary-yellow .mdui-progress { - background-color: rgba(255, 235, 59, .2); -} -.mdui-theme-primary-yellow .mdui-progress-determinate, -.mdui-theme-primary-yellow .mdui-progress-indeterminate { - background-color: #ffeb3b; -} -/** - * ============================================================================= - * ************ Progress Circular 圆形进度条 ************ - * ============================================================================= - */ -.mdui-spinner { - position: relative; - display: inline-block; - width: 28px; - height: 28px; - -webkit-animation: mdui-spinner 1568ms linear infinite; - animation: mdui-spinner 1568ms linear infinite; -} -@-webkit-keyframes mdui-spinner { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes mdui-spinner { - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.mdui-spinner-layer { - position: absolute; - width: 100%; - height: 100%; - border-color: #3f51b5; - opacity: 0; - opacity: 1; - -webkit-animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -.mdui-spinner-layer-1 { - border-color: #42a5f5 !important; - -webkit-animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-1-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-1-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -.mdui-spinner-layer-2 { - border-color: #f44336 !important; - -webkit-animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-2-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-2-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -.mdui-spinner-layer-3 { - border-color: #fdd835 !important; - -webkit-animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-3-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-3-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -.mdui-spinner-layer-4 { - border-color: #4caf50 !important; - -webkit-animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-4-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-layer-fill-unfill-rotate 5332ms cubic-bezier(.4, 0, .2, 1) infinite both, mdui-spinner-layer-4-fade-in-out 5332ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -@-webkit-keyframes mdui-spinner-layer-fill-unfill-rotate { - 12.5% { - -webkit-transform: rotate(135deg); - transform: rotate(135deg); - } - 25% { - -webkit-transform: rotate(270deg); - transform: rotate(270deg); - } - 37.5% { - -webkit-transform: rotate(405deg); - transform: rotate(405deg); - } - 50% { - -webkit-transform: rotate(540deg); - transform: rotate(540deg); - } - 62.5% { - -webkit-transform: rotate(675deg); - transform: rotate(675deg); - } - 75% { - -webkit-transform: rotate(810deg); - transform: rotate(810deg); - } - 87.5% { - -webkit-transform: rotate(945deg); - transform: rotate(945deg); - } - to { - -webkit-transform: rotate(1080deg); - transform: rotate(1080deg); - } -} -@keyframes mdui-spinner-layer-fill-unfill-rotate { - 12.5% { - -webkit-transform: rotate(135deg); - transform: rotate(135deg); - } - 25% { - -webkit-transform: rotate(270deg); - transform: rotate(270deg); - } - 37.5% { - -webkit-transform: rotate(405deg); - transform: rotate(405deg); - } - 50% { - -webkit-transform: rotate(540deg); - transform: rotate(540deg); - } - 62.5% { - -webkit-transform: rotate(675deg); - transform: rotate(675deg); - } - 75% { - -webkit-transform: rotate(810deg); - transform: rotate(810deg); - } - 87.5% { - -webkit-transform: rotate(945deg); - transform: rotate(945deg); - } - to { - -webkit-transform: rotate(1080deg); - transform: rotate(1080deg); - } -} -@-webkit-keyframes mdui-spinner-layer-1-fade-in-out { - from { - opacity: 1; - } - 25% { - opacity: 1; - } - 26% { - opacity: 0; - } - 89% { - opacity: 0; - } - 90% { - opacity: 1; - } - 100% { - opacity: 1; - } -} -@keyframes mdui-spinner-layer-1-fade-in-out { - from { - opacity: 1; - } - 25% { - opacity: 1; - } - 26% { - opacity: 0; - } - 89% { - opacity: 0; - } - 90% { - opacity: 1; - } - 100% { - opacity: 1; - } -} -@-webkit-keyframes mdui-spinner-layer-2-fade-in-out { - from { - opacity: 0; - } - 15% { - opacity: 0; - } - 25% { - opacity: 1; - } - 50% { - opacity: 1; - } - 51% { - opacity: 0; - } -} -@keyframes mdui-spinner-layer-2-fade-in-out { - from { - opacity: 0; - } - 15% { - opacity: 0; - } - 25% { - opacity: 1; - } - 50% { - opacity: 1; - } - 51% { - opacity: 0; - } -} -@-webkit-keyframes mdui-spinner-layer-3-fade-in-out { - from { - opacity: 0; - } - 40% { - opacity: 0; - } - 50% { - opacity: 1; - } - 75% { - opacity: 1; - } - 76% { - opacity: 0; - } -} -@keyframes mdui-spinner-layer-3-fade-in-out { - from { - opacity: 0; - } - 40% { - opacity: 0; - } - 50% { - opacity: 1; - } - 75% { - opacity: 1; - } - 76% { - opacity: 0; - } -} -@-webkit-keyframes mdui-spinner-layer-4-fade-in-out { - from { - opacity: 0; - } - 65% { - opacity: 0; - } - 75% { - opacity: 1; - } - 90% { - opacity: 1; - } - 100% { - opacity: 0; - } -} -@keyframes mdui-spinner-layer-4-fade-in-out { - from { - opacity: 0; - } - 65% { - opacity: 0; - } - 75% { - opacity: 1; - } - 90% { - opacity: 1; - } - 100% { - opacity: 0; - } -} -.mdui-spinner-gap-patch { - position: absolute; - top: 0; - left: 45%; - width: 10%; - height: 100%; - overflow: hidden; - border-color: inherit; -} -.mdui-spinner-gap-patch .mdui-spinner-circle { - left: -450%; - width: 1000%; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.mdui-spinner-circle-clipper { - position: relative; - display: inline-block; - width: 50%; - height: 100%; - overflow: hidden; - border-color: inherit; -} -.mdui-spinner-circle-clipper .mdui-spinner-circle { - position: absolute; - top: 0; - right: 0; - bottom: 0; - width: 200%; - height: 100%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - border-color: inherit; - border-style: solid; - border-width: 3px; - border-bottom-color: transparent !important; - border-radius: 50%; - -webkit-animation: none; - animation: none; -} -.mdui-spinner-circle-clipper.mdui-spinner-left { - float: left; -} -.mdui-spinner-circle-clipper.mdui-spinner-left .mdui-spinner-circle { - left: 0; - border-right-color: transparent !important; - -webkit-transform: rotate(129deg); - transform: rotate(129deg); - -webkit-animation: mdui-spinner-left-spin 1333ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-left-spin 1333ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -.mdui-spinner-circle-clipper.mdui-spinner-right { - float: right; -} -.mdui-spinner-circle-clipper.mdui-spinner-right .mdui-spinner-circle { - left: -100%; - border-left-color: transparent !important; - -webkit-transform: rotate(-129deg); - transform: rotate(-129deg); - -webkit-animation: mdui-spinner-right-spin 1333ms cubic-bezier(.4, 0, .2, 1) infinite both; - animation: mdui-spinner-right-spin 1333ms cubic-bezier(.4, 0, .2, 1) infinite both; -} -@-webkit-keyframes mdui-spinner-left-spin { - from { - -webkit-transform: rotate(130deg); - transform: rotate(130deg); - } - 50% { - -webkit-transform: rotate(-5deg); - transform: rotate(-5deg); - } - to { - -webkit-transform: rotate(130deg); - transform: rotate(130deg); - } -} -@keyframes mdui-spinner-left-spin { - from { - -webkit-transform: rotate(130deg); - transform: rotate(130deg); - } - 50% { - -webkit-transform: rotate(-5deg); - transform: rotate(-5deg); - } - to { - -webkit-transform: rotate(130deg); - transform: rotate(130deg); - } -} -@-webkit-keyframes mdui-spinner-right-spin { - from { - -webkit-transform: rotate(-130deg); - transform: rotate(-130deg); - } - 50% { - -webkit-transform: rotate(5deg); - transform: rotate(5deg); - } - to { - -webkit-transform: rotate(-130deg); - transform: rotate(-130deg); - } -} -@keyframes mdui-spinner-right-spin { - from { - -webkit-transform: rotate(-130deg); - transform: rotate(-130deg); - } - 50% { - -webkit-transform: rotate(5deg); - transform: rotate(5deg); - } - to { - -webkit-transform: rotate(-130deg); - transform: rotate(-130deg); - } -} -/** - * ============================================================================= - * ************ Spinner linear 主色 ************ - * ============================================================================= - */ -.mdui-theme-primary-amber .mdui-spinner-layer { - border-color: #ffc107; -} -.mdui-theme-primary-blue .mdui-spinner-layer { - border-color: #2196f3; -} -.mdui-theme-primary-blue-grey .mdui-spinner-layer { - border-color: #607d8b; -} -.mdui-theme-primary-brown .mdui-spinner-layer { - border-color: #795548; -} -.mdui-theme-primary-cyan .mdui-spinner-layer { - border-color: #00bcd4; -} -.mdui-theme-primary-deep-orange .mdui-spinner-layer { - border-color: #ff5722; -} -.mdui-theme-primary-deep-purple .mdui-spinner-layer { - border-color: #673ab7; -} -.mdui-theme-primary-green .mdui-spinner-layer { - border-color: #4caf50; -} -.mdui-theme-primary-grey .mdui-spinner-layer { - border-color: #9e9e9e; -} -.mdui-theme-primary-indigo .mdui-spinner-layer { - border-color: #3f51b5; -} -.mdui-theme-primary-light-blue .mdui-spinner-layer { - border-color: #03a9f4; -} -.mdui-theme-primary-light-green .mdui-spinner-layer { - border-color: #8bc34a; -} -.mdui-theme-primary-lime .mdui-spinner-layer { - border-color: #cddc39; -} -.mdui-theme-primary-orange .mdui-spinner-layer { - border-color: #ff9800; -} -.mdui-theme-primary-pink .mdui-spinner-layer { - border-color: #e91e63; -} -.mdui-theme-primary-purple .mdui-spinner-layer { - border-color: #9c27b0; -} -.mdui-theme-primary-red .mdui-spinner-layer { - border-color: #f44336; -} -.mdui-theme-primary-teal .mdui-spinner-layer { - border-color: #009688; -} -.mdui-theme-primary-yellow .mdui-spinner-layer { - border-color: #ffeb3b; -} -/** - * ============================================================================= - * ************ Expansion panel 可扩展面板 ************ - * ============================================================================= - */ -/* 可扩展面板 */ -.mdui-panel { - width: 100%; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -/* 面板项 */ -.mdui-panel-item { - color: rgba(0, 0, 0, .87); - background-color: #fff; - border-bottom: 1px solid rgba(0, 0, 0, .12); - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - -webkit-transition: margin .3s cubic-bezier(.4, 0, .2, 1); - transition: margin .3s cubic-bezier(.4, 0, .2, 1); - - will-change: margin; -} -.mdui-panel-item:last-child { - border-bottom: none; -} -/* 面板头部 */ -.mdui-panel-item-header { - position: relative; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 100%; - height: 48px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 0 24px; - overflow: hidden; - font-size: 15px; - text-overflow: ellipsis; - white-space: nowrap; - cursor: pointer; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1); - - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - will-change: height, background-color; -} -.mdui-panel-item-header:active { - background-color: #eee; -} -/* 面板项标题 */ -.mdui-panel-item-title { - width: 36%; - min-width: 36%; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-right: 16px; - overflow: hidden; - font-weight: 500; - text-overflow: ellipsis; - white-space: nowrap; -} -/* 面板项内容 */ -.mdui-panel-item-summary { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-right: 16px; - overflow: hidden; - color: rgba(0, 0, 0, .54); - text-overflow: ellipsis; - white-space: nowrap; - - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} -/* 展开收起的图标 */ -.mdui-panel-item-arrow { - position: absolute; - top: 12px; - right: 24px; - color: rgba(0, 0, 0, .54); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-transition: all .3s cubic-bezier(.4, 0, .2, 1); - transition: all .3s cubic-bezier(.4, 0, .2, 1); - -webkit-transform: rotate(0); - transform: rotate(0); - - will-change: transform, top; -} -.mdui-panel-item-summary + .mdui-panel-item-arrow { - position: relative; - top: 0 !important; - right: 0; -} -/* 面板项内容 */ -.mdui-panel-item-body { - height: 0; - padding: 0 24px; - overflow: hidden; - -webkit-transition: height .3s cubic-bezier(.4, 0, .2, 1); - transition: height .3s cubic-bezier(.4, 0, .2, 1); - - will-change: height; -} -.mdui-panel-item-body:before, -.mdui-panel-item-body:after { - display: table; - content: " "; -} -.mdui-panel-item-body:after { - clear: both; -} -.mdui-panel-item-body:before, -.mdui-panel-item-body:after { - display: table; - content: " "; -} -.mdui-panel-item-body:after { - clear: both; -} -.mdui-panel-item-body:after { - height: 16px; -} -/* 面板项操作栏 */ -.mdui-panel-item-actions { - display: block; - width: 100%; - padding: 16px 24px 0 24px; - margin: 16px -24px 0 -24px; - text-align: right; - border-top: 1px solid rgba(0, 0, 0, .12); -} -.mdui-panel-item-actions .mdui-btn { - margin-left: 8px; -} -.mdui-panel-item-actions .mdui-btn:first-child { - margin-left: 0; -} -/* 使打开项上下没有边距 */ -.mdui-panel-gapless { - -webkit-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12); -} -.mdui-panel-gapless .mdui-panel-item { - -webkit-box-shadow: none; - box-shadow: none; -} -.mdui-panel-gapless .mdui-panel-item-open { - margin-top: 0; - margin-bottom: 0; -} -/* 弹出面板 */ -.mdui-panel-popout .mdui-panel-item-open { - margin-right: -16px; - margin-left: -16px; -} -/* 打开状态的面板项 */ -.mdui-panel-item-open { - height: auto; - margin-top: 16px; - margin-bottom: 16px; -} -.mdui-panel-item-open > .mdui-panel-item-header { - height: 64px; -} -.mdui-panel-item-open > .mdui-panel-item-header .mdui-panel-item-arrow { - top: 20px; - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} -.mdui-panel-item-open > .mdui-panel-item-body { - height: auto; -} -/** - * ============================================================================= - * ************ Expansion panel dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-panel-item { - color: #fff; - background-color: #303030; - border-bottom: 1px solid rgba(255, 255, 255, .12); -} -.mdui-theme-layout-dark .mdui-panel-item:last-child { - border-bottom: none; -} -.mdui-theme-layout-dark .mdui-panel-item-header:active { - background-color: #424242; -} -.mdui-theme-layout-dark .mdui-panel-item-summary { - color: rgba(255, 255, 255, .7); -} -.mdui-theme-layout-dark .mdui-panel-item-arrow { - color: #fff; -} -.mdui-theme-layout-dark .mdui-panel-item-actions { - border-top: 1px solid rgba(255, 255, 255, .12); -} -/** - * ============================================================================= - * ************ Menu 菜单 ************ - * ============================================================================= - */ -/* 菜单 */ -.mdui-menu { - position: fixed; - z-index: 99999; - display: block; - width: 168px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 8px 0; - margin: 0; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - font-size: 16px; - color: rgba(0, 0, 0, .87); - list-style: none; - visibility: hidden; - background-color: #fff; - border-radius: 2px; - -webkit-box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12); - opacity: 0; - -webkit-transition-timing-function: cubic-bezier(0, 0, .2, 1); - transition-timing-function: cubic-bezier(0, 0, .2, 1); - -webkit-transition-duration: .3s; - transition-duration: .3s; - -webkit-transition-property: opacity, visibility, -webkit-transform; - transition-property: opacity, visibility, -webkit-transform; - transition-property: transform, opacity, visibility; - transition-property: transform, opacity, visibility, -webkit-transform; - -webkit-transform: scale(0); - transform: scale(0); - - will-change: transform, opacity, visibility; -} -.mdui-menu .mdui-divider { - margin-top: 8px; - margin-bottom: 8px; -} -/* 打开状态的菜单 */ -.mdui-menu-open { - visibility: visible; - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); -} -/* 关闭中的菜单 */ -.mdui-menu-closing { - visibility: visible; - opacity: 0; - -webkit-transform: scale(1); - transform: scale(1); -} -/* 菜单项 */ -.mdui-menu-item { - position: relative; -} -.mdui-menu-item > a { - position: relative; - display: block; - height: 48px; - padding: 0 16px; - overflow: hidden; - line-height: 48px; - color: inherit; - text-decoration: none; - text-overflow: ellipsis; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.mdui-menu-item > a:hover { - background-color: #eee; -} -.mdui-menu-item > .mdui-menu { - position: absolute; - -webkit-box-shadow: 0 5px 6px -3px rgba(0, 0, 0, .2), 0 9px 12px 1px rgba(0, 0, 0, .14), 0 3px 16px 2px rgba(0, 0, 0, .12); - box-shadow: 0 5px 6px -3px rgba(0, 0, 0, .2), 0 9px 12px 1px rgba(0, 0, 0, .14), 0 3px 16px 2px rgba(0, 0, 0, .12); -} -.mdui-menu-item[disabled] > a { - color: rgba(0, 0, 0, .38) !important; - cursor: default; -} -.mdui-menu-item[disabled] > a:hover { - background-color: inherit !important; -} -.mdui-menu-item[disabled] > a .mdui-icon { - color: rgba(0, 0, 0, .26); -} -/* 激活状态的菜单项 */ -.mdui-menu-item-active { - background-color: #eee; -} -/* 菜单中的图标 */ -.mdui-menu-item-icon { - display: inline-block; - width: 40px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding-right: 16px; - color: rgba(0, 0, 0, .54); -} -/* 菜单中的辅助文本或图标 */ -.mdui-menu-item-helper { - float: right; -} -/* 有子菜单的条目的图标 */ -.mdui-menu-item-more { - float: right; - width: 24px; - height: 24px; - margin: 4px 0; - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%2010l5%205%205-5z%22%20opacity%3D%220.54%22%20transform%3D%22rotate(-90%2012%2C12.5)%22%20fill%3D%22%23000000%22%2F%3E%3C%2Fsvg%3E%0A"); -} -/* 级联菜单 */ -.mdui-menu-cascade { - width: 320px; - padding: 16px 0; - overflow-y: visible; - font-size: 15px; -} -.mdui-menu-cascade > .mdui-menu-item > a { - height: 32px; - padding: 0 24px; - line-height: 32px; -} -/** - * ============================================================================= - * ************ Menu dark ************ - * ============================================================================= - */ -.mdui-theme-layout-dark .mdui-menu { - color: #fff; - background-color: #424242; -} -.mdui-theme-layout-dark .mdui-menu-item > a:hover { - background-color: #616161; -} -.mdui-theme-layout-dark .mdui-menu-item[disabled] > a { - color: rgba(255, 255, 255, .5) !important; -} -.mdui-theme-layout-dark .mdui-menu-item[disabled] > a .mdui-icon { - color: rgba(255, 255, 255, .3); -} -.mdui-theme-layout-dark .mdui-menu-item-active { - background-color: #616161; -} -.mdui-theme-layout-dark .mdui-menu-item-icon { - color: #fff; -} -.mdui-theme-layout-dark .mdui-menu-item-more { - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M7%2010l5%205%205-5z%22%20transform%3D%22rotate(-90%2012%2C12.5)%22%20fill%3D%22%23FFFFFF%22%2F%3E%3C%2Fsvg%3E%0A"); -} diff --git a/lib/mdui_043tiny/js/mdui.js b/lib/mdui_043tiny/js/mdui.js deleted file mode 100644 index 420ef8b..0000000 --- a/lib/mdui_043tiny/js/mdui.js +++ /dev/null @@ -1,7542 +0,0 @@ -/*! - * mdui v0.4.3 (https://mdui.org) - * Copyright 2016-2019 zdhxiong - * Licensed under MIT - */ -/* jshint ignore:start */ -;(function(global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.mdui = factory()); -}(this, (function() { - 'use strict'; - - /* jshint ignore:end */ - var mdui = {}; - - /** - * ============================================================================= - * ************ 浏览器兼容性问题修复 ************ - * ============================================================================= - */ - - /** - * requestAnimationFrame - * cancelAnimationFrame - */ - (function () { - var lastTime = 0; - - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = window.webkitRequestAnimationFrame; - window.cancelAnimationFrame = window.webkitCancelAnimationFrame; - } - - if (!window.requestAnimationFrame) { - window.requestAnimationFrame = function (callback, element) { - var currTime = new Date().getTime(); - var timeToCall = Math.max(0, 16.7 - (currTime - lastTime)); - - var id = window.setTimeout(function () { - callback(currTime + timeToCall); - }, timeToCall); - - lastTime = currTime + timeToCall; - return id; - }; - } - - if (!window.cancelAnimationFrame) { - window.cancelAnimationFrame = function (id) { - clearTimeout(id); - }; - } - })(); - - - /** - * JQ 1.0.0 (https://github.com/zdhxiong/mdui.JQ#readme) - * Copyright 2018-2018 zdhxiong - * Licensed under MIT - */ - var $ = (function () { - 'use strict'; - - var JQ = function JQ(arr) { - var self = this; - - for (var i = 0; i < arr.length; i += 1) { - self[i] = arr[i]; - } - - self.length = arr.length; - - return this; - }; - - function $(selector) { - var arr = []; - - if (!selector) { - return new JQ(arr); - } - - if (selector instanceof JQ) { - return selector; - } - - if (typeof selector === 'string') { - var html = selector.trim(); - - if (html[0] === '<' && html[html.length - 1] === '>') { - // 创建 HTML 字符串 - var toCreate = 'div'; - - if (html.indexOf(':~]/) - ? [document.getElementById(selector.slice(1))] - : document.querySelectorAll(selector); - - for (var i$1 = 0; i$1 < elems.length; i$1 += 1) { - if (elems[i$1]) { - arr.push(elems[i$1]); - } - } - } - } else if (typeof selector === 'function') { - // function - return $(document).ready(selector); - } else if (selector.nodeType || selector === window || selector === document) { - // Node - arr.push(selector); - } else if (selector.length > 0 && selector[0].nodeType) { - // NodeList - for (var i$2 = 0; i$2 < selector.length; i$2 += 1) { - arr.push(selector[i$2]); - } - } - - return new JQ(arr); - } - - $.fn = JQ.prototype; - - function extend() { - var this$1 = this; - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - if (!args.length) { - return this; - } - - // $.extend(obj) - if (args.length === 1) { - Object.keys(args[0]).forEach(function (prop) { - this$1[prop] = args[0][prop]; - }); - - return this; - } - - // $.extend({}, defaults[, obj]) - var target = args.shift(); - - var loop = function ( i ) { - Object.keys(args[i]).forEach(function (prop) { - target[prop] = args[i][prop]; - }); - }; - - for (var i = 0; i < args.length; i += 1) loop( i ); - - return target; - } - - $.fn.extend = extend; - $.extend = extend; - - /** - * 判断一个节点名 - * @param ele - * @param name - * @returns {boolean} - */ - function isNodeName(ele, name) { - return ele.nodeName && ele.nodeName.toLowerCase() === name.toLowerCase(); - } - - /** - * 除去 null 后的 object 类型 - * @param obj - * @returns {*|boolean} - */ - function isObjectLike(obj) { - return typeof obj === 'object' && obj !== null; - } - - function isFunction(fn) { - return typeof fn === 'function'; - } - - function isString(obj) { - return typeof obj === 'string'; - } - - function isWindow(win) { - return win && win === win.window; - } - - function isDocument(doc) { - return doc && doc.nodeType === doc.DOCUMENT_NODE; - } - - function isArrayLike(obj) { - return typeof obj.length === 'number'; - } - - /** - * 循环数组或对象 - * @param obj - * @param callback - * @returns {*} - */ - function each(obj, callback) { - if (isArrayLike(obj)) { - for (var i = 0; i < obj.length; i += 1) { - if (callback.call(obj[i], i, obj[i]) === false) { - return obj; - } - } - } else { - var keys = Object.keys(obj); - for (var i$1 = 0; i$1 < keys.length; i$1 += 1) { - if (callback.call(obj[keys[i$1]], keys[i$1], obj[keys[i$1]]) === false) { - return obj; - } - } - } - - return obj; - } - - /** - * 遍历数组或对象,通过函数返回一个新的数组或对象,null 和 undefined 将被过滤掉。 - * @param elems - * @param callback - * @returns {Array} - */ - function map(elems, callback) { - var ref; - - var value; - var ret = []; - - each(elems, function (i, elem) { - value = callback(elem, i); - - if (value !== null && value !== undefined) { - ret.push(value); - } - }); - - return (ref = []).concat.apply(ref, ret); - } - - /** - * 把对象合并到第一个参数中,并返回第一个参数 - * @param first - * @param second - * @returns {*} - */ - function merge(first, second) { - each(second, function (i, val) { - first.push(val); - }); - - return first; - } - - /** - * 删除数组中重复元素 - * @param arr {Array} - * @returns {Array} - */ - function unique(arr) { - var result = []; - - for (var i = 0; i < arr.length; i += 1) { - if (result.indexOf(arr[i]) === -1) { - result.push(arr[i]); - } - } - - return result; - } - - var elementDisplay = {}; - - /** - * 获取元素的默认 display 样式值,用于 .show() 方法 - * @param nodeName - * @returns {*} - */ - function defaultDisplay(nodeName) { - var element; - var display; - - if (!elementDisplay[nodeName]) { - element = document.createElement(nodeName); - document.body.appendChild(element); - display = getComputedStyle(element, '').getPropertyValue('display'); - element.parentNode.removeChild(element); - if (display === 'none') { - display = 'block'; - } - - elementDisplay[nodeName] = display; - } - - return elementDisplay[nodeName]; - } - - $.extend({ - each: each, - merge: merge, - unique: unique, - map: map, - - /** - * 一个 DOM 节点是否包含另一个 DOM 节点 - * @param parent {Node} 父节点 - * @param node {Node} 子节点 - * @returns {Boolean} - */ - contains: function contains(parent, node) { - if (parent && !node) { - return document.documentElement.contains(parent); - } - - return parent !== node && parent.contains(node); - }, - - /** - * 将数组或对象序列化 - * @param obj - * @returns {String} - */ - param: function param(obj) { - if (!isObjectLike(obj)) { - return ''; - } - - var args = []; - - function destructure(key, value) { - var keyTmp; - - if (isObjectLike(value)) { - each(value, function (i, v) { - if (Array.isArray(value) && !isObjectLike(v)) { - keyTmp = ''; - } else { - keyTmp = i; - } - - destructure((key + "[" + keyTmp + "]"), v); - }); - } else { - if (value !== null && value !== '') { - keyTmp = "=" + (encodeURIComponent(value)); - } else { - keyTmp = ''; - } - - args.push(encodeURIComponent(key) + keyTmp); - } - } - - each(obj, function (key, value) { - destructure(key, value); - }); - - return args.join('&'); - }, - }); - - $.fn.extend({ - /** - * 遍历对象 - * @param callback {Function} - * @return {JQ} - */ - each: function each$1(callback) { - return each(this, callback); - }, - - /** - * 通过遍历集合中的节点对象,通过函数返回一个新的对象,null 或 undefined 将被过滤掉。 - * @param callback {Function} - * @returns {JQ} - */ - map: function map$1(callback) { - return new JQ(map(this, function (el, i) { return callback.call(el, i, el); })); - }, - - /** - * 获取指定 DOM 元素,没有 index 参数时,获取所有 DOM 的数组 - * @param index {Number=} - * @returns {Node|Array} - */ - get: function get(index) { - return index === undefined - ? [].slice.call(this) - : this[index >= 0 ? index : index + this.length]; - }, - - /** - * array中提取的方法。从start开始,如果end 指出。提取不包含end位置的元素。 - * @param args {start, end} - * @returns {JQ} - */ - slice: function slice() { - var args = [], len = arguments.length; - while ( len-- ) args[ len ] = arguments[ len ]; - - return new JQ([].slice.apply(this, args)); - }, - - /** - * 筛选元素集合 - * @param selector {String|JQ|Node|Function} - * @returns {JQ} - */ - filter: function filter(selector) { - if (isFunction(selector)) { - return this.map(function (index, ele) { return (selector.call(ele, index, ele) ? ele : undefined); }); - } - - var $selector = $(selector); - - return this.map(function (index, ele) { return ($selector.index(ele) > -1 ? ele : undefined); }); - }, - - /** - * 从元素集合中删除指定的元素 - * @param selector {String|Node|JQ|Function} - * @return {JQ} - */ - not: function not(selector) { - var $excludes = this.filter(selector); - - return this.map(function (index, ele) { return ($excludes.index(ele) > -1 ? undefined : ele); }); - }, - - /** - * 获取元素相对于 document 的偏移 - * @returns {Object} - */ - offset: function offset() { - if (this[0]) { - var offset = this[0].getBoundingClientRect(); - - return { - left: offset.left + window.pageXOffset, - top: offset.top + window.pageYOffset, - width: offset.width, - height: offset.height, - }; - } - - return null; - }, - - /** - * 返回最近的用于定位的父元素 - * @returns {*|JQ} - */ - offsetParent: function offsetParent() { - return this.map(function () { - var parent = this.offsetParent; - - while (parent && $(parent).css('position') === 'static') { - parent = parent.offsetParent; - } - - return parent || document.documentElement; - }); - }, - - /** - * 获取元素相对于父元素的偏移 - * @return {Object} - */ - position: function position() { - var self = this; - - if (!self[0]) { - return null; - } - - var offsetParent; - var offset; - var parentOffset = { - top: 0, - left: 0, - }; - - if (self.css('position') === 'fixed') { - offset = self[0].getBoundingClientRect(); - } else { - offsetParent = self.offsetParent(); - offset = self.offset(); - if (!isNodeName(offsetParent[0], 'html')) { - parentOffset = offsetParent.offset(); - } - - parentOffset = { - top: parentOffset.top + offsetParent.css('borderTopWidth'), - left: parentOffset.left + offsetParent.css('borderLeftWidth'), - }; - } - - return { - top: offset.top - parentOffset.top - self.css('marginTop'), - left: offset.left - parentOffset.left - self.css('marginLeft'), - width: offset.width, - height: offset.height, - }; - }, - - /** - * 显示指定元素 - * @returns {JQ} - */ - show: function show() { - return this.each(function () { - if (this.style.display === 'none') { - this.style.display = ''; - } - - if (window.getComputedStyle(this, '').getPropertyValue('display') === 'none') { - this.style.display = defaultDisplay(this.nodeName); - } - }); - }, - - /** - * 隐藏指定元素 - * @returns {JQ} - */ - hide: function hide() { - return this.each(function () { - this.style.display = 'none'; - }); - }, - - /** - * 切换元素的显示状态 - * @returns {JQ} - */ - toggle: function toggle() { - return this.each(function () { - this.style.display = this.style.display === 'none' ? '' : 'none'; - }); - }, - - /** - * 是否含有指定的 CSS 类 - * @param className {String} - * @returns {boolean} - */ - hasClass: function hasClass(className) { - if (!this[0] || !className) { - return false; - } - - return this[0].classList.contains(className); - }, - - /** - * 移除指定属性 - * @param attr {String} - * @returns {JQ} - */ - removeAttr: function removeAttr(attr) { - return this.each(function () { - this.removeAttribute(attr); - }); - }, - - /** - * 删除属性值 - * @param name {String} - * @returns {JQ} - */ - removeProp: function removeProp(name) { - return this.each(function () { - try { - delete this[name]; - } catch (e) { - // empty - } - }); - }, - - /** - * 获取当前对象中第n个元素 - * @param index {Number} - * @returns {JQ} - */ - eq: function eq(index) { - var ret = index === -1 - ? this.slice(index) - : this.slice(index, +index + 1); - - return new JQ(ret); - }, - - /** - * 获取对象中第一个元素 - * @returns {JQ} - */ - first: function first() { - return this.eq(0); - }, - - /** - * 获取对象中最后一个元素 - * @returns {JQ} - */ - last: function last() { - return this.eq(-1); - }, - - /** - * 获取一个元素的位置。 - * 当 elem 参数没有给出时,返回当前元素在兄弟节点中的位置。 - * 有给出了 elem 参数时,返回 elem 元素在当前对象中的位置 - * @param elem {Selector|Node=} - * @returns {Number} - */ - index: function index(elem) { - if (!elem) { - // 获取当前 JQ 对象的第一个元素在同辈元素中的位置 - return this - .eq(0) - .parent() - .children() - .get() - .indexOf(this[0]); - } - - if (isString(elem)) { - // 返回当前 JQ 对象的第一个元素在指定选择器对应的元素中的位置 - return $(elem) - .eq(0) - .parent() - .children() - .get() - .indexOf(this[0]); - } - - // 返回指定元素在当前 JQ 对象中的位置 - return this - .get() - .indexOf(elem); - }, - - /** - * 根据选择器、DOM元素或 JQ 对象来检测匹配元素集合, - * 如果其中至少有一个元素符合这个给定的表达式就返回true - * @param selector {String|Node|NodeList|Array|JQ|Window} - * @returns boolean - */ - is: function is(selector) { - var self = this[0]; - - if (!self || selector === undefined || selector === null) { - return false; - } - - if (isString(selector)) { - if (self === document || self === window) { - return false; - } - - var matchesSelector = self.matches - || self.matchesSelector - || self.webkitMatchesSelector - || self.mozMatchesSelector - || self.oMatchesSelector - || self.msMatchesSelector; - - return matchesSelector.call(self, selector); - } - - if (selector === document || selector === window) { - return self === selector; - } - - if (selector.nodeType || isArrayLike(selector)) { - var $compareWith = selector.nodeType ? [selector] : selector; - - for (var i = 0; i < $compareWith.length; i += 1) { - if ($compareWith[i] === self) { - return true; - } - } - - return false; - } - - return false; - }, - - /** - * 根据 CSS 选择器找到后代节点的集合 - * @param selector {String} - * @returns {JQ} - */ - find: function find(selector) { - var foundElements = []; - - this.each(function (i, _this) { - var nodeType = _this.nodeType; - - if (nodeType !== 1 && nodeType !== 9) { - // 不是 element 和 document 则跳过 - return; - } - - merge(foundElements, _this.querySelectorAll(selector)); - }); - - return new JQ(foundElements); - }, - - /** - * 找到直接子元素的元素集合 - * @param selector {String=} - * @returns {JQ} - */ - children: function children(selector) { - var children = []; - - this.each(function (_, _this) { - each(_this.childNodes, function (__, childNode) { - if (childNode.nodeType !== 1) { - return; - } - - if (!selector || (selector && $(childNode).is(selector))) { - children.push(childNode); - } - }); - }); - - return new JQ(unique(children)); - }, - - /** - * 保留含有指定子元素的元素,去掉不含有指定子元素的元素 - * @param selector {String|Node|JQ|NodeList|Array} - * @return {JQ} - */ - has: function has(selector) { - var $targets = isString(selector) ? this.find(selector) : $(selector); - var length = $targets.length; - - return this.filter(function () { - for (var i = 0; i < length; i += 1) { - if ($.contains(this, $targets[i])) { - return true; - } - } - - return false; - }); - }, - - /** - * 取得同辈元素的集合 - * @param selector {String=} - * @returns {JQ} - */ - siblings: function siblings(selector) { - return this.prevAll(selector).add(this.nextAll(selector)); - }, - - /** - * 返回首先匹配到的父节点,包含父节点 - * @param selector {String} - * @returns {JQ} - */ - closest: function closest(selector) { - var self = this; - - if (!self.is(selector)) { - self = self.parents(selector).eq(0); - } - - return self; - }, - - /** - * 删除所有匹配的元素 - * @returns {JQ} - */ - remove: function remove() { - return this.each(function (i, _this) { - if (_this.parentNode) { - _this.parentNode.removeChild(_this); - } - }); - }, - - /** - * 添加匹配的元素到当前对象中 - * @param selector {String|JQ} - * @returns {JQ} - */ - add: function add(selector) { - return new JQ(unique(merge(this.get(), $(selector)))); - }, - - /** - * 删除子节点 - * @returns {JQ} - */ - empty: function empty() { - return this.each(function () { - this.innerHTML = ''; - }); - }, - - /** - * 通过深度克隆来复制集合中的所有元素。 - * (通过原生 cloneNode 方法深度克隆来复制集合中的所有元素。此方法不会有数据和事件处理程序复制到新的元素。这点和jquery中利用一个参数来确定是否复制数据和事件处理不相同。) - * @returns {JQ} - */ - clone: function clone() { - return this.map(function () { - return this.cloneNode(true); - }); - }, - - /** - * 用新元素替换当前元素 - * @param newContent {String|Node|NodeList|JQ} - * @returns {JQ} - */ - replaceWith: function replaceWith(newContent) { - return this.before(newContent).remove(); - }, - - /** - * 将表单元素的值组合成键值对数组 - * @returns {Array} - */ - serializeArray: function serializeArray() { - var result = []; - var elem = this[0]; - - if (!elem || !elem.elements) { - return result; - } - - $([].slice.call(elem.elements)).each(function () { - var $elem = $(this); - var type = $elem.attr('type'); - if ( - this.nodeName.toLowerCase() !== 'fieldset' - && !this.disabled - && ['submit', 'reset', 'button'].indexOf(type) === -1 - && (['radio', 'checkbox'].indexOf(type) === -1 || this.checked) - ) { - result.push({ - name: $elem.attr('name'), - value: $elem.val(), - }); - } - }); - - return result; - }, - - /** - * 将表单元素或对象序列化 - * @returns {String} - */ - serialize: function serialize() { - var result = []; - - each(this.serializeArray(), function (i, elem) { - result.push(((encodeURIComponent(elem.name)) + "=" + (encodeURIComponent(elem.value)))); - }); - - return result.join('&'); - }, - }); - - /** - * val - 获取或设置元素的值 - * @param value {String=} - * @return {*|JQ} - */ - /** - * html - 获取或设置元素的 HTML - * @param value {String=} - * @return {*|JQ} - */ - /** - * text - 获取或设置元素的内容 - * @param value {String=} - * @return {*|JQ} - */ - each(['val', 'html', 'text'], function (nameIndex, name) { - var props = { - 0: 'value', - 1: 'innerHTML', - 2: 'textContent', - }; - - var defaults = { - 0: undefined, - 1: undefined, - 2: null, - }; - - $.fn[name] = function (value) { - if (value === undefined) { - // 获取值 - return this[0] ? this[0][props[nameIndex]] : defaults[nameIndex]; - } - - // 设置值 - return this.each(function (i, elem) { - elem[props[nameIndex]] = value; - }); - }; - }); - - /** - * attr - 获取或设置元素的属性值 - * @param {name|props|key,value=} - * @return {String|JQ} - */ - /** - * prop - 获取或设置元素的属性值 - * @param {name|props|key,value=} - * @return {String|JQ} - */ - /** - * css - 获取或设置元素的样式 - * @param {name|props|key,value=} - * @return {String|JQ} - */ - each(['attr', 'prop', 'css'], function (nameIndex, name) { - function set(elem, key, value) { - if (nameIndex === 0) { - elem.setAttribute(key, value); - } else if (nameIndex === 1) { - elem[key] = value; - } else { - elem.style[key] = value; - } - } - - function get(elem, key) { - if (!elem) { - return undefined; - } - - if (nameIndex === 0) { - return elem.getAttribute(key); - } - - if (nameIndex === 1) { - return elem[key]; - } - - return window.getComputedStyle(elem, null).getPropertyValue(key); - } - - $.fn[name] = function (key, value) { - var argLength = arguments.length; - - if (argLength === 1 && isString(key)) { - // 获取值 - return get(this[0], key); - } - - // 设置值 - return this.each(function (i, elem) { - if (argLength === 2) { - set(elem, key, value); - } else { - each(key, function (k, v) { - set(elem, k, v); - }); - } - }); - }; - }); - - /** - * addClass - 添加 CSS 类,多个类名用空格分割 - * @param className {String} - * @return {JQ} - */ - /** - * removeClass - 移除 CSS 类,多个类名用空格分割 - * @param className {String} - * @return {JQ} - */ - /** - * toggleClass - 切换 CSS 类名,多个类名用空格分割 - * @param className {String} - * @return {JQ} - */ - each(['add', 'remove', 'toggle'], function (nameIndex, name) { - $.fn[(name + "Class")] = function (className) { - if (!className) { - return this; - } - - var classes = className.split(' '); - - return this.each(function (i, elem) { - each(classes, function (j, cls) { - elem.classList[name](cls); - }); - }); - }; - }); - - /** - * width - 获取元素的宽度 - * @return {Number} - */ - /** - * height - 获取元素的高度 - * @return {Number} - */ - each({ - Width: 'width', - Height: 'height', - }, function (prop, name) { - $.fn[name] = function (val) { - if (val === undefined) { - // 获取 - var elem = this[0]; - - if (isWindow(elem)) { - return elem[("inner" + prop)]; - } - - if (isDocument(elem)) { - return elem.documentElement[("scroll" + prop)]; - } - - var $elem = $(elem); - - // IE10、IE11 在 box-sizing:border-box 时,不会包含 padding 和 border,这里进行修复 - var IEFixValue = 0; - var isWidth = name === 'width'; - if ('ActiveXObject' in window) { // 判断是 IE 浏览器 - if ($elem.css('box-sizing') === 'border-box') { - IEFixValue = parseFloat($elem.css(("padding-" + (isWidth ? 'left' : 'top')))) - + parseFloat($elem.css(("padding-" + ((isWidth ? 'right' : 'bottom'))))) - + parseFloat($elem.css(("border-" + (isWidth ? 'left' : 'top') + "-width"))) - + parseFloat($elem.css(("border-" + (isWidth ? 'right' : 'bottom') + "-width"))); - } - } - - return parseFloat($(elem).css(name)) + IEFixValue; - } - - // 设置 - /* eslint no-restricted-globals: 0 */ - if (!isNaN(Number(val)) && val !== '') { - val += 'px'; - } - - return this.css(name, val); - }; - }); - - /** - * innerWidth - 获取元素的宽度,包含内边距 - * @return {Number} - */ - /** - * innerHeight - 获取元素的高度,包含内边距 - * @return {Number} - */ - each({ - Width: 'width', - Height: 'height', - }, function (prop, name) { - $.fn[("inner" + prop)] = function () { - var value = this[name](); - var $elem = $(this[0]); - - if ($elem.css('box-sizing') !== 'border-box') { - value += parseFloat($elem.css(("padding-" + (name === 'width' ? 'left' : 'top')))); - value += parseFloat($elem.css(("padding-" + (name === 'width' ? 'right' : 'bottom')))); - } - - return value; - }; - }); - - function dir(nodes, selector, nameIndex, node) { - var ret = []; - var elem; - - nodes.each(function (j, _this) { - elem = _this[node]; - while (elem) { - if (nameIndex === 2) { - // prevUntil - if (!selector || (selector && $(elem).is(selector))) { - break; - } - - ret.push(elem); - } else if (nameIndex === 0) { - // prev - if (!selector || (selector && $(elem).is(selector))) { - ret.push(elem); - } - - break; - } else if (!selector || (selector && $(elem).is(selector))) { - // prevAll - ret.push(elem); - } - - elem = elem[node]; - } - }); - - return new JQ(unique(ret)); - } - - /** - * prev - 取得前一个匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - /** - * prevAll - 取得前面所有匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - /** - * prevUntil - 取得前面的所有元素,直到遇到匹配的元素,不包含匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - each(['', 'All', 'Until'], function (nameIndex, name) { - $.fn[("prev" + name)] = function (selector) { - // prevAll、prevUntil 需要把元素的顺序倒序处理,以便和 jQuery 的结果一致 - var $nodes = nameIndex === 0 ? this : $(this.get().reverse()); - - return dir($nodes, selector, nameIndex, 'previousElementSibling'); - }; - }); - - /** - * next - 取得后一个匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - /** - * nextAll - 取得后面所有匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - /** - * nextUntil - 取得后面所有匹配的元素,直到遇到匹配的元素,不包含匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - each(['', 'All', 'Until'], function (nameIndex, name) { - $.fn[("next" + name)] = function (selector) { - return dir(this, selector, nameIndex, 'nextElementSibling'); - }; - }); - - /** - * parent - 取得匹配的直接父元素 - * @param selector {String=} - * @return {JQ} - */ - /** - * parents - 取得所有匹配的父元素 - * @param selector {String=} - * @return {JQ} - */ - /** - * parentUntil - 取得所有的父元素,直到遇到匹配的元素,不包含匹配的元素 - * @param selector {String=} - * @return {JQ} - */ - each(['', 's', 'sUntil'], function (nameIndex, name) { - $.fn[("parent" + name)] = function (selector) { - // parents、parentsUntil 需要把元素的顺序反向处理,以便和 jQuery 的结果一致 - var $nodes = nameIndex === 0 ? this : $(this.get().reverse()); - - return dir($nodes, selector, nameIndex, 'parentNode'); - }; - }); - - /** - * append - 在元素内部追加内容 - * @param newChild {String|Node|NodeList|JQ} - * @return {JQ} - */ - /** - * prepend - 在元素内部前置内容 - * @param newChild {String|Node|NodeList|JQ} - * @return {JQ} - */ - each(['append', 'prepend'], function (nameIndex, name) { - $.fn[name] = function (newChild) { - var newChilds; - var copyByClone = this.length > 1; - - if (isString(newChild) && (newChild[0] !== '<' || newChild[newChild.length - 1] !== '>')) { - var tempDiv = document.createElement('div'); - tempDiv.innerHTML = newChild; - newChilds = [].slice.call(tempDiv.childNodes); - } else { - newChilds = $(newChild).get(); - } - - if (nameIndex === 1) { - // prepend - newChilds.reverse(); - } - - return this.each(function (i, _this) { - each(newChilds, function (j, child) { - // 一个元素要同时追加到多个元素中,需要先复制一份,然后追加 - if (copyByClone && i > 0) { - child = child.cloneNode(true); - } - - if (nameIndex === 0) { - // append - _this.appendChild(child); - } else { - // prepend - _this.insertBefore(child, _this.childNodes[0]); - } - }); - }); - }; - }); - - /** - * insertBefore - 插入到指定元素的前面 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - /** - * insertAfter - 插入到指定元素的后面 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - each(['insertBefore', 'insertAfter'], function (nameIndex, name) { - $.fn[name] = function (selector) { - var $elem = $(selector); - - return this.each(function (i, _this) { - $elem.each(function (j, elem) { - elem.parentNode.insertBefore( - $elem.length === 1 ? _this : _this.cloneNode(true), - nameIndex === 0 ? elem : elem.nextSibling - ); - }); - }); - }; - }); - - /** - * appendTo - 追加到指定元素内容 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - /** - * prependTo - 前置到指定元素内部 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - /** - * before - 插入到指定元素前面 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - /** - * after - 插入到指定元素后面 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - /** - * replaceAll - 替换掉指定元素 - * @param selector {String|Node|NodeList|JQ} - * @return {JQ} - */ - each({ - appendTo: 'append', - prependTo: 'prepend', - before: 'insertBefore', - after: 'insertAfter', - replaceAll: 'replaceWith', - }, function (name, original) { - $.fn[name] = function (selector) { - $(selector)[original](this); - return this; - }; - }); - - var dataNS = 'mduiElementDataStorage'; - - $.extend({ - /** - * 在指定元素上存储数据,或从指定元素上读取数据 - * @param elem 必须, DOM 元素 - * @param key 必须,键名 - * @param value 可选,值 - */ - data: function data(elem, key, value) { - var data = {}; - - if (value !== undefined) { - // 根据 key、value 设置值 - data[key] = value; - } else if (isObjectLike(key)) { - // 根据键值对设置值 - data = key; - } else if (key === undefined) { - // 获取所有值 - var result = {}; - - each(elem.attributes, function (i, attribute) { - var name = attribute.name; - - if (name.indexOf('data-') === 0) { - var prop = name.slice(5).replace(/-./g, function (u) { return u.charAt(1).toUpperCase(); }); - - result[prop] = attribute.value; - } - }); - - if (elem[dataNS]) { - each(elem[dataNS], function (k, v) { - result[k] = v; - }); - } - - return result; - } else if (elem[dataNS] && (key in elem[dataNS])) { - // 获取指定值 - return elem[dataNS][key]; - } else { - // 从 data- 中获取指定值 - var dataKey = elem.getAttribute(("data-" + key)); - - if (dataKey) { - return dataKey; - } - - return undefined; - } - - // 设置值 - if (!elem[dataNS]) { - elem[dataNS] = {}; - } - - each(data, function (k, v) { - elem[dataNS][k] = v; - }); - - return undefined; - }, - - /** - * 移除指定元素上存放的数据 - * @param elem 必须,DOM 元素 - * @param key 必须,键名 - */ - removeData: function removeData(elem, key) { - if (elem[dataNS] && elem[dataNS][key]) { - elem[dataNS][key] = null; - delete elem[dataNS][key]; - } - }, - }); - - $.fn.extend({ - /** - * 在元素上读取或设置数据 - * @param key 必须 - * @param value - * @returns {*} - */ - data: function data(key, value) { - if (value === undefined) { - if (isObjectLike(key)) { - // 同时设置多个值 - return this.each(function (i, elem) { - $.data(elem, key); - }); - } - - if (this[0]) { - // 获取值 - return $.data(this[0], key); - } - - return undefined; - } - - // 设置值 - return this.each(function (i, elem) { - $.data(elem, key, value); - }); - }, - - /** - * 移除元素上存储的数据 - * @param key 必须 - * @returns {*} - */ - removeData: function removeData(key) { - return this.each(function (i, elem) { - $.removeData(elem, key); - }); - }, - }); - - !function(){try{return new e("test")}catch(e){}var e=function(e,t){t=t||{bubbles:!1,cancelable:!1};var n=document.createEvent("MouseEvent");return n.initMouseEvent(e,t.bubbles,t.cancelable,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n};e.prototype=Event.prototype,window.MouseEvent=e;}(); - - !function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}"function"!=typeof window.CustomEvent&&(t.prototype=window.Event.prototype,window.CustomEvent=t);}(); - - // 存储事件 - var handlers = { - // i: { // 元素ID - // j: { // 事件ID - // e: 事件名 - // fn: 事件处理函数 - // i: 事件ID - // proxy: - // sel: 选择器 - // } - // } - }; - - // 元素ID - var mduiElementId = 1; - - function fnFalse() { - return false; - } - - /** - * 为元素赋予一个唯一的ID - * @param element - * @returns {number|*} - */ - function getElementId(element) { - if (!element.mduiElementId) { - mduiElementId += 1; - element.mduiElementId = mduiElementId; - } - - return element.mduiElementId; - } - - /** - * 获取匹配的事件 - * @param element - * @param eventName - * @param func - * @param selector - * @returns {Array} - */ - function getHandlers(element, eventName, func, selector) { - return (handlers[getElementId(element)] || []).filter(function (handler) { return handler - && (!eventName || handler.e === eventName) - && (!func || handler.fn.toString() === func.toString()) - && (!selector || handler.sel === selector); }); - } - - /** - * 添加事件监听 - * @param element - * @param eventName - * @param func - * @param data - * @param selector - */ - function add(element, eventName, func, data, selector) { - var elementId = getElementId(element); - - if (!handlers[elementId]) { - handlers[elementId] = []; - } - - // 传入 data.useCapture 来设置 useCapture: true - var useCapture = false; - if (isObjectLike(data) && data.useCapture) { - useCapture = true; - } - - eventName.split(' ').forEach(function (event) { - var handler = { - e: event, - fn: func, - sel: selector, - i: handlers[elementId].length, - }; - - function callFn(e, elem) { - // 因为鼠标事件模拟事件的 detail 属性是只读的,因此在 e._detail 中存储参数 - /* eslint no-underscore-dangle: 0 */ - var result = func.apply(elem, e._detail === undefined ? [e] : [e].concat(e._detail)); - - if (result === false) { - e.preventDefault(); - e.stopPropagation(); - } - } - - function proxyfn(e) { - e._data = data; - - if (selector) { - // 事件代理 - $(element) - .find(selector) - .get() - .reverse() - .forEach(function (elem) { - if (elem === e.target || $.contains(elem, e.target)) { - callFn(e, elem); - } - }); - } else { - // 不使用事件代理 - callFn(e, element); - } - } - - handler.proxy = proxyfn; - handlers[elementId].push(handler); - element.addEventListener(handler.e, proxyfn, useCapture); - }); - } - - /** - * 移除事件监听 - * @param element - * @param eventName - * @param func - * @param selector - */ - function remove(element, eventName, func, selector) { - (eventName || '').split(' ').forEach(function (event) { - getHandlers(element, event, func, selector).forEach(function (handler) { - delete handlers[getElementId(element)][handler.i]; - element.removeEventListener(handler.e, handler.proxy, false); - }); - }); - } - - $.fn.extend({ - /** - * DOM 加载完毕后调用的函数 - * @param callback - * @returns {ready} - */ - ready: function ready(callback) { - if (/complete|loaded|interactive/.test(document.readyState) && document.body) { - callback($); - } else { - document.addEventListener('DOMContentLoaded', function () { - callback($); - }, false); - } - - return this; - }, - - /** - * 绑定事件 - * - * $().on({eventName: fn}, selector, data); - * $().on({eventName: fn}, selector) - * $().on({eventName: fn}) - * $().on(eventName, selector, data, fn); - * $().on(eventName, selector, fn); - * $().on(eventName, data, fn); - * $().on(eventName, fn); - * $().on(eventName, false); - * - * @param eventName - * @param selector - * @param data - * @param callback - * @param one 是否是 one 方法,只在 JQ 内部使用 - * @returns - */ - on: function on(eventName, selector, data, callback, one) { - var self = this; - - // 默认 - // $().on(event, selector, data, callback) - - // event 使用 事件:函数 键值对 - // event = { - // 'event1': callback1, - // 'event2': callback2 - // } - // - // $().on(event, selector, data) - if (eventName && !isString(eventName)) { - each(eventName, function (type, fn) { - self.on(type, selector, data, fn); - }); - - return self; - } - - // selector 不存在 - // $().on(event, data, callback) - if (!isString(selector) && !isFunction(callback) && callback !== false) { - callback = data; - data = selector; - selector = undefined; - } - - // data 不存在 - // $().on(event, callback) - if (isFunction(data) || data === false) { - callback = data; - data = undefined; - } - - // callback 为 false - // $().on(event, false) - if (callback === false) { - callback = fnFalse; - } - - if (one === 1) { - var origCallback = callback; - callback = function () { - self.off(eventName, selector, callback); - /* eslint prefer-rest-params: 0 */ - return origCallback.apply(this, arguments); - }; - } - - return this.each(function () { - add(this, eventName, callback, data, selector); - }); - }, - - /** - * 绑定事件,只触发一次 - * @param eventName - * @param selector - * @param data - * @param callback - */ - one: function one(eventName, selector, data, callback) { - var self = this; - - if (!isString(eventName)) { - each(eventName, function (type, fn) { - type.split(' ').forEach(function (eName) { - self.on(eName, selector, data, fn, 1); - }); - }); - } else { - eventName.split(' ').forEach(function (eName) { - self.on(eName, selector, data, callback, 1); - }); - } - - return this; - }, - - /** - * 取消绑定事件 - * - * $().off(eventName, selector); - * $().off(eventName, callback); - * $().off(eventName, false); - * - */ - off: function off(eventName, selector, callback) { - var self = this; - - // event 使用 事件:函数 键值对 - // event = { - // 'event1': callback1, - // 'event2': callback2 - // } - // - // $().off(event, selector) - if (eventName && !isString(eventName)) { - each(eventName, function (type, fn) { - self.off(type, selector, fn); - }); - - return self; - } - - // selector 不存在 - // $().off(event, callback) - if (!isString(selector) && !isFunction(callback) && callback !== false) { - callback = selector; - selector = undefined; - } - - // callback 为 false - // $().off(event, false) - if (callback === false) { - callback = fnFalse; - } - - return self.each(function () { - remove(this, eventName, callback, selector); - }); - }, - - /** - * 触发一个事件 - * @param eventName - * @param data - * @returns {*|JQ} - */ - trigger: function trigger(eventName, data) { - var isMouseEvent = ['click', 'mousedown', 'mouseup', 'mousemove'].indexOf(eventName) > -1; - var evt; - - if (isMouseEvent) { - // Note: MouseEvent 无法传入 detail 参数 - evt = new MouseEvent(eventName, { - bubbles: true, - cancelable: true, - }); - } else { - evt = new CustomEvent(eventName, { - detail: data, - bubbles: true, - cancelable: true, - }); - } - - evt._detail = data; - - return this.each(function () { - this.dispatchEvent(evt); - }); - }, - }); - - var globalOptions = {}; - var jsonpID = 0; - - // 全局事件名 - var ajaxEvent = { - ajaxStart: 'start.mdui.ajax', - ajaxSuccess: 'success.mdui.ajax', - ajaxError: 'error.mdui.ajax', - ajaxComplete: 'complete.mdui.ajax', - }; - - /** - * 判断此请求方法是否通过查询字符串提交参数 - * @param method 请求方法,大写 - * @returns {boolean} - */ - function isQueryStringData(method) { - return ['GET', 'HEAD'].indexOf(method) >= 0; - } - - /** - * 添加参数到 URL 上,且 URL 中不存在 ? 时,自动把第一个 & 替换为 ? - * @param url - * @param query 参数 key=value - * @returns {string} - */ - function appendQuery(url, query) { - return ((url + "&" + query)).replace(/[&?]{1,2}/, '?'); - } - - $.extend({ - - /** - * 为 ajax 请求设置全局配置参数 - * @param options - */ - ajaxSetup: function ajaxSetup(options) { - $.extend(globalOptions, options || {}); - }, - - /** - * 发送 ajax 请求 - * @param options - */ - ajax: function ajax(options) { - // 配置参数 - var defaults = { - // 请求方式 - method: 'GET', - // 请求的数据,查询字符串或对象 - data: false, - // 是否把数据转换为查询字符串发送,为 false 时不进行自动转换。 - processData: true, - // 是否为异步请求 - async: true, - // 是否从缓存中读取,只对 GET/HEAD 请求有效,dataType 为 jsonp 时为 false - cache: true, - // HTTP 访问认证的用户名 - username: '', - // HTTP 访问认证的密码 - password: '', - // 一个键值对,随着请求一起发送 - headers: {}, - // 设置 XHR 对象 - xhrFields: {}, - // 一个 HTTP 代码和函数的对象 - statusCode: {}, - // 预期服务器返回的数据类型 text、json、jsonp - dataType: 'text', - // jsonp 请求的回调函数名称 - jsonp: 'callback', - // (string 或 Function)使用指定的回调函数名代替自动生成的回调函数名 - jsonpCallback: function () { - jsonpID += 1; - - return ("mduijsonp_" + (Date.now()) + "_" + jsonpID); - }, - // 发送信息至服务器时内容编码类型 - contentType: 'application/x-www-form-urlencoded', - // 设置请求超时时间(毫秒) - timeout: 0, - // 是否在 document 上触发全局 ajax 事件 - global: true, - // beforeSend: function (XMLHttpRequest) 请求发送前执行,返回 false 可取消本次 ajax 请求 - // success: function (data, textStatus, XMLHttpRequest) 请求成功时调用 - // error: function (XMLHttpRequest, textStatus) 请求失败时调用 - // statusCode: {404: function ()} - // 200-299之间的状态码表示成功,参数和 success 回调一样;其他状态码表示失败,参数和 error 回调一样 - // complete: function (XMLHttpRequest, textStatus) 请求完成后回调函数 (请求成功或失败之后均调用) - }; - - // 回调函数 - var callbacks = [ - 'beforeSend', - 'success', - 'error', - 'statusCode', - 'complete' ]; - - // 是否已取消请求 - var isCanceled = false; - - // 保存全局配置 - var globals = globalOptions; - - // 事件参数 - var eventParams = {}; - - // 合并全局参数到默认参数,全局回调函数不覆盖 - each(globals, function (key, value) { - if (callbacks.indexOf(key) < 0) { - defaults[key] = value; - } - }); - - // 参数合并 - options = $.extend({}, defaults, options); - - /** - * 触发全局事件 - * @param event string 事件名 - * @param xhr XMLHttpRequest 事件参数 - */ - function triggerEvent(event, xhr) { - if (options.global) { - $(document).trigger(event, xhr); - } - } - - /** - * 触发 XHR 回调和事件 - * @param callback string 回调函数名称 - * @param args - */ - function triggerCallback(callback) { - var args = [], len = arguments.length - 1; - while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ]; - - var result1; - var result2; - - if (callback) { - // 全局回调 - if (callback in globals) { - result1 = globals[callback].apply(globals, args); - } - - // 自定义回调 - if (options[callback]) { - result2 = options[callback].apply(options, args); - } - - // beforeSend 回调返回 false 时取消 ajax 请求 - if (callback === 'beforeSend' && (result1 === false || result2 === false)) { - isCanceled = true; - } - } - } - - // 请求方式转为大写 - var method = options.method.toUpperCase(); - - // 默认使用当前页面 URL - if (!options.url) { - options.url = window.location.toString(); - } - - // 需要发送的数据 - // GET/HEAD 请求和 processData 为 true 时,转换为查询字符串格式,特殊格式不转换 - var sendData; - if ( - (isQueryStringData(method) || options.processData) - && options.data - && [ArrayBuffer, Blob, Document, FormData].indexOf(options.data.constructor) < 0 - ) { - sendData = isString(options.data) ? options.data : $.param(options.data); - } else { - sendData = options.data; - } - - // 对于 GET、HEAD 类型的请求,把 data 数据添加到 URL 中 - if (isQueryStringData(method) && sendData) { - // 查询字符串拼接到 URL 中 - options.url = appendQuery(options.url, sendData); - sendData = null; - } - - // JSONP - if (options.dataType === 'jsonp') { - // URL 中添加自动生成的回调函数名 - var callbackName = isFunction(options.jsonpCallback) - ? options.jsonpCallback() - : options.jsonpCallback; - var requestUrl = appendQuery(options.url, ((options.jsonp) + "=" + callbackName)); - - eventParams.options = options; - - triggerEvent(ajaxEvent.ajaxStart, eventParams); - triggerCallback('beforeSend', null); - - if (isCanceled) { - return undefined; - } - - var abortTimeout; - - // 创建 script - var script = document.createElement('script'); - script.type = 'text/javascript'; - - // 创建 script 失败 - script.onerror = function () { - if (abortTimeout) { - clearTimeout(abortTimeout); - } - - triggerEvent(ajaxEvent.ajaxError, eventParams); - triggerCallback('error', null, 'scripterror'); - - triggerEvent(ajaxEvent.ajaxComplete, eventParams); - triggerCallback('complete', null, 'scripterror'); - }; - - script.src = requestUrl; - - // 处理 - window[callbackName] = function (data) { - if (abortTimeout) { - clearTimeout(abortTimeout); - } - - eventParams.data = data; - - triggerEvent(ajaxEvent.ajaxSuccess, eventParams); - triggerCallback('success', data, 'success', null); - - $(script).remove(); - script = null; - delete window[callbackName]; - }; - - $('head').append(script); - - if (options.timeout > 0) { - abortTimeout = setTimeout(function () { - $(script).remove(); - script = null; - - triggerEvent(ajaxEvent.ajaxError, eventParams); - triggerCallback('error', null, 'timeout'); - }, options.timeout); - } - - return undefined; - } - - // GET/HEAD 请求的缓存处理 - if (isQueryStringData(method) && !options.cache) { - options.url = appendQuery(options.url, ("_=" + (Date.now()))); - } - - // 创建 XHR - var xhr = new XMLHttpRequest(); - - xhr.open(method, options.url, options.async, options.username, options.password); - - if ( - options.contentType - || ( - sendData - && !isQueryStringData(method) - && options.contentType !== false - ) - ) { - xhr.setRequestHeader('Content-Type', options.contentType); - } - - // 设置 Accept - if (options.dataType === 'json') { - xhr.setRequestHeader('Accept', 'application/json, text/javascript'); - } - - // 添加 headers - if (options.headers) { - each(options.headers, function (key, value) { - xhr.setRequestHeader(key, value); - }); - } - - // 检查是否是跨域请求 - if (options.crossDomain === undefined) { - options.crossDomain = /^([\w-]+:)?\/\/([^/]+)/.test(options.url) - && RegExp.$2 !== window.location.host; - } - - if (!options.crossDomain) { - xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); - } - - if (options.xhrFields) { - each(options.xhrFields, function (key, value) { - xhr[key] = value; - }); - } - - eventParams.xhr = xhr; - eventParams.options = options; - - var xhrTimeout; - - xhr.onload = function () { - if (xhrTimeout) { - clearTimeout(xhrTimeout); - } - - // 包含成功或错误代码的字符串 - var textStatus; - - // AJAX 返回的 HTTP 响应码是否表示成功 - var isHttpStatusSuccess = (xhr.status >= 200 && xhr.status < 300) || xhr.status === 0; - - var responseData; - - if (isHttpStatusSuccess) { - if (xhr.status === 204 || method === 'HEAD') { - textStatus = 'nocontent'; - } else if (xhr.status === 304) { - textStatus = 'notmodified'; - } else { - textStatus = 'success'; - } - - if (options.dataType === 'json') { - try { - responseData = JSON.parse(xhr.responseText); - eventParams.data = responseData; - } catch (err) { - textStatus = 'parsererror'; - - triggerEvent(ajaxEvent.ajaxError, eventParams); - triggerCallback('error', xhr, textStatus); - } - - if (textStatus !== 'parsererror') { - triggerEvent(ajaxEvent.ajaxSuccess, eventParams); - triggerCallback('success', responseData, textStatus, xhr); - } - } else { - responseData = xhr.responseType === 'text' || xhr.responseType === '' - ? xhr.responseText - : xhr.response; - eventParams.data = responseData; - - triggerEvent(ajaxEvent.ajaxSuccess, eventParams); - triggerCallback('success', responseData, textStatus, xhr); - } - } else { - textStatus = 'error'; - - triggerEvent(ajaxEvent.ajaxError, eventParams); - triggerCallback('error', xhr, textStatus); - } - - // statusCode - each([globals.statusCode, options.statusCode], function (i, func) { - if (func && func[xhr.status]) { - if (isHttpStatusSuccess) { - func[xhr.status](responseData, textStatus, xhr); - } else { - func[xhr.status](xhr, textStatus); - } - } - }); - - triggerEvent(ajaxEvent.ajaxComplete, eventParams); - triggerCallback('complete', xhr, textStatus); - }; - - xhr.onerror = function () { - if (xhrTimeout) { - clearTimeout(xhrTimeout); - } - - triggerEvent(ajaxEvent.ajaxError, eventParams); - triggerCallback('error', xhr, xhr.statusText); - - triggerEvent(ajaxEvent.ajaxComplete, eventParams); - triggerCallback('complete', xhr, 'error'); - }; - - xhr.onabort = function () { - var textStatus = 'abort'; - - if (xhrTimeout) { - textStatus = 'timeout'; - clearTimeout(xhrTimeout); - } - - triggerEvent(ajaxEvent.ajaxError, eventParams); - triggerCallback('error', xhr, textStatus); - - triggerEvent(ajaxEvent.ajaxComplete, eventParams); - triggerCallback('complete', xhr, textStatus); - }; - - // ajax start 回调 - triggerEvent(ajaxEvent.ajaxStart, eventParams); - triggerCallback('beforeSend', xhr); - - if (isCanceled) { - return xhr; - } - - // Timeout - if (options.timeout > 0) { - xhrTimeout = setTimeout(function () { - xhr.abort(); - }, options.timeout); - } - - // 发送 XHR - xhr.send(sendData); - - return xhr; - }, - }); - - // 监听全局事件 - // - // 通过 $(document).on('success.mdui.ajax', function (event, params) {}) 调用时,包含两个参数 - // event: 事件对象 - // params: { - // xhr: XMLHttpRequest 对象 - // options: ajax 请求的配置参数 - // data: ajax 请求返回的数据 - // } - - // 全局 Ajax 事件快捷方法 - // $(document).ajaxStart(function (event, xhr, options) {}) - // $(document).ajaxSuccess(function (event, xhr, options, data) {}) - // $(document).ajaxError(function (event, xhr, options) {}) - // $(document).ajaxComplete(function (event, xhr, options) {}) - each(ajaxEvent, function (name, eventName) { - $.fn[name] = function (fn) { - return this.on(eventName, function (e, params) { - fn(e, params.xhr, params.options, params.data); - }); - }; - }); - - return $; - - }()); - - - /** - * ============================================================================= - * ************ 定义全局变量 ************ - * ============================================================================= - */ - - var $document = $(document); - var $window = $(window); - - /** - * 队列 -- 当前队列的 api 和 jquery 不一样,所以不打包进 mdui.JQ 里 - */ - var queue = {}; - (function () { - var queueData = []; - - /** - * 写入队列 - * @param queueName 对列名 - * @param func 函数名,该参数为空时,返回所有队列 - */ - queue.queue = function (queueName, func) { - if (queueData[queueName] === undefined) { - queueData[queueName] = []; - } - - if (func === undefined) { - return queueData[queueName]; - } - - queueData[queueName].push(func); - }; - - /** - * 从队列中移除第一个函数,并执行该函数 - * @param queueName - */ - queue.dequeue = function (queueName) { - if (queueData[queueName] !== undefined && queueData[queueName].length) { - (queueData[queueName].shift())(); - } - }; - - })(); - - /** - * touch 事件后的 500ms 内禁用 mousedown 事件 - * - * 不支持触控的屏幕上事件顺序为 mousedown -> mouseup -> click - * 支持触控的屏幕上事件顺序为 touchstart -> touchend -> mousedown -> mouseup -> click - */ - var TouchHandler = { - touches: 0, - - /** - * 该事件是否被允许 - * 在执行事件前调用该方法判断事件是否可以执行 - * @param e - * @returns {boolean} - */ - isAllow: function (e) { - var allow = true; - - if ( - TouchHandler.touches && - [ - 'mousedown', - 'mouseup', - 'mousemove', - 'click', - 'mouseover', - 'mouseout', - 'mouseenter', - 'mouseleave', - ].indexOf(e.type) > -1 - ) { - // 触发了 touch 事件后阻止鼠标事件 - allow = false; - } - - return allow; - }, - - /** - * 在 touchstart 和 touchmove、touchend、touchcancel 事件中调用该方法注册事件 - * @param e - */ - register: function (e) { - if (e.type === 'touchstart') { - // 触发了 touch 事件 - TouchHandler.touches += 1; - } else if (['touchmove', 'touchend', 'touchcancel'].indexOf(e.type) > -1) { - // touch 事件结束 500ms 后解除对鼠标事件的阻止 - setTimeout(function () { - if (TouchHandler.touches) { - TouchHandler.touches -= 1; - } - }, 500); - } - }, - - start: 'touchstart mousedown', - move: 'touchmove mousemove', - end: 'touchend mouseup', - cancel: 'touchcancel mouseleave', - unlock: 'touchend touchmove touchcancel', - }; - - // 测试事件 - // 在每一个事件中都使用 TouchHandler.isAllow(e) 判断事件是否可执行 - // 在 touchstart 和 touchmove、touchend、touchcancel - // (function () { - // - // $document - // .on(TouchHandler.start, function (e) { - // if (!TouchHandler.isAllow(e)) { - // return; - // } - // TouchHandler.register(e); - // console.log(e.type); - // }) - // .on(TouchHandler.move, function (e) { - // if (!TouchHandler.isAllow(e)) { - // return; - // } - // console.log(e.type); - // }) - // .on(TouchHandler.end, function (e) { - // if (!TouchHandler.isAllow(e)) { - // return; - // } - // console.log(e.type); - // }) - // .on(TouchHandler.unlock, TouchHandler.register); - // })(); - - $(function () { - // 避免页面加载完后直接执行css动画 - // https://css-tricks.com/transitions-only-after-page-load/ - - setTimeout(function () { - $('body').addClass('mdui-loaded'); - }, 0); - }); - - - /** - * ============================================================================= - * ************ MDUI 内部使用的函数 ************ - * ============================================================================= - */ - - /** - * 解析 DATA API 的参数 - * @param str - * @returns {*} - */ - var parseOptions = function (str) { - var options = {}; - - if (str === null || !str) { - return options; - } - - if (typeof str === 'object') { - return str; - } - - /* jshint ignore:start */ - var start = str.indexOf('{'); - try { - options = (new Function('', - 'var json = ' + str.substr(start) + - '; return JSON.parse(JSON.stringify(json));'))(); - } catch (e) { - } - /* jshint ignore:end */ - - return options; - }; - - /** - * 绑定组件的事件 - * @param eventName 事件名 - * @param pluginName 插件名 - * @param inst 插件实例 - * @param trigger 在该元素上触发 - * @param obj 事件参数 - */ - var componentEvent = function (eventName, pluginName, inst, trigger, obj) { - if (!obj) { - obj = {}; - } - - obj.inst = inst; - - var fullEventName = eventName + '.mdui.' + pluginName; - - // jQuery 事件 - if (typeof jQuery !== 'undefined') { - jQuery(trigger).trigger(fullEventName, obj); - } - - // JQ 事件 - $(trigger).trigger(fullEventName, obj); - }; - - - /** - * ============================================================================= - * ************ 开放的常用方法 ************ - * ============================================================================= - */ - - $.fn.extend({ - - /** - * 执行强制重绘 - */ - reflow: function () { - return this.each(function () { - return this.clientLeft; - }); - }, - - /** - * 设置 transition 时间 - * @param duration - */ - transition: function (duration) { - if (typeof duration !== 'string') { - duration = duration + 'ms'; - } - - return this.each(function () { - this.style.webkitTransitionDuration = duration; - this.style.transitionDuration = duration; - }); - }, - - /** - * transition 动画结束回调 - * @param callback - * @returns {transitionEnd} - */ - transitionEnd: function (callback) { - var events = [ - 'webkitTransitionEnd', - 'transitionend', - ]; - var i; - var _this = this; - - function fireCallBack(e) { - if (e.target !== this) { - return; - } - - callback.call(this, e); - - for (i = 0; i < events.length; i++) { - _this.off(events[i], fireCallBack); - } - } - - if (callback) { - for (i = 0; i < events.length; i++) { - _this.on(events[i], fireCallBack); - } - } - - return this; - }, - - /** - * 设置 transform-origin 属性 - * @param transformOrigin - */ - transformOrigin: function (transformOrigin) { - return this.each(function () { - this.style.webkitTransformOrigin = transformOrigin; - this.style.transformOrigin = transformOrigin; - }); - }, - - /** - * 设置 transform 属性 - * @param transform - */ - transform: function (transform) { - return this.each(function () { - this.style.webkitTransform = transform; - this.style.transform = transform; - }); - }, - - }); - - $.extend({ - /** - * 创建并显示遮罩 - * @param zIndex 遮罩层的 z-index - */ - showOverlay: function (zIndex) { - var $overlay = $('.mdui-overlay'); - - if ($overlay.length) { - $overlay.data('isDeleted', 0); - - if (zIndex !== undefined) { - $overlay.css('z-index', zIndex); - } - } else { - if (zIndex === undefined) { - zIndex = 2000; - } - - $overlay = $('
') - .appendTo(document.body) - .reflow() - .css('z-index', zIndex); - } - - var level = $overlay.data('overlay-level') || 0; - return $overlay - .data('overlay-level', ++level) - .addClass('mdui-overlay-show'); - }, - - /** - * 隐藏遮罩层 - * @param force 是否强制隐藏遮罩 - */ - hideOverlay: function (force) { - var $overlay = $('.mdui-overlay'); - - if (!$overlay.length) { - return; - } - - var level = force ? 1 : $overlay.data('overlay-level'); - if (level > 1) { - $overlay.data('overlay-level', --level); - return; - } - - $overlay - .data('overlay-level', 0) - .removeClass('mdui-overlay-show') - .data('isDeleted', 1) - .transitionEnd(function () { - if ($overlay.data('isDeleted')) { - $overlay.remove(); - } - }); - }, - - /** - * 锁定屏幕 - */ - lockScreen: function () { - var $body = $('body'); - - // 不直接把 body 设为 box-sizing: border-box,避免污染全局样式 - var newBodyWidth = $body.width(); - - $body - .addClass('mdui-locked') - .width(newBodyWidth); - - var level = $body.data('lockscreen-level') || 0; - $body.data('lockscreen-level', ++level); - }, - - /** - * 解除屏幕锁定 - * @param force 是否强制解锁屏幕 - */ - unlockScreen: function (force) { - var $body = $('body'); - - var level = force ? 1 : $body.data('lockscreen-level'); - if (level > 1) { - $body.data('lockscreen-level', --level); - return; - } - - $body - .data('lockscreen-level', 0) - .removeClass('mdui-locked') - .width(''); - }, - - /** - * 函数节流 - * @param fn - * @param delay - * @returns {Function} - */ - throttle: function (fn, delay) { - var timer = null; - if (!delay || delay < 16) { - delay = 16; - } - - return function () { - var _this = this; - var args = arguments; - - if (timer === null) { - timer = setTimeout(function () { - fn.apply(_this, args); - timer = null; - }, delay); - } - }; - }, - }); - - /** - * 生成唯一 id - * @param string name id的名称,若该名称对于的guid不存在,则生成新的guid并返回;若已存在,则返回原有guid - * @returns {string} - */ - (function () { - var GUID = {}; - - $.extend({ - guid: function (name) { - if (typeof name !== 'undefined' && typeof GUID[name] !== 'undefined') { - return GUID[name]; - } - - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - } - - var guid = s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); - - if (typeof name !== 'undefined') { - GUID[name] = guid; - } - - return guid; - }, - }); - })(); - - - /** - * ============================================================================= - * ************ Mutation ************ - * ============================================================================= - */ - - (function () { - /** - * API 初始化代理, 当 DOM 突变再次执行代理的初始化函数. 使用方法: - * - * 1. 代理组件 API 执行初始化函数, selector 必须为字符串. - * mdui.mutation(selector, apiInit); - * mutation 会执行 $(selector).each(apiInit) - * - * 2. 突变时, 再次执行代理的初始化函数 - * mdui.mutation() 等价 $(document).mutation() - * $(selector).mutation() 在 selector 节点内进行 API 初始化 - * - * 原理: - * - * mutation 执行了 $().data('mdui.mutation', [selector]). - * 当元素被重构时, 该数据会丢失, 由此判断是否突变. - * - * 提示: - * - * 类似 Drawer 可以使用委托事件完成. - * 类似 Collapse 需要知道 DOM 发生突变, 并再次进行初始化. - */ - var entries = { }; - - function mutation(selector, apiInit, that, i, item) { - var $this = $(that); - var m = $this.data('mdui.mutation'); - - if (!m) { - m = []; - $this.data('mdui.mutation', m); - } - - if (m.indexOf(selector) === -1) { - m.push(selector); - apiInit.call(that, i, item); - } - } - - $.fn.extend({ - mutation: function () { - return this.each(function (i, item) { - var $this = $(this); - $.each(entries, function (selector, apiInit) { - if ($this.is(selector)) { - mutation(selector, apiInit, $this[0], i, item); - } - - $this.find(selector).each(function (i, item) { - mutation(selector, apiInit, this, i, item); - }); - }); - }); - }, - }); - - mdui.mutation = function (selector, apiInit) { - if (typeof selector !== 'string' || typeof apiInit !== 'function') { - $(document).mutation(); - return; - } - - entries[selector] = apiInit; - $(selector).each(function (i, item) { - mutation(selector, apiInit, this, i, item); - }); - }; - - })(); - - - /** - * ============================================================================= - * ************ Headroom.js ************ - * ============================================================================= - */ - - mdui.Headroom = (function () { - - /** - * 默认参数 - * @type {{}} - */ - var DEFAULT = { - tolerance: 5, // 滚动条滚动多少距离开始隐藏或显示元素,{down: num, up: num},或数字 - offset: 0, // 在页面顶部多少距离内滚动不会隐藏元素 - initialClass: 'mdui-headroom', // 初始化时添加的类 - pinnedClass: 'mdui-headroom-pinned-top', // 元素固定时添加的类 - unpinnedClass: 'mdui-headroom-unpinned-top', // 元素隐藏时添加的类 - }; - - /** - * Headroom - * @param selector - * @param opts - * @constructor - */ - function Headroom(selector, opts) { - var _this = this; - - _this.$headroom = $(selector).eq(0); - if (!_this.$headroom.length) { - return; - } - - // 已通过自定义属性实例化过,不再重复实例化 - var oldInst = _this.$headroom.data('mdui.headroom'); - if (oldInst) { - return oldInst; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - - // 数值转为 {down: bum, up: num} - var tolerance = _this.options.tolerance; - if (tolerance !== Object(tolerance)) { - _this.options.tolerance = { - down: tolerance, - up: tolerance, - }; - } - - _this._init(); - } - - /** - * 初始化 - * @private - */ - Headroom.prototype._init = function () { - var _this = this; - - _this.state = 'pinned'; - _this.$headroom - .addClass(_this.options.initialClass) - .removeClass(_this.options.pinnedClass + ' ' + _this.options.unpinnedClass); - - _this.inited = false; - _this.lastScrollY = 0; - - _this._attachEvent(); - }; - - /** - * 监听滚动事件 - * @private - */ - Headroom.prototype._attachEvent = function () { - var _this = this; - - if (!_this.inited) { - _this.lastScrollY = window.pageYOffset; - _this.inited = true; - - $window.on('scroll', function () { - _this._scroll(); - }); - } - }; - - /** - * 滚动时的处理 - * @private - */ - Headroom.prototype._scroll = function () { - var _this = this; - _this.rafId = window.requestAnimationFrame(function () { - var currentScrollY = window.pageYOffset; - var direction = currentScrollY > _this.lastScrollY ? 'down' : 'up'; - var toleranceExceeded = - Math.abs(currentScrollY - _this.lastScrollY) >= - _this.options.tolerance[direction]; - - if ( - currentScrollY > _this.lastScrollY && - currentScrollY >= _this.options.offset && - toleranceExceeded) { - _this.unpin(); - } else if ( - (currentScrollY < _this.lastScrollY && toleranceExceeded) || - currentScrollY <= _this.options.offset - ) { - _this.pin(); - } - - _this.lastScrollY = currentScrollY; - }); - }; - - /** - * 动画结束回调 - * @param inst - */ - var transitionEnd = function (inst) { - if (inst.state === 'pinning') { - inst.state = 'pinned'; - componentEvent('pinned', 'headroom', inst, inst.$headroom); - } - - if (inst.state === 'unpinning') { - inst.state = 'unpinned'; - componentEvent('unpinned', 'headroom', inst, inst.$headroom); - } - }; - - /** - * 固定住 - */ - Headroom.prototype.pin = function () { - var _this = this; - - if ( - _this.state === 'pinning' || - _this.state === 'pinned' || - !_this.$headroom.hasClass(_this.options.initialClass) - ) { - return; - } - - componentEvent('pin', 'headroom', _this, _this.$headroom); - - _this.state = 'pinning'; - - _this.$headroom - .removeClass(_this.options.unpinnedClass) - .addClass(_this.options.pinnedClass) - .transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 不固定住 - */ - Headroom.prototype.unpin = function () { - var _this = this; - - if ( - _this.state === 'unpinning' || - _this.state === 'unpinned' || - !_this.$headroom.hasClass(_this.options.initialClass) - ) { - return; - } - - componentEvent('unpin', 'headroom', _this, _this.$headroom); - - _this.state = 'unpinning'; - - _this.$headroom - .removeClass(_this.options.pinnedClass) - .addClass(_this.options.unpinnedClass) - .transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 启用 - */ - Headroom.prototype.enable = function () { - var _this = this; - - if (!_this.inited) { - _this._init(); - } - }; - - /** - * 禁用 - */ - Headroom.prototype.disable = function () { - var _this = this; - - if (_this.inited) { - _this.inited = false; - _this.$headroom - .removeClass([ - _this.options.initialClass, - _this.options.pinnedClass, - _this.options.unpinnedClass, - ].join(' ')); - - $window.off('scroll', function () { - _this._scroll(); - }); - - window.cancelAnimationFrame(_this.rafId); - } - }; - - /** - * 获取当前状态 pinning | pinned | unpinning | unpinned - */ - Headroom.prototype.getState = function () { - return this.state; - }; - - return Headroom; - - })(); - - - /** - * ============================================================================= - * ************ Headroom 自定义属性 API ************ - * ============================================================================= - */ - - $(function () { - mdui.mutation('[mdui-headroom]', function () { - var $this = $(this); - var options = parseOptions($this.attr('mdui-headroom')); - - var inst = $this.data('mdui.headroom'); - if (!inst) { - inst = new mdui.Headroom($this, options); - $this.data('mdui.headroom', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ 供 Collapse、 Panel 调用的折叠内容块插件 ************ - * ============================================================================= - */ - var CollapsePrivate = (function () { - - /** - * 默认参数 - */ - var DEFAULT = { - accordion: false, // 是否使用手风琴效果 - }; - - /** - * 折叠内容块 - * @param selector - * @param opts - * @param namespace - * @constructor - */ - function Collapse(selector, opts, namespace) { - var _this = this; - - // 命名空间 - _this.ns = namespace; - - // 类名 - var classpPefix = 'mdui-' + _this.ns + '-item'; - _this.class_item = classpPefix; - _this.class_item_open = classpPefix + '-open'; - _this.class_header = classpPefix + '-header'; - _this.class_body = classpPefix + '-body'; - - // 折叠面板元素 - _this.$collapse = $(selector).eq(0); - if (!_this.$collapse.length) { - return; - } - - // 已通过自定义属性实例化过,不再重复实例化 - var oldInst = _this.$collapse.data('mdui.' + _this.ns); - if (oldInst) { - return oldInst; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - - _this.$collapse.on('click', '.' + _this.class_header, function () { - var $item = $(this).parent('.' + _this.class_item); - if (_this.$collapse.children($item).length) { - _this.toggle($item); - } - }); - - // 绑定关闭按钮 - _this.$collapse.on('click', '[mdui-' + _this.ns + '-item-close]', function () { - var $item = $(this).parents('.' + _this.class_item).eq(0); - if (_this._isOpen($item)) { - _this.close($item); - } - }); - } - - /** - * 指定 item 是否处于打开状态 - * @param $item - * @returns {boolean} - * @private - */ - Collapse.prototype._isOpen = function ($item) { - return $item.hasClass(this.class_item_open); - }; - - /** - * 获取指定 item - * @param item - * @returns {*} - * @private - */ - Collapse.prototype._getItem = function (item) { - var _this = this; - - if (parseInt(item) === item) { - // item 是索引号 - return _this.$collapse.children('.' + _this.class_item).eq(item); - } - - return $(item).eq(0); - }; - - /** - * 动画结束回调 - * @param inst - * @param $content - * @param $item - */ - var transitionEnd = function (inst, $content, $item) { - if (inst._isOpen($item)) { - $content - .transition(0) - .height('auto') - .reflow() - .transition(''); - - componentEvent('opened', inst.ns, inst, $item[0]); - } else { - $content.height(''); - - componentEvent('closed', inst.ns, inst, $item[0]); - } - }; - - /** - * 打开指定面板项 - * @param item 面板项的索引号或 DOM 元素或 CSS 选择器 - */ - Collapse.prototype.open = function (item) { - var _this = this; - var $item = _this._getItem(item); - - if (_this._isOpen($item)) { - return; - } - - // 关闭其他项 - if (_this.options.accordion) { - _this.$collapse.children('.' + _this.class_item_open).each(function () { - var $tmpItem = $(this); - - if ($tmpItem !== $item) { - _this.close($tmpItem); - } - }); - } - - var $content = $item.children('.' + _this.class_body); - - $content - .height($content[0].scrollHeight) - .transitionEnd(function () { - transitionEnd(_this, $content, $item); - }); - - componentEvent('open', _this.ns, _this, $item[0]); - - $item.addClass(_this.class_item_open); - }; - - /** - * 关闭指定项 - * @param item 面板项的索引号或 DOM 元素或 CSS 选择器 - */ - Collapse.prototype.close = function (item) { - var _this = this; - var $item = _this._getItem(item); - - if (!_this._isOpen($item)) { - return; - } - - var $content = $item.children('.' + _this.class_body); - - componentEvent('close', _this.ns, _this, $item[0]); - - $item.removeClass(_this.class_item_open); - - $content - .transition(0) - .height($content[0].scrollHeight) - .reflow() - .transition('') - .height('') - .transitionEnd(function () { - transitionEnd(_this, $content, $item); - }); - }; - - /** - * 切换指定项的状态 - * @param item 面板项的索引号或 DOM 元素或 CSS 选择器或 JQ 对象 - */ - Collapse.prototype.toggle = function (item) { - var _this = this; - var $item = _this._getItem(item); - - if (_this._isOpen($item)) { - _this.close($item); - } else { - _this.open($item); - } - }; - - /** - * 打开所有项 - */ - Collapse.prototype.openAll = function () { - var _this = this; - - _this.$collapse.children('.' + _this.class_item).each(function () { - var $tmpItem = $(this); - - if (!_this._isOpen($tmpItem)) { - _this.open($tmpItem); - } - }); - }; - - /** - * 关闭所有项 - */ - Collapse.prototype.closeAll = function () { - var _this = this; - - _this.$collapse.children('.' + _this.class_item).each(function () { - var $tmpItem = $(this); - - if (_this._isOpen($tmpItem)) { - _this.close($tmpItem); - } - }); - }; - - return Collapse; - })(); - - /** - * ============================================================================= - * ************ Collapse 折叠内容块插件 ************ - * ============================================================================= - */ - mdui.Collapse = (function () { - - function Collapse(selector, opts) { - return new CollapsePrivate(selector, opts, 'collapse'); - } - - return Collapse; - })(); - - - /** - * ============================================================================= - * ************ Collapse 自定义属性 ************ - * ============================================================================= - */ - - $(function () { - mdui.mutation('[mdui-collapse]', function () { - var $target = $(this); - - var inst = $target.data('mdui.collapse'); - if (!inst) { - var options = parseOptions($target.attr('mdui-collapse')); - inst = new mdui.Collapse($target, options); - $target.data('mdui.collapse', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ Table 表格 ************ - * ============================================================================= - */ - - (function () { - - /** - * 生成 checkbox 的 HTML 结构 - * @param tag - * @returns {string} - */ - var checkboxHTML = function (tag) { - return '<' + tag + ' class="mdui-table-cell-checkbox">' + - '' + - ''; - }; - - /** - * Table 表格 - * @param selector - * @constructor - */ - function Table(selector) { - var _this = this; - - _this.$table = $(selector).eq(0); - - if (!_this.$table.length) { - return; - } - - _this.init(); - } - - /** - * 初始化 - */ - Table.prototype.init = function () { - var _this = this; - - _this.$thRow = _this.$table.find('thead tr'); - _this.$tdRows = _this.$table.find('tbody tr'); - _this.$tdCheckboxs = $(); - _this.selectable = _this.$table.hasClass('mdui-table-selectable'); - _this.selectedRow = 0; - - _this._updateThCheckbox(); - _this._updateTdCheckbox(); - _this._updateNumericCol(); - }; - - /** - * 更新表头 checkbox 的状态 - */ - Table.prototype._updateThCheckboxStatus = function () { - var _this = this; - var checkbox = _this.$thCheckbox[0]; - - checkbox.checked = _this.selectedRow === _this.$tdRows.length; - checkbox.indeterminate = _this.selectedRow && _this.selectedRow !== _this.$tdRows.length; - }; - - /** - * 更新表格行的 checkbox - */ - Table.prototype._updateTdCheckbox = function () { - var _this = this; - - _this.$tdRows.each(function () { - var $tdRow = $(this); - - // 移除旧的 checkbox - $tdRow.find('.mdui-table-cell-checkbox').remove(); - - if (!_this.selectable) { - return; - } - - // 创建 DOM - var $checkbox = $(checkboxHTML('td')) - .prependTo($tdRow) - .find('input[type="checkbox"]'); - - // 默认选中的行 - if ($tdRow.hasClass('mdui-table-row-selected')) { - $checkbox[0].checked = true; - _this.selectedRow++; - } - - _this._updateThCheckboxStatus(); - - // 绑定事件 - $checkbox.on('change', function () { - if ($checkbox[0].checked) { - $tdRow.addClass('mdui-table-row-selected'); - _this.selectedRow++; - } else { - $tdRow.removeClass('mdui-table-row-selected'); - _this.selectedRow--; - } - - _this._updateThCheckboxStatus(); - }); - - _this.$tdCheckboxs = _this.$tdCheckboxs.add($checkbox); - }); - }; - - /** - * 更新表头的 checkbox - */ - Table.prototype._updateThCheckbox = function () { - var _this = this; - - // 移除旧的 checkbox - _this.$thRow.find('.mdui-table-cell-checkbox').remove(); - - if (!_this.selectable) { - return; - } - - _this.$thCheckbox = $(checkboxHTML('th')) - .prependTo(_this.$thRow) - .find('input[type="checkbox"]') - .on('change', function () { - - var isCheckedAll = _this.$thCheckbox[0].checked; - _this.selectedRow = isCheckedAll ? _this.$tdRows.length : 0; - - _this.$tdCheckboxs.each(function (i, checkbox) { - checkbox.checked = isCheckedAll; - }); - - _this.$tdRows.each(function (i, row) { - $(row)[isCheckedAll ? 'addClass' : 'removeClass']('mdui-table-row-selected'); - }); - }); - }; - - /** - * 更新数值列 - */ - Table.prototype._updateNumericCol = function () { - var _this = this; - var $th; - var $tdRow; - - _this.$thRow.find('th').each(function (i, th) { - $th = $(th); - - _this.$tdRows.each(function () { - $tdRow = $(this); - var method = $th.hasClass('mdui-table-col-numeric') ? 'addClass' : 'removeClass'; - $tdRow.find('td').eq(i)[method]('mdui-table-col-numeric'); - }); - }); - }; - - /** - * 初始化表格 - */ - mdui.mutation('.mdui-table', function () { - var $table = $(this); - if (!$table.data('mdui.table')) { - $table.data('mdui.table', new Table($table)); - } - }); - - /** - * 更新表格 - */ - mdui.updateTables = function () { - $(arguments.length ? arguments[0] : '.mdui-table').each(function () { - var $table = $(this); - var inst = $table.data('mdui.table'); - - if (inst) { - inst.init(); - } else { - $table.data('mdui.table', new Table($table)); - } - }); - }; - - })(); - - - /** - * ============================================================================= - * ************ 涟漪 ************ - * ============================================================================= - * - * Inspired by https://github.com/nolimits4web/Framework7/blob/master/src/js/fast-clicks.js - * https://github.com/nolimits4web/Framework7/blob/master/LICENSE - * - * Inspired by https://github.com/fians/Waves - */ - - (function () { - - var Ripple = { - - /** - * 延时,避免手指滑动时也触发涟漪(单位:毫秒) - */ - delay: 200, - - /** - * 显示涟漪动画 - * @param e - * @param $ripple - */ - show: function (e, $ripple) { - - // 鼠标右键不产生涟漪 - if (e.button === 2) { - return; - } - - // 点击位置坐标 - var tmp; - if ('touches' in e && e.touches.length) { - tmp = e.touches[0]; - } else { - tmp = e; - } - - var touchStartX = tmp.pageX; - var touchStartY = tmp.pageY; - - // 涟漪位置 - var offset = $ripple.offset(); - var center = { - x: touchStartX - offset.left, - y: touchStartY - offset.top, - }; - - var height = $ripple.innerHeight(); - var width = $ripple.innerWidth(); - var diameter = Math.max( - Math.pow((Math.pow(height, 2) + Math.pow(width, 2)), 0.5), 48 - ); - - // 涟漪扩散动画 - var translate = - 'translate3d(' + (-center.x + width / 2) + 'px, ' + (-center.y + height / 2) + 'px, 0) ' + - 'scale(1)'; - - // 涟漪的 DOM 结构 - $('
' + - '
') - - // 缓存动画效果 - .data('translate', translate) - - .prependTo($ripple) - .reflow() - .transform(translate); - }, - - /** - * 隐藏涟漪动画 - */ - hide: function (e, element) { - var $ripple = $(element || this); - - $ripple.children('.mdui-ripple-wave').each(function () { - removeRipple($(this)); - }); - - $ripple.off('touchmove touchend touchcancel mousemove mouseup mouseleave', Ripple.hide); - }, - }; - - /** - * 隐藏并移除涟漪 - * @param $wave - */ - function removeRipple($wave) { - if (!$wave.length || $wave.data('isRemoved')) { - return; - } - - $wave.data('isRemoved', true); - - var removeTimeout = setTimeout(function () { - $wave.remove(); - }, 400); - - var translate = $wave.data('translate'); - - $wave - .addClass('mdui-ripple-wave-fill') - .transform(translate.replace('scale(1)', 'scale(1.01)')) - .transitionEnd(function () { - clearTimeout(removeTimeout); - - $wave - .addClass('mdui-ripple-wave-out') - .transform(translate.replace('scale(1)', 'scale(1.01)')); - - removeTimeout = setTimeout(function () { - $wave.remove(); - }, 700); - - setTimeout(function () { - $wave.transitionEnd(function () { - clearTimeout(removeTimeout); - $wave.remove(); - }); - }, 0); - }); - } - - /** - * 显示涟漪,并绑定 touchend 等事件 - * @param e - */ - function showRipple(e) { - if (!TouchHandler.isAllow(e)) { - return; - } - - TouchHandler.register(e); - - // Chrome 59 点击滚动条时,会在 document 上触发事件 - if (e.target === document) { - return; - } - - var $ripple; - var $target = $(e.target); - - // 获取含 .mdui-ripple 类的元素 - if ($target.hasClass('mdui-ripple')) { - $ripple = $target; - } else { - $ripple = $target.parents('.mdui-ripple').eq(0); - } - - if ($ripple.length) { - - // 禁用状态的元素上不产生涟漪效果 - if ($ripple[0].disabled || $ripple.attr('disabled') !== null) { - return; - } - - if (e.type === 'touchstart') { - var hidden = false; - - // toucstart 触发指定时间后开始涟漪动画 - var timer = setTimeout(function () { - timer = null; - Ripple.show(e, $ripple); - }, Ripple.delay); - - var hideRipple = function (hideEvent) { - // 如果手指没有移动,且涟漪动画还没有开始,则开始涟漪动画 - if (timer) { - clearTimeout(timer); - timer = null; - Ripple.show(e, $ripple); - } - - if (!hidden) { - hidden = true; - Ripple.hide(hideEvent, $ripple); - } - }; - - // 手指移动后,移除涟漪动画 - var touchMove = function (moveEvent) { - if (timer) { - clearTimeout(timer); - timer = null; - } - - hideRipple(moveEvent); - }; - - $ripple - .on('touchmove', touchMove) - .on('touchend touchcancel', hideRipple); - - } else { - Ripple.show(e, $ripple); - $ripple.on('touchmove touchend touchcancel mousemove mouseup mouseleave', Ripple.hide); - } - } - } - - // 初始化绑定的事件 - $document - .on(TouchHandler.start, showRipple) - .on(TouchHandler.unlock, TouchHandler.register); - })(); - - - /** - * ============================================================================= - * ************ Text Field 文本框 ************ - * ============================================================================= - */ - - (function () { - - var getProp = function (obj, prop) { - return ( - typeof obj === 'object' && - obj !== null && - obj[prop] !== undefined && - obj[prop] - ) ? obj[prop] : false; - }; - - /** - * 输入框事件 - * @param e - */ - var inputEvent = function (e) { - var input = e.target; - var $input = $(input); - var event = e.type; - var value = $input.val(); - - // reInit 为 true 时,需要重新初始化文本框 - var reInit = getProp(e.detail, 'reInit'); - - // domLoadedEvent 为 true 时,为 DOM 加载完毕后自动触发的事件 - var domLoadedEvent = getProp(e.detail, 'domLoadedEvent'); - - // 文本框类型 - var type = $input.attr('type') || ''; - if (['checkbox', 'button', 'submit', 'range', 'radio', 'image'].indexOf(type) >= 0) { - return; - } - - var $textField = $input.parent('.mdui-textfield'); - - // 输入框是否聚焦 - if (event === 'focus') { - $textField.addClass('mdui-textfield-focus'); - } - - if (event === 'blur') { - $textField.removeClass('mdui-textfield-focus'); - } - - // 输入框是否为空 - if (event === 'blur' || event === 'input') { - $textField[(value && value !== '') ? 'addClass' : 'removeClass']('mdui-textfield-not-empty'); - } - - // 输入框是否禁用 - $textField[input.disabled ? 'addClass' : 'removeClass']('mdui-textfield-disabled'); - - // 表单验证 - if ((event === 'input' || event === 'blur') && !domLoadedEvent) { - if (input.validity) { - var method = input.validity.valid ? 'removeClass' : 'addClass'; - $textField[method]('mdui-textfield-invalid-html5'); - } - } - - // textarea 高度自动调整 - if (e.target.nodeName.toLowerCase() === 'textarea') { - - // IE bug:textarea 的值仅为多个换行,不含其他内容时,textarea 的高度不准确 - // 此时,在计算高度前,在值的开头加入一个空格,计算完后,移除空格 - var inputValue = $input.val(); - var hasExtraSpace = false; - if (inputValue.replace(/[\r\n]/g, '') === '') { - $input.val(' ' + inputValue); - hasExtraSpace = true; - } - - // 设置 textarea 高度 - $input.height(''); - var height = $input.height(); - var scrollHeight = input.scrollHeight; - - if (scrollHeight > height) { - $input.height(scrollHeight); - } - - // 计算完,还原 textarea 的值 - if (hasExtraSpace) { - $input.val(inputValue); - } - } - - // 实时字数统计 - if (reInit) { - $textField - .find('.mdui-textfield-counter') - .remove(); - } - - var maxlength = $input.attr('maxlength'); - if (maxlength) { - if (reInit || domLoadedEvent) { - $('
' + - ' / ' + maxlength + - '
').appendTo($textField); - } - - $textField.find('.mdui-textfield-counter-inputed').text(value.length.toString()); - } - - // 含 帮助文本、错误提示、字数统计 时,增加文本框底部内边距 - if ( - $textField.find('.mdui-textfield-helper').length || - $textField.find('.mdui-textfield-error').length || - maxlength - ) { - $textField.addClass('mdui-textfield-has-bottom'); - } - }; - - // 绑定事件 - $document.on('input focus blur', '.mdui-textfield-input', { useCapture: true }, inputEvent); - - // 可展开文本框展开 - $document.on('click', '.mdui-textfield-expandable .mdui-textfield-icon', function () { - $(this) - - // 展开文本框 - .parents('.mdui-textfield') - .addClass('mdui-textfield-expanded') - - // 聚焦到输入框 - .find('.mdui-textfield-input')[0].focus(); - }); - - // 可展开文本框关闭 - $document.on('click', '.mdui-textfield-expanded .mdui-textfield-close', function () { - $(this) - - // 关闭文本框 - .parents('.mdui-textfield') - .removeClass('mdui-textfield-expanded') - - // 清空输入框 - .find('.mdui-textfield-input') - .val(''); - }); - - /** - * 通过 JS 更新了表单内容,需要重新进行表单处理 - * @param- 如果传入了 .mdui-textfield 所在的 DOM 元素,则更新该文本框;否则,更新所有文本框 - */ - mdui.updateTextFields = function () { - $(arguments.length ? arguments[0] : '.mdui-textfield').each(function () { - $(this) - .find('.mdui-textfield-input') - .trigger('input', { - reInit: true, - }); - }); - }; - })(); - - $(function () { - /** - * 初始化文本框 - */ - mdui.mutation('.mdui-textfield', function () { - $(this) - .find('.mdui-textfield-input') - .trigger('input', { - domLoadedEvent: true, - }); - }); - }); - - - /** - * ============================================================================= - * ************ Slider 滑块 ************ - * ============================================================================= - */ - - (function () { - - /** - * 滑块的值变更后修改滑块样式 - * @param $slider - */ - var updateValueStyle = function ($slider) { - var data = $slider.data(); - - var $track = data.$track; - var $fill = data.$fill; - var $thumb = data.$thumb; - var $input = data.$input; - var min = data.min; - var max = data.max; - var isDisabled = data.disabled; - var isDiscrete = data.discrete; - var $thumbText = data.$thumbText; - var value = $input.val(); - var percent = (value - min) / (max - min) * 100; - - $fill.width(percent + '%'); - $track.width((100 - percent) + '%'); - - if (isDisabled) { - $fill.css('padding-right', '6px'); - $track.css('padding-left', '6px'); - } - - $thumb.css('left', percent + '%'); - - if (isDiscrete) { - $thumbText.text(value); - } - - $slider[parseFloat(percent) === 0 ? 'addClass' : 'removeClass']('mdui-slider-zero'); - }; - - /** - * 重新初始化 - * @param $slider - */ - var reInit = function ($slider) { - var $track = $('
'); - var $fill = $('
'); - var $thumb = $('
'); - var $input = $slider.find('input[type="range"]'); - - // 禁用状态 - var isDisabled = $input[0].disabled; - $slider[isDisabled ? 'addClass' : 'removeClass']('mdui-slider-disabled'); - - // 重新填充 HTML - $slider.find('.mdui-slider-track').remove(); - $slider.find('.mdui-slider-fill').remove(); - $slider.find('.mdui-slider-thumb').remove(); - $slider.append($track).append($fill).append($thumb); - - // 间续型滑块 - var isDiscrete = $slider.hasClass('mdui-slider-discrete'); - - var $thumbText; - if (isDiscrete) { - $thumbText = $(''); - $thumb.empty().append($thumbText); - } - - $slider.data({ - $track: $track, - $fill: $fill, - $thumb: $thumb, - $input: $input, - min: $input.attr('min'), // 滑块最小值 - max: $input.attr('max'), // 滑块最大值 - disabled: isDisabled, // 是否禁用状态 - discrete: isDiscrete, // 是否是间续型滑块 - $thumbText: $thumbText, // 间续型滑块的数值 - }); - - // 设置默认值 - updateValueStyle($slider); - }; - - var rangeSelector = '.mdui-slider input[type="range"]'; - - $document - - // 滑动滑块事件 - .on('input change', rangeSelector, function () { - var $slider = $(this).parent(); - updateValueStyle($slider); - }) - - // 开始触摸滑块事件 - .on(TouchHandler.start, rangeSelector, function (e) { - if (!TouchHandler.isAllow(e)) { - return; - } - - TouchHandler.register(e); - - if (!this.disabled) { - var $slider = $(this).parent(); - $slider.addClass('mdui-slider-focus'); - } - }) - - // 结束触摸滑块事件 - .on(TouchHandler.end, rangeSelector, function (e) { - if (!TouchHandler.isAllow(e)) { - return; - } - - if (!this.disabled) { - var $slider = $(this).parent(); - $slider.removeClass('mdui-slider-focus'); - } - }) - - .on(TouchHandler.unlock, rangeSelector, TouchHandler.register); - - /** - * 重新初始化滑块(强制重新初始化) - */ - mdui.updateSliders = function () { - $(arguments.length ? arguments[0] : '.mdui-slider').each(function () { - reInit($(this)); - }); - }; - - $(function () { - /** - * 页面加载完后自动初始化(未初始化时,可以调用该方法初始化) - */ - mdui.mutation('.mdui-slider', function () { - reInit($(this)); - }); - }); - })(); - - - /** - * ============================================================================= - * ************ Fab 浮动操作按钮 ************ - * ============================================================================= - */ - - mdui.Fab = (function () { - - /** - * 默认参数 - * @type {{}} - */ - var DEFAULT = { - trigger: 'hover', // 触发方式 ['hover', 'click'] - }; - - /** - * 浮动操作按钮实例 - * @param selector 选择器或 HTML 字符串或 DOM 元素或 JQ 对象 - * @param opts - * @constructor - */ - function Fab(selector, opts) { - var _this = this; - - _this.$fab = $(selector).eq(0); - if (!_this.$fab.length) { - return; - } - - // 已通过 data 属性实例化过,不再重复实例化 - var oldInst = _this.$fab.data('mdui.fab'); - if (oldInst) { - return oldInst; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - _this.state = 'closed'; - - _this.$btn = _this.$fab.find('.mdui-fab'); - _this.$dial = _this.$fab.find('.mdui-fab-dial'); - _this.$dialBtns = _this.$dial.find('.mdui-fab'); - - if (_this.options.trigger === 'hover') { - _this.$btn - .on('touchstart mouseenter', function () { - _this.open(); - }); - - _this.$fab - .on('mouseleave', function () { - _this.close(); - }); - } - - if (_this.options.trigger === 'click') { - _this.$btn - .on(TouchHandler.start, function () { - _this.open(); - }); - } - - // 触摸屏幕其他地方关闭快速拨号 - $document.on(TouchHandler.start, function (e) { - if (!$(e.target).parents('.mdui-fab-wrapper').length) { - _this.close(); - } - }); - } - - /** - * 打开菜单 - */ - Fab.prototype.open = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - // 为菜单中的按钮添加不同的 transition-delay - _this.$dialBtns.each(function (index, btn) { - btn.style['transition-delay'] = btn.style['-webkit-transition-delay'] = - 15 * (_this.$dialBtns.length - index) + 'ms'; - }); - - _this.$dial - .css('height', 'auto') - .addClass('mdui-fab-dial-show'); - - // 如果按钮中存在 .mdui-fab-opened 的图标,则进行图标切换 - if (_this.$btn.find('.mdui-fab-opened').length) { - _this.$btn.addClass('mdui-fab-opened'); - } - - _this.state = 'opening'; - componentEvent('open', 'fab', _this, _this.$fab); - - // 打开顺序为从下到上逐个打开,最上面的打开后才表示动画完成 - _this.$dialBtns.eq(0).transitionEnd(function () { - if (_this.$btn.hasClass('mdui-fab-opened')) { - _this.state = 'opened'; - componentEvent('opened', 'fab', _this, _this.$fab); - } - }); - }; - - /** - * 关闭菜单 - */ - Fab.prototype.close = function () { - var _this = this; - - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - // 为菜单中的按钮添加不同的 transition-delay - _this.$dialBtns.each(function (index, btn) { - btn.style['transition-delay'] = btn.style['-webkit-transition-delay'] = 15 * index + 'ms'; - }); - - _this.$dial.removeClass('mdui-fab-dial-show'); - _this.$btn.removeClass('mdui-fab-opened'); - _this.state = 'closing'; - componentEvent('close', 'fab', _this, _this.$fab); - - // 从上往下依次关闭,最后一个关闭后才表示动画完成 - _this.$dialBtns.eq(-1).transitionEnd(function () { - if (!_this.$btn.hasClass('mdui-fab-opened')) { - _this.state = 'closed'; - componentEvent('closed', 'fab', _this, _this.$fab); - _this.$dial.css('height', 0); - } - }); - }; - - /** - * 切换菜单的打开状态 - */ - Fab.prototype.toggle = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } else if (_this.state === 'closing' || _this.state === 'closed') { - _this.open(); - } - }; - - /** - * 获取当前菜单状态 - * @returns {'opening'|'opened'|'closing'|'closed'} - */ - Fab.prototype.getState = function () { - return this.state; - }; - - /** - * 以动画的形式显示浮动操作按钮 - */ - Fab.prototype.show = function () { - this.$fab.removeClass('mdui-fab-hide'); - }; - - /** - * 以动画的形式隐藏浮动操作按钮 - */ - Fab.prototype.hide = function () { - this.$fab.addClass('mdui-fab-hide'); - }; - - return Fab; - })(); - - - /** - * ============================================================================= - * ************ Fab DATA API ************ - * ============================================================================= - */ - - $(function () { - // mouseenter 不冒泡,无法进行事件委托,这里用 mouseover 代替。 - // 不管是 click 、 mouseover 还是 touchstart ,都先初始化。 - - $document.on('touchstart mousedown mouseover', '[mdui-fab]', function (e) { - var $this = $(this); - - var inst = $this.data('mdui.fab'); - if (!inst) { - var options = parseOptions($this.attr('mdui-fab')); - inst = new mdui.Fab($this, options); - $this.data('mdui.fab', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ Select 下拉选择 ************ - * ============================================================================= - */ - - mdui.Select = (function () { - - /** - * 默认参数 - */ - var DEFAULT = { - position: 'auto', // 下拉框位置,auto、bottom、top - gutter: 16, // 菜单与窗口上下边框至少保持多少间距 - }; - - /** - * 调整菜单位置 - * @param _this Select 实例 - */ - var readjustMenu = function (_this) { - // 窗口高度 - var windowHeight = $window.height(); - - // 配置参数 - var gutter = _this.options.gutter; - var position = _this.options.position; - - // mdui-select 高度 - var selectHeight = parseInt(_this.$select.height()); - - // 菜单项高度 - var $menuItemFirst = _this.$items.eq(0); - var menuItemHeight = parseInt($menuItemFirst.height()); - var menuItemMargin = parseInt($menuItemFirst.css('margin-top')); - - // 菜单高度 - var menuWidth = parseFloat(_this.$select.width() + 0.01); // 必须比真实宽度多一点,不然会出现省略号 - var menuHeight = menuItemHeight * _this.size + menuItemMargin * 2; - - // var menuRealHeight = menuItemHeight * _this.$items.length + menuItemMargin * 2; - - // 菜单是否出现了滚动条 - //var isMenuScrollable = menuRealHeight > menuHeight; - - // select 在窗口中的位置 - var selectTop = _this.$select[0].getBoundingClientRect().top; - - var transformOriginY; - var menuMarginTop; - - // position 为 auto 时 - if (position === 'auto') { - - // 菜单高度不能超过窗口高度 - var heightTemp = windowHeight - gutter * 2; - if (menuHeight > heightTemp) { - menuHeight = heightTemp; - } - - // 菜单的 margin-top - menuMarginTop = -( - menuItemMargin + _this.selectedIndex * menuItemHeight + - (menuItemHeight - selectHeight) / 2 - ); - var menuMarginTopMax = -( - menuItemMargin + (_this.size - 1) * menuItemHeight + - (menuItemHeight - selectHeight) / 2 - ); - if (menuMarginTop < menuMarginTopMax) { - menuMarginTop = menuMarginTopMax; - } - - // 菜单不能超出窗口 - var menuTop = selectTop + menuMarginTop; - - if (menuTop < gutter) { - // 不能超出窗口上方 - menuMarginTop = -(selectTop - gutter); - } else if (menuTop + menuHeight + gutter > windowHeight) { - // 不能超出窗口下方 - menuMarginTop = -(selectTop + menuHeight + gutter - windowHeight); - } - - // transform 的 Y 轴坐标 - transformOriginY = (_this.selectedIndex * menuItemHeight + menuItemHeight / 2 + menuItemMargin) + 'px'; - } else if (position === 'bottom') { - menuMarginTop = selectHeight; - transformOriginY = '0px'; - } else if (position === 'top') { - menuMarginTop = -menuHeight - 1; - transformOriginY = '100%'; - } - - // 设置样式 - _this.$select.width(menuWidth); - _this.$menu - .width(menuWidth) - .height(menuHeight) - .css({ - 'margin-top': menuMarginTop + 'px', - 'transform-origin': - 'center ' + transformOriginY + ' 0', - }); - }; - - /** - * 下拉选择 - * @param selector - * @param opts - * @constructor - */ - function Select(selector, opts) { - var _this = this; - - var $selectNative = _this.$selectNative = $(selector).eq(0); - if (!$selectNative.length) { - return; - } - - // 已通过自定义属性实例化过,不再重复实例化 - var oldInst = $selectNative.data('mdui.select'); - if (oldInst) { - return oldInst; - } - - $selectNative.hide(); - - _this.options = $.extend({}, DEFAULT, (opts || {})); - - // 为当前 select 生成唯一 ID - _this.uniqueID = $.guid(); - - _this.state = 'closed'; - - // 生成 select - _this.handleUpdate(); - - // 点击 select 外面区域关闭 - $document.on('click touchstart', function (e) { - var $target = $(e.target); - if ( - (_this.state === 'opening' || _this.state === 'opened') && - !$target.is(_this.$select) && - !$.contains(_this.$select[0], $target[0]) - ) { - _this.close(); - } - }); - } - - /** - * 对原生 select 组件进行了修改后,需要调用该方法 - */ - Select.prototype.handleUpdate = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } - - var $selectNative = _this.$selectNative; - - // 当前的值和文本 - _this.value = $selectNative.val(); - _this.text = ''; - - // 生成 HTML - // 菜单项 - _this.$items = $(); - $selectNative.find('option').each(function (index, option) { - var data = { - value: option.value, - text: option.textContent, - disabled: option.disabled, - selected: _this.value === option.value, - index: index, - }; - - if (_this.value === data.value) { - _this.text = data.text; - _this.selectedIndex = index; - } - - _this.$items = _this.$items.add( - $('
' + data.text + '
') - .data(data) - ); - }); - - // selected - _this.$selected = $('' + _this.text + ''); - - // select - _this.$select = - $( - '
' - ) - .show() - .append(_this.$selected); - - // menu - _this.$menu = - $('
') - .appendTo(_this.$select) - .append(_this.$items); - - $('#' + _this.uniqueID).remove(); - $selectNative.after(_this.$select); - - // 根据 select 的 size 属性设置高度,默认为 6 - _this.size = parseInt(_this.$selectNative.attr('size')); - - if (!_this.size || _this.size < 0) { - _this.size = _this.$items.length; - if (_this.size > 8) { - _this.size = 8; - } - } - - // 点击选项时关闭下拉菜单 - _this.$items.on('click', function () { - if (_this.state === 'closing') { - return; - } - - var $item = $(this); - - if ($item.data('disabled')) { - return; - } - - var itemData = $item.data(); - - _this.$selected.text(itemData.text); - $selectNative.val(itemData.value); - _this.$items.removeAttr('selected'); - $item.attr('selected', ''); - _this.selectedIndex = itemData.index; - _this.value = itemData.value; - _this.text = itemData.text; - $selectNative.trigger('change'); - - _this.close(); - }); - - // 点击 select 时打开下拉菜单 - _this.$select.on('click', function (e) { - var $target = $(e.target); - - // 在菜单上点击时不打开 - if ($target.is('.mdui-select-menu') || $target.is('.mdui-select-menu-item')) { - return; - } - - _this.toggle(); - }); - }; - - /** - * 动画结束回调 - * @param inst - */ - var transitionEnd = function (inst) { - inst.$select.removeClass('mdui-select-closing'); - - if (inst.state === 'opening') { - inst.state = 'opened'; - componentEvent('opened', 'select', inst, inst.$selectNative); - - inst.$menu.css('overflow-y', 'auto'); - } - - if (inst.state === 'closing') { - inst.state = 'closed'; - componentEvent('closed', 'select', inst, inst.$selectNative); - - // 恢复样式 - inst.$select.width(''); - inst.$menu.css({ - 'margin-top': '', - height: '', - width: '', - }); - } - }; - - /** - * 打开 Select - */ - Select.prototype.open = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - _this.state = 'opening'; - componentEvent('open', 'select', _this, _this.$selectNative); - - readjustMenu(_this); - - _this.$select.addClass('mdui-select-open'); - - _this.$menu.transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 关闭 Select - */ - Select.prototype.close = function () { - var _this = this; - - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - _this.state = 'closing'; - componentEvent('close', 'select', _this, _this.$selectNative); - - _this.$menu.css('overflow-y', ''); - - _this.$select - .removeClass('mdui-select-open') - .addClass('mdui-select-closing'); - _this.$menu.transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 切换 Select 显示状态 - */ - Select.prototype.toggle = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } else if (_this.state === 'closing' || _this.state === 'closed') { - _this.open(); - } - }; - - return Select; - })(); - - - /** - * ============================================================================= - * ************ Select 下拉选择 ************ - * ============================================================================= - */ - - $(function () { - mdui.mutation('[mdui-select]', function () { - var $this = $(this); - var inst = $this.data('mdui.select'); - if (!inst) { - inst = new mdui.Select($this, parseOptions($this.attr('mdui-select'))); - $this.data('mdui.select', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ Appbar ************ - * ============================================================================= - * 滚动时自动隐藏应用栏 - * mdui-appbar-scroll-hide - * mdui-appbar-scroll-toolbar-hide - */ - - $(function () { - // 滚动时隐藏应用栏 - mdui.mutation('.mdui-appbar-scroll-hide', function () { - var $this = $(this); - $this.data('mdui.headroom', new mdui.Headroom($this)); - }); - - // 滚动时只隐藏应用栏中的工具栏 - mdui.mutation('.mdui-appbar-scroll-toolbar-hide', function () { - var $this = $(this); - var inst = new mdui.Headroom($this, { - pinnedClass: 'mdui-headroom-pinned-toolbar', - unpinnedClass: 'mdui-headroom-unpinned-toolbar', - }); - $this.data('mdui.headroom', inst); - }); - }); - - - /** - * ============================================================================= - * ************ Tab ************ - * ============================================================================= - */ - - mdui.Tab = (function () { - - var DEFAULT = { - trigger: 'click', // 触发方式 click: 鼠标点击切换 hover: 鼠标悬浮切换 - //animation: false, // 切换时是否显示动画 - loop: false, // 为true时,在最后一个选项卡时调用 next() 方法会回到第一个选项卡 - }; - - // 元素是否已禁用 - var isDisabled = function ($ele) { - return $ele[0].disabled || $ele.attr('disabled') !== null; - }; - - /** - * 选项卡 - * @param selector - * @param opts - * @returns {*} - * @constructor - */ - function Tab(selector, opts) { - var _this = this; - - _this.$tab = $(selector).eq(0); - if (!_this.$tab.length) { - return; - } - - // 已通过自定义属性实例化过,不再重复实例化 - var oldInst = _this.$tab.data('mdui.tab'); - if (oldInst) { - return oldInst; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - _this.$tabs = _this.$tab.children('a'); - _this.$indicator = $('
').appendTo(_this.$tab); - _this.activeIndex = false; // 为 false 时表示没有激活的选项卡,或不存在选项卡 - - // 根据 url hash 获取默认激活的选项卡 - var hash = location.hash; - if (hash) { - _this.$tabs.each(function (i, tab) { - if ($(tab).attr('href') === hash) { - _this.activeIndex = i; - return false; - } - }); - } - - // 含 mdui-tab-active 的元素默认激活 - if (_this.activeIndex === false) { - _this.$tabs.each(function (i, tab) { - if ($(tab).hasClass('mdui-tab-active')) { - _this.activeIndex = i; - return false; - } - }); - } - - // 存在选项卡时,默认激活第一个选项卡 - if (_this.$tabs.length && _this.activeIndex === false) { - _this.activeIndex = 0; - } - - // 设置激活状态选项卡 - _this._setActive(); - - // 监听窗口大小变化事件,调整指示器位置 - $window.on('resize', $.throttle(function () { - _this._setIndicatorPosition(); - }, 100)); - - // 监听点击选项卡事件 - _this.$tabs.each(function (i, tab) { - _this._bindTabEvent(tab); - }); - } - - /** - * 绑定在 Tab 上点击或悬浮的事件 - * @private - */ - Tab.prototype._bindTabEvent = function (tab) { - var _this = this; - var $tab = $(tab); - - // 点击或鼠标移入触发的事件 - var clickEvent = function (e) { - // 禁用状态的选项无法选中 - if (isDisabled($tab)) { - e.preventDefault(); - return; - } - - _this.activeIndex = _this.$tabs.index(tab); - _this._setActive(); - }; - - // 无论 trigger 是 click 还是 hover,都会响应 click 事件 - $tab.on('click', clickEvent); - - // trigger 为 hover 时,额外响应 mouseenter 事件 - if (_this.options.trigger === 'hover') { - $tab.on('mouseenter', clickEvent); - } - - $tab.on('click', function (e) { - // 阻止链接的默认点击动作 - if ($tab.attr('href').indexOf('#') === 0) { - e.preventDefault(); - } - }); - }; - - /** - * 设置激活状态的选项卡 - * @private - */ - Tab.prototype._setActive = function () { - var _this = this; - - _this.$tabs.each(function (i, tab) { - var $tab = $(tab); - var targetId = $tab.attr('href'); - - // 设置选项卡激活状态 - if (i === _this.activeIndex && !isDisabled($tab)) { - if (!$tab.hasClass('mdui-tab-active')) { - componentEvent('change', 'tab', _this, _this.$tab, { - index: _this.activeIndex, - id: targetId.substr(1), - }); - componentEvent('show', 'tab', _this, $tab); - - $tab.addClass('mdui-tab-active'); - } - - $(targetId).show(); - _this._setIndicatorPosition(); - } else { - $tab.removeClass('mdui-tab-active'); - $(targetId).hide(); - } - }); - }; - - /** - * 设置选项卡指示器的位置 - */ - Tab.prototype._setIndicatorPosition = function () { - var _this = this; - var $activeTab; - var activeTabOffset; - - // 选项卡数量为 0 时,不显示指示器 - if (_this.activeIndex === false) { - _this.$indicator.css({ - left: 0, - width: 0, - }); - - return; - } - - $activeTab = _this.$tabs.eq(_this.activeIndex); - if (isDisabled($activeTab)) { - return; - } - - activeTabOffset = $activeTab.offset(); - _this.$indicator.css({ - left: activeTabOffset.left + _this.$tab[0].scrollLeft - - _this.$tab[0].getBoundingClientRect().left + 'px', - width: $activeTab.width() + 'px', - }); - }; - - /** - * 切换到下一个选项卡 - */ - Tab.prototype.next = function () { - var _this = this; - - if (_this.activeIndex === false) { - return; - } - - if (_this.$tabs.length > _this.activeIndex + 1) { - _this.activeIndex++; - } else if (_this.options.loop) { - _this.activeIndex = 0; - } - - _this._setActive(); - }; - - /** - * 切换到上一个选项卡 - */ - Tab.prototype.prev = function () { - var _this = this; - - if (_this.activeIndex === false) { - return; - } - - if (_this.activeIndex > 0) { - _this.activeIndex--; - } else if (_this.options.loop) { - _this.activeIndex = _this.$tabs.length - 1; - } - - _this._setActive(); - }; - - /** - * 显示指定序号或指定id的选项卡 - * @param index 从0开始的序号,或以#开头的id - */ - Tab.prototype.show = function (index) { - var _this = this; - - if (_this.activeIndex === false) { - return; - } - - if (parseInt(index) === index) { - _this.activeIndex = index; - } else { - _this.$tabs.each(function (i, tab) { - if (tab.id === index) { - _this.activeIndex = i; - return false; - } - }); - } - - _this._setActive(); - }; - - /** - * 在父元素的宽度变化时,需要调用该方法重新调整指示器位置 - * 在添加或删除选项卡时,需要调用该方法 - */ - Tab.prototype.handleUpdate = function () { - var _this = this; - - var $oldTabs = _this.$tabs; // 旧的 tabs JQ对象 - var $newTabs = _this.$tab.children('a'); // 新的 tabs JQ对象 - var oldTabsEle = $oldTabs.get(); // 旧 tabs 的元素数组 - var newTabsEle = $newTabs.get(); // 新的 tabs 元素数组 - - if (!$newTabs.length) { - _this.activeIndex = false; - _this.$tabs = $newTabs; - _this._setIndicatorPosition(); - - return; - } - - // 重新遍历选项卡,找出新增的选项卡 - $newTabs.each(function (i, tab) { - // 有新增的选项卡 - if (oldTabsEle.indexOf(tab) < 0) { - _this._bindTabEvent(tab); - - if (_this.activeIndex === false) { - _this.activeIndex = 0; - } else if (i <= _this.activeIndex) { - _this.activeIndex++; - } - } - }); - - // 找出被移除的选项卡 - $oldTabs.each(function (i, tab) { - // 有被移除的选项卡 - if (newTabsEle.indexOf(tab) < 0) { - - if (i < _this.activeIndex) { - _this.activeIndex--; - } else if (i === _this.activeIndex) { - _this.activeIndex = 0; - } - } - }); - - _this.$tabs = $newTabs; - - _this._setActive(); - }; - - return Tab; - })(); - - - /** - * ============================================================================= - * ************ Tab 自定义属性 API ************ - * ============================================================================= - */ - - $(function () { - mdui.mutation('[mdui-tab]', function () { - var $this = $(this); - var inst = $this.data('mdui.tab'); - if (!inst) { - inst = new mdui.Tab($this, parseOptions($this.attr('mdui-tab'))); - $this.data('mdui.tab', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ Drawer 抽屉栏 ************ - * ============================================================================= - * - * 在桌面设备上默认显示抽屉栏,不显示遮罩层 - * 在手机和平板设备上默认不显示抽屉栏,始终显示遮罩层,且覆盖导航栏 - */ - - mdui.Drawer = (function () { - - /** - * 默认参数 - * @type {{}} - */ - var DEFAULT = { - // 在桌面设备上是否显示遮罩层。手机和平板不受这个参数影响,始终会显示遮罩层 - overlay: false, - - // 是否开启手势 - swipe: false, - }; - - var isDesktop = function () { - return $window.width() >= 1024; - }; - - /** - * 抽屉栏实例 - * @param selector 选择器或 HTML 字符串或 DOM 元素 - * @param opts - * @constructor - */ - function Drawer(selector, opts) { - var _this = this; - - _this.$drawer = $(selector).eq(0); - if (!_this.$drawer.length) { - return; - } - - var oldInst = _this.$drawer.data('mdui.drawer'); - if (oldInst) { - return oldInst; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - - _this.overlay = false; // 是否显示着遮罩层 - _this.position = _this.$drawer.hasClass('mdui-drawer-right') ? 'right' : 'left'; - - if (_this.$drawer.hasClass('mdui-drawer-close')) { - _this.state = 'closed'; - } else if (_this.$drawer.hasClass('mdui-drawer-open')) { - _this.state = 'opened'; - } else if (isDesktop()) { - _this.state = 'opened'; - } else { - _this.state = 'closed'; - } - - // 浏览器窗口大小调整时 - $window.on('resize', $.throttle(function () { - // 由手机平板切换到桌面时 - if (isDesktop()) { - // 如果显示着遮罩,则隐藏遮罩 - if (_this.overlay && !_this.options.overlay) { - $.hideOverlay(); - _this.overlay = false; - $.unlockScreen(); - } - - // 没有强制关闭,则状态为打开状态 - if (!_this.$drawer.hasClass('mdui-drawer-close')) { - _this.state = 'opened'; - } - } - - // 由桌面切换到手机平板时。如果抽屉栏是打开着的且没有遮罩层,则关闭抽屉栏 - else { - if (!_this.overlay && _this.state === 'opened') { - // 抽屉栏处于强制打开状态,添加遮罩 - if (_this.$drawer.hasClass('mdui-drawer-open')) { - $.showOverlay(); - _this.overlay = true; - $.lockScreen(); - - $('.mdui-overlay').one('click', function () { - _this.close(); - }); - } else { - _this.state = 'closed'; - } - } - } - }, 100)); - - // 绑定关闭按钮事件 - _this.$drawer.find('[mdui-drawer-close]').each(function () { - $(this).on('click', function () { - _this.close(); - }); - }); - - swipeSupport(_this); - } - - /** - * 滑动手势支持 - * @param _this - */ - var swipeSupport = function (_this) { - // 抽屉栏滑动手势控制 - var openNavEventHandler; - var touchStartX; - var touchStartY; - var swipeStartX; - var swiping = false; - var maybeSwiping = false; - var $body = $('body'); - - // 手势触发的范围 - var swipeAreaWidth = 24; - - function enableSwipeHandling() { - if (!openNavEventHandler) { - $body.on('touchstart', onBodyTouchStart); - openNavEventHandler = onBodyTouchStart; - } - } - - function setPosition(translateX, closeTransform) { - var rtlTranslateMultiplier = _this.position === 'right' ? -1 : 1; - var transformCSS = 'translate(' + (-1 * rtlTranslateMultiplier * translateX) + 'px, 0) !important;'; - _this.$drawer.css( - 'cssText', - 'transform:' + transformCSS + (closeTransform ? 'transition: initial !important;' : '') - ); - } - - function cleanPosition() { - _this.$drawer.css({ - transform: '', - transition: '', - }); - } - - function getMaxTranslateX() { - return _this.$drawer.width() + 10; - } - - function getTranslateX(currentX) { - return Math.min( - Math.max( - swiping === 'closing' ? (swipeStartX - currentX) : (getMaxTranslateX() + swipeStartX - currentX), - 0 - ), - getMaxTranslateX() - ); - } - - function onBodyTouchStart(event) { - touchStartX = event.touches[0].pageX; - if (_this.position === 'right') { - touchStartX = $body.width() - touchStartX; - } - - touchStartY = event.touches[0].pageY; - - if (_this.state !== 'opened') { - if (touchStartX > swipeAreaWidth || openNavEventHandler !== onBodyTouchStart) { - return; - } - } - - maybeSwiping = true; - - $body.on({ - touchmove: onBodyTouchMove, - touchend: onBodyTouchEnd, - touchcancel: onBodyTouchMove, - }); - } - - function onBodyTouchMove(event) { - var touchX = event.touches[0].pageX; - if (_this.position === 'right') { - touchX = $body.width() - touchX; - } - - var touchY = event.touches[0].pageY; - - if (swiping) { - setPosition(getTranslateX(touchX), true); - } else if (maybeSwiping) { - var dXAbs = Math.abs(touchX - touchStartX); - var dYAbs = Math.abs(touchY - touchStartY); - var threshold = 8; - - if (dXAbs > threshold && dYAbs <= threshold) { - swipeStartX = touchX; - swiping = _this.state === 'opened' ? 'closing' : 'opening'; - $.lockScreen(); - setPosition(getTranslateX(touchX), true); - } else if (dXAbs <= threshold && dYAbs > threshold) { - onBodyTouchEnd(); - } - } - } - - function onBodyTouchEnd(event) { - if (swiping) { - var touchX = event.changedTouches[0].pageX; - if (_this.position === 'right') { - touchX = $body.width() - touchX; - } - - var translateRatio = getTranslateX(touchX) / getMaxTranslateX(); - - maybeSwiping = false; - var swipingState = swiping; - swiping = null; - - if (swipingState === 'opening') { - if (translateRatio < 0.92) { - cleanPosition(); - _this.open(); - } else { - cleanPosition(); - } - } else { - if (translateRatio > 0.08) { - cleanPosition(); - _this.close(); - } else { - cleanPosition(); - } - } - - $.unlockScreen(); - } else { - maybeSwiping = false; - } - - $body.off({ - touchmove: onBodyTouchMove, - touchend: onBodyTouchEnd, - touchcancel: onBodyTouchMove, - }); - } - - if (_this.options.swipe) { - enableSwipeHandling(); - } - }; - - /** - * 动画结束回调 - * @param inst - */ - var transitionEnd = function (inst) { - if (inst.$drawer.hasClass('mdui-drawer-open')) { - inst.state = 'opened'; - componentEvent('opened', 'drawer', inst, inst.$drawer); - } else { - inst.state = 'closed'; - componentEvent('closed', 'drawer', inst, inst.$drawer); - } - }; - - /** - * 打开抽屉栏 - */ - Drawer.prototype.open = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - _this.state = 'opening'; - componentEvent('open', 'drawer', _this, _this.$drawer); - - if (!_this.options.overlay) { - $('body').addClass('mdui-drawer-body-' + _this.position); - } - - _this.$drawer - .removeClass('mdui-drawer-close') - .addClass('mdui-drawer-open') - .transitionEnd(function () { - transitionEnd(_this); - }); - - if (!isDesktop() || _this.options.overlay) { - _this.overlay = true; - $.showOverlay().one('click', function () { - _this.close(); - }); - - $.lockScreen(); - } - }; - - /** - * 关闭抽屉栏 - */ - Drawer.prototype.close = function () { - var _this = this; - - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - _this.state = 'closing'; - componentEvent('close', 'drawer', _this, _this.$drawer); - - if (!_this.options.overlay) { - $('body').removeClass('mdui-drawer-body-' + _this.position); - } - - _this.$drawer - .addClass('mdui-drawer-close') - .removeClass('mdui-drawer-open') - .transitionEnd(function () { - transitionEnd(_this); - }); - - if (_this.overlay) { - $.hideOverlay(); - _this.overlay = false; - $.unlockScreen(); - } - }; - - /** - * 切换抽屉栏打开/关闭状态 - */ - Drawer.prototype.toggle = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } else if (_this.state === 'closing' || _this.state === 'closed') { - _this.open(); - } - }; - - /** - * 获取抽屉栏状态 - * @returns {'opening'|'opened'|'closing'|'closed'} - */ - Drawer.prototype.getState = function () { - return this.state; - }; - - return Drawer; - - })(); - - - /** - * ============================================================================= - * ************ Drawer 自定义属性 API ************ - * ============================================================================= - */ - - $(function () { - mdui.mutation('[mdui-drawer]', function () { - var $this = $(this); - var options = parseOptions($this.attr('mdui-drawer')); - var selector = options.target; - delete options.target; - - var $drawer = $(selector).eq(0); - - var inst = $drawer.data('mdui.drawer'); - if (!inst) { - inst = new mdui.Drawer($drawer, options); - $drawer.data('mdui.drawer', inst); - } - - $this.on('click', function () { - inst.toggle(); - }); - - }); - }); - - - /** - * ============================================================================= - * ************ Dialog 对话框 ************ - * ============================================================================= - */ - - mdui.Dialog = (function () { - - /** - * 默认参数 - */ - var DEFAULT = { - history: true, // 监听 hashchange 事件 - overlay: true, // 打开对话框时是否显示遮罩 - modal: false, // 是否模态化对话框,为 false 时点击对话框外面区域关闭对话框,为 true 时不关闭 - closeOnEsc: true, // 按下 esc 关闭对话框 - closeOnCancel: true, // 按下取消按钮时关闭对话框 - closeOnConfirm: true, // 按下确认按钮时关闭对话框 - destroyOnClosed: false, // 关闭后销毁 - }; - - /** - * 遮罩层元素 - */ - var $overlay; - - /** - * 窗口是否已锁定 - */ - var isLockScreen; - - /** - * 当前对话框实例 - */ - var currentInst; - - /** - * 队列名 - */ - var queueName = '__md_dialog'; - - /** - * 窗口宽度变化,或对话框内容变化时,调整对话框位置和对话框内的滚动条 - */ - var readjust = function () { - if (!currentInst) { - return; - } - - var $dialog = currentInst.$dialog; - - var $dialogTitle = $dialog.children('.mdui-dialog-title'); - var $dialogContent = $dialog.children('.mdui-dialog-content'); - var $dialogActions = $dialog.children('.mdui-dialog-actions'); - - // 调整 dialog 的 top 和 height 值 - $dialog.height(''); - $dialogContent.height(''); - - var dialogHeight = $dialog.height(); - $dialog.css({ - top: (($window.height() - dialogHeight) / 2) + 'px', - height: dialogHeight + 'px', - }); - - // 调整 mdui-dialog-content 的高度 - $dialogContent.height(dialogHeight - ($dialogTitle.height() || 0) - ($dialogActions.height() || 0)); - }; - - /** - * hashchange 事件触发时关闭对话框 - */ - var hashchangeEvent = function () { - if (location.hash.substring(1).indexOf('mdui-dialog') < 0) { - currentInst.close(true); - } - }; - - /** - * 点击遮罩层关闭对话框 - * @param e - */ - var overlayClick = function (e) { - if ($(e.target).hasClass('mdui-overlay') && currentInst) { - currentInst.close(); - } - }; - - /** - * 对话框实例 - * @param selector 选择器或 HTML 字符串或 DOM 元素 - * @param opts - * @constructor - */ - function Dialog(selector, opts) { - var _this = this; - - // 对话框元素 - _this.$dialog = $(selector).eq(0); - if (!_this.$dialog.length) { - return; - } - - // 已通过 data 属性实例化过,不再重复实例化 - var oldInst = _this.$dialog.data('mdui.dialog'); - if (oldInst) { - return oldInst; - } - - // 如果对话框元素没有在当前文档中,则需要添加 - if (!$.contains(document.body, _this.$dialog[0])) { - _this.append = true; - $('body').append(_this.$dialog); - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - _this.state = 'closed'; - - // 绑定取消按钮事件 - _this.$dialog.find('[mdui-dialog-cancel]').each(function () { - $(this).on('click', function () { - componentEvent('cancel', 'dialog', _this, _this.$dialog); - if (_this.options.closeOnCancel) { - _this.close(); - } - }); - }); - - // 绑定确认按钮事件 - _this.$dialog.find('[mdui-dialog-confirm]').each(function () { - $(this).on('click', function () { - componentEvent('confirm', 'dialog', _this, _this.$dialog); - if (_this.options.closeOnConfirm) { - _this.close(); - } - }); - }); - - // 绑定关闭按钮事件 - _this.$dialog.find('[mdui-dialog-close]').each(function () { - $(this).on('click', function () { - _this.close(); - }); - }); - } - - /** - * 动画结束回调 - * @param inst - */ - var transitionEnd = function (inst) { - if (inst.$dialog.hasClass('mdui-dialog-open')) { - inst.state = 'opened'; - componentEvent('opened', 'dialog', inst, inst.$dialog); - } else { - inst.state = 'closed'; - componentEvent('closed', 'dialog', inst, inst.$dialog); - - inst.$dialog.hide(); - - // 所有对话框都关闭,且当前没有打开的对话框时,解锁屏幕 - if (queue.queue(queueName).length === 0 && !currentInst && isLockScreen) { - $.unlockScreen(); - isLockScreen = false; - } - - $window.off('resize', $.throttle(function () { - readjust(); - }, 100)); - - if (inst.options.destroyOnClosed) { - inst.destroy(); - } - } - }; - - /** - * 打开指定对话框 - * @private - */ - Dialog.prototype._doOpen = function () { - var _this = this; - - currentInst = _this; - - if (!isLockScreen) { - $.lockScreen(); - isLockScreen = true; - } - - _this.$dialog.show(); - - readjust(); - $window.on('resize', $.throttle(function () { - readjust(); - }, 100)); - - // 打开消息框 - _this.state = 'opening'; - componentEvent('open', 'dialog', _this, _this.$dialog); - - _this.$dialog - .addClass('mdui-dialog-open') - .transitionEnd(function () { - transitionEnd(_this); - }); - - // 不存在遮罩层元素时,添加遮罩层 - if (!$overlay) { - $overlay = $.showOverlay(5100); - } - - $overlay - - // 点击遮罩层时是否关闭对话框 - [_this.options.modal ? 'off' : 'on']('click', overlayClick) - - // 是否显示遮罩层,不显示时,把遮罩层背景透明 - .css('opacity', _this.options.overlay ? '' : 0); - - if (_this.options.history) { - // 如果 hash 中原来就有 mdui-dialog,先删除,避免后退历史纪录后仍然有 mdui-dialog 导致无法关闭 - // 包括 mdui-dialog 和 &mdui-dialog 和 ?mdui-dialog - var hash = location.hash.substring(1); - if (hash.indexOf('mdui-dialog') > -1) { - hash = hash.replace(/[&?]?mdui-dialog/g, ''); - } - - // 后退按钮关闭对话框 - if (hash) { - location.hash = hash + (hash.indexOf('?') > -1 ? '&' : '?') + 'mdui-dialog'; - } else { - location.hash = 'mdui-dialog'; - } - - $window.on('hashchange', hashchangeEvent); - } - }; - - /** - * 打开对话框 - */ - Dialog.prototype.open = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - // 如果当前有正在打开或已经打开的对话框,或队列不为空,则先加入队列,等旧对话框开始关闭时再打开 - if ( - (currentInst && (currentInst.state === 'opening' || currentInst.state === 'opened')) || - queue.queue(queueName).length - ) { - queue.queue(queueName, function () { - _this._doOpen(); - }); - - return; - } - - _this._doOpen(); - }; - - /** - * 关闭对话框 - */ - Dialog.prototype.close = function () { - var _this = this; - var _arguments = arguments; - - // setTimeout 的作用是: - // 当同时关闭一个对话框,并打开另一个对话框时,使打开对话框的操作先执行,以使需要打开的对话框先加入队列 - setTimeout(function () { - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - currentInst = null; - - _this.state = 'closing'; - componentEvent('close', 'dialog', _this, _this.$dialog); - - // 所有对话框都关闭,且当前没有打开的对话框时,隐藏遮罩 - if (queue.queue(queueName).length === 0 && $overlay) { - $.hideOverlay(); - $overlay = null; - } - - _this.$dialog - .removeClass('mdui-dialog-open') - .transitionEnd(function () { - transitionEnd(_this); - }); - - if (_this.options.history && queue.queue(queueName).length === 0) { - // 是否需要后退历史纪录,默认为 false。 - // 为 false 时是通过 js 关闭,需要后退一个历史记录 - // 为 true 时是通过后退按钮关闭,不需要后退历史记录 - if (!_arguments[0]) { - window.history.back(); - } - - $window.off('hashchange', hashchangeEvent); - } - - // 关闭旧对话框,打开新对话框。 - // 加一点延迟,仅仅为了视觉效果更好。不加延时也不影响功能 - setTimeout(function () { - queue.dequeue(queueName); - }, 100); - }, 0); - }; - - /** - * 切换对话框打开/关闭状态 - */ - Dialog.prototype.toggle = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } else if (_this.state === 'closing' || _this.state === 'closed') { - _this.open(); - } - }; - - /** - * 获取对话框状态 - * @returns {'opening'|'opened'|'closing'|'closed'} - */ - Dialog.prototype.getState = function () { - return this.state; - }; - - /** - * 销毁对话框 - */ - Dialog.prototype.destroy = function () { - var _this = this; - - if (_this.append) { - _this.$dialog.remove(); - } - - _this.$dialog.removeData('mdui.dialog'); - - if (queue.queue(queueName).length === 0 && !currentInst) { - if ($overlay) { - $.hideOverlay(); - $overlay = null; - } - - if (isLockScreen) { - $.unlockScreen(); - isLockScreen = false; - } - } - }; - - /** - * 对话框内容变化时,需要调用该方法来调整对话框位置和滚动条高度 - */ - Dialog.prototype.handleUpdate = function () { - readjust(); - }; - - // esc 按下时关闭对话框 - $document.on('keydown', function (e) { - if ( - currentInst && - currentInst.options.closeOnEsc && - currentInst.state === 'opened' && - e.keyCode === 27 - ) { - currentInst.close(); - } - }); - - return Dialog; - - })(); - - - /** - * ============================================================================= - * ************ Dialog DATA API ************ - * ============================================================================= - */ - - $(function () { - $document.on('click', '[mdui-dialog]', function () { - var $this = $(this); - var options = parseOptions($this.attr('mdui-dialog')); - var selector = options.target; - delete options.target; - - var $dialog = $(selector).eq(0); - - var inst = $dialog.data('mdui.dialog'); - if (!inst) { - inst = new mdui.Dialog($dialog, options); - $dialog.data('mdui.dialog', inst); - } - - inst.open(); - }); - }); - - - /** - * ============================================================================= - * ************ mdui.dialog(options) ************ - * ============================================================================= - */ - - mdui.dialog = function (options) { - - /** - * 默认参数 - */ - var DEFAULT = { - title: '', // 标题 - content: '', // 文本 - buttons: [], // 按钮 - stackedButtons: false, // 垂直排列按钮 - cssClass: '', // 在 Dialog 上添加的 CSS 类 - history: true, // 监听 hashchange 事件 - overlay: true, // 是否显示遮罩 - modal: false, // 是否模态化对话框 - closeOnEsc: true, // 按下 esc 时关闭对话框 - destroyOnClosed: true, // 关闭后销毁 - onOpen: function () { // 打开动画开始时的回调 - }, - - onOpened: function () { // 打开动画结束后的回调 - }, - - onClose: function () { // 关闭动画开始时的回调 - }, - - onClosed: function () { // 关闭动画结束时的回调 - }, - }; - - /** - * 按钮的默认参数 - */ - var DEFAULT_BUTTON = { - text: '', // 按钮文本 - bold: false, // 按钮文本是否加粗 - close: true, // 点击按钮后关闭对话框 - onClick: function (inst) { // 点击按钮的回调 - }, - }; - - // 合并参数 - options = $.extend({}, DEFAULT, (options || {})); - $.each(options.buttons, function (i, button) { - options.buttons[i] = $.extend({}, DEFAULT_BUTTON, button); - }); - - // 按钮的 HTML - var buttonsHTML = ''; - if (options.buttons.length) { - buttonsHTML = - '
'; - $.each(options.buttons, function (i, button) { - buttonsHTML += - '' + - button.text + - ''; - }); - - buttonsHTML += '
'; - } - - // Dialog 的 HTML - var HTML = - '
' + - (options.title ? '
' + options.title + '
' : '') + - (options.content ? '
' + options.content + '
' : '') + - buttonsHTML + - '
'; - - // 实例化 Dialog - var inst = new mdui.Dialog(HTML, { - history: options.history, - overlay: options.overlay, - modal: options.modal, - closeOnEsc: options.closeOnEsc, - destroyOnClosed: options.destroyOnClosed, - }); - - // 绑定按钮事件 - if (options.buttons.length) { - inst.$dialog.find('.mdui-dialog-actions .mdui-btn').each(function (i, button) { - $(button).on('click', function () { - if (typeof options.buttons[i].onClick === 'function') { - options.buttons[i].onClick(inst); - } - - if (options.buttons[i].close) { - inst.close(); - } - }); - }); - } - - // 绑定打开关闭事件 - if (typeof options.onOpen === 'function') { - inst.$dialog - .on('open.mdui.dialog', function () { - options.onOpen(inst); - }) - .on('opened.mdui.dialog', function () { - options.onOpened(inst); - }) - .on('close.mdui.dialog', function () { - options.onClose(inst); - }) - .on('closed.mdui.dialog', function () { - options.onClosed(inst); - }); - } - - inst.open(); - - return inst; - }; - - - /** - * ============================================================================= - * ************ mdui.alert(text, title, onConfirm, options) ************ - * ************ mdui.alert(text, onConfirm, options) ************ - * ============================================================================= - */ - - mdui.alert = function (text, title, onConfirm, options) { - - // title 参数可选 - if (typeof title === 'function') { - title = ''; - onConfirm = arguments[1]; - options = arguments[2]; - } - - if (onConfirm === undefined) { - onConfirm = function () {}; - } - - if (options === undefined) { - options = {}; - } - - /** - * 默认参数 - */ - var DEFAULT = { - confirmText: 'ok', // 按钮上的文本 - history: true, // 监听 hashchange 事件 - modal: false, // 是否模态化对话框,为 false 时点击对话框外面区域关闭对话框,为 true 时不关闭 - closeOnEsc: true, // 按下 esc 关闭对话框 - }; - - options = $.extend({}, DEFAULT, options); - - return mdui.dialog({ - title: title, - content: text, - buttons: [ - { - text: options.confirmText, - bold: false, - close: true, - onClick: onConfirm, - }, - ], - cssClass: 'mdui-dialog-alert', - history: options.history, - modal: options.modal, - closeOnEsc: options.closeOnEsc, - }); - }; - - - /** - * ============================================================================= - * ************ mdui.confirm(text, title, onConfirm, onCancel, options) ************ - * ************ mdui.confirm(text, onConfirm, onCancel, options) ************ - * ============================================================================= - */ - - mdui.confirm = function (text, title, onConfirm, onCancel, options) { - - // title 参数可选 - if (typeof title === 'function') { - title = ''; - onConfirm = arguments[1]; - onCancel = arguments[2]; - options = arguments[3]; - } - - if (onConfirm === undefined) { - onConfirm = function () {}; - } - - if (onCancel === undefined) { - onCancel = function () {}; - } - - if (options === undefined) { - options = {}; - } - - /** - * 默认参数 - */ - var DEFAULT = { - confirmText: 'ok', // 确认按钮的文本 - cancelText: 'cancel', // 取消按钮的文本 - history: true, // 监听 hashchange 事件 - modal: false, // 是否模态化对话框,为 false 时点击对话框外面区域关闭对话框,为 true 时不关闭 - closeOnEsc: true, // 按下 esc 关闭对话框 - }; - - options = $.extend({}, DEFAULT, options); - - return mdui.dialog({ - title: title, - content: text, - buttons: [ - { - text: options.cancelText, - bold: false, - close: true, - onClick: onCancel, - }, - { - text: options.confirmText, - bold: false, - close: true, - onClick: onConfirm, - }, - ], - cssClass: 'mdui-dialog-confirm', - history: options.history, - modal: options.modal, - closeOnEsc: options.closeOnEsc, - }); - }; - - - /** - * ============================================================================= - * ************ mdui.prompt(label, title, onConfirm, onCancel, options) ************ - * ************ mdui.prompt(label, onConfirm, onCancel, options) ************ - * ============================================================================= - */ - - mdui.prompt = function (label, title, onConfirm, onCancel, options) { - - // title 参数可选 - if (typeof title === 'function') { - title = ''; - onConfirm = arguments[1]; - onCancel = arguments[2]; - options = arguments[3]; - } - - if (onConfirm === undefined) { - onConfirm = function () {}; - } - - if (onCancel === undefined) { - onCancel = function () {}; - } - - if (options === undefined) { - options = {}; - } - - /** - * 默认参数 - */ - var DEFAULT = { - confirmText: 'ok', // 确认按钮的文本 - cancelText: 'cancel', // 取消按钮的文本 - history: true, // 监听 hashchange 事件 - modal: false, // 是否模态化对话框,为 false 时点击对话框外面区域关闭对话框,为 true 时不关闭 - closeOnEsc: true, // 按下 esc 关闭对话框 - type: 'text', // 输入框类型,text: 单行文本框 textarea: 多行文本框 - maxlength: '', // 最大输入字符数 - defaultValue: '', // 输入框中的默认文本 - confirmOnEnter: false, // 按下 enter 确认输入内容 - }; - - options = $.extend({}, DEFAULT, options); - - var content = - '
' + - (label ? '' : '') + - (options.type === 'text' ? - '' : - '') + - (options.type === 'textarea' ? - '' : - '') + - '
'; - - var onCancelClick = onCancel; - if (typeof onCancel === 'function') { - onCancelClick = function (inst) { - var value = inst.$dialog.find('.mdui-textfield-input').val(); - onCancel(value, inst); - } - } - - var onConfirmClick = onConfirm; - if (typeof onConfirm === 'function') { - onConfirmClick = function (inst) { - var value = inst.$dialog.find('.mdui-textfield-input').val(); - onConfirm(value, inst); - } - } - - return mdui.dialog({ - title: title, - content: content, - buttons: [ - { - text: options.cancelText, - bold: false, - close: true, - onClick: onCancelClick, - }, - { - text: options.confirmText, - bold: false, - close: true, - onClick: onConfirmClick, - }, - ], - cssClass: 'mdui-dialog-prompt', - history: options.history, - modal: options.modal, - closeOnEsc: options.closeOnEsc, - onOpen: function (inst) { - - // 初始化输入框 - var $input = inst.$dialog.find('.mdui-textfield-input'); - mdui.updateTextFields($input); - - // 聚焦到输入框 - $input[0].focus(); - - // 捕捉文本框回车键,在单行文本框的情况下触发回调 - if (options.type === 'text' && options.confirmOnEnter === true) { - $input.on('keydown', function (event) { - if (event.keyCode === 13) { - var value = inst.$dialog.find('.mdui-textfield-input').val(); - onConfirm(value, inst); - inst.close(); - } - }); - } - - // 如果是多行输入框,监听输入框的 input 事件,更新对话框高度 - if (options.type === 'textarea') { - $input.on('input', function () { - inst.handleUpdate(); - }); - } - - // 有字符数限制时,加载完文本框后 DOM 会变化,需要更新对话框高度 - if (options.maxlength) { - inst.handleUpdate(); - } - }, - }); - - }; - - - /** - * ============================================================================= - * ************ ToolTip 工具提示 ************ - * ============================================================================= - */ - - mdui.Tooltip = (function () { - - /** - * 默认参数 - */ - var DEFAULT = { - position: 'auto', // 提示所在位置 - delay: 0, // 延迟,单位毫秒 - content: '', // 提示文本,允许包含 HTML - }; - - /** - * 是否是桌面设备 - * @returns {boolean} - */ - var isDesktop = function () { - return $window.width() > 1024; - }; - - /** - * 设置 Tooltip 的位置 - * @param inst - */ - function setPosition(inst) { - var marginLeft; - var marginTop; - var position; - - // 触发的元素 - var targetProps = inst.$target[0].getBoundingClientRect(); - - // 触发的元素和 Tooltip 之间的距离 - var targetMargin = (isDesktop() ? 14 : 24); - - // Tooltip 的宽度和高度 - var tooltipWidth = inst.$tooltip[0].offsetWidth; - var tooltipHeight = inst.$tooltip[0].offsetHeight; - - // Tooltip 的方向 - position = inst.options.position; - - // 自动判断位置,加 2px,使 Tooltip 距离窗口边框至少有 2px 的间距 - if (['bottom', 'top', 'left', 'right'].indexOf(position) === -1) { - if ( - targetProps.top + targetProps.height + targetMargin + tooltipHeight + 2 < - $window.height() - ) { - position = 'bottom'; - } else if (targetMargin + tooltipHeight + 2 < targetProps.top) { - position = 'top'; - } else if (targetMargin + tooltipWidth + 2 < targetProps.left) { - position = 'left'; - } else if ( - targetProps.width + targetMargin + tooltipWidth + 2 < - $window.width() - targetProps.left - ) { - position = 'right'; - } else { - position = 'bottom'; - } - } - - // 设置位置 - switch (position) { - case 'bottom': - marginLeft = -1 * (tooltipWidth / 2); - marginTop = (targetProps.height / 2) + targetMargin; - inst.$tooltip.transformOrigin('top center'); - break; - case 'top': - marginLeft = -1 * (tooltipWidth / 2); - marginTop = -1 * (tooltipHeight + (targetProps.height / 2) + targetMargin); - inst.$tooltip.transformOrigin('bottom center'); - break; - case 'left': - marginLeft = -1 * (tooltipWidth + (targetProps.width / 2) + targetMargin); - marginTop = -1 * (tooltipHeight / 2); - inst.$tooltip.transformOrigin('center right'); - break; - case 'right': - marginLeft = (targetProps.width / 2) + targetMargin; - marginTop = -1 * (tooltipHeight / 2); - inst.$tooltip.transformOrigin('center left'); - break; - } - - var targetOffset = inst.$target.offset(); - inst.$tooltip.css({ - top: targetOffset.top + (targetProps.height / 2) + 'px', - left: targetOffset.left + (targetProps.width / 2) + 'px', - 'margin-left': marginLeft + 'px', - 'margin-top': marginTop + 'px', - }); - } - - /** - * Tooltip 实例 - * @param selector - * @param opts - * @constructor - */ - function Tooltip(selector, opts) { - var _this = this; - - _this.$target = $(selector).eq(0); - if (!_this.$target.length) { - return; - } - - // 已通过 data 属性实例化过,不再重复实例化 - var oldInst = _this.$target.data('mdui.tooltip'); - if (oldInst) { - return oldInst; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - _this.state = 'closed'; - - // 创建 Tooltip HTML - _this.$tooltip = $( - '
' + - _this.options.content + - '
' - ).appendTo(document.body); - - // 绑定事件。元素处于 disabled 状态时无法触发鼠标事件,为了统一,把 touch 事件也禁用 - _this.$target - .on('touchstart mouseenter', function (e) { - if (this.disabled) { - return; - } - - if (!TouchHandler.isAllow(e)) { - return; - } - - TouchHandler.register(e); - - _this.open(); - }) - .on('touchend mouseleave', function (e) { - if (this.disabled) { - return; - } - - if (!TouchHandler.isAllow(e)) { - return; - } - - _this.close(); - }) - .on(TouchHandler.unlock, function (e) { - if (this.disabled) { - return; - } - - TouchHandler.register(e); - }); - } - - /** - * 动画结束回调 - * @private - */ - var transitionEnd = function (inst) { - if (inst.$tooltip.hasClass('mdui-tooltip-open')) { - inst.state = 'opened'; - componentEvent('opened', 'tooltip', inst, inst.$target); - } else { - inst.state = 'closed'; - componentEvent('closed', 'tooltip', inst, inst.$target); - } - }; - - /** - * 执行打开 Tooltip - * @private - */ - Tooltip.prototype._doOpen = function () { - var _this = this; - - _this.state = 'opening'; - componentEvent('open', 'tooltip', _this, _this.$target); - - _this.$tooltip - .addClass('mdui-tooltip-open') - .transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 打开 Tooltip - * @param opts 允许每次打开时设置不同的参数 - */ - Tooltip.prototype.open = function (opts) { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - var oldOpts = $.extend({}, _this.options); - - // 合并 data 属性参数 - $.extend(_this.options, parseOptions(_this.$target.attr('mdui-tooltip'))); - if (opts) { - $.extend(_this.options, opts); - } - - // tooltip 的内容有更新 - if (oldOpts.content !== _this.options.content) { - _this.$tooltip.html(_this.options.content); - } - - setPosition(_this); - - if (_this.options.delay) { - _this.timeoutId = setTimeout(function () { - _this._doOpen(); - }, _this.options.delay); - } else { - _this.timeoutId = false; - _this._doOpen(); - } - }; - - /** - * 关闭 Tooltip - */ - Tooltip.prototype.close = function () { - var _this = this; - - if (_this.timeoutId) { - clearTimeout(_this.timeoutId); - _this.timeoutId = false; - } - - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - _this.state = 'closing'; - componentEvent('close', 'tooltip', _this, _this.$target); - - _this.$tooltip - .removeClass('mdui-tooltip-open') - .transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 切换 Tooltip 状态 - */ - Tooltip.prototype.toggle = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } else if (_this.state === 'closing' || _this.state === 'closed') { - _this.open(); - } - }; - - /** - * 获取 Tooltip 状态 - * @returns {'opening'|'opened'|'closing'|'closed'} - */ - Tooltip.prototype.getState = function () { - return this.state; - }; - - /** - * 销毁 Tooltip - */ - /*Tooltip.prototype.destroy = function () { - var _this = this; - clearTimeout(_this.timeoutId); - $.data(_this.target, 'mdui.tooltip', null); - $.remove(_this.tooltip); - };*/ - - return Tooltip; - - })(); - - - /** - * ============================================================================= - * ************ Tooltip DATA API ************ - * ============================================================================= - */ - - $(function () { - // mouseenter 不能冒泡,所以这里用 mouseover 代替 - $document.on('touchstart mouseover', '[mdui-tooltip]', function () { - var $this = $(this); - - var inst = $this.data('mdui.tooltip'); - if (!inst) { - var options = parseOptions($this.attr('mdui-tooltip')); - inst = new mdui.Tooltip($this, options); - $this.data('mdui.tooltip', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ Snackbar ************ - * ============================================================================= - */ - - (function () { - - /** - * 当前打开着的 Snackbar - */ - var currentInst; - - /** - * 对列名 - * @type {string} - */ - var queueName = '__md_snackbar'; - - var DEFAULT = { - timeout: 4000, // 在用户没有操作时多长时间自动隐藏 - buttonText: '', // 按钮的文本 - buttonColor: '', // 按钮的颜色,支持 blue #90caf9 rgba(...) - position: 'bottom', // 位置 bottom、top、left-top、left-bottom、right-top、right-bottom - closeOnButtonClick: true, // 点击按钮时关闭 - closeOnOutsideClick: true, // 触摸或点击屏幕其他地方时关闭 - onClick: function () { // 在 Snackbar 上点击的回调 - }, - - onButtonClick: function () { // 点击按钮的回调 - }, - - onOpen: function () { // 打开动画开始时的回调 - }, - - onOpened: function () { // 打开动画结束时的回调 - }, - - onClose: function () { // 关闭动画开始时的回调 - }, - - onClosed: function () { // 打开动画结束时的回调 - }, - }; - - /** - * 点击 Snackbar 外面的区域关闭 - * @param e - */ - var closeOnOutsideClick = function (e) { - var $target = $(e.target); - if (!$target.hasClass('mdui-snackbar') && !$target.parents('.mdui-snackbar').length) { - currentInst.close(); - } - }; - - /** - * Snackbar 实例 - * @param message - * @param opts - * @constructor - */ - function Snackbar(message, opts) { - var _this = this; - - _this.message = message; - _this.options = $.extend({}, DEFAULT, (opts || {})); - - // message 参数必须 - if (!_this.message) { - return; - } - - _this.state = 'closed'; - - _this.timeoutId = false; - - // 按钮颜色 - var buttonColorStyle = ''; - var buttonColorClass = ''; - - if ( - _this.options.buttonColor.indexOf('#') === 0 || - _this.options.buttonColor.indexOf('rgb') === 0 - ) { - buttonColorStyle = 'style="color:' + _this.options.buttonColor + '"'; - } else if (_this.options.buttonColor !== '') { - buttonColorClass = 'mdui-text-color-' + _this.options.buttonColor; - } - - // 添加 HTML - _this.$snackbar = $( - '
' + - '
' + - _this.message + - '
' + - (_this.options.buttonText ? - ('' + - _this.options.buttonText + - '') : - '' - ) + - '
') - .appendTo(document.body); - - // 设置位置 - _this._setPosition('close'); - - _this.$snackbar - .reflow() - .addClass('mdui-snackbar-' + _this.options.position); - } - - /** - * 设置 Snackbar 的位置 - * @param state - * @private - */ - Snackbar.prototype._setPosition = function (state) { - var _this = this; - - var snackbarHeight = _this.$snackbar[0].clientHeight; - var position = _this.options.position; - - var translateX; - var translateY; - - // translateX - if (position === 'bottom' || position === 'top') { - translateX = '-50%'; - } else { - translateX = '0'; - } - - // translateY - if (state === 'open') { - translateY = '0'; - } else { - if (position === 'bottom') { - translateY = snackbarHeight; - } - - if (position === 'top') { - translateY = -snackbarHeight; - } - - if (position === 'left-top' || position === 'right-top') { - translateY = -snackbarHeight - 24; - } - - if (position === 'left-bottom' || position === 'right-bottom') { - translateY = snackbarHeight + 24; - } - } - - _this.$snackbar.transform('translate(' + translateX + ',' + translateY + 'px)'); - }; - - /** - * 打开 Snackbar - */ - Snackbar.prototype.open = function () { - var _this = this; - - if (!_this.message) { - return; - } - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - // 如果当前有正在显示的 Snackbar,则先加入队列,等旧 Snackbar 关闭后再打开 - if (currentInst) { - queue.queue(queueName, function () { - _this.open(); - }); - - return; - } - - currentInst = _this; - - // 开始打开 - _this.state = 'opening'; - _this.options.onOpen(); - - _this._setPosition('open'); - - _this.$snackbar - .transitionEnd(function () { - if (_this.state !== 'opening') { - return; - } - - _this.state = 'opened'; - _this.options.onOpened(); - - // 有按钮时绑定事件 - if (_this.options.buttonText) { - _this.$snackbar - .find('.mdui-snackbar-action') - .on('click', function () { - _this.options.onButtonClick(); - if (_this.options.closeOnButtonClick) { - _this.close(); - } - }); - } - - // 点击 snackbar 的事件 - _this.$snackbar.on('click', function (e) { - if (!$(e.target).hasClass('mdui-snackbar-action')) { - _this.options.onClick(); - } - }); - - // 点击 Snackbar 外面的区域关闭 - if (_this.options.closeOnOutsideClick) { - $document.on(TouchHandler.start, closeOnOutsideClick); - } - - // 超时后自动关闭 - if (_this.options.timeout) { - _this.timeoutId = setTimeout(function () { - _this.close(); - }, _this.options.timeout); - } - }); - }; - - /** - * 关闭 Snackbar - */ - Snackbar.prototype.close = function () { - var _this = this; - - if (!_this.message) { - return; - } - - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - if (_this.timeoutId) { - clearTimeout(_this.timeoutId); - } - - if (_this.options.closeOnOutsideClick) { - $document.off(TouchHandler.start, closeOnOutsideClick); - } - - _this.state = 'closing'; - _this.options.onClose(); - - _this._setPosition('close'); - - _this.$snackbar - .transitionEnd(function () { - if (_this.state !== 'closing') { - return; - } - - currentInst = null; - _this.state = 'closed'; - _this.options.onClosed(); - _this.$snackbar.remove(); - queue.dequeue(queueName); - }); - }; - - /** - * 打开 Snackbar - * @param message - * @param opts - */ - mdui.snackbar = function (message, opts) { - if (typeof message !== 'string') { - opts = message; - message = opts.message; - } - - var inst = new Snackbar(message, opts); - - inst.open(); - return inst; - }; - - })(); - - - /** - * ============================================================================= - * ************ Bottom navigation 底部导航栏 ************ - * ============================================================================= - */ - - (function () { - - // 切换导航项 - $document.on('click', '.mdui-bottom-nav>a', function () { - var $this = $(this); - var $bottomNav = $this.parent(); - var isThis; - $bottomNav.children('a').each(function (i, item) { - isThis = $this.is(item); - if (isThis) { - componentEvent('change', 'bottomNav', null, $bottomNav, { - index: i, - }); - } - - $(item)[isThis ? 'addClass' : 'removeClass']('mdui-bottom-nav-active'); - }); - }); - - // 滚动时隐藏 mdui-bottom-nav-scroll-hide - mdui.mutation('.mdui-bottom-nav-scroll-hide', function () { - var $this = $(this); - var inst = new mdui.Headroom($this, { - pinnedClass: 'mdui-headroom-pinned-down', - unpinnedClass: 'mdui-headroom-unpinned-down', - }); - $this.data('mdui.headroom', inst); - }); - - })(); - - - /** - * ============================================================================= - * ************ Spinner 圆形进度条 ************ - * ============================================================================= - */ - - (function () { - /** - * layer 的 HTML 结构 - */ - var layerHTML = function () { - var i = arguments.length ? arguments[0] : false; - - return '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
' + - '
'; - }; - - /** - * 填充 HTML - * @param spinner - */ - var fillHTML = function (spinner) { - var $spinner = $(spinner); - var layer; - if ($spinner.hasClass('mdui-spinner-colorful')) { - layer = layerHTML('1') + layerHTML('2') + layerHTML('3') + layerHTML('4'); - } else { - layer = layerHTML(); - } - - $spinner.html(layer); - }; - - /** - * 页面加载完后自动填充 HTML 结构 - */ - $(function () { - mdui.mutation('.mdui-spinner', function () { - fillHTML(this); - }); - }); - - /** - * 更新圆形进度条 - */ - mdui.updateSpinners = function () { - $(arguments.length ? arguments[0] : '.mdui-spinner').each(function () { - fillHTML(this); - }); - }; - - })(); - - - /** - * ============================================================================= - * ************ Expansion panel 可扩展面板 ************ - * ============================================================================= - */ - - mdui.Panel = (function () { - - function Panel(selector, opts) { - return new CollapsePrivate(selector, opts, 'panel'); - } - - return Panel; - - })(); - - - /** - * ============================================================================= - * ************ Expansion panel 自定义属性 ************ - * ============================================================================= - */ - - $(function () { - mdui.mutation('[mdui-panel]', function () { - var $target = $(this); - - var inst = $target.data('mdui.panel'); - if (!inst) { - var options = parseOptions($target.attr('mdui-panel')); - inst = new mdui.Panel($target, options); - $target.data('mdui.panel', inst); - } - }); - }); - - - /** - * ============================================================================= - * ************ Menu 菜单 ************ - * ============================================================================= - */ - - mdui.Menu = (function () { - - /** - * 默认参数 - */ - var DEFAULT = { - position: 'auto', // 菜单位置 top、bottom、center、auto - align: 'auto', // 菜单和触发它的元素的对齐方式 left、right、center、auto - gutter: 16, // 菜单距离窗口边缘的最小距离,单位 px - fixed: false, // 是否使菜单固定在窗口,不随滚动条滚动 - covered: 'auto', // 菜单是否覆盖在触发它的元素上,true、false。auto 时简单菜单覆盖,级联菜单不覆盖 - subMenuTrigger: 'hover', // 子菜单的触发方式 hover、click - subMenuDelay: 200, // 子菜单的触发延时,仅在 submenuTrigger 为 hover 有效 - }; - - /** - * 调整主菜单位置 - * @param _this 实例 - */ - var readjust = function (_this) { - var menuLeft; - var menuTop; - - // 菜单位置和方向 - var position; - var align; - - // window 窗口的宽度和高度 - var windowHeight = $window.height(); - var windowWidth = $window.width(); - - // 配置参数 - var gutter = _this.options.gutter; - var isCovered = _this.isCovered; - var isFixed = _this.options.fixed; - - // 动画方向参数 - var transformOriginX; - var transformOriginY; - - // 菜单的原始宽度和高度 - var menuWidth = _this.$menu.width(); - var menuHeight = _this.$menu.height(); - - var $anchor = _this.$anchor; - - // 触发菜单的元素在窗口中的位置 - var anchorTmp = $anchor[0].getBoundingClientRect(); - var anchorTop = anchorTmp.top; - var anchorLeft = anchorTmp.left; - var anchorHeight = anchorTmp.height; - var anchorWidth = anchorTmp.width; - var anchorBottom = windowHeight - anchorTop - anchorHeight; - var anchorRight = windowWidth - anchorLeft - anchorWidth; - - // 触发元素相对其拥有定位属性的父元素的位置 - var anchorOffsetTop = $anchor[0].offsetTop; - var anchorOffsetLeft = $anchor[0].offsetLeft; - - // =============================== - // ================= 自动判断菜单位置 - // =============================== - if (_this.options.position === 'auto') { - - // 判断下方是否放得下菜单 - if (anchorBottom + (isCovered ? anchorHeight : 0) > menuHeight + gutter) { - position = 'bottom'; - } - - // 判断上方是否放得下菜单 - else if (anchorTop + (isCovered ? anchorHeight : 0) > menuHeight + gutter) { - position = 'top'; - } - - // 上下都放不下,居中显示 - else { - position = 'center'; - } - } else { - position = _this.options.position; - } - - // =============================== - // ============== 自动判断菜单对齐方式 - // =============================== - if (_this.options.align === 'auto') { - - // 判断右侧是否放得下菜单 - if (anchorRight + anchorWidth > menuWidth + gutter) { - align = 'left'; - } - - // 判断左侧是否放得下菜单 - else if (anchorLeft + anchorWidth > menuWidth + gutter) { - align = 'right'; - } - - // 左右都放不下,居中显示 - else { - align = 'center'; - } - } else { - align = _this.options.align; - } - - // =============================== - // ==================== 设置菜单位置 - // =============================== - if (position === 'bottom') { - transformOriginY = '0'; - - menuTop = - (isCovered ? 0 : anchorHeight) + - (isFixed ? anchorTop : anchorOffsetTop); - - } else if (position === 'top') { - transformOriginY = '100%'; - - menuTop = - (isCovered ? anchorHeight : 0) + - (isFixed ? (anchorTop - menuHeight) : (anchorOffsetTop - menuHeight)); - - } else { - transformOriginY = '50%'; - - // =====================在窗口中居中 - // 显示的菜单的高度,简单菜单高度不超过窗口高度,若超过了则在菜单内部显示滚动条 - // 级联菜单内部不允许出现滚动条 - var menuHeightTemp = menuHeight; - - // 简单菜单比窗口高时,限制菜单高度 - if (!_this.isCascade) { - if (menuHeight + gutter * 2 > windowHeight) { - menuHeightTemp = windowHeight - gutter * 2; - _this.$menu.height(menuHeightTemp); - } - } - - menuTop = - (windowHeight - menuHeightTemp) / 2 + - (isFixed ? 0 : (anchorOffsetTop - anchorTop)); - } - - _this.$menu.css('top', menuTop + 'px'); - - // =============================== - // ================= 设置菜单对齐方式 - // =============================== - if (align === 'left') { - transformOriginX = '0'; - - menuLeft = isFixed ? anchorLeft : anchorOffsetLeft; - - } else if (align === 'right') { - transformOriginX = '100%'; - - menuLeft = isFixed ? - (anchorLeft + anchorWidth - menuWidth) : - (anchorOffsetLeft + anchorWidth - menuWidth); - } else { - transformOriginX = '50%'; - - //=======================在窗口中居中 - // 显示的菜单的宽度,菜单宽度不能超过窗口宽度 - var menuWidthTemp = menuWidth; - - // 菜单比窗口宽,限制菜单宽度 - if (menuWidth + gutter * 2 > windowWidth) { - menuWidthTemp = windowWidth - gutter * 2; - _this.$menu.width(menuWidthTemp); - } - - menuLeft = - (windowWidth - menuWidthTemp) / 2 + - (isFixed ? 0 : anchorOffsetLeft - anchorLeft); - } - - _this.$menu.css('left', menuLeft + 'px'); - - // 设置菜单动画方向 - _this.$menu.transformOrigin(transformOriginX + ' ' + transformOriginY); - }; - - /** - * 调整子菜单的位置 - * @param $submenu - */ - var readjustSubmenu = function ($submenu) { - var $item = $submenu.parent('.mdui-menu-item'); - - var submenuTop; - var submenuLeft; - - // 子菜单位置和方向 - var position; // top、bottom - var align; // left、right - - // window 窗口的宽度和高度 - var windowHeight = $window.height(); - var windowWidth = $window.width(); - - // 动画方向参数 - var transformOriginX; - var transformOriginY; - - // 子菜单的原始宽度和高度 - var submenuWidth = $submenu.width(); - var submenuHeight = $submenu.height(); - - // 触发子菜单的菜单项的宽度高度 - var itemTmp = $item[0].getBoundingClientRect(); - var itemWidth = itemTmp.width; - var itemHeight = itemTmp.height; - var itemLeft = itemTmp.left; - var itemTop = itemTmp.top; - - // =================================== - // ===================== 判断菜单上下位置 - // =================================== - - // 判断下方是否放得下菜单 - if (windowHeight - itemTop > submenuHeight) { - position = 'bottom'; - } - - // 判断上方是否放得下菜单 - else if (itemTop + itemHeight > submenuHeight) { - position = 'top'; - } - - // 默认放在下方 - else { - position = 'bottom'; - } - - // ==================================== - // ====================== 判断菜单左右位置 - // ==================================== - - // 判断右侧是否放得下菜单 - if (windowWidth - itemLeft - itemWidth > submenuWidth) { - align = 'left'; - } - - // 判断左侧是否放得下菜单 - else if (itemLeft > submenuWidth) { - align = 'right'; - } - - // 默认放在右侧 - else { - align = 'left'; - } - - // =================================== - // ======================== 设置菜单位置 - // =================================== - if (position === 'bottom') { - transformOriginY = '0'; - submenuTop = '0'; - } else if (position === 'top') { - transformOriginY = '100%'; - submenuTop = -submenuHeight + itemHeight; - } - - $submenu.css('top', submenuTop + 'px'); - - // =================================== - // ===================== 设置菜单对齐方式 - // =================================== - if (align === 'left') { - transformOriginX = '0'; - submenuLeft = itemWidth; - } else if (align === 'right') { - transformOriginX = '100%'; - submenuLeft = -submenuWidth; - } - - $submenu.css('left', submenuLeft + 'px'); - - // 设置菜单动画方向 - $submenu.transformOrigin(transformOriginX + ' ' + transformOriginY); - }; - - /** - * 打开子菜单 - * @param $submenu - */ - var openSubMenu = function ($submenu) { - readjustSubmenu($submenu); - - $submenu - .addClass('mdui-menu-open') - .parent('.mdui-menu-item') - .addClass('mdui-menu-item-active'); - }; - - /** - * 关闭子菜单,及其嵌套的子菜单 - * @param $submenu - */ - var closeSubMenu = function ($submenu) { - // 关闭子菜单 - $submenu - .removeClass('mdui-menu-open') - .addClass('mdui-menu-closing') - .transitionEnd(function () { - $submenu.removeClass('mdui-menu-closing'); - }) - - // 移除激活状态的样式 - .parent('.mdui-menu-item') - .removeClass('mdui-menu-item-active'); - - // 循环关闭嵌套的子菜单 - $submenu.find('.mdui-menu').each(function () { - var $subSubmenu = $(this); - $subSubmenu - .removeClass('mdui-menu-open') - .addClass('mdui-menu-closing') - .transitionEnd(function () { - $subSubmenu.removeClass('mdui-menu-closing'); - }) - .parent('.mdui-menu-item') - .removeClass('mdui-menu-item-active'); - }); - }; - - /** - * 切换子菜单状态 - * @param $submenu - */ - var toggleSubMenu = function ($submenu) { - if ($submenu.hasClass('mdui-menu-open')) { - closeSubMenu($submenu); - } else { - openSubMenu($submenu); - } - }; - - /** - * 绑定子菜单事件 - * @param inst 实例 - */ - var bindSubMenuEvent = function (inst) { - // 点击打开子菜单 - inst.$menu.on('click', '.mdui-menu-item', function (e) { - var $this = $(this); - var $target = $(e.target); - - // 禁用状态菜单不操作 - if ($this.attr('disabled') !== null) { - return; - } - - // 没有点击在子菜单的菜单项上时,不操作(点在了子菜单的空白区域、或分隔线上) - if ($target.is('.mdui-menu') || $target.is('.mdui-divider')) { - return; - } - - // 阻止冒泡,点击菜单项时只在最后一级的 mdui-menu-item 上生效,不向上冒泡 - if (!$target.parents('.mdui-menu-item').eq(0).is($this)) { - return; - } - - // 当前菜单的子菜单 - var $submenu = $this.children('.mdui-menu'); - - // 先关闭除当前子菜单外的所有同级子菜单 - $this.parent('.mdui-menu').children('.mdui-menu-item').each(function () { - var $tmpSubmenu = $(this).children('.mdui-menu'); - if ( - $tmpSubmenu.length && - (!$submenu.length || !$tmpSubmenu.is($submenu)) - ) { - closeSubMenu($tmpSubmenu); - } - }); - - // 切换当前子菜单 - if ($submenu.length) { - toggleSubMenu($submenu); - } - }); - - if (inst.options.subMenuTrigger === 'hover') { - // 临时存储 setTimeout 对象 - var timeout; - - var timeoutOpen; - var timeoutClose; - - inst.$menu.on('mouseover mouseout', '.mdui-menu-item', function (e) { - var $this = $(this); - var eventType = e.type; - var $relatedTarget = $(e.relatedTarget); - - // 禁用状态的菜单不操作 - if ($this.attr('disabled') !== null) { - return; - } - - // 用 mouseover 模拟 mouseenter - if (eventType === 'mouseover') { - if (!$this.is($relatedTarget) && $.contains($this[0], $relatedTarget[0])) { - return; - } - } - - // 用 mouseout 模拟 mouseleave - else if (eventType === 'mouseout') { - if ($this.is($relatedTarget) || $.contains($this[0], $relatedTarget[0])) { - return; - } - } - - // 当前菜单项下的子菜单,未必存在 - var $submenu = $this.children('.mdui-menu'); - - // 鼠标移入菜单项时,显示菜单项下的子菜单 - if (eventType === 'mouseover') { - if ($submenu.length) { - - // 当前子菜单准备打开时,如果当前子菜单正准备着关闭,不用再关闭了 - var tmpClose = $submenu.data('timeoutClose.mdui.menu'); - if (tmpClose) { - clearTimeout(tmpClose); - } - - // 如果当前子菜单已经打开,不操作 - if ($submenu.hasClass('mdui-menu-open')) { - return; - } - - // 当前子菜单准备打开时,其他准备打开的子菜单不用再打开了 - clearTimeout(timeoutOpen); - - // 准备打开当前子菜单 - timeout = timeoutOpen = setTimeout(function () { - openSubMenu($submenu); - }, inst.options.subMenuDelay); - - $submenu.data('timeoutOpen.mdui.menu', timeout); - } - } - - // 鼠标移出菜单项时,关闭菜单项下的子菜单 - else if (eventType === 'mouseout') { - if ($submenu.length) { - - // 鼠标移出菜单项时,如果当前菜单项下的子菜单正准备打开,不用再打开了 - var tmpOpen = $submenu.data('timeoutOpen.mdui.menu'); - if (tmpOpen) { - clearTimeout(tmpOpen); - } - - // 准备关闭当前子菜单 - timeout = timeoutClose = setTimeout(function () { - closeSubMenu($submenu); - }, inst.options.subMenuDelay); - - $submenu.data('timeoutClose.mdui.menu', timeout); - } - } - }); - } - }; - - /** - * 菜单 - * @param anchorSelector 点击该元素触发菜单 - * @param menuSelector 菜单 - * @param opts 配置项 - * @constructor - */ - function Menu(anchorSelector, menuSelector, opts) { - var _this = this; - - // 触发菜单的元素 - _this.$anchor = $(anchorSelector).eq(0); - if (!_this.$anchor.length) { - return; - } - - // 已通过自定义属性实例化过,不再重复实例化 - var oldInst = _this.$anchor.data('mdui.menu'); - if (oldInst) { - return oldInst; - } - - _this.$menu = $(menuSelector).eq(0); - - // 触发菜单的元素 和 菜单必须是同级的元素,否则菜单可能不能定位 - if (!_this.$anchor.siblings(_this.$menu).length) { - return; - } - - _this.options = $.extend({}, DEFAULT, (opts || {})); - _this.state = 'closed'; - - // 是否是级联菜单 - _this.isCascade = _this.$menu.hasClass('mdui-menu-cascade'); - - // covered 参数处理 - if (_this.options.covered === 'auto') { - _this.isCovered = !_this.isCascade; - } else { - _this.isCovered = _this.options.covered; - } - - // 点击触发菜单切换 - _this.$anchor.on('click', function () { - _this.toggle(); - }); - - // 点击菜单外面区域关闭菜单 - $document.on('click touchstart', function (e) { - var $target = $(e.target); - if ( - (_this.state === 'opening' || _this.state === 'opened') && - !$target.is(_this.$menu) && - !$.contains(_this.$menu[0], $target[0]) && - !$target.is(_this.$anchor) && - !$.contains(_this.$anchor[0], $target[0]) - ) { - _this.close(); - } - }); - - // 点击不含子菜单的菜单条目关闭菜单 - $document.on('click', '.mdui-menu-item', function (e) { - var $this = $(this); - if (!$this.find('.mdui-menu').length && $this.attr('disabled') === null) { - _this.close(); - } - }); - - // 绑定点击或鼠标移入含子菜单的条目的事件 - bindSubMenuEvent(_this); - - // 窗口大小变化时,重新调整菜单位置 - $window.on('resize', $.throttle(function () { - readjust(_this); - }, 100)); - } - - /** - * 切换菜单状态 - */ - Menu.prototype.toggle = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - _this.close(); - } else if (_this.state === 'closing' || _this.state === 'closed') { - _this.open(); - } - }; - - /** - * 动画结束回调 - * @param inst - */ - var transitionEnd = function (inst) { - inst.$menu.removeClass('mdui-menu-closing'); - - if (inst.state === 'opening') { - inst.state = 'opened'; - componentEvent('opened', 'menu', inst, inst.$menu); - } - - if (inst.state === 'closing') { - inst.state = 'closed'; - componentEvent('closed', 'menu', inst, inst.$menu); - - // 关闭后,恢复菜单样式到默认状态,并恢复 fixed 定位 - inst.$menu.css({ - top: '', - left: '', - width: '', - position: 'fixed', - }); - } - }; - - /** - * 打开菜单 - */ - Menu.prototype.open = function () { - var _this = this; - - if (_this.state === 'opening' || _this.state === 'opened') { - return; - } - - _this.state = 'opening'; - componentEvent('open', 'menu', _this, _this.$menu); - - // 调整菜单位置 - readjust(_this); - - _this.$menu - - // 菜单隐藏状态使用使用 fixed 定位。 - .css('position', _this.options.fixed ? 'fixed' : 'absolute') - - // 打开菜单 - .addClass('mdui-menu-open') - - // 打开动画完成后 - .transitionEnd(function () { - transitionEnd(_this); - }); - }; - - /** - * 关闭菜单 - */ - Menu.prototype.close = function () { - var _this = this; - if (_this.state === 'closing' || _this.state === 'closed') { - return; - } - - _this.state = 'closing'; - componentEvent('close', 'menu', _this, _this.$menu); - - // 菜单开始关闭时,关闭所有子菜单 - _this.$menu.find('.mdui-menu').each(function () { - closeSubMenu($(this)); - }); - - _this.$menu - .removeClass('mdui-menu-open') - .addClass('mdui-menu-closing') - .transitionEnd(function () { - transitionEnd(_this); - }); - }; - - return Menu; - })(); - - - /** - * ============================================================================= - * ************ Menu 自定义属性 API ************ - * ============================================================================= - */ - - $(function () { - $document.on('click', '[mdui-menu]', function () { - var $this = $(this); - - var inst = $this.data('mdui.menu'); - if (!inst) { - var options = parseOptions($this.attr('mdui-menu')); - var menuSelector = options.target; - delete options.target; - - inst = new mdui.Menu($this, menuSelector, options); - $this.data('mdui.menu', inst); - - inst.toggle(); - } - }); - }); - - - /* jshint ignore:start */ - mdui.JQ = $; - return mdui; -}))); -/* jshint ignore:end */ diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 474fe9b..0000000 --- a/manifest.json +++ /dev/null @@ -1 +0,0 @@ -{ "name": "feios time", "short_name": "feios time", "theme_color": "#DADADA", "background_color": "#FAFAFA", "display": "standalone", "Scope": "/", "start_url": "/", "icons": [{ "src": "/pwa/logo/android-chrome-128x128.png", "sizes": "128x128", "type": "image/png" }, { "src": "/pwa/logo/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }], "splash_pages": null } \ No newline at end of file diff --git a/mc-server-mcnes/MCNES.jpg b/mc-server-mcnes/MCNES.jpg deleted file mode 100644 index 806fd34..0000000 Binary files a/mc-server-mcnes/MCNES.jpg and /dev/null differ diff --git a/mc-server-mcnes/MCNES.png b/mc-server-mcnes/MCNES.png deleted file mode 100644 index 0796db5..0000000 Binary files a/mc-server-mcnes/MCNES.png and /dev/null differ diff --git a/mc-server-mcnes/index.html b/mc-server-mcnes/index.html deleted file mode 100644 index 0012e92..0000000 --- a/mc-server-mcnes/index.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - Minecraft服务器 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- Minecraft服务器 -

Minecraft服务器

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

-

MCNES可以分开理解,MC代表Minecraft;NES代表最初的乐趣。这是一个送给老朋友的礼物🎁

- - -

服务器概况

公益服,所有内容无需氪金
目前运行在2h4g1m阿里云上,实测实际带宽远高于1m
1.15.2一个玩家所需要的性能大于之前的版本,预测只能同时3人畅玩

-
    -
  • 开服1.15.2版本
  • -
  • 文档网站
    服务器采用正版+盗版机制,正版获得正版玩家称号、走正版验证自动登录、在tab菜单显示正版头像
  • -
-

拓展玩法类因为服务器性能问题暂时不做

-

基础类

    -
  • 原版生存
  • -
  • 整合客户端
  • -
  • 主城
  • -
  • 菜单
  • -
  • 随机传送
  • -
  • 掉落物名称显示
  • -
  • 玩家的 tp / tphere
  • -
  • 全息显示
  • -
  • 领地
  • -
  • 箱子锁
  • -
-

增值服务

    -
  • vip
  • -
  • 渐进式装备强化(高级附魔)
  • -
  • 高级成就
  • -
  • 职业
  • -
  • mcMMO
  • -
  • 通行证系统
  • -
  • 聊天强化
  • -
  • 抽奖
  • -
  • npc
  • -
  • 电梯
  • -
  • 排行榜
  • -
  • 宠物
  • -
  • 箭矢特效
  • -
  • 快捷商店(实体商店)
  • -
  • 玩家交易
  • -
  • 全球商店
  • -
  • 拍卖
  • -
  • 经济系统
  • -
  • 每日签到
  • -
-

拓展玩法类

    -
  • 空岛
  • -
  • pvp
  • -
  • 副本
  • -
  • 剧情(任务)
  • -
  • 1
  • -
-

个人汉化的插件

    -
  • AdvancedAchievements
  • -
  • AdvancedLogin
  • -
  • SkyblockX
  • -
  • BattlePass
  • -
  • CrazyCrates
  • -
  • Elevator
  • -
  • QuickShop
  • -
-

结束

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nexmoe-redesign/index.html b/nexmoe-redesign/index.html deleted file mode 100644 index 8d79252..0000000 --- a/nexmoe-redesign/index.html +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - 魔改主题:nexmoe质感设计 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 魔改主题:nexmoe质感设计 -

魔改主题:nexmoe质感设计

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

-

首先,感谢大佬开发出本主题,代码思路清晰、格式优雅

-

初试Hexo,挑选主题的时候在众多主题中一眼看中它,发现开发者特别眼熟…后来发现竟然在一个群里,真是缘分啊!

- - -

最近一次更新去掉了我很喜欢的图片灯箱功能,改回来的过程中发现主题代码思路清晰、格式优雅,突然对主题的设计有了新思路。本人喜欢拟物+模糊效果,我想改的更极致一点

-

作为一个没有开发过主题的我,没有比这更好的入门教材了

-

图有时间补上

-

修改内容

质感化

    -
  • 边栏材料化:
  • -
- -
    -
  • 主图border改成阴影
  • -
  • 文章区域顶部由直角改为贴合主图的弧度(这里感谢作者)
  • -
  • 评论区质感化
  • -
  • 翻页按钮质感化
  • -
  • 主图上的标题文字在不影响美观的情况下更好辨认
  • -
  • 手机版页面drawer背景改为ios同款模糊
  • -
-

bug修复

    -
  • ios版Safari上主图变方
  • -
-

其他修改:

    -
  • 头像下方标签改为字数,表示博客文章总字数
  • -
  • 加深文章区和widget的阴影
  • -
  • 页面底部加上淡蓝色阴影
  • -
  • 去掉文章页图片border
  • -
-

待修改的内容

    -
  • 代码高亮质感化
  • -
  • 代码部分换成JetBrains Mono字体
  • -
-

已知bug:

各个页面宽度可能不一样,原版没有这个问题

-

注意

使用以下浏览器可以获得更好的体验
0
1

- -

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/osx-in-2020/index.html b/osx-in-2020/index.html deleted file mode 100644 index f9075b7..0000000 --- a/osx-in-2020/index.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - - - 体验·拟物设计的巅峰 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 体验·拟物设计的巅峰 -

体验·拟物设计的巅峰

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

-

⚠️超多图片预警,内容包括

-
    -
  1. PD安装旧版Mac
  2. -
  3. 体验拟物化设计
  4. -
- - -

屏幕快照 2020-05-06 上午2.24.04.png

-
-在2020年体验Mavericks -
- -

安装

一直很喜欢拟物设计,特别是OS X 10.9和iOS6及之前的,可惜近年来扁平浪潮一发不可挡,每次买设备都完美避开拟物化设计最后的波浪,想想已经很多年没有用过拟物化设计的设备了。
最近看了几个乔布斯的发布会,看到那些精美的拟物化界面之后实在忍不住了。

-

既然要体验巅峰,肯定选最后一个拟物设计的系统10.9

-

但是在2020年安装OS X 10.9 Mavericks着实不是一件容易的事情,网上的教程停留在几年前,已经不太适应现在的环境,折腾了一天终于安装上了

-

教程开始

首先需要一个Parallels Desktop虚拟机,也就是传说中的PD虚拟机。当然VMWare也可以,但vmware在win上也能用,没意思。

-

准备工作

    -
  • Parallels Desktop虚拟机
  • -
  • OS X 10.9 Mavericks完整镜像
  • -
  • 一个大于8G的空u盘(至于为什么后面会说,可能有更好的办法)
  • -
-

⬇️如果对我怎么折腾感兴趣的话,可以打开瞧瞧,因为觉得啰嗦还是折叠了

-
- 非常啰嗦的折腾过程 -第一次打开PD,会弹出这个界面 - -

屏幕快照 2020-05-03 下午7.11.30.png

-

竟然能直接把Boot Camp系统拿过来用。。。孤落寡闻了

-

屏幕快照 2020-05-03 下午7.11.47.png

-

直接用镜像新建虚拟机

-

屏幕快照 2020-05-03 下午7.12.15.png

-

开机,漂亮的图标出来了

-

屏幕快照 2020-05-03 下午7.12.45.png

-

到此一切正常

-

屏幕快照 2020-05-03 下午7.14.35.png

-

熟练的点开安装

-

屏幕快照 2020-05-03 下午7.14.51.png

-

⚠️这里第一个问题出现了

-

屏幕快照 2020-05-03 下午7.15.12.png

-

本来以为这是我操作不当的原因,重新建了几个虚拟机还是有这个问题。
细想了一下,出现这个问题大概是因为系统安装需要经历复制文件-重启-安装的过程,如果镜像的分区不能读写,无法完成以下操作,对于已经安装了mac系统的情况下,挂载安装镜像之后,把里面的安装 OS X Mavericks.app拖到桌面上再运行就可以了,但对于没有任何系统的虚拟机来说不行。

-

屏幕快照 2020-05-06 上午12.30.19.png

-

对于虚拟机的情况,威锋网有一个2017年的帖子介绍了方法

-

- - - - 锋友分享:在PD虚拟机上安装老版本OS X - - ​ - - - www.feng.com - - - - 图标 - - -

-

但我尝试几次之后之后都是开机禁行,而且之后用u盘启动也是一样,不知道是因为我方法不对还是因为不适合现在新的环境

-

屏幕快照 2020-05-03 下午8.55.15.png

-

那么我直接用InstallESD.dmg里的BaseSystem.dmg启动呢?
BaseSystem.dmg其实和白苹果的recovery分区有相同的作用,可以联网恢复系统(我打开之后才知道的)

-

屏幕快照 2020-05-04 上午12.34.45.png

-

屏幕快照 2020-05-04 上午12.35.02.png

-

当时打开看到联网恢复的时候激动了一下,但又被现实浇灭了

-

屏幕快照 2020-05-04 上午12.35.19.png

-

屏幕快照 2020-05-04 上午12.37.09.png

-

网上查了一下,这个已经下架了,但几年前的帖子说其他地区没下架,抱着试试看的态度,找朋友借了个号,试了一下日区。。。嗯还是熟悉的味道

-

屏幕快照 2020-05-05 下午3.48.52.png

-

好了,你展开的啰嗦的折腾过程到此结束,下面是正确做法

-
-
- -
    -
  1. 下载好镜像
    屏幕快照 2020-05-06 上午1.02.32.png
    使用磁盘工具恢复到你准备的U盘里
    屏幕快照 2020-05-06 上午1.03.39.png
    如果恢复失败,可以用balenaEtcher
    - - - - balenaEtcher - - ​ - - - www.balena.io - - - - 图标 - - -

    -
  2. -
  3. 修改启动顺序,设置你刚刚做好的U盘为外部引导设备
    屏幕快照 2020-05-06 上午1.09.58.png

    -
  4. -
  5. 这样就能正常进入安装界面了
    屏幕快照 2020-05-05 下午7.09.15.png

    -
  6. -
-

⚠️如果卡在最后1秒钟,可以尝试返回开始的界面,使用磁盘工具Macintosh HD改成MacHDD,不知道是什么原理。

-

重启之后进入第二阶段安装,等待安装完毕
屏幕快照 2020-05-05 下午8.16.44.png

-

点击虚拟机右上角⚠️按钮安装增强工具
屏幕快照 2020-05-05 下午8.42.58.png

-

开机设置图赏

- 多图,点击展开 - -

屏幕快照 2020-05-05 下午8.35.28.png

-

屏幕快照 2020-05-05 下午8.37.20.png
屏幕快照 2020-05-05 下午8.37.39.png
13年的系统竟然支持双重认证
屏幕快照 2020-05-05 下午8.38.10.png
这里的键盘是第一代Magic keyboard,pd虚拟机会直接用宿主机的硬件信息,所以这里识别的是台式(虽然这是一个2013年不存在的型号)
屏幕快照 2020-05-05 下午8.37.14.png

-
- -

屏幕快照 2020-05-05 下午8.40.27.png

-
- -

屏幕快照 2020-05-05 下午8.40.49.png
屏幕快照 2020-05-05 下午8.41.01.png

-
- -

体验拟物

- -

走马观花的概览

屏幕快照 2020-05-05 下午8.41.30.png

-

屏幕快照 2020-05-05 下午8.52.49.png
⬆️新安装应用会有biling✨biling✨的效果
可以在App Store安装旧版应用(首先要已购买,什么时候获取的都行)
屏幕快照 2020-05-06 上午2.20.08.png
⬆️应用抽屉
屏幕快照 2020-05-06 上午1.54.35.png
⬆️可能是第一个支持HIDPI的系统吧
屏幕快照 2020-05-06 上午2.32.28.png
⬆️缩放到最大依然细腻
屏幕快照 2020-05-06 上午1.57.17.png
⬆️厚重的拟物,爱了
屏幕快照 2020-05-06 上午2.15.46.png
⬆️iTunes更新完界面就和新版界面一样了,之前的界面有种回到了小时候的感觉
屏幕快照 2020-05-06 上午1.56.18.png
⬆️安装的Office 2011sp1还不支持高分辨率,相比系统界面有点糊

-

两张大图

屏幕快照 2020-05-06 上午1.55.49.jpg
屏幕快照 2020-05-06 上午2.05.44.jpg

-

窗口截图

屏幕快照 2020-05-05 上午7.20.59.png
⬆️微信已经无法登录

-

屏幕快照 2020-05-06 上午2.31.48.png
⬆️张扬的圆角,后续版本减弱了弧度,但依然有吸附的效果

-

这样的Office界面,你打几分?

屏幕快照 2020-05-05 下午10.49.14.png
屏幕快照 2020-05-05 下午10.54.19.png
屏幕快照 2020-05-05 下午10.54.30.png
屏幕快照 2020-05-05 下午10.54.40.png

-
-

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/page/2/index.html b/page/2/index.html deleted file mode 100644 index 39264b1..0000000 --- a/page/2/index.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- - -
- GRE笔记 -

GRE笔记

-
- -
- - - - - -
- -

power

- -
-
- -
- - -
- 我对于iOS/macOS/Android/Windows感性的感受 -

我对于iOS/macOS/Android/Windows感性的感受

-
- -
- - - - - -
- -

这篇文章的起因是在b站主页翻到了一个介绍苹果交互体验的视频,发现地下评论有一些人带节奏,我想着用我自己多年的玩机经验来一个特别的评论,有感而发,越写越长,就有了以下文章

- -
-
- -
- - -
- Hexo中的媒体播放器 -

Hexo中的媒体播放器

-
- -
- - - - - -
- -

APlayer、DPlayer 和 cPlayer

- -
-
- -
- - -
- 转场新尝试 - 截图转场 -

转场新尝试 - 截图转场

-
- -
- - - - - -
- -

仿ios截图动画

- -
-
- -
- - -
- 为编程而生的字体 -

为编程而生的字体

-
- -
- - - - - -
- -

1月16号,JetBrains推出了一种优化代码观感的字体:JetBrains Mono

-

看到这个消息第一反应很正常,近些年文字辨识度代替了美观程度成了新的潮流,苹果为了在Apple Watch的小屏幕上有更好的体验,重新设计了中文字体“苹方”,还有谷歌的思源黑体和小米的小米兰亭等等

-

所以在体验这款字体之前,我思维定势般的以为这个字体只有代码可读性上的优化…

- -
-
- -
- - -
- ESP8266简单玩法·图片集 -

ESP8266简单玩法·图片集

-
- -
- - - - - -
- -

最近因为一个视频入手了ESP8266

- -
-
- -
- - -
- 安装Hexo小记 -

安装Hexo小记

-
- -
- - - - - -
- -

Hexo: A fast, simple & powerful blog framework (官网介绍)

-

维护服务器是一件很麻烦的事情,有没有一种办法可以长期存在并且不用维护呢,Github page + Hexo是一个方案

- -
-
- -
- - -
- Hello World -

Hello World

-
- -
- - - - - -
- -

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

- -
-
- -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/play-ESP8266/index.html b/play-ESP8266/index.html deleted file mode 100644 index a9a9105..0000000 --- a/play-ESP8266/index.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - ESP8266简单玩法·图片集 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- ESP8266简单玩法·图片集 -

ESP8266简单玩法·图片集

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

-

最近因为一个视频入手了ESP8266

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

这个固件需要先连上开发版的wifi,进入192.168.4.1设置连接wifi,但似乎断电不会保存,需要重新设置

-

视频链接

20元做一个顶级旗舰主板上才有的小屏幕(OLED):av81431421
一分钟教你做OLED时钟,ESP8266一键刷机方法与小白常见问题:av82863964

-

用它可以实现一些简单的物联网设想

-

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pwa/logo/android-chrome-128x128.png b/pwa/logo/android-chrome-128x128.png deleted file mode 100644 index 18eb335..0000000 Binary files a/pwa/logo/android-chrome-128x128.png and /dev/null differ diff --git a/pwa/logo/android-chrome-512x512.png b/pwa/logo/android-chrome-512x512.png deleted file mode 100644 index acd8592..0000000 Binary files a/pwa/logo/android-chrome-512x512.png and /dev/null differ diff --git a/screenshots-transitions-in-fcpx/index.html b/screenshots-transitions-in-fcpx/index.html deleted file mode 100644 index 46c29c0..0000000 --- a/screenshots-transitions-in-fcpx/index.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - 转场新尝试 - 截图转场 - feios time - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- -
- - feios -
-
-
-
-
-
- - feios - -
-
-
文章18
- -
字数23.9k
-
分类4
-
- - - -
-
-
-
-
- -
- 转场新尝试 - 截图转场 -

转场新尝试 - 截图转场

-
- - - - - - - -
- -
-
-
-
  1. 1. 思路
-
-
-
- -
- -
-

-

仿ios截图动画

- - -
- -

思路

如果有ios设备,录屏一个截图过程然后扣关键帧
1

-

如果没有ios设备,我这里有录好的片段下载

-
-

-
- - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/screenshots-transitions-in-fcpx/screenshot-video.mp4 b/screenshots-transitions-in-fcpx/screenshot-video.mp4 deleted file mode 100644 index e172f10..0000000 Binary files a/screenshots-transitions-in-fcpx/screenshot-video.mp4 and /dev/null differ diff --git a/service-worker.js b/service-worker.js deleted file mode 100644 index 72cda08..0000000 --- a/service-worker.js +++ /dev/null @@ -1,268 +0,0 @@ -/** - * Copyright 2016 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -// DO NOT EDIT THIS GENERATED OUTPUT DIRECTLY! -// This file should be overwritten as part of your build process. -// If you need to extend the behavior of the generated service worker, the best approach is to write -// additional code and include it using the importScripts option: -// https://github.com/GoogleChrome/sw-precache#importscripts-arraystring -// -// Alternatively, it's possible to make changes to the underlying template file and then use that as the -// new base for generating output, via the templateFilePath option: -// https://github.com/GoogleChrome/sw-precache#templatefilepath-string -// -// If you go that route, make sure that whenever you update your sw-precache dependency, you reconcile any -// changes made to this original template file with your modified copy. - -// This generated service worker JavaScript will precache your site's resources. -// The code needs to be saved in a .js file at the top-level of your site, and registered -// from your pages in order to be used. See -// https://github.com/googlechrome/sw-precache/blob/master/demo/app/js/service-worker-registration.js -// for an example of how you can register this script and handle various service worker events. - -/* eslint-env worker, serviceworker */ -/* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */ -'use strict'; - -var precacheConfig = [["/AppleALC-to-AppleHDA/index.html","eccf70bddedd90e06688b8bcce35db64"],["/Dactyl-ManuForm-Keyboard/index.html","9008c7af6c7e2352991b17010b43674a"],["/GPMS-Design/index.html","f747a3a03e9f659f6ca2930966e43d34"],["/GRE-Learning-notes/index.html","c1dde3b14c6b5dbd78d5903de1162143"],["/Hexmoe/index.html","9726321961f8ddeafc663168efbd1a9c"],["/Hexo/index.html","eaab21870f2e0bc69ee7f0175a2222eb"],["/Magic-Trackpad-2/index.html","64a6b784eb072f3676ab62dfd01a17db"],["/My-feeling-about-Apple-and-Microsoft/index.html","94ef9eb86be476e2afa657aead14ad1d"],["/PY.html","c8eb9e824e72728334760cf0a793efd1"],["/To-DW1820a/MCNES.jpg","a5242d98a79c9d480acf4c69279b5aa4"],["/To-DW1820a/index.html","be37106189fb0262221b613454627cea"],["/about.html","8d5cf4625c68374877c231e067dcaf0a"],["/aplayer-and-dplayer/index.html","be72570174a538495ca88dcafb8f0bf3"],["/archives/2020/01/index.html","ace2f594c14c9a2997f8cd4f22c9d4c4"],["/archives/2020/02/index.html","43267d3b7c78ea630a216a09fe9030e9"],["/archives/2020/03/index.html","879fc0213d64a7aa118ca12bbbdd508d"],["/archives/2020/04/index.html","548c573f39ab3014f03dcab707b32446"],["/archives/2020/05/index.html","83f358fde6fe6b9ebeb30e1a306bd452"],["/archives/2020/index.html","6eeb5e94ab64b970c346d96fbbf3c09b"],["/archives/2020/page/2/index.html","e808898c4b6aeaff60f7f58d92600c03"],["/archives/2021/02/index.html","526d787c9119e075f44eccc553d4a65a"],["/archives/2021/index.html","d0f90fcb779565b315d653b3737bc6d6"],["/archives/2022/03/index.html","4819528f67370e7b702008be222eebdd"],["/archives/2022/04/index.html","950bce20b5673313f00c36f994879c57"],["/archives/2022/index.html","c63f905682d33b4eaf9b15e30391b9b5"],["/archives/index.html","d1e04b278b3caa2fdae51543f185d379"],["/archives/page/2/index.html","730d16c2af498579cacb0a77c882fad0"],["/assets/css/APlayer.min.css","fbe994054426fadb2dff69d824c5c67a"],["/assets/css/DPlayer.min.css","31ac9b1a5a7f018dcc9a0e0f66261c08"],["/assets/js/APlayer.min.js","8f1017e7a73737e631ff95fa51e4e7d7"],["/assets/js/DPlayer.min.js","4097986cff510567068128f4b18004a6"],["/assets/js/Meting.min.js","bfac0368480fd344282ec018d28f173d"],["/build-frp-server/android-192x192.png","71aabbab45fe85ba15ec6c624bbef831"],["/build-frp-server/favicon-32x32.png","10c0e4bdf32ccacdffe62428007a9178"],["/build-frp-server/index.html","60c9b8407a0535451c39fb9c1cce453b"],["/build-frp-server/pinned-octocat.svg","04bd217449cdb8dfb2d1ca02bf880c4d"],["/categories/作品/index.html","64f5a68411bb179f900d8c579131aff3"],["/categories/学习/index.html","cae891b0344856fc27a265f1c638a438"],["/categories/折腾/index.html","80a6759375e77f5f995d7dc5020fe47e"],["/categories/折腾/page/2/index.html","8b1500939ddc012352e7292110bcb7e5"],["/categories/设备/index.html","150dc09ed2d55c8ca0d9d5d5726b7408"],["/change-system-drive/index.html","9636dd5698276cfb89e2771d50d32af0"],["/css/style.css","fe290dc5c0c6a859a3d29b66e71a6e75"],["/css/zoom.css","891b5cede6a6fd94b873656a9ff2824d"],["/fonts-in-vscode/index.html","28be1f86998f42e9f60784f0b7f823e1"],["/hello-world/index.html","18f08aa8d0235aa4d08af405df802016"],["/images/avatar.png","5c75e62586b5958d84241bbf8da49156"],["/images/cover.jpg","23c86a0aad355e7fd7465cb8f7fca026"],["/index.html","93d34daffcff069de11410b059c77d8f"],["/install-Hexo/index.html","8d3d7f4473b780a00fecf01daf52f453"],["/js/app.js","b38d006831c0caf5bb9d20399b3e4833"],["/js/bootstrap.min.js","2f34b630ffe30ba2ff2b91e3f3c322a1"],["/js/fancybox-inject-full.js","b1bf0794700e8a6678e92fb32b854590"],["/js/fancybox-inject.js","816ec0cf2d77a546b8de7aeb4d761fed"],["/js/transition.js","6e60d662a42a54f58b7f39a5a077bcb1"],["/js/zoom-inject.js","de098a9285249abf4e9ace54b9f47001"],["/js/zoom.js","7b1242ff134c9d4400398ed81520978b"],["/js/zoom.min.js","82a393b9c03fafb012b5d56b2cab79c7"],["/lib/iconfont/demo.css","31103ad158e19b978f7e730ff5ac959b"],["/lib/iconfont/demo_index.html","66a89300bb5f8470f9d7a802956b7c35"],["/lib/iconfont/iconfont.css","7d548fe2d0e4ad4245c9602badb85ce7"],["/lib/iconfont/iconfont.eot","c1f105daf2849b315528378fc5108b65"],["/lib/iconfont/iconfont.js","7ba6bf06efe3dec04f41b6b1ad74e962"],["/lib/iconfont/iconfont.svg","877e4f9a3023e0e46c789e1c86384135"],["/lib/iconfont/iconfont.ttf","8dd90136d11ee5aef619a16dfd773dab"],["/lib/iconfont/iconfont.woff","a855e7b5e83fac7050ea141baca33075"],["/lib/iconfont/iconfont.woff2","4909054796cfcc808cc878659e4cefeb"],["/lib/mdui_043tiny/css/mdui.css","8fa58c17333084f34e2638a973f3a973"],["/lib/mdui_043tiny/js/mdui.js","b83d858e2a8dc8b0e92cefe8ae619939"],["/mc-server-mcnes/MCNES.jpg","111cccbd75aee17b3198cde95c1ca0c4"],["/mc-server-mcnes/MCNES.png","3010c86ffa55dc25cf080533a991d2bd"],["/mc-server-mcnes/index.html","682267c85014051fe1cccd3c4bc1fd4d"],["/nexmoe-redesign/index.html","3d152e7e990dba827c7e8c1d18d5044f"],["/osx-in-2020/index.html","bf873d80877e30d5fdc01d021ecffb7a"],["/page/2/index.html","286cfcb3ae674918742803135a792dfc"],["/play-ESP8266/index.html","ea1418ecfb03cf67601d944f0d36a00f"],["/pwa/logo/android-chrome-128x128.png","05a7566338a72aa388dc291ec224f198"],["/pwa/logo/android-chrome-512x512.png","8616523c69e8bff9098405c5f9a3ed2f"],["/screenshots-transitions-in-fcpx/index.html","a0e24f2985c99968cd92e1a14025247c"],["/sw.js","b576765c0d0c445dcb7ad74fc9209633"]]; -var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : ''); - - -var ignoreUrlParametersMatching = [/^utm_/]; - - - -var addDirectoryIndex = function(originalUrl, index) { - var url = new URL(originalUrl); - if (url.pathname.slice(-1) === '/') { - url.pathname += index; - } - return url.toString(); - }; - -var cleanResponse = function(originalResponse) { - // If this is not a redirected response, then we don't have to do anything. - if (!originalResponse.redirected) { - return Promise.resolve(originalResponse); - } - - // Firefox 50 and below doesn't support the Response.body stream, so we may - // need to read the entire body to memory as a Blob. - var bodyPromise = 'body' in originalResponse ? - Promise.resolve(originalResponse.body) : - originalResponse.blob(); - - return bodyPromise.then(function(body) { - // new Response() is happy when passed either a stream or a Blob. - return new Response(body, { - headers: originalResponse.headers, - status: originalResponse.status, - statusText: originalResponse.statusText - }); - }); - }; - -var createCacheKey = function(originalUrl, paramName, paramValue, - dontCacheBustUrlsMatching) { - // Create a new URL object to avoid modifying originalUrl. - var url = new URL(originalUrl); - - // If dontCacheBustUrlsMatching is not set, or if we don't have a match, - // then add in the extra cache-busting URL parameter. - if (!dontCacheBustUrlsMatching || - !(url.pathname.match(dontCacheBustUrlsMatching))) { - url.search += (url.search ? '&' : '') + - encodeURIComponent(paramName) + '=' + encodeURIComponent(paramValue); - } - - return url.toString(); - }; - -var isPathWhitelisted = function(whitelist, absoluteUrlString) { - // If the whitelist is empty, then consider all URLs to be whitelisted. - if (whitelist.length === 0) { - return true; - } - - // Otherwise compare each path regex to the path of the URL passed in. - var path = (new URL(absoluteUrlString)).pathname; - return whitelist.some(function(whitelistedPathRegex) { - return path.match(whitelistedPathRegex); - }); - }; - -var stripIgnoredUrlParameters = function(originalUrl, - ignoreUrlParametersMatching) { - var url = new URL(originalUrl); - // Remove the hash; see https://github.com/GoogleChrome/sw-precache/issues/290 - url.hash = ''; - - url.search = url.search.slice(1) // Exclude initial '?' - .split('&') // Split into an array of 'key=value' strings - .map(function(kv) { - return kv.split('='); // Split each 'key=value' string into a [key, value] array - }) - .filter(function(kv) { - return ignoreUrlParametersMatching.every(function(ignoredRegex) { - return !ignoredRegex.test(kv[0]); // Return true iff the key doesn't match any of the regexes. - }); - }) - .map(function(kv) { - return kv.join('='); // Join each [key, value] array into a 'key=value' string - }) - .join('&'); // Join the array of 'key=value' strings into a string with '&' in between each - - return url.toString(); - }; - - -var hashParamName = '_sw-precache'; -var urlsToCacheKeys = new Map( - precacheConfig.map(function(item) { - var relativeUrl = item[0]; - var hash = item[1]; - var absoluteUrl = new URL(relativeUrl, self.location); - var cacheKey = createCacheKey(absoluteUrl, hashParamName, hash, false); - return [absoluteUrl.toString(), cacheKey]; - }) -); - -function setOfCachedUrls(cache) { - return cache.keys().then(function(requests) { - return requests.map(function(request) { - return request.url; - }); - }).then(function(urls) { - return new Set(urls); - }); -} - -self.addEventListener('install', function(event) { - event.waitUntil( - caches.open(cacheName).then(function(cache) { - return setOfCachedUrls(cache).then(function(cachedUrls) { - return Promise.all( - Array.from(urlsToCacheKeys.values()).map(function(cacheKey) { - // If we don't have a key matching url in the cache already, add it. - if (!cachedUrls.has(cacheKey)) { - var request = new Request(cacheKey, {credentials: 'same-origin'}); - return fetch(request).then(function(response) { - // Bail out of installation unless we get back a 200 OK for - // every request. - if (!response.ok) { - throw new Error('Request for ' + cacheKey + ' returned a ' + - 'response with status ' + response.status); - } - - return cleanResponse(response).then(function(responseToCache) { - return cache.put(cacheKey, responseToCache); - }); - }); - } - }) - ); - }); - }).then(function() { - - // Force the SW to transition from installing -> active state - return self.skipWaiting(); - - }) - ); -}); - -self.addEventListener('activate', function(event) { - var setOfExpectedUrls = new Set(urlsToCacheKeys.values()); - - event.waitUntil( - caches.open(cacheName).then(function(cache) { - return cache.keys().then(function(existingRequests) { - return Promise.all( - existingRequests.map(function(existingRequest) { - if (!setOfExpectedUrls.has(existingRequest.url)) { - return cache.delete(existingRequest); - } - }) - ); - }); - }).then(function() { - - return self.clients.claim(); - - }) - ); -}); - - -self.addEventListener('fetch', function(event) { - if (event.request.method === 'GET') { - // Should we call event.respondWith() inside this fetch event handler? - // This needs to be determined synchronously, which will give other fetch - // handlers a chance to handle the request if need be. - var shouldRespond; - - // First, remove all the ignored parameters and hash fragment, and see if we - // have that URL in our cache. If so, great! shouldRespond will be true. - var url = stripIgnoredUrlParameters(event.request.url, ignoreUrlParametersMatching); - shouldRespond = urlsToCacheKeys.has(url); - - // If shouldRespond is false, check again, this time with 'index.html' - // (or whatever the directoryIndex option is set to) at the end. - var directoryIndex = 'index.html'; - if (!shouldRespond && directoryIndex) { - url = addDirectoryIndex(url, directoryIndex); - shouldRespond = urlsToCacheKeys.has(url); - } - - // If shouldRespond is still false, check to see if this is a navigation - // request, and if so, whether the URL matches navigateFallbackWhitelist. - var navigateFallback = ''; - if (!shouldRespond && - navigateFallback && - (event.request.mode === 'navigate') && - isPathWhitelisted([], event.request.url)) { - url = new URL(navigateFallback, self.location).toString(); - shouldRespond = urlsToCacheKeys.has(url); - } - - // If shouldRespond was set to true at any point, then call - // event.respondWith(), using the appropriate cache key. - if (shouldRespond) { - event.respondWith( - caches.open(cacheName).then(function(cache) { - return cache.match(urlsToCacheKeys.get(url)).then(function(response) { - if (response) { - return response; - } - throw Error('The cached response that was expected is missing.'); - }); - }).catch(function(e) { - // Fall back to just fetch()ing the request if some unexpected error - // prevented the cached response from being valid. - console.warn('Couldn\'t serve response for "%s" from cache: %O', event.request.url, e); - return fetch(event.request); - }) - ); - } - } -}); - - - - - - - diff --git a/sw.js b/sw.js deleted file mode 100644 index aad5143..0000000 --- a/sw.js +++ /dev/null @@ -1,17 +0,0 @@ -importScripts('https://g.alicdn.com/kg/workbox/3.3.0/workbox-sw.js'); - -if (workbox) { - workbox.setConfig({ modulePathPrefix: 'https://g.alicdn.com/kg/workbox/3.3.0/' }); - - workbox.precaching.precache(['/', '/index.html']); - - workbox.routing.registerRoute(new RegExp('^https?://www.feios.me/?$'), workbox.strategies.networkFirst()); - - workbox.routing.registerRoute(new RegExp('.*.html'), workbox.strategies.networkFirst()); - - workbox.routing.registerRoute(new RegExp('.*.(?:js|css)'), workbox.strategies.staleWhileRevalidate()); - - workbox.routing.registerRoute(new RegExp('^https?://i.loli.net/?$'), workbox.strategies.cacheFirst()); - - workbox.routing.registerRoute(new RegExp('^https?://blog-1256021060.cos.ap-shanghai.myqcloud.com/?$'), workbox.strategies.cacheFirst()); -} \ No newline at end of file