This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Read news from My JSON Server (#240)
* feat: read news from My JSON Server * feat: match language * fix eslint warnings * fix eslint * tweak code
- Loading branch information
Showing
5 changed files
with
64 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 45 additions & 57 deletions
102
@antv/gatsby-theme-antv/site/components/CodeLoading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,50 @@ | ||
import React from 'react'; | ||
|
||
export default function CodeLoading() { | ||
return ( | ||
<div | ||
style={{ | ||
position: 'relative', | ||
height: '100%', | ||
}} | ||
> | ||
<div className="code-loading"> | ||
<div> | ||
<div className="loader"> | ||
<svg viewBox="0 0 80 80"> | ||
<defs> | ||
<linearGradient | ||
id="gradient" | ||
x1=".004%" | ||
x2="100.131%" | ||
y1="49.993%" | ||
y2="49.993%" | ||
> | ||
<stop offset="0%" stopColor="#6500FF" /> | ||
<stop offset="16%" stopColor="#6A09FF" /> | ||
<stop offset="43%" stopColor="#7623FF" /> | ||
<stop offset="77%" stopColor="#8A4CFF" /> | ||
<stop offset="99%" stopColor="#996BFF" /> | ||
</linearGradient> | ||
</defs> | ||
<circle | ||
id="test" | ||
cx="40" | ||
cy="40" | ||
r="32" | ||
stroke="url(#gradient)" | ||
/> | ||
</svg> | ||
</div> | ||
<div className="loader triangle"> | ||
<svg viewBox="0 0 86 80"> | ||
<polygon points="43 8 79 72 7 72" stroke="url(#gradient)" /> | ||
</svg> | ||
</div> | ||
<div className="loader"> | ||
<svg viewBox="0 0 80 80"> | ||
<rect | ||
x="8" | ||
y="8" | ||
width="64" | ||
height="64" | ||
stroke="url(#gradient)" | ||
/> | ||
</svg> | ||
</div> | ||
<div className="loading-text"> | ||
<p>Loading...</p> | ||
</div> | ||
const CodeLoading: React.FC = () => ( | ||
<div | ||
style={{ | ||
position: 'relative', | ||
height: '100%', | ||
}} | ||
> | ||
<div className="code-loading"> | ||
<div> | ||
<div className="loader"> | ||
<svg viewBox="0 0 80 80"> | ||
<defs> | ||
<linearGradient | ||
id="gradient" | ||
x1=".004%" | ||
x2="100.131%" | ||
y1="49.993%" | ||
y2="49.993%" | ||
> | ||
<stop offset="0%" stopColor="#6500FF" /> | ||
<stop offset="16%" stopColor="#6A09FF" /> | ||
<stop offset="43%" stopColor="#7623FF" /> | ||
<stop offset="77%" stopColor="#8A4CFF" /> | ||
<stop offset="99%" stopColor="#996BFF" /> | ||
</linearGradient> | ||
</defs> | ||
<circle id="test" cx="40" cy="40" r="32" stroke="url(#gradient)" /> | ||
</svg> | ||
</div> | ||
<div className="loader triangle"> | ||
<svg viewBox="0 0 86 80"> | ||
<polygon points="43 8 79 72 7 72" stroke="url(#gradient)" /> | ||
</svg> | ||
</div> | ||
<div className="loader"> | ||
<svg viewBox="0 0 80 80"> | ||
<rect x="8" y="8" width="64" height="64" stroke="url(#gradient)" /> | ||
</svg> | ||
</div> | ||
<div className="loading-text"> | ||
<p>Loading...</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
</div> | ||
); | ||
|
||
export default CodeLoading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters