Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

Google Analytics #11

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

445 changes: 445 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.11.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
Expand All @@ -11,7 +12,10 @@
"react-bootstrap": "^1.0.1",
"react-dom": "^16.13.1",
"react-reveal": "^1.2.2",
"react-scripts": "3.4.1"
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"reactstrap": "^8.5.1",
"styled-components": "^5.1.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
10 changes: 10 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
<script src="https://kit.fontawesome.com/aa7ba787e4.js" crossorigin="anonymous"></script>

<title>Team Tomato</title>
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9P1N4S2307"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-9P1N4S2307');
</script>
</head>
</head>
<body style="background-color: #f5f8fd" >
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
5 changes: 0 additions & 5 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,3 @@
transform: rotate(360deg);
}
}

.heading {
font-size: 49px;
font-family: 'Bebas Neue', cursive;
}
40 changes: 33 additions & 7 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import NavbarT from './components/Navbar.js';
import Footer from './components/Footer.js';
import Cards from './components/Cards';
import {Switch, Route} from 'react-router-dom';
import MainArticlePage from './components/articles-page/MainArticlePage';
import MainSolutionPage from './components/solution-page/MainSolutionPage';
import MainContact from './components/contact-page/MainContact.js';
import Form from './components/article-submission-form/Form'

<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9P1N4S2307"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-9P1N4S2307');
</script>
</head>

function App() {
return (
<div className="App">
<NavbarT />
<h1 class="heading">Projects</h1>
<Cards />
<Footer />
<Switch>
<Route exact path="/solutions">
<MainSolutionPage />
</Route>
<Route exact path="/articles">
<MainArticlePage />
</Route>
<Route exact path="/contact">
<MainContact />
</Route>
<Route exact path="/admin/add_article">
<Form />
</Route>
<Route>
<h1>Error 404</h1>
</Route>
</Switch>
</div>
);
}
Expand Down
11 changes: 11 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ import React from 'react';
import { render } from '@testing-library/react';
import App from './App';

<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9P1N4S2307"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-9P1N4S2307');
</script>
</head>

test('renders learn react link', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
Expand Down
Empty file removed src/components/Cards.css
Empty file.
21 changes: 0 additions & 21 deletions src/components/Cards.js

This file was deleted.

25 changes: 0 additions & 25 deletions src/components/Navbar.js

This file was deleted.

34 changes: 34 additions & 0 deletions src/components/article-submission-form/Form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.Form{
position: absolute;
top: 25vh;
background: white;
padding: 15px 0;
border-radius: 10px;
border: 1px solid lightgray;
box-shadow: 0 0 10px #C0C0C0;
}

.Form-input {
height: 38px;
width: 97%;
margin-top: 15px;
margin-bottom: 15px;
background-color: #f5f6f7;
border: 1px solid lightgray;
border-radius: 4px;
padding-left: 20px;
}

.Form-submit {
background-color: lightskyblue;
height: 38px;
width: 30%;
margin-top: 15px;
margin-bottom: 15px;
border: none;
border-radius: 5px;
}

.Form-submit:hover{
background-color: #34aeeb;
}
44 changes: 44 additions & 0 deletions src/components/article-submission-form/Form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React from 'react';
import {Container, Row, Col} from 'react-bootstrap';
import './Form.css';

<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9P1N4S2307"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-9P1N4S2307');
</script>
</head>

class Form extends React.Component{
render(){
return(
<div>
<Container fluid>
<Row>
<Col xs={4}></Col>
<Col xs={4}>
<form className="Form">
<Container fluid>
<Row>
<Col xs={12}><input className="Form-input" type="text" name="articleName" placeholder="Name of Article" autoComplete="off"/></Col>
<Col xs={12}><input className="Form-input" type="text" name="category" placeholder="Category" autoComplete="off"/></Col>
<Col xs={12}><input className="Form-input" type="text" name="authorName" placeholder="Name of Author" autoComplete="off"/></Col>
<Col xs={12}><input className="Form-input" type="text" name="articleLink" placeholder="Link to Article" autoComplete="off"/></Col>
<Col xs={12}><input className="Form-submit" type="submit" value="Add Article"></input></Col>
</Row>
</Container>
</form>
</Col>
<Col xs={4}></Col>
</Row>
</Container>
</div>
);
}
}

export default Form;
10 changes: 10 additions & 0 deletions src/components/articles-page/ArticleTable.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.ArticleTable {
margin-top: 40px;
margin-bottom: 40px;
}

.ArticleTable-table {
background-color: white;
box-shadow: 0 0 10px #C0C0C0;
}

60 changes: 60 additions & 0 deletions src/components/articles-page/ArticleTable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import React from 'react';
import Articles from './articles.json'
import './ArticleTable.css';
import {Container, Row, Col, Table} from 'react-bootstrap';

<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9P1N4S2307"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-9P1N4S2307');
</script>
</head>

class ArticleTable extends React.Component{
render(){
return(
<div className="ArticleTable">
<Container fluid>
<Row>
<Col></Col>
<Col xs={11}>
<Table bordered striped className="ArticleTable-table">
<thead>
<tr>
<th>#</th>
<th>Article Name</th>
<th>Category</th>
<th>Author</th>
<th>Link</th>
</tr>
</thead>
<tbody>
{
Articles.map((article, index) => {
return(
<tr>
<td>{index+1}</td>
<td>{article.name}</td>
<td>{article.category}</td>
<td>{article.author}</td>
<td><a href={article.link} target="_blank"><i className="fas fa-external-link-alt"></i></a></td>
</tr>
)
})
}
</tbody>
</Table>
</Col>
<Col></Col>
</Row>
</Container>
</div>
);
}
}

export default ArticleTable;
29 changes: 29 additions & 0 deletions src/components/articles-page/MainArticlePage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import NavbarT from '../common-components/Navbar';
import Footer from '../common-components/Footer';
import ArticleTable from './ArticleTable';

<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9P1N4S2307"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-9P1N4S2307');
</script>
</head>

class ArticlePage extends React.Component {
render(){
return(
<div>
<NavbarT />
<ArticleTable />
<Footer />
</div>
);
}
}

export default ArticlePage;
Loading