Rename to Git History

This commit is contained in:
Rodrigo Pombo 2019-02-08 00:01:26 -03:00
parent e0e4efa12a
commit 6a0fa5fa82
5 changed files with 19 additions and 18 deletions

View File

@ -1,5 +1,5 @@
{
"name": "github-history",
"name": "githistory",
"version": "0.1.0",
"private": true,
"dependencies": {

View File

@ -23,7 +23,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Github History</title>
<title>Git History</title>
<style>
html {
height: 100%;
@ -61,8 +61,8 @@
<body>
<div id="root"></div>
<footer>
<a href="https://github.com/pomber/github-history">GitHub History</a
><br />by <a href="https://twitter.com/pomber">@pomber</a>
<a href="https://github.com/pomber/git-history">Git History</a><br />by
<a href="https://twitter.com/pomber">@pomber</a>
</footer>
<!--
This HTML file is a template.

View File

@ -1,6 +1,6 @@
{
"short_name": "Github History",
"name": "Github History",
"short_name": "Git History",
"name": "Git History",
"icons": [
{
"src": "favicon.ico",

View File

@ -1,9 +1,9 @@
# [GitHub History](https://github-history.netlify.com)
# [Git History](https://githistory.xyz)
Browse the history of any file from GitHub with style
<div align="center">
<a href="https://github-history.netlify.com/babel/babel/blob/master/packages/babel-core/test/browserify.js">
<a href="https://github.githistory.xyz/babel/babel/blob/master/packages/babel-core/test/browserify.js">
<img alt="demo" src="https://user-images.githubusercontent.com/1911623/52311598-4581c600-2986-11e9-8c39-f1dfb7c13937.gif" />
</a>
</div>

View File

@ -6,11 +6,7 @@ export default function AppWrapper(props) {
if (props.repo) {
return <App {...props} />;
} else {
return (
<Center>
<Landing />
</Center>
);
return <Landing />;
}
}
@ -31,17 +27,22 @@ function Center({ children }) {
}
function Landing() {
const url = `${window.location.protocol}//${
window.location.host
}/babel/babel/blob/master/packages/babel-core/test/browserify.js`;
return (
<p>
URL should be something like
https://github-history.netlify.com/user/repo/commits/master/path/to/file.js
</p>
<Center>
<p>Try something like: </p>
<a style={{ color: "rgb(173, 219, 103)" }} href={url}>
{url}
</a>
</Center>
);
}
function App({ repo, sha, path, lang }) {
const fileName = path.split("/").pop();
useDocumentTitle(`GitHub History - ${fileName}`);
useDocumentTitle(`Git History - ${fileName}`);
const { commits, loading, error } = useCommitsFetcher({
repo,