Skip to content

Commit

Permalink
Merge pull request from MatveyGuralskiy/develop
Browse files Browse the repository at this point in the history
The project was add V1.0
  • Loading branch information
MatveyGuralskiy authored Feb 2, 2024
2 parents 5a19057 + e5c8123 commit 38f5505
Show file tree
Hide file tree
Showing 16 changed files with 185 additions and 0 deletions.
56 changes: 56 additions & 0 deletions HELPPAGE.html
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&#39;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&nbsp;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">&nbsp;</p>

</body>
</html>
38 changes: 38 additions & 0 deletions INDEX.html
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 --&gt; </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>
Binary file added Screenshots/About-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Contact-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Help-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Main-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Path-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Path-Subpath-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Root-Number-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Root-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Squared-Number-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Squared-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/User-Main-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/User-Page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions application.py
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()

Binary file added static/BACKGROUND.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 38f5505

Please sign in to comment.