Skip to content

Commit ca0e8c7

Browse files
committed
travis ci integration
1 parent ed9dc61 commit ca0e8c7

File tree

20 files changed

+168
-82
lines changed

20 files changed

+168
-82
lines changed

.tavis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
node_js:
3+
- 10
4+
branches:
5+
only:
6+
- master
7+
8+
script:
9+
- bash ./deploy.sh

deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rm -rf build/
2+
npm install
3+
npm run build
4+
openssl aes-256-cbc -a -d -in key.pem.enc -out key.pem -k $ENC_KEY
5+
chmod 600 key.pem
6+
ssh -o StrictHostKeyChecking=no -i key.pem -p 65002 $USER@$SERVER "rm -rf domains/gitstats.me/public_html/*"
7+
scp -o StrictHostKeyChecking=no -P 65002 -i key.pem -r build/* $USER@$SERVER:domains/gitstats.me/public_html

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"@nivo/bar": "^0.61.1",
1111
"@nivo/pie": "^0.61.1",
1212
"@sentry/browser": "^5.15.5",
13-
1413
"@testing-library/jest-dom": "^4.2.4",
1514
"@testing-library/react": "^9.5.0",
1615
"@testing-library/user-event": "^7.2.1",
@@ -22,7 +21,9 @@
2221
"react": "^16.13.1",
2322
"react-debounce-input": "^3.2.2",
2423
"react-dom": "^16.13.1",
24+
"react-ga": "^2.7.0",
2525
"react-router-dom": "^5.1.2",
26+
"react-router-ga": "^1.2.3",
2627
"react-scripts": "3.4.1",
2728
"react-share": "^4.1.0"
2829
},

public/.htaccess

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# config for apache server
2+
3+
# to enable https // if no ssl disable this
4+
RewriteEngine On
5+
RewriteCond %{HTTPS} off
6+
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
7+
###########################
8+
9+
10+
# for react routing
11+
# to redirect every req to index.html
12+
Options -MultiViews
13+
RewriteEngine On
14+
# RewriteCond %{HTTPS} off
15+
RewriteCond %{REQUEST_FILENAME} !-f
16+
RewriteRule ^ index.html [QSA,L]
17+
18+
19+

public/index.html

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="utf-8" />
56
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
67
<meta name="viewport" content="width=device-width, initial-scale=1" />
78
<meta name="theme-color" content="#000000" />
8-
<meta
9-
name="description"
10-
content="GitStats - An open-source contribution analyzer"/>
9+
<meta name="description" content="GitStats - An open-source Github contribution analyzer" />
1110
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.svg" />
12-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
11+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
12+
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
1313
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
14-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
15-
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
14+
<script async defer src="https://buttons.github.io/buttons.js"></script>
1615
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
1716
<title>GitStats - An open-source contribution analyzer </title>
1817
</head>
18+
1919
<body class="night-mode">
2020
<noscript>You need to enable JavaScript to run this app.</noscript>
2121
<div id="root"></div>
22-
23-
<!-- Global site tag (gtag.js) - Google Analytics -->
24-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-132223767-1"></script>
25-
<script>
26-
window.dataLayer = window.dataLayer || [];
27-
function gtag(){dataLayer.push(arguments);}
28-
gtag('js', new Date());
29-
30-
gtag('config', 'UA-132223767-1');
31-
</script>
32-
3322
</body>
34-
</html>
23+
24+
</html>

public/sitemap.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
2+
<url>
3+
<loc>https://gitstats.me/</loc>
4+
<lastmod>2020-04-26T21:11:22+00:00</lastmod>
5+
</url>
6+
</urlset>

src/App.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
import React from 'react';
2-
import Home from'./Components/Views/Home'
2+
import Home from './Components/Views/Home'
33
import './App.scss';
44
import { BrowserRouter as Router } from "react-router-dom"
55
import LandingPage from './Components/Views/LandingPage'
66
import { Route, Switch } from "react-router"
7-
7+
import Analytics from 'react-router-ga';
88

99
function App() {
1010
return (
1111
<div className="App">
1212
<Router>
13+
<Analytics id={window.GA_CODE} trackPathnameOnly>
1314
<Switch>
1415
<Route path="/" exact component={LandingPage} />
15-
<Route path="/:username" exact component={Home}/>
16+
<Route path="/:username" exact component={Home} />
1617
</Switch>
18+
</Analytics>
1719
</Router>
1820
</div>
1921
);
20-
}
22+
}
2123

2224
export default App;

src/App.scss

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ $blueheader: #24292E;
2727
$buttonPrimary: #54A3FF;
2828
$dark_bg:#1a1a1b;
2929
$white:#fff;
30+
$black:#000;
3031
$space_bg:url(https://desktop.github.com/images/star-bg.svg) no-repeat;
3132

3233
.landing-page {
@@ -43,6 +44,21 @@ $space_bg:url(https://desktop.github.com/images/star-bg.svg) no-repeat;
4344
footer{
4445
background: $white;
4546
}
47+
.Search-result {
48+
background: $white!important;
49+
border: solid 1px rgb(155, 153, 153);
50+
.search-result {
51+
li {
52+
a {
53+
color: $black!important;
54+
55+
&:hover {
56+
background: $white!important;
57+
}
58+
}
59+
}
60+
}
61+
}
4662
}
4763

4864
.night-mode {
@@ -87,14 +103,9 @@ $space_bg:url(https://desktop.github.com/images/star-bg.svg) no-repeat;
87103

88104
.content-area {
89105
width: 70%;
90-
height: 100vh;
91-
margin: auto;
106+
margin: 0 auto;
92107
text-align: center;
93108
display: flex;
94-
position: absolute;
95-
left: 0;
96-
right: 0;
97-
top: -15%;
98109

99110
div {
100111
h1 {
@@ -414,10 +425,10 @@ button {
414425

415426
.search-wrapper {
416427
margin-right: 60px;
428+
transition: all 0.4s;
417429

418430
&.open {
419-
height: auto;
420-
transition: all 0.4s;
431+
height: 35px;
421432
overflow: visible;
422433
}
423434
}
@@ -480,7 +491,7 @@ footer {
480491
.landing-page {
481492
background-position: right;
482493
min-height: 95vh;
483-
494+
484495
.content-area {
485496

486497
h1 {
@@ -587,4 +598,27 @@ footer {
587598
animation: octocat-wave 560ms ease-in-out
588599
}
589600
}
590-
601+
602+
.git-wrapper{
603+
text-align: center;
604+
padding: 1rem;
605+
flex-direction: column;
606+
position: absolute;
607+
width: 100%;
608+
top: 10px;
609+
span{
610+
margin-left: 2px;
611+
margin-right: 2px;
612+
613+
}
614+
}
615+
.git-footer{
616+
text-align: center;
617+
padding: 0.2rem;
618+
flex-direction: column;
619+
span{
620+
margin-left: 2px;
621+
margin-right: 2px;
622+
623+
}
624+
}

src/Components/Charts/BarChart.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import React, { Fragment } from "react"
44
// keys actual data eg ["count","stars","forks"]
55
// indexBy is the key which contains labels
66
function BarChart({ data, height, width, max_bars, keys, indexBy, }) {
7-
8-
97
data = data.slice(0, max_bars)
10-
118
if (data.length < 2) {
129
return (
1310
<div style={{ height: height, width: width ? width : "auto" }}>
@@ -135,7 +132,6 @@ function BarChart({ data, height, width, max_bars, keys, indexBy, }) {
135132
// labelTextColor="#eee" //inside graph
136133
tex
137134
tooltip={(e) => {
138-
console.log(e);
139135
return <div style={{ color: "#5b6166" }}>{e.data.label} <br /> {e.data.parsed} </div>
140136
}
141137
}

0 commit comments

Comments
 (0)