Skip to content

Commit cac98c4

Browse files
committed
update robot
1 parent 310f71e commit cac98c4

File tree

1 file changed

+101
-87
lines changed

1 file changed

+101
-87
lines changed

src/layouts/Layout.astro

Lines changed: 101 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,134 @@
11
---
2-
import {SEO} from "astro-seo";
2+
import { SEO } from "astro-seo";
33
import Footer from "../components/Footer.astro";
44
import Navbar from "../components/home/Navbar.astro";
55
import "@fontsource-variable/inter/index.css";
66
import "@fontsource-variable/bricolage-grotesque";
77
import "../style/global.css";
88
99
export interface Props {
10-
title: string;
10+
title: string;
1111
}
1212
1313
const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
1414
15-
const {title} = Astro.props;
15+
const { title } = Astro.props;
1616
1717
const makeTitle = title
18-
? title + " | " + "Serverless Devs"
19-
: "Serverless Devs 官网 | 一键部署AI / 函数 / 应用到多云的开发运维平台";
18+
? title + " | " + "Serverless Devs"
19+
: "Serverless Devs 官网 | 一键部署AI / 函数 / 应用到多云的开发运维平台";
2020
---
2121

2222
<!doctype html>
2323
<html lang="zh" data-theme="dark">
24-
<head>
25-
<meta charset="UTF-8"/>
24+
<head>
25+
<meta charset="UTF-8" />
2626
<meta name="msvalidate.01" content="44319F9675676357716A86315318B93E" />
27-
<meta name="viewport" content="width=device-width"/>
28-
<link rel="stylesheet" href="/src/style/fonts.css"/>
29-
<link rel="icon" type="image/svg+xml" href="/favicon.png"/>
27+
<meta name="viewport" content="width=device-width" />
28+
<link rel="stylesheet" href="/src/style/fonts.css" />
29+
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
3030
<SEO
31-
title={makeTitle}
32-
canonical={canonicalURL}
33-
extend={{
34-
meta: [
35-
{
36-
name: "keywords",
37-
content: "Serverless, Serverless Devs, 中文社区, Serverless 社区"
38-
},
39-
{
40-
name: "author",
41-
content: "Serverless Devs"
42-
}
43-
]
44-
}}
45-
/>
31+
title={makeTitle}
32+
canonical={canonicalURL}
33+
extend={{
34+
meta: [
35+
{
36+
name: "keywords",
37+
content: "Serverless, Serverless Devs, 中文社区, Serverless 社区",
38+
},
39+
{
40+
name: "author",
41+
content: "Serverless Devs",
42+
},
43+
],
44+
}}
45+
/>
4646
<script>
47-
var _hmt = _hmt || [];
48-
(function() {
49-
var hm = document.createElement("script");
50-
hm.src = "https://hm.baidu.com/hm.js?7cd7ede27d94e5534124e44fcdd7fecd";
51-
var s = document.getElementsByTagName("script")[0];
52-
s.parentNode.insertBefore(hm, s);
53-
})();
47+
var _hmt = _hmt || [];
48+
(function () {
49+
var hm = document.createElement("script");
50+
hm.src = "https://hm.baidu.com/hm.js?7cd7ede27d94e5534124e44fcdd7fecd";
51+
var s = document.getElementsByTagName("script")[0];
52+
s.parentNode.insertBefore(hm, s);
53+
})();
5454
</script>
55-
</head>
55+
</head>
5656

57-
<script>
57+
<script>
5858
//cnpilot
5959
function addCopilot() {
60-
const copilotJSScript = document.createElement("script");
61-
copilotJSScript.type = "text/javascript";
62-
copilotJSScript.src =
63-
"https://g.alicdn.com/cm-design/copilot-booter/0.0.26/copilot-booter.js";
64-
copilotJSScript.addEventListener("load", function () {
65-
if (window.CNPilot) {
66-
window.CNPilot.mounted({
67-
CNPilot_OPEN_SOURCE: [
68-
"www.serverless-devs.com",
69-
"devs-website-test.fcv3.1003293809975419.cn-hangzhou.fc.devsapp.net",
70-
],
71-
CNPilot_OPEN_SOURCE_API: "https://ai.nacos.io",
72-
CNPilot_OPEN_SOURCE_PRODUCT_NAME: "ServerlessDevs",
73-
showFloatICON: true,
74-
globalStyle: {
75-
top: "0px",
76-
// width: "14px",
77-
// height: "14px",
78-
},
79-
entryIconProps: { // 入口 ICON 配置
80-
'position-type': 'updown',
81-
'icon-hover-text': '专家答疑',
82-
'icon-style': {
83-
color: 'white', // 配置文字颜色
84-
background: 'black', // 配置背景色
85-
border: '1px solid white', // 配置边框
86-
borderRadius: '20px', // 配置圆角
87-
// ...其他 css
88-
}
89-
},
90-
headerProps: {
91-
// titleIcon: 'https://xxxxxx.jpeg', // 自定义 header icon 图片
92-
titleText: "无疑 AI答疑专家", // 自定义 header 文字
93-
closeIcon: {show: true}, // 展示 header 部分右边关闭按钮
94-
}
95-
});
96-
}
97-
});
98-
document.body.append(copilotJSScript);
60+
const copilotJSScript = document.createElement("script");
61+
copilotJSScript.type = "text/javascript";
62+
copilotJSScript.src =
63+
"https://g.alicdn.com/cm-design/copilot-booter/0.0.26/copilot-booter.js";
64+
copilotJSScript.addEventListener("load", function () {
65+
if (window.CNPilot) {
66+
window.CNPilot.mounted({
67+
CNPilot_OPEN_SOURCE: [
68+
"www.serverless-devs.com",
69+
"devs-website-test.fcv3.1003293809975419.cn-hangzhou.fc.devsapp.net",
70+
],
71+
CNPilot_OPEN_SOURCE_API: "https://ai.nacos.io",
72+
CNPilot_OPEN_SOURCE_PRODUCT_NAME: "ServerlessDevs",
73+
showFloatICON: true,
74+
globalStyle: {
75+
top: "0px",
76+
height: "100%",
77+
},
78+
entryIconProps: {
79+
"position-type": "updown",
80+
"icon-hover-text": "专家答疑",
81+
"icon-url":
82+
"https://img.alicdn.com/imgextra/i3/O1CN013gOExm1X2g7hKMTjC_!!6000000002866-2-tps-92-92.png",
83+
"icon-style": {
84+
color: "white",
85+
width: "80px",
86+
height: "80px",
87+
background: "#3D57DA",
88+
border: "none",
89+
paddingTop: "12px",
90+
},
91+
"image-style": {
92+
width: "46px",
93+
height: "46px",
94+
borderRadius: "16px",
95+
},
96+
"icon-text": {
97+
color: "#F4F4F6",
98+
width: "100%",
99+
fontSize: "10px",
100+
fontFamily: " Source Han Sans",
101+
fontWeight: "normal",
102+
lineHeight: "normal",
103+
textAlign: "center",
104+
letterSpacing: "0em",
105+
},
106+
},
107+
headerProps: {
108+
closeIcon: { show: true }, // 关闭按钮
109+
titleText: "无疑 专家智能答疑",
110+
},
111+
});
112+
}
113+
});
114+
document.body.append(copilotJSScript);
99115
}
100116

101117
addCopilot();
102-
</script>
118+
</script>
103119

104-
<body>
105-
<Navbar/>
106-
<slot/>
107-
<Footer/>
108-
<style is:global>
109-
img {
120+
<body>
121+
<Navbar />
122+
<slot />
123+
<Footer />
124+
<style is:global>
125+
img {
110126
content-visibility: auto;
111-
}
127+
}
112128

113-
body {
129+
body {
114130
background: #121316;
115-
}
116-
</style>
117-
</body>
131+
}
132+
</style>
133+
</body>
118134
</html>
119-
120-

0 commit comments

Comments
 (0)