Skip to content

Commit 6cc09b4

Browse files
committed
callback
1 parent 0f7b81f commit 6cc09b4

File tree

2 files changed

+64
-51
lines changed

2 files changed

+64
-51
lines changed

src/Home.css

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,25 @@
3535
height: 2em;
3636
}
3737

38-
.Home .description {
39-
font: 300 140% aller, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;
40-
clear: both;
41-
margin-top: 1rem;
38+
.Home section {
4239
text-align: center;
43-
padding: 1rem;
4440
}
4541

46-
.Home section {
42+
.Home section:not(:last-child) {
4743
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
44+
padding: 1rem 0;
45+
}
46+
47+
.Home section.description {
48+
font: 300 140% aller, Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;
49+
clear: both;
50+
margin-top: 1rem;
4851
text-align: center;
52+
padding: 4rem;
4953
}
5054

51-
.Home section h2 {
55+
.Home section h2,
56+
.Home section h4 {
5257
text-align: center;
5358
margin: 2rem 0;
5459
padding: 0;
@@ -61,14 +66,23 @@
6166
padding: 0;
6267
}
6368

64-
.Home .project-handlers-buttons button {
69+
.Home .project-handlers-buttons button,
70+
.Home .project-handlers-buttons a {
71+
display: inline-block;
6572
padding: 0 3rem;
6673
height: 7rem;
6774
width: 100%;
6875
margin-bottom: 1rem;
6976
}
7077

71-
.Home .project-handlers-buttons button .material-icons {
78+
.Home .project-handlers-buttons a{
79+
background-color: green;
80+
color: white;
81+
82+
}
83+
84+
.Home .project-handlers-buttons button .material-icons,
85+
.Home .project-handlers-buttons a .material-icons {
7286
position: relative;
7387
top: -2px;
7488
width: 3rem;

src/Home.js

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ import React from 'react';
22
import Footer from './Footer';
33
import Button from 'rmwc/Button';
44
import Icon from 'rmwc/Icon';
5+
import { withRouter } from 'react-router-dom';
56

67
import logo from './assets/images/hand-yellow.svg'
78
import github from './assets/images/github.svg'
89
import gitlab from './assets/images/gitlab.svg'
910
import trello from './assets/images/trello.svg'
1011
import './Home.css'
1112

13+
const base = window.location.href + 'callback'
14+
const EXTERNAL_ROUTES = {
15+
GITHUB: 'https://github.com/login/oauth/authorize?client_id=0e8a63320fba47de145c&scope=repos&redirect_uri=' + base + '/github',
16+
};
1217

1318
const Home = () => (
1419
<div className="Home">
@@ -17,49 +22,43 @@ const Home = () => (
1722
<h1 className="text">CODEROCKR WAY PROJECT SETUP</h1>
1823
</header>
1924
<div className="container">
20-
<section className="description">
21-
<p>
22-
This web client helps to setup a project at GitHub, GitLab or Trello to use the
23-
Coderockr Way's labels, making easier to bootstrap the basic configuration at
24-
your project.
25+
<section className="description">
26+
<p>
27+
This web client helps to setup a project at GitHub, GitLab or Trello to use the
28+
Coderockr Way's labels, making easier to bootstrap the basic configuration at
29+
your project.
30+
</p>
31+
</section>
32+
<section className="project-handlers">
33+
<h2>Where is your project?</h2>
34+
<ul className="row project-handlers-buttons justify-content-md-center">
35+
<li className="col-md-4">
36+
<a class="button" href={EXTERNAL_ROUTES.GITHUB}>
37+
<Icon children={github} />
38+
GitHub
39+
</a>
40+
</li>
41+
<li className="col-md-4">
42+
<Button disabled raised>
43+
<Icon children={gitlab} />
44+
GitLab
45+
</Button>
46+
</li>
47+
<li className="col-md-4">
48+
<Button disabled raised>
49+
<Icon children={trello} />
50+
Trello
51+
</Button>
52+
</li>
53+
</ul>
54+
</section>
55+
<section className="more-about">
56+
<h4>Wanna know more about?</h4>
57+
<p>Look this link: <a href="https://blog.coderockr.com/simplificando-o-setup-de-projetos-no-github-f29b76c83194">Simplificando o Setup de Projetos no GitHub</a>
2558
</p>
26-
</section>
27-
<section className="project-handlers">
28-
<h2>Where is your project?</h2>
29-
<ul className="row project-handlers-buttons justify-content-md-center">
30-
<li className="col-md-4">
31-
<Button raised>
32-
<Icon children={github} />
33-
GitHub
34-
</Button>
35-
</li>
36-
<li className="col-md-4">
37-
<Button raised>
38-
<Icon children={gitlab} />
39-
GitLab
40-
</Button>
41-
</li>
42-
<li className="col-md-4">
43-
<Button raised>
44-
<Icon children={trello} />
45-
Trello
46-
</Button>
47-
</li>
48-
</ul>
49-
</section>
50-
<section className="more-about">
51-
<h2>Wanna know more about?</h2>
52-
<p>Look this links:</p>
53-
<ul>
54-
<li>
55-
<a href="https://blog.coderockr.com/simplificando-o-setup-de-projetos-no-github-f29b76c83194">
56-
Simplificando o Setup de Projetos no GitHub
57-
</a>
58-
</li>
59-
</ul>
60-
</section>
59+
</section>
6160
</div>
6261
</div>
63-
);
62+
)
6463

65-
export default Home;
64+
export default withRouter(Home);

0 commit comments

Comments
 (0)