-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a19057
commit e5c8123
Showing
16 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
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,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
background-image: url('https://i.pinimg.com/736x/4b/7d/0a/4b7d0ad9deeeb8fad8f43b12425f6cb9.jpg'); | ||
background-size: cover; | ||
background-position: center; | ||
font-family: 'Comic Sans MS', cursive; | ||
text-align: center; | ||
} | ||
|
||
p, span { | ||
font-family: 'Comic Sans MS', cursive; | ||
font-size: 18px; | ||
} | ||
|
||
strong { | ||
font-weight: bold; | ||
} | ||
|
||
img { | ||
height: 350px; | ||
width: 613px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p style="text-align:center"><span style="font-family:Comic Sans MS,cursive"><span style="font-size:24px"><span style="background-color:#e67e22">FIRST SITE PROJECT</span></span></span></p> | ||
|
||
<p style="text-align:center"><span style="font-family:Comic Sans MS,cursive"><span style="font-size:18px">HELP<span style="font-family:Comic Sans MS,cursive"> PAGE FOR</span> USERS</span></span></p> | ||
|
||
<ol> | ||
<li><span style="font-family:Comic Sans MS,cursive"><span style="font-size:16px">/help = Help page</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/user = Go to User's main page</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/user/Enter your username = Display message + Your username</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/path = Message from path</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/path/Enter your subpath = Display message + Subpath</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/squared = Message from squared</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/squared/Enter your number to calculate squared= Calculate squared number</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/root = Message from root</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/root/Enter your number to calculate root = Calculate root of number</span></span></li> | ||
<li><span style="font-size:16px"><span style="font-family:Comic Sans MS,cursive">/contact = To contact me</span></span></li> | ||
<li><span style="font-family:Comic Sans MS,cursive"><span style="font-size:16px">/about = About me information</span></span></li> | ||
</ol> | ||
|
||
<p style="text-align:right"><img alt="" src="https://images.twinkl.co.uk/tw1n/image/private/t_630/u/ux/question-mark_ver_1.jpg" style="height:250px; width:176px" /></p> | ||
|
||
<p style="text-align:right"> </p> | ||
|
||
</body> | ||
</html> |
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,38 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
background-image: url('https://i.pinimg.com/736x/4b/7d/0a/4b7d0ad9deeeb8fad8f43b12425f6cb9.jpg'); | ||
background-size: cover; | ||
background-position: center; | ||
font-family: 'Comic Sans MS', cursive; | ||
text-align: center; | ||
} | ||
|
||
p, span { | ||
font-family: 'Comic Sans MS', cursive; | ||
font-size: 18px; | ||
} | ||
|
||
strong { | ||
font-weight: bold; | ||
} | ||
|
||
img { | ||
height: 350px; | ||
width: 613px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p><span>Welcome to the First Site project with <strong>Flask!</strong></span></p> | ||
<p><span><strong>Help Page --> </strong>/help</span></p> | ||
<p style="text-align:center"><span style="font-family:Comic Sans MS,cursive"><span style="font-size:18px">More than <strong>10 pages</strong>!</span></span></p> | ||
<p><img alt="" src="https://callforcurators.com/wp-content/uploads/2013/11/firstsite.jpg" /></p> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
#--------------FIRST SITE PROJECT--------------------- | ||
from flask import Flask | ||
application=Flask(__name__) | ||
|
||
#-----------------PAGES SETTINGS---------------------- | ||
@application.route("/") | ||
def INDEX(): | ||
"""The main page of project""" | ||
INDEXFILE="C:\\YOUR PATH\\First-site-Project\\INDEX.html" #Enter your path | ||
INDEXOPEN=open(INDEXFILE,mode='r') | ||
INDEXPAGE=INDEXOPEN.read() | ||
INDEXOPEN.close() | ||
return INDEXPAGE | ||
|
||
|
||
@application.route("/help") | ||
def HELP_PAGE(): | ||
"""Help page for users""" | ||
HELPFILE="C:\\YOUR PATH\\First-site-Project\\HELPPAGE.html" #Enter your path | ||
HELPOPEN=open(HELPFILE,mode='r') | ||
HELPPAGE=HELPOPEN.read() | ||
HELPOPEN.close() | ||
return HELPPAGE | ||
|
||
|
||
@application.route("/user") | ||
def USER_PAGE(): | ||
"""Page of users""" | ||
return "User's main page" | ||
|
||
|
||
@application.route("/user/<USERNAME>") | ||
def SHOW_USER_PAGE(USERNAME): | ||
"""User's name""" | ||
return "Hi!"+USERNAME.upper() | ||
|
||
|
||
@application.route("/path") | ||
def PATH_PAGE(): | ||
"""Path page""" | ||
return "Please enter the subpath for this page" | ||
|
||
|
||
@application.route("/path/<path:subpath>") | ||
def SUBPATH_PAGE(subpath): | ||
"""Print to the page Subpath""" | ||
return "Subpath of user is: "+subpath | ||
|
||
|
||
@application.route("/squared") | ||
def SQUARED_MAIN_PAGE(): | ||
"""Squared page""" | ||
return "Please enter to the subpath number you want to calculate" | ||
|
||
|
||
@application.route("/squared/<int:X>") | ||
def SQUARED_PAGE(X): | ||
"""Calculate squared of user number""" | ||
return "Squared number from: "+str(X)+" = "+str(X*X) | ||
|
||
|
||
@application.route("/root") | ||
def ROOT_MAIN_PAGE(): | ||
"""Route page""" | ||
return "Please enter to the subpath number you want to root" | ||
|
||
|
||
@application.route("/root/<int:Y>") | ||
def ROOT_PAGE(Y): | ||
"""Calculate root of user number""" | ||
return "Root number from: "+str(Y)+" = "+str(int(Y**0.5)) | ||
|
||
|
||
@application.route("/contact") | ||
def CONTACT_PAGE(): | ||
"""Contact page""" | ||
return "GitHub profile: https://github.com/MatveyGuralskiy<p>Contact me: mathewguralskiy@gmail.com<p>" | ||
|
||
|
||
@application.route("/about") | ||
def ABOUT_PAGE(): | ||
"""About us page""" | ||
return "<b><font color=red>My name is Matvey, I'm studying to become one day DevOps engineer</font><b>" | ||
|
||
|
||
#---------------------MAIN---------------------------- | ||
if __name__=="__main__": | ||
application.debug=True | ||
application.env="FIRST SITE PROJECT" | ||
application.run() | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.