Files
test-repo/website/core/Footer.js
T
Lucas Azzola 800a1cf9d4 Add Blog, Populate with Release Notes (#3604)
* Add blog

* Rename files, add extra #

* Improve formatting

* Convert pull-request links

* Fix typo

* Update links in CHANGELOG.md, lint docs

* Add missing parens

* Remove banner images

* Add 1.0 release blog post

* Fix encoding bug

* Add truncate to 1.0 blog post

* TS syntax highlighting looks better than JS highlighting on Flow

* Add introductory sentences to older posts

* More highlighting fixes

* Fix mistake

* Fix more highlighting errors

* More highlighting fixes

* Add CSS fix

* fix truncate on 1.9.0 post

* fix truncate on 1.0.0 post

* Fix additional # and my name in 1.0.0

* Restore js -> ts on codeblocks
2017-12-31 15:23:17 +11:00

85 lines
2.4 KiB
JavaScript

"use strict";
const React = require("react");
const GithubButton = props => (
<a
className="github-button"
href={props.config.githubUrl}
data-icon="octicon-star"
data-count-href={`/${props.config.repo}/stargazers`}
data-count-api={`/repos/${props.config.repo}#stargazers_count`}
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub"
>
Star
</a>
);
GithubButton.propTypes = {
config: React.PropTypes.object
};
class Footer extends React.Component {
url(path) {
return this.props.config.baseUrl + "docs/" + this.props.language + path;
}
render() {
// const currentYear = new Date().getFullYear();
return (
<footer className="nav-footer" id="footer">
<section className="sitemap">
<a href={this.props.config.baseUrl} className="nav-home">
<img
src={this.props.config.baseUrl + this.props.config.footerIcon}
alt={this.props.config.title}
/>
</a>
<div>
<h5>Docs</h5>
<a href={this.url("/index.html")}>About</a>
<a href={this.url("/install.html")}>Usage</a>
</div>
<div>
<h5>Community</h5>
<a
href={this.props.config.baseUrl + this.props.language + "/users/"}
>
User Showcase
</a>
<a
href="http://stackoverflow.com/questions/tagged/prettier"
target="_blank"
rel="noopener noreferrer"
>
Stack Overflow
</a>
<a href="https://gitter.im/jlongster/prettier">Chat on Gitter</a>
<a href="https://twitter.com/PrettierCode">
<img
alt="Follow Prettier on Twitter"
src="https://img.shields.io/twitter/follow/prettiercode.svg?label=Follow+Prettier&style=social"
/>
</a>
</div>
<div>
<h5>More</h5>
<a href={this.props.config.baseUrl + "blog"}>Blog</a>
<a href={this.props.config.githubUrl}>GitHub</a>
<a href={this.props.config.githubUrl + "/issues"}>Issues</a>
<GithubButton config={this.props.config} />
</div>
</section>
</footer>
);
}
}
Footer.propTypes = {
language: React.PropTypes.string,
config: React.PropTypes.object
};
module.exports = Footer;