-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from vishnoianil/login-redesign
Improve the UI login page
- Loading branch information
Showing
5 changed files
with
142 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
a { | ||
color: white; /* Change the text color to white */ | ||
text-decoration: underline; /* Ensure the text is underlined */ | ||
} | ||
|
||
.login-page-background { | ||
background-image: url('../../../public/InstructLab-Background-Image.png'); | ||
/* Replace with your background image URL */ | ||
background-size: cover; | ||
background-position: center; | ||
height: 100vh; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.login-container { | ||
text-align: center; | ||
} | ||
|
||
.sign-in-text { | ||
margin-top: 1rem; | ||
color: white; | ||
padding: 20px; | ||
text-align: center; | ||
font-size: xx-large; | ||
} | ||
|
||
.description-text { | ||
margin-top: 1rem; | ||
color: white; | ||
padding-bottom: 50px; | ||
font-size: x-large; | ||
font-style: italic; | ||
text-align: center; | ||
} | ||
|
||
.urls-text { | ||
margin-top: 1rem; | ||
color: white; | ||
padding: 20px; | ||
text-align: center; | ||
font-size: large; | ||
} | ||
|
||
.policy-text { | ||
margin-top: 1rem; | ||
color: white; | ||
padding-top: 20px; | ||
text-align: center; | ||
font-size: large; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from 'react'; | ||
import { Page } from '@patternfly/react-core/dist/dynamic/components/Page'; | ||
import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; | ||
import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; | ||
import { Text } from '@patternfly/react-core/dist/dynamic/components/Text'; | ||
import { TextContent } from '@patternfly/react-core/dist/dynamic/components/Text'; | ||
import { Grid } from '@patternfly/react-core/dist/dynamic/layouts/Grid'; | ||
import { GridItem } from '@patternfly/react-core/dist/dynamic/layouts/Grid'; | ||
import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; | ||
import './githublogin.css'; | ||
import { signIn } from 'next-auth/react'; | ||
|
||
const GithubLogin: React.FC = () => { | ||
const handleGitHubLogin = () => { | ||
signIn('github', { callbackUrl: '/' }); // Redirect to home page after login | ||
}; | ||
|
||
return ( | ||
<Page> | ||
<PageSection isFilled className="login-page-background"> | ||
<Grid hasGutter span={12}> | ||
<GridItem span={6} className="login-container"> | ||
<div> | ||
<TextContent> | ||
<Text className="sign-in-text">Sign in to your account</Text> | ||
</TextContent> | ||
<TextContent> | ||
<Text className="description-text"> | ||
Join the novel, community based movement to <br></br>create truly open source LLMs | ||
</Text> | ||
</TextContent> | ||
<div className="login-container"> | ||
<Button variant="primary" icon={<GithubIcon />} iconPosition="left" size="lg" onClick={handleGitHubLogin}> | ||
Sign in with GitHub | ||
</Button> | ||
</div> | ||
<TextContent> | ||
<Text className="urls-text"> | ||
<a href="https://github.com/instructlab/" style={{ color: 'white', textDecoration: 'underline' }} target="_blank"> | ||
GitHub | ||
</a>{' '} | ||
|{' '} | ||
<a | ||
href="https://github.com/instructlab/community/blob/main/Collaboration.md" | ||
style={{ color: 'white', textDecoration: 'underline' }} | ||
target="_blank" | ||
> | ||
Collaborate | ||
</a>{' '} | ||
|{' '} | ||
<a | ||
href="https://github.com/instructlab/community/blob/main/CODE_OF_CONDUCT.md" | ||
style={{ color: 'white', textDecoration: 'underline' }} | ||
target="_blank" | ||
> | ||
Code Of Conduct | ||
</a> | ||
</Text> | ||
</TextContent> | ||
</div> | ||
</GridItem> | ||
</Grid> | ||
</PageSection> | ||
</Page> | ||
); | ||
}; | ||
|
||
export default GithubLogin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters