diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7100590 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..6aa0f68 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,42 @@ +module.exports = { + env: { + browser: true, + es2021: true, + node: true + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react/recommended', + 'plugin:react/jsx-runtime' + ], + overrides: [ + { + env: { + node: true + }, + files: ['.eslintrc.{js,cjs}'], + parserOptions: { + sourceType: 'script' + } + }, + { + files: ['**/*.tsx'], + rules: { + 'react/prop-types': 'off' + } + } + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module' + }, + plugins: ['@typescript-eslint', 'react'], + rules: { + indent: ['error', 2], + 'linebreak-style': ['error', 'unix'], + quotes: ['error', 'single'], + semi: ['error', 'never'] + } +} diff --git a/.github/ISSUE_TEMPLATE/oscp.yml b/.github/ISSUE_TEMPLATE/oscp.yml index 017efd9..3287b14 100644 --- a/.github/ISSUE_TEMPLATE/oscp.yml +++ b/.github/ISSUE_TEMPLATE/oscp.yml @@ -1,5 +1,5 @@ name: 'AntV OSCP 计划' -description: AntV 开源共建计划(AntV Open Source Contribution Plan,简称 AntV OSCP) +description: AntV 开源共建计划(AntV Open Source Contribution Plan,简称 AntV OSCP) body: - type: checkboxes id: AntV_OSCP_program @@ -8,7 +8,7 @@ body: description: | AntV 开源共建计划(AntV Open Source Contribution Plan,简称 AntV OSCP) 期望可以基于 AntV 的开源 Roadmap 开放具体开发任务到社区,以社区共建任务的形式推动“AntV” 的开源发展,也期望有更多社区伙伴各各种形式参与到 AntV 的开源共建中,共同参与数据可视化开源生态的持续建设。 若有感兴趣想要认领的任务,可直接回复认领,如果你是首次认领可先完成[新手任务](https://www.yuque.com/antv/cyggvg/cwc9kacfvd9aivsp) - + options: - label: 我同意将这个 Issue 参与 OSCP 计划 validations: @@ -28,7 +28,7 @@ body: id: oscp_task_description attributes: label: 任务介绍 - description: | + description: | 简单描述任务背景信息,为了解决哪些问题 validations: required: false @@ -36,8 +36,7 @@ body: id: oscp_task_info_description_2 attributes: label: 参考说明 - description: | - 提供一些可参考的demo,相关教程辅助用户解决问题 + description: | + 提供一些可参考的demo,相关教程辅助用户解决问题 validations: required: false - diff --git a/.github/ISSUE_TEMPLATE/site_report.yml b/.github/ISSUE_TEMPLATE/site_report.yml index 552dd6a..596a368 100644 --- a/.github/ISSUE_TEMPLATE/site_report.yml +++ b/.github/ISSUE_TEMPLATE/site_report.yml @@ -8,7 +8,7 @@ body: description: | 输入站点名称 placeholder: | - https://l7editor.antv.antgroup.com/ + https://l7editor.antv.antgroup.com/ validations: required: true - type: input @@ -18,7 +18,7 @@ body: description: | 输入站点 URL placeholder: | - https://l7editor.antv.antgroup.com/ + https://l7editor.antv.antgroup.com/ validations: required: true - type: textarea @@ -52,7 +52,7 @@ body: - type: textarea id: logo attributes: - label: 图标 + label: 图标 description: 站点 logo 或 icon 图标, URL 地址或者复制图片 placeholder: | 可以将你的图片拖拽到此处↓ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..1a089f4 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..75fac8e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run lint diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..a032a61 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +build +node_modules +public diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..2944819 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "useTabs": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "none", + "semi": false +} diff --git a/README.md b/README.md index 0492724..f87d969 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,27 @@ Inspired by [larkmap](https://larkmap.com/) [点击提交站点信息](https://github.com/DipperMap/dippermap/issues/new?assignees=&labels=&projects=&template=site_report.yml) -#### 方式二 提交 PR +#### 方式二 提交 PR 直接修改站点配置文件,通过 PR 的方式,合并代码,代码合并后站点生效 -[点击修改配置文件](https://github.com/DipperMap/dippermap/edit/main/src/data/config.ts) - ## 本地开发 ### clone 代码 ```bash git clone https://github.com/DipperMap/dippermap.git -```` +``` ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. +### `npm commit` + +Submit your code this way. + ## 👬 Contributors ![https://github.com/DipperMap/dippermap/graphs/contributors](https://contrib.rocks/image?repo=DipperMap/dippermap) diff --git a/commitlint.config.cjs b/commitlint.config.cjs new file mode 100644 index 0000000..a4f4369 --- /dev/null +++ b/commitlint.config.cjs @@ -0,0 +1,3 @@ +module.exports = { + extends: ['@commitlint/config-conventional'] +} diff --git a/package.json b/package.json index 111ed83..73a562c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,21 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "prettier": "prettier --write .", + "lint": "lint-staged", + "commit": "cz" + }, + "lint-staged": { + "src/*.{js,ts,jsx,tsx,vue}": [ + "node_modules/.bin/prettier --write .", + "node_modules/.bin/eslint --fix .", + "git add ." + ], + "src/*.{css,scss,less,json,html,md}": [ + "node_modules/.bin/prettier --write .", + "git add ." + ] }, "eslintConfig": { "extends": [ @@ -43,6 +57,19 @@ ] }, "devDependencies": { - "antd": "^5.11.5" + "@commitlint/cli": "^18.4.3", + "@commitlint/config-conventional": "^18.4.3", + "antd": "^5.11.5", + "commitizen": "^4.3.0", + "cz-conventional-changelog": "^3.3.0", + "eslint": "^8.54.0", + "husky": "^8.0.3", + "lint-staged": "^15.1.0", + "prettier": "^3.1.0" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } } } diff --git a/src/App.test.tsx b/src/App.test.tsx index 2a68616..3a7a8cc 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,9 +1,9 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import App from './App'; +import React from 'react' +import { render, screen } from '@testing-library/react' +import App from './App' test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); + render() + const linkElement = screen.getByText(/learn react/i) + expect(linkElement).toBeInTheDocument() +}) diff --git a/src/App.tsx b/src/App.tsx index 000f090..23e4765 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,40 +1,40 @@ -import { Layout } from "antd"; -import "./App.css"; -import { AppCard } from "./components/app-content"; -import { AppSider } from "./components/app-sider"; -import { useState, useEffect } from "react"; -import classNames from "classnames"; -import { AppHeader } from "./components/app-header"; -import { AppSearch } from "./components/app-search"; +import { Layout } from 'antd' +import './App.css' +import { AppCard } from './components/app-content' +import { AppSider } from './components/app-sider' +import { useState, useEffect } from 'react' +import classNames from 'classnames' +import { AppHeader } from './components/app-header' +import { AppSearch } from './components/app-search' -const { Header, Footer, Sider, Content } = Layout; +const { Header, Footer, Sider, Content } = Layout function App() { - const [collapsed, setCollapsed] = useState(false); - const [screenWidth, setScreenWidth] = useState(window.innerWidth); + const [collapsed, setCollapsed] = useState(false) + const [screenWidth, setScreenWidth] = useState(window.innerWidth) useEffect(() => { if (window.innerWidth <= 767) { - setCollapsed(true); + setCollapsed(true) } const handleResize = () => { - setScreenWidth(window.innerWidth); - }; + setScreenWidth(window.innerWidth) + } - window.addEventListener("resize", handleResize); + window.addEventListener('resize', handleResize) return () => { - window.removeEventListener("resize", handleResize); - }; - }, []); + window.removeEventListener('resize', handleResize) + } + }, []) return (
@@ -63,7 +63,7 @@ function App() {
DipperMap
- ); + ) } -export default App; +export default App diff --git a/src/components/app-content/index.tsx b/src/components/app-content/index.tsx index 381c47e..1ddae1b 100644 --- a/src/components/app-content/index.tsx +++ b/src/components/app-content/index.tsx @@ -1,22 +1,22 @@ -import { SitesConfig } from "../../data/sites"; -import { Avatar, Row, Card, Col, Tooltip, FloatButton } from "antd"; -import { FileTextOutlined } from "@ant-design/icons"; -import "./index.css"; -import { IGroup } from "../../data/types"; -import { IconFont } from "../../constants"; +import { SitesConfig } from '../../data/sites' +import { Avatar, Row, Card, Col, Tooltip, FloatButton } from 'antd' +import { FileTextOutlined } from '@ant-design/icons' +import './index.css' +import { IGroup } from '../../data/types' +import { IconFont } from '../../constants' export const AppCard = () => { - const siteConfig = SitesConfig["main"]; + const siteConfig = SitesConfig['main'] return (
{siteConfig.groups.map((group: IGroup) => { - const { name, children, icon } = group; + const { name, children, icon } = group return ( +
{icon && (
@@ -39,7 +39,7 @@ export const AppCard = () => { xxl={4} className="card-col" onClick={() => { - window.open(val.site_url); + window.open(val.site_url) }} key={val.site_url} > @@ -62,21 +62,21 @@ export const AppCard = () => {
- ); + ) })}
- ); + ) })} 新站点提报
} - icon={} + icon={} onClick={() => { window.open( - "https://www.yuque.com/forms/share/0df1d286-b6c9-4412-9605-504af8cfb21f" - ); + 'https://www.yuque.com/forms/share/0df1d286-b6c9-4412-9605-504af8cfb21f' + ) }} /> - ); -}; + ) +} diff --git a/src/components/app-header/index.tsx b/src/components/app-header/index.tsx index 9f6d340..6c04877 100644 --- a/src/components/app-header/index.tsx +++ b/src/components/app-header/index.tsx @@ -2,36 +2,34 @@ import { MenuFoldOutlined, MenuUnfoldOutlined, WechatOutlined, - GithubOutlined, -} from "@ant-design/icons"; -import "./index.css"; -import { Tooltip } from "antd"; -import weChat from "../../assets/weixin.jpeg"; + GithubOutlined +} from '@ant-design/icons' +import './index.css' +import { Tooltip } from 'antd' +import weChat from '../../assets/weixin.jpeg' type AppHeaderProps = { - collapsed: boolean; - setCollapsed: (val: boolean) => void; - screenWidth: number; -}; + collapsed: boolean + setCollapsed: (val: boolean) => void + screenWidth: number +} export const AppHeader: React.FC = ({ setCollapsed, collapsed, - screenWidth, + screenWidth }) => { return (
setCollapsed(!collapsed)}> {screenWidth > 767 && ( -
- {collapsed ? : } -
+
{collapsed ? : }
)}
@@ -53,11 +51,11 @@ export const AppHeader: React.FC = ({
{ - window.open("https://github.com/DipperMap/dippermap"); + window.open('https://github.com/DipperMap/dippermap') }} />
- ); -}; + ) +} diff --git a/src/components/app-search/index.css b/src/components/app-search/index.css index cc8a9ab..02c3dd5 100644 --- a/src/components/app-search/index.css +++ b/src/components/app-search/index.css @@ -1,24 +1,24 @@ .searchWrapper { - width: 95%; - margin: 30px auto 0; + width: 95%; + margin: 30px auto 0; } .searchBox { - line-height: normal; + line-height: normal; } .searchBox .ant-btn { - border: none; - border-radius: 8px 16px 0px 0px; - background-color: #DDE3EC; + border: none; + border-radius: 8px 16px 0px 0px; + background-color: #dde3ec; } .searchBox .ant-btn:hover, .searchBox .ant-btn.activeSearch { - color: #fff !important; - background-color: #38404D !important; + color: #fff !important; + background-color: #38404d !important; } .searchBox .ant-input.ant-input-lg { - border-top-left-radius: 0; -} \ No newline at end of file + border-top-left-radius: 0; +} diff --git a/src/components/app-search/index.tsx b/src/components/app-search/index.tsx index 8222528..000194f 100644 --- a/src/components/app-search/index.tsx +++ b/src/components/app-search/index.tsx @@ -1,68 +1,67 @@ -import { useState } from 'react'; -import { ISearchItem, searchConfig } from "../../data/searchConfig"; -import { Input, Button, Space, ConfigProvider } from "antd"; -import "./index.css"; +import { useState } from 'react' +import { ISearchItem, searchConfig } from '../../data/searchConfig' +import { Input, Button, Space, ConfigProvider } from 'antd' +import './index.css' export const AppSearch = () => { - - const [curSearchType, setCurSearchType] = useState(searchConfig[0]) + const [curSearchType, setCurSearchType] = useState( + searchConfig[0] + ) const [searchText, setSearchText] = useState() - return
-
- +
+ - - { - searchConfig.map(item => { - return - }) - } - - - + + {searchConfig.map((item) => { + return ( + + ) + })} + + + - ${curSearchType.name}搜索`} - value={searchText} - onChange={e => setSearchText(e.target.value)} - onPressEnter={() => { - window.open(`${curSearchType.site}?${curSearchType.paramKey}=${searchText}`) }} - /> - + > + ${curSearchType.name}搜索`} + value={searchText} + onChange={(e) => setSearchText(e.target.value)} + onPressEnter={() => { + window.open( + `${curSearchType.site}?${curSearchType.paramKey}=${searchText}` + ) + }} + /> + +
- -
- ; -}; + ) +} diff --git a/src/components/app-sider/index.tsx b/src/components/app-sider/index.tsx index 799f37d..05f282c 100644 --- a/src/components/app-sider/index.tsx +++ b/src/components/app-sider/index.tsx @@ -1,39 +1,39 @@ -import { useState } from "react"; -import logo from "../../assets/logo.png"; -import type { IGroup } from "../../data/types"; -import { SitesConfig } from "../../data/sites"; -import "./index.css"; -import { Space, Tag } from "antd"; -import classNames from "classnames"; -import { AppstoreAddOutlined, CloseOutlined } from "@ant-design/icons"; +import { useState } from 'react' +import logo from '../../assets/logo.png' +import type { IGroup } from '../../data/types' +import { SitesConfig } from '../../data/sites' +import './index.css' +import { Space, Tag } from 'antd' +import classNames from 'classnames' +import { AppstoreAddOutlined, CloseOutlined } from '@ant-design/icons' type AppSilderPopup = { - collapsed: boolean; - screenWidth: number; - setCollapsed: (value: boolean) => void; -}; + collapsed: boolean + screenWidth: number + setCollapsed: (value: boolean) => void +} export const AppSider: React.FC = ({ collapsed, screenWidth, - setCollapsed, + setCollapsed }) => { - const [selectedTag, setSelectedTag] = useState(undefined); - const siteConfig = SitesConfig["main"]; + const [selectedTag, setSelectedTag] = useState(undefined) + const siteConfig = SitesConfig['main'] const tagClick = (item: IGroup) => { - const element = document.querySelector(`#${item.name}`); + const element = document.querySelector(`#${item.name}`) if (element) { - element.scrollIntoView({ block: "start", behavior: "smooth" }); - setSelectedTag(item.name); + element.scrollIntoView({ block: 'start', behavior: 'smooth' }) + setSelectedTag(item.name) } - }; + } return (
{ - setCollapsed(!collapsed); + setCollapsed(!collapsed) }} > {screenWidth <= 767 && ( @@ -44,20 +44,20 @@ export const AppSider: React.FC = ({
{siteConfig.groups.map((group: IGroup) => { return ( - + tagClick(group)} > {group.name} - ); + ) })}
- ); -}; + ) +} diff --git a/src/constants/index.ts b/src/constants/index.ts index 76b39af..67e08cc 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,5 +1,5 @@ -import { createFromIconfontCN } from "@ant-design/icons"; +import { createFromIconfontCN } from '@ant-design/icons' -export const iconUrl = "//at.alicdn.com/t/a/font_4354752_e3prmhsizxg.js"; +export const iconUrl = '//at.alicdn.com/t/a/font_4354752_e3prmhsizxg.js' -export const IconFont = createFromIconfontCN({ scriptUrl: iconUrl }); +export const IconFont = createFromIconfontCN({ scriptUrl: iconUrl }) diff --git a/src/data/searchConfig.ts b/src/data/searchConfig.ts index 1d5db46..6798632 100644 --- a/src/data/searchConfig.ts +++ b/src/data/searchConfig.ts @@ -1,82 +1,82 @@ export interface ISearchItem { - id: string; // 搜索项ID - name: string; // 搜索引擎名称 - site: string; // 搜索跳转地址 - paramKey: string; // 搜索用的字段 - icon?: string; // 搜索引擎icon + id: string // 搜索项ID + name: string // 搜索引擎名称 + site: string // 搜索跳转地址 + paramKey: string // 搜索用的字段 + icon?: string // 搜索引擎icon } export const searchConfig: ISearchItem[] = [ - { - id: "baidu", - name: "百度", - site: "https://www.baidu.com/s", - paramKey: "wd", - }, - { - id: "baidu-dev", - name: "百度开发者", - site: "https://kaifa.baidu.com/searchPage", - paramKey: "wd", - }, - { - id: "google", - name: "Google", - site: "https://www.google.com/search", - paramKey: "q", - }, - { - id: "github", - name: "Github", - site: "https://github.com/search", - paramKey: "q", - }, - { - id: "ecosia", - name: "Ecosia", - site: "https://www.ecosia.org/search", - paramKey: "q", - }, - { - id: "yandex", - name: "Yandex", - site: "https://yandex.com/search/", - paramKey: "text", - }, - { - id: "360-so", - name: "360", - site: "https://www.so.com/s", - paramKey: "q", - }, - { - id: "bing", - name: "Bing", - site: "https://www.bing.com/search", - paramKey: "q", - }, - { - id: "zhihu", - name: "知乎", - site: "https://www.zhihu.com/search", - paramKey: "q", - }, - { - id: "bilibili", - name: "Bilibili", - site: "https://search.bilibili.com/all", - paramKey: "keyword", - }, - { - id: "douban", - name: "豆瓣", - site: "https://www.douban.com/search", - paramKey: "q", - }, - { - id: "figma-plugins", - name: "Figma 插件", - site: "https://fig-stats.com/plugins", - paramKey: "search", - }, -]; + { + id: 'baidu', + name: '百度', + site: 'https://www.baidu.com/s', + paramKey: 'wd' + }, + { + id: 'baidu-dev', + name: '百度开发者', + site: 'https://kaifa.baidu.com/searchPage', + paramKey: 'wd' + }, + { + id: 'google', + name: 'Google', + site: 'https://www.google.com/search', + paramKey: 'q' + }, + { + id: 'github', + name: 'Github', + site: 'https://github.com/search', + paramKey: 'q' + }, + { + id: 'ecosia', + name: 'Ecosia', + site: 'https://www.ecosia.org/search', + paramKey: 'q' + }, + { + id: 'yandex', + name: 'Yandex', + site: 'https://yandex.com/search/', + paramKey: 'text' + }, + { + id: '360-so', + name: '360', + site: 'https://www.so.com/s', + paramKey: 'q' + }, + { + id: 'bing', + name: 'Bing', + site: 'https://www.bing.com/search', + paramKey: 'q' + }, + { + id: 'zhihu', + name: '知乎', + site: 'https://www.zhihu.com/search', + paramKey: 'q' + }, + { + id: 'bilibili', + name: 'Bilibili', + site: 'https://search.bilibili.com/all', + paramKey: 'keyword' + }, + { + id: 'douban', + name: '豆瓣', + site: 'https://www.douban.com/search', + paramKey: 'q' + }, + { + id: 'figma-plugins', + name: 'Figma 插件', + site: 'https://fig-stats.com/plugins', + paramKey: 'search' + } +] diff --git a/src/data/sites/index.ts b/src/data/sites/index.ts index 293d7db..e38cb33 100644 --- a/src/data/sites/index.ts +++ b/src/data/sites/index.ts @@ -1,7 +1,7 @@ import { ISiteConfig } from '../types' import { MainConfig } from './main' import { Tech } from './tech' -export const SitesConfig:{[key:string]:ISiteConfig} = { - main:MainConfig, - tech:Tech -} \ No newline at end of file +export const SitesConfig: { [key: string]: ISiteConfig } = { + main: MainConfig, + tech: Tech +} diff --git a/src/data/sites/main/groups/color_map.ts b/src/data/sites/main/groups/color_map.ts index 9fe7c60..c6a68d8 100644 --- a/src/data/sites/main/groups/color_map.ts +++ b/src/data/sites/main/groups/color_map.ts @@ -1,20 +1,20 @@ -import { IGroup } from "../../../types"; +import { IGroup } from '../../../types' export const MapColor: IGroup = { - icon: "icon-ditupeise", - name: "地图颜色", - en_name: "map color", + icon: 'icon-ditupeise', + name: '地图颜色', + en_name: 'map color', order: 2, children: [ { - icon: "https://colorbrewer2.org/favicon.ico", - name: "ColorBrewer", - en_name: "ColorBrewer", - description: "地图配色", - en_description: "Map color", - site_url: "https://colorbrewer2.org/", + icon: 'https://colorbrewer2.org/favicon.ico', + name: 'ColorBrewer', + en_name: 'ColorBrewer', + description: '地图配色', + en_description: 'Map color', + site_url: 'https://colorbrewer2.org/', order: 2, - tags: ["GIS", "Web", "Data"], - }, - ], -}; + tags: ['GIS', 'Web', 'Data'] + } + ] +} diff --git a/src/data/sites/main/groups/coord_convert.ts b/src/data/sites/main/groups/coord_convert.ts index 36e5bbc..e30fe41 100644 --- a/src/data/sites/main/groups/coord_convert.ts +++ b/src/data/sites/main/groups/coord_convert.ts @@ -1,39 +1,40 @@ // 坐标转换工具 import { IGroup } from '../../../types' export const CoordConvert: IGroup = { - icon: 'icon-tool_zuobiaozhuanhuan', - name: '坐标转换', - order: 2, - en_name: 'Coord', - children: [{ - icon: "https://epsg.io/static/img/espg-logo.png", - name: "epsg.io", - en_name: "epsg.io", - description: "全球坐标系转换工具", - en_description: "Global Coordinate System Conversion Tool", - site_url: "https://epsg.io/", - order: 2, - tags: ["GIS", "Web", "Data"], - },{ - site_url: 'https://www.lddgo.net/base/class?classID=8', - name: '坐标转换', - icon: 'https://www.lddgo.net/img/icon.png', - description: '坐标/经纬度查询', - en_name: 'Coord', - en_description: 'Coord', - order: 2, - tags: ['GIS', 'Web', 'Data'], - },{ - site_url: 'http://www.wmksj.com/tool/coordinate.html', - name: '坐标系转换', - icon: 'http://www.wmksj.com/resources/wmksj/images/favicon.ico', - description: 'BD09、GCJ02、WGS84坐标系转换', - en_name: '坐标系转换', - en_description: 'BD09、GCJ02、WGS84坐标系转换 ', - order: 2, - tags: ['GIS', 'Web', 'Data'], - - } - ] - + icon: 'icon-tool_zuobiaozhuanhuan', + name: '坐标转换', + order: 2, + en_name: 'Coord', + children: [ + { + icon: 'https://epsg.io/static/img/espg-logo.png', + name: 'epsg.io', + en_name: 'epsg.io', + description: '全球坐标系转换工具', + en_description: 'Global Coordinate System Conversion Tool', + site_url: 'https://epsg.io/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + site_url: 'https://www.lddgo.net/base/class?classID=8', + name: '坐标转换', + icon: 'https://www.lddgo.net/img/icon.png', + description: '坐标/经纬度查询', + en_name: 'Coord', + en_description: 'Coord', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + site_url: 'http://www.wmksj.com/tool/coordinate.html', + name: '坐标系转换', + icon: 'http://www.wmksj.com/resources/wmksj/images/favicon.ico', + description: 'BD09、GCJ02、WGS84坐标系转换', + en_name: '坐标系转换', + en_description: 'BD09、GCJ02、WGS84坐标系转换 ', + order: 2, + tags: ['GIS', 'Web', 'Data'] + } + ] } diff --git a/src/data/sites/main/groups/data_collaboration.ts b/src/data/sites/main/groups/data_collaboration.ts index 286dc45..66cd764 100644 --- a/src/data/sites/main/groups/data_collaboration.ts +++ b/src/data/sites/main/groups/data_collaboration.ts @@ -1,29 +1,29 @@ import { IGroup } from '../../../types' export const DataCollaboration: IGroup = { - icon: 'icon-shujuxietong', - name: '数据协同', - order: 2, - en_name: 'Data Collaboration', - children: [{ - icon: "https://maptable.com/favicon.ico", - name: "Maptable", - en_name: "Maptable", - description: "空间数据协同工具", - en_description: "Spatial data collaboration tools", - site_url: "https://maptable.com/zh-cn/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - "icon": "https://app-assets.felt.com/images/felt-favicon-06e217d081cb4b0a09a450d82538a9b1.png?vsn=d", - "name": "Felt", - "en_name": "Felt", - "description": "地图制图分享", - "en_description": "Fast, flexible maps to grow your business", - "site_url": "https://felt.com", - "order": 1, - "tags": ["Crafts", "Marketplace", "Handmade"] - } - - ] + icon: 'icon-shujuxietong', + name: '数据协同', + order: 2, + en_name: 'Data Collaboration', + children: [ + { + icon: 'https://maptable.com/favicon.ico', + name: 'Maptable', + en_name: 'Maptable', + description: '空间数据协同工具', + en_description: 'Spatial data collaboration tools', + site_url: 'https://maptable.com/zh-cn/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://app-assets.felt.com/images/felt-favicon-06e217d081cb4b0a09a450d82538a9b1.png?vsn=d', + name: 'Felt', + en_name: 'Felt', + description: '地图制图分享', + en_description: 'Fast, flexible maps to grow your business', + site_url: 'https://felt.com', + order: 1, + tags: ['Crafts', 'Marketplace', 'Handmade'] + } + ] } diff --git a/src/data/sites/main/groups/data_edit.ts b/src/data/sites/main/groups/data_edit.ts index da651ff..bb9e576 100644 --- a/src/data/sites/main/groups/data_edit.ts +++ b/src/data/sites/main/groups/data_edit.ts @@ -1,29 +1,30 @@ import { IGroup } from '../../../types' export const DataEdit: IGroup = { - icon: 'icon-shujubianji', - name: '数据编辑', - en_name: 'data edit', - order: 0, - children: [{ - icon: "https://mdn.alipayobjects.com/huamei_k6sfo0/afts/img/A*RSdESJd70P8AAAAAAAAAAAAADjWqAQ/original", - name: "L7Editor", - en_name: "L7Editor", - description: "多底图地理绘制工具", - en_description: "Multi-base map geographic drawing tool", - site_url: "https://l7editor.antv.antgroup.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - icon: "https://geojson.io/img/favicon.png", - name: "Geojson.io", - en_name: "Geojson.io", - description: "用于创建、查看和共享空间数据的快速、简单的工具。", - en_description: - "A quick, simple tool for creating, viewing, and sharing spatial data.", - site_url: "https://geojson.io", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - ] + icon: 'icon-shujubianji', + name: '数据编辑', + en_name: 'data edit', + order: 0, + children: [ + { + icon: 'https://mdn.alipayobjects.com/huamei_k6sfo0/afts/img/A*RSdESJd70P8AAAAAAAAAAAAADjWqAQ/original', + name: 'L7Editor', + en_name: 'L7Editor', + description: '多底图地理绘制工具', + en_description: 'Multi-base map geographic drawing tool', + site_url: 'https://l7editor.antv.antgroup.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://geojson.io/img/favicon.png', + name: 'Geojson.io', + en_name: 'Geojson.io', + description: '用于创建、查看和共享空间数据的快速、简单的工具。', + en_description: + 'A quick, simple tool for creating, viewing, and sharing spatial data.', + site_url: 'https://geojson.io', + order: 2, + tags: ['GIS', 'Web', 'Data'] + } + ] } diff --git a/src/data/sites/main/groups/data_format_convert.ts b/src/data/sites/main/groups/data_format_convert.ts index e4dbeac..f603462 100644 --- a/src/data/sites/main/groups/data_format_convert.ts +++ b/src/data/sites/main/groups/data_format_convert.ts @@ -1,31 +1,31 @@ import { IGroup } from '../../../types' export const DataFormatConvert: IGroup = { - icon: 'icon-shujuzhuanhuan', - name: '数据转换', - order: 2, - en_name: 'Data format conversion', - children: [ - // https://gdal3.js.org/ - { - icon: "", - name: "gdal3.js", - en_name: "gdal3.js", - description: "栅格矢量格式转换", - en_description: " Convert raster and vector geospatial data to various formats and coordinate systems entirely in the browser", - site_url: "https://gdal3.js.org/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - "icon": "https://mygeodata.cloud/favicon.ico", - "name": "MyGeodata Cloud Converter", - "en_name": "MyGeodata Cloud Converter", - "description": "在线地理数据格式转换工具", - "en_description": "Online geospatial data format conversion tool", - "site_url": "https://mygeodata.cloud/converter/", - "order": 5, - "tags": ["Geospatial Data", "Converter", "GIS"] - } - - ] + icon: 'icon-shujuzhuanhuan', + name: '数据转换', + order: 2, + en_name: 'Data format conversion', + children: [ + // https://gdal3.js.org/ + { + icon: '', + name: 'gdal3.js', + en_name: 'gdal3.js', + description: '栅格矢量格式转换', + en_description: + ' Convert raster and vector geospatial data to various formats and coordinate systems entirely in the browser', + site_url: 'https://gdal3.js.org/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://mygeodata.cloud/favicon.ico', + name: 'MyGeodata Cloud Converter', + en_name: 'MyGeodata Cloud Converter', + description: '在线地理数据格式转换工具', + en_description: 'Online geospatial data format conversion tool', + site_url: 'https://mygeodata.cloud/converter/', + order: 5, + tags: ['Geospatial Data', 'Converter', 'GIS'] + } + ] } diff --git a/src/data/sites/main/groups/data_process.ts b/src/data/sites/main/groups/data_process.ts index 07f058f..79b6567 100644 --- a/src/data/sites/main/groups/data_process.ts +++ b/src/data/sites/main/groups/data_process.ts @@ -1,18 +1,20 @@ import { IGroup } from '../../../types' export const DataProcess: IGroup = { - icon: 'icon-a-shujuchuli1', - name: '数据处理', - en_name: 'data process', - order: 2, - children: [{ - icon: "https://mapshaper.org/images/icon.png", - name: "MapShaper", - en_name: "MapShaper", - description: "地理数据预览,编辑工具", - en_description: - "A tool for topologically aware shape simplification. Reads and writes Shapefile, GeoJSON and TopoJSON formats.", - site_url: "http://www.mapshaper.org/", - order: 2, - tags: ["GIS", "Web", "Data"], - }] + icon: 'icon-a-shujuchuli1', + name: '数据处理', + en_name: 'data process', + order: 2, + children: [ + { + icon: 'https://mapshaper.org/images/icon.png', + name: 'MapShaper', + en_name: 'MapShaper', + description: '地理数据预览,编辑工具', + en_description: + 'A tool for topologically aware shape simplification. Reads and writes Shapefile, GeoJSON and TopoJSON formats.', + site_url: 'http://www.mapshaper.org/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + } + ] } diff --git a/src/data/sites/main/groups/data_source.ts b/src/data/sites/main/groups/data_source.ts index 9ba3f47..0194585 100644 --- a/src/data/sites/main/groups/data_source.ts +++ b/src/data/sites/main/groups/data_source.ts @@ -1,31 +1,32 @@ // 数据可视化 import { IGroup } from '../../../types' export const DataSource: IGroup = { - icon: 'icon-shujuyuanguanli', - name: '数据源', - en_name: 'data source', - order: 1.1, - children: [{ - icon: "https://img.alicdn.com/imgextra/i3/O1CN01NQARus1gyEAmmQ9T0_!!6000000004210-0-tps-670-670.jpg", - name: "DataV.GeoAtlas", - en_name: "DataV.GeoAtlas", - description: - "行政区数据下载", - en_description: - "A tool for topologically aware shape simplification. Reads and writes Shapefile, GeoJSON and TopoJSON formats.", - site_url: "https://datav.aliyun.com/portal/school/atlas/area_selector", - order: 2, - tags: "阿里云,DataV,数据可视化,GeoAtlas,数字孪生,GIS".split(","), - },{ - "icon": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*uQbXRLw_Q2UAAAAAAAAAAAAADmJ7AQ/original", - "name": "行政区划数据下载", - "en_name": "", - "description": "一站式行政区划数据下载、应用平台", - "en_description": "L7 AntV geocoding tool to retrieve latitude and longitude by address", - "site_url": "https://l7.antv.antgroup.com/custom/tools", - "order": 4, - "tags": ["Geocoding", "Maps", "Location", "AntV"] - } - - ] + icon: 'icon-shujuyuanguanli', + name: '数据源', + en_name: 'data source', + order: 1.1, + children: [ + { + icon: 'https://img.alicdn.com/imgextra/i3/O1CN01NQARus1gyEAmmQ9T0_!!6000000004210-0-tps-670-670.jpg', + name: 'DataV.GeoAtlas', + en_name: 'DataV.GeoAtlas', + description: '行政区数据下载', + en_description: + 'A tool for topologically aware shape simplification. Reads and writes Shapefile, GeoJSON and TopoJSON formats.', + site_url: 'https://datav.aliyun.com/portal/school/atlas/area_selector', + order: 2, + tags: '阿里云,DataV,数据可视化,GeoAtlas,数字孪生,GIS'.split(',') + }, + { + icon: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*uQbXRLw_Q2UAAAAAAAAAAAAADmJ7AQ/original', + name: '行政区划数据下载', + en_name: '', + description: '一站式行政区划数据下载、应用平台', + en_description: + 'L7 AntV geocoding tool to retrieve latitude and longitude by address', + site_url: 'https://l7.antv.antgroup.com/custom/tools', + order: 4, + tags: ['Geocoding', 'Maps', 'Location', 'AntV'] + } + ] } diff --git a/src/data/sites/main/groups/geocoding.ts b/src/data/sites/main/groups/geocoding.ts index 740d6b1..c8ac443 100644 --- a/src/data/sites/main/groups/geocoding.ts +++ b/src/data/sites/main/groups/geocoding.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: 'icon-dilibianma', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: 'icon-dilibianma', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/main/groups/geospatial_analysis.ts b/src/data/sites/main/groups/geospatial_analysis.ts new file mode 100644 index 0000000..9a70466 --- /dev/null +++ b/src/data/sites/main/groups/geospatial_analysis.ts @@ -0,0 +1,19 @@ +import { IGroup } from '../../../types' +export const GeospatialAnalysis: IGroup = { + icon: 'icon-a-shujuchuli1', + name: '空间分析', + en_name: 'data process', + order: 12, + children: [ + { + icon: 'https://raw.githubusercontent.com/Turfjs/turf/9a1d5e8d99564d4080f1e2bf1517ed41d18012fa/logo.png', + name: 'Turf.js', + en_name: 'Turf.js', + description: '高级地理空间分析库', + en_description: 'Advanced geospatial analysis for browsers and Node.js', + site_url: 'https://turfjs.org/', + order: 1, + tags: ['GIS', 'Geospatial', 'Analysis'] + } + ] +} diff --git a/src/data/sites/main/groups/onlinemap.ts b/src/data/sites/main/groups/onlinemap.ts index 893cebb..d3c1b31 100644 --- a/src/data/sites/main/groups/onlinemap.ts +++ b/src/data/sites/main/groups/onlinemap.ts @@ -1,71 +1,69 @@ import { IGroup } from '../../../types' export const OnlineMap: IGroup = { - icon: 'icon-a-zaixianditu2', - name: '在线地图', - order: 2, - en_name: 'onlinemap', - children: [ - { - icon: "https://www.tianditu.gov.cn/static/favicon.ico", - name: "天地图", - en_name: "Tianditu", - description: "天地图", - en_description: "Tianditu", - site_url: "https://www.tianditu.gov.cn/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - icon: "https://www.baidu.com/favicon.ico", - name: "百度地图", - en_name: "Baidu Map", - description: "百度地图", - en_description: "Baidu Map", - site_url: "https://map.baidu.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - icon: "https://www.amap.com/favicon.ico", - name: "高德地图", - en_name: "Amap", - description: "高德地图", - en_description: "Amap", - site_url: "https://www.amap.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - icon: "https://map.qq.com/favicon.ico", - name: "腾讯地图", - en_name: "Tencent Map", - description: "腾讯地图", - en_description: "Tencent Map", - site_url: "https://map.qq.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - icon: "https://maps.here.com/favicon.png", - name: "Here Map", - en_name: "Here Map", - description: "Here Map", - en_description: "Here Map", - site_url: "https://maps.here.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - icon: "https://www.google.com/favicon.ico", - name: "Google Map", - en_name: "Google Map", - description: "Google Map", - en_description: "Google Map", - site_url: "https://www.google.com/maps", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - - - ] + icon: 'icon-a-zaixianditu2', + name: '在线地图', + order: 2, + en_name: 'onlinemap', + children: [ + { + icon: 'https://www.tianditu.gov.cn/static/favicon.ico', + name: '天地图', + en_name: 'Tianditu', + description: '天地图', + en_description: 'Tianditu', + site_url: 'https://www.tianditu.gov.cn/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://www.baidu.com/favicon.ico', + name: '百度地图', + en_name: 'Baidu Map', + description: '百度地图', + en_description: 'Baidu Map', + site_url: 'https://map.baidu.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://www.amap.com/favicon.ico', + name: '高德地图', + en_name: 'Amap', + description: '高德地图', + en_description: 'Amap', + site_url: 'https://www.amap.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://map.qq.com/favicon.ico', + name: '腾讯地图', + en_name: 'Tencent Map', + description: '腾讯地图', + en_description: 'Tencent Map', + site_url: 'https://map.qq.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://maps.here.com/favicon.png', + name: 'Here Map', + en_name: 'Here Map', + description: 'Here Map', + en_description: 'Here Map', + site_url: 'https://maps.here.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://www.google.com/favicon.ico', + name: 'Google Map', + en_name: 'Google Map', + description: 'Google Map', + en_description: 'Google Map', + site_url: 'https://www.google.com/maps', + order: 2, + tags: ['GIS', 'Web', 'Data'] + } + ] } diff --git a/src/data/sites/main/groups/rs_platform.ts b/src/data/sites/main/groups/rs_platform.ts index 684b159..1d74b3b 100644 --- a/src/data/sites/main/groups/rs_platform.ts +++ b/src/data/sites/main/groups/rs_platform.ts @@ -1,65 +1,69 @@ import { IGroup } from '../../../types' export const RSPlatform: IGroup = { - icon: 'icon-yaogancehui', - name: '遥感平台', - en_name: 'RS Platform', - order: 2, - children: [ - // gee - { - icon: "https://earthengine.google.com/static/images/150dpi/Satellite_150dpi.png", - name: "Google Earth Engine", - en_name: "Google Earth Engine", - description: "Google Earth Engine", - en_description: "Google Earth Engine", - site_url: "https://earthengine.google.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - { - "icon": "https://img.alicdn.com/imgextra/i4/O1CN01KsDwjf1a87SCHK9Kv_!!6000000003284-73-tps-128-128.ico", - "name": "AIEarth", - "en_name": "Aliyun AIEarth", - "description": "阿里云地球引擎,提供强大的地理信息处理和可视化服务。", - "en_description": "Aliyun AIEarth, providing powerful geospatial processing and visualization services.", - "site_url": "https://engine-aiearth.aliyun.com/#/", - "order": 7, - "tags": ["Cloud Computing", "Geospatial Processing", "Visualization"] - }, - { - "icon": "https://online.geovisearth.com/favicon.ico", - "name": "星球地图", - "en_name": "GeoVis Earth Online Browser", - "description": "GeoVis Earth 在线浏览器,提供强大的地理可视化服务。", - "en_description": "GeoVis Earth Online Browser, providing powerful geospatial visualization services.", - "site_url": "https://online.geovisearth.com/browser", - "order": 8, - "tags": ["Geospatial Visualization", "Maps", "Online Browser"] - }, - { - "icon": "https://senseearth-cloud.com/favicon.ico", - "name": "SenseEarth Cloud", - "en_name": "SenseEarth Cloud", - "description": "SenseEarth Cloud 提供先进的地球观测数据处理和分析服务。", - "en_description": "SenseEarth Cloud offers advanced Earth observation data processing and analysis services.", - "site_url": "https://senseearth-cloud.com/", - "order": 9, - "tags": ["Earth Observation", "Data Processing", "Analysis", "Cloud Services"] - }, - { - "icon": "https://engine.piesat.cn/favicon.ico", - "name": "PIESAT Engine", - "en_name": "PIESAT Engine", - "description": "PIESAT Engine 提供全球卫星影像数据服务与应用解决方案。", - "en_description": "PIESAT Engine offers global satellite imagery data services and application solutions.", - "site_url": "https://engine.piesat.cn/", - "order": 10, - "tags": ["Satellite Imagery", "Data Services", "Geospatial Applications"] - } - - - - - ] - + icon: 'icon-yaogancehui', + name: '遥感平台', + en_name: 'RS Platform', + order: 2, + children: [ + // gee + { + icon: 'https://earthengine.google.com/static/images/150dpi/Satellite_150dpi.png', + name: 'Google Earth Engine', + en_name: 'Google Earth Engine', + description: 'Google Earth Engine', + en_description: 'Google Earth Engine', + site_url: 'https://earthengine.google.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + }, + { + icon: 'https://img.alicdn.com/imgextra/i4/O1CN01KsDwjf1a87SCHK9Kv_!!6000000003284-73-tps-128-128.ico', + name: 'AIEarth', + en_name: 'Aliyun AIEarth', + description: '阿里云地球引擎,提供强大的地理信息处理和可视化服务。', + en_description: + 'Aliyun AIEarth, providing powerful geospatial processing and visualization services.', + site_url: 'https://engine-aiearth.aliyun.com/#/', + order: 7, + tags: ['Cloud Computing', 'Geospatial Processing', 'Visualization'] + }, + { + icon: 'https://online.geovisearth.com/favicon.ico', + name: '星球地图', + en_name: 'GeoVis Earth Online Browser', + description: 'GeoVis Earth 在线浏览器,提供强大的地理可视化服务。', + en_description: + 'GeoVis Earth Online Browser, providing powerful geospatial visualization services.', + site_url: 'https://online.geovisearth.com/browser', + order: 8, + tags: ['Geospatial Visualization', 'Maps', 'Online Browser'] + }, + { + icon: 'https://senseearth-cloud.com/favicon.ico', + name: 'SenseEarth Cloud', + en_name: 'SenseEarth Cloud', + description: 'SenseEarth Cloud 提供先进的地球观测数据处理和分析服务。', + en_description: + 'SenseEarth Cloud offers advanced Earth observation data processing and analysis services.', + site_url: 'https://senseearth-cloud.com/', + order: 9, + tags: [ + 'Earth Observation', + 'Data Processing', + 'Analysis', + 'Cloud Services' + ] + }, + { + icon: 'https://engine.piesat.cn/favicon.ico', + name: 'PIESAT Engine', + en_name: 'PIESAT Engine', + description: 'PIESAT Engine 提供全球卫星影像数据服务与应用解决方案。', + en_description: + 'PIESAT Engine offers global satellite imagery data services and application solutions.', + site_url: 'https://engine.piesat.cn/', + order: 10, + tags: ['Satellite Imagery', 'Data Services', 'Geospatial Applications'] + } + ] } diff --git a/src/data/sites/main/groups/visualization.ts b/src/data/sites/main/groups/visualization.ts index d321835..24fe748 100644 --- a/src/data/sites/main/groups/visualization.ts +++ b/src/data/sites/main/groups/visualization.ts @@ -1,29 +1,34 @@ // 数据可视化 import { IGroup } from '../../../types' export const Visulization: IGroup = { - icon: 'icon-shujukeshihua1', - name: '数据可视化', - en_name: 'Coord', - order: 1, - children: [{ - icon: "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*WCVLT5Dp5oYAAAAAAAAAAAAADmJ7AQ/original", - name: "L7VP", - en_name: "L7VP", - description: "下一代地理空间智能可视分析工具和应用研发平台,具有丰富的可视化效果提供洞察分析、地图应用搭建工具、开放扩展能力", - en_description: "The next generation of geospatial intelligent visual analysis tools and application development platforms, with rich visualization effectsProvide insight analysis, map application building tools, and open expansion capabilities", - site_url: "https://li.antv.antgroup.com", - order: 2, - tags: ["GIS", "Web", "Data"], - }, + icon: 'icon-shujukeshihua1', + name: '数据可视化', + en_name: 'Coord', + order: 1, + children: [ { - icon: "https://kepler.gl/favicon.png", - name: "kepler.gl", - en_name: "kepler.gl", - description: "kepler.gl是一个基于React的开源地理空间分析工具,用于创建大规模、可交互的地理信息可视化应用", - en_description: "kepler.gl is an open source geospatial analysis tool based on React, used to create large-scale, interactive geospatial visualization applications", - site_url: "https://kepler.gl/", - order: 2, - tags: ["GIS", "Web", "Data"], + icon: 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*WCVLT5Dp5oYAAAAAAAAAAAAADmJ7AQ/original', + name: 'L7VP', + en_name: 'L7VP', + description: + '下一代地理空间智能可视分析工具和应用研发平台,具有丰富的可视化效果提供洞察分析、地图应用搭建工具、开放扩展能力', + en_description: + 'The next generation of geospatial intelligent visual analysis tools and application development platforms, with rich visualization effectsProvide insight analysis, map application building tools, and open expansion capabilities', + site_url: 'https://li.antv.antgroup.com', + order: 2, + tags: ['GIS', 'Web', 'Data'] }, -] + { + icon: 'https://kepler.gl/favicon.png', + name: 'kepler.gl', + en_name: 'kepler.gl', + description: + 'kepler.gl是一个基于React的开源地理空间分析工具,用于创建大规模、可交互的地理信息可视化应用', + en_description: + 'kepler.gl is an open source geospatial analysis tool based on React, used to create large-scale, interactive geospatial visualization applications', + site_url: 'https://kepler.gl/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + } + ] } diff --git a/src/data/sites/main/groups/weather.ts b/src/data/sites/main/groups/weather.ts index e8d828c..f0f50e2 100644 --- a/src/data/sites/main/groups/weather.ts +++ b/src/data/sites/main/groups/weather.ts @@ -1,21 +1,19 @@ import { IGroup } from '../../../types' export const MapColor: IGroup = { - icon: '', - name: '天气', - en_name: 'map color', - order: 2, - children: [ - { - icon: "https://www.windy.com/favicon.ico", - name: "Windy", - en_name: "Windy", - description: "全球天气预报", - en_description: "Global weather forecast", - site_url: "https://www.windy.com/", - order: 2, - tags: ["GIS", "Web", "Data"], - }, - - ] - + icon: '', + name: '天气', + en_name: 'map color', + order: 2, + children: [ + { + icon: 'https://www.windy.com/favicon.ico', + name: 'Windy', + en_name: 'Windy', + description: '全球天气预报', + en_description: 'Global weather forecast', + site_url: 'https://www.windy.com/', + order: 2, + tags: ['GIS', 'Web', 'Data'] + } + ] } diff --git a/src/data/sites/main/index.ts b/src/data/sites/main/index.ts index a836a0b..8cfd9bc 100644 --- a/src/data/sites/main/index.ts +++ b/src/data/sites/main/index.ts @@ -1,33 +1,32 @@ -import { ISiteConfig } from "../../types"; -import { MapColor } from "./groups/color_map"; -import { CoordConvert } from "./groups/coord_convert"; -import { DataCollaboration } from "./groups/data_collaboration"; -import { DataEdit } from "./groups/data_edit"; -import { DataFormatConvert } from "./groups/data_format_convert"; -import { DataProcess } from "./groups/data_process"; -import { DataSource } from "./groups/data_source"; -import { GeoCoding } from "./groups/geocoding"; -import { OnlineMap } from "./groups/onlinemap"; -import { RSPlatform } from "./groups/rs_platform"; - -import { Visulization } from "./groups/visualization"; - - +import { ISiteConfig } from '../../types' +import { MapColor } from './groups/color_map' +import { CoordConvert } from './groups/coord_convert' +import { DataCollaboration } from './groups/data_collaboration' +import { DataEdit } from './groups/data_edit' +import { DataFormatConvert } from './groups/data_format_convert' +import { DataProcess } from './groups/data_process' +import { DataSource } from './groups/data_source' +import { GeoCoding } from './groups/geocoding' +import { OnlineMap } from './groups/onlinemap' +import { RSPlatform } from './groups/rs_platform' +import { GeospatialAnalysis } from './groups/geospatial_analysis' +import { Visulization } from './groups/visualization' export const MainConfig: ISiteConfig = { - name: "主站", - en_name: "main", - groups: [ - DataEdit, - DataProcess, - DataFormatConvert, - CoordConvert, - Visulization, - MapColor, - DataCollaboration, - OnlineMap, - GeoCoding, - DataSource, - RSPlatform - ].sort((a, b) => a.order - b.order), -}; + name: '主站', + en_name: 'main', + groups: [ + DataEdit, + DataProcess, + DataFormatConvert, + CoordConvert, + Visulization, + MapColor, + DataCollaboration, + OnlineMap, + GeoCoding, + DataSource, + RSPlatform, + GeospatialAnalysis + ].sort((a, b) => a.order - b.order) +} diff --git a/src/data/sites/tech/groups/3d_tiles.ts b/src/data/sites/tech/groups/3d_tiles.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/3d_tiles.ts +++ b/src/data/sites/tech/groups/3d_tiles.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/comand_tools.ts b/src/data/sites/tech/groups/comand_tools.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/comand_tools.ts +++ b/src/data/sites/tech/groups/comand_tools.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/data_spec.ts b/src/data/sites/tech/groups/data_spec.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/data_spec.ts +++ b/src/data/sites/tech/groups/data_spec.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/frontEnd_tool.ts b/src/data/sites/tech/groups/frontEnd_tool.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/frontEnd_tool.ts +++ b/src/data/sites/tech/groups/frontEnd_tool.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/map_server.ts b/src/data/sites/tech/groups/map_server.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/map_server.ts +++ b/src/data/sites/tech/groups/map_server.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/map_vis_lib.ts b/src/data/sites/tech/groups/map_vis_lib.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/map_vis_lib.ts +++ b/src/data/sites/tech/groups/map_vis_lib.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/render_enigne.ts b/src/data/sites/tech/groups/render_enigne.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/render_enigne.ts +++ b/src/data/sites/tech/groups/render_enigne.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/spatial_database.ts b/src/data/sites/tech/groups/spatial_database.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/spatial_database.ts +++ b/src/data/sites/tech/groups/spatial_database.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/groups/vector_tile.ts b/src/data/sites/tech/groups/vector_tile.ts index 3e1d178..e262ee8 100644 --- a/src/data/sites/tech/groups/vector_tile.ts +++ b/src/data/sites/tech/groups/vector_tile.ts @@ -1,9 +1,8 @@ import { IGroup } from '../../../types' export const GeoCoding: IGroup = { - icon: '', - name: '地理编码', - en_name: 'geocoding', - order: 2, - children: [] - + icon: '', + name: '地理编码', + en_name: 'geocoding', + order: 2, + children: [] } diff --git a/src/data/sites/tech/index.ts b/src/data/sites/tech/index.ts index 19bf68e..b2f2682 100644 --- a/src/data/sites/tech/index.ts +++ b/src/data/sites/tech/index.ts @@ -1,7 +1,6 @@ -import { ISiteConfig } from "../../types"; +import { ISiteConfig } from '../../types' export const Tech: ISiteConfig = { - name: "技术方案", - en_name: "tech", - groups: [ - ] -}; + name: '技术方案', + en_name: 'tech', + groups: [] +} diff --git a/src/data/types.ts b/src/data/types.ts index 6db7f4e..b6231f4 100644 --- a/src/data/types.ts +++ b/src/data/types.ts @@ -1,29 +1,29 @@ -export type toolsType = "tool" | "data" | "tool" | "DataBase" | "Map Server"; +export type toolsType = 'tool' | 'data' | 'tool' | 'DataBase' | 'Map Server' export interface IItem { - icon: string; - name: string; - en_name: string; - description: string; - en_description: string; - site_url?: string; - tags: string[]; - github?: string; - order?: number; - favorite?: boolean; + icon: string + name: string + en_name: string + description: string + en_description: string + site_url?: string + tags: string[] + github?: string + order?: number + favorite?: boolean } export interface IGroup { - icon?: any; - name: string; - en_name: string; - order: number; - children: IItem[]; + icon?: any + name: string + en_name: string + order: number + children: IItem[] } export interface IConfig { - [key: string]: IGroup; + [key: string]: IGroup } export interface ISiteConfig { - name:string; - en_name:string; - groups: IGroup[]; -} \ No newline at end of file + name: string + en_name: string + groups: IGroup[] +} diff --git a/src/index.tsx b/src/index.tsx index 032464f..1cc146d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,19 +1,17 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; +import React from 'react' +import ReactDOM from 'react-dom/client' +import './index.css' +import App from './App' +import reportWebVitals from './reportWebVitals' -const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement -); +const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement) root.render( -); +) // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); +reportWebVitals() diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts index 49a2a16..57a24a2 100644 --- a/src/reportWebVitals.ts +++ b/src/reportWebVitals.ts @@ -1,15 +1,15 @@ -import { ReportHandler } from 'web-vitals'; +import { ReportHandler } from 'web-vitals' const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); + getCLS(onPerfEntry) + getFID(onPerfEntry) + getFCP(onPerfEntry) + getLCP(onPerfEntry) + getTTFB(onPerfEntry) + }) } -}; +} -export default reportWebVitals; +export default reportWebVitals diff --git a/src/setupTests.ts b/src/setupTests.ts index 8f2609b..52aaef1 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -2,4 +2,4 @@ // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; +import '@testing-library/jest-dom' diff --git a/tsconfig.json b/tsconfig.json index a273b0c..9d379a3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, @@ -20,7 +16,5 @@ "noEmit": true, "jsx": "react-jsx" }, - "include": [ - "src" - ] + "include": ["src"] }