rebranding to sim16 in progress

This commit is contained in:
Sakimori 2021-03-02 16:52:48 -05:00
parent dc8da40d68
commit d7bb16350c
3 changed files with 12 additions and 12 deletions

View file

@ -5,15 +5,15 @@ from flask import Flask, url_for, Response, render_template, request, jsonify, s
from flask_socketio import SocketIO, emit from flask_socketio import SocketIO, emit
import database as db import database as db
app = Flask("the-prestige", static_folder='simmadome/build') app = Flask("the-prestige", static_folder='simmadome/build/', subdomain_matching=True)
app.config['SECRET KEY'] = 'dev' app.config['SECRET KEY'] = 'dev'
#url = "sakimori.space:5000" #url = "sakimori.space:5000"
#app.config['SERVER_NAME'] = url #app.config['SERVER_NAME'] = url
socketio = SocketIO(app) socketio = SocketIO(app)
# Serve React App # Serve React App
@app.route('/', defaults={'path': ''}, subdomain = "simsim") @app.route('/', defaults={'path': ''})
@app.route('/<path:path>', subdomain = "simsim") @app.route('/<path:path>')
def serve(path): def serve(path):
if path != "" and os.path.exists(app.static_folder + '/' + path): if path != "" and os.path.exists(app.static_folder + '/' + path):
return send_from_directory(app.static_folder, path) return send_from_directory(app.static_folder, path)
@ -22,7 +22,7 @@ def serve(path):
### API ### API
@app.route('/api/teams/search', subdomain = "simsim") @app.route('/api/teams/search')
def search_teams(): def search_teams():
query = request.args.get('query') query = request.args.get('query')
page_len = int(request.args.get('page_len')) page_len = int(request.args.get('page_len'))
@ -42,7 +42,7 @@ def search_teams():
MAX_SUBLEAGUE_DIVISION_TOTAL = 22; MAX_SUBLEAGUE_DIVISION_TOTAL = 22;
MAX_TEAMS_PER_DIVISION = 12; MAX_TEAMS_PER_DIVISION = 12;
@app.route('/api/leagues', methods=['POST'], subdomain = "simsim") @app.route('/api/leagues', methods=['POST'])
def create_league(): def create_league():
config = json.loads(request.data) config = json.loads(request.data)
@ -114,7 +114,7 @@ def create_league():
### SOCKETS ### SOCKETS
thread2 = threading.Thread(target=socketio.run,args=(app,'sakimori.space:5000')) thread2 = threading.Thread(target=socketio.run,args=(app,"0.0.0.0", "80"))
thread2.start() thread2.start()
master_games_dic = {} #key timestamp : (game game, {} state) master_games_dic = {} #key timestamp : (game game, {} state)

View file

@ -8,10 +8,10 @@
<title>⚾ The Simmadome</title> <title>⚾ The Simmadome</title>
<meta property="og:title" content="Watch at the Simmadome" /> <meta property="og:title" content="Sim16 at the Observatory" />
<meta property="og:description" content="The Simsim: Your players, your teams, your games." /> <meta property="og:description" content="The Sim16: Your players, your teams, your games." />
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@SIBR_XVI"> <meta name="twitter:site" content="@xvipsixteen">
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>

View file

@ -42,13 +42,13 @@ function Header() {
<a href="https://github.com/Sakimori/matteo-the-prestige" className="github_link" target="_blank" rel="noopener noreferrer"> <a href="https://github.com/Sakimori/matteo-the-prestige" className="github_link" target="_blank" rel="noopener noreferrer">
<img className="github_logo" src={githubLogo} alt="Github"/> <img className="github_logo" src={githubLogo} alt="Github"/>
</a> </a>
<a href="https://twitter.com/intent/follow?screen_name=SIBR_XVI" className="twitter_link" target="_blank" rel="noopener noreferrer"> <a href="https://twitter.com/intent/follow?screen_name=xvipsixteen" className="twitter_link" target="_blank" rel="noopener noreferrer">
<img className="twitter_logo" src={twitterLogo} alt="Twitter"/> <img className="twitter_logo" src={twitterLogo} alt="Twitter"/>
</a> </a>
</div> </div>
</div> </div>
<a href="/" className="page_header"><h2 className="page_header" style={{fontSize:"50px"} as React.CSSProperties}>THE SIMMADOME</h2></a> <a href="/" className="page_header"><h2 className="page_header" style={{fontSize:"50px"} as React.CSSProperties}>THE OBSERVATORY</h2></a>
<h2 className="page_header">Join SIBR on <a href="https://discord.gg/UhAajY2NCW" className="link"><img src={discordlogo} alt="" height="30"/></a> to start your own games!</h2> <h2 className="page_header">Join us on <a href="https://discord.gg/ux6Drk8Bp7" className="link"><img src={discordlogo} alt="" height="30"/></a> to start your own games!</h2>
</div> </div>
); );
} }