Skip to content

Commit

Permalink
Merge pull request #13 from open-austin/revert-12-frontenddev
Browse files Browse the repository at this point in the history
Revert "update footer with links"
  • Loading branch information
Rmcavin authored Oct 29, 2017
2 parents f6f54e6 + b054fe0 commit f0a79e8
Show file tree
Hide file tree
Showing 13 changed files with 10,202 additions and 70 deletions.
Binary file modified .DS_Store
Binary file not shown.
10,000 changes: 10,000 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@
"main": "app.js",
"private": true,
"dependencies": {
"bcrypt": "^1.0.3",
"body-parser": "^1.18.2",
"cookie-parser": "^1.4.3",
"cookie-sessions": "0.0.2",
"dotenv": "^4.0.0",
"ejs": "^2.5.7",
"express": "^4.16.2",
"knex": "^0.13.0",
"method-override": "^2.3.10",
"pg": "^7.3.0",
"dotenv": "^4.0.0"
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-scripts": "1.0.14"
},
"repository": {
"type": "git",
Expand All @@ -26,5 +21,10 @@
"url": "https://github.com/open-austin/GreenBelts/issues"
},
"homepage": "https://github.com/open-austin/GreenBelts#readme",
"scripts": {}
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
53 changes: 1 addition & 52 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@

html {
position: relative;
min-height: 100vh;
}

main {
margin: 30px auto 30px auto;
padding: 20px;
height: auto;
}

/* ========================= NAVBAR ========================== */
.navBar {
width: 100 vw;
Expand Down Expand Up @@ -38,8 +26,8 @@ main {
.card {
background: #fff;
border-radius: 2px;
width: 80vw;
height: auto;
width: 80vw;
margin: 20px auto 0 auto;
padding: 10px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
Expand All @@ -49,42 +37,3 @@ main {
.card:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
} */

/* =============================== MAP ========================= */
#map {
margin: auto;
height: 400px;
width: 90%;
}

/* =============================== FOOTER ========================= */

footer {
width: 100 vw;
height: auto;
background-color: black;
color: white;
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
padding: 0 20px 0 20px;
text-align: center;
}

footer #contact {
flex: 1 1 30%;
}

footer #contribute {
flex: 1 1 30%;
}

footer #openAustin {
flex: 1 1 30%;
}

footer a {
color: white;
text-decoration: none;
}
32 changes: 32 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.App {
text-align: center;
}

.App-logo {
animation: App-logo-spin infinite 20s linear;
height: 80px;
}

.App-header {
background-color: #222;
height: 50px;
padding: 5px;
color: white;
font-family: 'Amaranth';
}

.App-title {
font-size: 24;
text-align: left;
padding: 5px;
margin: 0;
}

.App-intro {
font-size: large;
}

@keyframes App-logo-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
20 changes: 20 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">ATX Trail Mix</h1>
</header>
<p className="App-intro">

</p>
</div>
);
}
}

export default App;
8 changes: 8 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
});
5 changes: 5 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}
8 changes: 8 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
7 changes: 7 additions & 0 deletions src/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions src/registerServiceWorker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// In production, we register a service worker to serve assets from local cache.

// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously
// cached resources are updated in the background.

// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
// This link also includes instructions on opting out of this behavior.

const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);

export default function register() {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
return;
}

window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;

if (!isLocalhost) {
// Is not local host. Just register service worker
registerValidSW(swUrl);
} else {
// This is running on localhost. Lets check if a service worker still exists or not.
checkValidServiceWorker(swUrl);
}
});
}
}

function registerValidSW(swUrl) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the old content will have been purged and
// the fresh content will have been added to the cache.
// It's the perfect time to display a "New content is
// available; please refresh." message in your web app.
console.log('New content is available; please refresh.');
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.');
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
}

function checkValidServiceWorker(swUrl) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl)
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
if (
response.status === 404 ||
response.headers.get('content-type').indexOf('javascript') === -1
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload();
});
});
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl);
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
});
}

export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
registration.unregister();
});
}
}
5 changes: 0 additions & 5 deletions views/partials/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
<footer>
<h3 id='contact'><a href="mailto:[email protected]">Contact</a></h3>
<h3 id='contribute'><a href="https://github.com/open-austin/GreenBelts">Contribute</a></h3>
<h3 id='openAustin'><a href="https://www.open-austin.org/">An Open Austin Project</a></h3>
</footer>
6 changes: 3 additions & 3 deletions views/partials/nav.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<nav class ='navBar'>
<div class ='navBar'>
<h1>ATX TrailMix</h1>
</nav>
<nav><button>sample</button></nav>
</div>

0 comments on commit f0a79e8

Please sign in to comment.