Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-028
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-028
2023-028
Commits
3b8133e9
Commit
3b8133e9
authored
Oct 30, 2023
by
Ramanayaka D.H.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
63e3a6ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
login.py
login.py
+27
-0
No files found.
login.py
0 → 100644
View file @
3b8133e9
import
dash
from
dash
import
html
,
dcc
,
Input
,
Output
,
State
from
dash.exceptions
import
PreventUpdate
import
pymongo
import
dash_bootstrap_components
as
dbc
from
app
import
app
# Define the layout of the login page
#defines the layout of a web page for a login form with some styling using HTML and Dash components
log
=
html
.
Div
([
#Dash HTML component used to create a div element in the web page's structure
html
.
Div
([
# there are two main sections:
html
.
H1
(
"Login"
),
#main title of the login form
html
.
Div
([
#used to contain the login form elements
html
.
Div
([
html
.
Label
(
"Email address"
),
#label
dcc
.
Input
(
id
=
"login-username-input"
,
type
=
"email"
,
className
=
"form-control"
,
placeholder
=
"Enter email"
),
],
className
=
"login-inner-box-input"
),
#inputing the username
html
.
Div
([
html
.
Label
(
"Password"
),
#inputing the password
dcc
.
Input
(
id
=
"login-password-input"
,
type
=
"password"
,
className
=
"form-control"
,
placeholder
=
"Password"
)],
className
=
"login-inner-box-input"
),
html
.
Center
([
dbc
.
Button
(
"Login"
,
className
=
"btn btn-light"
,
id
=
"login-button"
)])
,
#login button
html
.
Div
(
id
=
"login-status"
)
])
],
className
=
"card login-inner-box"
),
html
.
Img
(
src
=
app
.
get_asset_url
(
'login.gif'
),
id
=
"login-vector"
)
#display an image on the web page
],
className
=
"login-outer-box"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment