mirror of
https://github.com/kingomarnajjar/innovationdrive.git
synced 2026-07-25 22:27:27 +10:00
added components
This commit is contained in:
parent
85629f85d0
commit
36a3aeeaaf
18 changed files with 11126 additions and 33 deletions
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"main.css": "static/css/main.74791c2b.css",
|
||||
"main.css.map": "static/css/main.74791c2b.css.map",
|
||||
"main.js": "static/js/main.9d788239.js",
|
||||
"main.js.map": "static/js/main.9d788239.js.map",
|
||||
"static/media/logo.png": "static/media/logo.02d8090d.png"
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>React App</title><link href="/static/css/main.74791c2b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.9d788239.js"></script></body></html>
|
||||
|
|
@ -1 +0,0 @@
|
|||
"use strict";var precacheConfig=[["/index.html","4beab117b99e4b60628a9113cabc3e46"],["/static/css/main.74791c2b.css","856ea0a0f77ae6b25e961461c6454bd2"],["/static/js/main.9d788239.js","0c605f302ee4d113d2db078778859540"],["/static/media/logo.02d8090d.png","02d8090dea46ee1b8159abb452874840"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,/\.\w{8}\./);return[r.toString(),a]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(r){return setOfCachedUrls(r).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return r.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),r="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,r),e=urlsToCacheKeys.has(n));var a="/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(a,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 523 KiB |
10977
package-lock.json
generated
Normal file
10977
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,7 @@
|
|||
.App {
|
||||
text-align: center;
|
||||
background-image: url("./kidRocket.jpg");
|
||||
|
||||
}
|
||||
|
||||
.App-logo {
|
||||
|
|
@ -7,7 +9,7 @@
|
|||
height: 80px;
|
||||
}
|
||||
|
||||
.App-header {
|
||||
/* .App-header {
|
||||
background-color: #222;
|
||||
height: 150px;
|
||||
padding: 20px;
|
||||
|
|
@ -25,4 +27,4 @@
|
|||
@keyframes App-logo-spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
} */
|
||||
|
|
|
|||
19
src/App.js
19
src/App.js
|
|
@ -1,14 +1,19 @@
|
|||
import React, { Component } from "react";
|
||||
import "./App.css";
|
||||
import HeadNavbar from "./components/Navbar";
|
||||
// import HeadNavbar from "./components/Navbar";
|
||||
import Drift from "./components/Drift";
|
||||
import AboveTheFold from "./layouts/AboveTheFold"
|
||||
// Make this DRY ~ DO NOT REPEAT YOURSELF
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
< HeadNavbar />
|
||||
|
||||
|
||||
<AboveTheFold />
|
||||
{/* Above the fold but below navbar */}
|
||||
{/* FIX BACKground image to only render before scroll on mobile/web */}
|
||||
{/* BELOW THE FOLD */}
|
||||
<Drift />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -16,10 +21,12 @@ class App extends Component {
|
|||
|
||||
export default App;
|
||||
|
||||
{/* <header className="App-header">
|
||||
{
|
||||
/* <header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<h1 className="App-title">BOOBY React</h1>
|
||||
</header>
|
||||
<p className="App-intro">
|
||||
To get started, edit <code>src/App.js</code> and save to reload.
|
||||
</p> */}
|
||||
</p> */
|
||||
}
|
||||
|
|
|
|||
40
src/components/Drift.js
Normal file
40
src/components/Drift.js
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import React from "react";
|
||||
|
||||
export default class Drift extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="Drift">
|
||||
onClick
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// <!-- Start of Async Drift Code -->
|
||||
// <script>
|
||||
// "use strict";
|
||||
|
||||
// !function() {
|
||||
// var t = window.driftt = window.drift = window.driftt || [];
|
||||
// if (!t.init) {
|
||||
// if (t.invoked) return void (window.console && console.error && console.error("Drift snippet included twice."));
|
||||
// t.invoked = !0, t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ],
|
||||
// t.factory = function(e) {
|
||||
// return function() {
|
||||
// var n = Array.prototype.slice.call(arguments);
|
||||
// return n.unshift(e), t.push(n), t;
|
||||
// };
|
||||
// }, t.methods.forEach(function(e) {
|
||||
// t[e] = t.factory(e);
|
||||
// }), t.load = function(t) {
|
||||
// var e = 3e5, n = Math.ceil(new Date() / e) * e, o = document.createElement("script");
|
||||
// o.type = "text/javascript", o.async = !0, o.crossorigin = "anonymous", o.src = "https://js.driftt.com/include/" + n + "/" + t + ".js";
|
||||
// var i = document.getElementsByTagName("script")[0];
|
||||
// i.parentNode.insertBefore(o, i);
|
||||
// };
|
||||
// }
|
||||
// }();
|
||||
// drift.SNIPPET_VERSION = '0.3.1';
|
||||
// drift.load('g4nnbv58ni3w');
|
||||
// </script>
|
||||
// <!-- End of Async Drift Code -->
|
||||
32
src/components/Form.js
Normal file
32
src/components/Form.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import React, { Component } from "react";
|
||||
import ThankYouAlert from "./ThankYouAlert";
|
||||
|
||||
export default class Form extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
|
||||
<div>
|
||||
<form name="contact" method="POST" netlify>
|
||||
<p>
|
||||
<label>Email: <input type="text" name="name" /></label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Message: <textarea name="message"></textarea></label>
|
||||
</p>
|
||||
<div data-netlify-recaptcha></div>
|
||||
<p>
|
||||
<button type="submit" >Send</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// the logic is sign up to recieve free video consultation and invention workbook
|
||||
// First name, last name
|
||||
// then email text area with validation
|
||||
// tell us a little about your idea...
|
||||
// Once it goes through trigger thank you alert or just change CTA text/colour
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { Component }from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import {
|
||||
Collapse,
|
||||
Navbar,
|
||||
|
|
@ -11,7 +11,7 @@ import {
|
|||
DropdownToggle,
|
||||
DropdownMenu,
|
||||
DropdownItem } from 'reactstrap';
|
||||
import logo from "../logo.png";
|
||||
import logo from '../logo.png';
|
||||
|
||||
export default class HeadNavbar extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -30,14 +30,15 @@ export default class HeadNavbar extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Navbar color="light" light expand="md">
|
||||
<Navbar className="clearfix" light expand="md">
|
||||
<NavbarBrand href="/">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
</NavbarBrand>
|
||||
<NavbarToggler onClick={this.toggle} />
|
||||
<Collapse isOpen={this.state.isOpen} navbar>
|
||||
<Nav className="ml-auto" navbar>
|
||||
<NavItem>
|
||||
<button className="btn btn-danger float-right">Download Invention Workbook</button>
|
||||
{/* <NavItem>
|
||||
<NavLink href="/components/">Resources</NavLink>
|
||||
</NavItem>
|
||||
<NavItem>
|
||||
|
|
@ -59,7 +60,7 @@ export default class HeadNavbar extends React.Component {
|
|||
Reset
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</UncontrolledDropdown>
|
||||
</UncontrolledDropdown> */}
|
||||
</Nav>
|
||||
</Collapse>
|
||||
</Navbar>
|
||||
|
|
|
|||
37
src/components/ThankYouAlert.js
Normal file
37
src/components/ThankYouAlert.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Alert } from 'reactstrap';
|
||||
|
||||
// export default class ThankYouAlert extends React.Component {
|
||||
// render() {
|
||||
// return (
|
||||
// <div className="ThankYouAlert">
|
||||
|
||||
// </div>
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
export default class ThankYouAlert extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
visible: true
|
||||
};
|
||||
|
||||
this.onDismiss = this.onDismiss.bind(this);
|
||||
}
|
||||
|
||||
onDismiss() {
|
||||
this.setState({ visible: false });
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Alert color="info" isOpen={this.state.visible} toggle={this.onDismiss}>
|
||||
I am an alert and I can be dismissed!
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2,4 +2,6 @@ body {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: sans-serif;
|
||||
background-image: url("./kidRocket.jpg");
|
||||
background-size: ;
|
||||
}
|
||||
|
|
|
|||
BIN
src/kidRocket.jpg
Normal file
BIN
src/kidRocket.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 211 KiB |
15
src/layouts/AboveTheFold.js
Normal file
15
src/layouts/AboveTheFold.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import React, { Component } from "react";
|
||||
import Form from '../components/Form.js';
|
||||
import HeadNavbar from '../components/Navbar.js'
|
||||
|
||||
export default class AboveTheFold extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<HeadNavbar />
|
||||
<Form />
|
||||
boob
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue