diff --git a/HELPPAGE.html b/HELPPAGE.html new file mode 100644 index 0000000..bf163a4 --- /dev/null +++ b/HELPPAGE.html @@ -0,0 +1,56 @@ + + + + + + + + +

FIRST SITE PROJECT

+ +

HELP PAGE FOR USERS

+ +
    +
  1. /help = Help page
  2. +
  3. /user = Go to User's main page
  4. +
  5. /user/Enter your username = Display message + Your username
  6. +
  7. /path = Message from path
  8. +
  9. /path/Enter your subpath = Display message + Subpath
  10. +
  11. /squared = Message from squared
  12. +
  13. /squared/Enter your number to calculate squared= Calculate squared number
  14. +
  15. /root = Message from root
  16. +
  17. /root/Enter your number to calculate root = Calculate root of number
  18. +
  19. /contact = To contact me
  20. +
  21. /about = About me information
  22. +
+ +

+ +

 

+ + + diff --git a/INDEX.html b/INDEX.html new file mode 100644 index 0000000..2a0f233 --- /dev/null +++ b/INDEX.html @@ -0,0 +1,38 @@ + + + + + + + + +

Welcome to the First Site project with Flask!

+

Help Page --> /help

+

More than 10 pages!

+

+ + \ No newline at end of file diff --git a/Screenshots/About-Page.png b/Screenshots/About-Page.png new file mode 100644 index 0000000..811accf Binary files /dev/null and b/Screenshots/About-Page.png differ diff --git a/Screenshots/Contact-Page.png b/Screenshots/Contact-Page.png new file mode 100644 index 0000000..b904bbd Binary files /dev/null and b/Screenshots/Contact-Page.png differ diff --git a/Screenshots/Help-Page.png b/Screenshots/Help-Page.png new file mode 100644 index 0000000..4ad70bd Binary files /dev/null and b/Screenshots/Help-Page.png differ diff --git a/Screenshots/Main-Page.png b/Screenshots/Main-Page.png new file mode 100644 index 0000000..e83081c Binary files /dev/null and b/Screenshots/Main-Page.png differ diff --git a/Screenshots/Path-Page.png b/Screenshots/Path-Page.png new file mode 100644 index 0000000..3a69c80 Binary files /dev/null and b/Screenshots/Path-Page.png differ diff --git a/Screenshots/Path-Subpath-Page.png b/Screenshots/Path-Subpath-Page.png new file mode 100644 index 0000000..4ec641f Binary files /dev/null and b/Screenshots/Path-Subpath-Page.png differ diff --git a/Screenshots/Root-Number-Page.png b/Screenshots/Root-Number-Page.png new file mode 100644 index 0000000..aaf712a Binary files /dev/null and b/Screenshots/Root-Number-Page.png differ diff --git a/Screenshots/Root-Page.png b/Screenshots/Root-Page.png new file mode 100644 index 0000000..94c2c95 Binary files /dev/null and b/Screenshots/Root-Page.png differ diff --git a/Screenshots/Squared-Number-Page.png b/Screenshots/Squared-Number-Page.png new file mode 100644 index 0000000..85eba26 Binary files /dev/null and b/Screenshots/Squared-Number-Page.png differ diff --git a/Screenshots/Squared-Page.png b/Screenshots/Squared-Page.png new file mode 100644 index 0000000..b30653f Binary files /dev/null and b/Screenshots/Squared-Page.png differ diff --git a/Screenshots/User-Main-Page.png b/Screenshots/User-Main-Page.png new file mode 100644 index 0000000..70f37f8 Binary files /dev/null and b/Screenshots/User-Main-Page.png differ diff --git a/Screenshots/User-Page.png b/Screenshots/User-Page.png new file mode 100644 index 0000000..8771d7a Binary files /dev/null and b/Screenshots/User-Page.png differ diff --git a/application.py b/application.py new file mode 100644 index 0000000..f01b0e0 --- /dev/null +++ b/application.py @@ -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/") +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/") +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/") +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/") +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

Contact me: mathewguralskiy@gmail.com

" + + +@application.route("/about") +def ABOUT_PAGE(): + """About us page""" + return "My name is Matvey, I'm studying to become one day DevOps engineer" + + +#---------------------MAIN---------------------------- +if __name__=="__main__": + application.debug=True + application.env="FIRST SITE PROJECT" + application.run() + diff --git a/static/BACKGROUND.jpg b/static/BACKGROUND.jpg new file mode 100644 index 0000000..37545b1 Binary files /dev/null and b/static/BACKGROUND.jpg differ