Skip to content
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"aws-amplify-react": "4.1.10",
"dompurify": "^2.0.11",
"formik": "^2.1.4",
"node-sass": "^4.13.1",
"node-sass": "4.14.1",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
Expand Down
7 changes: 4 additions & 3 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ export default function Navbar({ authState, authData }: any) {
const navbarRight = (authState === 'signedIn') ? signedInItems() : signedOutItems();
return (
<div className="navbar">
<Link to="/"><div className="navbar-img"/></Link>
<Link className="navbar-title" to="/"><div>RAVEN MESSENGER</div></Link>

<div className="navbar-content">
<NavLink className="navbar-item" exact activeClassName="selected" to="/">Home</NavLink>
<NavLink className="navbar-item" activeClassName="selected" to="/rooms">Rooms</NavLink>
<NavLink exact activeClassName="selected" to="/"><button>Home</button></NavLink>
<NavLink activeClassName="selected" to="/rooms"><button>Rooms</button></NavLink>
{/*<NavLink activeClassName="selected" to="/about"><button>About</button></NavLink>*/}
<div className="navbar-placeholder"/>
<div className="navbar-item" children={navbarRight}/>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Auth from '@aws-amplify/auth';
import Verify from "../pages/Verify";
import {AppContext} from "./AppContext";
import Error from '../pages/Error';
import About from '../pages/About';

function Router() {
const {authState, setAuthState} = useContext(AppContext);
Expand All @@ -30,6 +31,7 @@ function Router() {
<Route exact path="/verify-user/:username" children={<Verify/>}/>
<Route exact path="/login" children={<Login authState={authState}/>}/>
<Route exact path="/logout" children={<Logout/>}/>
<Route exact path="/about" component={About}/>
<PrivateRoute authState={authState} exact path="/rooms" children={<Rooms/>}/>
<PrivateRoute authState={authState} exact path="/rooms/:roomName" children={<Chat/>}/>
<Route path="*"><Error/></Route>
Expand Down
26 changes: 25 additions & 1 deletion src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ h4 {
text-align: center;
}

.text-left {
text-align: left;
}

.m-5 {
margin: 5px;
}
Expand All @@ -65,6 +69,10 @@ h4 {
width: 375px;
}

.mw-700 {
max-width: 700px;
}

.w-500 {
width: 500px;
}
Expand All @@ -82,14 +90,23 @@ h4 {
.navbar {
line-height: 1;
font-size: 30px;
border-bottom: solid 0.5px rgba(255, 255, 255, 0.7);

.navbar-img {
background: url("/static/img/glitch-5.png") center;
background-size: cover;
min-height: 60px;
}

.navbar-title {
font-family: "SF Alien Encounters";
text-align: center;
text-decoration: none !important;

div {
margin: 8px 5px 5px;
}
}

.navbar-content {
display: flex;
flex-wrap: wrap;
Expand All @@ -98,6 +115,13 @@ h4 {
margin-right: auto;
//padding-left: 10px;
//padding-right: 10px;
@media screen and (min-width: 500px) {
border: solid 0.5px rgba(255, 255, 255, 0.7);
}
button {
padding: 4px 25px;
margin: 10px;
}
}

.navbar-item {
Expand Down
39 changes: 39 additions & 0 deletions src/pages/About.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import {Link} from 'react-router-dom';

export default function About() {
return (
<div className="flex-grow-0 flex">
<div className="flex-row">
<div className="mw-700 flex-col">
<div className="main-content flex-grow-1">
<div className="flex-col h-100 text-center">
<h2>About Raven Messenger</h2>
<p>Hello! And welcome to Raven Messenger.</p>
<p className="text-left">
This website is a was created
by <a href="https://www.bmcandrews.com" target="_blank">Barry McAndrews</a> as
a proof-of-concept to demonstrate the power of new cloud
technologies. You may be surprised to find out that this website is completely
serverless. <i>But how is that possible?</i> Well, this site is powered by AWS S3
and AWS Lambda. To read more about how this site is
built <a href="https://github.com/barrymcandrews/raven-iac" target="_blank">check out my GitHub page.</a>
</p>

<p className="text-left">
Serverless web applications are going to dominate in the next 10 years for
one reason alone: they're absurdly cheap. With AWS Lambda you pay for exactly
what you use. No more and no less. For me, since nobody uses my websites, I pay
close to nothing. For a company running a commercial website the bill wouldn't be
nothing, but there would be substantial cost savings. This savings comes from the
fact that companies no longer need to pay for idle servers. With Lambda you don't
need extra servers laying around in case your site gets a spike of traffic. Scaling
is handled automatically.
</p>
</div>
</div>
</div>
</div>
</div>
);
}
12 changes: 6 additions & 6 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ export default function Home({authState}: {authState: string}) {
<div className="w-375 flex-col">
<div className="main-content flex-grow-1">
<div className="flex-col h-100 text-center">
<h2>Welcome to Raven Messenger</h2>
<p>Raven is the retro chat app for 2020.</p>

<div className="flex-row">
<img className="small-content" height={100} width={100} src="/static/img/raven-glitched.png" alt="raven.png"/>
</div>
<h2>Welcome to <br/> Raven Messenger</h2>

{/*<div className="flex-col flex-center flex-grow-1">*/}
{/* <p>With Raven Messenger you can:</p>*/}
Expand All @@ -38,6 +33,11 @@ export default function Home({authState}: {authState: string}) {
<Link to="/signup" className="welcome-button"><button>Sign Up</button></Link>
</div>
}

<div className="flex-row">
<Link to="/about" className="welcome-button"><button>What is this site?</button></Link>
</div>

</div>
</div>
</div>
Expand Down
68 changes: 51 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3337,9 +3337,9 @@ aproba@^1.0.3, aproba@^1.1.1:
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==

are-we-there-yet@~1.1.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
version "1.1.7"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146"
integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==
dependencies:
delegates "^1.0.0"
readable-stream "^2.0.6"
Expand Down Expand Up @@ -6419,7 +6419,19 @@ glob-to-regexp@^0.3.0:
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=

glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1:
glob@^7.0.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
Expand All @@ -6431,6 +6443,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, gl
once "^1.3.0"
path-is-absolute "^1.0.0"

glob@~7.1.1:
version "7.1.7"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"

global-modules@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780"
Expand Down Expand Up @@ -6484,12 +6508,12 @@ globby@^6.1.0:
pinkie-promise "^2.0.0"

globule@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.1.tgz#90a25338f22b7fbeb527cee63c629aea754d33b9"
integrity sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==
version "1.3.3"
resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.3.tgz#811919eeac1ab7344e905f2e3be80a13447973c2"
integrity sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==
dependencies:
glob "~7.1.1"
lodash "~4.17.12"
lodash "~4.17.10"
minimatch "~3.0.2"

graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
Expand Down Expand Up @@ -7878,9 +7902,9 @@ jest@24.9.0:
jest-cli "^24.9.0"

js-base64@^2.1.8:
version "2.5.2"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209"
integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==
version "2.6.4"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4"
integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==

js-cookie@^2.1.4:
version "2.2.1"
Expand Down Expand Up @@ -8291,11 +8315,16 @@ lodash.uniq@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=

"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5, lodash@~4.17.12:
"lodash@>=3.5 <5", lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.5:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==

lodash@^4.0.0, lodash@~4.17.10:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

loglevel@^1.6.6:
version "1.6.8"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171"
Expand Down Expand Up @@ -8712,11 +8741,16 @@ mute-stream@0.0.8:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==

nan@^2.12.1, nan@^2.13.2:
nan@^2.12.1:
version "2.14.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==

nan@^2.13.2:
version "2.15.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee"
integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==

nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
Expand Down Expand Up @@ -8856,7 +8890,7 @@ node-releases@^1.1.52, node-releases@^1.1.53:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.55.tgz#8af23b7c561d8e2e6e36a46637bab84633b07cee"
integrity sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w==

node-sass@^4.13.1:
node-sass@4.14.1:
version "4.14.1"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5"
integrity sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==
Expand Down Expand Up @@ -13065,9 +13099,9 @@ write@1.0.3:
mkdirp "^0.5.1"

ws@^5.2.0:
version "5.2.2"
resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==
version "5.2.3"
resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d"
integrity sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==
dependencies:
async-limiter "~1.0.0"

Expand Down