Skip to content

Commit 98f3ada

Browse files
committed
Replace the statically loaded file URL
1 parent f969e53 commit 98f3ada

File tree

8 files changed

+73
-61
lines changed

8 files changed

+73
-61
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.iws
33
*.iml
44
*.ipr
5+
.DS_Store

docs/v1.1/Docs/Customization/config.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ window.cnblogsConfig = {
191191
192192
```javascript
193193
window.cnblogsConfig = {
194-
webpageIcon: "https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/blog_logo.gif"
194+
webpageIcon: "https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/blog_logo.gif"
195195
}
196196
```
197197
@@ -496,7 +496,7 @@ window.cnblogsConfig = {
496496
497497
```json
498498
[
499-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/home_top_bg.jpg"
499+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/home_top_bg.jpg"
500500
]
501501
```
502502
@@ -505,8 +505,8 @@ window.cnblogsConfig = {
505505
```javascript
506506
window.cnblogsConfig = {
507507
homeTopImg: [
508-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/home_top_bg.jpg",
509-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/home_top_bg.jpg"
508+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/home_top_bg.jpg",
509+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/home_top_bg.jpg"
510510
]
511511
}
512512
```
@@ -553,7 +553,7 @@ one:每日获取一句话
553553
554554
```json
555555
[
556-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/nothome_top_bg.jpg"
556+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/nothome_top_bg.jpg"
557557
]
558558
```
559559
@@ -562,8 +562,8 @@ one:每日获取一句话
562562
```javascript
563563
window.cnblogsConfig = {
564564
essayTopImg: [
565-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/nothome_top_bg.jpg",
566-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/nothome_top_bg.jpg"
565+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/nothome_top_bg.jpg",
566+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/nothome_top_bg.jpg"
567567
]
568568
}
569569
```

src/script/base.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function Base() {
8989
$('#menuWrap').optiscroll({ forceScrollbars: true, maxTrackSize: 20, preventParentScroll: true });
9090

9191
// 设置菜单个人简介头像
92-
var blogAvatar = window.cnblogsConfig.blogAvatar ? window.cnblogsConfig.blogAvatar : 'https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/default_avatar.jpeg';
92+
var blogAvatar = window.cnblogsConfig.blogAvatar ? window.cnblogsConfig.blogAvatar : 'https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/default_avatar.jpeg';
9393
$('#menuBlogAvatar').append("<img src='"+blogAvatar+"'>");
9494

9595
// 设置菜单侧边栏内容
@@ -614,7 +614,7 @@ function Base() {
614614
});
615615

616616
$('.footer-image').css({
617-
'background': 'url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/footer.png) no-repeat 50%',
617+
'background': 'url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/footer.png) no-repeat 50%',
618618
'height': '368px',
619619
'z-index': '1',
620620
'position': 'absolute',
@@ -1176,7 +1176,7 @@ function Base() {
11761176
var patch = op.text();
11771177
html += '<img class="comment-avatar" src="'+patch+'"/>';
11781178
} else {
1179-
html += '<img class="comment-avatar" src="https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/default_avatar.jpeg"/>';
1179+
html += '<img class="comment-avatar" src="https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/default_avatar.jpeg"/>';
11801180
}
11811181
$(commentList[i]).before(html);
11821182
}

src/script/simpleMemory.js

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if (initCheck()) {
6767
' <canvas id="notHomeTopCanvas"></canvas>' +
6868
' <div class="vertical">' +
6969
' <div class="main-header-content inner">' +
70-
' <link href="https://fonts.googleapis.com/css?family=Playball" rel="stylesheet">' +
70+
' <link href="https://fonts.proxy.ustclug.org/css?family=Playball" rel="stylesheet">' +
7171
' <h1 class="page-title" style="font-family: \'Playball\', cursive;" id="homeTopTitle"></h1>' +
7272
' <h2 class="page-description" id="hitokoto"></h2>' +
7373
' <h3 class="page-author" id="hitokotoAuthor"></h3>' +
@@ -167,12 +167,12 @@ if (initCheck()) {
167167
animateSections: true
168168
},
169169
homeTopImg: [
170-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/home_top_bg.jpg"
170+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/home_top_bg.jpg"
171171
],
172172
homeBannerText: "",
173173
homeBannerTextType: "jinrishici",
174174
essayTopImg: [
175-
"https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/nothome_top_bg.jpg"
175+
"https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/nothome_top_bg.jpg"
176176
],
177177
essayCodeHighlightingType: 'cnblogs',
178178
essayCodeHighlighting: '',
@@ -273,38 +273,49 @@ function initCheck() {
273273

274274
// get version config
275275
function getVersionConfig() {
276-
var url = 'https://raw.githubusercontent.com/' + window.cnblogsConfigDefault.GhUserName + '/' + window.cnblogsConfigDefault.GhRepositories + '/master/version.conf';
277276

278-
$.ajax({
279-
type: "get",
280-
url: url,
281-
dataType: "text",
282-
async: false,
283-
success: function(conf)
284-
{
285-
var confObj = conf ? JSON.parse(conf) : false;
286-
var confVersion = getEndConfVal(window.cnblogsConfigDefault.GhVersions);
287-
window.cnblogsConfigDefault.CnVersions = window.cnblogsConfigDefault.GhVersions;
277+
var confObj;
278+
window.cnblogsConfigDefault.CnVersions = window.cnblogsConfigDefault.GhVersions;
279+
if (window.cnblogsConfigDefault.GhUserName === 'BNDong') {
288280

289-
if (confVersion) {
290-
window.cnblogsConfigDefault.GhVersions = confVersion;
281+
$.getScript('https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/version.js', function () {
282+
confObj = window.themeVersion;
283+
});
284+
285+
} else {
286+
var url = 'https://raw.githubusercontent.com/' + window.cnblogsConfigDefault.GhUserName + '/' + window.cnblogsConfigDefault.GhRepositories + '/master/version.conf';
287+
288+
$.ajax({
289+
type: "get",
290+
url: url,
291+
dataType: "text",
292+
async: false,
293+
success: function(conf)
294+
{
295+
confObj = conf ? JSON.parse(conf) : false;
291296
}
297+
});
298+
}
292299

293-
function getEndConfVal(thisGhVersion) {
294-
var endVal = '';
295-
confObj && $.each(confObj, function (i) {
296-
if (confObj[i][0] === thisGhVersion) {
297-
endVal = confObj[i][1];return false;
298-
}
299-
});
300-
if (endVal === '') {
301-
return thisGhVersion;
302-
} else {
303-
return getEndConfVal(endVal);
304-
}
300+
var confVersion = getEndConfVal(window.cnblogsConfigDefault.GhVersions);
301+
302+
if (confVersion) {
303+
window.cnblogsConfigDefault.GhVersions = confVersion;
304+
}
305+
306+
function getEndConfVal(thisGhVersion) {
307+
var endVal = '';
308+
confObj && $.each(confObj, function (i) {
309+
if (confObj[i][0] === thisGhVersion) {
310+
endVal = confObj[i][1]; return false;
305311
}
312+
});
313+
if (endVal === '') {
314+
return thisGhVersion;
315+
} else {
316+
return getEndConfVal(endVal);
306317
}
307-
});
318+
}
308319
}
309320

310321
// get file url

src/style/base.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3034,7 +3034,7 @@ b {
30343034
max-height: 100vh;
30353035
/*margin-bottom: 5rem;*/
30363036
text-align: center;
3037-
/*background: #222 url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/home_top_bg.jpg) center center no-repeat;*/
3037+
/*background: #222 url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/home_top_bg.jpg) center center no-repeat;*/
30383038
background-size: cover;
30393039
overflow: hidden;
30403040
position: absolute;
@@ -3254,8 +3254,8 @@ b {
32543254
transition-delay: 0.4s;
32553255
outline: none;
32563256
cursor: pointer;
3257-
/*background: #000 url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/menu_bg.jpeg) 0 -195px no-repeat;*/
3258-
background: #000 url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/me_top_bg.gif) center no-repeat;
3257+
/*background: #000 url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/menu_bg.jpeg) 0 -195px no-repeat;*/
3258+
background: #000 url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/me_top_bg.gif) center no-repeat;
32593259
background-size: 100%;
32603260
}
32613261

@@ -3368,7 +3368,7 @@ blockquote p {
33683368
height: 16px;
33693369
display: inline-block;
33703370
transition: all .3s;
3371-
background-image: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/title_icon.png);
3371+
background-image: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/title_icon.png);
33723372
background-repeat: no-repeat;
33733373
background-position: 0 6px;
33743374
}
@@ -3860,7 +3860,7 @@ body>meting-js, #aplayer {
38603860
padding: 10px;
38613861
height: 200px;
38623862
position: relative;
3863-
background: #fff url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/comment_bg.jpg) right -65px;
3863+
background: #fff url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/comment_bg.jpg) right -65px;
38643864
background-size: 250px;
38653865
background-repeat: no-repeat;
38663866
}
@@ -3904,7 +3904,7 @@ body>meting-js, #aplayer {
39043904
}
39053905

39063906
.tbCommentBody_bg {
3907-
background: url('https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/commentHintBg.gif') center center no-repeat;
3907+
background: url('https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/commentHintBg.gif') center center no-repeat;
39083908
}
39093909

39103910
.commentbox_main {
@@ -3931,9 +3931,9 @@ body>meting-js, #aplayer {
39313931
.list .out .icon,.list .inc .icon{width:48px;height:48px;}
39323932
.list .icontd {width:48px;}
39333933
.list .out .icontd{display:none;}
3934-
.list .out .topleft,.list .out .topright,.list .out .bottomleft,.list .out .bottomright,.list .inc .topleft,.list .inc .topright,.list .inc .bottomleft,.list .inc .bottomright{background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/t_o_bubbles.gif) no-repeat;}
3935-
.list .out .top,.list .out .bottom,.list .inc .top,.list .inc .bottom{background:transparent url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/t_o_horizontal.gif) repeat-x;}
3936-
.list .out .left,.list .out .right,.list .inc .left,.list .inc .right{background:transparent url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/t_o_vertical.gif) repeat-y;}
3934+
.list .out .topleft,.list .out .topright,.list .out .bottomleft,.list .out .bottomright,.list .inc .topleft,.list .inc .topright,.list .inc .bottomleft,.list .inc .bottomright{background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/t_o_bubbles.gif) no-repeat;}
3935+
.list .out .top,.list .out .bottom,.list .inc .top,.list .inc .bottom{background:transparent url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/t_o_horizontal.gif) repeat-x;}
3936+
.list .out .left,.list .out .right,.list .inc .left,.list .inc .right{background:transparent url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/t_o_vertical.gif) repeat-y;}
39373937

39383938
.list .out .topleft{background-position:left top;height:9px;width:18px;}
39393939
.list .out .topright{background-position:-18px top;height:9px;width:11px;}

src/style/base.min.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.

src/style/footer.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ footer h2{margin-bottom:1.5rem}
2222
footer .copyright{color:#BDBDBD;position:absolute;font-size:.75rem;font-weight:600;bottom:3rem;text-align:right;right:10%;z-index:3}
2323
footer footer-background{bottom:7.25rem;left:0;height:18rem;position:absolute;width:100%;z-index:1;transform:translate3d(0, 0, 0)}
2424
footer footer-background figure{bottom:0;left:0;height:15rem;margin:0;position:absolute;width:100%}
25-
footer footer-background .foreground{background-repeat:repeat-x!important;background:url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/foreground.png) repeat-x;background-size:225em 15em;position:absolute;top:1rem;right:0;bottom:0;left:0}
26-
footer footer-background .background{background-repeat:repeat-x!important;background:url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/background.png) repeat-x;background-size:225em 21.313em;position:absolute;top:-1em;right:0;bottom:0;left:0}
27-
footer footer-background .clouds{background-repeat:repeat-x!important;background:url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/clouds.png) repeat-x;background-size:225em 15em;position:absolute;top:-2em;right:0;bottom:0;left:0}
28-
footer footer-background .poof{background:url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/poof.png) repeat-x;background-size:47px 29px!important;background-position:top left!important;opacity:0;position:absolute;bottom:3.5em;height:29px;left:10%;width:47px}
25+
footer footer-background .foreground{background-repeat:repeat-x!important;background:url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/foreground.png) repeat-x;background-size:225em 15em;position:absolute;top:1rem;right:0;bottom:0;left:0}
26+
footer footer-background .background{background-repeat:repeat-x!important;background:url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/background.png) repeat-x;background-size:225em 21.313em;position:absolute;top:-1em;right:0;bottom:0;left:0}
27+
footer footer-background .clouds{background-repeat:repeat-x!important;background:url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/clouds.png) repeat-x;background-size:225em 15em;position:absolute;top:-2em;right:0;bottom:0;left:0}
28+
footer footer-background .poof{background:url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/poof.png) repeat-x;background-size:47px 29px!important;background-position:top left!important;opacity:0;position:absolute;bottom:3.5em;height:29px;left:10%;width:47px}
2929
footer ol {
3030
display: table;
3131
list-style-type: none;

src/style/marvin.nav2.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
bottom: 0
5151
}
5252
#sideCatalog #sideCatalog-sidebar .sideCatalog-sidebar-top,#sideCatalog #sideCatalog-sidebar .sideCatalog-sidebar-bottom {
53-
background: url("https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/sideToolbar.gif") no-repeat scroll 0 -199px transparent;
53+
background: url("https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/sideToolbar.gif") no-repeat scroll 0 -199px transparent;
5454
height: 10px;
5555
left: -5px;
5656
overflow: hidden;
@@ -127,7 +127,7 @@
127127
font-weight: bold
128128
}
129129
.sideCatalog-dot {
130-
background: url("https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/sideToolbar.gif") repeat scroll 0 -222px transparent;
130+
background: url("https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/sideToolbar.gif") repeat scroll 0 -222px transparent;
131131
cursor: pointer;
132132
font-size: 12px;
133133
height: 10px;
@@ -139,14 +139,14 @@
139139
width: 6px
140140
}
141141
#sideCatalog .highlight .sideCatalog-dot {
142-
background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/list.gif) no-repeat scroll 4px 6px transparent;
142+
background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/list.gif) no-repeat scroll 4px 6px transparent;
143143
height: 13px;
144144
left: -23px;
145145
top: 3px;
146146
width: 18px
147147
}
148148
#sideCatalogBtn {
149-
background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/list.gif) no-repeat scroll 4px 6px transparent;
149+
background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/list.gif) no-repeat scroll 4px 6px transparent;
150150
cursor: pointer;
151151
display: block;
152152
height: 45px;
@@ -161,13 +161,13 @@
161161
bottom: 96px;
162162
}
163163
#sideCatalogBtn:hover {
164-
background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/list.gif) no-repeat scroll 4px 6px transparent;
164+
background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/list.gif) no-repeat scroll 4px 6px transparent;
165165
}
166166
.sideCatalogBtnDisable {
167-
background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/list.gif) no-repeat scroll 4px 6px transparent !important;
167+
background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/list.gif) no-repeat scroll 4px 6px transparent !important;
168168
}
169169
#sideToolbar-up {
170-
background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/list.gif) no-repeat scroll 4px 6px transparent;
170+
background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/list.gif) no-repeat scroll 4px 6px transparent;
171171
border-radius: 2px;
172172
display: block;
173173
height: 45px;
@@ -176,7 +176,7 @@
176176
outline: 0
177177
}
178178
#sideToolbar-up:hover {
179-
background: url(https://raw.githubusercontent.com/BNDong/Cnblogs-Theme-SimpleMemory/master/img/list.gif) no-repeat scroll 4px 6px transparent;
179+
background: url(https://gitee.com/dbnuo/Cnblogs-Theme-SimpleMemory/raw/master/img/list.gif) no-repeat scroll 4px 6px transparent;
180180
}
181181

182182

0 commit comments

Comments
 (0)