Skip to content

Commit

Permalink
Updating retro console sizing and the data
Browse files Browse the repository at this point in the history
  • Loading branch information
CCoffie committed Mar 26, 2024
1 parent 83afccd commit 7811659
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 103 deletions.
4 changes: 2 additions & 2 deletions components/consoleData.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const consoleData = {
"outputMethod": "multiple"
},
{
"content": "[1]\t- 2016 done\t./rit.sh\n[2]\t+ running\t./indeed.sh",
"content": "[1]\t- 2016 done\t./rit.sh\n[2]\t- 2022 done\t./indeed.sh\n[3]\t- running\t./dropbox.sh",
"startingText": "",
"outputMethod": "single"
},
Expand All @@ -77,7 +77,7 @@ export const consoleData = {
"outputMethod": "multiple"
},
{
"content": "My name is Caleb Coffie. I'm a security engineer living in Austin, TX and working at Indeed (the jobsearch company). I'm an alumnus of RIT (Rochester Institute of Technology) where I majored in Computing Security. While at RIT I developed a passion for software development by going to hackathons as well within my Open Source and Free Software minor. This passion has blead into my work and led me to focusing on developing custom security tools.\n\nOutside of work, I have way too many hobbies including making things. Whether that's 3d printing, laser cutting, electronics, or just regular wood working.\n",
"content": "Hey there! I'm Caleb Coffie, a security enthusiast currently based in Magnolia, TX. By day, I'm immersed in the world of application security at Dropbox, where I apply my expertise to safeguard digital landscapes.\n\nMy journey in tech began at the renowned Rochester Institute of Technology (RIT), where I pursued my passion for Computing Security. It was there that I honed my skills and cultivated a fervor for software development, fueled by my participation in hackathons and my exploration of Open Source and Free Software.\n\nAt the core of my professional ethos lies a commitment to innovation. I thrive on crafting custom security solutions that empower organizations to navigate today's digital terrain with confidence.\n\nBeyond the realm of cybersecurity, I'm an avid maker and tinkerer. You'll often find me immersed in a myriad of hobbies, from 3D printing and laser cutting to indulging in the art of woodworking.\n\nLet's connect and explore the possibilities of technology together!\n",
"startingText": "",
"outputMethod": "single"
},
Expand Down
19 changes: 7 additions & 12 deletions components/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import Link from 'next/link'

const links = [
{ href: '/', label: 'Home' },
{ href: '/blog', label: 'Blog' },
{ href: '/contact', label: 'Contact' },
{ href: 'https://www.linkedin.com/in/caleb-coffie-b71730167/', label: 'LinkedIn' },
Expand All @@ -14,14 +15,9 @@ const links = [
const Nav = () => (
<nav>
<ul>
<li>
<Link href='/'>
<a>Home</a>
</Link>
</li>
{links.map(({ key, href, label }) => (
<li key={key}>
<a href={href}>{label}</a>
<Link href={href}>{label}</Link>
</li>
))}
</ul>
Expand All @@ -39,19 +35,18 @@ const Nav = () => (
li {
display: flex;
padding: 1em;
}
a {
color: #19A123;
font-family: monospace;
font-size: 1.5em;
}
@media screen and (min-width: 600px) {
a {
font-size: 3vw;
li {
font-size: 1em;
}
}
@media screen and (min-width: 1200px) {
a {
font-size: 2em;
li {
font-size: 1.5em;
}
}
`}</style>
Expand Down
12 changes: 2 additions & 10 deletions components/retroConsole.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import React from 'react'
import React, { useState, useEffect, useRef } from 'react'

const RetroConsole = (props) => {
const scale = Math.min(
props.width / 800,
props.height / 600
)
return (
<div id="retro-console-container" style={{
transform: `translate(-50%, -50%) scale(${scale})`,
transform: `scale(${props.scale})`,
}}>
<div id="main-body"></div>
<div id="stand"></div>
Expand Down Expand Up @@ -37,10 +33,6 @@ const RetroConsole = (props) => {
width: 800px;
height: 600px;
background: black;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
transform-origin: center center;
text-align: center;
}
Expand Down
149 changes: 90 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"react-dom": "^18",
"next": "14.1.4",
"moment": "^2.24.0",
"react-container-dimensions": "^1.4.1",
"resize-observer-polyfill": "^1.5.1"
}
}
60 changes: 41 additions & 19 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,54 @@
import React from 'react'
import React, { useRef, useEffect, useState } from 'react'
import Head from 'next/head'
import RetroConsole from '../components/retroConsole'
import ConsoleTextArea from '../components/consoleTextArea';
import ContainerDimensions from 'react-container-dimensions';
// import ContainerDimensions from 'react-container-dimensions';
import Nav from '../components/nav';

const Home = () => (
<>
<Head>
<title>Caleb Coffie - Home</title>
</Head>
<div className="nav-container">
<Nav/>
</div>
<div id="main-container">
<ContainerDimensions>
<RetroConsole>
<ConsoleTextArea/>
const Home = () => {
const containerRef = useRef();
const [scale, setScale] = useState(1);

useEffect(() => {
if (!containerRef.current) return;
const resizeObserver = new ResizeObserver(() => {
setScale(
Math.min(
containerRef.current.offsetWidth / 800,
containerRef.current.offsetHeight / 600
))
});
resizeObserver.observe(containerRef.current);
return () => resizeObserver.disconnect(); // clean up
}, []);

return (
<>
<Head>
<title>Caleb Coffie - Home</title>
</Head>
<div className="nav-container">
<Nav />
</div>
<div id="main-container" ref={containerRef}>
<RetroConsole scale={scale}>
<ConsoleTextArea />
</RetroConsole>
</ContainerDimensions>
</div>
<style jsx>{`
</div>
<style jsx>{`
.nav-container{
height: 10vh;
}
#main-container {
width: 100vw;
height: 90vh;
display: flex;
align-items: center;
justify-content: center;
}
`}</style>
</>
)
</>
)
}

export default Home

0 comments on commit 7811659

Please sign in to comment.