Skip to content

Commit e6438cc

Browse files
committed
styling adjustment
1 parent 448f61e commit e6438cc

8 files changed

Lines changed: 52 additions & 105 deletions

File tree

‎src/components/BoardCanvas/OrbitControls.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import * as Three from 'thre
55
import {forwardRef, useRef, useImperativeHandle, useEffect, useState} from 'react';
66

77

8-
9-
108
extend({TrackballControls});
119

1210
const CMD_KEY = 91;

‎src/components/Canvas/Description/BoldParagraph 2.js‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎src/components/Canvas/Description/NormalParagraph 2.js‎

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
import { CONSTANTS } from '../../Utility/config.js';
2-
import { Strategy } from '../Strategy/Strategy.js';
1+
import { CONSTANTS } from "../../Utility/config.js";
2+
import { Strategy } from "../Strategy/Strategy.js";
33

44
class InputHandler {
55
static inputArray = [];
66

7-
87
/**
98
* @retuns {Integer[]}
109
*/
1110
static get getGeneratedArray() {
1211
return InputHandler.inputArray;
1312
}
1413

15-
1614
/**
1715
*
1816
* @param {Integer[]} newArray
@@ -21,7 +19,6 @@ class InputHandler {
2119
InputHandler.inputArray = newArray;
2220
}
2321

24-
2522
/**
2623
*
2724
* @returns {number}
@@ -30,42 +27,41 @@ class InputHandler {
3027
const MAX_BAR_HEIGHT = window.innerHeight - CONSTANTS.OFFSET;
3128
const MARGIN = CONSTANTS.margin;
3229
const BAR_MIN_WIDTH = 1;
33-
const SCREEN_WIDTH = window.innerWidth;
34-
const potentialNum = Math.floor(SCREEN_WIDTH / (BAR_MIN_WIDTH + MARGIN));
30+
const SCREEN_WIDTH = window.innerWidth;
31+
const potentialNum = Math.floor(SCREEN_WIDTH / (BAR_MIN_WIDTH + MARGIN));
3532

3633
return potentialNum <= MAX_BAR_HEIGHT ? potentialNum : MAX_BAR_HEIGHT;
3734
}
3835

39-
4036
// https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array
4137
static shuffle(array) {
42-
let currentIndex = array.length, randomIndex;
43-
38+
let currentIndex = array.length,
39+
randomIndex;
40+
4441
// While there remain elements to shuffle.
4542
while (currentIndex !== 0) {
46-
4743
// Pick a remaining element.
4844
randomIndex = Math.floor(Math.random() * currentIndex);
4945
currentIndex--;
50-
46+
5147
// And swap it with the current element.
5248
[array[currentIndex], array[randomIndex]] = [
53-
array[randomIndex], array[currentIndex]];
49+
array[randomIndex],
50+
array[currentIndex],
51+
];
5452
}
55-
53+
5654
return array;
5755
}
5856

59-
6057
/**
6158
*
6259
* @param inputSize
6360
*/
6461
// SG 07/11/2022 12:01 generates random numbers, not consecutive
6562
static generateRandomIntArray(inputSize) {
66-
6763
const MAX_BAR_HEIGHT = window.innerHeight - CONSTANTS.OFFSET;
68-
let arr = Array.from(new Array(MAX_BAR_HEIGHT), (x, i) => i + 5);
64+
let arr = Array.from(new Array(MAX_BAR_HEIGHT), (x, i) => i + 5);
6965
arr = InputHandler.shuffle(arr);
7066
arr = arr.slice(0, inputSize);
7167
InputHandler.setInputArray = arr;
@@ -82,15 +78,14 @@ class InputHandler {
8278
// arr.push(i);
8379
// }
8480
// }
85-
81+
8682
// arr = InputHandler.shuffle(arr);
8783

8884
// InputHandler.setInputArray = arr;
8985
// console.log(InputHandler.getGeneratedArray)
9086
// Strategy.setTargetArray = arr;
9187
// }
9288

93-
9489
/**
9590
*
9691
* @param inputSize
@@ -102,6 +97,4 @@ class InputHandler {
10297
}
10398
}
10499

105-
106-
107-
export {InputHandler};
100+
export { InputHandler };

‎src/components/Page/About/about 2.css‎

Whitespace-only changes.

‎src/components/Page/Contact/contact 2.css‎

Whitespace-only changes.

‎src/components/Page/Splash/SplashScreen.js‎

Lines changed: 37 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Suspense, useEffect } from "react";
22
import { useNavigate } from "react-router-dom";
33
import { ReactComponent as RightArrow } from "../../../img/rightArrow.svg";
4+
import BoldParagraph from "../../Canvas/Description/BoldParagraph";
45
import Navigation from "../partial/Navbar/Navigation";
56
import "./splash.css";
67

@@ -21,68 +22,49 @@ const SplashScreen = () => {
2122
return (
2223
<>
2324
<Navigation themeToggle={false} />
24-
<div className="bg-homeGray relative flex justify-end min-h-screen min-w-screen">
25+
<div className="bg-homeGray relative flex h-screen justify-center min-w-screen overflow-hidden">
2526
<div className="main-canvas-grid z-0 dark:opacity-[0.03]" />
26-
<p className="font-lg text-white absolute text-[6vh] z-10 top-[15vh] left-[5vw] font-semibold font-spline">
27-
Algo Visualizer
28-
</p>
29-
<p className="font-spline absolute top-[30vh] max-w-[47ch] left-[5vw] text-[1.2em] z-10 text-gray-100">
30-
Improve your understanding of algorithms just by watching simple and
31-
completely customizable animations. <br />
32-
Welcome to the algo visualizer.
33-
</p>
34-
<div className="hidden md:block md:scale-[.7] z-1 -translate-y-[4em] md:translate-x-[150px] lg:translate-x-[17px] lg:scale-[.8] xl:scale-[.9] w-fit">
35-
<Suspense fallback={<></>}>
36-
<Spline scene="https://prod.spline.design/qblRNAa3C-eNH6Bo/scene.splinecode" />
37-
</Suspense>
38-
</div>
3927

40-
<div className="absolute top-[50vh] left-[5vw] flex flex-col gap-5">
41-
<div
42-
className="hover:-translate-y-[.2em] transition duration-200 ease-in-out relative hover:shadow-custom-md-lightBlue cursor-pointer font-semibold text-white font-spline bg-lightBlue2 p-[1em] text-[1em] rounded-md"
43-
onClick={() => navigate("/sorting-visualizer")}
44-
>
45-
Sorting Algorithms
46-
<RightArrow className="absolute top-[50%] -translate-y-[50%] right-[1em]" />
47-
</div>
28+
<div className="w-full flex items-center max-w-[2000px]">
29+
<div className="flex flex-1 p-0 md:p-20">
30+
<div className="absolute top-0 flex flex-col w-full h-full px-[1em] items-center md:items-start pt-[6em] gap-[5em] z-20">
31+
<p className="font-lg text-white text-[6vh] z-10 font-semibold font-spline">
32+
Algo Visualizer
33+
</p>
34+
<p className="font-spline max-w-[47ch] text-[1.2em] z-10 text-gray-100">
35+
Improve your understanding of algorithms just by watching simple
36+
and completely <BoldParagraph text="customizable animations" />.{" "}
37+
<br />
38+
Welcome to the algo visualizer.
39+
</p>
4840

49-
<div
50-
className="hover:-translate-y-[.2em] transition duration-200 ease-in-out relative hover:shadow-custom-md-lightBlue cursor-pointer font-semibold text-white font-spline bg-lightBlue2 p-[1em] text-[1em] rounded-md w-[15em]"
51-
onClick={() => navigate("/dashboard-two")}
52-
>
53-
Path Finding Algorithms
54-
<RightArrow className="absolute top-[50%] -translate-y-[50%] right-[1em]" />
55-
</div>
56-
</div>
57-
</div>
41+
<div className="flex flex-col gap-5">
42+
<div
43+
className="hover:-translate-y-[.2em] transition duration-200 ease-in-out relative hover:shadow-custom-md-lightBlue cursor-pointer font-semibold text-white font-spline bg-lightBlue2 p-[1em] text-[1em] rounded-md w-[15em]"
44+
onClick={() => navigate("/sorting-visualizer")}
45+
>
46+
Sorting Algorithms
47+
<RightArrow className="absolute top-[50%] -translate-y-[50%] right-[1em]" />
48+
</div>
5849

59-
{/*-- Start of background --*/}
60-
{/* <div className = "splash_background">
61-
<div className = "splash_overlay">
62-
<div className = "splash_content">
63-
<h1 className = "splash_title">
64-
<span>{'{'}</span>{'Algorithm Visualizer'}<span>{'}'}</span>
65-
</h1>
66-
<h2 className = "splash_subheading">
67-
<span>CU Boulder</span>
68-
</h2>
69-
<ul className = "splash_list">
70-
<li><a href = "/about"
71-
className = "splash_link"><span>{'About'}</span></a></li>
72-
<li><a href = "/contact"
73-
className = "splash_link"><span>{'Contact'}</span></a>
74-
</li>
75-
<li>
76-
<a href = "/" className = "splash_link"><span>{'Home'}</span></a>
77-
</li>
78-
<li>
79-
<a href = "/sorting-visualizer" className = "splash_link"><span>{'Sorting Algorithms'}</span></a>
80-
</li>
81-
</ul>
50+
<div
51+
className="hover:-translate-y-[.2em] transition duration-200 ease-in-out relative hover:shadow-custom-md-lightBlue cursor-pointer font-semibold text-white font-spline bg-lightBlue2 p-[1em] text-[1em] rounded-md w-[15em]"
52+
onClick={() => navigate("/dashboard-two")}
53+
>
54+
Path Finding Algorithms
55+
<RightArrow className="absolute top-[50%] -translate-y-[50%] right-[1em]" />
56+
</div>
57+
</div>
8258
</div>
8359
</div>
60+
61+
<div className="hidden lg:block translate-x-[9em] xl:translate-x-[0] md:scale-[.7] z-1 -translate-y-[4em] lg:scale-[.7] xl:scale-[.9]">
62+
<Suspense fallback={<></>}>
63+
<Spline scene="https://prod.spline.design/qblRNAa3C-eNH6Bo/scene.splinecode" />
64+
</Suspense>
65+
</div>
8466
</div>
85-
-- End of background -- */}
67+
</div>
8668
</>
8769
);
8870
};

‎src/index 2.js‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)