Skip to content

Commit

Permalink
new-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
AB10110F committed Jul 22, 2023
1 parent b82050f commit 1e3ac7e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 118 deletions.
41 changes: 25 additions & 16 deletions src/app/page.module.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
.main {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
min-height: 100vh;
color: white;
padding: 30px;
}

.main h1
.main h1{font-size: 10vh; margin: 0 0 2% 0}

.grid
{
font-size: 100px;
display: flex;
flex-direction: row;
width: 100%;
height: 72vh;
gap: 25px;
}

.home
.column
{
width: 70%;
display: flex;
flex-direction: row;
justify-content: space-between;
flex-direction: column;
gap:25px;
width: 35%;
}

.canvasContainer
.canvas
{
width: 380px;
background-color: rgb(31, 31, 31);
border: 1px solid rgb(113, 113, 113);
height: 40%;
}

.canvasContent
.bars
{
height: 180px;
border: 1px solid rgb(113, 113, 113);
height: 40%;
}

.projects
.controls
{
border: 1px solid rgb(113, 113, 113);
height: 20%;
}
/* .projects
{
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -90,4 +99,4 @@
justify-content: center;
align-items: center;
height: 180px;
}
} */
53 changes: 7 additions & 46 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,16 @@ export default function Home() {
return (
<main className={styles.main}>
<Typewriter text={' Front-End Developer'}/> {/* TODO What is wrong with the position 1? */}
<div className={styles.home}>
<div className={styles.grid}>
<Terminal/>
<div className={styles.canvasContainer}>
<section className={styles.windowOptions}>
<article>
<Minus />
<Square />
<X />
</article>
</section>
<section className={styles.canvasContent}>
<section className={styles.column}>
<article className={styles.canvas}>
<Model/>
</section>
</div>
</div>
<h1 className={dotFont.className}>Projects</h1>
<div className={styles.projects}>
<div className={styles.windowContainer}>
<section className={styles.windowOptions}>
<article>
<Minus />
<Square />
<X />
</article>
</section>
<section className={styles.windowContent}>404</section>
</div>
<div className={styles.windowContainer}>
<section className={styles.windowOptions}>
<article>
<Minus />
<Square />
<X />
</article>
</section>
<section className={styles.windowContent}>404</section>
</div>
<div className={styles.windowContainer}>
<section className={styles.windowOptions}>
<article>
<Minus />
<Square />
<X />
</article>
</section>
<section className={styles.windowContent}>404</section>
</div>
</article>
<article className={styles.bars}></article>
<article className={styles.controls}>hi</article>
</section>
</div>
<h1 className={dotFont.className}>Social Media</h1>
</main>
)
}
2 changes: 1 addition & 1 deletion src/components/Dots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import p5 from 'p5';
import styles from '../css/dots.module.css'

const Dots = () => {
const sketchRef = useRef<HTMLDivElement>(null);
const sketchRef = useRef<HTMLDivElement>(null!);

useEffect(() => {
let dotSize: number = 4;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const AsciiCube = () => {

useEffect(() => {
const canvas = canvasRef.current;
const renderer = new THREE.WebGLRenderer({ canvas });
const renderer = new THREE.WebGLRenderer({ canvas/* , alpha: true */});

const width = 380;
const height = 400;
const height = 170;

canvas.style.width = `${width}px`;
canvas.style.height = `${height}px`;
Expand All @@ -29,7 +29,7 @@ const AsciiCube = () => {
camera.position.z = 5;

const geometry = new THREE.BoxGeometry(1, 1, 1);
const material = new THREE.MeshBasicMaterial({ color: 0xffffff });
const material = new THREE.MeshBasicMaterial({ color: 0xffffff, /* transparent:true */});
const cube = new THREE.Mesh(geometry, material);
scene.add(cube);

Expand Down
12 changes: 1 addition & 11 deletions src/components/Terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
import React from 'react';
import { useState, useRef, useEffect } from 'react';
import styles from '../css/terminal.module.css'
import { ChevronRight, X, Minus, Square } from 'lucide-react';
import { ChevronRight } from 'lucide-react';


const Terminal = () => {


const banner = [
"██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗ ",
"██║ ██║██╔════╝██║ ██╔════╝██╔═══██╗████╗ ████║██╔════╝ ",
Expand Down Expand Up @@ -65,14 +64,6 @@ const Terminal = () => {
}, [output]);

return (
<div className={styles.windowContainer}>
<section className={styles.windowOptions}>
<article>
<Minus />
<Square />
<X />
</article>
</section>
<div ref={preRef} className={styles.terminal}>
{<pre className={styles.history}>{output}</pre>}
{/* <pre style={{ color: 'green' }}>{output}</pre>*/}
Expand Down Expand Up @@ -117,7 +108,6 @@ const Terminal = () => {
</article>
</section>
</div>
</div>
)
};

Expand Down
44 changes: 3 additions & 41 deletions src/css/terminal.module.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
.windowContainer
{
width: 60%;
box-sizing: border-box;
animation: bottom 1s ease;
}
.terminal
{
height: 400px;
animation: bottom 1s ease;
box-sizing: border-box;
width: 65%;
overflow-Y:auto;
overflow-X:hidden;
background-color: rgb(31, 31, 31);
color: white;
font-size: 15px;
border: 1px solid rgb(113, 113, 113);
Expand All @@ -30,39 +25,6 @@
}
}

.windowOptions
{
display: flex;
justify-content: end;
background-color: rgb(255, 255, 255);
height: 30px;
align-items: center;
font-size: 15px;
}
.windowOptions svg
{
width: 25px;
height: 30px;
padding: 0 10px;
color: rgb(142, 142, 142);
}
.windowOptions svg:nth-last-child(1):hover
{
background-color: red;
}

.windowOptions svg:hover
{
background-color: rgb(177, 177, 177);
color: white;
}

.windowOptions article
{
width: 110px;
display: flex;
}

.terminal::-webkit-scrollbar{height: 10px; width: 8px;}
.terminal::-webkit-scrollbar-thumb{background:#878787; border-radius: 50px;}

Expand Down

0 comments on commit 1e3ac7e

Please sign in to comment.