├── .env.development
├── .github
└── workflows
│ └── build.yml
├── .gitignore
├── .gitlab-ci.yml
├── README.md
├── config-overrides.js
├── package.json
├── public
├── favicon.svg
├── index.html
├── manifest.json
└── static
│ ├── config.json
│ └── isoLinks.json
├── src
├── App.css
├── App.js
├── App.test.js
├── assets
│ └── .gitkeep
├── components
│ ├── docPage
│ │ ├── doc
│ │ │ ├── docTemplate.css
│ │ │ ├── docTemplate.js
│ │ │ ├── js
│ │ │ │ ├── CTAN.js
│ │ │ │ ├── alpine.js
│ │ │ │ ├── anaconda.js
│ │ │ │ ├── archlinux.js
│ │ │ │ ├── archlinuxcn.js
│ │ │ │ ├── blackarch.js
│ │ │ │ ├── centos.js
│ │ │ │ ├── crates.io-index.git.js
│ │ │ │ ├── debian.js
│ │ │ │ ├── deepin.js
│ │ │ │ ├── docHome.js
│ │ │ │ ├── gentoo.js
│ │ │ │ ├── kali.js
│ │ │ │ ├── pypi.js
│ │ │ │ ├── rubygems.js
│ │ │ │ ├── termux.js
│ │ │ │ ├── ubuntu-ports.js
│ │ │ │ └── ubuntu.js
│ │ │ └── markdown
│ │ │ │ ├── CTAN.md
│ │ │ │ ├── alpine.md
│ │ │ │ ├── anaconda.md
│ │ │ │ ├── archlinux.md
│ │ │ │ ├── archlinuxcn.md
│ │ │ │ ├── blackarch.md
│ │ │ │ ├── centos.md
│ │ │ │ ├── crates.io-index.git.md
│ │ │ │ ├── debian.md
│ │ │ │ ├── deepin.md
│ │ │ │ ├── docHome.md
│ │ │ │ ├── gentoo.md
│ │ │ │ ├── kali.md
│ │ │ │ ├── pypi.md
│ │ │ │ ├── rubygems.md
│ │ │ │ ├── termux.md
│ │ │ │ ├── ubuntu-ports.md
│ │ │ │ └── ubuntu.md
│ │ ├── docPage.css
│ │ ├── docPage.js
│ │ └── menu.json
│ └── homePage
│ │ ├── homePage.css
│ │ ├── homePage.js
│ │ └── sideCards
│ │ ├── configGeneratorCard.css
│ │ ├── configGeneratorCard.js
│ │ ├── downloadFormCard.js
│ │ ├── helpCard.js
│ │ ├── sideCards.css
│ │ └── sideCards.js
├── index.css
└── index.js
└── yarn.lock
/.env.development:
--------------------------------------------------------------------------------
1 | REACT_APP_SITE_TITLE=哈尔滨工业大学开源镜像站
2 | REACT_APP_ORG_NAME=哈尔滨工业大学Linux用户协会
3 | REACT_APP_ORG_LINK=https://github.com/hitlug
4 | REACT_APP_SPONSOR_NAME=哈尔滨工业大学网络与信息中心
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | name: Page Build
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v4
11 | - uses: actions/setup-node@v4
12 | with:
13 | node-version: '20'
14 | check-latest: true
15 | cache: yarn
16 | cache-dependency-path: yarn.lock
17 | - name: Install Node.js dependencies
18 | run: yarn install
19 | - name: Page Build
20 | env:
21 | REACT_APP_SITE_TITLE: 哈尔滨工业大学开源镜像站
22 | REACT_APP_ORG_NAME: 哈尔滨工业大学Linux用户协会
23 | REACT_APP_ORG_LINK: https://github.com/hitlug
24 | REACT_APP_SPONSOR_NAME: 哈尔滨工业大学网络与信息中心
25 | GENERATE_SOURCEMAP: false
26 | run: yarn build
27 | - name: Upload Artifact
28 | uses: actions/upload-artifact@v4
29 | with:
30 | name: Production Build
31 | path: build
32 | buildsz:
33 | name: Page Build(深圳)
34 | runs-on: ubuntu-latest
35 | steps:
36 | - uses: actions/checkout@v4
37 | - uses: actions/setup-node@v4
38 | with:
39 | node-version: '20'
40 | check-latest: true
41 | cache: yarn
42 | cache-dependency-path: yarn.lock
43 | - name: Install Node.js dependencies
44 | run: yarn install
45 | - name: Page Build
46 | env:
47 | REACT_APP_SITE_TITLE: 哈尔滨工业大学(深圳)开源镜像站
48 | REACT_APP_ORG_NAME: 哈尔滨工业大学(深圳)计算机研究协会
49 | REACT_APP_ORG_LINK: https://github.com/hitszcra
50 | REACT_APP_SPONSOR_NAME: 哈尔滨工业大学(深圳)实验与创新实践中心
51 | GENERATE_SOURCEMAP: false
52 | run: yarn build
53 | - name: Upload Artifact
54 | uses: actions/upload-artifact@v4
55 | with:
56 | name: Production Build(深圳)
57 | path: build
58 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | default:
2 | image: node:16
3 |
4 | build:
5 | stage: build
6 |
7 | variables:
8 | REACT_APP_SITE_TITLE: 哈尔滨工业大学开源镜像站
9 | REACT_APP_ORG_NAME: 哈尔滨工业大学Linux用户协会
10 | REACT_APP_ORG_LINK: https://github.com/hitlug
11 | REACT_APP_SPONSOR_NAME: 哈尔滨工业大学网络与信息中心
12 | GENERATE_SOURCEMAP: "false"
13 |
14 | cache:
15 | - key:
16 | files:
17 | - yarn.lock
18 | paths:
19 | - .yarn-cache/
20 |
21 | script:
22 | - yarn install --cache-folder .yarn-cache
23 | - yarn build
24 |
25 | artifacts:
26 | paths:
27 | - build
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 哈尔滨工业大学开源镜像站主页
2 |
3 | 本页面使用 create-react-app 和 ant design 构建。
4 |
--------------------------------------------------------------------------------
/config-overrides.js:
--------------------------------------------------------------------------------
1 | const {
2 | override,
3 | removeModuleScopePlugin,
4 | addWebpackPlugin
5 | } = require("customize-cra");
6 |
7 | const copyWebpackPlugin = require("copy-webpack-plugin");
8 |
9 | module.exports = override(
10 | removeModuleScopePlugin(),
11 | addWebpackPlugin(
12 | new copyWebpackPlugin({
13 | patterns: ["./public/manifest.json"].map(file => ({
14 | from: file,
15 | transform: content => {
16 | return Object.entries(process.env).reduce((text, [key, value]) => {
17 | let re = new RegExp(`%${key}%`, "g");
18 | return text.replace(re, value);
19 | }, content.toString());
20 | },
21 | noErrorOnMissing: true
22 | }))
23 | })
24 | )
25 | );
26 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mirrors-web",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@ant-design/icons": "^5.5.2",
7 | "@mapbox/rehype-prism": "^0.9.0",
8 | "antd": "^5.22.5",
9 | "axios": "^1.8.2",
10 | "copy-webpack-plugin": "^12.0.2",
11 | "prismjs": "^1.30.0",
12 | "prop-types": "^15.7.2",
13 | "react": "^18.2.0",
14 | "react-copy-to-clipboard": "^5.1.0",
15 | "react-dom": "^18.2.0",
16 | "react-markdown": "^9.0.1",
17 | "react-router-dom": "^7.0.2",
18 | "react-scripts": "^5.0.1",
19 | "remark-gfm": "^4.0.0"
20 | },
21 | "scripts": {
22 | "start": "react-app-rewired start",
23 | "build": "react-app-rewired build",
24 | "test": "react-app-rewired test --env=jsdom",
25 | "eject": "react-scripts eject",
26 | "precommit": "pretty-quick --staged"
27 | },
28 | "devDependencies": {
29 | "babel-plugin-import": "^1.8.3",
30 | "customize-cra": "^1.0.0",
31 | "eslint-plugin-prettier": "^5.2.1",
32 | "husky": "^9.1.7",
33 | "prettier": "^3.4.2",
34 | "pretty-quick": "^4.0.0",
35 | "react-app-rewired": "^2.1.8"
36 | },
37 | "browserslist": {
38 | "production": [
39 | ">0.2%",
40 | "not dead",
41 | "not op_mini all"
42 | ],
43 | "development": [
44 | "last 2 chrome version",
45 | "last 2 firefox version",
46 | "last 2 safari version"
47 | ]
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/public/favicon.svg:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | %REACT_APP_SITE_TITLE%
23 |
24 |
25 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "%REACT_APP_SITE_TITLE%",
3 | "name": "%REACT_APP_SITE_TITLE%",
4 | "icons": [
5 | {
6 | "src": "favicon.svg",
7 | "sizes": "1024x1024",
8 | "type": "image/svg"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/public/static/config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "label": "Ubuntu",
4 | "value": "ubuntu",
5 | "children": [
6 | {
7 | "label": "22.04",
8 | "value": "jammy"
9 | },
10 | {
11 | "label": "21.10",
12 | "value": "impish"
13 | },
14 | {
15 | "label": "21.04",
16 | "value": "hirsute"
17 | },
18 | {
19 | "label": "20.04 LTS",
20 | "value": "focal"
21 | },
22 | {
23 | "label": "18.04 LTS",
24 | "value": "bionic"
25 | },
26 | {
27 | "label": "16.04 LTS",
28 | "value": "xenial"
29 | },
30 | {
31 | "label": "14.04 LTS",
32 | "value": "trusty"
33 | }
34 | ]
35 | },
36 | {
37 | "label": "Debian",
38 | "value": "debian",
39 | "children": [
40 | {
41 | "label": "11 bullseye",
42 | "value": "bullseye"
43 | },
44 | {
45 | "label": "10 buster",
46 | "value": "buster"
47 | },
48 | {
49 | "label": "9 stretch",
50 | "value": "stretch"
51 | },
52 | {
53 | "label": "8 jessie",
54 | "value": "jessie"
55 | }
56 | ]
57 | },
58 | {
59 | "label": "Ubuntu-ports",
60 | "value": "ubuntu-ports",
61 | "children": [
62 | {
63 | "label": "22.04",
64 | "value": "jammy"
65 | },
66 | {
67 | "label": "21.10",
68 | "value": "impish"
69 | },
70 | {
71 | "label": "21.04",
72 | "value": "hirsute"
73 | },
74 | {
75 | "label": "20.04 LTS",
76 | "value": "focal"
77 | },
78 | {
79 | "label": "18.04 LTS",
80 | "value": "bionic"
81 | },
82 | {
83 | "label": "16.04 LTS",
84 | "value": "xenial"
85 | },
86 | {
87 | "label": "14.04 LTS",
88 | "value": "trusty"
89 | }
90 | ]
91 | },
92 | {
93 | "label": "Archlinux",
94 | "value": "archlinux",
95 | "children": [
96 | {
97 | "label": "archlinux",
98 | "value": "archlinux"
99 | }
100 | ]
101 | },
102 | {
103 | "label": "CentOS",
104 | "value": "centos",
105 | "children": [
106 | {
107 | "label": "CentOS 6",
108 | "value": 6
109 | },
110 | {
111 | "label": "CentOS 7",
112 | "value": 7
113 | },
114 | {
115 | "label": "CentOS 8",
116 | "value": 8
117 | }
118 | ]
119 | },
120 | {
121 | "label": "Alpine",
122 | "value": "alpine",
123 | "children": [
124 | {
125 | "label": "V3.15",
126 | "value": "3.15"
127 | },
128 | {
129 | "label": "V3.14",
130 | "value": "3.14"
131 | },
132 | {
133 | "label": "V3.13",
134 | "value": "3.13"
135 | },
136 | {
137 | "label": "V3.12",
138 | "value": "3.12"
139 | },
140 | {
141 | "label": "V3.11",
142 | "value": "3.11"
143 | },
144 | {
145 | "label": "V3.10",
146 | "value": "3.10"
147 | },
148 | {
149 | "label": "V3.9",
150 | "value": "3.9"
151 | },
152 | {
153 | "label": "V3.8",
154 | "value": "3.8"
155 | },
156 | {
157 | "label": "V3.7",
158 | "value": "3.7"
159 | },
160 | {
161 | "label": "V3.6",
162 | "value": "3.6"
163 | },
164 | {
165 | "label": "V3.5",
166 | "value": "3.5"
167 | },
168 | {
169 | "label": "V3.4",
170 | "value": "3.4"
171 | },
172 | {
173 | "label": "V3.3",
174 | "value": "3.3"
175 | },
176 | {
177 | "label": "V3.2",
178 | "value": "3.2"
179 | },
180 | {
181 | "label": "V3.1",
182 | "value": "3.1"
183 | },
184 | {
185 | "label": "V3.0",
186 | "value": "3.0"
187 | }
188 | ]
189 | },
190 | {
191 | "label": "openSUSE",
192 | "value": "opensuse",
193 | "children": [
194 | {
195 | "label": "Leap 15.2-",
196 | "value": "Leap 15.2-"
197 | },
198 | {
199 | "label": "Leap 15.3+",
200 | "value": "Leap 15.3+"
201 | },
202 | {
203 | "label": "Tumbleweed",
204 | "value": "Tumbleweed"
205 | }
206 | ]
207 | }
208 | ]
209 |
--------------------------------------------------------------------------------
/public/static/isoLinks.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "value": "Arch Linux",
4 | "label": "Arch Linux",
5 | "children": [
6 | {
7 | "label": "2020.12.01 (x86_64, CLI-only)",
8 | "value": "/archlinux/iso/latest/archlinux-2020.12.01-x86_64.iso"
9 | }
10 | ]
11 | },
12 | {
13 | "value": "Debian",
14 | "label": "Debian",
15 | "children": [
16 | {
17 | "label": "10.7.0 (amd64, CD installer with xfce)",
18 | "value": "/debian-cd/current/amd64/iso-cd/debian-10.7.0-amd64-xfce-CD-1.iso"
19 | },
20 | {
21 | "label": "10.7.0 (i386, CD installer with xfce)",
22 | "value": "/debian-cd/current/i386/iso-cd/debian-10.7.0-i386-xfce-CD-1.iso"
23 | },
24 | {
25 | "label": "10.7.0 (amd64, Network installer)",
26 | "value": "/debian-cd/current/amd64/iso-cd/debian-10.7.0-amd64-netinst.iso"
27 | },
28 | {
29 | "label": "10.7.0 (i386, Network installer)",
30 | "value": "/debian-cd/current/i386/iso-cd/debian-10.7.0-i386-netinst.iso"
31 | },
32 | {
33 | "label": "10.7.0 (amd64, DVD installer (Part 3))",
34 | "value": "/debian-cd/current/amd64/iso-dvd/debian-10.7.0-amd64-DVD-3.iso"
35 | },
36 | {
37 | "label": "10.7.0 (amd64, DVD installer (Part 2))",
38 | "value": "/debian-cd/current/amd64/iso-dvd/debian-10.7.0-amd64-DVD-2.iso"
39 | },
40 | {
41 | "label": "10.7.0 (amd64, DVD installer (Part 1))",
42 | "value": "/debian-cd/current/amd64/iso-dvd/debian-10.7.0-amd64-DVD-1.iso"
43 | },
44 | {
45 | "label": "10.7.0 (i386, DVD installer (Part 3))",
46 | "value": "/debian-cd/current/i386/iso-dvd/debian-10.7.0-i386-DVD-3.iso"
47 | },
48 | {
49 | "label": "10.7.0 (i386, DVD installer (Part 2))",
50 | "value": "/debian-cd/current/i386/iso-dvd/debian-10.7.0-i386-DVD-2.iso"
51 | },
52 | {
53 | "label": "10.7.0 (i386, DVD installer (Part 1))",
54 | "value": "/debian-cd/current/i386/iso-dvd/debian-10.7.0-i386-DVD-1.iso"
55 | },
56 | {
57 | "label": "10.7.0 (amd64, Live CD with xfce)",
58 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-xfce.iso"
59 | },
60 | {
61 | "label": "10.7.0 (amd64, Live CD with standard)",
62 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-standard.iso"
63 | },
64 | {
65 | "label": "10.7.0 (amd64, Live CD with mate)",
66 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-mate.iso"
67 | },
68 | {
69 | "label": "10.7.0 (amd64, Live CD with lxqt)",
70 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-lxqt.iso"
71 | },
72 | {
73 | "label": "10.7.0 (amd64, Live CD with lxde)",
74 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-lxde.iso"
75 | },
76 | {
77 | "label": "10.7.0 (amd64, Live CD with kde)",
78 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-kde.iso"
79 | },
80 | {
81 | "label": "10.7.0 (amd64, Live CD with gnome)",
82 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-gnome.iso"
83 | },
84 | {
85 | "label": "10.7.0 (amd64, Live CD with cinnamon)",
86 | "value": "/debian-cd/current-live/amd64/iso-hybrid/debian-live-10.7.0-amd64-cinnamon.iso"
87 | },
88 | {
89 | "label": "10.7.0 (i386, Live CD with xfce)",
90 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-xfce.iso"
91 | },
92 | {
93 | "label": "10.7.0 (i386, Live CD with standard)",
94 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-standard.iso"
95 | },
96 | {
97 | "label": "10.7.0 (i386, Live CD with mate)",
98 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-mate.iso"
99 | },
100 | {
101 | "label": "10.7.0 (i386, Live CD with lxqt)",
102 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-lxqt.iso"
103 | },
104 | {
105 | "label": "10.7.0 (i386, Live CD with lxde)",
106 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-lxde.iso"
107 | },
108 | {
109 | "label": "10.7.0 (i386, Live CD with kde)",
110 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-kde.iso"
111 | },
112 | {
113 | "label": "10.7.0 (i386, Live CD with gnome)",
114 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-gnome.iso"
115 | },
116 | {
117 | "label": "10.7.0 (i386, Live CD with cinnamon)",
118 | "value": "/debian-cd/current-live/i386/iso-hybrid/debian-live-10.7.0-i386-cinnamon.iso"
119 | }
120 | ]
121 | },
122 | {
123 | "value": "CentOS",
124 | "label": "CentOS",
125 | "children": [
126 | {
127 | "label": "8.3.2011 (x86_64, dvd1)",
128 | "value": "/centos/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso"
129 | },
130 | {
131 | "label": "8.3.2011 (x86_64, boot)",
132 | "value": "/centos/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-boot.iso"
133 | },
134 | {
135 | "label": "8.3.2011 (ppc64le, dvd1)",
136 | "value": "/centos/8.3.2011/isos/ppc64le/CentOS-8.3.2011-ppc64le-dvd1.iso"
137 | },
138 | {
139 | "label": "8.3.2011 (aarch64, dvd1)",
140 | "value": "/centos/8.3.2011/isos/aarch64/CentOS-8.3.2011-aarch64-dvd1.iso"
141 | },
142 | {
143 | "label": "8.3.2011 (ppc64le, boot)",
144 | "value": "/centos/8.3.2011/isos/ppc64le/CentOS-8.3.2011-ppc64le-boot.iso"
145 | },
146 | {
147 | "label": "8.3.2011 (aarch64, boot)",
148 | "value": "/centos/8.3.2011/isos/aarch64/CentOS-8.3.2011-aarch64-boot.iso"
149 | },
150 | {
151 | "label": "8.2.2004 (x86_64, minimal)",
152 | "value": "/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-minimal.iso"
153 | },
154 | {
155 | "label": "8.2.2004 (x86_64, dvd1)",
156 | "value": "/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-dvd1.iso"
157 | },
158 | {
159 | "label": "8.2.2004 (x86_64, boot)",
160 | "value": "/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-boot.iso"
161 | },
162 | {
163 | "label": "8.2.2004 (ppc64le, minimal)",
164 | "value": "/centos/8.2.2004/isos/ppc64le/CentOS-8.2.2004-ppc64le-minimal.iso"
165 | },
166 | {
167 | "label": "8.2.2004 (aarch64, minimal)",
168 | "value": "/centos/8.2.2004/isos/aarch64/CentOS-8.2.2004-aarch64-minimal.iso"
169 | },
170 | {
171 | "label": "8.2.2004 (ppc64le, dvd1)",
172 | "value": "/centos/8.2.2004/isos/ppc64le/CentOS-8.2.2004-ppc64le-dvd1.iso"
173 | },
174 | {
175 | "label": "8.2.2004 (aarch64, dvd1)",
176 | "value": "/centos/8.2.2004/isos/aarch64/CentOS-8.2.2004-aarch64-dvd1.iso"
177 | },
178 | {
179 | "label": "8.2.2004 (ppc64le, boot)",
180 | "value": "/centos/8.2.2004/isos/ppc64le/CentOS-8.2.2004-ppc64le-boot.iso"
181 | },
182 | {
183 | "label": "8.2.2004 (aarch64, boot)",
184 | "value": "/centos/8.2.2004/isos/aarch64/CentOS-8.2.2004-aarch64-boot.iso"
185 | },
186 | {
187 | "label": "7 (x86_64, NetInstall)",
188 | "value": "/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-NetInstall-2009.iso"
189 | },
190 | {
191 | "label": "7 (x86_64, Minimal)",
192 | "value": "/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso"
193 | },
194 | {
195 | "label": "7 (x86_64, Everything)",
196 | "value": "/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Everything-2009.iso"
197 | },
198 | {
199 | "label": "7 (x86_64, DVD)",
200 | "value": "/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2009.iso"
201 | }
202 | ]
203 | },
204 | {
205 | "value": "Ubuntu",
206 | "label": "Ubuntu",
207 | "children": [
208 | {
209 | "label": "20.10 (amd64, Desktop LiveDVD)",
210 | "value": "/ubuntu-releases/groovy/ubuntu-20.10-desktop-amd64.iso"
211 | },
212 | {
213 | "label": "20.04.1 (amd64, Desktop LiveDVD)",
214 | "value": "/ubuntu-releases/focal/ubuntu-20.04.1-desktop-amd64.iso"
215 | },
216 | {
217 | "label": "18.04.5 (amd64, Desktop LiveDVD)",
218 | "value": "/ubuntu-releases/bionic/ubuntu-18.04.5-desktop-amd64.iso"
219 | },
220 | {
221 | "label": "16.04.7 (amd64, Desktop LiveDVD)",
222 | "value": "/ubuntu-releases/xenial/ubuntu-16.04.7-desktop-amd64.iso"
223 | },
224 | {
225 | "label": "16.04.6 (i386, Desktop LiveDVD)",
226 | "value": "/ubuntu-releases/xenial/ubuntu-16.04.6-desktop-i386.iso"
227 | },
228 | {
229 | "label": "20.10 (amd64, Server)",
230 | "value": "/ubuntu-releases/groovy/ubuntu-20.10-live-server-amd64.iso"
231 | },
232 | {
233 | "label": "20.04.1 (amd64, Server)",
234 | "value": "/ubuntu-releases/focal/ubuntu-20.04.1-live-server-amd64.iso"
235 | },
236 | {
237 | "label": "18.04.5 (amd64, Server)",
238 | "value": "/ubuntu-releases/bionic/ubuntu-18.04.5-live-server-amd64.iso"
239 | },
240 | {
241 | "label": "16.04.7 (amd64, Server)",
242 | "value": "/ubuntu-releases/xenial/ubuntu-16.04.7-server-amd64.iso"
243 | },
244 | {
245 | "label": "16.04.6 (i386, Server)",
246 | "value": "/ubuntu-releases/xenial/ubuntu-16.04.6-server-i386.iso"
247 | },
248 | {
249 | "label": "14.04.6 (amd64, Server)",
250 | "value": "/ubuntu-releases/trusty/ubuntu-14.04.6-server-amd64.iso"
251 | },
252 | {
253 | "label": "14.04.6 (i386, Server)",
254 | "value": "/ubuntu-releases/trusty/ubuntu-14.04.6-server-i386.iso"
255 | },
256 | {
257 | "label": "12.04.5 (amd64, Server)",
258 | "value": "/ubuntu-releases/precise/ubuntu-12.04.5-server-amd64.iso"
259 | },
260 | {
261 | "label": "12.04.5 (i386, Server)",
262 | "value": "/ubuntu-releases/precise/ubuntu-12.04.5-server-i386.iso"
263 | }
264 | ]
265 | },
266 | {
267 | "value": "Ubuntu \u884d\u751f\u7248",
268 | "label": "Ubuntu \u884d\u751f\u7248",
269 | "children": [
270 | {
271 | "label": "Ubuntu Kylin 20.10 (amd64)",
272 | "value": "/ubuntu-cdimage/ubuntukylin/releases/groovy/release/ubuntukylin-20.10-desktop-amd64.iso"
273 | },
274 | {
275 | "label": "Kubuntu 20.10 (amd64)",
276 | "value": "/ubuntu-cdimage/kubuntu/releases/groovy/release/kubuntu-20.10-desktop-amd64.iso"
277 | },
278 | {
279 | "label": "Lubuntu 20.10 (amd64)",
280 | "value": "/ubuntu-cdimage/lubuntu/releases/groovy/release/lubuntu-20.10-desktop-amd64.iso"
281 | },
282 | {
283 | "label": "Xubuntu 20.10 (amd64)",
284 | "value": "/ubuntu-cdimage/xubuntu/releases/groovy/release/xubuntu-20.10-desktop-amd64.iso"
285 | },
286 | {
287 | "label": "Ubuntu Gnome 16.04.5 (amd64)",
288 | "value": "/ubuntu-cdimage/ubuntu-gnome/releases/xenial/release/ubuntu-gnome-16.04.5-desktop-amd64.iso"
289 | },
290 | {
291 | "label": "Ubuntu Gnome 16.04.5 (i386)",
292 | "value": "/ubuntu-cdimage/ubuntu-gnome/releases/xenial/release/ubuntu-gnome-16.04.5-desktop-i386.iso"
293 | },
294 | {
295 | "label": "Ubuntu Mate 20.10 (amd64)",
296 | "value": "/ubuntu-cdimage/ubuntu-mate/releases/groovy/release/ubuntu-mate-20.10-desktop-amd64.iso"
297 | }
298 | ]
299 | },
300 | {
301 | "value": "Linux Mint",
302 | "label": "Linux Mint",
303 | "children": [
304 | {
305 | "label": "20 (64bit, xfce)",
306 | "value": "/linuxmint-cd/stable/20/linuxmint-20-xfce-64bit.iso"
307 | },
308 | {
309 | "label": "20 (64bit, mate)",
310 | "value": "/linuxmint-cd/stable/20/linuxmint-20-mate-64bit.iso"
311 | },
312 | {
313 | "label": "20 (64bit, cinnamon)",
314 | "value": "/linuxmint-cd/stable/20/linuxmint-20-cinnamon-64bit.iso"
315 | }
316 | ]
317 | },
318 | {
319 | "value": "Kali",
320 | "label": "Kali",
321 | "children": [
322 | {
323 | "label": "2020.4 (amd64, live)",
324 | "value": "/kali-images/current/kali-linux-2020.4-live-amd64.iso"
325 | },
326 | {
327 | "label": "2020.4 (amd64, installer-netinst)",
328 | "value": "/kali-images/current/kali-linux-2020.4-installer-netinst-amd64.iso"
329 | },
330 | {
331 | "label": "2020.4 (amd64, installer)",
332 | "value": "/kali-images/current/kali-linux-2020.4-installer-amd64.iso"
333 | },
334 | {
335 | "label": "2020.4 (i386, live)",
336 | "value": "/kali-images/current/kali-linux-2020.4-live-i386.iso"
337 | },
338 | {
339 | "label": "2020.4 (i386, installer-netinst)",
340 | "value": "/kali-images/current/kali-linux-2020.4-installer-netinst-i386.iso"
341 | },
342 | {
343 | "label": "2020.4 (i386, installer)",
344 | "value": "/kali-images/current/kali-linux-2020.4-installer-i386.iso"
345 | }
346 | ]
347 | },
348 | {
349 | "value": "TeX \u6392\u7248\u7cfb\u7edf",
350 | "label": "TeX \u6392\u7248\u7cfb\u7edf",
351 | "children": [
352 | {
353 | "label": "TeX Live 2020 (Windows & Linux)",
354 | "value": "/CTAN/systems/texlive/Images/texlive2020-20200406.iso"
355 | },
356 | {
357 | "label": "MacTeX 20200407 (macOS)",
358 | "value": "/CTAN/systems/mac/mactex/mactex-20200407.pkg"
359 | },
360 | {
361 | "label": "MikTeX 20.12 (Windows, x64)",
362 | "value": "/CTAN/systems/win32/miktex/setup/windows-x64/basic-miktex-20.12-x64.exe"
363 | },
364 | {
365 | "label": "MikTeX 20.12 (Windows)",
366 | "value": "/CTAN/systems/win32/miktex/setup/windows-x86/basic-miktex-20.12.exe"
367 | },
368 | {
369 | "label": "MikTeX 20.12 (macOS, x86_64)",
370 | "value": "/CTAN/systems/win32/miktex/setup/darwin-x86_64/miktex-20.12-darwin-x86_64.dmg"
371 | }
372 | ]
373 | },
374 | {
375 | "value": "Docker",
376 | "label": "Docker",
377 | "children": [
378 | {
379 | "label": "20.10.0 (macOS)",
380 | "value": "/docker-ce/mac/static/stable/x86_64/docker-20.10.0.tgz"
381 | }
382 | ]
383 | },
384 | {
385 | "value": "Eclipse IDE",
386 | "label": "Eclipse IDE",
387 | "children": [
388 | {
389 | "label": "php 2020-12 (macosx-cocoa, x86_64)",
390 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-php-2020-12-R-macosx-cocoa-x86_64.dmg"
391 | },
392 | {
393 | "label": "php 2020-12 (macosx-cocoa, x86_64)",
394 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-php-2020-12-R-macosx-cocoa-x86_64.tar.gz"
395 | },
396 | {
397 | "label": "php 2020-12 (linux-gtk, x86_64)",
398 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-php-2020-12-R-linux-gtk-x86_64.tar.gz"
399 | },
400 | {
401 | "label": "php 2020-12 (win32, x86_64)",
402 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-php-2020-12-R-win32-x86_64.zip"
403 | },
404 | {
405 | "label": "parallel 2020-12 (macosx-cocoa, x86_64)",
406 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-parallel-2020-12-R-macosx-cocoa-x86_64.dmg"
407 | },
408 | {
409 | "label": "parallel 2020-12 (linux-gtk, x86_64)",
410 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-parallel-2020-12-R-linux-gtk-x86_64.tar.gz"
411 | },
412 | {
413 | "label": "parallel 2020-12 (macosx-cocoa, x86_64)",
414 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-parallel-2020-12-R-macosx-cocoa-x86_64.tar.gz"
415 | },
416 | {
417 | "label": "parallel 2020-12 (win32, x86_64)",
418 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-parallel-2020-12-R-win32-x86_64.zip"
419 | },
420 | {
421 | "label": "scout 2020-12 (macosx-cocoa, x86_64)",
422 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-scout-2020-12-R-macosx-cocoa-x86_64.dmg"
423 | },
424 | {
425 | "label": "scout 2020-12 (macosx-cocoa, x86_64)",
426 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-scout-2020-12-R-macosx-cocoa-x86_64.tar.gz"
427 | },
428 | {
429 | "label": "scout 2020-12 (linux-gtk, x86_64)",
430 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-scout-2020-12-R-linux-gtk-x86_64.tar.gz"
431 | },
432 | {
433 | "label": "scout 2020-12 (win32, x86_64)",
434 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-scout-2020-12-R-win32-x86_64.zip"
435 | },
436 | {
437 | "label": "embedcpp 2020-12 (macosx-cocoa, x86_64)",
438 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-embedcpp-2020-12-R-macosx-cocoa-x86_64.dmg"
439 | },
440 | {
441 | "label": "embedcpp 2020-12 (linux-gtk, x86_64)",
442 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-embedcpp-2020-12-R-linux-gtk-x86_64.tar.gz"
443 | },
444 | {
445 | "label": "embedcpp 2020-12 (macosx-cocoa, x86_64)",
446 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-embedcpp-2020-12-R-macosx-cocoa-x86_64.tar.gz"
447 | },
448 | {
449 | "label": "embedcpp 2020-12 (win32, x86_64)",
450 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-embedcpp-2020-12-R-win32-x86_64.zip"
451 | },
452 | {
453 | "label": "javascript 2020-12 (macosx-cocoa, x86_64)",
454 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-javascript-2020-12-R-macosx-cocoa-x86_64.dmg"
455 | },
456 | {
457 | "label": "javascript 2020-12 (macosx-cocoa, x86_64)",
458 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-javascript-2020-12-R-macosx-cocoa-x86_64.tar.gz"
459 | },
460 | {
461 | "label": "javascript 2020-12 (linux-gtk, x86_64)",
462 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-javascript-2020-12-R-linux-gtk-x86_64.tar.gz"
463 | },
464 | {
465 | "label": "javascript 2020-12 (win32, x86_64)",
466 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-javascript-2020-12-R-win32-x86_64.zip"
467 | },
468 | {
469 | "label": "dsl 2020-12 (macosx-cocoa, x86_64)",
470 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-dsl-2020-12-R-macosx-cocoa-x86_64.dmg"
471 | },
472 | {
473 | "label": "dsl 2020-12 (macosx-cocoa, x86_64)",
474 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-dsl-2020-12-R-macosx-cocoa-x86_64.tar.gz"
475 | },
476 | {
477 | "label": "dsl 2020-12 (linux-gtk, x86_64)",
478 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-dsl-2020-12-R-linux-gtk-x86_64.tar.gz"
479 | },
480 | {
481 | "label": "dsl 2020-12 (win32, x86_64)",
482 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-dsl-2020-12-R-win32-x86_64.zip"
483 | },
484 | {
485 | "label": "modeling 2020-12 (macosx-cocoa, x86_64)",
486 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-modeling-2020-12-R-macosx-cocoa-x86_64.dmg"
487 | },
488 | {
489 | "label": "modeling 2020-12 (macosx-cocoa, x86_64)",
490 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-modeling-2020-12-R-macosx-cocoa-x86_64.tar.gz"
491 | },
492 | {
493 | "label": "modeling 2020-12 (linux-gtk, x86_64)",
494 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-modeling-2020-12-R-linux-gtk-x86_64.tar.gz"
495 | },
496 | {
497 | "label": "modeling 2020-12 (win32, x86_64)",
498 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-modeling-2020-12-R-win32-x86_64.zip"
499 | },
500 | {
501 | "label": "cpp 2020-12 (macosx-cocoa, x86_64)",
502 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-cpp-2020-12-R-macosx-cocoa-x86_64.dmg"
503 | },
504 | {
505 | "label": "cpp 2020-12 (linux-gtk, x86_64)",
506 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-cpp-2020-12-R-linux-gtk-x86_64.tar.gz"
507 | },
508 | {
509 | "label": "cpp 2020-12 (macosx-cocoa, x86_64)",
510 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-cpp-2020-12-R-macosx-cocoa-x86_64.tar.gz"
511 | },
512 | {
513 | "label": "cpp 2020-12 (win32, x86_64)",
514 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-cpp-2020-12-R-win32-x86_64.zip"
515 | },
516 | {
517 | "label": "testing 2020-12 (macosx-cocoa, x86_64)",
518 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-testing-2020-12-R-macosx-cocoa-x86_64.dmg"
519 | },
520 | {
521 | "label": "testing 2020-12 (macosx-cocoa, x86_64)",
522 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-testing-2020-12-R-macosx-cocoa-x86_64.tar.gz"
523 | },
524 | {
525 | "label": "testing 2020-12 (linux-gtk, x86_64)",
526 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-testing-2020-12-R-linux-gtk-x86_64.tar.gz"
527 | },
528 | {
529 | "label": "testing 2020-12 (win32, x86_64)",
530 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-testing-2020-12-R-win32-x86_64.zip"
531 | },
532 | {
533 | "label": "rcp 2020-12 (macosx-cocoa, x86_64)",
534 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rcp-2020-12-R-macosx-cocoa-x86_64.dmg"
535 | },
536 | {
537 | "label": "rcp 2020-12 (linux-gtk, x86_64)",
538 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rcp-2020-12-R-linux-gtk-x86_64.tar.gz"
539 | },
540 | {
541 | "label": "rcp 2020-12 (macosx-cocoa, x86_64)",
542 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rcp-2020-12-R-macosx-cocoa-x86_64.tar.gz"
543 | },
544 | {
545 | "label": "rcp 2020-12 (win32, x86_64)",
546 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rcp-2020-12-R-win32-x86_64.zip"
547 | },
548 | {
549 | "label": "jee 2020-12 (macosx-cocoa, x86_64)",
550 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-jee-2020-12-R-macosx-cocoa-x86_64.dmg"
551 | },
552 | {
553 | "label": "jee 2020-12 (linux-gtk, x86_64)",
554 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-jee-2020-12-R-linux-gtk-x86_64.tar.gz"
555 | },
556 | {
557 | "label": "jee 2020-12 (macosx-cocoa, x86_64)",
558 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-jee-2020-12-R-macosx-cocoa-x86_64.tar.gz"
559 | },
560 | {
561 | "label": "jee 2020-12 (win32, x86_64)",
562 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-jee-2020-12-R-win32-x86_64.zip"
563 | },
564 | {
565 | "label": "rust 2020-12 (macosx-cocoa, x86_64)",
566 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rust-2020-12-R-macosx-cocoa-x86_64.dmg"
567 | },
568 | {
569 | "label": "rust 2020-12 (linux-gtk, x86_64)",
570 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rust-2020-12-R-linux-gtk-x86_64.tar.gz"
571 | },
572 | {
573 | "label": "rust 2020-12 (macosx-cocoa, x86_64)",
574 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rust-2020-12-R-macosx-cocoa-x86_64.tar.gz"
575 | },
576 | {
577 | "label": "rust 2020-12 (win32, x86_64)",
578 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-rust-2020-12-R-win32-x86_64.zip"
579 | },
580 | {
581 | "label": "committers 2020-12 (macosx-cocoa, x86_64)",
582 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-committers-2020-12-R-macosx-cocoa-x86_64.dmg"
583 | },
584 | {
585 | "label": "committers 2020-12 (macosx-cocoa, x86_64)",
586 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-committers-2020-12-R-macosx-cocoa-x86_64.tar.gz"
587 | },
588 | {
589 | "label": "committers 2020-12 (linux-gtk, x86_64)",
590 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-committers-2020-12-R-linux-gtk-x86_64.tar.gz"
591 | },
592 | {
593 | "label": "committers 2020-12 (win32, x86_64)",
594 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-committers-2020-12-R-win32-x86_64.zip"
595 | },
596 | {
597 | "label": "java 2020-12 (macosx-cocoa, x86_64)",
598 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-java-2020-12-R-macosx-cocoa-x86_64.dmg"
599 | },
600 | {
601 | "label": "java 2020-12 (linux-gtk, x86_64)",
602 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-java-2020-12-R-linux-gtk-x86_64.tar.gz"
603 | },
604 | {
605 | "label": "java 2020-12 (macosx-cocoa, x86_64)",
606 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-java-2020-12-R-macosx-cocoa-x86_64.tar.gz"
607 | },
608 | {
609 | "label": "java 2020-12 (win32, x86_64)",
610 | "value": "/eclipse/technology/epp/downloads/release/2020-12/R/eclipse-java-2020-12-R-win32-x86_64.zip"
611 | },
612 | {
613 | "label": "reporting 2019-09 (macosx-cocoa, x86_64)",
614 | "value": "/eclipse/technology/epp/downloads/release/2019-09/R/eclipse-reporting-2019-09-R-macosx-cocoa-x86_64.dmg"
615 | },
616 | {
617 | "label": "reporting 2019-09 (linux-gtk, x86_64)",
618 | "value": "/eclipse/technology/epp/downloads/release/2019-09/R/eclipse-reporting-2019-09-R-linux-gtk-x86_64.tar.gz"
619 | },
620 | {
621 | "label": "reporting 2019-09 (win32, x86_64)",
622 | "value": "/eclipse/technology/epp/downloads/release/2019-09/R/eclipse-reporting-2019-09-R-win32-x86_64.zip"
623 | }
624 | ]
625 | },
626 | {
627 | "value": "KiCad",
628 | "label": "KiCad",
629 | "children": [
630 | {
631 | "label": "5.1.8_1 (Windows, x86_64)",
632 | "value": "/kicad/windows/stable/kicad-5.1.8_1-x86_64.exe"
633 | },
634 | {
635 | "label": "5.1.8_1 (Windows, i686)",
636 | "value": "/kicad/windows/stable/kicad-5.1.8_1-i686.exe"
637 | },
638 | {
639 | "label": "5.1.7_1 (Windows, x86_64)",
640 | "value": "/kicad/windows/stable/kicad-5.1.7_1-x86_64.exe"
641 | },
642 | {
643 | "label": "5.1.7_1 (Windows, i686)",
644 | "value": "/kicad/windows/stable/kicad-5.1.7_1-i686.exe"
645 | },
646 | {
647 | "label": "5.1.8-0-10_14 (macOS, x86_64)",
648 | "value": "/kicad/osx/stable/kicad-unified-5.1.8-0-10_14.dmg"
649 | },
650 | {
651 | "label": "5.1.7-0-10_14 (macOS, x86_64)",
652 | "value": "/kicad/osx/stable/kicad-unified-5.1.7-0-10_14.dmg"
653 | },
654 | {
655 | "label": "5.1.6-0-10_14 (macOS, x86_64)",
656 | "value": "/kicad/osx/stable/kicad-unified-5.1.6-0-10_14.dmg"
657 | },
658 | {
659 | "label": "5.1.6-0 (macOS, x86_64)",
660 | "value": "/kicad/osx/stable/kicad-unified-5.1.6-0.dmg"
661 | }
662 | ]
663 | }
664 | ]
665 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .navbar-menu {
2 | height: 100%;
3 | border-bottom: none;
4 | }
5 |
6 | .navbar-menuitem {
7 | height: 100%;
8 | text-align: center;
9 | }
10 |
11 | .page-header {
12 | background: white;
13 | border-bottom: 1px solid #cccccc;
14 | height: 64px;
15 | width: 100%;
16 | position: fixed;
17 | z-index: 1;
18 | }
19 |
20 | .footer-text {
21 | text-align: left;
22 | display: flex;
23 | align-items: center;
24 | }
25 |
26 | @media (max-width: 576px) {
27 | .footer-text {
28 | text-align: center;
29 | }
30 | }
31 |
32 | .footer-logo {
33 | width: 200px;
34 | height: 200px;
35 | padding: 20px;
36 | }
37 |
38 | @media (max-width: 576px) {
39 | .footer-logo {
40 | /* 屏幕宽度在 576px ~ 320px 之间时,
41 | 图片尺寸在 200px ~ 150px 之间线性变化 */
42 | width: calc(25 / 128 * 100vw + 175px / 2);
43 | height: calc(25 / 128 * 100vw + 175px / 2);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Route, useLocation, Routes, Navigate, useNavigate } from "react-router-dom";
3 | import { Col, Layout, Menu, Row } from "antd";
4 | import DocPage from "./components/docPage/docPage";
5 | import { HomePage } from "./components/homePage/homePage";
6 | import { ReactComponent as Logo } from "../public/favicon.svg";
7 | import "./App.css";
8 |
9 | const { Header, Footer } = Layout;
10 |
11 | export default class App extends Component {
12 | render() {
13 | return (
14 |
15 |
16 |
17 | } />
18 | } />
19 | } />
20 |
21 |
22 |
23 | );
24 | }
25 | }
26 |
27 | /**
28 | * 页面顶部布局组件
29 | */
30 | function PageHeader() {
31 | const location = useLocation();
32 | const navigate = useNavigate();
33 |
34 | const hrefMap = new Map([
35 | ["home", "/home"],
36 | ["doc", "/doc/docHome"],
37 | ]);
38 |
39 | return (
40 |
41 |
59 | );
60 | }
61 |
62 | /**
63 | * 页面底部布局组件
64 | */
65 | function PageFooter() {
66 | return (
67 |
83 | );
84 | }
85 |
--------------------------------------------------------------------------------
/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { createRoot } from "react-dom/client";
3 | import App from "./App";
4 |
5 | it("renders without crashing", () => {
6 | const div = document.createElement("div");
7 | const root = createRoot(div);
8 |
9 | root.render(
10 |
11 |
12 |
13 | );
14 |
15 |
16 | root.render(, div);
17 | root.unmount();
18 | });
19 |
--------------------------------------------------------------------------------
/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hitlug/mirror-web/3939155734a580452d6ece5ed433256f30642811/src/assets/.gitkeep
--------------------------------------------------------------------------------
/src/components/docPage/doc/docTemplate.css:
--------------------------------------------------------------------------------
1 | .doc h1 {
2 | font-size: 2em;
3 | margin: 0.67em 0;
4 | }
5 |
6 | .doc h2 {
7 | font-size: 1.5em;
8 | margin: 0.75em 0;
9 | }
10 |
11 | .doc h3 {
12 | font-size: 1.17em;
13 | margin: 0.83em 0;
14 | }
15 |
16 | .doc h4,
17 | p,
18 | blockquote,
19 | ul,
20 | fieldset,
21 | form,
22 | ol,
23 | dl,
24 | dir,
25 | menu {
26 | margin: 1.12em 0;
27 | }
28 |
29 | .doc h5 {
30 | font-size: 0.83em;
31 | margin: 1.5em 0;
32 | }
33 |
34 | .doc h6 {
35 | font-size: 0.75em;
36 | margin: 1.67em 0;
37 | }
38 |
39 | .doc h1,
40 | .doc h2,
41 | .doc h3,
42 | .doc h4,
43 | .doc h5,
44 | .doc h6,
45 | b,
46 | strong {
47 | font-weight: bolder;
48 | }
49 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/docTemplate.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import gfm from "remark-gfm";
3 | import ReactMarkdown from "react-markdown";
4 | import rehypePrism from "@mapbox/rehype-prism";
5 | import "prismjs/themes/prism.min.css"
6 | import "./docTemplate.css";
7 |
8 | /**
9 | * 帮助文档模板类
10 | */
11 | export default class DocTemplate extends React.Component {
12 | constructor(props) {
13 | super(props);
14 | this.state = {
15 | // 导入文档的文本内容
16 | text: ""
17 | };
18 | }
19 |
20 | componentDidMount() {
21 | fetch(this.props.doc)
22 | .then(r => r.text())
23 | .then(text => {
24 | this.setState({
25 | text: text
26 | });
27 | })
28 | .catch(e => {
29 | console.log("fetch ERROR", e);
30 | });
31 | }
32 |
33 | render() {
34 | return (
35 |
40 | {this.state.text}
41 |
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/CTAN.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/CTAN.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/alpine.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/alpine.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/anaconda.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/anaconda.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/archlinux.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/archlinux.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/archlinuxcn.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/archlinuxcn.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/blackarch.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/blackarch.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/centos.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/centos.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/crates.io-index.git.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/crates.io-index.git.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/debian.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/debian.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/deepin.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/deepin.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/docHome.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/docHome.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/gentoo.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/gentoo.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/kali.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/kali.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/pypi.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/pypi.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/rubygems.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/rubygems.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/termux.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate";
3 | import doc from "../markdown/termux.md";
4 |
5 | export default function () {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/ubuntu-ports.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/ubuntu-ports.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/js/ubuntu.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import DocTemplate from "../docTemplate.js";
3 | import doc from "../markdown/ubuntu.md";
4 |
5 | export default function() {
6 | return ;
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/CTAN.md:
--------------------------------------------------------------------------------
1 | # CTAN 镜像使用帮助
2 |
3 | ## 临时使用
4 |
5 | ```text
6 | tlmgr --repository https://mirrors.hit.edu.cn/CTAN/systems/texlive/tlnet
7 | ```
8 |
9 | ## 设为默认
10 |
11 | ```text
12 | tlmgr option repository https://mirrors.hit.edu.cn/CTAN/systems/texlive/tlnet
13 | ```
14 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/alpine.md:
--------------------------------------------------------------------------------
1 | # Alpine 镜像使用帮助
2 |
3 | ## 1. 备份 repositories
4 |
5 | ```shell
6 | sudo cp /etc/apk/repositoies /etc/apt/repositories_backup
7 | ```
8 |
9 | ## 2. 编辑 repositories
10 |
11 | ```shell
12 | sudo vim /etc/apk/repositories
13 | ```
14 |
15 | 复制以下内容到 `/etc/apk/repositoies` 以添加哈工大镜像源。
16 | (**_此处以 Alpine Linux v3.15 为例_**,具体请根据您的版本在 [主页](#/home) > 配置生成器 > Alpine 中选择)
17 |
18 | ```text
19 | https://mirrors.hit.edu.cn/alpine/v3.15/main
20 | https://mirrors.hit.edu.cn/alpine/v3.15/community
21 | ```
22 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/anaconda.md:
--------------------------------------------------------------------------------
1 | # Anaconda 镜像使用帮助
2 |
3 | Anaconda 是一个用于科学计算的 Python 发行版,支持 Linux, Mac, Windows, 包含了众多流行的科学计算、数据分析的 Python 包。
4 |
5 | Anaconda 安装包可以到 https://mirrors.hit.edu.cn/anaconda/archive/ 下载。
6 |
7 | HITLUG 还提供了 Anaconda 仓库与第三方源(conda-forge、msys2、pytorch等,[查看完整列表](https://mirrors.hit.edu.cn/anaconda/cloud/),更多第三方源可以前往[校园网联合镜像站](https://mirrors.cernet.edu.cn/list/anaconda)查看)的镜像,各系统都可以通过修改用户目录下的 `.condarc` 文件来使用 HIT 镜像源。Windows 用户无法直接创建名为 `.condarc` 的文件,可先执行 `conda config --set show_channel_urls yes` 生成该文件之后再修改。
8 |
9 | 注:由于更新过快难以同步,我们不同步 `pytorch-nightly`, `pytorch-nightly-cpu`, `ignite-nightly` 这三个包。
10 |
11 | ```yaml
12 | channels:
13 | - defaults
14 | show_channel_urls: true
15 | default_channels:
16 | - https://mirrors.hit.edu.cn/anaconda/pkgs/main
17 | - https://mirrors.hit.edu.cn/anaconda/pkgs/r
18 | - https://mirrors.hit.edu.cn/anaconda/pkgs/msys2
19 | custom_channels:
20 | conda-forge: https://mirrors.hit.edu.cn/anaconda/cloud
21 | msys2: https://mirrors.hit.edu.cn/anaconda/cloud
22 | bioconda: https://mirrors.hit.edu.cn/anaconda/cloud
23 | menpo: https://mirrors.hit.edu.cn/anaconda/cloud
24 | pytorch: https://mirrors.hit.edu.cn/anaconda/cloud
25 | pytorch-lts: https://mirrors.hit.edu.cn/anaconda/cloud
26 | simpleitk: https://mirrors.hit.edu.cn/anaconda/cloud
27 | ```
28 |
29 | 即可添加 Anaconda Python 免费仓库。
30 |
31 | 运行 `conda clean -i` 清除索引缓存,保证用的是镜像站提供的索引。
32 |
33 | 运行 `conda create -n myenv numpy` 测试一下吧。
34 |
35 | ## Miniconda 镜像使用帮助
36 |
37 | Miniconda 是一个 Anaconda 的轻量级替代,默认只包含了 python 和 conda,但是可以通过 pip 和 conda 来安装所需要的包。
38 |
39 | Miniconda 安装包可以到 下载。
40 |
41 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/archlinux.md:
--------------------------------------------------------------------------------
1 | # ArchLinux 镜像使用帮助
2 |
3 | ## 1. 编辑 mirrorlist 文件
4 |
5 | 使用任意文本编辑器(如 vim、nano、emacs 等),编辑 `/etc/pacman.d/mirrorlist` 文件(需要 root 权限)。
6 |
7 | 将以下内容复制到 `/etc/pacman.d/mirrorlist` 文件的开头:
8 |
9 | ```text
10 | Server = https://mirrors.hit.edu.cn/archlinux/$repo/os/$arch
11 | ```
12 |
13 | **mirrorlist 文件中可能已经配置了多个镜像源,pacman 会根据文件中镜像源的顺序自动选择。**
14 |
15 | **可以使用井号(#)注释掉不需要的镜像源而不必在 mirrorlist 文件中删除它。**
16 |
17 | ## 2. 更新 pacman 本地软件包数据库
18 |
19 | ```shell
20 | # 强制从镜像源同步软件包数据库
21 | sudo pacman -Syy
22 | ```
23 |
24 | 或者
25 |
26 | ```shell
27 | # 强制从镜像源同步软件包数据库并且更新系统
28 | sudo pacman -Syyu
29 | ```
30 |
31 | 建议同时启用 `archlinuxcn` 源,有关 `archlinuxcn` 源的介绍,请查看 [archlinuxcn 镜像使用帮助](#/doc/archlinuxcn)
32 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/archlinuxcn.md:
--------------------------------------------------------------------------------
1 | # ArchLinuxCN 镜像使用帮助
2 |
3 | > Arch Linux 中文社区仓库是由 Arch Linux 中文社区驱动的非官方软件仓库,包含许多官方仓库未提供的额外的软件包,以及已有软件的 git 版本等变种。
4 | >
5 | > \- [Arch Linux 中文社区仓库](https://www.archlinuxcn.org/archlinux-cn-repo-and-mirror/)
6 |
7 | ## 1. 备份 pacman 配置文件
8 |
9 | ```shell
10 | sudo cp /etc/pacman.conf /etc/pacman.conf_backup
11 | ```
12 |
13 | ## 2. 编辑 pacman.conf 文件
14 |
15 | 使用任意文本编辑器(如 vim、nano、emacs 等),编辑 `/etc/pacman.conf` 文件(需要 root 权限)。
16 |
17 | 将以下内容复制到 `/etc/pacman.conf` 文件的**末尾**
18 |
19 | ```text
20 | [archlinuxcn]
21 | Server = https://mirrors.hit.edu.cn/archlinuxcn/$arch
22 | ```
23 |
24 | ## 3. 导入 archlinuxcn 钥匙环
25 |
26 | ```shell
27 | sudo pacman -Sy archlinuxcn-keyring
28 | ```
29 |
30 | 随后将自动进行 GPG 签名。
31 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/blackarch.md:
--------------------------------------------------------------------------------
1 | # BlackArch 镜像使用帮助
2 |
3 | ## 1. 编辑 pacman.conf 文件
4 |
5 | 使用任意文本编辑器(如 vim、nano、emacs 等),编辑 `/etc/pacman.conf` 文件(需要 root 权限)。
6 |
7 | 将以下内容复制到 `/etc/pacman.conf` 文件的末尾:
8 |
9 | ```text
10 | [blackarch]
11 | Server = https://mirrors.hit.edu.cn/blackarch/$repo/os/$arch
12 | ```
13 |
14 | **mirrorlist 文件中可能已经配置了多个镜像源,pacman 会根据文件中镜像源的顺序自动选择。**
15 |
16 | **可以使用井号(#)注释掉不需要的镜像源而不必在 mirrorlist 文件中删除它。**
17 |
18 | ## 2. 更新 pacman 本地软件包数据库
19 |
20 | ```shell
21 | # 强制从镜像源同步软件包数据库
22 | sudo pacman -Syy
23 | ```
24 |
25 | 或者
26 |
27 | ```shell
28 | # 强制从镜像源同步软件包数据库并且更新系统
29 | sudo pacman -Syyu
30 | ```
31 |
32 | ## 3.安装密钥环
33 |
34 | ```shell
35 | sudo pacman -Sy blackarch-keyring
36 | ```
37 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/centos.md:
--------------------------------------------------------------------------------
1 | # CentOS 镜像使用帮助
2 |
3 | ## 0. 备份软件源配置文件
4 |
5 | CentOS 的软件源配置文件位于 `/etc/yum.repos.d/`。为了保证安全,请将其备份后再进行以下操作。
6 |
7 | 如:
8 |
9 | ```shell
10 | sudo cp -r /etc/yum.repos.d/ /etc/yum.repos.d.bak/
11 | ```
12 |
13 | ## 1. 编辑配置文件
14 |
15 | 将上文中的配置文件替换为以下内容即可使用哈尔滨工业大学提供的镜像源服务,请根据你的 CentOS 版本进行操作。
16 |
17 | + CentOS 7
18 |
19 | ```shell
20 | sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
21 | -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.hit.edu.cn/centos|g' \
22 | -i.bak \
23 | /etc/yum.repos.d/CentOS-*.repo
24 | ```
25 |
26 | + CentOS 8
27 |
28 | ```shell
29 | sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
30 | -e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.hit.edu.cn/centos|g' \
31 | -i.bak \
32 | /etc/yum.repos.d/CentOS-*.repo
33 | ```
34 |
35 | 注意其中的 `*` 通配符,如果只需要替换一些文件中的源,请自行增删。
36 |
37 | 注意,如果需要启用其中一些 repo,需要将其中的 `enabled=0` 改为 `enabled=1`。
38 |
39 | 最后,更新软件包缓存
40 |
41 | ```shell
42 | sudo yum makecache
43 | ```
44 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/crates.io-index.git.md:
--------------------------------------------------------------------------------
1 | # crates.io-index.git 镜像使用帮助
2 |
3 | 编辑 ~/.cargo/config 文件,添加以下内容。因为 mirrors.hit.edu.cn 只支持 [Dumb HTTP protocol](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_dumb_http),所以设置 `net.git-fetch-with-cli`。([rust-lang/cargo#8918](https://github.com/rust-lang/cargo/issues/8918))
4 |
5 | ```toml
6 | [net]
7 | git-fetch-with-cli = true # use the `git` executable for git operations
8 |
9 | [source.crates-io]
10 | replace-with = "hit"
11 |
12 | [source.hit]
13 | registry = "https://mirrors.hit.edu.cn/crates.io-index.git"
14 | ```
15 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/debian.md:
--------------------------------------------------------------------------------
1 | # Debian 镜像使用帮助
2 |
3 | ## 0. 备份软件源配置文件
4 |
5 | Debian 的软件源配置文件位于 `/etc/apt/sources.list`。为了保证安全,请将其备份后再进行以下操作。
6 |
7 | 如:
8 |
9 | ```shell
10 | sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
11 | ```
12 |
13 | ## 1. 编辑配置文件
14 |
15 | 将上文中的配置文件替换为以下内容即可使用哈尔滨工业大学提供的镜像源服务,请根据你的 Debian 版本进行操作。
16 |
17 | + buster
18 |
19 | ```shell
20 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
21 | # 目前还未提供debian-security,请注意添加
22 | deb https://mirrors.hit.edu.cn/debian/ buster main contrib non-free
23 | # deb-src https://mirrors.hit.edu.cn/debian/ buster main contrib non-free
24 | deb https://mirrors.hit.edu.cn/debian/ buster-updates main contrib non-free
25 | # deb-src https://mirrors.hit.edu.cn/debian/ buster-updates main contrib non-free
26 | deb https://mirrors.hit.edu.cn/debian/ buster-backports main contrib non-free
27 | # deb-src https://mirrors.hit.edu.cn/debian/ buster-backports main contrib non-free
28 | ```
29 |
30 | + stretch
31 |
32 | ```shell
33 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
34 | # 目前还未提供debian-security,请注意添加
35 | deb https://mirrors.hit.edu.cn/debian/ stretch main contrib non-free
36 | # deb-src https://mirrors.hit.edu.cn/debian/ stretch main contrib non-free
37 | deb https://mirrors.hit.edu.cn/debian/ stretch-updates main contrib non-free
38 | # deb-src https://mirrors.hit.edu.cn/debian/ stretch-updates main contrib non-free
39 | deb https://mirrors.hit.edu.cn/debian/ stretch-backports main contrib non-free
40 | # deb-src https://mirrors.hit.edu.cn/debian/ stretch-backports main contrib non-free
41 | ```
42 |
43 | + jessie
44 |
45 | ```shell
46 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
47 | # 目前还未提供debian-security,请注意添加
48 | deb https://mirrors.hit.edu.cn/debian/ stretch main contrib non-free
49 | # deb-src https://mirrors.hit.edu.cn/debian/ stretch main contrib non-free
50 | deb https://mirrors.hit.edu.cn/debian/ stretch-updates main contrib non-free
51 | # deb-src https://mirrors.hit.edu.cn/debian/ stretch-updates main contrib non-free
52 | deb https://mirrors.hit.edu.cn/debian/ stretch-backports main contrib non-free
53 | # deb-src https://mirrors.hit.edu.cn/debian/ stretch-backports main contrib non-free
54 | ```
55 |
56 | + bullseye
57 |
58 | ```shell
59 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
60 | # 目前还未提供debian-security,请注意添加
61 | deb https://mirrors.hit.edu.cn/debian/ bullseye main contrib non-free
62 | # deb-src https://mirrors.hit.edu.cn/debian/ bullseye main contrib non-free
63 | deb https://mirrors.hit.edu.cn/debian/ bullseye-updates main contrib non-free
64 | # deb-src https://mirrors.hit.edu.cn/debian/ bullseye-updates main contrib non-free
65 | deb https://mirrors.hit.edu.cn/debian/ bullseye-backports main contrib non-free
66 | # deb-src https://mirrors.hit.edu.cn/debian/ bullseye-backports main contrib non-free
67 | ```
68 |
69 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/deepin.md:
--------------------------------------------------------------------------------
1 | # Deepin 镜像使用帮助
2 |
3 | ## 0. 备份软件源配置文件
4 |
5 | Deepin 的软件源配置文件位于 `/etc/apt/sources.list`。为了保证安全,请将其备份后再进行以下操作。
6 |
7 | 如:
8 |
9 | ```shell
10 | sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
11 | ```
12 |
13 | ## 1. 编辑配置文件
14 |
15 | 将上文中的配置文件替换为以下内容即可使用哈尔滨工业大学提供的镜像源服务,仅支持**Deepin V20**。
16 |
17 | ```text
18 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
19 | deb [by-hash=force] https://mirrors.hit.edu.cn/deepin/ apricot main contrib non-free
20 | # deb-src https://mirrors.hit.edu.cn/deepin/ apricot main contrib non-free
21 | ```
22 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/docHome.md:
--------------------------------------------------------------------------------
1 | # 欢迎来到帮助文档
2 |
3 | > 本帮助文档目前仍在开发、编写中
4 |
5 | ## 文档贡献指南
6 |
7 | ### 文档位置
8 |
9 | `/src/components/docPage`
10 |
11 | ### 目录结构
12 |
13 | ```
14 | .
15 | ├── doc
16 | │ ├── ...
17 | │ ├── js
18 | │ │ ├── docHome.js
19 | │ │ └── ...
20 | │ └── markdown
21 | │ ├── docHome.md
22 | │ └── ...
23 | ├── ...
24 | └── menu.json
25 | ```
26 |
27 | ### 结构说明
28 |
29 | - `./doc/markdown`: 存放所有 `Markdown` 文档
30 |
31 | - `./doc/js`: 存放所有 `JavaScript` 代码
32 |
33 | - 命名规则: 请检查 `./menu.json` 文件中对应的 `path` 项。若 `path` 为 `/doc/MyDoc` ,则 `js` 文件应命名为 `MyDoc.js`
34 |
35 | - 请在 `js` 中引入您的 `Markdown` 文档,方式为:
36 |
37 | ```js
38 | import doc from "../markdown/YourMarkdown.md";
39 | ```
40 |
41 | - 调用方式:
42 |
43 | ```html
44 |
45 | ```
46 |
47 | - `./menu.json`: 目录文件,存放文档页面左侧的导航栏相关信息
48 |
49 | - `key`: 可选,会将提供 `key` 的项目排序后置顶;若不提供,则按照 `title` 的字典序显示在下面
50 |
51 | - `title`: 将作为导航栏 `MenuItem` 的标题
52 |
53 | - `name`: 镜像名称,应与主页的对应项目和对应的 `js` 文件名相同,用于在主页添加帮助文档的链接及帮助文档的路由路径
54 |
55 | ### 示例
56 |
57 | 以本文档为例
58 |
59 | - `./menu.json`
60 |
61 | ```json
62 | [
63 | {
64 | "key": 0,
65 | "title": "欢迎来到帮助文档",
66 | "name": "docHome"
67 | },
68 | {
69 | "title": "Debian",
70 | "name": "debian"
71 | }
72 | ...
73 | ]
74 | ```
75 |
76 | - `./doc/markdown/docHome.md`
77 |
78 | ```markdown
79 | # 欢迎来到帮助文档
80 |
81 | > 本帮助文档目前仍在开发、编写中
82 |
83 | ...
84 | ```
85 |
86 | - `./doc/js/docHome.js`
87 |
88 | ```js
89 | import React from "react";
90 | import DocTemplate from "../docTemplate.js";
91 | import doc from "../markdown/docHome.md";
92 |
93 | export default function() {
94 | return ;
95 | }
96 | ```
97 |
98 | ### 其他说明:
99 |
100 | - 镜像站基于 `React` 和 `Ant Design` 构建,您可以直接在 `js` 文件中添加您的 `jsx` 代码, 以获得 `Markdown` 没有的特性, 如按钮、级联选择、折叠面板等
101 |
102 | - 帮助文档基于 `react-markdown` 构建,将通过插件陆续补充对 GFM 的支持
103 |
104 | ## 相关链接
105 |
106 | [镜像站仓库](https://github.com/hitlug/mirror-web)
107 |
108 | [Ant Design 组件库](https://ant.design/components/overview-cn/)
109 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/gentoo.md:
--------------------------------------------------------------------------------
1 | # Gentoo 镜像使用帮助
2 |
3 | ## 1. 备份软件源配置文件
4 |
5 | Gentoo 的软件源配置文件位于 `/etc/portage/make.conf`。为了保证安全,请将其备份后再进行以下操作。
6 |
7 | ```shell
8 | sudo cp /etc/portage/make.conf /etc/portage/make.conf_backup
9 | ```
10 |
11 | ## 2. 编辑配置文件
12 |
13 | 复制以下内容到 `/etc/portage/make.conf` 以添加哈工大镜像源。
14 |
15 | ```text
16 | GENTOO_MIRRORS="http://mirrors.hit.edu.cn/gentoo/"
17 | ```
18 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/kali.md:
--------------------------------------------------------------------------------
1 | # Kali 镜像使用帮助
2 |
3 | ## 1. 备份 sources.list
4 |
5 | ```shell
6 | sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
7 | ```
8 |
9 | ## 2. 编辑 sources.list
10 |
11 | ```shell
12 | sudo vim /etc/apt/sources.list
13 | ```
14 |
15 | 复制以下内容到 `/etc/apt/sources.list` 以添加哈工大镜像源。
16 |
17 | ```text
18 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
19 | deb https://mirrors.hit.edu.cn/kali kali-rolling main non-free contrib
20 | #deb-src https://mirrors.hit.edu.cn/kali kali-rolling main non-free contrib
21 | ```
22 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/pypi.md:
--------------------------------------------------------------------------------
1 | # PyPI 镜像使用帮助
2 |
3 | ## 临时使用
4 |
5 | ```text
6 | pip install some_package -i https://mirrors.hit.edu.cn/pypi/web/simple
7 | ```
8 |
9 | ## 设为默认
10 |
11 | ```text
12 | pip config set global.index-url https://mirrors.hit.edu.cn/pypi/web/simple
13 | ```
14 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/rubygems.md:
--------------------------------------------------------------------------------
1 | # RubyGems 镜像使用帮助
2 |
3 | ## gem
4 |
5 | 添加哈工大源并移除默认源
6 |
7 | ```shell
8 | gem sources --add https://mirrors.hit.edu.cn/rubygems/ --remove https://rubygems.org/
9 | ```
10 |
11 | 使用以下命令查看确保只有哈工大源:
12 |
13 | ```shell
14 | gem sources -l
15 | ```
16 |
17 | ## bundler
18 |
19 | ```shell
20 | bundle config mirror.https://rubygems.org https://mirrors.hit.edu.cn/rubygems
21 | ```
22 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/termux.md:
--------------------------------------------------------------------------------
1 | # Termux 镜像使用帮助
2 |
3 | > Termux 是一个运行于 Android 上的 terminal, 可以用来运行 Linux 应用。它不需要 root 权限,但因此它的所有文件都存储于 SD 卡上。
4 |
5 | Termux 自带了 `apt` 包管理器,但是官方并不推荐直接使用 `apt` ,而是推荐 `pkg` 进行操作。
6 |
7 | ## 更换镜像
8 |
9 | 以下两种方式任选其一即可。
10 |
11 | ### 使用 termux-change-repo 工具
12 |
13 | 运行 `pkg in termux-tools`
14 |
15 | 安装后运行 `termux-change-repo` ,并按照提示,首先选择“Single Mirror”,之后选择 "mirrors.hit.edu.cn" 并回车确认。
16 |
17 | ### 修改 sources.list
18 |
19 | 修改以下文件:
20 |
21 | - $PREFIX/etc/apt/sources.list
22 | - $PREFIX/etc/apt/sources.list.d/game.list
23 | - $PREFIX/etc/apt/sources.list.d/science.list
24 |
25 | > 因 Termux 运行于 SD 卡,所以无权访问真实的 `/` 目录,只能访问自己的“根目录”( $PREFIX/ )
26 |
27 | ```text
28 | # sources.list
29 | deb https://mirrors.hit.edu.cn/termux/apt/termux-main stable main
30 |
31 | # game.list
32 | deb https://mirrors.hit.edu.cn/termux/apt/termux-games games stable
33 |
34 | # science.list
35 | deb https://mirrors.hit.edu.cn/termux/apt/termux-science science stable
36 | ```
37 |
38 | ## 社区源
39 |
40 | 镜像站还提供了如下社区维护的源,如需使用请自行添加:
41 |
42 | * https://mirrors.hit.edu.cn/termux/x11-packages
43 | * https://mirrors.hit.edu.cn/termux/unstable-packages
44 | * https://mirrors.hit.edu.cn/termux/termux-root-packages-24
45 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/ubuntu-ports.md:
--------------------------------------------------------------------------------
1 | # Ubuntu-Ports 镜像使用帮助
2 |
3 | ## 1. 备份 sources.list
4 |
5 | ```shell
6 | sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
7 | ```
8 |
9 | ## 2. 编辑 sources.list
10 |
11 | ```shell
12 | sudo vim /etc/apt/sources.list
13 | ```
14 |
15 | 复制以下内容到 `/etc/apt/sources.list` 以添加哈工大镜像源。
16 | (**_此处以 ubuntu 20.04 LTS 为例_**,具体请根据您的版本在 [主页](#/home) > 配置生成器 > ubuntu-ports 中选择)
17 |
18 | ```text
19 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
20 | deb http://mirrors.hit.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
21 | # deb-src http://mirrors.hit.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
22 | deb http://mirrors.hit.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
23 | # deb-src http://mirrors.hit.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
24 | deb http://mirrors.hit.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
25 | # deb-src http://mirrors.hit.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
26 | deb http://mirrors.hit.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
27 | # deb-src http://mirrors.hit.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
28 |
29 | # 预发布软件源,不建议启用
30 | # deb http://mirrors.hit.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
31 | # deb-src http://mirrors.hit.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
32 | ```
33 |
--------------------------------------------------------------------------------
/src/components/docPage/doc/markdown/ubuntu.md:
--------------------------------------------------------------------------------
1 | # Ubuntu 镜像使用帮助
2 |
3 | ## 1. 备份 sources.list
4 |
5 | ```shell
6 | sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
7 | ```
8 |
9 | ## 2. 编辑 sources.list
10 |
11 | ```shell
12 | sudo vim /etc/apt/sources.list
13 | ```
14 |
15 | 复制以下内容到 `/etc/apt/sources.list` 以添加哈工大镜像源。
16 | (**_此处以 Ubuntu 20.04 LTS 为例_**,具体请根据您的版本在 [主页](#/home) > 配置生成器 > Ubuntu 中选择)
17 |
18 | ```text
19 | # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
20 | deb http://mirrors.hit.edu.cn/ubuntu/ focal main restricted universe multiverse
21 | # deb-src http://mirrors.hit.edu.cn/ubuntu/ focal main restricted universe multiverse
22 | deb http://mirrors.hit.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
23 | # deb-src http://mirrors.hit.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
24 | deb http://mirrors.hit.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
25 | # deb-src http://mirrors.hit.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
26 | deb http://mirrors.hit.edu.cn/ubuntu/ focal-security main restricted universe multiverse
27 | # deb-src http://mirrors.hit.edu.cn/ubuntu/ focal-security main restricted universe multiverse
28 |
29 | # 预发布软件源,不建议启用
30 | # deb http://mirrors.hit.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
31 | # deb-src http://mirrors.hit.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
32 | ```
33 |
--------------------------------------------------------------------------------
/src/components/docPage/docPage.css:
--------------------------------------------------------------------------------
1 | .site-layout-background {
2 | background: #fff;
3 | }
4 |
5 | .doc-frame {
6 | margin-top: 64px;
7 | }
8 |
9 | .doc-content {
10 | padding: 50px 0 0;
11 | }
12 |
13 | @media (max-width: 1600px) {
14 | .doc-content {
15 | /* 屏幕宽度在 1600px ~ 320px 之间时,
16 | 上外边距在 50px ~ 15px 之间线性变化 */
17 | padding-top: calc(7 / 256 * 100vw + 25px / 4);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/components/docPage/docPage.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from "react";
2 | import { Layout, Menu, Breadcrumb, Divider, Row, Col, Spin } from "antd";
3 | import { useLocation, useNavigate } from "react-router-dom";
4 | import docMenu from "./menu.json";
5 | import "./docPage.css";
6 |
7 | const { Header, Content, Sider } = Layout;
8 |
9 | /**
10 | * 帮助文档页面组件
11 | */
12 | export default function DocPage() {
13 | // 帮助文档正文内容
14 | const [currentDocContent, setCurrentDocContent] = useState(undefined);
15 | // 帮助文档的路径
16 | const [activeDocPath, setActiveDocPath] = useState("/doc/docHome");
17 | // 是否已经获取了文档
18 | const [docLoaded, setDocLoaded] = useState(false);
19 |
20 | const { pathname } = useLocation();
21 | const navigate = useNavigate();
22 |
23 | /**
24 | * 动态导入文档并修改页面正文内容
25 | *
26 | * @param path 文档路由
27 | */
28 | async function importAndExecDoc(path) {
29 | setDocLoaded(false);
30 | setCurrentDocContent(undefined);
31 | setActiveDocPath(path);
32 |
33 | try {
34 | const module = await import("./doc/js/" + path.split("/")[2] + ".js");
35 | setDocLoaded(true);
36 | setCurrentDocContent(module.default());
37 | } catch {
38 | console.log("import " + path + " failed");
39 | setDocLoaded(true);
40 | setCurrentDocContent(No Document Here!
);
41 | }
42 | }
43 |
44 | useEffect(() => {
45 | let normalizedPath = pathname;
46 | if (/^\/doc\/?$/.test(pathname)) {
47 | normalizedPath = "/doc/docHome";
48 | navigate("/doc/docHome", { replace: true });
49 | return;
50 | }
51 |
52 | importAndExecDoc(normalizedPath);
53 | }, [pathname]);
54 |
55 | return (
56 |
57 |
58 |
59 |
60 |
61 |
62 |
71 |
76 |
86 |
92 | {docLoaded ? (
93 | currentDocContent
94 | ) : (
95 |
96 |
97 |
98 | )}
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | );
107 | }
108 |
109 | /**
110 | * 根据json文件递归生成文档导航菜单项目
111 | *
112 | * @param source 文档导航菜单json文件
113 | */
114 | function generateMenuItems(source) {
115 | source.sort((a, b) => {
116 | if ("key" in a && "key" in b) {
117 | return a.key - b.key;
118 | } else if ("key" in a) {
119 | return -1;
120 | } else if ("key" in b) {
121 | return 1;
122 | } else {
123 | return a.title < b.title ? -1 : 1;
124 | }
125 | });
126 | return source.map(menu => {
127 | menu.path = `/doc/${menu.name}`;
128 | if (menu.children) {
129 | return {
130 | key: menu.path,
131 | label: menu.title,
132 | children: generateMenuItems(menu.children),
133 | };
134 | } else {
135 | return {
136 | key: menu.path,
137 | label: menu.title,
138 | }
139 | }
140 | });
141 | }
142 |
143 | /**
144 | * 可导航的面包屑组件
145 | */
146 | function LinkedBreadcrumb() {
147 | /**
148 | * 路由路径和面包屑标题的对应关系
149 | */
150 | const breadcrumbNameMap = new Map([
151 | ["/home", "主页"],
152 | ["/doc", "帮助文档"],
153 | ]);
154 |
155 | /**
156 | * 根据json文件生成面包屑导航项目
157 | *
158 | * @param source 文档导航菜单json文件
159 | */
160 | for (const item of docMenu) {
161 | breadcrumbNameMap.set(item.name, item.title)
162 | }
163 |
164 | const { pathname } = useLocation();
165 | const pathSnippets = pathname.split("/");
166 |
167 | const breadcrumbItems = [
168 | {
169 | title: "主页",
170 | href: "/#/home",
171 | },
172 | {
173 | title: "帮助文档",
174 | href: "/#/doc",
175 | },
176 | ];
177 |
178 | for (let i = 2; i < pathSnippets.length; i++) {
179 | breadcrumbItems.push({
180 | title: breadcrumbNameMap.get(pathSnippets[i]),
181 | href: "/#" + pathSnippets.slice(0, i + 1).join("/"),
182 | })
183 | }
184 |
185 | return (
186 |
187 | );
188 | }
189 |
--------------------------------------------------------------------------------
/src/components/docPage/menu.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "key": 0,
4 | "title": "欢迎来到帮助文档",
5 | "name": "docHome"
6 | },
7 | {
8 | "title": "Anaconda",
9 | "name": "anaconda"
10 | },
11 | {
12 | "title": "BlackArch",
13 | "name": "blackarch"
14 | },
15 | {
16 | "title": "CTAN",
17 | "name": "CTAN"
18 | },
19 | {
20 | "title": "CentOS",
21 | "name": "centos"
22 | },
23 | {
24 | "title": "Debian",
25 | "name": "debian"
26 | },
27 | {
28 | "title": "PyPI",
29 | "name": "pypi"
30 | },
31 | {
32 | "title": "Ubuntu",
33 | "name": "ubuntu"
34 | },
35 | {
36 | "title": "Ubuntu-Ports",
37 | "name": "ubuntu-ports"
38 | },
39 | {
40 | "title": "ArchLinux",
41 | "name": "archlinux"
42 | },
43 | {
44 | "title": "ArchLinuxCN",
45 | "name": "archlinuxcn"
46 | },
47 | {
48 | "title": "Kali",
49 | "name": "kali"
50 | },
51 | {
52 | "title": "Termux",
53 | "name": "termux"
54 | },
55 | {
56 | "title": "Deepin",
57 | "name": "deepin"
58 | },
59 | {
60 | "title": "Gentoo",
61 | "name": "gentoo"
62 | },
63 | {
64 | "title": "crates.io-index.git",
65 | "name": "crates.io-index.git"
66 | },
67 | {
68 | "title": "RubyGems",
69 | "name": "rubygems"
70 | },
71 | {
72 | "title": "Alpine",
73 | "name": "alpine"
74 | }
75 | ]
76 |
--------------------------------------------------------------------------------
/src/components/homePage/homePage.css:
--------------------------------------------------------------------------------
1 | .home-title-logo {
2 | height: 100%;
3 | width: 120px;
4 | padding: 24px 20px;
5 | }
6 |
7 | @media (max-width: 768px) {
8 | .home-title-logo {
9 | /* 屏幕宽度在 768px ~ 320px 之间时
10 | (即 iPad ~ iPhone 5),
11 | 不显示Logo */
12 | height: 0;
13 | width: 0;
14 | padding: 0;
15 | }
16 | }
17 |
18 | .home-title-text {
19 | font-size: 40px;
20 | font-weight: 900;
21 | letter-spacing: 3px;
22 | padding: 64px 0;
23 | margin: 0;
24 | background: linear-gradient(to right, #1d4fa2, #1570c4);
25 | -webkit-background-clip: text;
26 | color: transparent;
27 | }
28 |
29 | @media (max-width: 768px) {
30 | .home-title-text {
31 | /* 屏幕宽度在 768px ~ 320px 之间时
32 | (即 iPad ~ iPhone 5),
33 | 字体大小在 40px ~ 21px 之间线性变化,
34 | 字体间距在 3px ~ 1px 之间线性变化 */
35 | font-size: calc(19 / 448 * 100vw + 52px / 7);
36 | letter-spacing: calc(1 / 224 * 100vw - 3px / 7);
37 | }
38 | }
39 |
40 | .home-page-content {
41 | padding: 0 24px 64px;
42 | margin-top: 64px;
43 | background: white;
44 | }
45 |
--------------------------------------------------------------------------------
/src/components/homePage/homePage.js:
--------------------------------------------------------------------------------
1 | import axios from "axios";
2 | import { Col, Row, Layout, Tag, Table, Spin, Space } from "antd";
3 | import SideCards from "./sideCards/sideCards";
4 | import React, { Component, useEffect, useState } from "react";
5 | import { ReactComponent as Logo } from "../../../public/favicon.svg";
6 | import "./homePage.css";
7 | import {
8 | CheckCircleOutlined,
9 | CloseCircleOutlined,
10 | ExclamationCircleOutlined,
11 | QuestionCircleOutlined,
12 | SyncOutlined
13 | } from "@ant-design/icons";
14 | import docMenu from "../docPage/menu.json";
15 | import { Link } from "react-router-dom";
16 |
17 | const { Content } = Layout;
18 |
19 | /**
20 | * 镜像列表主页组件
21 | */
22 | export function HomePage() {
23 | // 镜像列表
24 | const [mirrorsList, setMirrorsList] = useState(null);
25 | // 是否已经获取了镜像列表
26 | const [loaded, setLoaded] = useState(false);
27 |
28 | /**
29 | * 获取镜像列表
30 | */
31 | useEffect(() => {
32 | (async () => {
33 | const response = await axios.get("/jobs");
34 |
35 | const docs = new Set();
36 | docMenu.forEach(cur => {
37 | if (cur.name !== undefined) {
38 | docs.add(cur.name);
39 | }
40 | });
41 |
42 | const mirrorsList = response.data.map(m =>
43 | Object.assign(m, {
44 | has_doc: docs.has(m.name)
45 | })
46 | );
47 | mirrorsList.sort((a, b) => {
48 | return a.name < b.name ? -1 : 1;
49 | });
50 |
51 | setLoaded(true);
52 | setMirrorsList(mirrorsList);
53 | })();
54 | }, []);
55 |
56 | return (
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | {process.env.REACT_APP_SITE_TITLE}
65 |
66 |
67 |
68 |
69 |
70 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | );
81 | }
82 |
83 | /**
84 | * 镜像列表组件
85 | */
86 | class MirrorsList extends Component {
87 | render() {
88 | if (!this.props.loaded) {
89 | return (
90 |
91 |
92 |
93 | );
94 | }
95 |
96 | const columns = [
97 | {
98 | title: "镜像名称",
99 | render: item => (
100 |
101 | {item.name}
102 | {item.has_doc ? (
103 |
104 |
105 |
106 | ) : null}
107 |
108 | )
109 | },
110 | {
111 | title: "同步状态",
112 | dataIndex: "status",
113 | render: status => {
114 | let statusIcon, statusTagColor, statusLable;
115 | switch (status) {
116 | case "success":
117 | statusIcon = ;
118 | statusTagColor = "success";
119 | statusLable = "Success";
120 | break;
121 | case "syncing":
122 | statusIcon = ;
123 | statusTagColor = "processing";
124 | statusLable = "Syncing";
125 | break;
126 | case "failed":
127 | case "fail":
128 | statusIcon = ;
129 | statusTagColor = "error";
130 | statusLable = "Failed";
131 | break;
132 | default:
133 | statusIcon = ;
134 | statusTagColor = "warning";
135 | statusLable = "Unknown";
136 | break;
137 | }
138 | return (
139 |
140 | {statusLable}
141 |
142 | );
143 | }
144 | },
145 | {
146 | title: "Last Update",
147 | dataIndex: "last_update",
148 | render: text =>
149 | text
150 | .split(" ")
151 | .slice(0, 2)
152 | .join(" ")
153 | }
154 | ];
155 | const data = this.props.mirrorsList;
156 | return (
157 |
163 | );
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/src/components/homePage/sideCards/configGeneratorCard.css:
--------------------------------------------------------------------------------
1 | .config-block {
2 | margin-top: 30px;
3 | border: #cccccc;
4 | background: #f5f5f5;
5 | padding: 0 10px;
6 | }
7 |
--------------------------------------------------------------------------------
/src/components/homePage/sideCards/configGeneratorCard.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import {
3 | Tooltip,
4 | Button,
5 | Form,
6 | Modal,
7 | Row,
8 | Col,
9 | Cascader,
10 | message
11 | } from "antd";
12 | import { ThunderboltOutlined } from "@ant-design/icons";
13 | import { CopyToClipboard } from "react-copy-to-clipboard";
14 | import "./configGeneratorCard.css";
15 |
16 | /**
17 | * 配置生成器组件
18 | */
19 | export default class ConfigGeneratorCard extends Component {
20 | state = {
21 | // 配置生成器可见性
22 | configGeneratorVisible: false,
23 | // 选择发行版
24 | selectDistrib: undefined,
25 | // 选择的发行版的版本号或版本别名
26 | selectVersion: undefined,
27 | // 是否显示软件源配置文本块
28 | showConfigBlock: false,
29 | // 软件源配置文本块
30 | configBlock: undefined
31 | };
32 |
33 | /**
34 | * 显示配置生成器对话框
35 | */
36 | showDownloadForm = () => {
37 | this.setState({ configGeneratorVisible: true });
38 | };
39 |
40 | /**
41 | * 退出配置生成器对话框
42 | */
43 | handleConfigGeneratorCancel = () => {
44 | this.setState({ configGeneratorVisible: false });
45 | };
46 |
47 | /**
48 | * 确认选择发行版和版本
49 | *
50 | * @param selectedOptions 级联选择器各级的值。
51 | * 其中[0]为发行版名称,[1]为版本别名
52 | */
53 | onConfigChange = selectedOptions => {
54 | this.setState({
55 | selectDistrib: selectedOptions[0],
56 | selectVersion: selectedOptions[1]
57 | });
58 | };
59 |
60 | /**
61 | * 生成配置
62 | */
63 | handleGenerateConfig = () => {
64 | let configBlock = undefined;
65 |
66 | switch (this.state.selectDistrib) {
67 | case "ubuntu":
68 | configBlock = buildUbuntuBlock(this.state.selectVersion);
69 | break;
70 | case "ubuntu-ports":
71 | configBlock = buildUbuntuportsBlock(this.state.selectVersion);
72 | break;
73 | case "debian":
74 | configBlock = buildDebianBlock(this.state.selectVersion);
75 | break;
76 | case "archlinux":
77 | configBlock = buildArchBlock();
78 | break;
79 | case "centos":
80 | configBlock = buildCentosBlock(this.state.selectVersion);
81 | break;
82 | case "opensuse":
83 | configBlock = buildOpensuseBlock(this.state.selectVersion);
84 | break;
85 | case "alpine":
86 | configBlock = buildAlpineBlock(this.state.selectVersion);
87 | break;
88 | default:
89 | break;
90 | }
91 |
92 | if (configBlock !== undefined) {
93 | this.setState({ showConfigBlock: true, configBlock: configBlock });
94 | }
95 | };
96 |
97 | render() {
98 | return (
99 | <>
100 | 配置生成
101 | 生成发行版的配置文件
102 | }
105 | onClick={this.showDownloadForm}
106 | >
107 | 配置生成器
108 |
109 |
116 |
118 |
119 |
120 |
126 |
127 |
128 |
131 |
132 |
133 |
134 | {/* 配置生成器的软件源文本块组件 */}
135 |
136 | {this.state.showConfigBlock ? (
137 |
138 | message.success("复制成功", 1)}
141 | >
142 |
143 | {this.state.configBlock}
144 |
145 |
146 |
147 | ) : null}
148 |
149 |
150 |
151 |
152 |
153 | >
154 | );
155 | }
156 | }
157 |
158 | /**
159 | * 构建Ubuntu软件源配置的一行
160 | *
161 | * @param val 软件包格式
162 | * @param version 版本别名
163 | * @returns {string} 返回Ubuntu配置的一行
164 | */
165 | function buildUbuntuLine(val, version) {
166 | return (
167 | val +
168 | " http://mirrors.hit.edu.cn/ubuntu/ " +
169 | version +
170 | " main restricted universe multiverse\n"
171 | );
172 | }
173 |
174 | /**
175 | * 构建Ubuntu软件源配置的文本块
176 | *
177 | * @param version 版本别名
178 | * @returns {string} 返回Ubuntu软件源配置的文本块
179 | */
180 | function buildUbuntuBlock(version) {
181 | return (
182 | "# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释\n" +
183 | buildUbuntuLine("deb", version) +
184 | buildUbuntuLine("# deb-src", version) +
185 | buildUbuntuLine("deb", version + "-updates") +
186 | buildUbuntuLine("# deb-src", version + "-updates") +
187 | buildUbuntuLine("deb", version + "-backports") +
188 | buildUbuntuLine("# deb-src", version + "-backports") +
189 | buildUbuntuLine("deb", version + "-security") +
190 | buildUbuntuLine("# deb-src", version + "-security") +
191 | "\n# 预发布软件源,不建议启用\n" +
192 | buildUbuntuLine("# deb", version + "-proposed") +
193 | buildUbuntuLine("# deb-src", version + "-proposed")
194 | );
195 | }
196 | /**
197 | * 构建Ubuntu-ports软件源配置的一行
198 | *
199 | * @param val 软件包格式
200 | * @param version 版本别名
201 | * @returns {string} 返回Ubuntu-ports配置的一行
202 | */
203 | function buildUbuntuportsLine(val, version) {
204 | return (
205 | val +
206 | " http://mirrors.hit.edu.cn/ubuntu-ports/ " +
207 | version +
208 | " main restricted universe multiverse\n"
209 | );
210 | }
211 |
212 | /**
213 | * 构建Ubuntu-Ports软件源配置的文本块
214 | *
215 | * @param version 版本别名
216 | * @returns {string} 返回Ubuntu-Ports软件源配置的文本块
217 | */
218 | function buildUbuntuportsBlock(version) {
219 | return (
220 | "# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释\n" +
221 | buildUbuntuportsLine("deb", version) +
222 | buildUbuntuportsLine("# deb-src", version) +
223 | buildUbuntuportsLine("deb", version + "-updates") +
224 | buildUbuntuportsLine("# deb-src", version + "-updates") +
225 | buildUbuntuportsLine("deb", version + "-backports") +
226 | buildUbuntuportsLine("# deb-src", version + "-backports") +
227 | buildUbuntuportsLine("deb", version + "-security") +
228 | buildUbuntuportsLine("# deb-src", version + "-security") +
229 | "\n# 预发布软件源,不建议启用\n" +
230 | buildUbuntuportsLine("# deb", version + "-proposed") +
231 | buildUbuntuportsLine("# deb-src", version + "-proposed")
232 | );
233 | }
234 |
235 | /**
236 | * 构建Alpine软件源配置的一行
237 | *
238 | * @param val 版本别名
239 | * @returns {string} 返回Alpine配置的一行
240 | */
241 | function buildAlpineLine(val) {
242 | return (
243 | " http://mirrors.hit.edu.cn/alpine/v" +
244 | val +
245 | "/main\n" +
246 | " http://mirrors.hit.edu.cn/alpine/v" +
247 | val +
248 | "/community\n"
249 | );
250 | }
251 |
252 | /**
253 | * 构建Alpine软件源配置的文本块
254 | *
255 | * @param val 版本别名
256 | * @returns {string} 返回Alpine软件源配置的文本块
257 | */
258 | function buildAlpineBlock(version) {
259 | return (
260 | buildAlpineLine(version)
261 | );
262 | }
263 |
264 |
265 | /**
266 | * 构建Debian软件源配置的一行
267 | *
268 | * @param val 软件包格式
269 | * @param version 版本别名
270 | * @returns {string} 返回Debian配置的一行
271 | */
272 | function buildDebianLine(val, version) {
273 | return (
274 | val +
275 | " http://mirrors.hit.edu.cn/debian/ " +
276 | version +
277 | " main contrib non-free\n"
278 | );
279 | }
280 |
281 | /**
282 | * 构建Debian软件源配置的文本块
283 | *
284 | * @param version 版本别名
285 | * @returns {string} 返回Debian软件源配置的文本块
286 | */
287 | function buildDebianBlock(version) {
288 | return (
289 | "# 目前还未提供debian-security,请注意添加\n" +
290 | buildDebianLine("deb", version) +
291 | buildDebianLine("# deb-src", version) +
292 | buildDebianLine("deb", version + "-updates") +
293 | buildDebianLine("# deb-src", version + "-updates") +
294 | buildDebianLine("deb", version + "-backports") +
295 | buildDebianLine("# deb-src", version + "-backports")
296 | );
297 | }
298 |
299 |
300 | /**
301 | * 构建ArchLinux软件源配置的文本块
302 | *
303 | * @returns {string} 返回ArchLinux软件源配置的文本块
304 | */
305 | function buildArchBlock() {
306 | return "Server = http://mirrors.hit.edu.cn/archlinux/$repo/os/$arch";
307 | }
308 |
309 | /**
310 | * 构建CentOS软件源配置的文本块的一个段落
311 | *
312 | * @param handle
313 | * @param name
314 | * @param baseurl
315 | * @param mirrorlist
316 | * @param gpgkey
317 | * @param enabled
318 | * @param comment
319 | * @returns {string} 返回CentOS软件源配置的文本块的一个段落
320 | */
321 | function buildCentosSubBlock(
322 | handle,
323 | name,
324 | baseurl,
325 | mirrorlist,
326 | gpgkey,
327 | enabled,
328 | comment
329 | ) {
330 | return (
331 | `#${comment}\n` +
332 | `[${handle}]\n` +
333 | `name=CentOS-$releasever - ${name}\n` +
334 | `baseurl=${baseurl}\n` +
335 | `#mirrorlist=${mirrorlist}\n` +
336 | `enabled=${enabled}\ngpgcheck=1\n` +
337 | `gpgkey=${gpgkey}\n`
338 | );
339 | }
340 |
341 | /**
342 | * 构建CentOS软件源配置的文本块
343 | *
344 | * @param version 版本号
345 | * @returns {string} 返回CentOS软件源配置的文本块
346 | */
347 | function buildCentosBlock(version) {
348 | let header = `# CentOS-Base.repo
349 | #
350 | # The mirror system uses the connecting IP address of the client and the
351 | # update status of each mirror to pick mirrors that are updated to and
352 | # geographically close to the client. You should use this for CentOS updates
353 | # unless you are manually picking other mirrors.
354 | #
355 | # If the mirrorlist= does not work for you, as a fall back you can try the
356 | # remarked out baseurl= line instead.
357 | #
358 | #
359 | `;
360 | switch (version) {
361 | case 6:
362 | return (
363 | header +
364 | buildCentosSubBlock(
365 | `base`,
366 | `Base`,
367 | `https://mirrors.hit.edu.cn/centos/$releasever/os/$basearch/`,
368 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os`,
369 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6`,
370 | 1,
371 | ``
372 | ) +
373 | "\n" +
374 | buildCentosSubBlock(
375 | `updates`,
376 | `Updates`,
377 | `https://mirrors.hit.edu.cn/centos/$releasever/updates/$basearch/`,
378 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates`,
379 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6`,
380 | 1,
381 | `released updates`
382 | ) +
383 | "\n" +
384 | buildCentosSubBlock(
385 | `extras`,
386 | `Extras`,
387 | `https://mirrors.hit.edu.cn/centos/$releasever/extras/$basearch/`,
388 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras`,
389 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6`,
390 | 1,
391 | `additional packages that may be useful`
392 | ) +
393 | "\n" +
394 | buildCentosSubBlock(
395 | `centosplus`,
396 | `Plus`,
397 | `https://mirrors.hit.edu.cn/centos/$releasever/centosplus/$basearch/`,
398 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus`,
399 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6`,
400 | 0,
401 | `additional packages that extend functionality of existing packages`
402 | ) +
403 | "\n" +
404 | buildCentosSubBlock(
405 | `contrib`,
406 | `Contrib`,
407 | `https://mirrors.hit.edu.cn/centos/$releasever/contrib/$basearch/`,
408 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib`,
409 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6`,
410 | 0,
411 | `contrib - packages by Centos Users`
412 | ) +
413 | "\n"
414 | );
415 | case 7:
416 | return (
417 | header +
418 | buildCentosSubBlock(
419 | `base`,
420 | `Base`,
421 | `https://mirrors.hit.edu.cn/centos/$releasever/os/$basearch/`,
422 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os`,
423 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7`,
424 | 1,
425 | ``
426 | ) +
427 | "\n" +
428 | buildCentosSubBlock(
429 | `updates`,
430 | `Updates`,
431 | `https://mirrors.hit.edu.cn/centos/$releasever/updates/$basearch/`,
432 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates`,
433 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7`,
434 | 1,
435 | `released updates`
436 | ) +
437 | "\n" +
438 | buildCentosSubBlock(
439 | `extras`,
440 | `Extras`,
441 | `https://mirrors.hit.edu.cn/centos/$releasever/extras/$basearch/`,
442 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras`,
443 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7`,
444 | 1,
445 | `additional packages that may be useful`
446 | ) +
447 | "\n" +
448 | buildCentosSubBlock(
449 | `centosplus`,
450 | `Plus`,
451 | `https://mirrors.hit.edu.cn/centos/$releasever/centosplus/$basearch/`,
452 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus`,
453 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7`,
454 | 0,
455 | `additional packages that extend functionality of existing packages`
456 | ) +
457 | "\n"
458 | );
459 | case 8:
460 | return (
461 | header +
462 | buildCentosSubBlock(
463 | `BaseOS`,
464 | `Base`,
465 | `https://mirrors.hit.edu.cn/centos/$releasever/BaseOS/$basearch/os/`,
466 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra`,
467 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial`,
468 | 1,
469 | ``
470 | ) +
471 | "\n" +
472 | buildCentosSubBlock(
473 | `AppStream`,
474 | `AppStream`,
475 | `https://mirrors.hit.edu.cn/centos/$releasever/AppStream/$basearch/os/`,
476 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra`,
477 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial`,
478 | 1,
479 | ``
480 | ) +
481 | "\n" +
482 | buildCentosSubBlock(
483 | `PowerTools`,
484 | `PowerTools`,
485 | `https://mirrors.hit.edu.cn/centos/$releasever/PowerTools/$basearch/os/`,
486 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra`,
487 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial`,
488 | 0,
489 | ``
490 | ) +
491 | "\n" +
492 | buildCentosSubBlock(
493 | `extras`,
494 | `Extras`,
495 | `https://mirrors.hit.edu.cn/centos/$releasever/extras/$basearch/os/`,
496 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras`,
497 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial`,
498 | 1,
499 | `additional packages that may be useful`
500 | ) +
501 | "\n" +
502 | buildCentosSubBlock(
503 | `centosplus`,
504 | `Plus`,
505 | `https://mirrors.hit.edu.cn/centos/$releasever/centosplus/$basearch/os/`,
506 | `http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus`,
507 | `file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial`,
508 | 0,
509 | `additional packages that extend functionality of existing packages`
510 | ) +
511 | "\n"
512 | );
513 | default:
514 | return "";
515 | }
516 | }
517 |
518 | /**
519 | * 构建OpenSUSE软件源配置的文本块的一个段落
520 | *
521 | * @param handle
522 | * @param name
523 | * @param path
524 | * @returns {string} 返回OpenSUSE软件源配置的文本块的一个段落
525 | */
526 | function buildOpensuseSubBlock(handle, name, path) {
527 | return (
528 | `[HIT:${handle}]\n` +
529 | `name=HIT:${name}\n` +
530 | `enabled=1\n` +
531 | `autorefresh=0\n` +
532 | `baseurl=https://mirrors.hit.edu.cn/opensuse/\n` +
533 | `path=${path}\n` +
534 | `type=rpm-md\n` +
535 | `keeppackages=0\n`
536 | );
537 | }
538 | /**
539 | * 构建OpenSUSE软件源配置的文本块
540 | *
541 | * @param version 版本号
542 | * @returns {string} 返回OpenSUSE软件源配置的文本块
543 | */
544 | function buildOpensuseBlock(version) {
545 | let header = `## How-to:
546 | ## 帮助:
547 | ## Run sudo zypper modifyrepo -ad to disable all repositories first
548 | ## 首先运行 sudo zypper modifyrepo -ad 来禁用所有软件源
549 | ## Save the content as HIT.repo file under /etc/zypp/repos.d/
550 | ## 将内容保存在 /etc/zypp/repos.d/ 下的 HIT.repo 中
551 | ## Note that autorefresh is disabled by default,run sudo zypper ref to refresh
552 | ## 注意自动刷新被默认禁用,运行 sudo zypper ref 来刷新
553 | `;
554 | var result = "";
555 | switch (version) {
556 | case "Leap 15.3+":
557 | result =
558 | buildOpensuseSubBlock(
559 | `repo-backports-update`,
560 | `Update repository of openSUSE Backports`,
561 | `/update/leap/$releasever/backports/`
562 | ) +
563 | buildOpensuseSubBlock(
564 | `repo-sle-update`,
565 | `Update repository with updates from SUSE Linux Enterprise 15`,
566 | `/update/leap/$releasever/sle/`
567 | );
568 | //For Leap 15.3+ ,append the content for Leap 15.2-
569 | case "Leap 15.2-":
570 | result +=
571 | buildOpensuseSubBlock(
572 | `repo-non-oss`,
573 | `Non-OSS Repository`,
574 | `/distribution/leap/$releasever/repo/non-oss/`
575 | ) +
576 | buildOpensuseSubBlock(
577 | `repo-oss`,
578 | `OSS Repository`,
579 | `/distribution/leap/$releasever/repo/oss/`
580 | ) +
581 | buildOpensuseSubBlock(
582 | `repo-update-non-oss`,
583 | `Update for non-oss software`,
584 | `/update/leap/$releasever/non-oss/`
585 | ) +
586 | buildOpensuseSubBlock(
587 | `repo-update`,
588 | `Main update repo`,
589 | `/update/leap/$releasever/oss`
590 | );
591 | return header + result;
592 | case "Tumbleweed":
593 | return (
594 | header +
595 | buildOpensuseSubBlock(
596 | `repo-oss`,
597 | `OSS Repository`,
598 | `/tumbleweed/repo/oss/`
599 | ) +
600 | buildOpensuseSubBlock(
601 | `repo-non-oss`,
602 | `Non-OSS Repository`,
603 | `/tumbleweed/repo/non-oss/`
604 | ) +
605 | buildOpensuseSubBlock(
606 | `repo-update`,
607 | `Update for OSS Repository`,
608 | `/update/tumbleweed/`
609 | ) +
610 | buildOpensuseSubBlock(
611 | `repo-update-non-oss`,
612 | `Update for Non-OSS Repository`,
613 | `/update/tumbleweed-non-oss/`
614 | )
615 | );
616 | default:
617 | return "";
618 | }
619 | }
620 |
--------------------------------------------------------------------------------
/src/components/homePage/sideCards/downloadFormCard.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { Button, Form, Modal, Row, Col, Cascader } from "antd";
3 | import { DownloadOutlined } from "@ant-design/icons";
4 |
5 | /**
6 | * 下载链接组件
7 | */
8 | export default class DownloadFormCard extends Component {
9 | state = {
10 | // 下载链接对话框可见性
11 | downloadFormVisible: false,
12 | // 选择的发行版的下载链接地址
13 | selectDistrib: undefined
14 | };
15 |
16 | /**
17 | * 显示下载链接对话框
18 | */
19 | showDownloadForm = () => {
20 | this.setState({ downloadFormVisible: true });
21 | };
22 |
23 | /**
24 | * 退出下载链接对话框
25 | */
26 | handleDownloadFormCancel = () => {
27 | this.setState({ downloadFormVisible: false });
28 | };
29 |
30 | /**
31 | * 确认选择发行版和版本
32 | *
33 | * @param selectedOptions 级联选择器各级的值。
34 | * 其中[0]为发行版名称,[1]为下载链接地址
35 | */
36 | onDownloadLinkChange = selectedOptions => {
37 | console.log(selectedOptions);
38 | this.setState({ selectDistrib: selectedOptions[1] });
39 | };
40 |
41 | render() {
42 | return (
43 |
44 |
下载链接
45 |
各大主流Linux发行版的ISO文件下载
46 |
}
49 | onClick={this.showDownloadForm}
50 | >
51 | 获取下载链接
52 |
53 |
59 |
61 |
62 |
63 |
69 |
70 |
71 | }
74 | href={this.state.selectDistrib}
75 | >
76 | 下载
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/src/components/homePage/sideCards/helpCard.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import { LinkOutlined } from "@ant-design/icons";
3 | import "./sideCards.css";
4 |
5 | export default class HelpCard extends Component {
6 | render() {
7 | return (
8 |
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/components/homePage/sideCards/sideCards.css:
--------------------------------------------------------------------------------
1 | .side-card {
2 | margin-bottom: 30px;
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/homePage/sideCards/sideCards.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from "react";
2 | import DownloadFormCard from "./downloadFormCard";
3 | import ConfigGeneratorCard from "./configGeneratorCard";
4 | import HelpCard from "./helpCard";
5 | import axios from "axios";
6 | import "./sideCards.css";
7 |
8 | export default class SideCards extends Component {
9 | state = {
10 | // ISO下载链接
11 | isoLinks: null,
12 | // 发行版的版本名,及对应的版本号或版本别名
13 | config: null
14 | };
15 |
16 | /**
17 | * 获取ISO下载链接
18 | */
19 | fetch_iso_links = () => {
20 | this.setState({
21 | fetching_slots: true
22 | });
23 | axios({
24 | url: "/static/isoLinks.json",
25 | method: "get"
26 | }).then(response => {
27 | const isoLinks = response.data;
28 | console.log(isoLinks);
29 | this.setState({
30 | isoLinks: isoLinks
31 | });
32 | });
33 | };
34 |
35 | /**
36 | * 获取发行版的版本名,及对应的版本号或版本别名
37 | */
38 | fetch_config = () => {
39 | this.setState({
40 | fetching_slots: true
41 | });
42 | axios({
43 | url: "/static/config.json",
44 | method: "get"
45 | }).then(response => {
46 | const config = response.data;
47 | console.log(config);
48 | this.setState({
49 | config: config
50 | });
51 | });
52 | };
53 |
54 | componentDidMount() {
55 | this.fetch_iso_links();
56 | this.fetch_config();
57 | }
58 |
59 | render() {
60 | return (
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | overflow-x: hidden;
6 | }
7 |
8 | html {
9 | overflow-x: hidden;
10 | }
11 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { createRoot } from 'react-dom/client';
3 | import "./index.css";
4 | import App from "./App";
5 | import { HashRouter } from "react-router-dom";
6 |
7 | const container = document.getElementById("root");
8 |
9 | const root = createRoot(container);
10 |
11 | root.render(
12 |
13 |
14 |
15 | );
16 |
--------------------------------------------------------------------------------