Skip to content

Commit 57f821f

Browse files
author
Buttwood
committed
style:better mobile
1 parent 2347539 commit 57f821f

File tree

15 files changed

+7048
-1558
lines changed

15 files changed

+7048
-1558
lines changed

package-lock.json

Lines changed: 6993 additions & 1526 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"dependencies": {
1111
"cores": "^0.8.5",
1212
"cors": "^2.8.5",
13+
"font-spider": "^1.3.5",
1314
"fs": "^0.0.1-security",
1415
"http-proxy": "^1.18.1",
1516
"http-proxy-middleware": "^3.0.0",

www/aboutUs.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,5 @@ <h1>
133133
</div>
134134
</div>
135135
</div>
136-
<script src="js/reg.js"></script>
137136
</body>
138137
</html>

www/createIdea.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
handler.style.left = "5px";
4040
handler.classList.add('close');
4141
menuButton.style.display = 'block';
42+
document.querySelector(".right-top-span-2").style.display = 'none';
4243
} else {
4344
// 使用容器宽度的20%作为侧边栏宽度,最小210px
4445
const sidebarWidth = Math.max(containerWidth * 0.02, 210);
@@ -97,7 +98,7 @@
9798
</div>
9899
<i class="icon-create"></i>
99100
<span>个人博客</span>
100-
<span>寻感论剑证道</span>
101+
<span class="right-top-span-2">寻感论剑证道</span>
101102
<p><br></p>
102103
</div>
103104
<div class="cardList" >
@@ -117,7 +118,6 @@
117118
</div>
118119
</div>
119120

120-
<script src="js/reg.js"></script>
121121
<script src="js/blog.js"></script>
122122
<script>hljs.highlightAll();</script>
123123
</body>

www/css/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ a {
104104

105105
@font-face {
106106
font-family: fa;
107-
src: url(../resources/rabbit\ font.ttf);
107+
src: url(../resources/rabbit.ttf);
108108
}
109109

110110
@font-face {
@@ -568,7 +568,7 @@ a {
568568

569569
@media screen and (max-width: 768px) {
570570
#container {
571-
background: #fff !important;
571+
background: #F8F8FF !important;
572572
}
573573

574574
#main_content {

www/designIdea.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
handler.style.left = "5px";
3333
handler.classList.add('close');
3434
menuButton.style.display = 'block';
35+
document.querySelector(".right-top-span-2").style.display = 'none';
3536
} else {
3637
// 使用容器宽度的20%作为侧边栏宽度,最小210px
3738
const sidebarWidth = Math.max(containerWidth * 0.02, 210);
@@ -85,7 +86,7 @@
8586

8687
<i class="icon-design"></i>
8788
<span>设计灵感</span>
88-
<span>来自全球的设计师</span>
89+
<span class="right-top-span-2">来自全球的设计师</span>
8990
<p><br></p>
9091
</div>
9192
<div class="cardList" >
@@ -486,6 +487,5 @@
486487
<div class="handler"> </div>
487488
</div>
488489
</div>
489-
<script src="js/reg.js"></script>
490490
</body>
491491
</html>

www/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h1 style="font-family: fa;font-size: 300%;font-weight: 300;">
125125

126126
if (isMobileDevice()) {
127127
// 移动端样式
128-
container.style.background = '#fff';
128+
container.style.background = '#F8F8FF';
129129
video.style.display = 'none';
130130
videoCover.style.display = 'none';
131131
overlay.style.display = 'none';

www/js/china-map.js

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
11

2-
var chinaMap = echarts.init(document.getElementById("china-map"));
3-
window.onresize = chinaMap.resize; // 窗口或框架被调整大小时执行chinaMap.resize
4-
chinaMap.setOption({
2+
var chinaMap = echarts.init(document.getElementById("china-map"));
3+
window.onresize = chinaMap.resize; // 窗口或框架被调整大小时执行chinaMap.resize
4+
const leftBox = document.getElementById("left-box");
5+
6+
// 监听 leftBox 宽度变化
7+
const resizeObserver = new ResizeObserver(() => {
8+
chinaMap.resize();
9+
});
10+
resizeObserver.observe(leftBox);
11+
window.addEventListener("resize", function () {
12+
chinaMap.resize();
13+
});
14+
chinaMap.setOption({
515
// 进行相关配置
6-
tooltip: {}, // 鼠标移到图里面的浮动提示框
16+
tooltip: {
17+
formatter: function (params) {
18+
// 将value转换为数字显示
19+
let value = params.value.toString();
20+
if (!isNaN(value)) {
21+
let year = value.substring(0, 4);
22+
let month = value.substring(4, 6);
23+
let day = value.substring(6, 8);
24+
value = `${year}-${month}-${day}`;
25+
}
26+
return params.name + ": " + value;
27+
}
28+
},
729
dataRange: {
8-
show: false,
9-
min: 0,
10-
max: 1000,
11-
text: ["High", "Low"],
12-
realtime: true,
13-
calculable: true,
14-
color: ["orangered", "#FF9B52", "#FFD068"],
15-
},
30+
show: false,
31+
min: 0,
32+
max: 9999999999,
33+
text: ["High", "Low"],
34+
realtime: true,
35+
calculable: true,
36+
color: ["orangered", "#FF9B52", "#FFD068"],
37+
},
1638
geo: {
1739
// 这个是重点配置区
1840
map: "china", // 表示中国地图
@@ -47,7 +69,7 @@
4769
coordinateSystem: "geo", // 对应上方配置
4870
},
4971
{
50-
name: "照片张数", // 浮动框的标题
72+
name: "点亮日期", // 浮动框的标题
5173
type: "map",
5274
geoIndex: 0,
5375
data: data

www/js/mapData.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
var data=[
2-
{value:20, name:"北京"},
3-
{value:20, name:"广东"},
4-
{value:20, name:"广西"},
5-
{value:20, name:"福建"},
6-
{value:20, name:"安徽"},
7-
{value:20, name:"天津"},
8-
{value:20, name:"江西"},
9-
{value:20, name:"香港"},
2+
{value:"20240718", name:"北京"},
3+
{value:"20040627", name:"广东"},
4+
{value:"20220711", name:"广西"},
5+
{value:"20140319", name:"福建"},
6+
{value:"20240723", name:"安徽"},
7+
{value:"20240721", name:"天津"},
8+
{value:"20240219", name:"江西"},
9+
{value:"20120119", name:"香港"},
1010
];

www/photoIdea.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
handler.style.left = "5px";
3737
handler.classList.add('close');
3838
menuButton.style.display = 'block';
39+
document.querySelector(".right-top-span-2").style.display = 'none';
3940
} else {
4041
// 使用容器宽度的20%作为侧边栏宽度,最小210px
4142
const sidebarWidth = Math.max(containerWidth * 0.02, 210);
@@ -91,7 +92,7 @@
9192
</div>
9293
<i class="icon-photo"></i>
9394
<span>足迹地图</span>
94-
<span>记录美好生活</span>
95+
<span class="right-top-span-2">记录美好生活</span>
9596
<p><br></p>
9697
</div>
9798
<div class="cardList" style="
@@ -108,6 +109,5 @@
108109
<div class="handler"> </div>
109110
</div>
110111
</div>
111-
<script src="js/reg.js"></script>
112112
</body>
113113
</html>

0 commit comments

Comments
 (0)