Skip to content

Commit 64f76c9

Browse files
author
catcoder
committed
V1.2.0
增加了About窗体和logo
1 parent 5b452c1 commit 64f76c9

File tree

7 files changed

+150
-7
lines changed

7 files changed

+150
-7
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ catwrite
33

44
这是一个用来在现代浏览器中进行码字写作的项目,可以随时随地在有网络的地方进行无干扰舒适的写作,并提供良好的备份。
55

6-
###版本:V1.1.1
6+
###版本:V1.2.0
77
###创建者:catcoder
88

9-
###2013-04-19
9+
###2013-04-19 V1.2.0
10+
11+
--增加了About窗体和logo
12+
13+
###2013-04-19 V1.1.1
1014

1115
--增加了多文件添加,多文件编辑,调整了全屏后的参数。

img/header.png

6.08 KB
Loading

index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
77
<script src="js/write.js" type="text/javascript"></script>
88
<script src="js/wordcount.js" type="text/javascript"></script>
9+
<script src="js/about.js" type="text/javascript"></script>
910
<link href="style/write.css" type="text/css" rel="stylesheet"/>
1011
</head>
1112

@@ -14,7 +15,14 @@
1415
<form action="sendto.php" method="post">
1516
<div id="main">
1617
<!--顶部-->
17-
<div class="header" id="header"></div>
18+
<div class="header" id="header">
19+
<div class="logo">
20+
<img src="img/header.png" title="catwrite" />
21+
</div>
22+
<div class="aboutcat">
23+
<a href="javascript:void()" onclick="aboutcat()">ABOUT</a>
24+
</div>
25+
</div>
1826
<!--左侧列表-->
1927
<div class="left_list" id="l_list">
2028
<div class="mainfile">

js/about.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(function($) {
2+
jQuery.fn.aboutcat = function() {
3+
defaulthtml = '<div class="sbox_main" id="about_catwrite" style="height:350px;"><div class="sbox_head"><span>关于CatWrite</span><a href="javascript:void(0)" onclick="close_sbox_about()">x</a></div><div class="sbox_content" style="height:300px;"><span style="left:20px">感谢你的使用,catwrite是一个完全免费的旨在方便写作和保存的项目,你的任何建议和回馈对我们都是最大的支持。<br/><br/>联系邮箱:mn@catcoder.com<br/><br/>参与者(按加入时间排序):<br/><a href="http://www.catcoder.com" target="_block">CatCoder</a></span><div class="sbox_foot"><a href="javascript:void(0)" onclick="close_sbox_about()">确 定</a></div></div></div>';
4+
5+
if($("#about_catwrite").length <= 0){
6+
$(document.body).append(defaulthtml);
7+
}
8+
9+
$("#about_catwrite").show(500);
10+
};
11+
12+
})(jQuery);
13+
function close_sbox_about(){
14+
$("#about_catwrite").hide(500);
15+
}

js/wordcount.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
(function($) {
22
jQuery.fn.wordbox = function(options) {
3-
var eleid = options,
4-
defaultcss = '<style type="text/css">.sbox_main{display:none;width:300px;height:250px;background-color:#333333;opacity:0.8;position:absolute;top:50%;left:50%;margin-top:-200px;margin-left:-150px;}.sbox_head{width:100%;height:30px;background-color:#333;position:relative;}.sbox_head span{margin-left:10px;line-height:25px;color:#fff;font-size:16px;font-family:"隶书";}.sbox_head a{font-size:22px;line-height:25px;font-family:Arial,Helvetica,sans-serif;text-decoration:none;position:absolute;right:0px;color:#fff;width:35px;height:30px;background-color:#F25331;text-align:center;}.sbox_head a:hover{background-color:red;color:#000;font-size:26px;}.sbox_content{width:280px;height:200px;margin-left:5px;margin-top:5px;background-color:#FFF;position:relative;font-family:Verdana,Geneva,sans-serif,"宋体","隶书";font-size:14px;line-height:25px;padding:5px 5px;}.sbox_content span{position:absolute;text-align:left;top:20px;width:200px;left:80px;}.sbox_foot{position:absolute;right:5px;bottom:10px;width:70px;height:30px;}.sbox_foot a{position:absolute;width:70px;height:25px;border:1px solid #333;font-size:16px;text-decoration:none;color:#000;font-family:"隶书";text-align:center;}.sbox_foot a:hover{border-color:#F00;font-size:18px;}</style>',
3+
var eleid = options,
54
defaulthtml = '<div class="sbox_main" id="sbox_main"><div class="sbox_head"><span>字数统计</span><a href="javascript:void(0)" onclick="close_sbox()">x</a></div><div class="sbox_content"><span>字数:<label id="zishu"></label><br />汉字:<label id="hanzi"></label><br />字母:<label id="zimu"></label><br />数字:<label id="shuzi"></label><br />字符:<label id="zifu"></label><br /></span><div class="sbox_foot"><a href="javascript:void(0)" onclick="close_sbox()">确 定</a></div></div></div>',
65
set_num = function(){
76
var Words = $(eleid).val();
@@ -33,7 +32,6 @@
3332
};
3433

3534
if($("#sbox_main").length <= 0){
36-
$(document.body).append(defaultcss);
3735
$(document.body).append(defaulthtml);
3836
}
3937

js/write.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,8 @@ function hide_edit(ele){
246246
function edit_title(ele){
247247
$(ele).prev().attr("disabled",false).focus();
248248
hide_edit($(ele).parent());
249+
}
250+
251+
function aboutcat(){
252+
$(this).aboutcat();
249253
}

style/write.css

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,
66
ol,ul{
77
list-style:none;
88
}
9+
a{
10+
text-decoration:none;
11+
}
912
div{
1013
display:block;
1114
}
@@ -32,6 +35,31 @@ fieldset,img {
3235
ol,ul {
3336
list-style: none;
3437
}
38+
.logo{
39+
height:35px;
40+
margin-left:20px;
41+
margin-top:0px;
42+
}
43+
.logo img{
44+
width:150px;
45+
height:35px;
46+
margin:3px 0 0 0;
47+
padding:0;
48+
}
49+
.aboutcat{
50+
color:#fff;
51+
font-size:14px;
52+
font-family:"Times New Roman", Times, serif;
53+
position:absolute;
54+
right:5px;
55+
top:5px;
56+
height:25px;
57+
}
58+
59+
.aboutcat a{
60+
text-decoration:none;
61+
color:#fff;
62+
}
3563

3664
.header{
3765
height:48px;
@@ -248,4 +276,90 @@ ol,ul {
248276

249277
.rename:hover{
250278
background: url('../img/icon-black.gif') -22px 8px no-repeat;
251-
}
279+
}
280+
281+
/*弹窗格式*/
282+
.sbox_main {
283+
display:none;
284+
width:300px;
285+
height:250px;
286+
background-color:#333333;
287+
opacity:0.8;
288+
position:absolute;
289+
top:50%;
290+
left:50%;
291+
margin-top:-200px;
292+
margin-left:-150px;
293+
}
294+
.sbox_head {
295+
width:100%;
296+
height:30px;
297+
background-color:#333;
298+
position:relative;
299+
}
300+
.sbox_head span {
301+
margin-left:10px;
302+
line-height:25px;
303+
color:#fff;
304+
font-size:16px;
305+
font-family:"隶书";
306+
}
307+
.sbox_head a {
308+
font-size:22px;
309+
line-height:25px;
310+
font-family:Arial,Helvetica,sans-serif;
311+
text-decoration:none;
312+
position:absolute;
313+
right:0px;
314+
color:#fff;
315+
width:35px;
316+
height:30px;
317+
background-color:#F25331;
318+
text-align:center;
319+
}
320+
.sbox_head a:hover {
321+
background-color:red;
322+
color:#000;
323+
font-size:26px;
324+
}
325+
.sbox_content {
326+
width:280px;
327+
height:200px;
328+
margin-left:5px;
329+
margin-top:5px;
330+
background-color:#FFF;
331+
position:relative;
332+
font-family:Verdana,Geneva,sans-serif,"宋体","隶书";
333+
font-size:14px;
334+
line-height:25px;
335+
padding:5px 5px;
336+
}
337+
.sbox_content span {
338+
position:absolute;
339+
text-align:left;
340+
top:20px;
341+
width:200px;
342+
left:80px;
343+
}
344+
.sbox_foot {
345+
position:absolute;
346+
right:5px;
347+
bottom:10px;
348+
width:70px;
349+
height:30px;
350+
}
351+
.sbox_foot a {
352+
position:absolute;
353+
width:70px;
354+
height:25px;
355+
border:1px solid #333;
356+
font-size:16px;
357+
text-decoration:none;
358+
color:#000;
359+
font-family:"隶书";
360+
text-align:center;
361+
}
362+
.sbox_foot a:hover {
363+
border-color:#F00;
364+
font-size:18px;
365+
}

0 commit comments

Comments
 (0)