diff --git a/.gitignore b/.gitignore index dc6d2ed..5888815 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,22 @@ __pycache__/ *.py[cod] *$py.class +### Flask ### +.venv/ + +*.pyc +__pycache__/ + +instance/ + +.pytest_cache/ +.coverage +htmlcov/ + +dist/ +build/ +*.egg-info/ + # C extensions *.so diff --git a/README.md b/README.md index 1e13b4d..91e47da 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The reason why it is called Ghost Simulator, is that in archery we call these tr The following technologies have been used in this project: -HTML 5 LogoPHP Logo CSS3 LogoJavascript Logo +HTML 5 LogoFlask Logo CSS3 LogoJavascript Logo diff --git a/ghost_simulator/__init__.py b/ghost_simulator/__init__.py new file mode 100644 index 0000000..3118f66 --- /dev/null +++ b/ghost_simulator/__init__.py @@ -0,0 +1,28 @@ +import os + +from flask import Flask + + +def create_app(test_config=None): + # create and configure the app + app = Flask(__name__, instance_relative_config=True) + + if test_config is None: + # load the instance config, if it exists, when not testing + app.config.from_pyfile('config.py', silent=True) + else: + # load the test config if passed in + app.config.from_mapping(test_config) + + # ensure the instance folder exists + try: + os.makedirs(app.instance_path) + except OSError: + pass + + @app.route('/index') + def index(): + return 'Hello, World!' + + return app + diff --git a/errors/400.html b/ghost_simulator/error_page/400.html similarity index 100% rename from errors/400.html rename to ghost_simulator/error_page/400.html diff --git a/errors/401.html b/ghost_simulator/error_page/401.html similarity index 100% rename from errors/401.html rename to ghost_simulator/error_page/401.html diff --git a/errors/403.html b/ghost_simulator/error_page/403.html similarity index 100% rename from errors/403.html rename to ghost_simulator/error_page/403.html diff --git a/errors/404.html b/ghost_simulator/error_page/404.html similarity index 100% rename from errors/404.html rename to ghost_simulator/error_page/404.html diff --git a/images/Archery_Ghost_Simulator.png b/ghost_simulator/images/Archery_Ghost_Simulator.png similarity index 100% rename from images/Archery_Ghost_Simulator.png rename to ghost_simulator/images/Archery_Ghost_Simulator.png diff --git a/images/Creative Commons.png b/ghost_simulator/images/Creative Commons.png similarity index 100% rename from images/Creative Commons.png rename to ghost_simulator/images/Creative Commons.png diff --git a/images/GitHub banner.png b/ghost_simulator/images/GitHub banner.png similarity index 100% rename from images/GitHub banner.png rename to ghost_simulator/images/GitHub banner.png diff --git a/images/Preguntas frecuentes.png b/ghost_simulator/images/Preguntas frecuentes.png similarity index 100% rename from images/Preguntas frecuentes.png rename to ghost_simulator/images/Preguntas frecuentes.png diff --git a/images/android-chrome-192x192.png b/ghost_simulator/images/android-chrome-192x192.png similarity index 100% rename from images/android-chrome-192x192.png rename to ghost_simulator/images/android-chrome-192x192.png diff --git a/images/android-chrome-512x512.png b/ghost_simulator/images/android-chrome-512x512.png similarity index 100% rename from images/android-chrome-512x512.png rename to ghost_simulator/images/android-chrome-512x512.png diff --git a/images/apple-touch-icon.png b/ghost_simulator/images/apple-touch-icon.png similarity index 100% rename from images/apple-touch-icon.png rename to ghost_simulator/images/apple-touch-icon.png diff --git a/images/archery.png b/ghost_simulator/images/archery.png similarity index 100% rename from images/archery.png rename to ghost_simulator/images/archery.png diff --git a/images/browsers/chrome.svg b/ghost_simulator/images/browsers/chrome.svg similarity index 100% rename from images/browsers/chrome.svg rename to ghost_simulator/images/browsers/chrome.svg diff --git a/images/browsers/edge.svg b/ghost_simulator/images/browsers/edge.svg similarity index 100% rename from images/browsers/edge.svg rename to ghost_simulator/images/browsers/edge.svg diff --git a/images/browsers/firefox.svg b/ghost_simulator/images/browsers/firefox.svg similarity index 100% rename from images/browsers/firefox.svg rename to ghost_simulator/images/browsers/firefox.svg diff --git a/images/browsers/opera.svg b/ghost_simulator/images/browsers/opera.svg similarity index 100% rename from images/browsers/opera.svg rename to ghost_simulator/images/browsers/opera.svg diff --git a/images/browsers/safari.svg b/ghost_simulator/images/browsers/safari.svg similarity index 100% rename from images/browsers/safari.svg rename to ghost_simulator/images/browsers/safari.svg diff --git a/images/developer.png b/ghost_simulator/images/developer.png similarity index 100% rename from images/developer.png rename to ghost_simulator/images/developer.png diff --git a/images/error.gif b/ghost_simulator/images/error.gif similarity index 100% rename from images/error.gif rename to ghost_simulator/images/error.gif diff --git a/images/favicon-16x16.png b/ghost_simulator/images/favicon-16x16.png similarity index 100% rename from images/favicon-16x16.png rename to ghost_simulator/images/favicon-16x16.png diff --git a/images/favicon-32x32.png b/ghost_simulator/images/favicon-32x32.png similarity index 100% rename from images/favicon-32x32.png rename to ghost_simulator/images/favicon-32x32.png diff --git a/images/favicon.ico b/ghost_simulator/images/favicon.ico similarity index 100% rename from images/favicon.ico rename to ghost_simulator/images/favicon.ico diff --git a/images/java_script.svg b/ghost_simulator/images/java_script.svg similarity index 100% rename from images/java_script.svg rename to ghost_simulator/images/java_script.svg diff --git a/images/mstile-150x150.png b/ghost_simulator/images/mstile-150x150.png similarity index 100% rename from images/mstile-150x150.png rename to ghost_simulator/images/mstile-150x150.png diff --git a/images/repository_scheme.png b/ghost_simulator/images/repository_scheme.png similarity index 100% rename from images/repository_scheme.png rename to ghost_simulator/images/repository_scheme.png diff --git a/images/site.webmanifest b/ghost_simulator/images/site.webmanifest similarity index 100% rename from images/site.webmanifest rename to ghost_simulator/images/site.webmanifest diff --git a/images/ui_icons/facebook.svg b/ghost_simulator/images/ui_icons/facebook.svg similarity index 100% rename from images/ui_icons/facebook.svg rename to ghost_simulator/images/ui_icons/facebook.svg diff --git a/images/ui_icons/info.svg b/ghost_simulator/images/ui_icons/info.svg similarity index 100% rename from images/ui_icons/info.svg rename to ghost_simulator/images/ui_icons/info.svg diff --git a/images/ui_icons/instagram.svg b/ghost_simulator/images/ui_icons/instagram.svg similarity index 100% rename from images/ui_icons/instagram.svg rename to ghost_simulator/images/ui_icons/instagram.svg diff --git a/images/ui_icons/log-out.svg b/ghost_simulator/images/ui_icons/log-out.svg similarity index 100% rename from images/ui_icons/log-out.svg rename to ghost_simulator/images/ui_icons/log-out.svg diff --git a/images/ui_icons/mail.svg b/ghost_simulator/images/ui_icons/mail.svg similarity index 100% rename from images/ui_icons/mail.svg rename to ghost_simulator/images/ui_icons/mail.svg diff --git a/images/ui_icons/save.svg b/ghost_simulator/images/ui_icons/save.svg similarity index 100% rename from images/ui_icons/save.svg rename to ghost_simulator/images/ui_icons/save.svg diff --git a/images/ui_icons/settings.svg b/ghost_simulator/images/ui_icons/settings.svg similarity index 100% rename from images/ui_icons/settings.svg rename to ghost_simulator/images/ui_icons/settings.svg diff --git a/images/ui_icons/twitter.svg b/ghost_simulator/images/ui_icons/twitter.svg similarity index 100% rename from images/ui_icons/twitter.svg rename to ghost_simulator/images/ui_icons/twitter.svg diff --git a/home.css b/ghost_simulator/old/css/home.css similarity index 100% rename from home.css rename to ghost_simulator/old/css/home.css diff --git a/index.css b/ghost_simulator/old/css/index.css similarity index 100% rename from index.css rename to ghost_simulator/old/css/index.css diff --git a/menu.css b/ghost_simulator/old/css/menu.css similarity index 100% rename from menu.css rename to ghost_simulator/old/css/menu.css diff --git a/ghost_simulator/old/css/settings.css b/ghost_simulator/old/css/settings.css new file mode 100644 index 0000000..fab1240 --- /dev/null +++ b/ghost_simulator/old/css/settings.css @@ -0,0 +1,43 @@ +body { + margin: 0; + padding: 0; + width: 100vw; + height: 100vh; + background-color: #fade95; +} + +message { + margin: 100px auto; + width: 700px; + height: 400px; + border: 1px solid #ccc; + border-radius: 5px; + padding: 10px; + font-family: sans-serif; + font-size: 14px; + color: #333; + background-color: white; +} + +.message .header { + font-size: 24px; + font-weight: bold; + color: red; +} + +.message .body { + font-size: 20px; + line-height: 1.5; +} + +.message .color-red { + font-size: 20px; + line-height: 1.5; + color: red; +} + +.icons { + display: flex; + flex-direction: row; + justify-content: space-around; +} \ No newline at end of file diff --git a/simulator.css b/ghost_simulator/old/css/simulator.css similarity index 100% rename from simulator.css rename to ghost_simulator/old/css/simulator.css diff --git a/home.php b/ghost_simulator/old/home.php similarity index 100% rename from home.php rename to ghost_simulator/old/home.php diff --git a/about.html b/ghost_simulator/old/html/about.html similarity index 100% rename from about.html rename to ghost_simulator/old/html/about.html diff --git a/index.html b/ghost_simulator/old/html/index.html similarity index 100% rename from index.html rename to ghost_simulator/old/html/index.html diff --git a/javascript_disabled.html b/ghost_simulator/old/html/javascript_disabled.html similarity index 100% rename from javascript_disabled.html rename to ghost_simulator/old/html/javascript_disabled.html diff --git a/login.html b/ghost_simulator/old/html/login.html similarity index 100% rename from login.html rename to ghost_simulator/old/html/login.html diff --git a/ghost_simulator/old/html/settings.html b/ghost_simulator/old/html/settings.html new file mode 100644 index 0000000..da0ac9a --- /dev/null +++ b/ghost_simulator/old/html/settings.html @@ -0,0 +1,8 @@ + + +
+

ConfiguraciĆ³n

+

+
+ + \ No newline at end of file diff --git a/simulator.php b/ghost_simulator/old/simulator.php similarity index 99% rename from simulator.php rename to ghost_simulator/old/simulator.php index 992d876..f931cbd 100644 --- a/simulator.php +++ b/ghost_simulator/old/simulator.php @@ -306,7 +306,7 @@
- +
diff --git a/ghost_simulator/templates/base.html b/ghost_simulator/templates/base.html new file mode 100644 index 0000000..d1f1d9b --- /dev/null +++ b/ghost_simulator/templates/base.html @@ -0,0 +1,43 @@ + +{% block title %}{% endblock %} - Ghost Simulator + + + + + + + + + + + + + + + + + + + + + + +ghost simulator logo +

Archery Ghost Simulator

+
+ about + settings + logout +
+ +
+
+ {% block header %}{% endblock %} +
+ {% for message in get_flashed_messages() %} +
{{ message }}
+ {% endfor %} + {% block content %}{% endblock %} +