Commit 937348bb authored by web's avatar web

font up

parent c0152a50
No preview for this file type
node_modules
build
dist
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
**/node_modules
# roadhog-api-doc ignore
/src/utils/request-temp.js
_roadhog-api-doc
# production
/dist
# misc
.DS_Store
npm-debug.log*
yarn-error.log
/coverage
.idea
yarn.lock
package-lock.json
*bak
.vscode
# visual studio code
.history
*.log
functions/*
.temp/**
# umi
.umi
.umi-production
.umi-test
# screenshot
screenshot
.firebase
.eslintcache
build
No preview for this file type
No preview for this file type
@font-face {
font-family: 'SourceHanSansSC-Bold';
src: url('./SourceHanSansSC-Bold.woff2') format('woff2');
font-family: 'OpenSans-Bold';
src: url('./OpenSans-Bold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'SourceHanSansSC-Heavy';
src: url('./SourceHanSansSC-Heavy.woff2') format('woff2');
font-family: 'OpenSans-ExtraBold';
src: url('./OpenSans-ExtraBold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'SourceHanSansSC-Medium';
src: url('./SourceHanSansSC-Medium.woff2') format('woff2');
font-family: 'OpenSans-SemiBold';
src: url('./OpenSans-SemiBold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'SourceHanSansSC-Regular';
src: url('./SourceHanSansSC-Regular.woff2') format('woff2');
font-family: 'OpenSans-Regular';
src: url('./OpenSans-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
\ No newline at end of file
$font_sc_Bold: 'SourceHanSansSC-Bold';
$font_sc_Heavy: 'SourceHanSansSC-Heavy';
$font_sc_Medium: 'SourceHanSansSC-Medium';
$font_sc_Regular: 'SourceHanSansSC-Regular';
\ No newline at end of file
......@@ -21,7 +21,7 @@ const CodeSnippet = ({ code, isHome, lang }) => {
<CopyToClipboard text={code} onCopy={handleCopy}>
<img className='absolute top-2 right-4 cursor-pointer' style={{height: '1.25vw', width: '1.25vw'}} src={require('../assets/images/playground/copy.png')} alt="" />
</CopyToClipboard>
<SyntaxHighlighter language={lang} customStyle={{ margin: 0, height: '100%', backgroundColor: '#22075E', fontSize: '.83vw', fontWeight: 400, color: '#fff', textShadow: 'none', fontFamily: 'SourceHanSansSC-Regular' }}>
<SyntaxHighlighter language={lang} customStyle={{ margin: 0, height: '100%', backgroundColor: '#22075E', fontSize: '.83vw', fontWeight: 400, color: '#fff', textShadow: 'none', fontFamily: 'OpenSans-Regular' }}>
{code && code.length ? code : "Stay tuned, we'll be here soon"}
</SyntaxHighlighter>
</div>
......
......@@ -56,7 +56,7 @@ header {
padding: 2.05vw 6.15vw;
font-size: 2.56vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
display: flex;
flex-direction: row;
......
......@@ -5,7 +5,7 @@
body {
margin: 0;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
......
......@@ -22,7 +22,7 @@
.banner_text {
padding: 0 6.15vw;
font-size: 5.13vw;
font-family: SourceHanSansSC-Heavy;
font-family: OpenSans-ExtraBold;
font-weight: 800;
text-align: center;
color: #fff;
......@@ -43,7 +43,7 @@
.banner_text_des {
padding: 0 6.15vw;
font-size: 2.05vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: center;
color: #FFFFFF;
......@@ -57,7 +57,7 @@
border-radius: 26.04vw;
border: .26vw solid #722ED1;
font-size: 2.56vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 700;
color: #ffffff;
cursor: pointer;
......@@ -201,7 +201,7 @@
font-size: 2.56vw;
line-height: 4.1vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #bfbfbf;
......@@ -216,7 +216,7 @@
padding: 1.03vw 2.05vw;
font-size: 2.56vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #bfbfbf;
......@@ -264,7 +264,7 @@
.times {
font-size: 2.05vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #ffffff;
......@@ -295,7 +295,7 @@
padding: 1.03vw 2.05vw;
font-size: 2.56vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #22075e;
......@@ -327,7 +327,7 @@
align-items: center;
font-size: 2.56vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 700;
color: #fff;
}
......@@ -360,7 +360,7 @@
.moreModels {
font-size: 2.56vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 500;
margin: 0 auto;
color: #FFFFFF;
......@@ -402,7 +402,7 @@
.white_text {
font-size: 5.13vw;
font-family: SourceHanSansSC-Heavy;
font-family: OpenSans-ExtraBold;
font-weight: 800;
text-align: left;
color: #fff;
......@@ -432,7 +432,7 @@
.tit {
font-size: 3.08vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: bold;
text-align: left;
color: #ffffff;
......@@ -440,7 +440,7 @@
.right_item_content {
font-size: 2.56vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
text-align: left;
color: #ffffff;
......@@ -482,7 +482,7 @@
.fifth_page_tit {
font-size: 5.13vw;
line-height: 8.21vw;
font-family: SourceHanSansSC-Heavy;
font-family: OpenSans-ExtraBold;
font-weight: 800;
text-align: left;
color: #ffffff;
......@@ -514,7 +514,7 @@
&>span {
font-size: 2.56vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
text-align: left;
color: #ffffff;
......@@ -534,7 +534,7 @@
justify-content: center;
align-items: center;
font-size: 2.56vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 700;
color: #722ED1;
margin-top: 5.73vw;
......@@ -555,7 +555,7 @@
.sixth_page_tit {
font-size: 5.13vw;
line-height: 8.21vw;
font-family: SourceHanSansSC-Heavy;
font-family: OpenSans-ExtraBold;
font-weight: 800;
text-align: left;
color: #FFFFFF;
......@@ -614,13 +614,13 @@
align-items: flex-start;
p:first-child {
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-size: 2.05vw;
color: #000000;
}
p:last-child {
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
font-size: 1.54vw;
color: #531DAB;
......@@ -629,7 +629,7 @@
}
.bottom_content {
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
font-size: 2.05vw;
color: #000000;
......@@ -685,7 +685,7 @@
}
p {
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-size: 2.05vw;
color: #FFFFFF;
}
......@@ -721,7 +721,7 @@
// width: 21.67vw;
// height: 5vw;
// font-size: 1.25vw;
// font-family: SourceHanSansSC-Medium;
// font-family: OpenSans-SemiBold;
// font-weight: 500;
// text-align: left;
// color: #ffffff;
......@@ -744,7 +744,7 @@
// span {
// font-size: 1.25vw;
// font-family: SourceHanSansSC-Heavy;
// font-family: OpenSans-ExtraBold;
// font-weight: 800;
// color: #b37feb;
// }
......@@ -767,7 +767,7 @@
// li {
// margin-bottom: 1.09vw;
// font-size: 1.25vw;
// font-family: SourceHanSansSC-Medium;
// font-family: OpenSans-SemiBold;
// font-weight: 500;
// text-align: left;
// color: #ffffff;
......
......@@ -19,12 +19,12 @@
line-height: 6.67vw;
color: #fff;
text-align: left;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
}
.info_text {
font-size: 2.56vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
line-height: 5.13vw;
margin-top: 6.15vw;
}
......
......@@ -14,7 +14,7 @@
.model_name {
font-size: 1.25vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: bold;
color: #FFFFFF;
}
......@@ -30,7 +30,7 @@
border-radius: 2px;
padding: .21vw;
font-size: 12px;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
color: #FFFFFF;
margin-right: .42vw;
......@@ -72,7 +72,7 @@
.ant-select-single .ant-select-selector {
font-size: .83vw;
padding: 0;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
}
.ant-select .ant-select-selection-item {
......@@ -95,7 +95,7 @@
width: auto;
height: 2.08vw;
font-size: .83vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
border-radius: 1.67vw;
background-color: #fff;
......@@ -120,7 +120,7 @@
.ant-tabs .ant-tabs-tab {
font-size: 1.04vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
padding: .21vw 0 .31vw;
color: #FFFFFF;
......@@ -159,7 +159,7 @@
.ant-form-item .ant-form-item-label>label {
font-size: .83vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 700;
color: #FFFFFF;
}
......@@ -195,7 +195,7 @@
.ant-select-single .ant-select-selector {
font-size: .83vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
}
.ant-select .ant-select-selection-item {
......@@ -221,7 +221,7 @@
.ant-input {
font-size: .83vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
color: #FFFFFF;
}
......@@ -231,7 +231,7 @@
height: 2.19vw;
width: 4.48vw;
font-size: .83vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
color: #FFFFFF;
}
......@@ -322,7 +322,7 @@
}
.ant-checkbox-wrapper {
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-size: .83vw;
color: #FFFFFF;
}
......@@ -346,7 +346,7 @@
height: 2.08vw;
border-radius: 1.67vw;
font-size: .83vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
background-color: #fff;
color: #722ED1;
}
......@@ -444,7 +444,7 @@
font-size: 1.04vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #bfbfbf;
......@@ -460,7 +460,7 @@
padding: .52vw .83vw .68vw;
font-size: 1.04vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #bfbfbf;
......@@ -513,7 +513,7 @@
.times {
font-size: 1.04vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-align: left;
color: #ffffff;
......@@ -637,7 +637,7 @@
.itemLabel {
font-size: .83vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 700;
color: #fff;
......@@ -663,7 +663,7 @@
padding: .89vw .83vw;
font-size: .83vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
color: #fff;
......@@ -675,7 +675,7 @@
.toLogin {
font-size: .83vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
text-decoration: underline;
text-align: left;
......@@ -712,7 +712,7 @@
.ant-tabs .ant-tabs-tab {
font-size: .83vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
color: #fff;
padding: .31vw 1.15vw .42vw;
......
......@@ -41,7 +41,7 @@
padding: 1.03vw 5.38vw;
height: 6.15vw;
font-size: 2.56vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
display: inline-flex;
align-items: center;
......@@ -69,7 +69,7 @@
span {
font-size: 2.56vw;
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
font-weight: 400;
color: #bfbfbf;
}
......@@ -113,7 +113,7 @@
justify-content: center;
padding: 1.03vw;
font-size: 2.05vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
color: #FFFFFF;
background: #391085;
......@@ -130,7 +130,7 @@
.name {
font-size: 4.1vw;
font-family: SourceHanSansSC-Bold;
font-family: OpenSans-Bold;
font-weight: 700;
color: #FFFFFF;
margin: 4.1vw 0 2.05vw;
......@@ -145,7 +145,7 @@
.desc {
font-size: 2.56vw;
font-family: SourceHanSansSC-Medium;
font-family: OpenSans-SemiBold;
font-weight: 500;
color: #FFFFFF;
display: -webkit-box;
......
......@@ -4,7 +4,7 @@ $white: #fff;
$themeColor: #722ED1;
body {
font-family: SourceHanSansSC-Regular;
font-family: OpenSans-Regular;
background: #000000;
color: #fff;
}
......
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = Fetch_;
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function Fetch_(url) {
var options,
token,
headers,
fetchOptions,
response,
resToken,
data,
_args = arguments;
return regeneratorRuntime.async(function Fetch_$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
_context.prev = 1;
// 从 localStorage 中获取 token,你也可以从其他地方获取
token = localStorage.getItem('token');
console.log(token); // 设置请求头部,将 token 添加到 Authorization 头中
headers = _objectSpread({
'Content-Type': 'application/json',
'Authorization': "".concat(token)
}, options.headers);
fetchOptions = _objectSpread({}, options, {
headers: headers
}); // 发送请求
_context.next = 8;
return regeneratorRuntime.awrap(fetch(url, fetchOptions));
case 8:
response = _context.sent;
console.log(response); // 检查是否请求成功
if (response.ok) {
_context.next = 13;
break;
}
if (response.status === 401) {
localStorage.removeItem('token');
}
throw new Error("Request failed with status ".concat(response.status));
case 13:
// 从 response headers 中获取 token
resToken = response.headers.get('Authorization'); // 将 token 存储到 localStorage 中
if (resToken) {
localStorage.setItem('token', resToken);
} // 解析响应体并返回
_context.next = 17;
return regeneratorRuntime.awrap(response.json());
case 17:
data = _context.sent;
return _context.abrupt("return", data);
case 21:
_context.prev = 21;
_context.t0 = _context["catch"](1);
console.error('Error:', _context.t0);
throw _context.t0;
case 25:
case "end":
return _context.stop();
}
}
}, null, null, [[1, 21]]);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment