Skip to content

Commit d59c8c2

Browse files
author
hooray
committed
部分js插件更换为cdn,减少项目大小;
我的日历应用更新
1 parent 8c09c93 commit d59c8c2

File tree

1,441 files changed

+249
-236786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,441 files changed

+249
-236786
lines changed

index.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@
4646
<meta name="description" content="<?php echo $setting['description']; ?>" />
4747
<meta name="keywords" content="<?php echo $setting['keywords']; ?>" />
4848
<meta http-equiv="X-UA-Compatible" content="IE=edge">
49+
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
50+
<link href="//cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.css" rel="stylesheet">
51+
<link href="//at.alicdn.com/t/font_2dkt72ag040io1or.css" rel="stylesheet">
4952
<link rel="stylesheet" href="static/plugins/HoorayLibs/hooraylibs.css">
50-
<link rel="stylesheet" href="static/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
51-
<link rel="stylesheet" href="//at.alicdn.com/t/font_3qtd7uxnh21n61or.css">
5253
<link rel="stylesheet" href="static/plugins/artDialog-7.0.0/css/dialog.css">
53-
<link rel="stylesheet" href="static/plugins/sweetalert-1.1.1/dist/sweetalert.css">
5454
<link rel="stylesheet" href="libs/clicaptcha/css/captcha.css">
5555
<link rel="stylesheet" href="static/css/index.css">
5656
<link rel="stylesheet" href="static/css/skins/<?php echo getSkin(); ?>.css" id="window-skin">
@@ -326,13 +326,13 @@
326326
<p>购买或定制请联系 QQ:<a href="http://wpa.qq.com/msgrd?v=3&uin=304327508&site=qq&menu=yes" target="_blank">304327508</a></p>
327327
</div>
328328
</div>
329-
<script src="static/plugins/jquery-2.2.4.min.js"></script>
329+
<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
330+
<script src="//cdn.bootcss.com/sugar/2.0.4/sugar.min.js"></script>
331+
<script src="//cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.js"></script>
330332
<script src="static/plugins/HoorayLibs/hooraylibs.js"></script>
331333
<script src="static/plugins/Validform_v5.3.2/Validform_v5.3.2_min.js"></script>
332-
<script src="libs/clicaptcha/clicaptcha.js"></script>
333-
<script src="static/plugins/Sugar-2.0.2/dist/sugar.min.js"></script>
334334
<script src="static/plugins/artDialog-7.0.0/dist/dialog-plus.js"></script>
335-
<script src="static/plugins/sweetalert-1.1.1/dist/sweetalert.min.js"></script>
335+
<script src="libs/clicaptcha/clicaptcha.js"></script>
336336
<!-- 通过js目录下的两个批处理文件,可以合并并压缩js代码 -->
337337
<script src="static/js/hros.core.js"></script>
338338
<script src="static/js/hros.app.js"></script>

libs/clicaptcha/clicaptcha.class.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function __construct(){
77
}
88
public function creat(){
99
$imagePathArr = array('image/1.jpg', 'image/2.jpg', 'image/3.jpg');
10-
$imagePath = $imagePathArr[rand(0, 2)];
10+
$imagePath = $imagePathArr[rand(0, count($imagePathArr) - 1)];
1111
$fontPath = 'font/SourceHanSansCN-Normal.otf';
1212
foreach($this->randChars() as $v){
1313
$fontSize = rand(15, 30);
@@ -38,7 +38,7 @@ public function creat(){
3838
//创建图片的实例
3939
$image = imagecreatefromstring(file_get_contents($imagePath));
4040
foreach($textArr['text'] as $v){
41-
list($r, $g, $b) = $this->getImageColor($imagePath, $v['x'] + $v['width'] / 2, $v['y'] + $v['height'] / 2);
41+
list($r, $g, $b) = $this->getImageColor($imagePath, $v['x'] + $v['width'] / 2, $v['y'] - $v['height'] / 2);
4242
//字体颜色
4343
$color = imagecolorallocate($image, $r, $g, $b);
4444
//阴影字体颜色
@@ -47,16 +47,16 @@ public function creat(){
4747
$b = $b > 127 ? 0 : 255;
4848
$shadowColor = imagecolorallocate($image, $r, $g, $b);
4949
//绘画阴影
50-
imagefttext($image, $v['size'], 0, $v['x'] + 1, $v['y'], $shadowColor, $fontPath, $v['text']);
51-
imagefttext($image, $v['size'], 0, $v['x'], $v['y'] + 1, $shadowColor, $fontPath, $v['text']);
52-
imagefttext($image, $v['size'], 0, $v['x'] - 1, $v['y'], $shadowColor, $fontPath, $v['text']);
53-
imagefttext($image, $v['size'], 0, $v['x'], $v['y'] - 1, $shadowColor, $fontPath, $v['text']);
54-
imagefttext($image, $v['size'], 0, $v['x'] + 1, $v['y'] + 1, $shadowColor, $fontPath, $v['text']);
55-
imagefttext($image, $v['size'], 0, $v['x'] + 1, $v['y'] - 1, $shadowColor, $fontPath, $v['text']);
56-
imagefttext($image, $v['size'], 0, $v['x'] - 1, $v['y'] - 1, $shadowColor, $fontPath, $v['text']);
57-
imagefttext($image, $v['size'], 0, $v['x'] - 1, $v['y'] + 1, $shadowColor, $fontPath, $v['text']);
50+
imagettftext($image, $v['size'], 0, $v['x'] + 1, $v['y'], $shadowColor, $fontPath, $v['text']);
51+
imagettftext($image, $v['size'], 0, $v['x'], $v['y'] + 1, $shadowColor, $fontPath, $v['text']);
52+
imagettftext($image, $v['size'], 0, $v['x'] - 1, $v['y'], $shadowColor, $fontPath, $v['text']);
53+
imagettftext($image, $v['size'], 0, $v['x'], $v['y'] - 1, $shadowColor, $fontPath, $v['text']);
54+
imagettftext($image, $v['size'], 0, $v['x'] + 1, $v['y'] + 1, $shadowColor, $fontPath, $v['text']);
55+
imagettftext($image, $v['size'], 0, $v['x'] + 1, $v['y'] - 1, $shadowColor, $fontPath, $v['text']);
56+
imagettftext($image, $v['size'], 0, $v['x'] - 1, $v['y'] - 1, $shadowColor, $fontPath, $v['text']);
57+
imagettftext($image, $v['size'], 0, $v['x'] - 1, $v['y'] + 1, $shadowColor, $fontPath, $v['text']);
5858
//绘画文字
59-
imagefttext($image, $v['size'], 0, $v['x'], $v['y'], $color, $fontPath, $v['text']);
59+
imagettftext($image, $v['size'], 0, $v['x'], $v['y'], $color, $fontPath, $v['text']);
6060
}
6161
//生成图片
6262
switch($imageType){
@@ -145,6 +145,7 @@ private function randPosition($textArr, $imgW, $imgH, $fontW, $fontH){
145145
$return = array();
146146
$x = rand(0, $imgW - $fontW);
147147
$y = rand($fontH, $imgH);
148+
//碰撞验证
148149
if(!$this->checkPosition($textArr, $x, $y, $fontW, $fontH)){
149150
$return = $this->randPosition($textArr, $imgW, $imgH, $fontW, $fontH);
150151
}else{

static/css/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/skins/mac.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@
1212
.title-bar .title{text-shadow:0 1px 1px #fff}
1313
/*窗口右上角操作按钮*/
1414
.title-handle a{color:#505050}
15-
.title-handle .ha-hide .hide-b{border-bottom:2px solid #505050}
16-
.title-handle .ha-max .max-b{border:1px solid #505050;border-top-width:3px;top:8px}
17-
.title-handle .ha-revert .revert-b{border:1px solid #505050;border-top-width:3px}
18-
.title-handle .ha-revert .revert-t{border:1px solid #505050;border-top-width:3px;background:#D2D2D2}
19-
.title-handle .ha-hide:hover b,
20-
.title-handle .ha-max:hover b,
21-
.title-handle .ha-revert:hover b{border-color:#2492FF}
22-
.title-handle .ha-fullscreen{color:#505050}
23-
.title-handle .ha-fullscreen:hover{color:#2492FF}
24-
.title-handle .ha-close{color:#BF160B}
25-
.title-handle .ha-close:hover{color:#BF160B}
2615
/*窗口内部iframe*/
2716
.window-frame{border-top:1px solid #666;border-bottom:1px solid #666}
2817
/*底部*/

static/js/hros.base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ HROS.base = (function(){
111111
setSkin: function(skin, callback){
112112
//将原样式修改id,并载入新样式
113113
$('#window-skin').attr('id', 'window-skin-ready2remove');
114-
var stylesheet = loadCSS('static/img/skins/' + skin + '.css?' + version);
114+
var stylesheet = loadCSS('static/css/skins/' + skin + '.css?' + version);
115115
onloadCSS(stylesheet, function(){
116116
$('body link').last().attr('id', 'window-skin');
117117
$('#window-skin-ready2remove').remove();

static/plugins/Sugar-2.0.2/.eslintrc.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

static/plugins/Sugar-2.0.2/.gitignore

Lines changed: 0 additions & 21 deletions
This file was deleted.

static/plugins/Sugar-2.0.2/.npmignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

static/plugins/Sugar-2.0.2/.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)