Skip to content

Commit 748eeb5

Browse files
author
ChenRui
committed
博文查看BUG修复
1 parent c1120e1 commit 748eeb5

26 files changed

+335
-227
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
2+
*{
3+
word-wrap: break-word;
4+
}
5+
h1{
6+
font-size: 24px !important;
7+
}
8+
h2{
9+
font-size: 20px;
10+
}
11+
h3{
12+
font-size: 18px;
13+
}
14+
h4{
15+
font-size: 16px;
16+
}
17+
h5{
18+
font-size: 15px;
19+
}
20+
h6{
21+
font-size: 14px;
22+
}
23+
a{
24+
-webkit-tap-highlight-color:rgba(0,0,0,0);
25+
-webkit-tap-highlight-color: transparent;
26+
outline:none;
27+
background: none;
28+
text-decoration: none;
29+
}
30+
#header{
31+
padding-bottom:20px;
32+
}
33+
#blog_title{
34+
text-align: left;
35+
margin-top: 25px;
36+
font-weight: bold;
37+
line-height: 32px;
38+
}
39+
#author{
40+
margin-top: 72px;
41+
border-bottom: 1px solid #f0f0f0;
42+
padding-bottom: 12px;
43+
}
44+
.author_right{
45+
float: left;
46+
margin-top: 8px;
47+
}
48+
.btn_author{
49+
-webkit-tap-highlight-color:rgba(0,0,0,0);
50+
-webkit-tap-highlight-color: transparent;
51+
box-shadow: none;
52+
outline: none;
53+
display: block;
54+
float: right;
55+
margin-top: 12px;
56+
}
57+
#author_name{
58+
font-weight: bold;
59+
display: block;
60+
}
61+
#blog_avatar{
62+
display: block;
63+
float: left;
64+
margin-right: 12px;
65+
box-shadow: none;
66+
max-width:120px;
67+
max-height:120px;
68+
}
69+
#blog_date{
70+
display: block;
71+
color: #929292;
72+
}
73+
#blog_content{
74+
line-height:26px;
75+
}
76+
img{
77+
width: 100%;
78+
}
79+
.code_img_closed, .auto_width{
80+
width: auto;
81+
}
82+
.cnblogs_code_toolbar button{
83+
margin: 10px;
84+
85+
}
86+
.container-fluid{
87+
overflow: auto;
88+
}
89+
90+
.code_key_primary, .hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-name, .hljs-tag{
91+
color:#0000ff;
92+
}
93+
.code_comment{
94+
color:#008000;
95+
}
96+
.code_args{
97+
color:#000000;
98+
}
99+
.code_symbol{
100+
color:#800080;
101+
}
102+
.code_text{
103+
color:#800000;
104+
}
105+
.code_high_night{
106+
color:#ff0000;
107+
}

app/src/main/assets/css/rae-night.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,14 @@ blockquote{
6767
}
6868
a {
6969
color: #4893D8;
70+
}
71+
#author {
72+
margin-top: 72px;
73+
border-bottom: 1px solid #3E3E40;
74+
padding-bottom: 12px;
75+
}
76+
.btn-default {
77+
color: #8f9091;
78+
background-color: #000;
79+
border-color: #8f9091;
7080
}

app/src/main/assets/css/rae.css

Lines changed: 0 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +0,0 @@
1-
2-
*{
3-
word-wrap: break-word;
4-
}
5-
h1{
6-
font-size: 24px !important;
7-
}
8-
h2{
9-
font-size: 20px;
10-
}
11-
h3{
12-
font-size: 18px;
13-
}
14-
h4{
15-
font-size: 16px;
16-
}
17-
h5{
18-
font-size: 15px;
19-
}
20-
h6{
21-
font-size: 14px;
22-
}
23-
a{
24-
-webkit-tap-highlight-color:rgba(0,0,0,0);
25-
-webkit-tap-highlight-color: transparent;
26-
outline:none;
27-
background: none;
28-
text-decoration: none;
29-
}
30-
#header{
31-
padding-bottom:20px;
32-
}
33-
#blog_title{
34-
text-align: left;
35-
margin-top: 25px;
36-
font-weight: bold;
37-
line-height: 32px;
38-
}
39-
#author{
40-
margin-top: 72px;
41-
border-bottom: 1px solid #f0f0f0;
42-
padding-bottom: 12px;
43-
}
44-
.author_right{
45-
float: left;
46-
margin-top: 8px;
47-
}
48-
.btn_author{
49-
display: block;
50-
float: right;
51-
margin-top: 12px;
52-
}
53-
#author_name{
54-
font-weight: bold;
55-
display: block;
56-
}
57-
#blog_avatar{
58-
display: block;
59-
float: left;
60-
margin-right: 12px;
61-
box-shadow: none;
62-
max-width:120px;
63-
max-height:120px;
64-
}
65-
#blog_date{
66-
display: block;
67-
color: #929292;
68-
}
69-
#blog_content{
70-
line-height:26px;
71-
}
72-
img{
73-
width: 100%;
74-
}
75-
.code_img_closed, .auto_width{
76-
width: auto;
77-
}
78-
.cnblogs_code_toolbar button{
79-
margin: 10px;
80-
81-
}
82-
.container-fluid{
83-
overflow: auto;
84-
}
85-
86-
.code_key_primary, .hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-name, .hljs-tag{
87-
color:#0000ff;
88-
}
89-
.code_comment{
90-
color:#008000;
91-
}
92-
.code_args{
93-
color:#000000;
94-
}
95-
.code_symbol{
96-
color:#800080;
97-
}
98-
.code_text{
99-
color:#800000;
100-
}
101-
.code_high_night{
102-
color:#ff0000;
103-
}

app/src/main/assets/js/rae.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function initImage(){
2121
var filter = ["ExpandedBlockStart.gif","ContractedBlock.gif"];
2222
$("img").click(function(e){
2323
var src = $(this).attr("src");
24-
24+
if($(this).attr("id")=="blog_avatar") return; // 过滤头像
2525
if(src.indexOf("ExpandedBlockStart.gif")!=-1|| src.indexOf("ContractedBlock.gif")!=-1){
2626
return false;
2727
}
@@ -31,6 +31,7 @@ function initImage(){
3131
$("img").each(function(key,obj){
3232
var itemUrl = $(obj).attr("src");
3333
// 过滤图片
34+
if($(obj).attr("id")=="blog_avatar") return; // 过滤头像
3435
if(itemUrl.indexOf("ExpandedBlockStart.gif")!=-1|| itemUrl.indexOf("ContractedBlock.gif")!=-1|| itemUrl.indexOf("copycode.gif")!=-1){
3536
return;
3637
}

app/src/main/assets/view.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
<head>
44
<meta charset="utf-8"/>
55
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="msapplication-tap-highlight" content="no">
67
<title>博文</title>
78
<link type="text/css" rel="stylesheet" href="css/shCore.css"/>
89
<link rel="stylesheet" type="text/css" href="css/blog-common.css">
910
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
1011
<!-- <link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css"> -->
1112
<link type="text/css" rel="stylesheet" href="css/shCoreDefault.css" id="CodeStyle"/>
13+
<link rel="stylesheet" type="text/css" href="css/rae-common.css">
1214
<link rel="stylesheet" type="text/css" href="css/rae.css" id="RaeStyle">
13-
<link rel="stylesheet" type="text/css"
14-
href="http://www.raeblog.com/cnblogs/Content/app/rae-ext.css"/>
15-
<!--<link type="text/css" rel="stylesheet" href="css/shThemeRDark.css" />-->
16-
<!--<link rel="stylesheet" type="text/css" href="css/rae-night.css" />-->
15+
<link rel="stylesheet" type="text/css" href="http://www.raeblog.com/cnblogs/Content/app/rae-ext.css"/>
16+
<!-- <link type="text/css" rel="stylesheet" href="css/shThemeRDark.css" />
17+
<link rel="stylesheet" type="text/css" href="css/rae-night.css" /> -->
1718

1819
<script src="js/jquery.js" type="text/javascript"></script>
1920
<script src="js/highlight.min.js" type="text/javascript"></script>
@@ -46,6 +47,8 @@
4647
// }
4748

4849
// };
50+
51+
// 渲染数学公式
4952
var cb_enable_mathjax=true;
5053
var width = 0;
5154
// 加载主题
@@ -166,6 +169,11 @@
166169
$("#blog_content").append("<p>接口缺失正文内容,可能由于博客发布时间已经久远,接口任性就是没有返回数据。</p><p>你可以尝试点击下面阅读原文阅读,也可以点击右上方的更多按钮查看原文。</p><p><a href='"+blog.url +"' class='a-source'>【阅读原文】</a></p>");
167170
}else{
168171
$("#blog_content").append(blog.content);
172+
if($(".math").length>0){
173+
// 渲染数学公式
174+
alert('mathjax');
175+
cb_mathjax_render();
176+
}
169177
}
170178
}
171179
}
@@ -177,13 +185,11 @@
177185
// 重新设置代码高亮
178186
refreshCodeTheme();
179187

180-
cb_mathjax_render();
181188
}catch(e){
182189
alert(e);
183190
console.error(e);
184191
}
185192

186-
187193
}
188194

189195

@@ -224,7 +230,7 @@
224230

225231
</script>
226232

227-
<h3 id="blog_title" class="clearfix">库朗等指出需要引进的点数至多为,此种点称为斯坦纳点。</h3>
233+
<h3 id="blog_title" class="clearfix">标题</h3>
228234
</div>
229235
<div id="blog_content" class="clearfix">
230236

app/src/main/java/com/rae/cnblogs/AppUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public static Toast failed(Context context, String msg) {
111111
if (msgView != null) {
112112
int p = 20;
113113
msgView.setPadding(p, p, p, p);
114-
msgView.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.toast_failed, 0, 0);
115-
msgView.setCompoundDrawablePadding((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, context.getResources().getDisplayMetrics()));
114+
// msgView.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.toast_failed, 0, 0);
115+
// msgView.setCompoundDrawablePadding((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, context.getResources().getDisplayMetrics()));
116116
}
117117
toast.show();
118118
return toast;

0 commit comments

Comments
 (0)