Skip to content

Commit 63833c1

Browse files
author
mingcheng
committed
页面修正改版
1 parent 4cd23cc commit 63833c1

File tree

5 files changed

+120
-58
lines changed

5 files changed

+120
-58
lines changed

index.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
curl_close($handle);
4848

4949
// Write request data into cache file.
50-
file_put_contents($request_url_cache_file, $source);
50+
@file_put_contents($request_url_cache_file, $source);
5151
}
5252

5353
// 判断编码
@@ -77,3 +77,4 @@
7777

7878
include 'template/reader.html';
7979
}
80+

template/footer.inc.html

+42-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
1-
<ul id="footer">
2-
<li>
3-
<a href="http://www.gracecode.com/archives/3061/">About</a>
4-
</li>
5-
<li>
6-
<a href="https://github.com/feelinglucky/php-readability/">GitHub</a>
7-
</li>
8-
<li>
9-
<a href="http://www.gracecode.com/">Gracecode.com</a>
10-
</li>
11-
<li>
12-
<a style="cursor:move;" title="Drag Me into Your Bookmark Bar" href="javascript:void(location.href='http://lab.gracecode.com/readability/?url='+encodeURIComponent(location.href));">Make Readability!</a>
13-
</li>
14-
</ul>
15-
<script type="text/javascript">
16-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
17-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
18-
</script>
19-
<script type="text/javascript">
20-
try {
21-
var pageTracker = _gat._getTracker("UA-2634498-1");
22-
pageTracker._trackPageview();
23-
} catch(err) {}
24-
</script>
25-
<img src="http://img.tongji.linezing.com/1131079/tongji.php" alt="Yahoo 统计" style="display:none;" />
1+
2+
3+
<div class="hidden">
4+
<script type="text/javascript">
5+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
6+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
7+
</script>
8+
<script type="text/javascript">
9+
try {
10+
var pageTracker = _gat._getTracker("UA-2634498-1");
11+
pageTracker._trackPageview();
12+
} catch(err) {}
13+
</script>
14+
</div>
15+
<footer>
16+
<div id="copyright">
17+
<p>
18+
Proudly powered by
19+
<a href="http://ruhoh.com/" title="Ruhoh Offical Homepage">Ruhoh</a>!
20+
<br>
21+
<!--
22+
<a href="http://www.gracecode.com/rss.xml">
23+
<img src="http://feeds.feedburner.com/~fc/gracecode" alt="rss count" />
24+
</a>
25+
-->
26+
<a href="http://www.apple.com/getamac/" title="Get a Mac" ref="nofollow">
27+
<img src="http://files.gracecode.com/2012_10_15/1350272062.png" alt="Get a Mac">
28+
</a>
29+
</p>
30+
</div>
31+
32+
<div id="footnote">
33+
<p>
34+
© 2007 - 2014 無標題文檔
35+
<!-- <a href="http://www.gracecode.com/rss.xml">rss</a> -->
36+
<a href="http://rss.gracecode.com">RSS</a>
37+
</p>
38+
<p>
39+
<a href="http://www.miibeian.gov.cn" ref="nofollow" title="和谐地备了案">沪ICP备14003520号-1</a>
40+
</p>
41+
</div>
42+
</footer>

template/header.inc.html

+7-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
<style><?php
2-
/*
3-
<link rel="stylesheet" type="text/css" href="assets/css/reset-min.css" />
4-
<link rel="stylesheet" type="text/css" href="assets/css/typography-min.css" />
5-
<link rel="stylesheet" type="text/css" href="assets/css/readability.css" />
6-
*/
7-
include DIR_ROOT."/assets/css/reset-min.css";
8-
include DIR_ROOT."/assets/css/typography-min.css";
9-
include DIR_ROOT."/assets/css/readability-min.css";
10-
?></style>
11-
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://feeds.gracecode.com/gracecode/" />
12-
<meta name="author" content="明城(mingcheng)" />
13-
<link rel="icon" type="image/x-icon" href="http://www.gracecode.com/images/favicon/favicon_16x16.png"
14-
type="image/png" />
15-
<link rel="shortcut icon" href="http://www.gracecode.com/images/favicon/favicon_16x16.png" type="image/png" />
1+
<link href="http://cdn.staticfile.org/meyer-reset/2.0/reset.css" rel="stylesheet" type="text/css" />
2+
<link href="http://www.gracecode.com/assets/media/styles-min.css" rel="stylesheet" type="text/css" />
3+
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://rss.gracecode.com/" />
4+
<link rel="icon" href="http://www.gracecode.com/assets/media/images/[email protected]" sizes="128x128" />
5+
<link rel="icon" href="http://www.gracecode.com/assets/media/images/[email protected]" sizes="32x32" />
6+
<link rel="icon" type="image/x-icon" href="http://www.gracecode.com/assets/media/images/[email protected]" type="image/png" />
7+
<link rel="shortcut icon" href="http://www.gracecode.com/assets/media/images/[email protected]" type="image/png" />
168
<meta name="application-name" content="Gracecode.com"/>
17-
<link rel="icon" href="http://www.gracecode.com/images/favicon/favicon_48x48.png" sizes="48x48" />
18-
<link rel="icon" href="http://www.gracecode.com/images/favicon/favicon_32x32.png" sizes="32x32" />
199
<meta name="application-url" content="http://www.gracecode.com/" />
20-

template/index.html

+56-7
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,69 @@
22
<html>
33
<head>
44
<meta charset="utf-8" />
5-
<title>Readability - Back the fun of reading. - Gracecode.com</title>
5+
<title>Readability - Gracecode.com</title>
66
<?php include DIR_ROOT . '/template/header.inc.html'; ?>
77
</head>
8-
<body>
9-
<div id="page">
8+
<body class="bg">
9+
<header>
10+
<h1 id="logo"><a href="http://www.gracecode.com">無標題文檔</a></h1>
11+
<a href="https://github.com/feelinglucky/php-readability"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
12+
</header>
13+
14+
<div class="article body">
1015
<h1 id="logo">Readability</h1>
11-
<p id="desp">Back the fun of reading.</p>
12-
<form action="." method="get" id="form">
16+
<p id="desp" class="metas">Back the fun of reading</p>
17+
<form action="." method="get" id="form" class="search">
18+
<p>
19+
<input type="text" placeholder="Enter the url which you need to read"
20+
autocomplete="off" id="url" name="url" value="" />
21+
</p>
1322
<p>
14-
<input type="text" placeholder="请输入需要阅读的网址" id="url" name="url" value="" />
1523
<input type="submit" id="submit" value="&raquo;" />
1624
</p>
1725
</form>
18-
<?php include DIR_ROOT . '/template/footer.inc.html'; ?>
26+
27+
<p class="align-right readability-button">
28+
<a style="cursor:move;" title="Drag Me into Your Bookmark Bar"
29+
href="javascript:void(location.href='http://graceco.de/readability/?url='+encodeURIComponent(location.href));">Make Readability!</a>
30+
</li>
31+
</p>
32+
<style>
33+
#form {
34+
margin: -1em auto;
35+
}
36+
37+
#form p {
38+
text-indent: 0;
39+
font-size: 1.5em;
40+
}
41+
42+
#form p input[type=text] {
43+
width: 100%;
44+
}
45+
46+
body .readability-button {
47+
overflow: hiden;
48+
*zoom: 1;
49+
}
50+
51+
body .readability-button a {
52+
margin: 2em 0 10em 0;
53+
display: inline-block;
54+
border: 1px solid #800;
55+
text-indent: 0;
56+
float: right;
57+
padding: .2em;
58+
border-radius: 3px;
59+
}
60+
61+
body .readability-button a:hover,
62+
body .readability-button a:focus {
63+
background: #800;
64+
color: #fff;
65+
}
66+
</style>
1967
</div>
68+
<?php include DIR_ROOT . '/template/footer.inc.html'; ?>
2069
</body>
2170
</html>

template/reader.html

+13-7
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@
33
<head>
44
<meta charset="utf-8" />
55
<base href="<?php echo strip_tags($request_url); ?>" />
6-
<title><?php echo mb_convert_encoding($title, "HTML-ENTITIES", "UTF-8"); ?> - lab.gracecode.com</title>
6+
<title><?php echo mb_convert_encoding($title, "HTML-ENTITIES", "UTF-8"); ?> - Gracecode.com</title>
77
<?php include DIR_ROOT . '/template/header.inc.html'; ?>
88
</head>
9-
<body>
10-
<div id="page" class="article">
9+
<body class="bg">
10+
<header>
11+
<h1 id="logo"><a href=".">無標題文檔</a></h1>
12+
<a href="https://github.com/feelinglucky/php-readability"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
13+
</header>
14+
15+
<article class="article body">
1116
<h1><a title="back to original page"
1217
href="<?php echo strip_tags($request_url); ?>"><?php
1318
echo mb_convert_encoding($title, 'HTML-ENTITIES', "UTF-8"); ?></a></h1>
14-
<hr />
19+
1520
<?php echo $content; ?>
16-
<hr />
17-
<?php include DIR_ROOT . '/template/footer.inc.html'; ?>
18-
</div>
21+
22+
</article>
23+
24+
<?php include DIR_ROOT . '/template/footer.inc.html'; ?>
1925
</body>
2026
</html>

0 commit comments

Comments
 (0)