├── .eslintrc.json ├── .github └── workflows │ └── cd.yml ├── .gitignore ├── .idea ├── .gitignore ├── codeStyles │ └── codeStyleConfig.xml ├── inspectionProfiles │ └── Project_Default.xml ├── modules.xml ├── my-app.iml └── vcs.xml ├── README.md ├── commitlint.config.js ├── components ├── footer │ ├── index.tsx │ └── styles.module.scss ├── layout │ ├── index.tsx │ └── styles.module.scss ├── navbar │ ├── index.tsx │ └── styles.module.scss └── popup │ ├── index.tsx │ └── styles.module.scss ├── constants └── enum.ts ├── next-env.d.ts ├── next-i18next.config.js ├── next.config.js ├── package-lock.json ├── package.json ├── pages ├── _app.tsx ├── _document.tsx ├── api │ └── layout.ts ├── components │ ├── banner │ │ ├── index.tsx │ │ └── styles.module.scss │ ├── contributors │ │ ├── index.tsx │ │ └── styles.module.scss │ ├── features │ │ ├── index.tsx │ │ └── styles.module.scss │ ├── platform │ │ ├── index.tsx │ │ └── styles.module.scss │ └── technology │ │ ├── index.tsx │ │ └── styles.module.scss ├── global.scss ├── index.module.scss ├── index.tsx └── media.scss ├── public ├── CNAME ├── banner.svg ├── banner_dark.png ├── banner_light.png ├── close.png ├── close_light.png ├── code.jpg ├── code.png ├── contributor_1.png ├── contributor_2.png ├── favicon.ico ├── gateway.svg ├── home_bg_dark.png ├── home_bg_dark.webp ├── home_bg_light.png ├── home_bg_light.webp ├── img.png ├── img_1.png ├── img_10.png ├── img_11.png ├── img_12.png ├── img_13.png ├── img_14.png ├── img_2.png ├── img_3.png ├── img_4.png ├── img_5.png ├── img_6.png ├── img_7.png ├── img_8.png ├── img_9.png ├── information.svg ├── iot.svg ├── iotsharp.png ├── iotsharp128.png ├── iotsharp32.png ├── iotsharp64.png ├── locales │ ├── en │ │ ├── common.json │ │ ├── footer.json │ │ ├── header.json │ │ └── main.json │ └── zh-CN │ │ ├── common.json │ │ ├── footer.json │ │ ├── header.json │ │ └── main.json ├── logo-icon.svg ├── logo-text-dark.svg ├── logo-text.svg ├── logo.svg ├── logo_dark.png ├── logo_dark.svg ├── logo_light.png ├── logo_white.svg ├── network.svg ├── next.svg ├── plantform.svg ├── platform.svg ├── public_logo.png ├── rule.svg ├── safety.svg ├── theme_dark.png ├── theme_light.png ├── thirteen.svg ├── user.svg └── vercel.svg ├── stores ├── language.tsx ├── theme.tsx └── userAgent.tsx ├── styles └── globals.css ├── tsconfig.json └── utils └── index.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals", 3 | "rules": { 4 | "react/display-name": "off" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.github/workflows/cd.yml: -------------------------------------------------------------------------------- 1 | name: cd 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | 7 | jobs: 8 | cd: 9 | runs-on: ${{ matrix.os }} 10 | 11 | strategy: 12 | matrix: 13 | os: [ubuntu-latest] 14 | node: [18] 15 | 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@master 19 | 20 | - name: Setup node env 21 | uses: actions/setup-node@v2.1.2 22 | with: 23 | node-version: ${{ matrix.node }} 24 | 25 | - name: Install dependencies 26 | run: npm install 27 | 28 | - name: Generate 29 | run: npm run build 30 | 31 | - name: Deploy 32 | uses: peaceiris/actions-gh-pages@v3 33 | with: 34 | github_token: ${{ secrets.GITHUB_TOKEN }} 35 | publish_dir: ./out 36 | - name: syncfile 37 | uses: SamKirkland/FTP-Deploy-Action@v4.3.5 38 | with: 39 | server: wh-nb3if1wq7i6udh1xtsb.my3w.com 40 | username: ${{ secrets.FTPUSERNAME }} 41 | password: ${{ secrets.FTPPASSWORD }} 42 | local-dir: ./out/ 43 | server-dir: htdocs/ 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | .pnpm-debug.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | package-lock.json 37 | /.idea 38 | /.nuxt 39 | /.vscode 40 | /dist 41 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/my-app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IoTSharp 网站首页 2 | 3 | 4 | https://iotsharp.net 5 | 6 | 7 | ## 如何构建? 8 | 9 | ``` 10 | npm install 11 | npm run dev 12 | ``` 13 | 14 | ## 项目调试 15 | 16 | ``` 17 | npm run debugger 18 | ``` 19 | 20 | ## 感谢 21 | 22 | 感谢 OweQian( https://github.com/OweQian ) 为项目使用 Nextjs 构建的首页。 23 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["@commitlint/config-conventional"], 3 | rules: { 4 | "type-enum": [2, "always", ["feat", "fix", "revert"]], 5 | "subject-max-length": [1, "always", 30], 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /components/footer/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC, JSXElementConstructor, ReactElement, ReactFragment, ReactNode, ReactPortal} from "react"; 2 | import Image from "next/image"; 3 | import publicLogo from "@/public/public_logo.png"; 4 | import styles from "./styles.module.scss"; 5 | import cName from "classnames"; 6 | import {isEmpty} from "lodash"; 7 | import logoText from "@/public/logo-text.svg"; 8 | import QRCode from "@/public/code.jpg"; 9 | import logoIcon from "@/public/logo-icon.svg"; 10 | interface ILink { 11 | label: string; 12 | link?: string; 13 | } 14 | 15 | interface ILinkList { 16 | title: string; 17 | list: ILink[]; 18 | } 19 | 20 | interface IQRCode { 21 | image: string; 22 | text: string; 23 | } 24 | 25 | export interface IFooterProps {} 26 | 27 | const Footer: FC = ({}) => { 28 | const data = { 29 | "title": "IoTSharp", 30 | "qr_code": "", 31 | "copy_right": "© 2018 - 2023 The IoTSharp Authors. All rights reserved.", 32 | "site_number": "", 33 | "public_number": "冀ICP备18039206号", 34 | "qr_code_image": { 35 | "data": { 36 | "name": "code.png", 37 | "alternativeText": "code.png", 38 | "caption": "code.png", 39 | "width": 56, 40 | "height": 56, 41 | "formats": {}, 42 | "hash": "code_67191e1aba", 43 | "ext": ".png", 44 | "mime": "image/png", 45 | "size": 1.45, 46 | "url": "/uploads/code_67191e1aba.png", 47 | "previewUrl": {}, 48 | "provider": "local", 49 | "provider_metadata": {} 50 | } 51 | }, 52 | "link_lists": { 53 | "data": [ 54 | { 55 | "title": '关于', 56 | "links": { 57 | "data": [ 58 | { 59 | "label": "Demo", 60 | "link": "http://demo.iotsharp.net/" 61 | }, 62 | { 63 | "label": "Docs", 64 | "link": "https://docs.iotsharp.io/", 65 | }, 66 | ] 67 | } 68 | }, 69 | { 70 | "title": "了解更多", 71 | "links": { 72 | "data": [ 73 | { 74 | "label": "Github", 75 | "link": "https://github.com/IoTSharp" 76 | }, 77 | { 78 | "label": "Gitee", 79 | "link": "https://gitee.com/IoTSharp" 80 | }, 81 | ] 82 | } 83 | }, 84 | { 85 | "title": "联系我们", 86 | "links": { 87 | "data": [ 88 | { 89 | "label": "QQ", 90 | "link": "https://jq.qq.com/?_wv=1027&k=u1ZzTmVd" 91 | }, { 92 | "label": "微博", 93 | "link": "https://weibo.com/iotsharp" 94 | }, { 95 | "label": "Discord", 96 | "link": "https://discord.com/invite/My6PaTmUvu" 97 | } 98 | ] 99 | } 100 | } 101 | ] 102 | } 103 | } 104 | const {copy_right, link_lists, public_number, qr_code, qr_code_image, site_number, title} = data || {}; 105 | const footerData = { 106 | title, 107 | linkList: link_lists?.data?.map((item: any) => ({ 108 | title: item.title, 109 | list: item?.links?.data?.map((_item: any) => ({ 110 | label: _item.label, 111 | link: isEmpty(_item.link) ? '' : _item.link, 112 | })), 113 | })), 114 | qrCode: { 115 | image: QRCode, 116 | text: qr_code, 117 | }, 118 | copyRight: copy_right, 119 | siteNumber: site_number, 120 | publicNumber: public_number, 121 | } 122 | return ( 123 |
124 |
125 |

126 | 127 | 128 |

129 |
130 | {footerData?.linkList?.map((item, index) => { 131 | return ( 132 |
133 | {item.title} 134 |
135 | {item.list?.map((_item: { link: string | URL | undefined; label: string | number | boolean | ReactElement> | ReactFragment | ReactPortal | Iterable | null | undefined; }, _index: any) => { 136 | return ( 137 |
{ 143 | _item.link && 144 | window.open( 145 | _item.link, 146 | "blank", 147 | "noopener=yes,noreferrer=yes" 148 | ); 149 | }} 150 | key={`link${_index}`} 151 | > 152 | {_item.label} 153 |
154 | ); 155 | })} 156 |
157 |
158 | ); 159 | })} 160 |
161 |
162 |
163 |
164 |
165 | {footerData?.qrCode?.text} 171 |
172 |
{footerData?.qrCode?.text}
173 |
174 |
175 | {footerData?.copyRight} 176 | {footerData?.siteNumber} 177 |
{ 178 | window.open( 179 | "https://beian.miit.gov.cn/", 180 | "blank", 181 | "noopener=yes,noreferrer=yes" 182 | ); 183 | }}> 184 |
185 | {footerData?.publicNumber} 191 |
192 | {footerData?.publicNumber} 193 |
194 |
195 |
196 |
197 | ); 198 | }; 199 | 200 | export default Footer; 201 | -------------------------------------------------------------------------------- /components/footer/styles.module.scss: -------------------------------------------------------------------------------- 1 | @import "../../pages/media.scss"; 2 | 3 | .footer { 4 | font-size: 1rem; 5 | padding: 4.375rem 9.0625rem; 6 | background-color: var(--footer-background-color); 7 | 8 | .topArea { 9 | display: flex; 10 | justify-content: space-between; 11 | flex-wrap: wrap; 12 | 13 | .footerTitle { 14 | margin: 0; 15 | display: flex; 16 | 17 | img:nth-of-type(1) { 18 | margin-right: 10px; 19 | } 20 | } 21 | 22 | .linkListArea { 23 | display: flex; 24 | .linkArea { 25 | display: flex; 26 | flex-direction: column; 27 | margin-left: 10rem; 28 | 29 | .title { 30 | font-weight: 500; 31 | font-size: 0.875rem; 32 | line-height: 1.25rem; 33 | color: #ffffff; 34 | margin-bottom: 2.5rem; 35 | word-break: keep-all; 36 | } 37 | 38 | .links { 39 | display: flex; 40 | flex-direction: column; 41 | font-weight: 400; 42 | font-size: 0.875rem; 43 | line-height: 1.25rem; 44 | word-break: keep-all; 45 | 46 | .link { 47 | color: #ffffff; 48 | cursor: pointer; 49 | margin-bottom: 1.5rem; 50 | } 51 | 52 | .disabled { 53 | color: var(--secondary-color); 54 | cursor: not-allowed; 55 | margin-bottom: 1.5rem; 56 | } 57 | } 58 | } 59 | 60 | .linkArea:first-of-type { 61 | margin-left: 0; 62 | } 63 | } 64 | } 65 | 66 | .bottomArea { 67 | display: flex; 68 | justify-content: space-between; 69 | .codeArea { 70 | display: flex; 71 | flex-direction: column; 72 | .text { 73 | color: var(--secondary-color); 74 | } 75 | } 76 | .numArea { 77 | color: var(--secondary-color); 78 | display: flex; 79 | flex-direction: column; 80 | align-items: flex-end; 81 | font-weight: 400; 82 | font-size: 0.875rem; 83 | line-height: 1.25rem; 84 | 85 | span { 86 | margin-bottom: 0.75rem; 87 | } 88 | 89 | .publicLogo { 90 | display: flex; 91 | cursor: pointer; 92 | .logo { 93 | margin-right: 0.25rem; 94 | } 95 | } 96 | } 97 | } 98 | } 99 | 100 | @media screen and (min-width: 48.6875rem) and (max-width: 54.125rem) { 101 | .footer { 102 | .topArea { 103 | .footerTitle { 104 | margin-bottom: 1.25rem; 105 | } 106 | } 107 | } 108 | } 109 | 110 | @media screen and (max-width: 48.6875rem) { 111 | .footer { 112 | .topArea { 113 | display: flex; 114 | flex-direction: column; 115 | align-items: center; 116 | 117 | .footerTitle { 118 | margin-bottom: 2.5rem; 119 | } 120 | 121 | .linkListArea { 122 | display: flex; 123 | flex-direction: column; 124 | text-align: center; 125 | 126 | .linkArea { 127 | margin-left: 0; 128 | } 129 | } 130 | } 131 | 132 | .bottomArea { 133 | display: flex; 134 | flex-direction: column; 135 | align-items: center; 136 | 137 | .codeArea { 138 | display: flex; 139 | flex-direction: column; 140 | align-items: center; 141 | 142 | .text { 143 | text-align: center; 144 | margin: 1.25rem 0; 145 | } 146 | } 147 | 148 | .numArea { 149 | align-items: center; 150 | text-align: center; 151 | } 152 | } 153 | } 154 | } 155 | 156 | // @include media-ipad { 157 | // } 158 | -------------------------------------------------------------------------------- /components/layout/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC} from "react"; 2 | import type {IFooterProps} from "../footer/index"; 3 | import type {INavBarProps} from "../navbar/index"; 4 | import styles from "./styles.module.scss"; 5 | 6 | export interface ILayoutProps { 7 | navbarData: INavBarProps; 8 | footerData: IFooterProps; 9 | } 10 | 11 | const Layout: FC = ({ 12 | children, 13 | }) => { 14 | return ( 15 |
16 | {children} 17 |
18 | ); 19 | }; 20 | 21 | export default Layout; 22 | -------------------------------------------------------------------------------- /components/layout/styles.module.scss: -------------------------------------------------------------------------------- 1 | .layout { 2 | background-color: var(--primary-background-color); 3 | 4 | .main { 5 | min-height: calc(100vh - 34.85rem); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /components/navbar/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC, useContext, useState} from "react"; 2 | import styles from "./styles.module.scss"; 3 | import Image from "next/image"; 4 | import logoIcon from "@/public/logo-icon.svg"; 5 | import logoTextDark from "@/public/logo-text-dark.svg"; 6 | import logoText from "@/public/logo-text.svg"; 7 | import {ThemeContext} from "@/stores/theme"; 8 | import { Tooltip, SideSheet } from '@douyinfe/semi-ui'; 9 | import {IconGithubLogo, IconMoon, IconSun, IconBox} from '@douyinfe/semi-icons'; 10 | import {Themes} from "@/constants/enum"; 11 | 12 | export interface INavBarProps { 13 | } 14 | 15 | const NavBar: FC = ({}) => { 16 | const [visible, setVisible] = useState(false); 17 | const {setTheme, theme} = useContext(ThemeContext); 18 | const icon = theme === Themes.light ? logoTextDark : logoText; 19 | const iconTheme = theme === Themes.light ? : ; 20 | const onChange = () => { 21 | setVisible(!visible); 22 | }; 23 | return ( 24 |
25 | 26 | 27 | 28 | 29 |
30 |
{ 33 | if (localStorage.getItem("theme") === Themes.light) { 34 | setTheme(Themes.dark); 35 | } else { 36 | setTheme(Themes.light); 37 | } 38 | }} 39 | > 40 | 41 | {iconTheme} 42 | 43 |
44 |
45 | 46 | 47 | 48 |
49 |
{ 50 | window.open( 51 | "https://github.com/IoTSharp", 52 | "blank", 53 | "noopener=yes,noreferrer=yes" 54 | ); 55 | }}> 56 | 57 | 58 | 59 |
60 |
61 | 62 |

点这里下载

63 |
64 |
65 | ); 66 | }; 67 | 68 | export default NavBar; 69 | -------------------------------------------------------------------------------- /components/navbar/styles.module.scss: -------------------------------------------------------------------------------- 1 | .navBar { 2 | display: flex; 3 | align-items: center; 4 | justify-content: space-between; 5 | background-color: var(--navbar-background-color); 6 | backdrop-filter: blur(0.5rem); 7 | border-bottom: 1px solid var(--semi-color-border); 8 | width: 100%; 9 | height: 4rem; 10 | position: sticky; 11 | top: 0; 12 | left: 0; 13 | padding: 1.25rem 2rem; 14 | z-index: 100; 15 | box-sizing: border-box; 16 | 17 | .icon { 18 | cursor: pointer; 19 | margin-left: 1.8rem; 20 | } 21 | 22 | a { 23 | display: flex; 24 | align-items: center; 25 | 26 | img:nth-of-type(1) { 27 | margin-right: 10px; 28 | } 29 | } 30 | 31 | .logoIcon { 32 | width: 4.375rem; 33 | height: 1.25rem; 34 | background-image: var(--navbar-icon); 35 | background-size: 4.375rem 1.25rem; 36 | background-repeat: no-repeat; 37 | } 38 | 39 | .themeArea { 40 | display: flex; 41 | align-items: center; 42 | color: var(--primary-color); 43 | font-size: 0.875rem; 44 | 45 | .popupText { 46 | margin-right: 1rem; 47 | cursor: pointer; 48 | } 49 | 50 | .text { 51 | margin-right: 1rem; 52 | } 53 | 54 | .themeIcon { 55 | width: 1.25rem; 56 | height: 1.25rem; 57 | background-image: var(--theme-icon); 58 | background-size: 1.25rem 1.25rem; 59 | background-repeat: no-repeat; 60 | cursor: pointer; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /components/popup/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {forwardRef, useContext, useEffect, useImperativeHandle, useState,} from "react"; 2 | import styles from "./styles.module.scss"; 3 | import ReactDom from "react-dom"; 4 | import {UserAgentContext} from "@/stores/userAgent"; 5 | import cName from "classnames"; 6 | 7 | export interface IPopupRef { 8 | open: () => void; 9 | } 10 | 11 | interface IProps { 12 | children: JSX.Element; 13 | } 14 | 15 | export const Popup = forwardRef(({children}, ref) => { 16 | const [visible, setVisible] = useState(false); 17 | const [enter, setEnter] = useState(false); 18 | const [leave, setLeave] = useState(false); 19 | const {userAgent} = useContext(UserAgentContext); 20 | 21 | useEffect(() => { 22 | document.body.className = visible ? "forbidScroll" : ""; 23 | let timeout; 24 | if (visible) { 25 | setEnter(true); 26 | timeout = setTimeout((): void => { 27 | setEnter(false); 28 | }, 300); 29 | } else { 30 | setLeave(true); 31 | timeout = setTimeout((): void => { 32 | setLeave(false); 33 | }, 300); 34 | } 35 | return (): void => { 36 | timeout = null; 37 | }; 38 | }, [visible]); 39 | 40 | useImperativeHandle(ref, () => ({ 41 | open: (): void => { 42 | setEnter(true); 43 | setVisible(true); 44 | setTimeout((): void => { 45 | setEnter(false); 46 | }, 300); 47 | }, 48 | })); 49 | 50 | const renderDom = visible ? ( 51 |
58 |
59 |
60 |
{ 63 | setLeave(true); 64 | setTimeout((): void => { 65 | setLeave(false); 66 | }, 300); 67 | setVisible(false); 68 | }} 69 | /> 70 | {children} 71 |
72 |
73 | ) : ( 74 | <> 75 | ); 76 | 77 | return typeof document !== "undefined" 78 | ? ReactDom.createPortal(renderDom, document.body) 79 | : renderDom; 80 | }); 81 | -------------------------------------------------------------------------------- /components/popup/styles.module.scss: -------------------------------------------------------------------------------- 1 | @import "../../pages/media.scss"; 2 | 3 | .popup { 4 | width: 100%; 5 | height: 100vh; 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | position: fixed; 10 | top: 0; 11 | left: 0; 12 | z-index: 10000; 13 | 14 | .mask { 15 | width: inherit; 16 | height: inherit; 17 | position: fixed; 18 | background-color: #000; 19 | opacity: 0.5; 20 | top: 0; 21 | left: 0; 22 | z-index: 10; 23 | } 24 | 25 | .popupContent { 26 | position: relative; 27 | border-radius: 0.25rem; 28 | display: flex; 29 | flex-direction: column; 30 | align-items: center; 31 | justify-content: center; 32 | background-color: var(--popup-content-background-color); 33 | z-index: 20; 34 | min-width: 25rem; 35 | min-height: 25rem; 36 | 37 | .closeBtn { 38 | width: 2.125rem; 39 | height: 2.125rem; 40 | background-color: inherit; 41 | background-image: var(--popup-close-icon); 42 | background-position: center; 43 | background-size: 1rem 1rem; 44 | background-repeat: no-repeat; 45 | position: absolute; 46 | top: 1.1875rem; 47 | right: 1.1875rem; 48 | cursor: pointer; 49 | z-index: 100; 50 | } 51 | 52 | .closeBtn:hover { 53 | background-color: var(--popup-close-hover-background-color); 54 | } 55 | } 56 | } 57 | 58 | .enter { 59 | .mask { 60 | animation: maskFadeIn 0.2s; 61 | } 62 | 63 | .popupContent { 64 | animation: fadeIn 0.2s; 65 | } 66 | } 67 | 68 | .leave { 69 | .mask { 70 | animation: maskFadeOut 0.2s; 71 | opacity: 0; 72 | } 73 | 74 | .popupContent { 75 | animation: fadeOut 0.2s; 76 | transform: scale(0); 77 | } 78 | } 79 | 80 | @keyframes fadeIn { 81 | 0% { 82 | transform: scale(0); 83 | opacity: 0; 84 | } 85 | 86 | 100% { 87 | transform: scale(1); 88 | opacity: 1; 89 | } 90 | } 91 | 92 | @keyframes fadeOut { 93 | 0% { 94 | transform: scale(1); 95 | opacity: 1; 96 | } 97 | 98 | 100% { 99 | transform: scale(0); 100 | opacity: 0; 101 | } 102 | } 103 | 104 | @keyframes maskFadeIn { 105 | 0% { 106 | opacity: 0; 107 | } 108 | 109 | 100% { 110 | opacity: 0.5; 111 | } 112 | } 113 | 114 | @keyframes maskFadeOut { 115 | 0% { 116 | opacity: 0.5; 117 | } 118 | 119 | 100% { 120 | opacity: 0; 121 | } 122 | } 123 | 124 | @include media-mobile { 125 | .popup { 126 | .popupContent { 127 | min-width: 18.75rem; 128 | min-height: 18.75rem; 129 | 130 | .closeBtn { 131 | width: 0.6875rem; 132 | height: 0.6875rem; 133 | top: 1.3125rem; 134 | right: 0.875rem; 135 | } 136 | } 137 | } 138 | } 139 | 140 | @include media-ipad { 141 | .popup { 142 | .popupContent { 143 | .titleArea { 144 | padding: 1.5rem 1.5625rem; 145 | } 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /constants/enum.ts: -------------------------------------------------------------------------------- 1 | export enum Themes { 2 | light = "light", 3 | dark = "dark", 4 | } 5 | 6 | export enum Environment { 7 | pc = "pc", 8 | ipad = "ipad", 9 | mobile = "mobile", 10 | none = "none", 11 | } 12 | 13 | export enum Language { 14 | ch = "ch", 15 | en = "en", 16 | } 17 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /next-i18next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | i18n: { 3 | defaultLocale: 'zh-CN', 4 | locales: ['en', 'zh-CN'], 5 | }, 6 | localePath: 'public/locales', 7 | defaultNS: [], 8 | debug: false, 9 | ns: ['header', 'main', 'footer'] 10 | } 11 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | const semi = require("@douyinfe/semi-next").default({}); 4 | module.exports = semi({ 5 | reactStrictMode: true, 6 | swcMinify: true, 7 | webpack: (config) => { 8 | config.resolve.alias = { 9 | ...config.resolve.alias, 10 | "@": path.resolve(__dirname), 11 | }; 12 | return config; 13 | }, 14 | images: { 15 | domains: ["127.0.0.1"], 16 | unoptimized: true 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iotsharp-home", 3 | "version": "3.0.", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "debugger": "cross-env NODE_OPTIONS='--inspect' next dev", 8 | "build": "next build && next export", 9 | "start": "next start", 10 | "lint": "next lint" 11 | }, 12 | "dependencies": { 13 | "@douyinfe/semi-next": "^2.17.1", 14 | "@douyinfe/semi-ui": "^2.17.1", 15 | "ahooks": "^3.7.4", 16 | "axios": "^0.27.2", 17 | "classnames": "^2.3.1", 18 | "lodash": "^4.17.21", 19 | "next": "13.1.1", 20 | "next-connect": "^0.13.0", 21 | "react": "^18.2.0", 22 | "react-dom": "^18.2.0", 23 | "react-i18next": "^12.1.1", 24 | "showdown": "^2.1.0" 25 | }, 26 | "devDependencies": { 27 | "@commitlint/cli": "^17.0.3", 28 | "@commitlint/config-conventional": "^17.0.3", 29 | "@types/lodash": "^4.14.182", 30 | "@types/node": "18.6.1", 31 | "@types/react": "18.0.15", 32 | "@types/react-dom": "18.0.6", 33 | "cross-env": "^7.0.3", 34 | "eslint": "8.20.0", 35 | "eslint-config-next": "12.2.3", 36 | "husky": "^8.0.1", 37 | "sass": "^1.54.0", 38 | "typescript": "4.7.4", 39 | "typescript-plugin-css-modules": "^3.4.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type {AppContext, AppProps} from 'next/app'; 2 | import App from 'next/app'; 3 | import React from 'react'; 4 | import type {ILayoutProps} from '@/components/layout'; 5 | import Layout from '@/components/layout'; 6 | import Head from 'next/head'; 7 | import {getIsMobile, getIsSupportWebp} from '@/utils'; 8 | import {ThemeContextProvider} from '@/stores/theme'; 9 | import {UserAgentProvider} from '@/stores/userAgent'; 10 | import {LanguageContextProvider} from '@/stores/language'; 11 | import './global.scss'; 12 | 13 | export interface IComponentProps { 14 | isMobile?: boolean; 15 | isSupportWebp?: boolean; 16 | } 17 | 18 | const MyApp = (data: AppProps & ILayoutProps & IComponentProps): JSX.Element => { 19 | const {Component, pageProps, navbarData, footerData, isMobile, isSupportWebp} = data; 20 | return ( 21 |
22 | 23 | IoTSharp官网 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
39 | ); 40 | }; 41 | 42 | MyApp.getInitialProps = async (context: AppContext) => { 43 | const pageProps = await App.getInitialProps(context); 44 | 45 | return { 46 | ...pageProps, 47 | isMobile: getIsMobile(context), 48 | isSupportWebp: getIsSupportWebp(context), 49 | }; 50 | }; 51 | 52 | export default MyApp; 53 | -------------------------------------------------------------------------------- /pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import {Head, Html, Main, NextScript} from 'next/document'; 2 | import Script from 'next/script'; 3 | import React from 'react'; 4 | 5 | export default function Document() { 6 | return ( 7 | 8 | 9 | 10 |
11 | 12 | 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /pages/api/layout.ts: -------------------------------------------------------------------------------- 1 | import type {NextApiRequest, NextApiResponse} from 'next'; 2 | import {ILayoutProps} from '../../components/layout'; 3 | import {isEmpty} from 'lodash'; 4 | 5 | const getLayoutData = (req: NextApiRequest, res: NextApiResponse): void => { 6 | const data = { 7 | "title": "IoTSharp", 8 | "qr_code": "", 9 | "copy_right": "Copyright © 2022 The IoTSharp Authors", 10 | "site_number": "", 11 | "public_number": "冀ICP备18039206号", 12 | "qr_code_image": { 13 | "data": { 14 | "name": "code.png", 15 | "alternativeText": "code.png", 16 | "caption": "code.png", 17 | "width": 56, 18 | "height": 56, 19 | "formats": {}, 20 | "hash": "code_67191e1aba", 21 | "ext": ".png", 22 | "mime": "image/png", 23 | "size": 1.45, 24 | "url": "/uploads/code_67191e1aba.png", 25 | "previewUrl": {}, 26 | "provider": "local", 27 | "provider_metadata": {} 28 | } 29 | }, 30 | "link_lists": { 31 | "data": [ 32 | { 33 | "title": "关于", 34 | "links": { 35 | "data": [ 36 | { 37 | "label": "Demo", 38 | "link": "http://demo.iotsharp.net/" 39 | }, 40 | { 41 | "label": "Docs", 42 | "link": "https://docs.iotsharp.net/", 43 | }, 44 | ] 45 | } 46 | }, 47 | { 48 | "title": "了解更多", 49 | "links": { 50 | "data": [ 51 | { 52 | "label": "Github", 53 | "link": "https://github.com/IoTSharp" 54 | }, 55 | { 56 | "label": "Gitee", 57 | "link": "https://gitee.com/IoTSharp" 58 | }, 59 | ] 60 | } 61 | }, 62 | { 63 | "title": "联系我", 64 | "links": { 65 | "data": [ 66 | { 67 | "label": "微信", 68 | "link": {} 69 | }, 70 | { 71 | "label": "QQ", 72 | "link": {} 73 | } 74 | ] 75 | } 76 | } 77 | ] 78 | } 79 | } 80 | const {copy_right, link_lists, public_number, qr_code, qr_code_image, site_number, title} = data || {}; 81 | 82 | res.status(200).json({ 83 | navbarData: {}, 84 | footerData: { 85 | title, 86 | linkList: link_lists?.data?.map((item: any) => ({ 87 | title: item.title, 88 | list: item?.links?.data?.map((_item: any) => ({ 89 | label: _item.label, 90 | link: isEmpty(_item.link) ? '' : _item.link, 91 | })), 92 | })), 93 | qrCode: { 94 | image: `${qr_code_image.data.url}`, 95 | text: qr_code, 96 | }, 97 | copyRight: copy_right, 98 | siteNumber: site_number, 99 | publicNumber: public_number, 100 | }, 101 | }); 102 | }; 103 | 104 | export default getLayoutData; 105 | -------------------------------------------------------------------------------- /pages/components/banner/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC, useContext, useEffect, useRef} from "react"; 2 | import styles from "./styles.module.scss"; 3 | import {Col, Row} from '@douyinfe/semi-ui'; 4 | import cName from "classnames"; 5 | import {ThemeContext} from "@/stores/theme"; 6 | 7 | export interface IBannerProps { 8 | } 9 | 10 | const Banner: FC = ({}) => { 11 | const mainRef = useRef(null); 12 | const {theme} = useContext(ThemeContext); 13 | useEffect(() => { 14 | mainRef.current?.classList.remove(styles.withAnimation); 15 | window.requestAnimationFrame(() => { 16 | mainRef.current?.classList.add(styles.withAnimation); 17 | }); 18 | }, [theme]); 19 | return ( 20 |
21 | 22 | 23 |
24 |
连接物理设备与数字世界
25 |
IoTSharp 是一个开源的物联网基础平台,通过属性、遥测、RPC、规则链按照数字孪生概念将可见与不可见的物理设备投射到了数字世界,透过资产、产品的概念贴合应用和生产,协议支持 HTTP、MQTT 、CoAp 以及常见物联网协议的转换,支持常用关系型和时序数据库。在生态和周边,我们支持了国产时序数据库TDengine、确保了能在龙芯Linux运行、对接了国产实时操作系统RT-Thread以及常用标准协议。
26 |
{ 27 | window.open( 28 | "https://docs.iotsharp.net/", 29 | "blank", 30 | "noopener=yes,noreferrer=yes" 31 | ); 32 | }}>快速上手 33 |
34 |
35 | 36 | 37 |
38 |
39 |
40 |
41 | 42 | 43 |
44 | ); 45 | }; 46 | 47 | export default Banner; 48 | -------------------------------------------------------------------------------- /pages/components/banner/styles.module.scss: -------------------------------------------------------------------------------- 1 | @mixin initStatus { 2 | transform: translate3d(0, 2.5rem, 0); 3 | opacity: 0; 4 | } 5 | 6 | @mixin finalStatus { 7 | -webkit-transform: none; 8 | transform: none; 9 | opacity: 1; 10 | } 11 | 12 | @keyframes fadeInScale { 13 | 0% { 14 | opacity: 0; 15 | transform: scale(.8); 16 | } 17 | 18 | 14% { 19 | opacity: 1; 20 | transform: scale(1); 21 | } 22 | 23 | 100% { 24 | opacity: 1; 25 | transform: scale(1); 26 | } 27 | } 28 | 29 | @keyframes fadeInDown1 { 30 | 0% { 31 | @include initStatus; 32 | } 33 | 34 | 28% { 35 | @include initStatus; 36 | } 37 | 38 | 100% { 39 | @include finalStatus; 40 | } 41 | } 42 | 43 | @keyframes fadeInDown2 { 44 | 0% { 45 | @include initStatus; 46 | } 47 | 48 | 42% { 49 | @include initStatus; 50 | } 51 | 52 | 100% { 53 | @include finalStatus; 54 | } 55 | } 56 | 57 | @keyframes fadeInDown3 { 58 | 0% { 59 | @include initStatus; 60 | } 61 | 62 | 56% { 63 | @include initStatus; 64 | } 65 | 66 | 100% { 67 | @include finalStatus; 68 | } 69 | } 70 | 71 | @keyframes fadeInDown4 { 72 | 0% { 73 | @include initStatus; 74 | } 75 | 76 | 70% { 77 | @include initStatus; 78 | } 79 | 80 | 100% { 81 | @include finalStatus; 82 | } 83 | } 84 | 85 | @keyframes fadeInDown5 { 86 | 0% { 87 | @include initStatus; 88 | } 89 | 90 | 84% { 91 | @include initStatus; 92 | } 93 | 94 | 100% { 95 | @include finalStatus; 96 | } 97 | } 98 | 99 | .withAnimation { 100 | .subTitle { 101 | animation: fadeInDown1 1.3s; 102 | } 103 | 104 | .title { 105 | animation: fadeInDown2 1.3s; 106 | } 107 | 108 | .label { 109 | animation: fadeInDown3 1.3s; 110 | } 111 | 112 | .description { 113 | animation: fadeInDown4 1.3s; 114 | } 115 | 116 | .button { 117 | animation: fadeInDown5 1.3s; 118 | } 119 | 120 | .icon { 121 | animation: fadeInScale 1.5s; 122 | } 123 | } 124 | 125 | .banner { 126 | width: 100%; 127 | padding: 10rem 8rem; 128 | overflow: hidden; 129 | border-bottom: 1px solid var(--semi-color-border); 130 | 131 | :global { 132 | .semi-row-flex { 133 | height: 100%; 134 | } 135 | } 136 | 137 | .icon { 138 | width: 920px; 139 | position: relative; 140 | border-radius: 8px; 141 | height: 32.5rem !important; 142 | border-bottom: 1px solid var(--semi-color-border); 143 | background-image: var(--banner-icon); 144 | background-size: 100% 100%; 145 | } 146 | 147 | .container { 148 | display: flex; 149 | flex-direction: column; 150 | 151 | .title { 152 | font-weight: 700; 153 | font-size: 2.8rem; 154 | line-height: 4rem; 155 | } 156 | 157 | .label { 158 | font-size: 1.8rem; 159 | line-height: 2rem; 160 | } 161 | 162 | .description { 163 | font-size: 1.25rem; 164 | line-height: 2rem; 165 | margin-top: 1.6rem; 166 | } 167 | 168 | .button { 169 | border-radius: 1.563rem; 170 | font-size: 1rem; 171 | font-weight: 500; 172 | margin-bottom: 2rem; 173 | display: inline-block; 174 | max-width: 12.5rem; 175 | padding: .75rem .625rem; 176 | line-height: 1.375rem; 177 | text-align: center; 178 | text-decoration: none; 179 | cursor: pointer; 180 | border: 2px solid var(--yellow-color); 181 | background-color: var(--yellow-color); 182 | margin-top: 4rem; 183 | } 184 | } 185 | 186 | .bannerImage { 187 | position: relative; 188 | width: 100%; 189 | padding-top: 20px; 190 | padding-left: 50px; 191 | } 192 | 193 | .background { 194 | position: absolute; 195 | width: 640px; 196 | height: 640px; 197 | left: -50px; 198 | top: -20px; 199 | -webkit-filter: blur(120px); 200 | filter: blur(120px); 201 | opacity: .6; 202 | 203 | &:before { 204 | content: ""; 205 | position: absolute; 206 | width: 474px; 207 | height: 474px; 208 | border-radius: 50%; 209 | top: 132px; 210 | background-color: rgb(var(--semi-purple-5)); 211 | } 212 | 213 | &:after { 214 | content: ""; 215 | position: absolute; 216 | width: 474px; 217 | height: 474px; 218 | border-radius: 50%; 219 | left: 166px; 220 | background-color: rgb(var(--semi-indigo-5)); 221 | } 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /pages/components/contributors/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC} from "react"; 2 | import {Avatar, Card, Col, Descriptions, Row, Space} from '@douyinfe/semi-ui'; 3 | import styles from "./styles.module.scss"; 4 | 5 | export interface IContributorsProps { 6 | } 7 | 8 | const Contributors: FC = ({}) => { 9 | const {Meta} = Card; 10 | const Comments = [{ 11 | avatar: 'https://avatars.githubusercontent.com/u/29589505?v=4', 12 | name: 'IoTGateway 王海东', 13 | content: 'IoTSharp作为dotNet开源物联网平台的独苗,架构设计先进、可扩展性强、协议宽松。是你学习、评估、落地的最佳选择。', 14 | style: { marginTop: '40px'}, 15 | }, { 16 | avatar: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/card-meta-avatar-docs-demo.jpg', 17 | name: 'ThingsBoard中文网 王磊', 18 | content: 'IoTSharp一个开箱即用的开源物联网平台助力企业快速完成IoT数据采集,预警处理及数据可视化,保证项目质量提高项目交付率。' 19 | }] 20 | return ( 21 |
22 |

与用户共同成长

23 |

IoTSharp 重视我们的用户,加入并助力我们不断完善

24 | 25 | 1800++ 26 | 600+ 27 | 3400+ 28 | 15+ 29 | 30 |
31 | 32 | { 33 | Comments?.map((comment, index) => { 34 | return ( 35 | 36 | 47 | } 48 | /> 49 | } 50 | footerStyle={{display: 'flex', justifyContent: 'flex-end'}} 51 | footer={ 52 | 53 |
{comment?.name}
54 |
55 | } 56 | > 57 | {comment?.content} 58 |
59 | 60 | ) 61 | }) 62 | } 63 |
64 |
65 |
66 | ); 67 | }; 68 | 69 | export default Contributors; 70 | -------------------------------------------------------------------------------- /pages/components/contributors/styles.module.scss: -------------------------------------------------------------------------------- 1 | .contributorsContainer { 2 | display: flex; 3 | justify-content: space-between; 4 | align-items: center; 5 | flex-direction: column; 6 | width: 100%; 7 | padding: 10rem 8rem; 8 | .imageBox { 9 | width: 100%; 10 | margin-top: 3rem; 11 | } 12 | 13 | .title { 14 | font-size: 2rem; 15 | font-weight: 600; 16 | margin-top: 0; 17 | text-align: center; 18 | vertical-align: middle; 19 | } 20 | .subTitle { 21 | font-size: 1.125rem; 22 | text-align: left; 23 | vertical-align: top; 24 | font-weight: 400; 25 | margin-bottom: 3rem; 26 | margin-top: 0; 27 | } 28 | 29 | img { 30 | width: 100%; 31 | height: 25rem; 32 | border-radius: 8px; 33 | } 34 | :global { 35 | .semi-descriptions { 36 | display: flex; 37 | width: 100%; 38 | align-items: center; 39 | padding: 0 -20px; 40 | } 41 | .semi-row { 42 | margin-top: 3rem; 43 | } 44 | .semi-descriptions table { 45 | width: 100%; 46 | } 47 | .semi-descriptions-double tbody { 48 | width: 100%; 49 | justify-content: space-between; 50 | } 51 | .semi-descriptions-value { 52 | color: rgb(var(--semi-purple-5)); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /pages/components/features/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC} from "react"; 2 | import {Col, Row} from '@douyinfe/semi-ui'; 3 | import Image from "next/image"; 4 | import styles from "./styles.module.scss"; 5 | import PlatformIcon from "@/public/platform.svg"; 6 | import SafetyIcon from "@/public/safety.svg"; 7 | import InformationIcon from "@/public/information.svg"; 8 | 9 | export interface IFeaturesProps { 10 | } 11 | 12 | const Features: FC = ({}) => { 13 | const Options = [{ 14 | icon: SafetyIcon, 15 | title: '安全' 16 | }, { 17 | icon: PlatformIcon, 18 | title: '跨平台' 19 | }, { 20 | icon: InformationIcon, 21 | title: '多样' 22 | }] 23 | return ( 24 |
25 |
26 | 27 | { 28 | Options?.map((option, index) => { 29 | return ( 30 | 31 |
32 | 33 |
{option?.title}
34 |
35 | 36 | ) 37 | }) 38 | } 39 |
40 |
41 |
42 | ); 43 | }; 44 | 45 | export default Features; -------------------------------------------------------------------------------- /pages/components/features/styles.module.scss: -------------------------------------------------------------------------------- 1 | .featuresContainer { 2 | width: 100%; 3 | background: #1f1f1f; 4 | padding: 2rem 8rem; 5 | 6 | .titleContainer { 7 | display: flex; 8 | flex-direction: column; 9 | align-items: center; 10 | margin-bottom: 3rem; 11 | 12 | h2 { 13 | font-size: 2rem; 14 | letter-spacing: .0125rem; 15 | line-height: 1rem; 16 | color: #ffffff; 17 | } 18 | 19 | .line { 20 | background: #ffffff; 21 | height: 0.0625rem; 22 | margin: 0.2rem 0; 23 | width: 25rem; 24 | } 25 | 26 | h3 { 27 | color: var(--secondary-font-color-1); 28 | font-size: 1.5rem; 29 | font-weight: 400; 30 | line-height: .5rem; 31 | } 32 | } 33 | 34 | .list { 35 | margin-top: 3rem; 36 | 37 | .item { 38 | display: flex; 39 | align-items: center; 40 | flex-direction: column; 41 | margin-bottom: 3rem; 42 | 43 | .title { 44 | margin-top: 1rem; 45 | font-weight: 700; 46 | font-size: 1.25rem; 47 | line-height: 2rem; 48 | color: #fff; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /pages/components/platform/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC, useContext} from "react"; 2 | import Image from "next/image"; 3 | import {Carousel} from '@douyinfe/semi-ui'; 4 | import TenantImage from '@/public/img_9.png'; 5 | import RuleImage from '@/public/img_6.png'; 6 | import ResourceImage from '@/public/img_8.png'; 7 | import DeviceImage from '@/public/img_5.png'; 8 | import ProductImage from '@/public/img_7.png'; 9 | import styles from "./styles.module.scss"; 10 | import {ThemeContext} from "@/stores/theme"; 11 | 12 | export interface IPlatformProps { 13 | } 14 | 15 | const Platform: FC = ({}) => { 16 | const {theme} = useContext(ThemeContext); 17 | const Options = [{ 18 | image: TenantImage, 19 | background: 'rgb(230, 232, 234)', 20 | title: '多租户', 21 | description: '通过多租户,充分的利用系统资源为多个客户提供服务并确保数据彻底隔离。' 22 | }, { 23 | image: DeviceImage, 24 | background: 'rgb(239, 202, 240)', 25 | title: '数字孪生', 26 | description: '通过数字孪生使得设备的属性数据、遥测数据、数据清洗、告警更容易管理和使用' 27 | }, { 28 | image: RuleImage, 29 | background: 'rgb(226, 209, 244)', 30 | title: '规则链引擎', 31 | description: '通过规则链引擎利用多种语言脚本来扩展你对数据的分析和处理。' 32 | }, { 33 | image: ResourceImage, 34 | background: 'rgb(209, 216, 240)', 35 | title: '资产管理', 36 | description: '使用多个设备及其属性和遥测可抽象为资产更利于管理设备和数据分析。' 37 | }, 38 | { 39 | image: ProductImage, 40 | title: '产品管理', 41 | background: 'rgb(203, 231, 254)', 42 | description: '为设备或者网关提供简洁有效的数据模板、字典、认证、素材组织能力。' 43 | }] 44 | const style = { 45 | width: '100%', 46 | height: '916px', 47 | }; 48 | return ( 49 |
50 |

打造现代 Web 应用

51 |

与现代操作系统、浏览器更贴近的设计语言

52 | 53 | { 54 | Options.map((option, index) => { 55 | return ( 56 |
57 |
58 | 63 |
64 |
65 |
{option.title}
66 |
{option.description}
67 |
68 |
69 | ); 70 | }) 71 | } 72 |
73 |
74 | ); 75 | }; 76 | 77 | export default Platform; 78 | -------------------------------------------------------------------------------- /pages/components/platform/styles.module.scss: -------------------------------------------------------------------------------- 1 | .platformContainer { 2 | display: flex; 3 | justify-content: space-between; 4 | align-items: center; 5 | flex-direction: column; 6 | width: 100%; 7 | padding: 10rem 8rem 0; 8 | :global { 9 | .semi-carousel-arrow-next { 10 | width: 50px; 11 | height: 50px; 12 | background-color: var(--primary-color); 13 | color: var(--primary-background-color); 14 | display: flex; 15 | align-items: center; 16 | justify-content: center; 17 | border-radius: 50%; 18 | } 19 | .semi-carousel-arrow-prev { 20 | width: 50px; 21 | height: 50px; 22 | background-color: var(--primary-color); 23 | color: var(--primary-background-color); 24 | display: flex; 25 | align-items: center; 26 | justify-content: center; 27 | border-radius: 50%; 28 | } 29 | } 30 | .imgWrapper { 31 | height: 50rem; 32 | width: 90%; 33 | margin: 0 auto; 34 | border-radius: 1.5rem; 35 | position: relative; 36 | background-color: rgba(var(--semi-grey-1)); 37 | img { 38 | width: 94%!important; 39 | left: 0; 40 | right:0; 41 | margin: 2.5rem auto 0; 42 | border-radius: .75rem; 43 | } 44 | } 45 | .imgInfo { 46 | width: 90%; 47 | display: flex; 48 | align-items: center; 49 | justify-content: center; 50 | margin: 5rem auto 0; 51 | .logo { 52 | margin-right: 4rem; 53 | font-size: 1.8rem; 54 | font-weight: 500; 55 | } 56 | .imgInfoText { 57 | font-weight: 400; 58 | font-size: 1.2rem; 59 | line-height: 2rem; 60 | } 61 | } 62 | .title { 63 | font-size: 2rem; 64 | font-weight: 600; 65 | margin-top: 0; 66 | text-align: center; 67 | vertical-align: middle; 68 | } 69 | 70 | .subTitle { 71 | font-size: 1.125rem; 72 | text-align: left; 73 | vertical-align: top; 74 | font-weight: 400; 75 | margin-bottom: 3rem; 76 | margin-top: 0; 77 | } 78 | 79 | .row { 80 | img { 81 | width: 100%; 82 | height: 20rem; 83 | box-shadow: 0 1px 6px 0 var(--box-shadow); 84 | margin-top: 4rem; 85 | transition: .5s; 86 | cursor: pointer; 87 | 88 | &:hover { 89 | transform: scale(1.15); 90 | transition: .5s; 91 | } 92 | } 93 | 94 | .content { 95 | margin-top: 4rem; 96 | 97 | .title { 98 | font-size: 1.5rem; 99 | font-weight: 700; 100 | line-height: 2.125rem; 101 | } 102 | 103 | .line { 104 | height: 5px; 105 | width: 20rem; 106 | border-radius: 2px; 107 | background-color: var(--yellow-color); 108 | margin: 1.25rem 0; 109 | } 110 | 111 | p { 112 | font-size: 1.25rem; 113 | letter-spacing: 0; 114 | line-height: 2rem; 115 | } 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /pages/components/technology/index.tsx: -------------------------------------------------------------------------------- 1 | import {FC} from "react"; 2 | import {Col, Row} from '@douyinfe/semi-ui'; 3 | import cNames from 'classnames'; 4 | import styles from "./styles.module.scss"; 5 | 6 | export interface ITechnologyProps { 7 | } 8 | 9 | const Technology: FC = ({}) => { 10 | const Options = [{ 11 | title: '预测未来', 12 | description: '利用ML.Net使用遥测数据训练时间序列预测模型让你对态势快人一步。', 13 | classGroup: [styles.item, styles.item3] 14 | }, { 15 | title: '规则链引擎', 16 | description: '通过脚本处理数据并结合动态表达式处理节点与节点之间的走向以实现数据清洗、告警。', 17 | classGroup: [styles.item, styles.item2] 18 | }, { 19 | title: '自主可控', 20 | description: '针对国产CPU龙芯进行了完整的适配。为国产时序数据库TDengine做了最有力的生态支持。', 21 | classGroup: [styles.item, styles.item1] 22 | }] 23 | return ( 24 |
25 |
26 |

技术方向

27 |
28 |
29 | 30 | { 31 | Options?.map((option, index) => { 32 | return ( 33 | 34 |
35 |
{option?.title}
36 |
37 | {option?.description} 38 |
39 |
40 | 41 | ) 42 | }) 43 | } 44 |
45 |
46 | ); 47 | }; 48 | 49 | export default Technology; -------------------------------------------------------------------------------- /pages/components/technology/styles.module.scss: -------------------------------------------------------------------------------- 1 | .technologyContainer { 2 | width: 100%; 3 | padding: 4rem 8rem 2rem; 4 | 5 | .titleContainer { 6 | display: flex; 7 | flex-direction: column; 8 | margin-bottom: 3rem; 9 | 10 | h2 { 11 | font-size: 2rem; 12 | letter-spacing: .0125rem; 13 | line-height: 1rem; 14 | } 15 | 16 | .line { 17 | height: 5px; 18 | width: 20rem; 19 | border-radius: 2px; 20 | background-color: var(--yellow-color); 21 | margin: 1.25rem 0; 22 | } 23 | 24 | h3 { 25 | color: var(--secondary-font-color-1); 26 | font-size: 1.5rem; 27 | font-weight: 400; 28 | line-height: .5rem; 29 | } 30 | } 31 | 32 | .item { 33 | height: 31.25rem; 34 | color: #fdfeff; 35 | border-radius: .75rem; 36 | position: relative; 37 | display: flex; 38 | justify-content: flex-end; 39 | flex-direction: column; 40 | box-shadow: 0 2px .1rem 0 var(--box-shadow); 41 | padding: 2rem 1.25rem; 42 | transition: margin-top .5s; 43 | margin-bottom: 4rem; 44 | 45 | &:hover { 46 | margin-top: -1rem; 47 | transition: margin-top .5s; 48 | } 49 | 50 | .title { 51 | margin-bottom: 1rem; 52 | font-weight: 700; 53 | font-size: 1.5rem; 54 | line-height: 2.25rem; 55 | } 56 | 57 | .description { 58 | font-size: 1rem; 59 | font-weight: 400; 60 | line-height: 1.875rem; 61 | letter-spacing: .15px; 62 | } 63 | } 64 | 65 | .item1 { 66 | background-image: url("/img_1.png"); 67 | background-repeat: no-repeat; 68 | background-size: 100% 100%; 69 | } 70 | 71 | .item2 { 72 | background-image: url("/img_2.png"); 73 | background-repeat: no-repeat; 74 | background-size: 100% 100%; 75 | } 76 | 77 | .item3 { 78 | background-image: url("/img_3.png"); 79 | background-repeat: no-repeat; 80 | background-size: 100% 100%; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /pages/global.scss: -------------------------------------------------------------------------------- 1 | @import "~@douyinfe/semi-ui/dist/css/semi.min.css"; 2 | 3 | html[data-theme="dark"] { 4 | --primary-color: #ffffff; 5 | --yellow-color: #ffd100; 6 | --primary-background-color: rgba(14, 14, 14, 1); 7 | --footer-background-color: rgba(36, 36, 36, 1); 8 | --navbar-background-color: rgba(0, 0, 0, 0.5); 9 | --secondary-color: rgba(255, 255, 255, 0.5); 10 | --link-color: #34a8eb; 11 | --semi-page-active-color: rgb(84, 169, 255); 12 | --semi-page-active-background-color: rgba(84, 169, 255, 0.2); 13 | --semi-page-hover-background-color: rgb(23, 23, 23); 14 | --navbar-icon: url("../public/logo-text.svg"); 15 | --theme-icon: url("../public/theme_dark.png"); 16 | --popup-close-icon: url("../public/close.png"); 17 | --popup-close-hover-background-color: #353535; 18 | --secondary-font-color-1: #9e9e9f; 19 | --popup-content-background-color: #1f1f1f; 20 | --box-shadow: rgba(255, 255, 255, 0.8); 21 | --banner-icon: url("../public/banner_dark.png"); 22 | --home-background-icon: url("../public/home_bg_dark.png"); 23 | --home-background-icon-webp: url("../public/home_bg_dark.webp"); 24 | } 25 | 26 | html[data-theme="light"] { 27 | --primary-color: #333333; 28 | --yellow-color: #ffd100; 29 | --box-shadow: rgba(0, 0, 0, 0.2); 30 | --primary-background-color: rgba(255, 255, 255, 1); 31 | --footer-background-color: rgba(36, 36, 36, 1); 32 | --navbar-background-color: rgba(255, 255, 255, 0.5); 33 | --secondary-color: #666666; 34 | --link-color: #0070f3; 35 | --semi-page-active-color: #333333; 36 | --semi-page-active-background-color: rgb(234, 245, 255); 37 | --semi-page-hover-background-color: rgb(244, 245, 245); 38 | --navbar-icon: url("../public/logo-text-dark.svg"); 39 | --theme-icon: url("../public/theme_light.png"); 40 | --banner-icon: url("../public/banner_light.png"); 41 | --popup-close-icon: url("../public/close_light.png"); 42 | --popup-close-hover-background-color: #f5f5f5; 43 | --secondary-font-color-1: #333333; 44 | --popup-content-background-color: #f4f5f5; 45 | --home-background-icon: url("../public/home_bg_light.png"); 46 | --home-background-icon-webp: url("../public/home_bg_light.webp"); 47 | } 48 | 49 | html, 50 | body { 51 | font-size: 16px; 52 | padding: 0; 53 | margin: 0; 54 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 55 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 56 | color: var(--primary-color); 57 | overflow: hidden; 58 | } 59 | 60 | a { 61 | color: inherit; 62 | text-decoration: none; 63 | } 64 | 65 | * { 66 | box-sizing: border-box; 67 | } 68 | 69 | .forbidScroll { 70 | height: 100vh; 71 | overflow: hidden; 72 | } 73 | 74 | #__next { 75 | height: 100vh; 76 | overflow: auto; 77 | } 78 | -------------------------------------------------------------------------------- /pages/index.module.scss: -------------------------------------------------------------------------------- 1 | @import "./media.scss"; 2 | 3 | @mixin initStatus { 4 | transform: translate3d(0, 2.5rem, 0); 5 | opacity: 0; 6 | } 7 | 8 | @mixin finalStatus { 9 | -webkit-transform: none; 10 | transform: none; 11 | opacity: 1; 12 | } 13 | 14 | .container { 15 | color: var(--primary-color); 16 | 17 | .main { 18 | overflow: scroll; 19 | flex: 1; 20 | margin-top: -4rem; 21 | display: flex; 22 | flex-direction: column; 23 | justify-content: center; 24 | align-items: center; 25 | 26 | .top { 27 | display: flex; 28 | } 29 | 30 | .title a { 31 | color: var(--link-color); 32 | text-decoration: none; 33 | } 34 | 35 | .title a:hover, 36 | .title a:focus, 37 | .title a:active { 38 | text-decoration: underline; 39 | } 40 | 41 | .title { 42 | margin: 0; 43 | line-height: 1.15; 44 | font-size: 4rem; 45 | } 46 | 47 | .title, 48 | .description { 49 | text-align: center; 50 | } 51 | 52 | .description { 53 | margin: 4rem 0; 54 | line-height: 1.5; 55 | font-size: 1.5rem; 56 | } 57 | 58 | .grid { 59 | display: flex; 60 | align-items: flex-start; 61 | justify-content: flex-start; 62 | flex-wrap: wrap; 63 | max-width: 62.5rem; 64 | transition: 2s; 65 | min-height: 36.25rem; 66 | 67 | .card { 68 | margin: 1rem; 69 | padding: 1.5rem; 70 | text-align: left; 71 | color: inherit; 72 | text-decoration: none; 73 | border: 0.0625rem solid var(--footer-background-color); 74 | border-radius: 0.625rem; 75 | transition: color 0.15s ease, border-color 0.15s ease; 76 | max-width: 18.75rem; 77 | cursor: pointer; 78 | width: 18.75rem; 79 | height: 13.875rem; 80 | } 81 | 82 | .card:hover, 83 | .card:focus, 84 | .card:active { 85 | color: var(--link-color); 86 | border-color: var(--link-color); 87 | } 88 | 89 | .card h2 { 90 | margin: 0 0 1rem 0; 91 | font-size: 1.5rem; 92 | } 93 | 94 | .card p { 95 | margin: 0; 96 | font-size: 1.25rem; 97 | line-height: 1.5; 98 | } 99 | } 100 | 101 | .paginationArea { 102 | width: 62.5rem; 103 | display: flex; 104 | justify-content: flex-end; 105 | padding: 20px 0; 106 | 107 | :global { 108 | .semi-page-item { 109 | color: var(--primary-color); 110 | opacity: 0.7; 111 | } 112 | 113 | .semi-page-item:hover { 114 | background-color: var(--semi-page-hover-background-color); 115 | } 116 | 117 | .semi-page-item-active { 118 | color: var(--semi-page-active-color); 119 | background-color: var(--semi-page-active-background-color); 120 | } 121 | 122 | .semi-page-item-active:hover { 123 | color: var(--semi-page-active-color); 124 | background-color: var(--semi-page-active-background-color); 125 | } 126 | } 127 | } 128 | } 129 | 130 | .withAnimation { 131 | .title { 132 | animation: fadeInDown1 1s; 133 | } 134 | 135 | .description { 136 | animation: fadeInDown2 1s; 137 | } 138 | 139 | .card:nth-of-type(1) { 140 | animation: fadeInDown3 1s; 141 | } 142 | 143 | .card:nth-of-type(2) { 144 | animation: fadeInDown4 1s; 145 | } 146 | 147 | .card:nth-of-type(3) { 148 | animation: fadeInDown5 1s; 149 | } 150 | 151 | .card:nth-of-type(4) { 152 | animation: fadeInDown6 1s; 153 | } 154 | 155 | .card:nth-of-type(5) { 156 | animation: fadeInDown7 1s; 157 | } 158 | 159 | .card:nth-of-type(6) { 160 | animation: fadeInDown8 1s; 161 | } 162 | } 163 | 164 | @keyframes fadeInDown1 { 165 | 0% { 166 | @include initStatus; 167 | } 168 | 169 | 11% { 170 | @include initStatus; 171 | } 172 | 173 | 100% { 174 | @include finalStatus; 175 | } 176 | } 177 | 178 | @keyframes fadeInDown2 { 179 | 0% { 180 | @include initStatus; 181 | } 182 | 183 | 22% { 184 | @include initStatus; 185 | } 186 | 187 | 100% { 188 | @include finalStatus; 189 | } 190 | } 191 | 192 | @keyframes fadeInDown3 { 193 | 0% { 194 | @include initStatus; 195 | } 196 | 197 | 33% { 198 | @include initStatus; 199 | } 200 | 201 | 100% { 202 | @include finalStatus; 203 | } 204 | } 205 | 206 | @keyframes fadeInDown4 { 207 | 0% { 208 | @include initStatus; 209 | } 210 | 211 | 44% { 212 | @include initStatus; 213 | } 214 | 215 | 100% { 216 | @include finalStatus; 217 | } 218 | } 219 | 220 | @keyframes fadeInDown5 { 221 | 0% { 222 | @include initStatus; 223 | } 224 | 225 | 55% { 226 | @include initStatus; 227 | } 228 | 229 | 100% { 230 | @include finalStatus; 231 | } 232 | } 233 | 234 | @keyframes fadeInDown6 { 235 | 0% { 236 | @include initStatus; 237 | } 238 | 239 | 66% { 240 | @include initStatus; 241 | } 242 | 243 | 100% { 244 | @include finalStatus; 245 | } 246 | } 247 | 248 | @keyframes fadeInDown7 { 249 | 0% { 250 | @include initStatus; 251 | } 252 | 253 | 77% { 254 | @include initStatus; 255 | } 256 | 257 | 100% { 258 | @include finalStatus; 259 | } 260 | } 261 | 262 | @keyframes fadeInDown8 { 263 | 0% { 264 | @include initStatus; 265 | } 266 | 267 | 88% { 268 | @include initStatus; 269 | } 270 | 271 | 100% { 272 | @include finalStatus; 273 | } 274 | } 275 | } 276 | 277 | @include media-ipad { 278 | .container { 279 | .main { 280 | .grid { 281 | width: 95%; 282 | margin: auto; 283 | justify-content: center; 284 | } 285 | } 286 | } 287 | } 288 | 289 | @include media-mobile { 290 | .container { 291 | .main { 292 | .title { 293 | font-size: 1.75rem; 294 | line-height: 2.4375rem; 295 | } 296 | 297 | .description { 298 | font-size: 0.875rem; 299 | line-height: 1.5rem; 300 | margin: 2rem 0; 301 | } 302 | 303 | .grid { 304 | width: 95%; 305 | margin: auto; 306 | justify-content: center; 307 | 308 | .card { 309 | height: 10rem; 310 | 311 | h2 { 312 | font-size: 1.125rem; 313 | line-height: 1.5625rem; 314 | } 315 | 316 | p { 317 | font-size: 0.75rem; 318 | line-height: 1.625rem; 319 | } 320 | } 321 | } 322 | } 323 | } 324 | } 325 | -------------------------------------------------------------------------------- /pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {useContext, useEffect, useRef} from 'react'; 2 | import type {NextPage} from 'next'; 3 | import dynamic from 'next/dynamic'; 4 | import styles from './index.module.scss'; 5 | import Banner from "@/pages/components/banner"; 6 | import Technology from "@/pages/components/technology"; 7 | import Features from "@/pages/components/features"; 8 | 9 | import Contributors from "@/pages/components/contributors"; 10 | import cName from 'classnames'; 11 | import {ThemeContext} from '@/stores/theme'; 12 | import {IComponentProps} from './_app'; 13 | import NavBar from "@/components/navbar"; 14 | import Footer from "@/components/footer"; 15 | const Platform = dynamic(() => import("@/pages/components/platform"), { ssr: false }); 16 | interface IProps { 17 | } 18 | 19 | const Home: NextPage = ({}) => { 20 | 21 | const mainRef = useRef(null); 22 | const {theme} = useContext(ThemeContext); 23 | 24 | useEffect(() => { 25 | mainRef.current?.classList.remove(styles.withAnimation); 26 | window.requestAnimationFrame(() => { 27 | mainRef.current?.classList.add(styles.withAnimation); 28 | }); 29 | }, [theme]); 30 | 31 | return ( 32 |
33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 |
42 |
43 |
44 |
45 | ); 46 | }; 47 | 48 | export default Home; 49 | -------------------------------------------------------------------------------- /pages/media.scss: -------------------------------------------------------------------------------- 1 | // 极小分辨率移动端设备 2 | @mixin media-mini-mobile { 3 | @media screen and (max-width: 25.875rem) { 4 | @content; 5 | } 6 | } 7 | 8 | // 介于极小分辨率和正常分辨率之间的移动端设备 9 | @mixin media-between-mini-and-normal-mobile { 10 | @media screen and (min-width: 25.876rem) and (max-width: 47.9375rem) { 11 | @content; 12 | } 13 | } 14 | 15 | // 移动端设备 16 | @mixin media-mobile { 17 | @media screen and (max-width: 47.9375rem) { 18 | @content; 19 | } 20 | } 21 | 22 | // ipad 23 | @mixin media-ipad { 24 | @media screen and (min-width: 47.9375rem) and (max-width: 75rem) { 25 | @content; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /public/CNAME: -------------------------------------------------------------------------------- 1 | iotsharp.io -------------------------------------------------------------------------------- /public/banner_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/banner_dark.png -------------------------------------------------------------------------------- /public/banner_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/banner_light.png -------------------------------------------------------------------------------- /public/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/close.png -------------------------------------------------------------------------------- /public/close_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/close_light.png -------------------------------------------------------------------------------- /public/code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/code.jpg -------------------------------------------------------------------------------- /public/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/code.png -------------------------------------------------------------------------------- /public/contributor_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/contributor_1.png -------------------------------------------------------------------------------- /public/contributor_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/contributor_2.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/favicon.ico -------------------------------------------------------------------------------- /public/gateway.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/home_bg_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/home_bg_dark.png -------------------------------------------------------------------------------- /public/home_bg_dark.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/home_bg_dark.webp -------------------------------------------------------------------------------- /public/home_bg_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/home_bg_light.png -------------------------------------------------------------------------------- /public/home_bg_light.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/home_bg_light.webp -------------------------------------------------------------------------------- /public/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img.png -------------------------------------------------------------------------------- /public/img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_1.png -------------------------------------------------------------------------------- /public/img_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_10.png -------------------------------------------------------------------------------- /public/img_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_11.png -------------------------------------------------------------------------------- /public/img_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_12.png -------------------------------------------------------------------------------- /public/img_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_13.png -------------------------------------------------------------------------------- /public/img_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_14.png -------------------------------------------------------------------------------- /public/img_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_2.png -------------------------------------------------------------------------------- /public/img_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_3.png -------------------------------------------------------------------------------- /public/img_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_4.png -------------------------------------------------------------------------------- /public/img_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_5.png -------------------------------------------------------------------------------- /public/img_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_6.png -------------------------------------------------------------------------------- /public/img_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_7.png -------------------------------------------------------------------------------- /public/img_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_8.png -------------------------------------------------------------------------------- /public/img_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/img_9.png -------------------------------------------------------------------------------- /public/information.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/iot.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/iotsharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/iotsharp.png -------------------------------------------------------------------------------- /public/iotsharp128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/iotsharp128.png -------------------------------------------------------------------------------- /public/iotsharp32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/iotsharp32.png -------------------------------------------------------------------------------- /public/iotsharp64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/iotsharp64.png -------------------------------------------------------------------------------- /public/locales/en/common.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/locales/en/common.json -------------------------------------------------------------------------------- /public/locales/en/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "about": "About" 3 | } 4 | -------------------------------------------------------------------------------- /public/locales/en/header.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/locales/en/header.json -------------------------------------------------------------------------------- /public/locales/en/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "genshin-impact": "原神" 3 | } 4 | -------------------------------------------------------------------------------- /public/locales/zh-CN/common.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/locales/zh-CN/common.json -------------------------------------------------------------------------------- /public/locales/zh-CN/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "about": "关于" 3 | } 4 | -------------------------------------------------------------------------------- /public/locales/zh-CN/header.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/locales/zh-CN/header.json -------------------------------------------------------------------------------- /public/locales/zh-CN/main.json: -------------------------------------------------------------------------------- 1 | { 2 | "genshin-impact": "原神" 3 | } 4 | -------------------------------------------------------------------------------- /public/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 3 | logo-icon 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /public/logo-text-dark.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /public/logo-text.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /public/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/logo_dark.png -------------------------------------------------------------------------------- /public/logo_dark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/logo_light.png -------------------------------------------------------------------------------- /public/logo_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/network.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /public/plantform.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/platform.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/public_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/public_logo.png -------------------------------------------------------------------------------- /public/rule.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/safety.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/theme_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/theme_dark.png -------------------------------------------------------------------------------- /public/theme_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IoTSharp/Home/a77df18185e09ba5b86984cf5aa2f5fd7720d7b1/public/theme_light.png -------------------------------------------------------------------------------- /public/thirteen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /public/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /stores/language.tsx: -------------------------------------------------------------------------------- 1 | import React, {createContext, useEffect, useState} from 'react'; 2 | import {Language} from '@/constants/enum'; 3 | 4 | interface ILanguageContextProps { 5 | language: Language; 6 | setLanguage: (language: Language) => void; 7 | } 8 | 9 | interface IProps { 10 | children: JSX.Element; 11 | } 12 | 13 | export const LanguageContext = createContext({} as ILanguageContextProps); 14 | 15 | export const LanguageContextProvider = ({children}: IProps): JSX.Element => { 16 | const [language, setLanguage] = useState(Language.ch); 17 | 18 | useEffect(() => { 19 | const checkLanguage = (): void => { 20 | const item = (localStorage.getItem('language') as Language) || Language.ch; 21 | setLanguage(item); 22 | }; 23 | checkLanguage(); 24 | window.addEventListener('storage', checkLanguage); 25 | return (): void => { 26 | window.removeEventListener('storage', checkLanguage); 27 | }; 28 | }, []); 29 | 30 | return ( 31 | { 35 | setLanguage(currentLanguage); 36 | localStorage.setItem('language', currentLanguage); 37 | }, 38 | }} 39 | > 40 | {children} 41 | 42 | ); 43 | }; 44 | -------------------------------------------------------------------------------- /stores/theme.tsx: -------------------------------------------------------------------------------- 1 | import React, {createContext, useEffect, useState} from 'react'; 2 | import {Themes} from '@/constants/enum'; 3 | 4 | interface IThemeContextProps { 5 | theme: Themes; 6 | setTheme: (theme: Themes) => void; 7 | } 8 | 9 | interface IProps { 10 | children: JSX.Element; 11 | } 12 | 13 | export const ThemeContext = createContext({} as IThemeContextProps); 14 | 15 | export const ThemeContextProvider = ({children}: IProps): JSX.Element => { 16 | const [theme, setTheme] = useState(Themes.light); 17 | 18 | // 监听本地缓存来同步不同页面间的主题 19 | useEffect(() => { 20 | const checkTheme = (): void => { 21 | const item = (localStorage.getItem('theme') as Themes) || Themes.light; 22 | setTheme(item); 23 | document.getElementsByTagName('html')[0].dataset.theme = item; 24 | }; 25 | checkTheme(); 26 | window.addEventListener('storage', checkTheme); 27 | return (): void => { 28 | window.removeEventListener('storage', checkTheme); 29 | }; 30 | }, []); 31 | 32 | return ( 33 | { 37 | setTheme(currentTheme); 38 | localStorage.setItem('theme', currentTheme); 39 | document.getElementsByTagName('html')[0].dataset.theme = currentTheme; 40 | }, 41 | }} 42 | > 43 | {children} 44 | 45 | ); 46 | }; 47 | -------------------------------------------------------------------------------- /stores/userAgent.tsx: -------------------------------------------------------------------------------- 1 | import React, {createContext, useEffect, useState} from 'react'; 2 | import {Environment} from '@/constants/enum'; 3 | 4 | interface IUserAgentContextProps { 5 | userAgent: Environment; 6 | } 7 | 8 | interface IProps { 9 | children: JSX.Element; 10 | } 11 | 12 | export const UserAgentContext = createContext({} as IUserAgentContextProps); 13 | 14 | export const UserAgentProvider = ({children}: IProps): JSX.Element => { 15 | const [userAgent, setUserAgent] = useState(Environment.none); // 服务器渲染初始化渲染未必是预期效果,none缓冲切换视觉) 16 | 17 | // 监听本地缓存来同步不同页面间的主题(当前页面无法监听到,直接在顶部栏进行了类的切换) 18 | useEffect(() => { 19 | const checkUserAgent = (): void => { 20 | const width = document.body.offsetWidth; 21 | // 用宽度去判断,是为了适配不改机型,仅拉扯屏幕宽度的情况 22 | if (width < 768) { 23 | // 手机端 24 | setUserAgent(Environment.mobile); 25 | } else if (width >= 768 && width < 1200) { 26 | // ipad端 27 | setUserAgent(Environment.ipad); 28 | } else if (width >= 1200) { 29 | // pc端 30 | setUserAgent(Environment.pc); 31 | } else { 32 | setUserAgent(Environment.none); // 增加none类型来缓冲默认类型样式切换时的视觉突变 33 | } 34 | }; 35 | checkUserAgent(); 36 | window.addEventListener('resize', checkUserAgent); // 监听屏幕宽度变化,及时适配当前页面样式 37 | return (): void => { 38 | window.removeEventListener('resize', checkUserAgent); 39 | }; 40 | }, [typeof document !== 'undefined' && document.body.offsetWidth]); 41 | 42 | return {children}; 43 | }; 44 | -------------------------------------------------------------------------------- /styles/globals.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | font-size: 16px; 4 | padding: 0; 5 | margin: 0; 6 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 7 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 8 | overflow: hidden; 9 | } 10 | 11 | a { 12 | color: inherit; 13 | text-decoration: none; 14 | } 15 | 16 | * { 17 | box-sizing: border-box; 18 | } 19 | 20 | .forbidScroll { 21 | height: 100vh; 22 | overflow: hidden; 23 | } 24 | 25 | #__next { 26 | height: 100vh; 27 | overflow: auto; 28 | } 29 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "strict": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "noEmit": true, 14 | "esModuleInterop": true, 15 | "module": "esnext", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "isolatedModules": true, 19 | "jsx": "preserve", 20 | "incremental": true, 21 | "baseUrl": "./", 22 | "paths": { 23 | "@/*": [ 24 | "./*" 25 | ] 26 | }, 27 | "plugins": [ 28 | { 29 | "name": "typescript-plugin-css-modules" 30 | } 31 | ] 32 | }, 33 | "include": [ 34 | "next-env.d.ts", 35 | "**/*.ts", 36 | "**/*.tsx" 37 | ], 38 | "exclude": [ 39 | "node_modules" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /utils/index.ts: -------------------------------------------------------------------------------- 1 | import {AppContext} from "next/app"; 2 | 3 | export const getIsMobile = (context: AppContext) => { 4 | const {headers = {}} = context.ctx.req || {}; 5 | return /mobile|android|iphone|ipad|phone/i.test( 6 | (headers["user-agent"] || "").toLowerCase() 7 | ); 8 | }; 9 | 10 | export const getIsSupportWebp = (context: AppContext) => { 11 | const {headers = {}} = context.ctx.req || {}; 12 | return headers.accept?.includes("image/webp"); 13 | }; 14 | --------------------------------------------------------------------------------