-
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.
From this commit we have started to implement Flask in all new versions of the platform, to learn more visit the wiki, in this commit we have started to create files for the proper functioning of Flask. ALL THE FILES OF THE OLD VERSION ARE TEMPORARILY IN /old, since the development has not yet been completed.
- Loading branch information
Showing
50 changed files
with
140 additions
and
2 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
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
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,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 | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,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; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,8 @@ | ||
</head> | ||
<body> | ||
<div class="message"> | ||
<h1>Configuración</h1> | ||
<h2></h2> | ||
</div> | ||
</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 |
---|---|---|
|
@@ -306,7 +306,7 @@ | |
<center> | ||
|
||
|
||
<!--- Make table data visible ---> | ||
<!--- Save Simulation Data ---> | ||
|
||
<br> | ||
<center> | ||
|
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,43 @@ | ||
<!doctype html> | ||
<title>{% block title %}{% endblock %} - Ghost Simulator</title> | ||
|
||
<!--- Responsive Platform ---> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"&gt> | ||
|
||
<meta charset="utf-8"> | ||
<meta name="robots" content="noindex"> | ||
|
||
<!--- Favicon ---> | ||
<link rel="apple-touch-icon" sizes="180x180" href="./images/apple-touch-icon.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicon-16x16.png"> | ||
<link rel="manifest" href="./images/site.webmanifest"> | ||
<meta name="msapplication-TileColor" content="#fade95"> | ||
<meta name="theme-color" content="#fade95"> | ||
|
||
<!--- Check JavaScript ---> | ||
<noscript> | ||
<meta http-equiv="refresh" content="0;URL='./javascript_disabled.html'" /> | ||
</noscript> | ||
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | ||
|
||
<!--- Content ---> | ||
|
||
<a href="./"><img src="/images/Archery_Ghost_Simulator.png" alt="ghost simulator logo" width="40" height="40"></img></a> | ||
<h1>Archery Ghost Simulator</h1> | ||
<div class="UI_icons"> | ||
<a href="/about.html"><img src="/images/ui_icons/info.svg" alt="about"><img></a> | ||
<a href="/settings.html"><img src="/images/ui_icons/settings.svg" alt="settings"><img></a> | ||
<a href="https://ghostsimulator.eu.auth0.com/oidc/logout"><img src="/images/ui_icons/log-out.svg" alt="logout"><img></a> | ||
</div> | ||
|
||
<section class="content"> | ||
<header> | ||
{% block header %}{% endblock %} | ||
</header> | ||
{% for message in get_flashed_messages() %} | ||
<div class="flash">{{ message }}</div> | ||
{% endfor %} | ||
{% block content %}{% endblock %} | ||
</section> |