Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Add Profile Page #17

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/Profile/Profile.tsx
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import * as React from 'react';
import { Div } from 'glamorous';

const Profile = () => <h1>Profile Page</h1>;
import ProfileForm from './ProfileForm';

const Profile = () => (
<Div
className="profile-form"
display="flex"
alignItems="center"
justifyContent="center"
>
<Div className="profile">
<ProfileForm />
</Div>
</Div>
);

export default Profile;
41 changes: 41 additions & 0 deletions src/Profile/ProfileForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import * as React from 'react';
import { Form } from 'glamorous';

import ProfileLabel from './ProfileLabel';
import ProfileSubmitButton from './ProfileSubmitButton';
import ProfileFormTextInput from './ProfileFormTextInput';
import ProfilePicture from './ProfilePicture';

const ProfileForm = () => (
<Form
backgroundColor="rgba(255, 255, 255, 0.6)"
padding="2rem 2rem"
margin="2rem"
display="flex"
flexDirection="column"
alignItems="center"
spaceBetween="2rem"
>
<ProfilePicture />
<ProfileLabel>
Full Name
<ProfileFormTextInput type="text" name="name" />
</ProfileLabel>
<ProfileLabel>
DJ Name
<ProfileFormTextInput type="text" name="djname" />
</ProfileLabel>
<ProfileLabel>
Email Address
<ProfileFormTextInput type="text" name="email" />
</ProfileLabel>
<ProfileLabel>
Password
<ProfileFormTextInput type="text" name="password" />
</ProfileLabel>

<ProfileSubmitButton>Update</ProfileSubmitButton>
</Form>
);

export default ProfileForm;
24 changes: 24 additions & 0 deletions src/Profile/ProfileFormTextInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import glamorous from 'glamorous';

const ProfileFormTextInput = glamorous.input({
backgroundColor: 'transparent',
font: 'sans-serif',
textAlign: 'left',
fontSize: '20px',
height: '2.5rem',
width: '20rem',
border: '0.2px solid black',
borderRadius: '0.25rem',
display: 'block',
marginBottom: '0.5rem',
transition: 'all .3s',
textIndent: '5px',

':focus': {
backgroundColor: 'rgba(245, 245, 245, 1)',
outline: 'none',
boxShadow: 'rgba(245, 245, 245, 1)',
},
});

export default ProfileFormTextInput;
8 changes: 8 additions & 0 deletions src/Profile/ProfileLabel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import glamorous from 'glamorous';

const ProfileLabel = glamorous.label({
fontFamily: 'sans-serif',
fontSize: '15px',
});

export default ProfileLabel;
10 changes: 10 additions & 0 deletions src/Profile/ProfilePicture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as React from 'react';
import { Img } from 'glamorous';

const shrek = require('./classy-shrek.png');

const ProfilePicture = () => (
<Img src={shrek} height="260" width="260" borderRadius="50%" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

);

export default ProfilePicture;
17 changes: 17 additions & 0 deletions src/Profile/ProfileSubmitButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import glamorous from 'glamorous';

const SubmitButton = glamorous.button({
backgroundColor: '#BD10E0',
border: 'none',
color: 'white',
font: 'sans-serif',
textAlign: 'center',
display: 'inline-block',
fontSize: '15px',
height: '2.5rem',
width: '20rem',
marginTop: '1rem',
borderRadius: '0.25rem',
});

export default SubmitButton;
Binary file added src/Profile/classy-shrek.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.