|
1 | 1 | --- |
2 | | -import {SEO} from "astro-seo"; |
| 2 | +import { SEO } from "astro-seo"; |
3 | 3 | import Footer from "../components/Footer.astro"; |
4 | 4 | import Navbar from "../components/home/Navbar.astro"; |
5 | 5 | import "@fontsource-variable/inter/index.css"; |
6 | 6 | import "@fontsource-variable/bricolage-grotesque"; |
7 | 7 | import "../style/global.css"; |
8 | 8 |
|
9 | 9 | export interface Props { |
10 | | - title: string; |
| 10 | + title: string; |
11 | 11 | } |
12 | 12 |
|
13 | 13 | const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString(); |
14 | 14 |
|
15 | | -const {title} = Astro.props; |
| 15 | +const { title } = Astro.props; |
16 | 16 |
|
17 | 17 | const makeTitle = title |
18 | | - ? title + " | " + "Serverless Devs" |
19 | | - : "Serverless Devs 官网 | 一键部署AI / 函数 / 应用到多云的开发运维平台"; |
| 18 | + ? title + " | " + "Serverless Devs" |
| 19 | + : "Serverless Devs 官网 | 一键部署AI / 函数 / 应用到多云的开发运维平台"; |
20 | 20 | --- |
21 | 21 |
|
22 | 22 | <!doctype html> |
23 | 23 | <html lang="zh" data-theme="dark"> |
24 | | -<head> |
25 | | - <meta charset="UTF-8"/> |
| 24 | + <head> |
| 25 | + <meta charset="UTF-8" /> |
26 | 26 | <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" /> |
30 | 30 | <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 | + /> |
46 | 46 | <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 | + })(); |
54 | 54 | </script> |
55 | | -</head> |
| 55 | + </head> |
56 | 56 |
|
57 | | -<script> |
| 57 | + <script> |
58 | 58 | //cnpilot |
59 | 59 | 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); |
99 | 115 | } |
100 | 116 |
|
101 | 117 | addCopilot(); |
102 | | -</script> |
| 118 | + </script> |
103 | 119 |
|
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 { |
110 | 126 | content-visibility: auto; |
111 | | - } |
| 127 | + } |
112 | 128 |
|
113 | | - body { |
| 129 | + body { |
114 | 130 | background: #121316; |
115 | | - } |
116 | | -</style> |
117 | | -</body> |
| 131 | + } |
| 132 | + </style> |
| 133 | + </body> |
118 | 134 | </html> |
119 | | - |
120 | | - |
|
0 commit comments