From 1dac6b4e1a57f0fead62b3ba0e3f30cf67c079b1 Mon Sep 17 00:00:00 2001 From: Jiawei Wu Date: Tue, 11 Apr 2023 16:39:28 -0400 Subject: [PATCH 1/2] fix --- src/pages/about.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/about.js b/src/pages/about.js index c3ca51a..b092979 100644 --- a/src/pages/about.js +++ b/src/pages/about.js @@ -2,7 +2,10 @@ import React from 'react'; import { Header } from "../components/header/header"; import { Box, Button } from "@mui/material" import "./about.css" -const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + + +export const AboutPage = () => { + const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" document.addEventListener("DOMContentLoaded", function(){ observe('.description'); @@ -96,7 +99,6 @@ function hackereffectslow(selector){ } }; -export const AboutPage = () => { return(
From 6b69901e3c07c52a9bf8f98c2ab1e0f6432429e9 Mon Sep 17 00:00:00 2001 From: Jiawei Wu Date: Tue, 11 Apr 2023 17:08:57 -0400 Subject: [PATCH 2/2] .. --- .firebase/hosting.YnVpbGQ.cache | 27 ----- .firebaserc | 5 - firebase.json | 10 -- src/components/header/header.js | 19 +-- src/components/upload_but/upload_button.js | 2 +- src/pages/.about.js.swp | Bin 12288 -> 0 bytes src/pages/about.js | 130 ++++++++++----------- 7 files changed, 70 insertions(+), 123 deletions(-) delete mode 100644 .firebase/hosting.YnVpbGQ.cache delete mode 100644 .firebaserc delete mode 100644 firebase.json delete mode 100644 src/pages/.about.js.swp diff --git a/.firebase/hosting.YnVpbGQ.cache b/.firebase/hosting.YnVpbGQ.cache deleted file mode 100644 index 6d8a8d6..0000000 --- a/.firebase/hosting.YnVpbGQ.cache +++ /dev/null @@ -1,27 +0,0 @@ -asset-manifest.json,1669832854639,49868417cab5386e6b34eea9a7d1705650fdd5488f72696d0eb1bff07091655e -robots.txt,1669832832246,2f8bbfa9e0b79f54b10b9446a892fad8e11e21b63ebc96261c5f8876d5bbfb98 -manifest.json,1669832832245,1932b17e553d61c516fa9c3c7488c913089281ad828b4119d6ee6100ba07b6e4 -index.html,1669832854639,4c5605f7f8306a090a3a47d1c0f5606303fbb9aa409bfb98de995b541b93b744 -images/discord.png,1669832832238,05434d13f6e115ae0bfde631eb62fad0ecc52a0fd6ddfdff9debd4e39d018ece -images/github.png,1669832832239,f28bf40277f5ffcb1418592af34484a620ac0f20a79a5c7bd8b6eec2bbf630e6 -static/css/main.eeef0a5a.css,1669832854658,a130dd3749016805fd49f9dfffb182417889e9c95b895101c9c7ffa92672a160 -static/css/main.eeef0a5a.css.map,1669832854659,eb6df0a6a1739b0647a5a08d2031cdf4f35c7341150807dbc502bee23a142e3a -static/js/main.000cf97a.js.LICENSE.txt,1669832854659,c74a4cee5b7e2aac73dd3e020cfd1652fd40ec62d042f6f623c774ac5e38181e -images/a3.jpg,1669832832230,76395f50f545940a401266208d2dde26c4df1e2674393e36f03fb526933430e6 -images/logo.jpg,1669832832240,40a6e627f84bd9bcd72b4348bffe17b65dbe4dc68b30ff08b1b9ef69bee204ea -images/logoH.jpg,1669832832242,ca18101af70cf6d6b27a128ef6ed8039fae61e2ca218267593ed8540f5bc404a -thrifty_logos/thrifty_black_bg.png,1669832832249,fa335f62acec7997d36d833f990880801e41b886f4587a15d6f17519c9c2831c -favicon.ico,1669832832223,241f4642a51bfa533b1a6b72bcd704d28c385289607f3e460530227bbb055522 -images/a6.jpg,1669832832233,8838b1bca32b56e2994191c39836e0e6ef1c3e9b236d563135207a1f4e7f8e63 -images/a7.jpg,1669832832235,3c9a390ddad322f32efa3ef3f98acca0107dcb1531801210c75def2b6364f623 -images/a5.jpg,1669832832232,79c3c9ab5f1e50b7b6bec3b696dd9102ce5962f700a1a57de41fc8ba5f9849ea -images/a9.jpg,1669832832237,0e1fbe8d5775c3ed0b0907e7929ee8d4423a99a35a1c65f7b8fa97870c20d3f9 -images/logo_transparent.png,1669832832244,241f4642a51bfa533b1a6b72bcd704d28c385289607f3e460530227bbb055522 -images/a8.jpg,1669832832236,9ed71f4dba4057243e224bd6a83f0d1cbb518ef3a32d261cdc3ca5c2abb65b41 -thrifty_logos/logo_transparent.png,1669832832248,241f4642a51bfa533b1a6b72bcd704d28c385289607f3e460530227bbb055522 -images/a4.jpg,1669832832231,a133296163e8c898ff0167ae3536863da59c8dce4976d14baf323ba4f9ad3505 -images/a2.jpg,1669832832228,4304910d9df70b5cbe9fbefb60d7eda0763bc81b74ea322dc3d428557196b1ce -images/a10.jpg,1669832832227,87d94f1f0a90739e0714bad53eb722e0a59bcbbe032648287dd15a106d487ffc -static/js/main.000cf97a.js,1669832854659,e6a851c472f746c4b3fe8e25b99cf99335c6f2b726f2e22e803356d08e27a904 -thrifty_logos/thrifty_white_bg.png,1669832832254,89d827538117402402f06d97edb978487b9b79a16565fe3d651305c57113b158 -static/js/main.000cf97a.js.map,1669832854659,af314f913a2dc4621eeebf8abad4491c0f3aec7c77230c574a0a199fbb46b325 diff --git a/.firebaserc b/.firebaserc deleted file mode 100644 index 9507f8e..0000000 --- a/.firebaserc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "projects": { - "default": "thrifty-9baea" - } -} diff --git a/firebase.json b/firebase.json deleted file mode 100644 index f475554..0000000 --- a/firebase.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "hosting": { - "public": "build", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ] - } -} diff --git a/src/components/header/header.js b/src/components/header/header.js index a1f25ad..5229e85 100644 --- a/src/components/header/header.js +++ b/src/components/header/header.js @@ -1,25 +1,14 @@ import * as React from 'react'; -import { Box, Menu, MenuItem } from '@mui/material'; -import { useState } from 'react'; -import LoginIcon from '@mui/icons-material/Login'; +import { Box } from '@mui/material'; import "./header.css"; export const Header = () => { - const [anchorEl, setAnchorEl] = useState(null); - const handleClick = (event) => { - setAnchorEl(event.currentTarget); - }; - - const handleClose = () => { - setAnchorEl(null); - }; - - const handleSearch = (event) => { { /* redirects to another page based on user input */} - event.preventDefault(); { /* ensures no return to current page */} + const handleSearch = (event) => { + event.preventDefault(); const searchInput = event.target.elements.searchInput.value; - window.location.href = `/search/${searchInput}`; { /* search output */} + window.location.href = `/search/${searchInput}`; } return( diff --git a/src/components/upload_but/upload_button.js b/src/components/upload_but/upload_button.js index fe66462..0abb0a4 100644 --- a/src/components/upload_but/upload_button.js +++ b/src/components/upload_but/upload_button.js @@ -2,7 +2,7 @@ import * as React from 'react' import { Box, Button, Typography, TextField, MenuItem, FormControl, InputLabel, OutlinedInput } from "@mui/material" import InputAdornment from '@mui/material/InputAdornment'; import Collapse from '@mui/material/Collapse'; -import { useState, useEffect } from 'react' +import { useState } from 'react' import "./upload_button.css" import SellOutlinedIcon from '@mui/icons-material/SellOutlined'; import CloseFullscreenOutlinedIcon from '@mui/icons-material/CloseFullscreenOutlined'; diff --git a/src/pages/.about.js.swp b/src/pages/.about.js.swp deleted file mode 100644 index 3f767731887ec1d09b535fe95184df3b00dd7094..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeHN&yO5O6)uNBLLh(~DdI$)+raKxJKgr$OMZA}@NOK(c6M#YyS51^ifX!Rrpw#i z)v2o9*dR0ay$Z9Mhpt+PvK%2Yq;ouJ2#-#V(6`u&=Lnt_^unt_^unt_^u znt_^unt?Ac12#X#UW5G)41L%b-j5x)51aL^W}s%EW}s%EW}s%EW}s%EW}s%EW}s%E zW}s%^3&;SE7<&qKzvVvo@&Es$@Bfd!$=GjzUjiAh0$c!o2z&=P4*cUAjQth(0QeQ~ z3h)T<@uQ6W4)_JI0{rajj6DN90Xz)+^J|Q~54-`~2EGk!Ji^#xz$ag2>_gxk;AP+v za2ELFVaEOp^nvdJA3ns`o4`we2mIwL=mSmwfBQ0He*)eC-UMRc9Ppn98T&i%9`HwC z54ZsQ`%8@d0eB6Ffm^^Opanb$ECc_-Kaji&oCADd9+(5Z51a%Z2Ob1I0*}83ehs`0 zl)Qe9xHuIsmhvq@9UgA=a2g|vs2}5)MD_G+;~XV8dtpd*DJ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H7^S+LVB!lHnBq|v(wt$P4VF(vo&PXGv1QFy!<_HZ?9dgB-&M> zY@Ugo-0hWIX|lB9PNUy&JEIoiGobv4V65sJe!{qo=gR7{7oWTI{N*cGUszkecKybS zH#atK-M;gqmwxOqnU?xIe|WS#G-m(dF2S-zRFksE?qLsvZ#nNmTF4;98mlEw#@?;` nqS0%f_4k>gJsv4SQ2yWv=wjVFMG|x%2G5vPoy! diff --git a/src/pages/about.js b/src/pages/about.js index b092979..a4aaf8d 100644 --- a/src/pages/about.js +++ b/src/pages/about.js @@ -7,43 +7,71 @@ import "./about.css" export const AboutPage = () => { const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -document.addEventListener("DOMContentLoaded", function(){ - observe('.description'); - observe('.a'); -}); - -function observe(selector){ - const myElement = document.querySelector(selector); - const observer = new IntersectionObserver(entries => { - entries.forEach(entry => { - if (entry.isIntersecting) { - if(myElement.innerText.length < 20){ - hackereffectslow(selector); - setTimeout(() => { - hackereffectslow('.b'); - }, 750); - setTimeout(() => { - hackereffectslow('.c'); - }, 1300); - setTimeout(() => { - hackereffectslow('.d'); - }, 2300); - setTimeout(() => { - hackereffectslow('.e'); - }, 3050); - observer.disconnect(); + document.addEventListener("DOMContentLoaded", function(){ + observe('.description'); + observe('.a'); + }); + + function observe(selector){ + const myElement = document.querySelector(selector); + const observer = new IntersectionObserver(entries => { + entries.forEach(entry => { + if (entry.isIntersecting) { + if(myElement.innerText.length < 20){ + hackereffectslow(selector); + setTimeout(() => { + hackereffectslow('.b'); + }, 750); + setTimeout(() => { + hackereffectslow('.c'); + }, 1300); + setTimeout(() => { + hackereffectslow('.d'); + }, 2300); + setTimeout(() => { + hackereffectslow('.e'); + }, 3050); + observer.disconnect(); + } + else{ + hackereffectfast(selector); + observer.disconnect(); + } } - else{ - hackereffectfast(selector); - observer.disconnect(); - } + }); + }); + observer.observe(myElement); + } + + function hackereffectfast(selector){ + const target = document.querySelector(selector); + if(target){ + let iterations = 0; + + const interval = setInterval(() => { + target.innerText = target.innerText.split("") + .map((letter, index) => { + if(target.dataset.value[index] === " "){ + return target.dataset.value[index]; + } + if(index < iterations){ + return target.dataset.value[index]; + } + return letters[Math.floor(Math.random() * 26)]; + }) + .join("") + + if(iterations >= 550){ + clearInterval(interval); + iterations = 0; + } + + iterations += 1; + }, 10); } - }); - }); - observer.observe(myElement); -} + }; -function hackereffectfast(selector){ + function hackereffectslow(selector){ const target = document.querySelector(selector); if(target){ let iterations = 0; @@ -51,7 +79,7 @@ function hackereffectfast(selector){ const interval = setInterval(() => { target.innerText = target.innerText.split("") .map((letter, index) => { - if(target.dataset.value[index] == " "){ + if(target.dataset.value[index] === " "){ return target.dataset.value[index]; } if(index < iterations){ @@ -67,37 +95,9 @@ function hackereffectfast(selector){ } iterations += 1; - }, 10); + }, 50); } -}; - -function hackereffectslow(selector){ - const target = document.querySelector(selector); - if(target){ - let iterations = 0; - - const interval = setInterval(() => { - target.innerText = target.innerText.split("") - .map((letter, index) => { - if(target.dataset.value[index] == " "){ - return target.dataset.value[index]; - } - if(index < iterations){ - return target.dataset.value[index]; - } - return letters[Math.floor(Math.random() * 26)]; - }) - .join("") - - if(iterations >= 550){ - clearInterval(interval); - iterations = 0; - } - - iterations += 1; - }, 50); -} -}; + }; return(