From 7ca83265cfe6087a68e1f28077c8eed9c7858fc5 Mon Sep 17 00:00:00 2001 From: kamryn-fey Date: Mon, 21 Mar 2022 11:01:30 -0500 Subject: [PATCH 1/6] stuff --- .vscode/c_cpp_properties.json | 20 +++++ graphics stuff/matrix.cpp | 148 ++++++++++++++++++++++++++++++++++ graphics stuff/matrix.h | 67 +++++++++++++++ graphics stuff/vector.cpp | 1 + graphics stuff/vector3.h | 32 ++++++++ matrix.cpp | 122 ++++++++++++++++++++++++++++ 6 files changed, 390 insertions(+) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 graphics stuff/matrix.cpp create mode 100644 graphics stuff/matrix.h create mode 100644 graphics stuff/vector.cpp create mode 100755 graphics stuff/vector3.h create mode 100644 matrix.cpp diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..87c564b --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,20 @@ +{ + "configurations": [ + { + "name": "Mac", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "macFrameworkPath": [ + "/System/Library/Frameworks", + "/Library/Frameworks" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "c11", + "cppStandard": "c++98", + "intelliSenseMode": "macos-clang-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/graphics stuff/matrix.cpp b/graphics stuff/matrix.cpp new file mode 100644 index 0000000..c553b8e --- /dev/null +++ b/graphics stuff/matrix.cpp @@ -0,0 +1,148 @@ +#include +#include "matrix.h" + +using namespace std; + +fourByFourMatrix& fourByFourMatrix::operator+(const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = this->myMat[count] + src.myMat[count]; + } + fourByFourMatrix new_mat(sum); + return new_mat; +} +fourByFourMatrix fourByFourMatrix::operator+= (const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = this->myMat[count] + src.myMat[count]; + } + fourByFourMatrix new_mat(sum); + return new_mat; +} +fourByFourMatrix& fourByFourMatrix::operator-(const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = myMat[count]-src.myMat[count]; + + } + fourByFourMatrix new_mat(sum); + return new_mat; +} +fourByFourMatrix fourByFourMatrix::operator-=(const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = myMat[count]-src.myMat[count]; + } + fourByFourMatrix new_mat(sum); + return new_mat; +} + +fourByFourMatrix& fourByFourMatrix::operator *(const fourByFourMatrix& src) +{ +float mat[16]; + for(int i=0;i<16;i++) + { + mat[i]=myMat[i]*src.myMat[i]; + } + fourByFourMatrix retVal(mat); + return retVal; +} +fourByFourMatrix fourByFourMatrix::operator *=(const fourByFourMatrix& src) +{ + float mat[16]; + for(int i=0;i<16;i++) + { + mat[i]=myMat[i]*src.myMat[i]; + } + fourByFourMatrix retVal(mat); + return retVal; +} + +fourByFourMatrix fourByFourMatrix::findOrtho() +{ + +} +fourByFourMatrix fourByFourMatrix::findDiag() +{ + +} + +float fourByFourMatrix:: determinant() +{ + +} +fourByFourMatrix fourByFourMatrix::transpose() +{ + +} +fourByFourMatrix fourByFourMatrix::matrixDecomp() +{ + +} +fourByFourMatrix fourByFourMatrix::singularDecomp() +{ + +} +void fourByFourMatrix::display(fourByFourMatrix) +{ + int j=0; + for(int i=0;i<16;i++) + { + j++; + if(j<=4) + { + cout << myMat[i] << " "; + } + else + { + cout << "\n"; + } + } +}; +float* getMatrix(fourByFourMatrix src) +{ + return src.myMat; +} +float* getFirstRow(fourByFourMatrix src) +{ + float retVal[4] = {src.myMat[0],src.myMat[1],src.myMat[2],src.myMat[3]}; + return retVal; +} +float* getSecondRow(fourByFourMatrix src) +{ + float retVal[4] = {src.myMat[4],src.myMat[5],src.myMat[6],src.myMat[7]}; + return retVal; +} +float* getThirdRow(fourByFourMatrix src) +{ + float retVal[4] = {src.myMat[8],src.myMat[9],src.myMat[10],src.myMat[11]}; + return retVal; +} +float* getFourthRow(fourByFourMatrix src) +{ + float retVal[4] = {src.myMat[12],src.myMat[13],src.myMat[14],src.myMat[15]}; + return retVal; +} + +int main() +{ + float myMat[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; + float secMat[] = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; + fourByFourMatrix matA(myMat); + fourByFourMatrix matB(secMat); + fourByFourMatrix matC = matA+matB; + fourByFourMatrix display(matC); +} + diff --git a/graphics stuff/matrix.h b/graphics stuff/matrix.h new file mode 100644 index 0000000..97ca6d5 --- /dev/null +++ b/graphics stuff/matrix.h @@ -0,0 +1,67 @@ +#ifndef __FOURBYFOURMATRIX_H +#define __FOURBYFOURMATRIX_H + +#include + +#pragma once + +class fourByFourMatrix +{ + //float myMat[16]; + public: + float myMat[16]; + //propert for matrix + fourByFourMatrix(); //fill with 0 matrix + fourByFourMatrix(float matVal[16]); + fourByFourMatrix(const fourByFourMatrix& src); + virtual~fourByFourMatrix(); + + //math operations *** not a good idea make friend function + fourByFourMatrix& operator+ (const fourByFourMatrix& src); + fourByFourMatrix operator+= (const fourByFourMatrix& src); + fourByFourMatrix& operator- (const fourByFourMatrix& src); + fourByFourMatrix operator-= (const fourByFourMatrix& src); + fourByFourMatrix& operator* (const fourByFourMatrix& src); + fourByFourMatrix operator*= (const fourByFourMatrix& src); + + //functions (these are going to be the most difficult to write) + fourByFourMatrix findOrtho(); + fourByFourMatrix findDiag(); + float determinant(); + fourByFourMatrix transpose(); + fourByFourMatrix matrixDecomp(); + fourByFourMatrix singularDecomp(); + + //vector matrix stuff + //std::vector operator*(const std::vector& src); + //std::vector diagVector(); + + //get functions + float* getMatrix(); + //get rows + float* getFirstRow(); + float* getSecondRow(); + float* getThirdRow(); + float* getFourthRow(); + void display(fourByFourMatrix); + +}; +#endif + + +//always going to be a square matrix +/*function +- transpose +x cross product (never mind doesn't work on 4x4) +- determinant (det using LaPlace Expansion) +^^ (upper-left)(lower-right)-(upper-right)(lower-Left) +*note: a 4x4 matrix will be difficult when finding the determinant +Write this method as a loop, not recursively (find a way to look for -1, 1, or 0 in a row) +x inverse - dont need this because all matricies will be a 4x4 +- matrix decomp - A= QDQ^t Q is matric orthogonal to A and D is a diagonal matrix containing eigenvalues for A +*issue* some eigenvalues may be imaginary +singular val decomp - A USV^t U and V are orthogonal to A and S is a diagonal matrix +*Quanternions turn matricies into vectors* +(row * colcount(-1)) + column +col count and row count should be private const unsigned short +*/ diff --git a/graphics stuff/vector.cpp b/graphics stuff/vector.cpp new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/graphics stuff/vector.cpp @@ -0,0 +1 @@ + diff --git a/graphics stuff/vector3.h b/graphics stuff/vector3.h new file mode 100755 index 0000000..0b01823 --- /dev/null +++ b/graphics stuff/vector3.h @@ -0,0 +1,32 @@ +#pragma once + +class Vector3 +{ + public: + float x; + float y; + float z; + Vector3(); + Vector3(float xIn,float yIn,float zIn); + Vector3(const Vector3& src); + virtual~Vector3(); + friend Vector3& operator + (const Vector3& LHS, const Vector3& RHS); + friend Vector3 operator +=(const Vector3& LHS, const Vector3& RHS); + friend Vector3& operator - (const Vector3& LHS, const Vector3& RHS); + friend Vector3 operator -=(const Vector3& LHS, const Vector3& RHS); + Vector3 crossProduct(Vector3 a, Vector3 b); + Vector3 scalerAmplification(int a, Vector3 b); + Vector3 findOrtho(Vector3 a, Vector3 b); + Vector3 dotProduct(Vector3 a, Vector3 b); + float density(float,float); + float volume(float,float,float); + float integrate(float,float); + float area(float,float); + float averageElevation(float[],float[]); + float weightedAverageElevation(float, float, float); + float shade(float,float,float); + float average(float[]); + + private: + +}; diff --git a/matrix.cpp b/matrix.cpp new file mode 100644 index 0000000..8910d60 --- /dev/null +++ b/matrix.cpp @@ -0,0 +1,122 @@ +#include +#include "matrix.h" + +using namespace std; + +fourByFourMatrix& fourByFourMatrix::operator+(const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = this->myMat[count] + src.myMat[count]; + } + fourByFourMatrix new_mat(sum); + return new_mat; +} +fourByFourMatrix fourByFourMatrix::operator+= (const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = this->myMat[count] + src.myMat[count]; + } + fourByFourMatrix new_mat(sum); + return new_mat; +} +fourByFourMatrix& fourByFourMatrix::operator-(const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = myMat[count]-src.myMat[count]; + + } + fourByFourMatrix new_mat(sum); + return new_mat; +} +fourByFourMatrix fourByFourMatrix::operator-=(const fourByFourMatrix& src) +{ + float sum[16]; + int count=0; + for(count=0;count<16;count++) + { + sum[count] = myMat[count]-src.myMat[count]; + } + fourByFourMatrix new_mat(sum); + return new_mat; +} + +fourByFourMatrix& fourByFourMatrix::operator *(const fourByFourMatrix& src) +{ +float mat[16]; + for(int i=0;i<16;i++) + { + mat[i]=myMat[i]*src.myMat[i]; + } + fourByFourMatrix retVal(mat); + return retVal; + this should be an error +} +fourByFourMatrix fourByFourMatrix::operator *=(const fourByFourMatrix& src) +{ + +} + +fourByFourMatrix fourByFourMatrix::findOrtho() +{ + +} +fourByFourMatrix fourByFourMatrix::findDiag() +{ + +} + +fourByFourMatrix fourByFourMatrix::crossProduct() +{ + +} +float fourByFourMatrix:: determinant() +{ + +} +fourByFourMatrix fourByFourMatrix::transpose() +{ + +} +fourByFourMatrix fourByFourMatrix::matrixDecomp() +{ + +} +fourByFourMatrix fourByFourMatrix::singularDecomp() +{ + +} +void fourByFourMatrix::display(fourByFourMatrix) +{ + int j=0; + for(int i=0;i<16;i++) + { + j++; + if(j<=4) + { + cout << myMat[i] << " "; + } + else + { + cout << "\n"; + } + } +}; +int main() +{ + float myMat[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; + float secMat[] = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; + fourByFourMatrix matA(myMat); + fourByFourMatrix matB(secMat); + fourByFourMatrix matC = matA+matB; + fourByFourMatrix display(matC); +} + From f61f8c6afa4e820356e1743665bf5a27111a190a Mon Sep 17 00:00:00 2001 From: kamryn-fey Date: Mon, 21 Mar 2022 11:04:29 -0500 Subject: [PATCH 2/6] deleting accidental uploads --- graphics stuff/matrix.cpp | 148 -------------------------------------- graphics stuff/matrix.h | 67 ----------------- graphics stuff/vector.cpp | 1 - graphics stuff/vector3.h | 32 --------- matrix.cpp | 122 ------------------------------- 5 files changed, 370 deletions(-) delete mode 100644 graphics stuff/matrix.cpp delete mode 100644 graphics stuff/matrix.h delete mode 100644 graphics stuff/vector.cpp delete mode 100755 graphics stuff/vector3.h delete mode 100644 matrix.cpp diff --git a/graphics stuff/matrix.cpp b/graphics stuff/matrix.cpp deleted file mode 100644 index c553b8e..0000000 --- a/graphics stuff/matrix.cpp +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include "matrix.h" - -using namespace std; - -fourByFourMatrix& fourByFourMatrix::operator+(const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = this->myMat[count] + src.myMat[count]; - } - fourByFourMatrix new_mat(sum); - return new_mat; -} -fourByFourMatrix fourByFourMatrix::operator+= (const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = this->myMat[count] + src.myMat[count]; - } - fourByFourMatrix new_mat(sum); - return new_mat; -} -fourByFourMatrix& fourByFourMatrix::operator-(const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = myMat[count]-src.myMat[count]; - - } - fourByFourMatrix new_mat(sum); - return new_mat; -} -fourByFourMatrix fourByFourMatrix::operator-=(const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = myMat[count]-src.myMat[count]; - } - fourByFourMatrix new_mat(sum); - return new_mat; -} - -fourByFourMatrix& fourByFourMatrix::operator *(const fourByFourMatrix& src) -{ -float mat[16]; - for(int i=0;i<16;i++) - { - mat[i]=myMat[i]*src.myMat[i]; - } - fourByFourMatrix retVal(mat); - return retVal; -} -fourByFourMatrix fourByFourMatrix::operator *=(const fourByFourMatrix& src) -{ - float mat[16]; - for(int i=0;i<16;i++) - { - mat[i]=myMat[i]*src.myMat[i]; - } - fourByFourMatrix retVal(mat); - return retVal; -} - -fourByFourMatrix fourByFourMatrix::findOrtho() -{ - -} -fourByFourMatrix fourByFourMatrix::findDiag() -{ - -} - -float fourByFourMatrix:: determinant() -{ - -} -fourByFourMatrix fourByFourMatrix::transpose() -{ - -} -fourByFourMatrix fourByFourMatrix::matrixDecomp() -{ - -} -fourByFourMatrix fourByFourMatrix::singularDecomp() -{ - -} -void fourByFourMatrix::display(fourByFourMatrix) -{ - int j=0; - for(int i=0;i<16;i++) - { - j++; - if(j<=4) - { - cout << myMat[i] << " "; - } - else - { - cout << "\n"; - } - } -}; -float* getMatrix(fourByFourMatrix src) -{ - return src.myMat; -} -float* getFirstRow(fourByFourMatrix src) -{ - float retVal[4] = {src.myMat[0],src.myMat[1],src.myMat[2],src.myMat[3]}; - return retVal; -} -float* getSecondRow(fourByFourMatrix src) -{ - float retVal[4] = {src.myMat[4],src.myMat[5],src.myMat[6],src.myMat[7]}; - return retVal; -} -float* getThirdRow(fourByFourMatrix src) -{ - float retVal[4] = {src.myMat[8],src.myMat[9],src.myMat[10],src.myMat[11]}; - return retVal; -} -float* getFourthRow(fourByFourMatrix src) -{ - float retVal[4] = {src.myMat[12],src.myMat[13],src.myMat[14],src.myMat[15]}; - return retVal; -} - -int main() -{ - float myMat[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; - float secMat[] = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; - fourByFourMatrix matA(myMat); - fourByFourMatrix matB(secMat); - fourByFourMatrix matC = matA+matB; - fourByFourMatrix display(matC); -} - diff --git a/graphics stuff/matrix.h b/graphics stuff/matrix.h deleted file mode 100644 index 97ca6d5..0000000 --- a/graphics stuff/matrix.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef __FOURBYFOURMATRIX_H -#define __FOURBYFOURMATRIX_H - -#include - -#pragma once - -class fourByFourMatrix -{ - //float myMat[16]; - public: - float myMat[16]; - //propert for matrix - fourByFourMatrix(); //fill with 0 matrix - fourByFourMatrix(float matVal[16]); - fourByFourMatrix(const fourByFourMatrix& src); - virtual~fourByFourMatrix(); - - //math operations *** not a good idea make friend function - fourByFourMatrix& operator+ (const fourByFourMatrix& src); - fourByFourMatrix operator+= (const fourByFourMatrix& src); - fourByFourMatrix& operator- (const fourByFourMatrix& src); - fourByFourMatrix operator-= (const fourByFourMatrix& src); - fourByFourMatrix& operator* (const fourByFourMatrix& src); - fourByFourMatrix operator*= (const fourByFourMatrix& src); - - //functions (these are going to be the most difficult to write) - fourByFourMatrix findOrtho(); - fourByFourMatrix findDiag(); - float determinant(); - fourByFourMatrix transpose(); - fourByFourMatrix matrixDecomp(); - fourByFourMatrix singularDecomp(); - - //vector matrix stuff - //std::vector operator*(const std::vector& src); - //std::vector diagVector(); - - //get functions - float* getMatrix(); - //get rows - float* getFirstRow(); - float* getSecondRow(); - float* getThirdRow(); - float* getFourthRow(); - void display(fourByFourMatrix); - -}; -#endif - - -//always going to be a square matrix -/*function -- transpose -x cross product (never mind doesn't work on 4x4) -- determinant (det using LaPlace Expansion) -^^ (upper-left)(lower-right)-(upper-right)(lower-Left) -*note: a 4x4 matrix will be difficult when finding the determinant -Write this method as a loop, not recursively (find a way to look for -1, 1, or 0 in a row) -x inverse - dont need this because all matricies will be a 4x4 -- matrix decomp - A= QDQ^t Q is matric orthogonal to A and D is a diagonal matrix containing eigenvalues for A -*issue* some eigenvalues may be imaginary -singular val decomp - A USV^t U and V are orthogonal to A and S is a diagonal matrix -*Quanternions turn matricies into vectors* -(row * colcount(-1)) + column -col count and row count should be private const unsigned short -*/ diff --git a/graphics stuff/vector.cpp b/graphics stuff/vector.cpp deleted file mode 100644 index 8b13789..0000000 --- a/graphics stuff/vector.cpp +++ /dev/null @@ -1 +0,0 @@ - diff --git a/graphics stuff/vector3.h b/graphics stuff/vector3.h deleted file mode 100755 index 0b01823..0000000 --- a/graphics stuff/vector3.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -class Vector3 -{ - public: - float x; - float y; - float z; - Vector3(); - Vector3(float xIn,float yIn,float zIn); - Vector3(const Vector3& src); - virtual~Vector3(); - friend Vector3& operator + (const Vector3& LHS, const Vector3& RHS); - friend Vector3 operator +=(const Vector3& LHS, const Vector3& RHS); - friend Vector3& operator - (const Vector3& LHS, const Vector3& RHS); - friend Vector3 operator -=(const Vector3& LHS, const Vector3& RHS); - Vector3 crossProduct(Vector3 a, Vector3 b); - Vector3 scalerAmplification(int a, Vector3 b); - Vector3 findOrtho(Vector3 a, Vector3 b); - Vector3 dotProduct(Vector3 a, Vector3 b); - float density(float,float); - float volume(float,float,float); - float integrate(float,float); - float area(float,float); - float averageElevation(float[],float[]); - float weightedAverageElevation(float, float, float); - float shade(float,float,float); - float average(float[]); - - private: - -}; diff --git a/matrix.cpp b/matrix.cpp deleted file mode 100644 index 8910d60..0000000 --- a/matrix.cpp +++ /dev/null @@ -1,122 +0,0 @@ -#include -#include "matrix.h" - -using namespace std; - -fourByFourMatrix& fourByFourMatrix::operator+(const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = this->myMat[count] + src.myMat[count]; - } - fourByFourMatrix new_mat(sum); - return new_mat; -} -fourByFourMatrix fourByFourMatrix::operator+= (const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = this->myMat[count] + src.myMat[count]; - } - fourByFourMatrix new_mat(sum); - return new_mat; -} -fourByFourMatrix& fourByFourMatrix::operator-(const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = myMat[count]-src.myMat[count]; - - } - fourByFourMatrix new_mat(sum); - return new_mat; -} -fourByFourMatrix fourByFourMatrix::operator-=(const fourByFourMatrix& src) -{ - float sum[16]; - int count=0; - for(count=0;count<16;count++) - { - sum[count] = myMat[count]-src.myMat[count]; - } - fourByFourMatrix new_mat(sum); - return new_mat; -} - -fourByFourMatrix& fourByFourMatrix::operator *(const fourByFourMatrix& src) -{ -float mat[16]; - for(int i=0;i<16;i++) - { - mat[i]=myMat[i]*src.myMat[i]; - } - fourByFourMatrix retVal(mat); - return retVal; - this should be an error -} -fourByFourMatrix fourByFourMatrix::operator *=(const fourByFourMatrix& src) -{ - -} - -fourByFourMatrix fourByFourMatrix::findOrtho() -{ - -} -fourByFourMatrix fourByFourMatrix::findDiag() -{ - -} - -fourByFourMatrix fourByFourMatrix::crossProduct() -{ - -} -float fourByFourMatrix:: determinant() -{ - -} -fourByFourMatrix fourByFourMatrix::transpose() -{ - -} -fourByFourMatrix fourByFourMatrix::matrixDecomp() -{ - -} -fourByFourMatrix fourByFourMatrix::singularDecomp() -{ - -} -void fourByFourMatrix::display(fourByFourMatrix) -{ - int j=0; - for(int i=0;i<16;i++) - { - j++; - if(j<=4) - { - cout << myMat[i] << " "; - } - else - { - cout << "\n"; - } - } -}; -int main() -{ - float myMat[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; - float secMat[] = {16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1}; - fourByFourMatrix matA(myMat); - fourByFourMatrix matB(secMat); - fourByFourMatrix matC = matA+matB; - fourByFourMatrix display(matC); -} - From 8149103f003b50b56bb3d0ea6603e26d74041f22 Mon Sep 17 00:00:00 2001 From: kamryn-fey Date: Fri, 25 Mar 2022 11:02:06 -0500 Subject: [PATCH 3/6] accountPages --- src/Pages/AccountPage/AccountPage.css | 83 +++++++++++++++++++++++++++ src/Pages/AccountPage/AccountPage.js | 37 ++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 src/Pages/AccountPage/AccountPage.css create mode 100644 src/Pages/AccountPage/AccountPage.js diff --git a/src/Pages/AccountPage/AccountPage.css b/src/Pages/AccountPage/AccountPage.css new file mode 100644 index 0000000..1d04a1c --- /dev/null +++ b/src/Pages/AccountPage/AccountPage.css @@ -0,0 +1,83 @@ +.App { + min-height: 100vh; + background-color: rgb(211, 254, 255); + font-family: 'Times New Roman', Times, serif; + margin: 0; + padding: 0; + text-align: center; + } + + header { + text-align: left; + background-image: url(../../images/oceanimage.jpg); + background-blend-mode:lighten; + background-position: center; + background-size:cover; + opacity:1; + color: black; + font-size:x-large; + margin: none; + border-radius: none; + padding: 10%; + } + + h2 { + font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; + text-align: center; + background-color: rgb(184, 227, 240); + color: black; + font-size:large; + margin: none; + border-radius: none; + padding: 1%; + } + h3 { + font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; + text-align: justify; + color: black; + font-size:large; + margin: none; + border-radius: none; + padding: 1%; + } + + + button { + color: black; + padding: 20px 60px; + text-decoration: none; + font-size: large; + border: none; + margin: 5%; + background-color: rgb(102, 255, 0); + } + + .hotbar-button { + color: black; + padding: 5px 5px; + text-decoration: none; + font-size: large; + border: none; + margin: 1%; + } + .hotbar-button:hover { + cursor:pointer; + } + + button:hover { + background-color: rgb(0,141,141); + color: white; + } + + .Topright { + position: absolute; + top: 30px; + right: 16px; + font-size:18px + } + + .Middleright { + position: absolute; + top:30px; + right:80px; + } \ No newline at end of file diff --git a/src/Pages/AccountPage/AccountPage.js b/src/Pages/AccountPage/AccountPage.js new file mode 100644 index 0000000..195ee6c --- /dev/null +++ b/src/Pages/AccountPage/AccountPage.js @@ -0,0 +1,37 @@ +import "./HomePage.css" +import image from "../../images/cartimage.png" +import image2 from "../../images/searchbar.png" +function Home() { + return ( +
+
+
WorldWide Frames - See A Better World
+

Items on Sale

+

Deals of the Day

+ + + +

Sunglasses

+ + +
+
+
+ +
+
+
+
+ +
+
+
+ + ); +} + +export default Home; \ No newline at end of file From 98086c33fd39d7f5efcd5ffc0b3656ae41df2565 Mon Sep 17 00:00:00 2001 From: kamryn-fey Date: Fri, 25 Mar 2022 12:25:00 -0500 Subject: [PATCH 4/6] account --- src/App.js | 6 ++ src/Pages/AccountPage/AccountPage.css | 123 +++++++++----------------- src/Pages/AccountPage/AccountPage.js | 54 ++++------- 3 files changed, 69 insertions(+), 114 deletions(-) diff --git a/src/App.js b/src/App.js index d5e4d89..b346a89 100644 --- a/src/App.js +++ b/src/App.js @@ -1,4 +1,5 @@ import React from "react"; +import Account from "./Pages/AccountPage/AccountPage"; import Registration from "./Pages/RegistrationPage/RegistrationPage"; import Home from "./Pages/HomePage/HomePage" import Product from "./Pages/ProductPage/ProductPage" @@ -24,12 +25,17 @@ function App() { Product   Sign In +   + Account + + + diff --git a/src/Pages/AccountPage/AccountPage.css b/src/Pages/AccountPage/AccountPage.css index 1d04a1c..f3242e4 100644 --- a/src/Pages/AccountPage/AccountPage.css +++ b/src/Pages/AccountPage/AccountPage.css @@ -1,83 +1,48 @@ -.App { - min-height: 100vh; - background-color: rgb(211, 254, 255); - font-family: 'Times New Roman', Times, serif; - margin: 0; - padding: 0; - text-align: center; - } - - header { - text-align: left; - background-image: url(../../images/oceanimage.jpg); - background-blend-mode:lighten; - background-position: center; - background-size:cover; - opacity:1; - color: black; - font-size:x-large; - margin: none; - border-radius: none; - padding: 10%; - } +.information { + display: flex; + flex-direction: column; + width: 100%; + justify-content: center; + align-items: center; + background-color:aqua; +} - h2 { - font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; - text-align: center; - background-color: rgb(184, 227, 240); - color: black; - font-size:large; - margin: none; - border-radius: none; - padding: 1%; - } - h3 { - font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; - text-align: justify; - color: black; - font-size:large; - margin: none; - border-radius: none; - padding: 1%; - } +input { + width: 250px; + height: 50px; + font-size: 20px; + padding-left: 10px; + margin: 5px; - - button { - color: black; - padding: 20px 60px; - text-decoration: none; - font-size: large; - border: none; - margin: 5%; - background-color: rgb(102, 255, 0); - } +} - .hotbar-button { - color: black; - padding: 5px 5px; - text-decoration: none; - font-size: large; - border: none; - margin: 1%; - } - .hotbar-button:hover { - cursor:pointer; - } - - button:hover { - background-color: rgb(0,141,141); - color: white; - } + button { + width: 320px; + height: 50px; + margin-top: 15px; +} - .Topright { - position: absolute; - top: 30px; - right: 16px; - font-size:18px - } - - .Middleright { - position: absolute; - top:30px; - right:80px; - } \ No newline at end of file + button:hover { + cursor: pointer; +} + +.employees { + display: flex; + align-items: center; + flex-direction: column; + width: 100%; +} + +.employee { + width: 700px; + height: auto; + border: 1px solid black; + margin: 10px; + display: flex; + padding: 10px; + font-family: 'Courier New', Courier, monospace; +} + +.employee h3 { + margin: 20px; +} \ No newline at end of file diff --git a/src/Pages/AccountPage/AccountPage.js b/src/Pages/AccountPage/AccountPage.js index 195ee6c..46e654f 100644 --- a/src/Pages/AccountPage/AccountPage.js +++ b/src/Pages/AccountPage/AccountPage.js @@ -1,37 +1,21 @@ -import "./HomePage.css" -import image from "../../images/cartimage.png" -import image2 from "../../images/searchbar.png" -function Home() { - return ( -
-
-
WorldWide Frames - See A Better World
-

Items on Sale

-

Deals of the Day

- - - -

Sunglasses

- - -
-
-
- -
-
-
-
- -
-
-
- - ); +import { useState } from "react"; +import "./AccountPage.css" +import Axios from "axios"; +import { useHistory } from "react-router-dom"; + +function getAccountInformation() { + + + return ( +
+ + + + + + +
+ ); } -export default Home; \ No newline at end of file +export default getAccountInformation; From 77649a678db54c355513f29b67a0e0069b09cef9 Mon Sep 17 00:00:00 2001 From: kamryn-fey Date: Sat, 26 Mar 2022 11:56:03 -0500 Subject: [PATCH 5/6] Update AccountPage.js --- src/Pages/AccountPage/AccountPage.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Pages/AccountPage/AccountPage.js b/src/Pages/AccountPage/AccountPage.js index 46e654f..41be733 100644 --- a/src/Pages/AccountPage/AccountPage.js +++ b/src/Pages/AccountPage/AccountPage.js @@ -5,6 +5,18 @@ import { useHistory } from "react-router-dom"; function getAccountInformation() { + Axios.get("http://localhost:5000/register", data).then((response) => { + if (response.data.error) { + alert(response.data.error); + console.log("error!"); + } else { + if (response.data.message) { + setRegistrationStatus(response.data.message); + } + } + }); + + return (
From 345991a073307929377cd6f1500028c75e014ba0 Mon Sep 17 00:00:00 2001 From: kamryn-fey Date: Mon, 28 Mar 2022 12:58:07 -0500 Subject: [PATCH 6/6] fixing account stuff --- src/Pages/AccountPage/AccountPage.css | 190 +++++++++++++++++++++----- src/Pages/AccountPage/AccountPage.js | 67 +++++---- 2 files changed, 199 insertions(+), 58 deletions(-) diff --git a/src/Pages/AccountPage/AccountPage.css b/src/Pages/AccountPage/AccountPage.css index f3242e4..57857a4 100644 --- a/src/Pages/AccountPage/AccountPage.css +++ b/src/Pages/AccountPage/AccountPage.css @@ -1,48 +1,170 @@ -.information { +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); + + + +.body{ + /* height: 500%; + width:500%; */ display: flex; - flex-direction: column; - width: 100%; justify-content: center; align-items: center; - background-color:aqua; + padding: 100px; + background: linear-gradient(135deg, #71b7e6, #9b59b6); } -input { - width: 250px; - height: 50px; - font-size: 20px; - padding-left: 10px; - margin: 5px; - +.nav { + background-color: grey; + height: 30px; } +.a{ + color: white; + margin-right: 2em; + text-decoration: none; - button { - width: 320px; - height: 50px; - margin-top: 15px; } - - button:hover { - cursor: pointer; +.container{ + max-width: 700px; + width: 100%; + background-color: #fff; + padding: 25px 30px; + border-radius: 5px; + border: blue; + box-shadow: 0 5px 10px rgba(0,0,0,0.15); } - -.employees { +.container .title{ + font-size: 25px; + font-weight: 500; + position: relative; +} +.container .title::before{ + content: ""; + position: absolute; + left: auto; + bottom: auto; + height: 3px; + width: 30px; + border-radius: 5px; + background: linear-gradient(135deg, #71b7e6, #9b59b6); +} +.content form .user-details{ display: flex; - align-items: center; - flex-direction: column; - width: 100%; + flex-wrap: wrap; + justify-content: space-between; + margin: 20px 0 12px 0; } - -.employee { - width: 700px; - height: auto; +div.positioning{ + margin-left: auto; + margin-right: auto; + width: 8em +} +form .user-details .input-box{ + margin-bottom: 15px; + width: calc(100% / 2 - 20px); +} +form .input-box span.details{ + display: block; + font-weight: 500; + margin-bottom: 20px; +} +.user-details .input-box input{ + height: 45px; + width: 100%; + outline: none; + font-size: 16px; + border-radius: 5px; + padding-left: 15px; border: 1px solid black; - margin: 10px; - display: flex; - padding: 10px; - font-family: 'Courier New', Courier, monospace; + border-bottom-width: 2px; + transition: all 0.3s ease; } +.user-details .input-box input:focus, +.user-details .input-box input:valid{ + border-color: #9b59b6; +} + form .gender-details .gender-title{ + font-size: 20px; + font-weight: 500; + } + form .category{ + display: flex; + width: 80%; + margin: 14px 0 ; + justify-content: space-between; + } + form .category label{ + display: flex; + align-items: center; + cursor: pointer; + } + form .category label .dot{ + height: 18px; + width: 18px; + border-radius: 50%; + margin-right: 10px; + background-color: #15a05a; + border: 5px solid transparent; + transition: all 0.3s ease; +} + #dot-1:checked ~ .category label .one, + #dot-2:checked ~ .category label .two, + #dot-3:checked ~ .category label .three{ + background: #9b59b6; + border-color: #d9d9d9; + } + form .input[type="radio"]{ + display: none; + } + form .button{ + height: 45px; + margin: 35px 0 + } + form .button input{ + height: 100%; + width: 100%; + border-radius: 5px; + border: none; + color: rgb(229, 236, 238); + font: bold; + font-size: 18px; + font-weight: 500; + letter-spacing: 1px; + cursor: pointer; + transition: all 0.3s ease; + background: linear-gradient(135deg, #71b7e6, #9b59b6); + } + form .button input:hover{ + /* transform: scale(0.99); */ + background: linear-gradient(-135deg, #71b7e6, #9b59b6); + } + @media(max-width: 584px){ + .container{ + max-width: 100%; +} +form .user-details .input-box{ + margin-bottom: 15px; + width: 100%; + } + form .category{ + width: 100%; + } + .content form .user-details{ + max-height: 300px; + overflow-y: scroll; + } + .user-details::-webkit-scrollbar{ + width: 5px; + } + } + @media(max-width: 459px){ + .container .content .category{ + flex-direction: column; + } + + .nav { + background-color: grey; + height: 30px; + padding-left: 20px; + color: red !important; -.employee h3 { - margin: 20px; -} \ No newline at end of file + } +} diff --git a/src/Pages/AccountPage/AccountPage.js b/src/Pages/AccountPage/AccountPage.js index 41be733..a637c91 100644 --- a/src/Pages/AccountPage/AccountPage.js +++ b/src/Pages/AccountPage/AccountPage.js @@ -3,31 +3,50 @@ import "./AccountPage.css" import Axios from "axios"; import { useHistory } from "react-router-dom"; -function getAccountInformation() { - - Axios.get("http://localhost:5000/register", data).then((response) => { - if (response.data.error) { - alert(response.data.error); - console.log("error!"); - } else { - if (response.data.message) { - setRegistrationStatus(response.data.message); - } - } - }); - - return ( -
- - - - - - -
- ); -} +function getAccountInformation() { + +return ( + +
+
Profile
+
+
+
+
+ Full Name + +
+
+ Username + +
+
+ Email + +
+
+ Phone Number + +
+
+ Password + +
+
+ Confirm Password + +
+
+
+ +
+
+
+
+
+); + } export default getAccountInformation;