Skip to content

Commit 6112130

Browse files
committed
Add docusaurus
1 parent 55384f0 commit 6112130

File tree

15 files changed

+7950
-0
lines changed

15 files changed

+7950
-0
lines changed

package-lock.json

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "learn-css-grid",
3+
"version": "1.0.0",
4+
"description": "Learn to master CSS grid",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/luctst/learn-css-grid.git"
12+
},
13+
"keywords": [],
14+
"author": "",
15+
"license": "ISC",
16+
"bugs": {
17+
"url": "https://github.com/luctst/learn-css-grid/issues"
18+
},
19+
"homepage": "https://github.com/luctst/learn-css-grid#readme",
20+
"dependencies": {
21+
"docusaurus-init": "^1.0.2"
22+
}
23+
}

website/core/Footer.js

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/**
2+
* Copyright (c) 2017-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
const React = require('react');
9+
10+
class Footer extends React.Component {
11+
docUrl(doc, language) {
12+
const baseUrl = this.props.config.baseUrl;
13+
return baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
14+
}
15+
16+
pageUrl(doc, language) {
17+
const baseUrl = this.props.config.baseUrl;
18+
return baseUrl + (language ? language + '/' : '') + doc;
19+
}
20+
21+
render() {
22+
const currentYear = new Date().getFullYear();
23+
return (
24+
<footer className="nav-footer" id="footer">
25+
<section className="sitemap">
26+
<a href={this.props.config.baseUrl} className="nav-home">
27+
{this.props.config.footerIcon && (
28+
<img
29+
src={this.props.config.baseUrl + this.props.config.footerIcon}
30+
alt={this.props.config.title}
31+
width="66"
32+
height="58"
33+
/>
34+
)}
35+
</a>
36+
<div>
37+
<h5>Docs</h5>
38+
<a href={this.docUrl('doc1.html', this.props.language)}>
39+
Getting Started (or other categories)
40+
</a>
41+
<a href={this.docUrl('doc2.html', this.props.language)}>
42+
Guides (or other categories)
43+
</a>
44+
<a href={this.docUrl('doc3.html', this.props.language)}>
45+
API Reference (or other categories)
46+
</a>
47+
</div>
48+
<div>
49+
<h5>Community</h5>
50+
<a href={this.pageUrl('users.html', this.props.language)}>
51+
User Showcase
52+
</a>
53+
<a
54+
href="http://stackoverflow.com/questions/tagged/"
55+
target="_blank"
56+
rel="noreferrer noopener">
57+
Stack Overflow
58+
</a>
59+
<a href="https://discordapp.com/">Project Chat</a>
60+
<a
61+
href="https://twitter.com/"
62+
target="_blank"
63+
rel="noreferrer noopener">
64+
Twitter
65+
</a>
66+
</div>
67+
<div>
68+
<h5>More</h5>
69+
<a href={this.props.config.baseUrl + 'blog'}>Blog</a>
70+
<a href="https://github.com/">GitHub</a>
71+
<a
72+
className="github-button"
73+
href={this.props.config.repoUrl}
74+
data-icon="octicon-star"
75+
data-count-href="/facebook/docusaurus/stargazers"
76+
data-show-count={true}
77+
data-count-aria-label="# stargazers on GitHub"
78+
aria-label="Star this project on GitHub">
79+
Star
80+
</a>
81+
</div>
82+
</section>
83+
84+
<a
85+
href="https://code.facebook.com/projects/"
86+
target="_blank"
87+
rel="noreferrer noopener"
88+
className="fbOpenSource">
89+
<img
90+
src={this.props.config.baseUrl + 'img/oss_logo.png'}
91+
alt="Facebook Open Source"
92+
width="170"
93+
height="45"
94+
/>
95+
</a>
96+
<section className="copyright">{this.props.config.copyright}</section>
97+
</footer>
98+
);
99+
}
100+
}
101+
102+
module.exports = Footer;

0 commit comments

Comments
 (0)