├── .DS_Store ├── 404.php ├── README.md ├── aplayer.php ├── archive.php ├── category ├── gallery.php └── timeline.php ├── comments.php ├── copyright.php ├── css └── style.css ├── footer.php ├── functions.php ├── header.php ├── images └── videobg.jpg ├── index.php ├── js ├── pageSwitch.min.js ├── practice01.js └── theia-sticky-sidebar.min.js ├── layer ├── layer.js ├── mobile │ ├── layer.js │ └── need │ │ └── layer.css └── theme │ └── default │ ├── icon-ext.png │ ├── icon.png │ ├── layer.css │ ├── loading-0.gif │ ├── loading-1.gif │ └── loading-2.gif ├── page-links.php ├── page-message-board.php ├── page-status.php ├── page.php ├── post.php ├── post_common.php ├── post_gallery.php ├── post_timeline.php ├── screenshot.png ├── search.php ├── show_avatar.php ├── sidebar.php ├── simplehome.php ├── theme_config.php ├── typeword.php └── videoplayer.php /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/.DS_Store -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 |
6 |
7 |
8 |
9 |
10 | next()): ?> 11 | 12 | 13 |
14 |
15 | pageLink('下一页','next'); ?> 16 |
17 |
18 |
19 |
20 |
21 | need('sidebar.php'); ?> 22 | need('footer.php'); ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 这是我工作之余每天抽一点点时间来制作的一个瀑布流布局无限加载主题,本人不是专业码农,制作这个主题纯属兴趣爱好,现分享出来,希望你们能够喜欢! 2 | 3 | [record]摘要 4 | 拖延症拖了这么久时间,终于下决心写一下关于这个主题的说明,然后发布提供给大家使用了,当然,完全免费,你可以在此基础上进行任何个性化修改,希望能保留源码中的版权信息,谢谢![/record] 5 | 6 | 主题使用中有任何问题都可以在此提问,基本上都可以得到回复:) 7 | 8 | ## 主题在线演示 9 | 10 | https://kisxy.com 11 | 12 | ## 关于Practice01 13 | 14 | 正如之前所说,这款主题是因练习而作的,主题名字Practice01也来源于此,同时也表示这是我写的第一个主题,那么当然在使用中可能会有一些问题存在,欢迎各位提出,我将在后续更新中修复! 15 | 16 | 这是一个自适应瀑布流布局,整合了文章列表无限加载,以及图片懒加载的适用于个人博客或者图片相册站的主题。 17 | 18 | ## 主题功能及特点简要介绍 19 | 20 | 主题特点是瀑布流布局,自适应屏幕宽度以及手机端界面 21 | 22 | 支持图片延时加载(图片懒加载) 23 | 24 | 文章列表无限滚动加载 25 | 26 | 页面左侧内容区和右侧边栏自动根据内容长度滚动时固定 27 | 28 | 页面滚动时菜单导航顶部固定 29 | 30 | 自由设置首页及分类页头部轮播图和链接地址 31 | 32 | 自由设置文章页头部大图及文字内容 33 | 34 | 以打字效果随机显示收藏短句 35 | 36 | 支持设置网站公告及查看以往公告 37 | 38 | 自由设置文章缩略图 39 | 40 | 文章列表页中的文章标题前会根据文章内容显示不同图标 41 | 42 | 可自定义每篇文章的标题颜色 43 | 44 | 主题支持独立相册功能,具有特定的展现形式 45 | 46 | 文章中支持通过短代码插入音乐、视频、相册 47 | 48 | 集成了代码高亮 49 | 50 | 支持友情链接,可分别设置在首页或内页显示的友链,支持链接分类,无需插件 51 | 52 | 主题设置中可填写备案号 53 | 54 | 重写了评论模块,评论回复自动添加回复字样,类似于@ 55 | 56 | 添加留言页面模板,集成读者墙 57 | 58 | 侧栏底部添加返回顶部按钮 59 | 60 | 其他小细节我也记不清了... 61 | 62 | ## 主题下载 63 | 64 | 提供两种方式免费获取本主题: 65 | 66 | 1.项目地址:[Practice01 v1.0][2] 67 | 68 | ## 主题使用说明 69 | 70 | 由于本人水平有限,要熟练使用本主题或许需要一定的学习时间成本,毕竟连我自己现在有时候发布特定帖子还要回头看看格式规则,囧!但我已尽量将常用的设置都写在了主题设置外观的选项以及发布文章里的选项当中。 71 | 72 | #### 1.安装启用主题 73 | 74 | 下载并解压主题文件,确保主题文件夹名称为:practice01,将文件夹上传至/usr/themes/目录下,然后登陆typecho后台,在**控制台->外观**中启用本主题。 75 | 76 | #### 2.主题选项 77 | 78 | 在**控制台->外观(网站外观)->设置外观**中可以看到主题的设置选项,主题大部份功能都通过这里进行设置。 79 | 80 | 一些基本的设置只要看描述就能明白,这里就不再赘述。在设置中需要了解的是网站头部全屏轮播的设置方法、以及友情链接的设置方法。 81 | 82 | #### 3.头部轮播图设置 83 | 84 | 首先勾选中显示轮播图前面的框,然后在轮播图列表的输入框中设置轮播的各项参数,**设置轮播需要四个参数,1标题,2链接地址,3图片地址,4轮播分类**,参数之间使用英文标点符号,隔开,一行表示一条记录,支持多条轮播。 85 | 86 | 示例: 87 | 88 | Be water my friend,https://sunxyu.cn,https://sunxyu.cn/usr/uploads/2018/12/1888809987.jpg,home 89 | 90 | 通过轮播图列表中的第四个参数(轮播分类),可以设置让首页和文章分类页面显示不同的轮播内容,只需要在**首页轮播分类**和**分类页面轮播分类**中分别填入要显示的轮播分类名,也就是第四个参数值。留空表示显示列表中的所有轮播。 91 | 92 | 首页和分类页面的轮播图数量,此处按照列表中实际输入的数量填写即可! 93 | 94 | #### 4.首页友链设置 95 | 96 | 勾选显示首页友链链接前面的框,然后在首页链接列表的输入框中设置友链的各项参数,**包含四个参数,1链接分类*,2链接名称*,3链接地址*,4链接描述**,参数之间使用英文标点符号,隔开,一行表示一条记录,支持多条记录。 97 | 98 | 示例: 99 | 100 | myself,小宇博客,https://sunxyu.cn,没有什么会永垂不朽 101 | 102 | #### 5.内页友链设置 103 | 104 | 内页友链的设置需要先在选项上指定链接分类,只有指定的链接分类才会显示在内页链接页面中。 105 | 106 | 指定好分类之后,在内页链接列表的输入框中输入链接参数,此处于设置首页链接方法相同,也是四个参数。 107 | 108 | 若需要添加rel="nofollow"属性,则需要添加第五个参数,值为0。 109 | 110 | 示例: 111 | 112 | myself,小宇博客,https://sunxyu.cn,没有什么会永垂不朽,0 113 | 114 | 设置好链接内容后,前往管理->独立页面,创建一个新页面,自定义模板选择links,然后发布即可! 115 | 116 | #### 6.关于文章页和独立页面的头部大图设置 117 | 118 | 文章或页面的头部预留一块内容用来显示头部大图,默认图片地址为空,显示为黑色背景,可以在选项中设置一个默认的图片地址。 119 | 120 | 如需要每篇文章使用不同的图片,可以在文章发布页进行设置,可分别设置图片及文字内容。 121 | 122 | #### 7.发布文章时常用的设置选项 123 | 124 | **自定义缩略图设置:**顾名思义就是文章缩略图,在文章列表页显示的。 125 | 126 | **文章置顶标记:**此项是为配合sticky插件来使用的,因为sticky插件的置顶添加的标记只有在文章列表页才会有,该选项是在文章内容页的标题后也添加置顶二字,当然你如果不用置顶插件则忽略此选项,默认就是关闭的。 127 | 128 | **标题文字颜色:**可单独设置每篇文章的字体颜色。输入颜色代码即可,如#000000; 129 | 130 | #### 8.主题文章缩略图说明 131 | 132 | 关于文章的缩略图,当你没有设置自定义缩略图时,会自动将文章中的第一张插入的图片将为缩略图。 133 | 134 | 如果既没有设置自定义缩略图,文章中又不包含图片时,则不显示缩略图,直接从标题开始显示。 135 | 136 | 当文章中插入的图片达到4张或以上时,列表中该篇文章将以图片封面形式显示。 137 | 138 | #### 9.文章中插入mp3音乐 139 | 140 | 直接在发布文章时进行设置,分别在对应字段中填入歌曲MP3地址,歌名,歌手,歌曲封面即可。 141 | 142 | #### 10.读者墙 143 | 144 | 这一块内容采用了现成的代码修改而来,可以按留言次数显示前40位访客的头像。 145 | 146 | 设置方法:创建一个新的独立页面,模板选择:message-board,发布即可。 147 | 148 | #### 11.创建近期动态或网站公告 149 | 150 | 同样通过页面的方式来创建,将在侧栏第一个位置显示。 151 | 152 | 设置方法:创建一个新的页面,模板选择status,然后填写标题:动态或公告按需填写,然后在内容中输入要显示的内容。 153 | 154 | 此处要注意,需要按照一定的格式填写,每一条内容需要包含在record短代码中,新的内容写在前面,旧的内容往后推。格式如下: 155 | 156 | [record]此处写日期或小标题后换行 157 | 这一行开始写内容,内容可以换行。 158 | 像这样...,然后再换行,输入结束的短代码。 159 | [/record] 160 | 161 | 然后发布即可! 162 | 163 | #### 12.创建独立相册 164 | 165 | 在管理->分类中创建一个新的分类,取名为相册,分类缩略名设置为gallery。 166 | 167 | 然后正常发布文章,选择发布到相册分类下,并且在文章发布选项中将该篇文章设置为相册形式,默认不勾选则是普通文章形式。文章的内容请按照以下形式来填写: 168 | 169 | 发布相册内容方法:一个反斜杠后面加图片地址,一行一条记录 170 | 171 | 示例: 172 | 173 | \https://sunxyu.cn/usr/uploads/2018/12/347705932.jpg 174 | \https://sunxyu.cn/usr/uploads/2018/12/1927513038.jpg 175 | \https://sunxyu.cn/usr/uploads/2018/12/2129023047.jpg 176 | 177 | 然后发布即可! 178 | 179 | #### 13.文章中插入视频 180 | 181 | 直接在文章内容中通过短代码插入视频,有三种方式可以操作,具体如下: 182 | 183 | **三种方式都支持以.mp4为结尾的视频地址,或者是youtube在线视频页面地址,暂不支持国内优酷、爱奇艺等视频网站地址!** 184 | 185 | 话说国内主流在线视频网站的视频如果要插入文章根本不需要短代码,直接引用视频网站产生的embed标签代码粘贴过来就可以了 186 | 187 | **第一种形式(无封面):** 188 | 189 | [addvideo]\视频url地址,视频名称或描述,视频宽度,视频高度[/addvideo] 190 | 191 | 说明:每个参数中间用英文逗号“,”隔开;注意视频地址前需要添加一个反斜杠; 192 | 193 | **第二种形式(插入typecho附件图片作为视频封面):** 194 | 195 | [addvideo2]\视频url地址,此位置直接插入typecho附件图片,视频宽度,视频高度[/addvideo2] 196 | 197 | 每个参数中间用英文逗号“,”隔开;注意视频地址前需要添加一个反斜杠;注意不是图片地址,而是用typecho文章发布右侧的附件直接插入 198 | 199 | **第三种形式(使用外链图片地址作为封面):** 200 | 201 | [addvideo3]\视频url地址,视频名称或描述,封面图片url,视频宽度,视频高度[/addvideo3] 202 | 203 | 每个参数中间用英文逗号“,”隔开;注意视频地址前需要添加一个反斜杠; 204 | 205 | 演示地址请查看本页面:[文章插入视频][4] 206 | 207 | #### 14.文章内容中插入相册 208 | 209 | 这个首先说明一下,文章中普通方式插入的单张图片是没有灯箱效果的,我也没有添加灯箱效果,暂时感觉没有必要,后续可能会考虑。 210 | 211 | 但是文章内容中插入的相册,均是带有灯箱效果的,且可以在一篇文章中插入多个相册,同样是通过短代码的方式来添加。可以在文章内任何位置插入相册。相册提供一张预览图,点击触发灯箱,显示相册内的多张图片,可以自由切换。 212 | 213 | 方法如下: 214 | 215 | [group]\https://sunxyu.cn/usr/uploads/2018/12/2674333389.jpg,这是第一个相册的描述,包含了6张图片,1[/group] 216 | [album]\https://sunxyu.cn/usr/uploads/2018/12/553765828.jpg,1[/album] 217 | [album]\https://sunxyu.cn/usr/uploads/2018/12/3026050646.jpg,1[/album] 218 | [album]\https://sunxyu.cn/usr/uploads/2018/12/3933651579.jpg,1[/album] 219 | [album]\https://sunxyu.cn/usr/uploads/2018/12/1998758631.jpg,1[/album] 220 | [album]\https://sunxyu.cn/usr/uploads/2018/12/3437516934.jpg,1[/album] 221 | 222 | 如需要添加第二个相册,那么只需要将以上代码中的1改成2,第三个就是3,以此类推... 223 | 224 | 演示地址请查看此页面:[文章插入相册][5] 225 | 226 | #### 15.插入一个点击文字触发灯箱显示图片的短代码 227 | 228 | 好吧,这个我也不知道该怎么描述,总之这个是为了避免当一张图片高度太大时,直接显示出来会占用很大的篇幅而采取的一个方法,通过这个方法可以将图片隐藏在起来,提供一个文字链接,当需要查看图片时,只击该文字就会以灯箱效果弹出图片。 229 | 230 | 说明一下方法: 231 | 232 | [addimg]\图片地址,文字描述[/addimg] //注意地址前加一个反斜杠,中间是用英文逗号“,”隔开的! 233 | 234 | 235 | 好了,大概的内容就这么多了,如果有漏掉的说明,可以在此提问,我会添加上去的:) 236 | 237 | 接下来主题会进入缓慢的更新状态!!! 238 | 239 | 240 | 241 | [2]: https://github.com/crazystear/Practice01 242 | [3]: https://sunxyu.cn/usr/uploads/2019/01/1243850090.zip 243 | [4]: https://sunxyu.cn/faketech/431.html 244 | [5]: https://sunxyu.cn/faketech/494.html 245 | -------------------------------------------------------------------------------- /aplayer.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
 7 |     
8 |
9 |
10 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 |
6 |
7 |
8 |
9 |
10 | next()): ?> 11 | 12 | 13 |
14 |
15 | pageLink('下一页','next'); ?> 16 |
17 |
18 |
19 |
20 |
21 | need('sidebar.php'); ?> 22 | need('footer.php'); ?> -------------------------------------------------------------------------------- /category/gallery.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 | 127 |
128 | 174 | need('footer.php'); ?> -------------------------------------------------------------------------------- /category/timeline.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 | 6 | 7 | 8 | 9 | 117 |
118 |
119 |
120 |
121 |
122 | next()): ?> 123 | 124 |
125 |
126 | 127 |  title() ?> 128 | 129 |
130 | 131 |
132 |
133 | 134 |  title() ?> 135 | 136 |
137 | 138 |
139 |
140 | 141 |
142 | 143 |
144 | 145 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 146 | need('aplayer.php'); ?> 147 | 148 | fields->videorurl == '' && $this->fields->videoname == '')): ?> 149 | need('videoplayer.php'); ?> 150 | 151 | content; 153 | $t_content = preg_replace('/(.*?)/i','$4', $t_content); 154 | echo $t_content; 155 | ?> 156 |
157 |
158 |

Posted on 

159 |
160 |

commentsNum('0','1','%d'); ?> Comments

161 |
162 |
163 | 164 | 191 | 230 |
231 |
232 |
233 | 234 |
235 |
236 | pageLink('下一页','next'); ?> 237 |
238 |
239 |
240 |
241 |
242 | need('footer.php'); ?> -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 2 | authorId) { 6 | if ($comments->authorId == $comments->ownerId) { 7 | $commentClass .= ' comment-by-author'; 8 | } else { 9 | $commentClass .= ' comment-by-user'; 10 | } 11 | } 12 | $commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent'; 13 | if ($comments->url) { 14 | $author = '' . $comments->author . ''; 15 | } else { 16 | $author = $comments->author; 17 | } 18 | ?> 19 |
  • 29 |
    30 | commentsAvatarRating; 35 | $cusAva = Helper::options()->commentAuthorAvatar; 36 | $hash = md5(strtolower($comments->mail)); 37 | $email = strtolower($comments->mail); 38 | $sjtx = Typecho_Widget::widget('Widget_Options')->motx; 39 | $qqnumber = str_replace('@qq.com', '', $email); 40 | if (!($cusAva == '') && $comments->authorId == $comments->ownerId) { 41 | $avatar = $cusAva; 42 | }elseif (strstr($email,"qq.com") && is_numeric($qqnumber) && strlen($qqnumber) > 4 && strlen($qqnumber) < 12) { 43 | $avatar = 'https://q2.qlogo.cn/g?b=qq&nk='.$qqnumber.'&s='.$size.''; 44 | }else { 45 | $avatar = $host . $url . $hash . '?s=' . $size . '&r=' . $rating . '&d='.$sjtx; 46 | } 47 | ?> 48 |
    49 | <?php echo $comments->author; ?> 51 | 52 |
    53 |
    54 | date('F jS\, Y \a\t h:i:s A'); ?> 55 | reply(); ?> 56 |
    57 |
    58 | 59 | coid); ?> 60 | ]*>#','',$comments->content);echo $cos;?> 61 | 62 |
    63 |
    64 | children) { ?> 65 |
    66 | threadedComments($options); ?> 67 |
    68 | 69 |
  • 70 | 71 |
    72 | comments()->to($comments); ?> 73 | have()): ?> 74 |

    commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?>

    75 | 76 | listComments(); ?> 77 | 78 | pageNav('« 前一页', '后一页 »'); ?> 79 | 80 | 81 | 82 | allow('comment')): ?> 83 | commentsNum === '0'): ?> 84 |
    85 | 86 |
    87 | 88 |
    89 | cancelReply(); ?> 90 |
    91 | 92 |

    user->hasLogin()): ?>(已登陆:user->screenName(); ?>)

    93 |
    94 |
    95 |

    96 | 97 |

    98 |
    99 | user->hasLogin()): ?> 100 |
    101 | 102 |
    103 |

    104 | 105 |

    106 |

    107 | options->commentsRequireMail): ?> required /> 108 |

    109 |

    110 | options->commentsRequireURL): ?> required /> 111 |

    112 | 113 |
    114 |
    115 |

    116 | user->hasLogin()): ?> 117 | user->mail; 119 | $cusAvatar = $this->options->commentAuthorAvatar; 120 | $mdmdmd5 = md5(strtolower(trim($masterMail))); 121 | $qnum = str_replace('@qq.com', '', $masterMail); 122 | if (!($cusAvatar == '')) { 123 | $avatarLoged = $cusAvatar; 124 | }elseif (strstr($masterMail,"qq.com") && is_numeric($qnum) && strlen($qnum) > 4 && strlen($qnum) < 12) { 125 | $avatarLoged = 'https://q2.qlogo.cn/g?b=qq&nk='.$qnum.'&s=100'; 126 | }else { 127 | $avatarLoged = 'https://cdn.v2ex.com/gravatar/' . $mdmdmd5 . '?s=80'; 128 | } 129 | ?> 130 | 131 | 132 | 133 | 134 |

    135 |

    136 | 137 |

    138 |
    139 | 140 |
    141 | 142 |

    143 | 144 |
    145 | 146 | 177 | -------------------------------------------------------------------------------- /copyright.php: -------------------------------------------------------------------------------- 1 | 2 | options->posCopy) && in_array('closeCopy', $this->options->posCopy)): ?> 3 |

    4 | options->postCopyright)): ?> 5 | options->postCopyright(); ?> 6 | 7 | 所有原创文章采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。
    8 | 您可以自由的转载和修改,但请务必注明文章来源并且不可用于商业目的。
    9 | 本站部分内容收集于互联网,如果有侵权内容、不妥之处,请联系我们删除。敬请谅解!
    10 | 11 |

    12 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 21 | 22 | category == 'timeline' && !$this->is('index')): ?> 23 | 32 | 33 | 41 | 42 | 43 | 44 | 59 | 60 | 61 | options->fixedSidebar) && in_array('fSidebar', $this->options->fixedSidebar)): ?> 62 | 63 | 71 | 72 | 73 | is('post') || $this->is('page'))): ?> 74 | options->slideImages) && in_array('ShowSlideOn', $this->options->slideImages)): ?> 75 | 76 | 104 | 105 | 106 |
    114 | footer(); ?> 115 | 116 | is('post') || $this->is('page'))): ?> 117 | 118 | 158 | 159 | 160 | options->bdAutoPush == '')): ?>options->bdAutoPush(); ?> 161 | 162 | 163 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | 1.站点favicon.ico图标地址'), _t('')); 5 | $form->addInput($siteicon); 6 | 7 | $cusTitle = new Typecho_Widget_Helper_Form_Element_Text('cusTitle', NULL, NULL, _t('2.站点名称'), _t('')); 8 | $form->addInput($cusTitle); 9 | 10 | $desc = new Typecho_Widget_Helper_Form_Element_Text('desc', NULL, NULL, _t('3.站点副标题,将显示在标题栏上!'), _t('')); 11 | $form->addInput($desc); 12 | 13 | $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('4.侧栏关于博主头像,填入头像图片地址!'), _t('')); 14 | $form->addInput($logoUrl); 15 | 16 | $cusAboutme = new Typecho_Widget_Helper_Form_Element_Textarea('cusAboutme', NULL, NULL, _t('5.侧栏关于博主的文字说明!支持html代码。'), _t('')); 17 | $cusAboutme->input->setAttribute('style', 'height:80px;resize:both;'); 18 | $form->addInput($cusAboutme); 19 | 20 | $wechatqrcode = new Typecho_Widget_Helper_Form_Element_Text('wechatqrcode', NULL, NULL, _t('6.第一个图标位:微信或公众号二维码图片地址'), _t('显示在侧栏关于博客下方的图标')); 21 | $form->addInput($wechatqrcode); 22 | 23 | $githubaddr = new Typecho_Widget_Helper_Form_Element_Text('githubaddr', NULL, NULL, _t('7.第二个图标位链接地址'), _t('')); 24 | $form->addInput($githubaddr); 25 | $secIcon = new Typecho_Widget_Helper_Form_Element_Text('secIcon', NULL, NULL, _t('8.第二个图标,需引用fontawesome图标,引用方法参考http://www.fontawesome.com.cn/faicons/'), _t('显示在侧栏关于博客下方的图标')); 26 | $form->addInput($secIcon); 27 | 28 | $contactbyqq = new Typecho_Widget_Helper_Form_Element_Text('contactbyqq', NULL, NULL, _t('9.第三个图标位链接地址'), _t('')); 29 | $form->addInput($contactbyqq); 30 | $thrIcon = new Typecho_Widget_Helper_Form_Element_Text('thrIcon', NULL, NULL, _t('10.第三个图标,需引用fontawesome图标,引用方法参考http://www.fontawesome.com.cn/faicons/'), _t('显示在侧栏关于博客下方的图标')); 31 | $form->addInput($thrIcon); 32 | 33 | $meonweibo = new Typecho_Widget_Helper_Form_Element_Text('meonweibo', NULL, NULL, _t('11.第四个图标位链接地址'), _t('')); 34 | $form->addInput($meonweibo); 35 | $forIcon = new Typecho_Widget_Helper_Form_Element_Text('forIcon', NULL, NULL, _t('12.第四个图标,需引用fontawesome图标,引用方法参考http://www.fontawesome.com.cn/faicons/'), _t('显示在侧栏关于博客下方的图标')); 36 | $form->addInput($forIcon); 37 | 38 | $slideImages = new Typecho_Widget_Helper_Form_Element_Checkbox('slideImages', 39 | array('ShowSlideOn' => _t('显示轮播图(开启后将在首页及分类页显示轮播)
    【建议至少设置一条轮播内容后再开启,若无内容直接开启将显示空白占位影响美观!】')), 40 | array(), _t('13.轮播图显示设置,默认关闭,勾选表示开启!')); 41 | $form->addInput($slideImages->multiMode()); 42 | 43 | $SlideImg = new Typecho_Widget_Helper_Form_Element_Textarea('SlideImg', NULL, NULL, _t('14.轮播图列表(注意:切换主题会被清空,注意备份!使用方法看下方描述!)'), _t('按照格式输入轮播图信息,格式:1-标题,2-URL地址,3-轮播图片地址,4-要在哪个分类中显示,填写你分类目录的缩略名
    不同信息之间用英文逗号“,”分隔,例如:
    venom,https://kisxy.com/life/240.html,https://kisxy.com/usr/uploads/2018/11/894101175.jpg,home
    home表示显示在首页显示的轮播
    venom,https://kisxy.com/life/240.html,https://kisxy.com/usr/uploads/2018/11/894101175.jpg,timeline
    timeline表示要在时间轴分类显示的轮播
    venom,https://kisxy.com/life/240.html,https://kisxy.com/usr/uploads/2018/11/894101175.jpg,all
    all表示要在首页及每个分类页面显示的轮播')); 44 | $SlideImg->input->setAttribute('style', 'height:150px;resize:both;'); 45 | $form->addInput($SlideImg); 46 | 47 | $fixedSidebar = new Typecho_Widget_Helper_Form_Element_Checkbox('fixedSidebar', 48 | array('fSidebar' => _t('开启页面滚动边栏固定')), 49 | array(), _t('15.边栏固定,默认关闭!')); 50 | $form->addInput($fixedSidebar->multiMode()); 51 | 52 | $ShowLinks = new Typecho_Widget_Helper_Form_Element_Checkbox('ShowLinks', array('sidebar' => _t('显示首页友情链接(在首页侧边栏显示)')), NULL, _t('16.显示友链,勾选后请在链接列表中按格式输入链接信息即可')); 53 | $form->addInput($ShowLinks->multiMode()); 54 | 55 | $IndexLinksSort = new Typecho_Widget_Helper_Form_Element_Text('IndexLinksSort', NULL, NULL, _t('17.要显示在首页侧边栏的链接分类(支持多分类,请用英文逗号“,”分隔)'), _t('若只需显示某分类下的链接,请输入链接分类名(建议使用字母形式的分类名),留空则默认显示全部链接列表中的链接')); 56 | $form->addInput($IndexLinksSort); 57 | 58 | $Links = new Typecho_Widget_Helper_Form_Element_Textarea('Links', NULL, NULL, _t('18.首页链接列表(注意:切换主题会被清空,注意备份!)'), _t('按照格式输入链接信息,格式:1链接分类*,2链接名称*,3链接地址*,4链接描述
    不同信息之间用英文逗号“,”分隔,例如:
    myself,小宇博客,https://kisxy.com,没有什么会永垂不朽
    链接分类用于过滤要显示的链接,建议使用英文!')); 59 | $Links->input->setAttribute('style', 'height:100px;resize:both;'); 60 | $form->addInput($Links); 61 | 62 | $innerlinkshow = new Typecho_Widget_Helper_Form_Element_Textarea('innerlinkshow', NULL, NULL, _t('19.要在内页(链接页面)显示的链接分类(支持多分类,一行一个)【 必填 】'), _t('')); 63 | $innerlinkshow->input->setAttribute('style', 'height:100px;resize:both;'); 64 | $form->addInput($innerlinkshow); 65 | 66 | $innerlinks = new Typecho_Widget_Helper_Form_Element_Textarea('innerlinks', NULL, NULL, _t('20.内页页面链接列表,一行一个(注意:切换主题会被清空,注意备份!)'), _t('按照格式输入链接信息,格式:1链接分类*,2链接名称*,3链接地址*,4链接描述,5可选参数0
    不同信息之间用英文逗号“,”分隔,例如:
    myself,小宇博客,https://kisxy.com,没有什么会永垂不朽
    若要使用rel="external nofollow"属性,第五个参数请输入0!例如:
    myself,小宇博客,https://kisxy.com,没有什么会永垂不朽,0')); 67 | $innerlinks->input->setAttribute('style', 'height:500px;resize:both;'); 68 | $form->addInput($innerlinks); 69 | 70 | $postdefaultimg = new Typecho_Widget_Helper_Form_Element_Text('postdefaultimg', NULL, NULL, _t('21.文章头部默认图片'), _t('填写图片地址,推荐分辨率2000*500px')); 71 | $form->addInput($postdefaultimg); 72 | $postdefaultword = new Typecho_Widget_Helper_Form_Element_Text('postdefaultword', NULL, NULL, _t('22.文章头部默认文字'), _t('')); 73 | $form->addInput($postdefaultword); 74 | 75 | $loadingPic = new Typecho_Widget_Helper_Form_Element_Text('loadingPic', NULL, NULL, _t('23.懒加载动态loading.gif图片地址!'), _t('')); 76 | $form->addInput($loadingPic); 77 | 78 | $commentAuthorAvatar = new Typecho_Widget_Helper_Form_Element_Text('commentAuthorAvatar', NULL, NULL, _t('24.自定义博主评论头像地址'), _t('')); 79 | $form->addInput($commentAuthorAvatar); 80 | 81 | $beianno = new Typecho_Widget_Helper_Form_Element_Text('beianno', NULL, NULL, _t('25.网站底部备案号填写'), _t('')); 82 | $form->addInput($beianno); 83 | 84 | $posCopy = new Typecho_Widget_Helper_Form_Element_Checkbox('posCopy', 85 | array('closeCopy' => _t('关闭文章底部版权信息说明!')), 86 | array(''), _t('26.文章版权说明')); 87 | $form->addInput($posCopy->multiMode()); 88 | 89 | $postCopyright = new Typecho_Widget_Helper_Form_Element_Textarea('postCopyright', NULL, NULL, _t('27.文章底部自定义版权信息(支持HTML代码)'), _t('留空则显示主题定义的默认版权信息!')); 90 | $postCopyright->input->setAttribute('style', 'height:100px;resize:both;'); 91 | $form->addInput($postCopyright); 92 | 93 | $themeCopy = new Typecho_Widget_Helper_Form_Element_Checkbox('themeCopy', 94 | array('closeThemeCopy' => _t('关闭网站底部的主题版权说明!')), 95 | array(''), _t('28.主题版权说明')); 96 | $form->addInput($themeCopy->multiMode()); 97 | 98 | $tongji = new Typecho_Widget_Helper_Form_Element_Textarea('tongji', NULL, NULL, _t('29.网站统计代码'), _t('')); 99 | $tongji->input->setAttribute('style', 'height:100px;resize:both;'); 100 | $form->addInput($tongji); 101 | 102 | $bdAutoPush = new Typecho_Widget_Helper_Form_Element_Textarea('bdAutoPush', NULL, NULL, _t('30.百度自动推送工具代码'), _t('使用方式请查阅:https://ziyuan.baidu.com/linksubmit/index')); 103 | $bdAutoPush->input->setAttribute('style', 'height:100px;resize:both;'); 104 | $form->addInput($bdAutoPush); 105 | 106 | $sidebarCategory = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarCategory', 107 | array('onTopNav' => _t('在顶部菜单栏显示(PC端)'), 108 | 'onSidebar' => _t('在侧边栏显示')), 109 | array(''), _t('31.分类目录')); 110 | $form->addInput($sidebarCategory->multiMode()); 111 | 112 | $highlightColor = new Typecho_Widget_Helper_Form_Element_Radio('highlightColor', 113 | array('default' => _t('default'), 114 | 'mono-blue' => _t('mono-blue'), 115 | 'tomorrow' => _t('tomorrow'), 116 | 'zenburn' => _t('zenburn'), 117 | 'purebasic' => _t('purebasic'), 118 | 'dracula' => _t('dracula'), 119 | 'xcode' => _t('xcode'), 120 | 'foundation' => _t('foundation'), 121 | 'vs2015' => _t('vs2015'), 122 | 'monokai-sublime' => _t('monokai-sublime'), 123 | 'routeros' => _t('routeros'), 124 | 'grayscale' => _t('grayscale'), 125 | 'vs' => _t('vs'), 126 | 'github' => _t('github'), 127 | 'atom-one-light' => _t('atom-one-light')), 128 | 'default', _t('32.选择代码高亮配色方案,默认为default方案!'), _t('配色效果参考:https://highlightjs.org/static/demo/')); 129 | $form->addInput($highlightColor); 130 | 131 | $showPostAlbum = new Typecho_Widget_Helper_Form_Element_Checkbox('showPostAlbum', 132 | array('close' => _t('关闭文章列表的封面形式!')), 133 | array(''), _t('33.文章中图片若超过3张时,在列表中将会以封面形式显示该篇文章,勾选此项则关闭,将以正常缩略图方式显示!')); 134 | $form->addInput($showPostAlbum->multiMode()); 135 | 136 | $ShowTimeline = new Typecho_Widget_Helper_Form_Element_Checkbox('ShowTimeline', array('sidebarTimeline' => _t('侧边栏调用时间轴第一篇文章')), NULL, _t('34.勾选后侧边栏第一个位置将显示时间轴第一篇文章内容')); 137 | $form->addInput($ShowTimeline->multiMode()); 138 | 139 | $SimpleHomeOn = new Typecho_Widget_Helper_Form_Element_Checkbox('SimpleHomeOn', array('simpleHome' => _t('开启首页简洁模式')), NULL, _t('35.勾选后首页将只显示时间轴的最新一篇文章的内容,作为简洁模式!勾选前请确认已添加了时间轴分类并已经有发布了相应的内容!')); 140 | $form->addInput($SimpleHomeOn->multiMode()); 141 | 142 | include("theme_config.php"); 143 | } 144 | //get_post_view($this) 145 | function get_post_view($archive) 146 | { 147 | $cid = $archive->cid; 148 | $db = Typecho_Db::get(); 149 | $prefix = $db->getPrefix(); 150 | if (!array_key_exists('views', $db->fetchRow($db->select()->from('table.contents')))) { 151 | $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `views` INT(10) DEFAULT 0;'); 152 | echo 0; 153 | return; 154 | } 155 | $row = $db->fetchRow($db->select('views')->from('table.contents')->where('cid = ?', $cid)); 156 | if ($archive->is('single')) { 157 | $views = Typecho_Cookie::get('extend_contents_views'); 158 | if(empty($views)){ 159 | $views = array(); 160 | }else{ 161 | $views = explode(',', $views); 162 | } 163 | if(!in_array($cid,$views)){ 164 | $db->query($db->update('table.contents')->rows(array('views' => (int) $row['views'] + 1))->where('cid = ?', $cid)); 165 | array_push($views, $cid); 166 | $views = implode(',', $views); 167 | Typecho_Cookie::set('extend_contents_views', $views); 168 | } 169 | } 170 | echo $row['views']; 171 | } 172 | //设置文章自定义字段 173 | function themeFields($layout) 174 | { 175 | $thumbImg = new Typecho_Widget_Helper_Form_Element_Text('thumbimg', NULL, NULL, _t('自定义缩略图'), _t('将要显示在瀑布流中的缩略图URL地址,建议图片宽度500px,高度不限!【只针对文章,页面请忽略】')); 176 | $thumbImg->input->setAttribute('class', 'w-100'); 177 | $layout->addItem($thumbImg); 178 | 179 | $postTop = new Typecho_Widget_Helper_Form_Element_Radio('postTop', 180 | array('keeptop' => _t('添加文章页置顶标记'), 181 | 'removetop' => _t('关闭文章页置顶标记')), 182 | 'removetop', _t('文章置顶Sticky插件辅助'), _t('默认关闭【只针对文章,页面请忽略】
    说明:此处选项是配合sticky插件使用的,若你没有使用sticky插件则直接忽略此处设置。
    若有使用sticky插件置顶文章时,勾选此处会使文章内容页的标题后也出现置顶的标记!')); 183 | $layout->addItem($postTop); 184 | 185 | $headbigimg = new Typecho_Widget_Helper_Form_Element_Text('headbigimg', NULL, NULL, _t('文章页顶部大图'), _t('将要显示在文章页顶部的图片地址,建议图片分辨率2000*500px!')); 186 | $headbigimg->input->setAttribute('class', 'w-100'); 187 | $layout->addItem($headbigimg); 188 | 189 | $headpostdesc = new Typecho_Widget_Helper_Form_Element_Text('headpostdesc', NULL, NULL, _t('文章页顶部大图文字'), _t('图片配文,可以不填写!')); 190 | $headpostdesc->input->setAttribute('class', 'w-100'); 191 | $layout->addItem($headpostdesc); 192 | 193 | $posttitlecolor = new Typecho_Widget_Helper_Form_Element_Text('posttitlecolor', NULL, NULL, _t('标题字体颜色'), _t('输入颜色代码,如:#ff0000;')); 194 | $posttitlecolor->input->setAttribute('class', 'w-100'); 195 | $layout->addItem($posttitlecolor); 196 | 197 | // $postGallery = new Typecho_Widget_Helper_Form_Element_Radio('postGallery', array('isGallery' => _t('文章设置为相册'), 'noGallery' => _t('普通文章形式')), 'noGallery', _t('设置为相册形式'), _t('默认为普通文章形式。相册模式直接文章中输入图片地址,每行地址前需要添加一个反斜杠“\”,一行一个地址。')); 198 | // $layout->addItem($postGallery); 199 | 200 | $aplayerurl = new Typecho_Widget_Helper_Form_Element_Text('aplayerurl', NULL, NULL, _t('歌曲URL地址'), _t('输入可以在线播放的音乐URL地址')); 201 | $aplayerurl->input->setAttribute('class', 'w-100'); 202 | $layout->addItem($aplayerurl); 203 | 204 | $aplayername = new Typecho_Widget_Helper_Form_Element_Text('aplayername', NULL, NULL, _t('歌名'), _t('')); 205 | $aplayername->input->setAttribute('class', 'w-100'); 206 | $layout->addItem($aplayername); 207 | 208 | $aplayerauthor = new Typecho_Widget_Helper_Form_Element_Text('aplayerauthor', NULL, NULL, _t('歌手'), _t('')); 209 | $aplayerauthor->input->setAttribute('class', 'w-100'); 210 | $layout->addItem($aplayerauthor); 211 | 212 | $aplayerthumb = new Typecho_Widget_Helper_Form_Element_Text('aplayerthumb', NULL, NULL, _t('歌曲封面'), _t('')); 213 | $aplayerthumb->input->setAttribute('class', 'w-100'); 214 | $layout->addItem($aplayerthumb); 215 | 216 | $videorurl = new Typecho_Widget_Helper_Form_Element_Text('videorurl', NULL, NULL, _t('视频URL地址(仅适用时间轴分类)'), _t('输入可以在线播放的视频URL地址')); 217 | $videorurl->input->setAttribute('class', 'w-100'); 218 | $layout->addItem($videorurl); 219 | 220 | $videoname = new Typecho_Widget_Helper_Form_Element_Text('videoname', NULL, NULL, _t('视频标题(仅适用时间轴分类)'), _t('')); 221 | $videoname->input->setAttribute('class', 'w-100'); 222 | $layout->addItem($videoname); 223 | } 224 | //调用首页友情链接 225 | function Links($sorts = NULL) { 226 | $options = Typecho_Widget::widget('Widget_Options'); 227 | if ($options->Links) { 228 | $list = explode("\r\n", $options->Links); 229 | foreach ($list as $tmp) { 230 | list($sort, $name, $url, $description) = explode(',', $tmp); 231 | if (!isset($sorts) || $sorts == "") { 232 | echo '
  • '.$name.'
  • '; 233 | } else { 234 | $arr = explode(",", $sorts); 235 | for($i = 0; $i < count($arr); $i++) { 236 | if($arr[$i] === $sort) { 237 | echo '
  • '.$name.'
  • '; 238 | } 239 | } 240 | } 241 | } 242 | } else { 243 | echo '
  • 暂无链接
  • '; 244 | } 245 | } 246 | //调用内页页面友情链接 247 | function innerLinks($innersorts = NULL) { 248 | $options = Typecho_Widget::widget('Widget_Options'); 249 | if ($options->innerlinks) { 250 | $list = explode("\r\n", $options->innerlinks); 251 | $innerlinkcate = explode("\r\n", $innersorts); 252 | for ($i=0; $i < count($innerlinkcate); $i++) { 253 | echo ''.$innerlinkcate[$i].''; 267 | } 268 | } else { 269 | echo '
  • 暂无链接
  • '; 270 | } 271 | } 272 | // 调用轮播图 273 | //

    '.$catname.'

    274 | function SlideImg($classifys = NULL) { 275 | $options = Typecho_Widget::widget('Widget_Options'); 276 | if ($options->SlideImg) { 277 | $list2 = explode("\r\n", $options->SlideImg); 278 | foreach ($list2 as $tmp) { 279 | list($title, $posturl, $imgurl, $classify) = explode(',', $tmp); 280 | if (!isset($classifys) || $classifys == "") { 281 | echo '
    282 |

    '.$title.'

    283 |
    '; 284 | } else { 285 | if ($classify == "all") { 286 | echo '
    287 |

    '.$title.'

    288 |
    '; 289 | } 290 | $arr2 = explode(",", $classifys); 291 | for($i = 0; $i < count($arr2); $i++) { 292 | if($arr2[$i] === $classify) { 293 | echo '
    294 |

    '.$title.'

    295 |
    '; 296 | 297 | } 298 | } 299 | } 300 | } 301 | } else { 302 | echo ''; 305 | } 306 | } 307 | //评论添加回复标记 308 | function get_commentReply_at($coid) 309 | { 310 | $db = Typecho_Db::get(); 311 | $prow = $db->fetchRow($db->select('parent')->from('table.comments') 312 | ->where('coid = ? AND status = ?', $coid, 'approved')); 313 | $parent = $prow['parent']; 314 | if ($parent != "0") { 315 | $arow = $db->fetchRow($db->select('author')->from('table.comments') 316 | ->where('coid = ? AND status = ?', $parent, 'approved')); 317 | $author = $arow['author']; 318 | $href = '回复 ' . $author . ':'; 319 | echo $href; 320 | } else { 321 | echo ''; 322 | } 323 | } 324 | // 替换文章内容方法 325 | function themeInit($archive) 326 | { 327 | Helper::options()->commentsMaxNestingLevels = 99; 328 | if ($archive->is('single')) 329 | { 330 | $archive->content = image_class_replace($archive->content); 331 | } 332 | } 333 | function image_class_replace($content) 334 | { 335 | $options = Typecho_Widget::widget('Widget_Options'); 336 | if ($options->loadingPic) { 337 | $loadingPicAddr = $options->loadingPic; 338 | }else{ 339 | $loadingPicAddr = "#"; 340 | } 341 | $content = preg_replace('##', 342 | '', $content); 343 | $content = preg_replace('##', 344 | '', $content); 345 | $content = preg_replace('/\[addimg\](http:|https:)(.*?)(.jpg|.png|.jpeg|.png),(.*?)\[\/addimg\]/i','$4', $content); 346 | $content = preg_replace('/(\[addvideo\])(http:|https:)(.*?),(.*?),(.*?),(.*?)(\[\/addvideo\])/i','$4', $content); 347 | $content = preg_replace('/(\[addvideo2\])(http:|https:)(.*?),(.*?)$6', $content); 348 | $content = preg_replace('/(\[addvideo3\])(http:|https:)(.*?),(.*?),$4', $content); 349 | $content = preg_replace('/\[group\](http:|https:)(.*?)(.jpg|.jpeg|.gif|.png),(.*?),(.*?)\[\/group\]/i','',$content); 350 | preg_match_all('/\[album\](http:|https:)(.*?)(.jpg|.jpeg|.gif|.png),(.*?)\[\/album\]/i', $content, $matches); 351 | $ca = count($matches[0]); 352 | $content = preg_replace('/\[album\](http:|https:)(.*?)(.jpg|.jpeg|.gif|.png),(.*?)\[\/album\]/i','',$content); 353 | if ($ca > 1) { 354 | $content = preg_replace('/\<\/a\>\\(.*?)\[\/record]/i','$1$2',$content); 357 | return $content; 358 | } 359 | ?> 360 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | <?php $this->archiveTitle(array( 35 | 'category' => _t('分类 %s 下的文章'), 36 | 'search' => _t('包含关键字 %s 的文章'), 37 | 'tag' => _t('标签 %s 下的文章'), 38 | 'author' => _t('%s 发布的文章') 39 | ), '', ' - '); ?><?php $this->options->cusTitle(); ?> - <?php $this->options->desc(); ?> 40 | 41 | options->siteicon == '')): ?> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 50 | 51 | 52 | 53 | 57 | 58 | header(); ?> 59 | options->tongji == '')): ?>options->tongji(); ?> 60 | 61 | 62 | is('index') && !empty($this->options->SimpleHomeOn) && in_array('simpleHome', $this->options->SimpleHomeOn)): ?> 63 | 64 | is('post') && $this->category == 'timeline')): ?> 65 | 66 | 67 | 68 | 71 |
    72 |
    73 | 74 | 87 |
    88 |
    89 | 90 | 113 | 114 | 124 | options->slideImages) && in_array('ShowSlideOn', $this->options->slideImages)): ?> 125 | is('post') || $this->is('page'))): ?> 126 |
    127 |
    128 |
    129 | is('index') || $this->is('search')): ?> 130 | 131 |
    132 | 133 | is('category')): ?> 134 | category); ?> 135 |
    136 | 137 | 138 | 147 |
    148 |
    149 | 150 | 151 | is('post') || $this->is('page')): ?> 152 |
    153 |
    154 |
    155 | fields->headbigimg == '')): ?> 156 |
    157 | 158 |
    159 | 160 | fields->headpostdesc == '')): ?> 161 |

    fields->headpostdesc(); ?>

    162 | 163 |

    options->postdefaultword(); ?>

    164 | 165 |
    166 |
    167 |
    168 |
    169 | 170 | options->slideImages) && in_array('ShowSlideOn', $this->options->slideImages)): ?> 171 |
    172 | 173 |
    174 | 175 | 176 |
    177 |
    178 |

        

    179 |
    180 |
    181 | -------------------------------------------------------------------------------- /images/videobg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/images/videobg.jpg -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 12 | ?> 13 | is('index') && !empty($this->options->SimpleHomeOn) && in_array('simpleHome', $this->options->SimpleHomeOn)): ?> 14 | need('simplehome.php'); ?> 15 | 16 |
    17 |
    18 |
    19 |
    20 |
    21 | next()): ?> 22 | category; 24 | if ($getCate != 'gallery' && $getCate != 'timeline') { 25 | include("post_common.php"); 26 | } 27 | ?> 28 | 29 |
    30 |
    31 | pageLink('下一页','next'); ?> 32 |
    33 |
    34 |
    35 |
    36 |
    37 | need('sidebar.php'); ?> 38 | need('footer.php'); ?> 39 | -------------------------------------------------------------------------------- /js/pageSwitch.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Minified by jsDelivr using UglifyJS v3.4.4. 3 | * Original file: /npm/pageswitch@2.3.2/src/pageSwitch.js 4 | * 5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files 6 | */ 7 | !function(r,t,e){"use strict";var a,n,i=0,f=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.msRequestAnimationFrame||function(e){var t=+new Date,n=Math.max(1e3/60,1e3/60-(t-i));return i=t+n,setTimeout(e,n)},m=r.cancelAnimationFrame||r.webkitCancelAnimationFrame||r.webkitCancelRequestAnimationFrame||r.mozCancelRequestAnimationFrame||r.msCancelRequestAnimationFrame||clearTimeout,u=r.document,s=u.createElement("div").style,y=function(){for(var e,t="-webkit- -moz- -o- -ms-".split(" ");e=t.shift();)if(E(e+"transform")in s)return e;return""}(),o=D("opacity"),v=D("transform"),g=D("perspective"),b=D("transform-style"),x=D("transform-origin"),w=D("backface-visibility"),N=b&&(s[b]="preserve-3d")==s[b],l=Object.prototype.toString,h=[].slice,c={},p={},d={click:4,mousewheel:5,dommousescroll:5,keydown:6},T={2:"touch",3:"pen",4:"mouse",pen:"pen"},I=[],M=[],k=(a={},n={start:1,down:1,move:2,end:3,up:3,cancel:3},P("mouse touch pointer MSPointer-".split(" "),function(i){var s=/pointer/i.test(i)?"pointer":i;a[s]=a[s]||{},T[s]=s,P(n,function(e,t){var n=E(i+e);a[s][n]=t,p[n.toLowerCase()]=s,1==(d[n.toLowerCase()]=t)?I.push(n):M.push(n)})}),{touch:{},pointer:{},mouse:{}}),C={linear:function(e,t,n,i){return n*e/i+t},ease:function(e,t,n,i){return-n*((e=e/i-1)*e*e*e-1)+t},"ease-in":function(e,t,n,i){return n*(e/=i)*e*e+t},"ease-out":function(e,t,n,i){return n*((e=e/i-1)*e*e+1)+t},"ease-in-out":function(e,t,n,i){return(e/=i/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t},bounce:function(e,t,n,i){return(e/=i)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}},z={fade:function(e,t,n,i){o?(e.style.opacity=1-Math.abs(t),n&&(n.style.opacity=Math.abs(t))):(e.style.filter="alpha(opacity="+100*(1-Math.abs(t))+")",n&&(n.style.filter="alpha(opacity="+100*Math.abs(t)+")"))}};function X(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[l.call(e)]||"object":typeof e}function E(e){return(e+"").replace(/^-ms-/,"ms-").replace(/-([a-z]|[0-9])/gi,function(e,t){return(t+"").toUpperCase()})}function D(e){var t=E(e),n=E(y+t);return t in s&&t||n in s&&n||""}function S(e){return"function"==X(e)}function P(e,t){if(o=X(a=e),a&&"function"!=o&&"string"!=o&&(0===a.length||a.length&&(1==a.nodeType||a.length-1 in a))){if("function"==X(e.forEach))return e.forEach(t);for(var n,i=0,s=e.length;i=Math.abs(a[1-r]-o[1-r]),this.drag&&this.fire("dragStart",t)),this.drag&&(f=this.percent+(h&&l/h),this.pages[i=this.fixIndex(s+(0Math.max(1e3-this.duration,0)){var y=t.wheelDelta||-t.detail;3<=Math.abs(y)&&this[0.theiaStickySidebar:after {content: ""; display: table; clear: both;}')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("
    ").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,e(t,this),this}}(jQuery); 2 | //# sourceMappingURL=maps/theia-sticky-sidebar.min.js.map 3 | -------------------------------------------------------------------------------- /layer/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */ 2 | ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
    '+(f?r.title[0]:r.title)+"
    ":"";return r.zIndex=s,t([r.shade?'
    ':"",'
    '+(e&&2!=r.type?"":u)+'
    '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
    '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
    '+e+"
    "}():"")+(r.resize?'':"")+"
    "],u,i('
    ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
      '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
    • '+(t[0].content||"no content")+"
    • ";i'+(t[i].content||"no content")+"";return a}()+"
    ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
    '+(u.length>1?'':"")+'
    '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
    ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); -------------------------------------------------------------------------------- /layer/mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ 2 | ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

    '+(e?n.title[0]:n.title)+"

    ":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
    '+e+"
    "):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

    '+(n.content||"")+"

    "),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
    ':"")+'
    "+l+'
    '+n.content+"
    "+c+"
    ",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /layer/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/layer/theme/default/icon-ext.png -------------------------------------------------------------------------------- /layer/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/layer/theme/default/icon.png -------------------------------------------------------------------------------- /layer/theme/default/layer.css: -------------------------------------------------------------------------------- 1 | .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} -------------------------------------------------------------------------------- /layer/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/layer/theme/default/loading-0.gif -------------------------------------------------------------------------------- /layer/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/layer/theme/default/loading-1.gif -------------------------------------------------------------------------------- /layer/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/layer/theme/default/loading-2.gif -------------------------------------------------------------------------------- /page-links.php: -------------------------------------------------------------------------------- 1 | 8 | need('header.php'); 11 | ?> 12 |
    13 |
    14 |
    15 |
    16 |
    17 |
    18 |
    19 |

    title() ?>

    20 |
    21 | content(); ?> 22 |
    options->innerlinkshow); ?>
    23 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 24 | need('aplayer.php'); ?> 25 | 26 |
    27 | 30 | 31 |
    32 |
    33 | need('comments.php'); ?> 34 |
    35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 |
    42 | need('sidebar.php'); ?> 43 | need('footer.php'); ?> -------------------------------------------------------------------------------- /page-message-board.php: -------------------------------------------------------------------------------- 1 | 8 | need('header.php'); 11 | ?> 12 |
    13 |
    14 |
    15 |
    16 |
    17 |
    18 |
    19 |

    访客墙&留言板

    20 | 25 |
    26 | content(); ?> 27 |
    28 | fetchAll(Typecho_Db::get() 31 | ->select('COUNT(author) AS cnt','author', 'url', 'mail') 32 | ->from('table.comments') 33 | ->where('created > ?', $period ) 34 | ->where('status = ?', 'approved') 35 | ->where('type = ?', 'comment') 36 | ->where('authorId = ?', '0') 37 | ->group('author') 38 | ->order('cnt', Typecho_Db::SORT_DESC) 39 | ->limit(40) 40 | ); 41 | $mostactive = ''; 42 | $avatar_path = 'https://cdn.v2ex.com/gravatar/'; 43 | foreach ($counts as $count) { 44 | $qnum = str_replace('@qq.com', '', $count['mail']); 45 | if (strstr($count['mail'], "qq.com") && is_numeric($qnum) && strlen($qnum) > 4 && strlen($qnum) < 12) { 46 | $avatar = 'https://q2.qlogo.cn/g?b=qq&nk='.$qnum.'&s=100'; 47 | }else{ 48 | $avatar = $avatar_path . md5(strtolower($count['mail'])) . '?s=65'; 49 | } 50 | $c_url = $count['url']; if ( !$c_url ) $c_url = Helper::options()->siteUrl; 51 | $mostactive .= "" . $count[\n"; 52 | } 53 | echo $mostactive; ?> 54 |
    55 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 56 | need('aplayer.php'); ?> 57 | 58 |
    59 | 62 | 63 |
    64 |
    65 | need('comments.php'); ?> 66 |
    67 |
    68 |
    69 |
    70 |
    71 |
    72 |
    73 |
    74 | need('sidebar.php'); ?> 75 | need('footer.php'); ?> -------------------------------------------------------------------------------- /page-status.php: -------------------------------------------------------------------------------- 1 | 8 | need('header.php'); 11 | ?> 12 |
    13 |
    14 |
    15 |
    16 |
    17 |
    18 |
    19 |

    title() ?>

    20 | 26 |
    27 | content(); ?> 28 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 29 | need('aplayer.php'); ?> 30 | 31 |
    32 | 36 | 37 |
    38 |
    39 | need('comments.php'); ?> 40 |
    41 |
    42 |
    43 |
    44 |
    45 |
    46 |
    47 |
    48 | need('sidebar.php'); ?> 49 | need('footer.php'); ?> -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 |
    6 |
    7 |
    8 |
    9 |
    10 |
    11 |
    12 |

    title() ?>

    13 | 19 |
    20 | content(); ?> 21 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 22 | need('aplayer.php'); ?> 23 | 24 |
    25 | 29 | 30 |
    31 |
    32 | need('comments.php'); ?> 33 |
    34 |
    35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | need('sidebar.php'); ?> 42 | need('footer.php'); ?> -------------------------------------------------------------------------------- /post.php: -------------------------------------------------------------------------------- 1 | 4 | category == 'gallery'): ?> 5 | 6 | category == 'timeline'): ?> 7 | 8 | 9 | need('header.php'); ?> 10 |
    11 |
    12 |
    13 |
    14 |
    15 |
    16 |
    17 |

    title() ?> 18 | fields->postTop == 'keeptop'): ?> 19 | 【置顶】 20 | 21 |

    22 | 28 |
    29 | content(); ?> 30 |
    31 | fields->aplayerurl == '' && $this->fields->aplayerthumb == '')): ?> 32 | need('aplayer.php'); ?> 33 | 34 | 38 | 39 |
    40 |
    41 |   Previous post 42 | thePrev('%s','已到最后一篇'); ?> 43 |
    44 |
    45 | Next post   46 | theNext('%s','已到最新一篇'); ?> 47 |
    48 |
    49 |
    50 |
    51 | need('comments.php'); ?> 52 |
    53 |
    54 |
    55 |
    56 |
    57 |
    58 |
    59 |
    60 | need('sidebar.php'); ?> 61 | need('footer.php'); ?> 62 | -------------------------------------------------------------------------------- /post_common.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | ]*>/i", $this->content, $matches); 5 | $imgCount = count($matches[0]); 6 | if (($imgCount >= 4) && empty($this->options->showPostAlbum)) { ?> 7 |
    ]*>/i", $this->content, $matches); 9 | $imgCount = count($matches[0]); 10 | if($imgCount >= 1){ 11 | $img = $matches[2][0]; 12 | echo <<" style="background-image: url(options->loadingPic(); ?>)"> 17 | 36 |
    37 | 38 |
    39 |
    40 | fields->thumbimg == '')) { ?> 41 |
    42 | 43 | ]*>/i", $this->content, $matches); 45 | $imgCount = count($matches[0]); 46 | if ($imgCount >= 1) { ?> 47 |
    52 | 53 |

    fields->posttitlecolor == '')): ?> style="color:fields->posttitlecolor(); ?>" href="permalink() ?>"> 54 | fields->aplayerurl == '')): ?> 55 | 56 | content)): ?> 57 | 58 | 59 | 60 | 61 |  title() ?> sticky(); ?>

    62 |

    excerpt(35, ' ...'); ?>

    63 |

     category(',', true); ?>

    64 |
    65 |
    66 |

     author(); ?>  

    67 |

       

    68 |

     commentsNum('0','1','%d'); ?>

    69 |
    70 |

     

    71 |
    72 |
    73 |
    74 | 75 |
    -------------------------------------------------------------------------------- /post_gallery.php: -------------------------------------------------------------------------------- 1 | need('header.php'); ?> 2 |
    3 | 40 | need('footer.php'); ?> -------------------------------------------------------------------------------- /post_timeline.php: -------------------------------------------------------------------------------- 1 | need('header.php'); ?> 2 | 10 |
    11 |
    12 |
    13 |
    14 |
    15 |
    16 |
    17 |

    title() ?> 18 | fields->postTop == 'keeptop'): ?> 19 | 【置顶】 20 | 21 |

    22 | 28 |
    29 | content; 31 | $t_content = preg_replace('/(\[addvideo2\])(http:|https:)(.*?),(http:|https:)(.*?),(.*?)(\[\/addvideo2\])/i','', $t_content); 32 | echo $t_content; 33 | ?> 34 | 37 |
    38 | 41 |
    42 |
    43 | need('comments.php'); ?> 44 |
    45 |
    46 |
    47 |
    48 |
    49 |
    50 |
    51 |
    52 |
    53 | 54 | 55 | 56 | 57 | 68 | 69 | category == 'timeline' && !$this->is('index')): ?> 70 | 79 | 80 | 88 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/crazystear/Practice01/c002e0d76b179c572a85ae58bcc929a02896890d/screenshot.png -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | need('header.php'); 4 | ?> 5 |
    6 |
    7 |
    8 |
    9 |
    10 | next()): ?> 11 | 12 | 13 |
    14 |
    15 | pageLink('下一页','next'); ?> 16 |
    17 |
    18 |
    19 |
    20 |
    21 | need('sidebar.php'); ?> 22 | need('footer.php'); ?> -------------------------------------------------------------------------------- /show_avatar.php: -------------------------------------------------------------------------------- 1 | 4 && strlen($qqnum) < 12) { 8 | $avatar = 'https://q2.qlogo.cn/g?b=qq&nk='.$qqnum.'&s=100'; 9 | }else { 10 | $avatar = 'https://cdn.v2ex.com/gravatar/' . $mdmd5 . '?s=80'; 11 | } 12 | //输出头像 13 | echo ""; 14 | ?> -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 | options->ShowTimeline) && in_array('sidebarTimeline', $this->options->ShowTimeline)): ?> 5 | widget('Widget_Archive@index', 'pageSize=1&type=category', 'slug=timeline')->to($timeline); 7 | while($timeline->next()): ?> 8 |
    9 |
    10 |

      Timeline:title(); ?>

    11 |

    12 |
    13 |
    14 | content(); ?> 15 | 16 |
    17 |
    18 | 19 | 20 | 45 | 96 | 108 |
    109 |

      近期评论

    110 |
    111 |
      112 | widget('Widget_Comments_Recent','pageSize=10&ignoreAuthor=true')->to($comments); ?> 113 | have()): ?> 114 | next()): ?> 115 |
    •  author(false); ?>: excerpt(50, '...'); ?>
    • 116 | 117 | 118 |
    • 暂无评论
    • 119 | 120 |
    121 |
    122 |
    123 | options->sidebarCategory) && in_array('onSidebar', $this->options->sidebarCategory)): ?> 124 |
    125 |

      分类目录

    126 |
    127 |
      128 | widget('Widget_Metas_Category_List')->to($categorys); ?> 129 | next()): ?> 130 |
    • name(); ?>
    • 131 | 132 |
    133 |
    134 |
    135 | 136 | is('index')): ?> 137 | options->ShowLinks) && in_array('sidebar', $this->options->ShowLinks)): ?> 138 |
    139 | 140 | 148 |
    149 | 150 | 151 |
    152 | 157 |
    158 | 159 |
    160 |
    161 | -------------------------------------------------------------------------------- /simplehome.php: -------------------------------------------------------------------------------- 1 | 58 | widget('Widget_Archive@index', 'pageSize=1&type=category', 'slug=timeline')->to($timeline); 60 | while($timeline->next()): ?> 61 |
    62 | content(); ?> 63 |

    --- Enter ---

    64 |
    65 | -------------------------------------------------------------------------------- /theme_config.php: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 96 | -------------------------------------------------------------------------------- /typeword.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 很多东西宁缺毋滥,流星的光芒短暂而灼热闪耀。

    "; 8 | echo "

    让你变得更好的那个人,往往是你觉得很难与之相处的那个人。—— by 小宇

    "; 9 | echo "

    觉得自己做的到和不做的到,其实只在一念之间。

    "; 10 | echo "

    路在自己脚下,没有人可以决定我的方向。

    "; 11 | echo "

    你的选择是做或不做,但不做就永远不会有机会。

    "; 12 | echo "

    凡事顺其自然,遇事处于泰然,得意之时淡然,失意之时坦然,艰辛曲折必然,历尽沧桑悟然。

    "; 13 | break; 14 | case '2': 15 | echo "

    离别时的伤感,时候却很难说出口,哪怕是短暂的分离!—— by 小宇

    "; 16 | echo "

    人生应该树立目标,否则你的精力会白白浪费。

    "; 17 | echo "

    山涧的泉水经过一路曲折,才唱出一支美妙的歌。

    "; 18 | echo "

    如若不是为了一个人,谁肯枯守一座城。城市和爱情,总是有着这样那样的关系。我们会因为一个人,去到那座城,因为那是一座爱的城;我们也会因为一个人,离开一座城,那是一座绝望的伤城。

    "; 19 | echo "

    常求有利别人,不求有利自己。

    "; 20 | break; 21 | case '3': 22 | echo "

    你是否在某个夜深人静的时刻,静静地听着Bressanone,思念着某人。—— by 小宇

    "; 23 | echo "

    每个人心里都有一段伤痕,时间才是最好的疗剂。

    "; 24 | echo "

    人总是珍惜未得到的,而遗忘了所拥有的。

    "; 25 | echo "

    退一步,并不象征我认输;放手,并不表示我放弃;微笑,并不意味我快乐!

    "; 26 | echo "

    人海中再回首,朋友真诚依旧,生命里重逢,心境平和温柔,往事如风,岁月如歌,漫漫人生路,苍桑几许,幸福几何!

    "; 27 | break; 28 | case '4': 29 | echo "

    要铭记在心:每天都是一年中最美好的日子。

    "; 30 | echo "

    生活远没有咖啡那么苦涩,关键是喝它的人怎么品味!每个人都喜欢和向往随心所欲的生活,殊不知随心所欲根本不是生活。

    "; 31 | echo "

    如果错过了太阳时你流泪了,那么你也要错过群星了。

    "; 32 | echo "

    不如意的时候不要尽往悲伤里钻,想想有笑声的日子吧。

    "; 33 | echo "

    我不明白为什么要那么在意别人的看法,评头论足只是无聊人的消遣,何必看得如临大敌。如果你不吃别人家的饭,就别太把别人的话放在心上。

    "; 34 | break; 35 | case '5': 36 | echo "

    青春就是用来追忆的,当你怀揣着它时,它一文不值,只有将它耗尽后,再回过头看,一切才有了意义,爱过我们的人和伤害过我们的人,都是我们青春存在的意义。

    "; 37 | echo "

    既然活着来到这个世界,就没有打算活着回去。所以,在这有限的时间里,我们应该珍惜生命,珍惜机会,更要珍惜那得之不易的时间。因那滴答做响的时间脚步,一旦走过,再不回头。

    "; 38 | echo "

    青春是一个充满魁力,充满诱惑的时代。好动是青春,好奇是青春,好玩是青春。玩世不恭更是青春,我们的一切切都是青春。

    "; 39 | echo "

    要先打败任何事情得先学会打败自己。

    "; 40 | echo "

    我会把每一次改变当做成长,哪怕是痛也值得。

    "; 41 | break; 42 | case '6': 43 | echo "

    有种脾气叫,不放弃。

    "; 44 | echo "

    梦想是注定孤独的旅行,路上少不了质疑和嘲笑,但那又怎样,哪怕遍体鳞伤也要活的漂亮。

    "; 45 | echo "

    不管现在有多么艰辛,我们也要做个生活的舞者。

    "; 46 | echo "

    命运从来不会同情弱者。

    "; 47 | echo "

    不怕万人阻挡在前方,只怕自己先行投降。

    "; 48 | break; 49 | case '7': 50 | echo "

    生活其实很简单,过了今天就是明天。

    "; 51 | echo "

    低头哭过别忘了抬头继续走。

    "; 52 | echo "

    不要被任何人打乱自的脚步,因为没有谁会像你一样清楚和在乎自己梦想。

    "; 53 | echo "

    没有人可以打倒我,除非我自己先趴下!

    "; 54 | echo "

    你要记住你不是为别人而活,你是为自己而活。

    "; 55 | break; 56 | case '8': 57 | echo "

    只有脚踏实地的人,才能够说:路,就在我的脚下。

    "; 58 | echo "

    无论你选择做什么,追求完美的程度决定你成就的高度。

    "; 59 | echo "

    这个世界最脆弱的是生命,身体健康,很重要。

    "; 60 | echo "

    上帝说:你要什么便取什么,但是要付出相当的代价。

    "; 61 | echo "

    现在站在什么地方不重要,重要的是你往什么方向移动。

    "; 62 | break; 63 | case '9': 64 | echo "

    成功源于不懈的努力。

    "; 65 | echo "

    暗自伤心,不如立即行动。

    "; 66 | echo "

    再多一点努力,就多一点成功。

    "; 67 | echo "

    得意淡然,失意坦然;喜而不狂,忧而不伤。

    "; 68 | echo "

    海纳百川,有容乃大;壁立千仞,无欲则刚。

    "; 69 | break; 70 | case '10': 71 | echo "

    快乐地过是一天,不快乐地过也是一天,我为什么不快快乐乐地过每一天呢?

    "; 72 | echo "

    岂能尽随人愿,但求无愧我心。

    "; 73 | echo "

    在你内心深处,还有无穷的潜力,有一天当你回首看时,你就会知道这绝对是真的。

    "; 74 | echo "

    活在当下,别在怀念过去或者憧憬未来中浪费掉你现在的生活。

    "; 75 | echo "

    挫折时,要像大树一样,被砍了,还能再长;也要像杂草一样,虽让人践踏,但还能勇敢地活下去。

    "; 76 | break; 77 | default: 78 | echo "

    更改你喜欢的短语请直接替换各个case中的内容即可!

    "; 79 | break; 80 | } 81 | ?> 82 |
    -------------------------------------------------------------------------------- /videoplayer.php: -------------------------------------------------------------------------------- 1 | 2 | <?php $this->fields->videoname(); ?> 3 | --------------------------------------------------------------------------------