diff --git a/requirements.txt b/requirements.txt index 7842e1bd..bf33e55a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ bcrypt==3.1.7 certifi==2019.9.11 cffi==1.13.01 chardet==3.0.4 -Click==7.0 +click==7.0 cryptography==2.8 dateparser==0.7.2 dice==2.4.2 @@ -13,14 +13,11 @@ dnspython==1.15.0 dnspython3==1.15.0 entrypoints==0.3 ffmpeg-python==0.2.0 -Flask==1.1.1 future==0.18.1 idna==2.8 -itsdangerous==1.1.0 -Jinja2==2.10.3 keyring==19.2.0 markdown2==2.3.8 -MarkupSafe==1.1.1 +markupsafe==1.1.1 mcstatus==2.2.1 multidict==4.5.2 psycopg2-binary==2.8.3 @@ -34,12 +31,13 @@ royalherald==5.1b2 sentry-sdk==0.13.0 six==1.12.0 sortedcontainers==2.1.0 -SQLAlchemy==1.3.10 +sqlalchemy==1.3.10 tornado==6.0.3 tzlocal==2.0.0 urllib3==1.25.6 websockets==8.0.2 -Werkzeug==0.16.0 yarl==1.3.0 youtube-dl==2019.10.16 riotwatcher==2.7.1 +# discord.py is missing as we currently use the git version and we ignore the websockets<7.0 requirement +starlette==0.12.13 diff --git a/royalnet/web/__init__.py b/royalnet/web/__init__.py index d3899afd..e69de29b 100644 --- a/royalnet/web/__init__.py +++ b/royalnet/web/__init__.py @@ -1,4 +0,0 @@ -from .flaskserver import create_app -from .royalprint import Royalprint - -__all__ = ["create_app", "Royalprint"] diff --git a/royalnet/web/flaskserver.py b/royalnet/web/flaskserver.py deleted file mode 100644 index b85f4c5d..00000000 --- a/royalnet/web/flaskserver.py +++ /dev/null @@ -1,54 +0,0 @@ -import typing -import flask as f -import os -from sqlalchemy.orm import scoped_session -from ..database import Alchemy -from .royalprint import Royalprint - - -def create_app(config_obj: typing.Type, blueprints: typing.List[Royalprint]): - """Create a :py:class:`flask.Flask` application object. - - Gets the ``app.secret_key`` from the ``SECRET_KEY`` envvar. - - Also requires a ``DB_PATH`` key in ``config_obj`` to initialize the database connection. - - Warning: - The code for this class was written at 1 AM, and I have no clue of how and why it works or even if it really does work. - Use with caution? - - Args: - config_obj: The object to be passed to :py:meth:`flask.Flask.config.from_object`. - blueprints: A list of blueprints to be registered to the application. - - Returns: - The created :py:class:`flask.Flask`.""" - app = f.Flask(__name__) - app.config.from_object(config_obj) - app.secret_key = os.environ["SECRET_KEY"] - - # Load blueprints - required_tables = set() - for blueprint in blueprints: - required_tables = required_tables.union(blueprint.required_tables) - app.register_blueprint(blueprint) - - # Init Alchemy - # Seems like a dirty hack to me, but experiments are fun, right? - # WARNING BLACK SORCERY BELOW EDIT AT YOUR OWN RISK - if len(required_tables) > 0: - alchemy = Alchemy(app.config["DB_PATH"], required_tables) - app.config["ALCHEMY"] = alchemy - app.config["ALCHEMY_SESSION"] = scoped_session(alchemy.Session) - else: - app.config["ALCHEMY"] = None - app.config["ALCHEMY_SESSION"] = None - - @app.teardown_request - def teardown_alchemy_session(*_, **__): - alchemy_session = app.config["ALCHEMY_SESSION"] - if alchemy_session is not None: - alchemy_session.remove() - # END OF BLACK SORCERY - - return app diff --git a/royalnet/web/royalprint.py b/royalnet/web/royalprint.py deleted file mode 100644 index 719cc823..00000000 --- a/royalnet/web/royalprint.py +++ /dev/null @@ -1,18 +0,0 @@ -import typing -import flask as f - - -class Royalprint(f.Blueprint): - """An edited :py:class:`flask.Blueprint` containing an additional ``required_tables`` parameter.""" - - def __init__(self, name, import_name, static_folder=None, - static_url_path=None, template_folder=None, - url_prefix=None, subdomain=None, url_defaults=None, - root_path=None, required_tables: typing.Optional[set] = None): - super().__init__(name, import_name, static_folder=static_folder, - static_url_path=static_url_path, template_folder=template_folder, - url_prefix=url_prefix, subdomain=subdomain, url_defaults=url_defaults, - root_path=root_path) - self.required_tables = required_tables - if self.required_tables is None: - self.required_tables = set() diff --git a/royalnet/web/royalprints/__init__.py b/royalnet/web/royalprints/__init__.py deleted file mode 100644 index d2dfd110..00000000 --- a/royalnet/web/royalprints/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Some Royalprints that can be used with the Royalnet Flask server.""" - -from . import home -from . import wikiview -from . import tglogin -from . import docs -from . import wikiedit -from . import mcstatus -from . import diarioview -from . import profile -from . import login -from . import newaccount - -rp_home = home.rp -rp_wikiview = wikiview.rp -rp_tglogin = tglogin.rp -rp_docs = docs.rp -rp_wikiedit = wikiedit.rp -rp_mcstatus = mcstatus.rp -rp_diarioview = diarioview.rp -rp_profile = profile.rp -rp_login = login.rp -rp_newaccount = newaccount.rp - -__all__ = ["rp_home", "rp_wikiview", "rp_tglogin", "rp_docs", "rp_wikiedit", "rp_mcstatus", "rp_diarioview", - "rp_profile", "rp_login", "rp_newaccount"] diff --git a/royalnet/web/royalprints/diarioview/__init__.py b/royalnet/web/royalprints/diarioview/__init__.py deleted file mode 100644 index 5ca08415..00000000 --- a/royalnet/web/royalprints/diarioview/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -"""A User Games Diario viewer :py:class:`royalnet.web.Royalprint`.""" - -import flask as f -import os -from ...royalprint import Royalprint -from ...shortcuts import error -from royalnet.packs.common.tables import User -from royalnet.packs.royal.tables import Diario - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("diarioview", __name__, url_prefix="/diario", template_folder=tmpl_dir, - required_tables={User, Diario}) - - -@rp.route("/", defaults={"page": 1}) -@rp.route("/") -def diarioview_page(page): - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - if page < 1: - return error(404, "Il numero di pagina deve essere maggiore di 0.") - entries = alchemy_session.query(alchemy.Diario).order_by(alchemy.Diario.diario_id.desc()).offset((page - 1) * 1000).limit(1000).all() - if len(entries) == 0: - return error(404, "Non ci sono righe di diario in questa pagina (e in tutte le successive).") - return f.render_template("diarioview_page.html", page=page, entries=entries) diff --git a/royalnet/web/royalprints/diarioview/templates/diarioview_page.html b/royalnet/web/royalprints/diarioview/templates/diarioview_page.html deleted file mode 100644 index ef7ea435..00000000 --- a/royalnet/web/royalprints/diarioview/templates/diarioview_page.html +++ /dev/null @@ -1,46 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Diario: Pagina {{ page }} -{% endblock %} - -{% block content %} -
- {% if page > 1 %} - Pagina precedente - {% endif %} - {% for entry in entries %} -
-
- {% if entry.media_url %} - Caricamento immagine fallito - {% endif %} - {% if entry.text %} - "{{ entry.text }}" - {% endif %} -
- {% if entry.quoted %} -
- — - {% if entry.quoted_account %} - {{ entry.quoted }} - {% else %} - {{ entry.quoted }} - {% endif %} - {% if entry.context %} - , {{ entry.context }} - {% endif %} -
- {% endif %} - {% if entry.creator %} - - {% endif %} - - #{{ entry.diario_id }} -
- {% endfor %} - {% if entries|length == 1000 %} - Pagina successiva - {% endif %} -
-{% endblock %} diff --git a/royalnet/web/royalprints/docs/__init__.py b/royalnet/web/royalprints/docs/__init__.py deleted file mode 100644 index 588bc98c..00000000 --- a/royalnet/web/royalprints/docs/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -"""Quick docs link :py:class:`royalnet.web.Royalprint`.""" -import flask as f -from ...royalprint import Royalprint - - -rp = Royalprint("docs", __name__, url_prefix="/docs") - - -@rp.route("/") -def home_index(): - return f.redirect("https://royal-games.github.io/royalnet/html/index.html") diff --git a/royalnet/web/royalprints/home/__init__.py b/royalnet/web/royalprints/home/__init__.py deleted file mode 100644 index 25d01dff..00000000 --- a/royalnet/web/royalprints/home/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Homepage :py:class:`royalnet.web.Royalprint` of the User Games website.""" -import flask as f -import os -from ...royalprint import Royalprint - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("home", __name__, template_folder="templates") - - -@rp.route("/") -def home_index(): - return f.render_template("home.html") diff --git a/royalnet/web/royalprints/home/templates/home.html b/royalnet/web/royalprints/home/templates/home.html deleted file mode 100644 index 2cea7a6d..00000000 --- a/royalnet/web/royalprints/home/templates/home.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Home -{% endblock %} - -{% block content %} -
-
- Benvenuto! -
-
-

- Benvenuto al sito web della Royal Games! -

-

- Siamo una piccola community amichevole principalmente dedicata al PC gaming. -

-

- Vienici a trovare su Discord o Steam! -

-
-
-{% endblock %} \ No newline at end of file diff --git a/royalnet/web/royalprints/login/__init__.py b/royalnet/web/royalprints/login/__init__.py deleted file mode 100644 index 5a7abe9f..00000000 --- a/royalnet/web/royalprints/login/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -"""A Royalnet password-based login :py:class:`royalnet.web.Royalprint`.""" -import flask as f -import os -import datetime -import bcrypt -from ...royalprint import Royalprint -from ...shortcuts import error -from royalnet.packs.common.tables import User - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("login", __name__, url_prefix="/login/password", required_tables={User}, - template_folder=tmpl_dir) - - -@rp.route("/") -def login_index(): - f.session.pop("royal", None) - return f.render_template("login_index.html") - - -@rp.route("/done", methods=["POST"]) -def login_done(): - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - fd = f.request.form - if "username" not in fd: - return error(400, "Nessun username inserito.") - royal_user = alchemy_session.query(alchemy.User).filter_by(username=fd["username"]).one_or_none() - if royal_user is None: - return error(404, "L'username inserito non corrisponde a nessun account registrato.") - if "password" not in fd: - return error(400, "Nessuna password inserita.") - if not bcrypt.checkpw(bytes(fd["password"], encoding="utf8"), royal_user.password): - return error(400, "La password inserita non è valida.") - f.session["royal"] = { - "uid": royal_user.uid, - "username": royal_user.username, - "avatar": royal_user.avatar, - "role": royal_user.role - } - f.session["login_date"] = datetime.datetime.now() - return f.render_template("login_success.html") diff --git a/royalnet/web/royalprints/login/templates/login_index.html b/royalnet/web/royalprints/login/templates/login_index.html deleted file mode 100644 index 8ba7986c..00000000 --- a/royalnet/web/royalprints/login/templates/login_index.html +++ /dev/null @@ -1,48 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Password Login -{% endblock %} - -{% block content %} -
-
-
- - Password Login - -
-
- -
-

- Facendo il login su questo sito, acconsenti a ricevere due biscottini che memorizzino l'account con cui hai fatto il login.
-

-

- Essi avranno il seguente formato: -

-
session["royal"] = {
-    "uid": [il tuo id Royalnet]
-    "username": [il tuo username Royalnet],
-    "avatar": [il tuo avatar Royalnet],
-    "role": [il tuo ruolo Royalnet]
-}
-
-session["login_date"] = [la data e l'ora di adesso]
-
-
-
-
-{% endblock %} diff --git a/royalnet/web/royalprints/login/templates/login_success.html b/royalnet/web/royalprints/login/templates/login_success.html deleted file mode 100644 index 3b72851b..00000000 --- a/royalnet/web/royalprints/login/templates/login_success.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Password Login riuscito -{% endblock %} - -{% block content %} -
-
- - Password Login - -
-
- Login riuscito! Sei connesso come {{ session["royal"]["username"] }}! -
-
-{% endblock %} diff --git a/royalnet/web/royalprints/mcstatus/__init__.py b/royalnet/web/royalprints/mcstatus/__init__.py deleted file mode 100644 index 06b39912..00000000 --- a/royalnet/web/royalprints/mcstatus/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -"""Minecraft server status :py:class:`royalnet.web.Royalprint`.""" -import os -import flask as f -import socket -from ...royalprint import Royalprint -from ...shortcuts import error -from mcstatus import MinecraftServer - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("mcstatus", __name__, url_prefix="/mcstatus", template_folder=tmpl_dir) - - -@rp.route("/") -def mcstatus_index(server_str: str): - try: - if ":" not in server_str: - server_str += ":25565" - server = MinecraftServer.lookup(server_str) - status = server.status() - try: - query = server.query() - except (socket.timeout, ConnectionRefusedError, OSError): - query = None - except socket.gaierror: - return error(400, "L'indirizzo richiesto non è valido.") - except (socket.timeout, ConnectionRefusedError, OSError): - status = None - query = None - return f.render_template("mcstatus.html", server_str=server_str, status=status, query=query) diff --git a/royalnet/web/royalprints/mcstatus/templates/mcstatus.html b/royalnet/web/royalprints/mcstatus/templates/mcstatus.html deleted file mode 100644 index d259c420..00000000 --- a/royalnet/web/royalprints/mcstatus/templates/mcstatus.html +++ /dev/null @@ -1,54 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Minecraft {{ server_str }} -{% endblock %} - -{% block content %} -
-
- Minecraft Server Status -
-
-
- {% if query %} - {% if status.favicon %} -
Server icon
- {% else %} -
- {% endif %} -
{{ server_str }}
-
{{ query.motd }}
-
{{ query.players.online }}/{{ query.players.max }}
-
{{ query.software.brand }} {{ query.software.version }} ({{ status.version.protocol }})
- {% elif status %} - {% if status.favicon %} -
Server icon
- {% else %} -
- {% endif %} -
{{ server_str }}
-
{{ status.description }}
-
{{ status.players.online }}/{{ status.players.max }}
-
{{ status.version.name }} ({{ status.version.protocol }})
- {% else %} -
-
{{ server_str }}
-
-
-
0/0
-
Offline (-)
- {% endif %} -
- {% if query %} -
-

Giocatori connessi:

-
    - {% for player in query.players.names %} -
  • {{ player }}
  • - {% endfor %} -
-
- {% endif %} -
-
-{% endblock %} \ No newline at end of file diff --git a/royalnet/web/royalprints/newaccount/__init__.py b/royalnet/web/royalprints/newaccount/__init__.py deleted file mode 100644 index f599a023..00000000 --- a/royalnet/web/royalprints/newaccount/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -"""A :py:class:`royalnet.web.Royalprint` to create new Royals.""" -import flask as f -import os -import bcrypt -from ...royalprint import Royalprint -from ...shortcuts import error -from royalnet.packs.common.tables import User -from royalnet.packs.royal.tables import Alias - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("newaccount", __name__, url_prefix="/newaccount", required_tables={User, Alias}, - template_folder=tmpl_dir) - - -@rp.route("/", methods=["GET", "POST"]) -def login_index(): - if f.request.method == "GET": - return f.render_template("newaccount_index.html") - elif f.request.method == "POST": - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - fd = f.request.form - if "username" not in fd: - return error(400, "Non è stato inserito nessun username.") - if "password" not in fd: - return error(400, "Non è stata inserita nessuna password.") - royal = alchemy_session.query(alchemy.User).filter_by(username=fd["username"]).one_or_none() - if royal is not None: - return error(403, "Esiste già un utente con quell'username.") - alias = alchemy_session.query(alchemy.Alias).filter_by(alias=fd["username"]).one_or_none() - if alias is not None: - return error(403, "Esiste già un utente con quell'alias.") - royal = alchemy.Royal(username=fd["username"], - password=bcrypt.hashpw(bytes(fd["password"], encoding="utf8"), bcrypt.gensalt()), - role="Guest") - alchemy_session.add(royal) - alias = alchemy.Alias(royal=royal, alias=royal.username.lower()) - alchemy_session.add(alias) - alchemy_session.commit() - return f.redirect(f.url_for("login.login_index")) diff --git a/royalnet/web/royalprints/newaccount/templates/newaccount_index.html b/royalnet/web/royalprints/newaccount/templates/newaccount_index.html deleted file mode 100644 index eb682e1d..00000000 --- a/royalnet/web/royalprints/newaccount/templates/newaccount_index.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Nuovo account -{% endblock %} - -{% block content %} - -{% endblock %} diff --git a/royalnet/web/royalprints/profile/__init__.py b/royalnet/web/royalprints/profile/__init__.py deleted file mode 100644 index 6fded50f..00000000 --- a/royalnet/web/royalprints/profile/__init__.py +++ /dev/null @@ -1,60 +0,0 @@ -"""The profile page :py:class:`royalnet.web.Royalprint` for Royalnet members.""" - -import flask as f -import os -from ...royalprint import Royalprint -from ...shortcuts import error -from ....utils.wikirender import prepare_page_markdown, RenderError -from royalnet.packs.royal.tables import * - - -# Maybe some of these tables are optional... -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("profile", __name__, url_prefix="/profile", template_folder=tmpl_dir, - required_tables={User, Alias, Diario, Discord, Telegram, WikiPage, WikiRevision, Bio, TriviaScore}) - - -@rp.route("/") -def profile_index(): - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - royals = alchemy_session.query(alchemy.User).order_by(alchemy.User.username).all() - return f.render_template("profile_index.html", royals=royals) - - -@rp.route("/") -def profile_page(username): - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - royal = alchemy_session.query(alchemy.User).filter_by(username=username).one_or_none() - if royal is None: - return error(404, "Non esiste nessun utente con l'username richiesto.") - if royal.bio is not None and royal.bio.contents != "": - try: - parsed_bio = f.Markup(prepare_page_markdown(royal.bio.contents)) - except RenderError as e: - return error(500, f"Il profilo non può essere visualizzato a causa di un errore nella bio: {str(e)}") - else: - parsed_bio = None - return f.render_template("profile_page.html", royal=royal, parsed_bio=parsed_bio) - - -@rp.route("//editbio", methods=["GET", "POST"]) -def profile_editbio(username): - if "royal" not in f.session: - return error(403, "Devi aver effettuato il login per modificare una bio.") - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - royal = alchemy_session.query(alchemy.User).filter_by(username=username).one_or_none() - if not (f.session["royal"]["uid"] == royal.uid or f.session["royal"]["role"] == "Admin"): - return error(403, "Non sei autorizzato a modificare questa pagina bio.") - - if f.request.method == "GET": - return f.render_template("profile_editbio.html", royal=royal) - - elif f.request.method == "POST": - fd = f.request.form - if royal.bio is None: - bio = alchemy.Bio(royal=royal, contents=fd.get("contents", "")) - alchemy_session.add(bio) - else: - royal.bio.contents = fd.get("contents", "") - alchemy_session.commit() - return f.redirect(f.url_for(".profile_page", username=username)) diff --git a/royalnet/web/royalprints/profile/templates/profile_editbio.html b/royalnet/web/royalprints/profile/templates/profile_editbio.html deleted file mode 100644 index 0d8c92d8..00000000 --- a/royalnet/web/royalprints/profile/templates/profile_editbio.html +++ /dev/null @@ -1,126 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - {{ royal.username }} - RYGbioeditor -{% endblock %} - -{% block head %} - - -{% endblock %} - -{% block content %} -
-
- - Editor Bio - -
-
-
- - - -
-
-
-{% endblock %} - -{% block footscripts %} - -{% endblock %} \ No newline at end of file diff --git a/royalnet/web/royalprints/profile/templates/profile_index.html b/royalnet/web/royalprints/profile/templates/profile_index.html deleted file mode 100644 index 81361bf6..00000000 --- a/royalnet/web/royalprints/profile/templates/profile_index.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Elenco profili -{% endblock %} - -{% block content %} -
-
- - Elenco profili - -
-
- -
-
-{% endblock %} diff --git a/royalnet/web/royalprints/profile/templates/profile_page.html b/royalnet/web/royalprints/profile/templates/profile_page.html deleted file mode 100644 index 3cf2598f..00000000 --- a/royalnet/web/royalprints/profile/templates/profile_page.html +++ /dev/null @@ -1,97 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Profilo: {{ royal.username }} -{% endblock %} - -{% block content %} -
-

- {{ royal.username }} -

-
-
-
- - Bio - - - {% if session["royal"] and (session["royal"]["uid"] == royal.uid or session["royal"]["role"] == "Admin") %} - Modifica - {% else %} - Modifica - {% endif %} - -
-
- {% if parsed_bio %} - {{ parsed_bio }} - {% else %} - Questo utente non ha nessuna bio. - {% endif %} -
-
-
-
-
- -
-
-
-
- Statistiche -
-
-
    -
  • Righe del diario create: {{ royal.diario_created|length }}
  • -
  • Righe del diario in cui è menzionato: {{ royal.diario_quoted|length }}
  • -
  • Modifiche alla wiki: {{ royal.wiki_contributions|length }} - {% if royal.trivia_score %} -
  • Punteggio trivia: {{ royal.trivia_score.correct_answers }}/{{ royal.trivia_score.total_answers }}
  • - {% else %} -
  • Punteggio trivia: 0/0
  • - {% endif %} -
-
-
-
-
-
-
- Alias -
-
-
    - {% for alias in royal.aliases %} -
  • {{ alias.alias|capitalize }}
  • - {% endfor %} -
-
-
-
-
-
-{% endblock %} diff --git a/royalnet/web/royalprints/tglogin/__init__.py b/royalnet/web/royalprints/tglogin/__init__.py deleted file mode 100644 index eca18d9c..00000000 --- a/royalnet/web/royalprints/tglogin/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -"""A Royalnet Telegram login :py:class:`royalnet.web.Royalprint`.""" -import flask as f -import hashlib -import hmac -import datetime -import os -from ...royalprint import Royalprint -from ...shortcuts import error -from royalnet.packs.common.tables import User, Telegram - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("tglogin", __name__, url_prefix="/login/telegram", required_tables={User, Telegram}, - template_folder=tmpl_dir) - - -@rp.route("/") -def tglogin_index(): - #if f.request.url_root != "https://ryg.steffo.eu/": - # return error(404, "Il login tramite Telegram non è possibile su questo dominio.") - f.session.pop("royal", None) - return f.render_template("tglogin_index.html") - - -@rp.route("/done") -def tglogin_done(): - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - data_check_string = "" - for field in sorted(list(f.request.args)): - if field == "hash": - continue - data_check_string += f"{field}={f.request.args[field]}\n" - data_check_string = data_check_string.rstrip("\n") - data_check = bytes(data_check_string, encoding="ascii") - secret_key = hashlib.sha256(bytes(f.current_app.config["TG_AK"], encoding="ascii")).digest() - hex_data = hmac.new(key=secret_key, msg=data_check, digestmod="sha256").hexdigest() - if hex_data != f.request.args["hash"]: - return error(400, "L'autenticazione è fallita: l'hash ricevuto non coincide con quello calcolato.") - tg_user = alchemy_session.query(alchemy.Telegram).filter(alchemy.Telegram.tg_id == f.request.args["id"]).one_or_none() - if tg_user is None: - return error(404, "L'account Telegram con cui hai fatto il login non è connesso a nessun account User Games. Se sei un membro User Games, assicurati di aver syncato con il bot il tuo account di Telegram!") - royal_user = tg_user.royal - f.session["royal"] = { - "uid": royal_user.uid, - "username": royal_user.username, - "avatar": royal_user.avatar, - "role": royal_user.role - } - f.session["login_date"] = datetime.datetime.now() - return f.render_template("login_success.html") diff --git a/royalnet/web/royalprints/tglogin/templates/tglogin_index.html b/royalnet/web/royalprints/tglogin/templates/tglogin_index.html deleted file mode 100644 index 20b38606..00000000 --- a/royalnet/web/royalprints/tglogin/templates/tglogin_index.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Telegram Login -{% endblock %} - -{% block content %} -
-
- - Telegram Login - -
-
- -

- Per fare il login, devi aver syncato il tuo account sul gruppo Telegram Royal Games! -

-
-

- Facendo il login su questo sito, acconsenti a ricevere due biscottini che memorizzino l'account con cui hai fatto il login.
-

-

- Essi avranno il seguente formato: -

-
session["royal"] = {
-    "uid": [il tuo id Royalnet]
-    "username": [il tuo username Royalnet],
-    "avatar": [il tuo avatar Royalnet],
-    "role": [il tuo ruolo Royalnet]
-}
-
-session["login_date"] = [la data e l'ora di adesso]
-
-
-
-{% endblock %} diff --git a/royalnet/web/royalprints/tglogin/templates/tglogin_success.html b/royalnet/web/royalprints/tglogin/templates/tglogin_success.html deleted file mode 100644 index eb080a7a..00000000 --- a/royalnet/web/royalprints/tglogin/templates/tglogin_success.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Telegram Login riuscito -{% endblock %} - -{% block content %} -
-
- - Telegram Login - -
-
- Login riuscito! Sei connesso come {{ session["royal"]["username"] }}! -
-
-{% endblock %} diff --git a/royalnet/web/royalprints/wikiedit/__init__.py b/royalnet/web/royalprints/wikiedit/__init__.py deleted file mode 100644 index 63d73fce..00000000 --- a/royalnet/web/royalprints/wikiedit/__init__.py +++ /dev/null @@ -1,80 +0,0 @@ -"""A User Games Wiki viewer :py:class:`royalnet.web.Royalprint`. Doesn't support any kind of edit.""" -import flask as f -import uuid -import os -import datetime -import difflib -from ...royalprint import Royalprint -from ...shortcuts import error, from_urluuid -from royalnet.packs.common.tables import User -from royalnet.packs.royal.tables import WikiPage, WikiRevision - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("wikiedit", __name__, url_prefix="/wiki/edit", template_folder=tmpl_dir, - required_tables={User, WikiPage, WikiRevision}) - - -@rp.route("/newpage", methods=["GET", "POST"]) -def wikiedit_newpage(): - if "royal" not in f.session: - return error(403, "Devi aver effettuato il login per creare pagine wiki.") - - if f.request.method == "GET": - return f.render_template("wikiedit_page.html", page=None) - - elif f.request.method == "POST": - fd = f.request.form - if not ("title" in fd and "contents" in fd and "css" in fd): - return error(400, "Uno dei campi obbligatori non è stato compilato. Controlla e riprova!") - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - page = alchemy.WikiPage(page_id=uuid.uuid4(), - title=fd["title"], - contents=fd["contents"], - format="markdown", - css=fd["css"] if fd["css"] != "None" else None) - revision = alchemy.WikiRevision(revision_id=uuid.uuid4(), - page=page, - author_id=f.session["royal"]["uid"], - timestamp=datetime.datetime.now(), - reason=fd.get("reason"), - diff="\n".join(difflib.unified_diff([], page.contents.split("\n")))) - alchemy_session.add(page) - alchemy_session.add(revision) - alchemy_session.commit() - return f.redirect(f.url_for("wikiview.wikiview_by_id", page_id=page.page_short_id, title=page.title)) - - -@rp.route("/", defaults={"title": ""}, methods=["GET", "POST"]) -@rp.route("//", methods=["GET", "POST"]) -def wikiedit_by_id(page_id: str, title: str): - page_uuid = from_urluuid(page_id) - if "royal" not in f.session: - return error(403, "Devi aver effettuato il login per modificare pagine wiki.") - - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - page = alchemy_session.query(alchemy.WikiPage).filter(alchemy.WikiPage.page_id == page_uuid).one_or_none() - if page is None: - return error(404, "La pagina che stai cercando di modificare non esiste.") - - if f.request.method == "GET": - return f.render_template("wikiedit_page.html", page=page) - - elif f.request.method == "POST": - fd = f.request.form - if not ("title" in fd and "contents" in fd and "css" in fd): - return error(400, "Uno dei campi obbligatori non è stato compilato. Controlla e riprova!") - # Create new revision - revision = alchemy.WikiRevision(revision_id=uuid.uuid4(), - page=page, - author_id=f.session["royal"]["uid"], - timestamp=datetime.datetime.now(), - reason=fd.get("reason"), - diff="\n".join(difflib.unified_diff(page.contents.split("\n"), fd["contents"].split("\n")))) - alchemy_session.add(revision) - # Apply changes - page.contents = fd["contents"] - page.title = fd["title"] - page.css = fd["css"] if fd["css"] != "None" else None - alchemy_session.commit() - return f.redirect(f.url_for("wikiview.wikiview_by_id", page_id=page.page_short_id, title=page.title)) diff --git a/royalnet/web/royalprints/wikiedit/templates/wikiedit_page.html b/royalnet/web/royalprints/wikiedit/templates/wikiedit_page.html deleted file mode 100644 index b9e6fff6..00000000 --- a/royalnet/web/royalprints/wikiedit/templates/wikiedit_page.html +++ /dev/null @@ -1,145 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - {{ page.title }} - RYGwikieditor -{% endblock %} - -{% block head %} - <link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css"> - <script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script> -{% endblock %} - -{% block content %} - <div class="dbox"> - <div class="dbox-top"> - <span class="left"> - Editor Wiki - </span> - </div> - <div class="dbox-bot"> - <form method="POST" class="wikiedit-form full"> - <label for="wikiedit-title" class="label-big"> - <span class="label-text">Titolo</span> - <input id="wikiedit-title" type="text" name="title" value="{{ page.title }}"> - </label> - <label for="wikiedit-format"> - <span class="label-text">Formato</span> - <input id="wikiedit-format" type="text" name="format" disabled value="markdown"> - </label> - <!--suppress HtmlFormInputWithoutLabel --> - <textarea id="wikiedit-contents" name="contents">{{ page.contents }}</textarea> - <label for="wikiedit-css"> - <span class="label-text">Tema</span> - <select id="wikiedit-css" name="css"> - <option value="None" {% if page.css == None %}selected{% endif %}>Royal Games</option> - <option value="tf2.css" {% if page.css == "tf2.css" %}selected{% endif %}>Team Fortress 2</option> - </select> - </label> - <label for="wikiedit-reason"> - <span class="label-text">Motivo</span> - <input id="wikiedit-reason" type="text" name="reason"> - </label> - <label for="wikiedit-submit"> - <input id="wikiedit-submit" type="submit" value="Salva"> - </label> - </form> - </div> - </div> -{% endblock %} - -{% block footscripts %} - <script> - //TODO: maybe enable autosave? - let simplemde = new SimpleMDE({ - element: document.getElementById("wikiedit-contents"), - blockStyles: { - italic: "_" - }, - tabSize: 4, - spellChecker: false, - toolbar: [ - { - name: "bold", - action: SimpleMDE.toggleBold, - className: "fas fa-bold no-icon", - title: "Grassetto", - }, - { - name: "italic", - action: SimpleMDE.toggleItalic, - className: "fas fa-italic no-icon", - title: "Corsivo", - }, - { - name: "strikethrough", - action: SimpleMDE.toggleStrikethrough, - className: "fas fa-strikethrough no-icon", - title: "Barrato", - }, - { - name: "link", - action: SimpleMDE.drawLink, - className: "fas fa-link no-icon", - title: "Link", - }, - "|", - { - name: "heading-smaller", - action: SimpleMDE.toggleHeadingSmaller, - className: "fas fa-header no-icon", - title: "(Rimpicciolisci) Titolo", - }, - { - name: "heading", - action: SimpleMDE.toggleHeadingBigger, - className: "fas fa-header fa-lg no-icon", - title: "(Ingrandisci) Titolo", - }, - "|", - { - name: "code", - action: SimpleMDE.toggleCodeBlock, - className: "fas fa-code no-icon", - title: "Codice", - }, - { - name: "quote", - action: SimpleMDE.toggleBlockquote, - className: "fas fa-quote-left no-icon", - title: "Citazione", - }, - { - name: "unordered-list", - action: SimpleMDE.toggleUnorderedList, - className: "fas fa-list-ul no-icon", - title: "Lista puntata", - }, - { - name: "ordered-list", - action: SimpleMDE.toggleOrderedList, - className: "fas fa-list-ol no-icon", - title: "Lista ordinata", - }, - { - name: "horizontal-rule", - action: SimpleMDE.drawHorizontalRule, - className: "fas fa-minus no-icon", - title: "Separatore", - }, - "|", - { - name: "image", - action: SimpleMDE.drawImage, - className: "fas fa-picture-o no-icon", - title: "Immagine", - }, - { - name: "table", - action: SimpleMDE.drawTable, - className: "fas fa-table no-icon", - title: "Tabella", - } - ], - }); - </script> -{% endblock %} \ No newline at end of file diff --git a/royalnet/web/royalprints/wikiview/__init__.py b/royalnet/web/royalprints/wikiview/__init__.py deleted file mode 100644 index 3f3fcbbf..00000000 --- a/royalnet/web/royalprints/wikiview/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -"""A User Games Wiki viewer :py:class:`royalnet.web.Royalprint`. Doesn't support any kind of edit.""" - -import flask as f -import os -from ...royalprint import Royalprint -from ...shortcuts import error, from_urluuid -from royalnet.packs.common.tables import User -from royalnet.packs.royal.tables import WikiPage, WikiRevision -from ....utils.wikirender import prepare_page_markdown, RenderError - - -tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') -rp = Royalprint("wikiview", __name__, url_prefix="/wiki/view", template_folder=tmpl_dir, - required_tables={User, WikiPage, WikiRevision}) - - -def prepare_page(page): - try: - if page.format == "markdown": - return f.render_template("wikiview_page.html", - page=page, - parsed_contents=f.Markup(prepare_page_markdown(page.contents)), - css=page.css) - elif page.format == "html": - return f.render_template("wikiview_page.html", - page=page, - parsed_contents=f.Markup(page.contents), - css=page.css) - else: - return error(500, f"Non esiste nessun handler in grado di preparare pagine con il formato {page.format}.") - except RenderError as e: - return error(500, f"La pagina Wiki non può essere preparata a causa di un errore: {str(e)}") - - -@rp.route("/") -def wikiview_index(): - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - pages = sorted(alchemy_session.query(alchemy.WikiPage).all(), key=lambda page: page.title) - return f.render_template("wikiview_index.html", pages=pages) - - -@rp.route("/<page_id>", defaults={"title": ""}) -@rp.route("/<page_id>/<title>") -def wikiview_by_id(page_id: str, title: str): - page_uuid = from_urluuid(page_id) - alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - page = alchemy_session.query(alchemy.WikiPage).filter(alchemy.WikiPage.page_id == page_uuid).one_or_none() - if page is None: - return error(404, f"La pagina richiesta non esiste.") - return prepare_page(page) diff --git a/royalnet/web/royalprints/wikiview/templates/wikiview_index.html b/royalnet/web/royalprints/wikiview/templates/wikiview_index.html deleted file mode 100644 index 98bb99ce..00000000 --- a/royalnet/web/royalprints/wikiview/templates/wikiview_index.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Wiki -{% endblock %} - -{% block content %} - <div class="dbox"> - <div class="dbox-top"> - <span class="left"> - Wiki - </span> - </div> - <div class="dbox-bot"> - {% if session.royal %} - <a href="{{ url_for("wikiedit.wikiedit_newpage") }}" class="btn no-icon">Crea nuova pagina</a> - {% else %} - <button disabled title="Devi fare il login per creare nuove pagine!">Crea nuova pagina</button> - {% endif %} - <ul class="multicolumn"> - {% for page in pages %} - <li><a href="{{ url_for("wikiview.wikiview_by_id", page_id=page.page_short_id, title=page.title) }}">{{ page.title }}</a></li> - {% endfor %} - </ul> - </div> - </div> -{% endblock %} diff --git a/royalnet/web/royalprints/wikiview/templates/wikiview_page.html b/royalnet/web/royalprints/wikiview/templates/wikiview_page.html deleted file mode 100644 index 9b5448ae..00000000 --- a/royalnet/web/royalprints/wikiview/templates/wikiview_page.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Wiki: {{ page.title }} -{% endblock %} - -{% block content %} - <div class="wikiview"> - <div class="dbox wiki-doublebox"> - <div class="dbox-top"> - <span class="left"> - Wiki page - </span> - <span class="right"> - {% if session.royal %} - <a class="edit no-icon" href="{{ url_for("wikiedit.wikiedit_by_id", page_id=page.page_short_id, title=page.title) }}">Modifica</a> - {% else %} - <a class="edit no-icon disabled" title="Devi fare il login per modificare pagine!">Modifica</a> - {% endif %} - </span> - </div> - <div class="dbox-bot"> - <div class="wikiview-page"> - <h1 class="wikiview-title"> - {{ page.title }} - </h1> - <div class="wikiview-contents"> - {{ parsed_contents }} - </div> - </div> - </div> - </div> - </div> -{% endblock %} diff --git a/royalnet/web/shortcuts.py b/royalnet/web/shortcuts.py deleted file mode 100644 index 3a2bd8e3..00000000 --- a/royalnet/web/shortcuts.py +++ /dev/null @@ -1,16 +0,0 @@ -import flask as f -import uuid as _uuid -import base64 - - -def error(code, reason): - return f.render_template("error.html", title=f"Errore {code}", reason=reason), code - - -def to_urluuid(uuid: _uuid.UUID) -> str: - """Return a base64 url-friendly short UUID.""" - return str(base64.urlsafe_b64encode(uuid.bytes), encoding="ascii").rstrip("=") - - -def from_urluuid(b: str) -> _uuid.UUID: - return _uuid.UUID(bytes=base64.urlsafe_b64decode(bytes(b + "==", encoding="ascii"))) diff --git a/royalnet/web/static/generic.png b/royalnet/web/static/generic.png deleted file mode 100644 index afc09e34..00000000 Binary files a/royalnet/web/static/generic.png and /dev/null differ diff --git a/royalnet/web/static/logo.png b/royalnet/web/static/logo.png deleted file mode 100644 index 2cca0cc9..00000000 Binary files a/royalnet/web/static/logo.png and /dev/null differ diff --git a/royalnet/web/static/logo.svg b/royalnet/web/static/logo.svg deleted file mode 100644 index 373effee..00000000 --- a/royalnet/web/static/logo.svg +++ /dev/null @@ -1,219 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1000" - height="1000" - viewBox="0 0 264.58332 264.58333" - version="1.1" - id="svg8" - inkscape:version="0.92.3 (2405546, 2018-03-11)" - sodipodi:docname="LogoRoyalGames.svg" - inkscape:export-filename="C:\Users\stepi\Pictures\LogoRoyalGames.png" - inkscape:export-xdpi="96" - inkscape:export-ydpi="96"> - <title - id="title5190">Royal Games - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Royal Games - - - - - - - - diff --git a/royalnet/web/static/ryg.css b/royalnet/web/static/ryg.css deleted file mode 100644 index 0ab2a195..00000000 --- a/royalnet/web/static/ryg.css +++ /dev/null @@ -1,812 +0,0 @@ -/*** Variables ***/ -/*** Standard elements ***/ -body { - font-family: "Arial", "Helvetica Neue", sans-serif; - background-color: #0d193b; - color: #a0ccff; - box-sizing: border-box; -} -a { - color: #00caca; - text-decoration: none; -} -a:hover { - color: #4affff; -} -a:active { - color: white; -} -a:not(.no-icon)::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0c1"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://t.me"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f2c6"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://www.youtube.com"]::before, -a:not(.no-icon)[href^="https://youtu.be"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f167"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://vimeo.com"]::before, -a:not(.no-icon)[href^="https://player.vimeo.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f27d"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://github.com"]::before, -a:not(.no-icon)[href^="https://gist.github.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f09b"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://itch.io"]::before, -a:not(.no-icon)[href^="https://steffo.itch.io"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f83a"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://www.kickstarter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f3bb"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://reddit.com"]::before, -a:not(.no-icon)[href^="https://new.reddit.com"]::before, -a:not(.no-icon)[href^="https://old.reddit.com"]::before, -a:not(.no-icon)[href^="https://redd.it"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f281"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://www.twitch.tv"]::before, -a:not(.no-icon)[href^="https://clips.twitch.tv"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1e8"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://store.steampowered.com"]::before, -a:not(.no-icon)[href^="https://steamcommunity.com"]::before, -a:not(.no-icon)[href^="https://partner.steamgames.com"]::before, -a:not(.no-icon)[href^="steam:"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1b6"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://twitter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f099"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://it.wikipedia.org"]::before, -a:not(.no-icon)[href^="https://en.wikipedia.org"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f266"; - margin-right: 3px; -} -a:not(.no-icon)[href^="#"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f13d"; - margin-right: 3px; -} -a:not(.no-icon)[href^="http:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f09c"; - margin-right: 4px; -} -a:not(.no-icon)[href^="magnet:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f076"; - margin-right: 4px; -} -b, -strong { - color: #ffff7d; -} -i, -em { - color: #ffbb7d; -} -h1, -h2, -h3, -h4, -h5, -h6 { - color: #ffffff; - margin-top: 0; - margin-bottom: 0; - font-weight: normal; -} -pre { - padding: 2px 4px 2px 8px; - margin: 8px; - color: lightgray; - border: 1px solid rgba(211, 211, 211, 0.2); - background-color: rgba(211, 211, 211, 0.1); - font-family: "Consolas", "Source Code Pro", monospace; -} -*:not(pre) > code { - color: lightgray; - border: 1px solid rgba(211, 211, 211, 0.2); - background-color: rgba(211, 211, 211, 0.1); -} -code { - font-family: "Consolas", "Source Code Pro", monospace; -} -blockquote { - color: #7dff7d; - border-left: 3px solid #7dff7d; - background-color: rgba(125, 255, 125, 0.1); - padding: 2px 4px 2px 8px; - margin: 8px; -} -textarea { - background-color: rgba(160, 204, 255, 0.1); - color: #a0ccff; - border: 1px solid #a0ccff; - padding: 2px; - margin: 1px; - font-size: small; - font-family: "Consolas", "Source Code Pro", monospace; - width: 100%; - height: 300px; -} -button, -input[type="submit"], -.btn { - background-color: rgba(160, 204, 255, 0.1); - color: #a0ccff !important; - border: 1px solid #a0ccff; - border-radius: 0; - padding: 2px 8px; - margin: 1px; - font-size: medium; - font-family: "Arial", "Helvetica Neue", sans-serif; - text-decoration: none; - cursor: default; -} -button:hover, -input[type="submit"]:hover, -.btn:hover { - background-color: rgba(160, 204, 255, 0.2); - color: #ffffff; - border-color: #ffffff; -} -button:active, -input[type="submit"]:active, -.btn:active { - background-color: rgba(160, 204, 255, 0.3); - color: white; - border-color: white; -} -input[type="text"], -input[type="password"], -input[type="email"] { - background-color: rgba(160, 204, 255, 0.1); - color: #a0ccff; - border: none; - border-bottom: 1px dashed #a0ccff; - padding: 2px; - margin: 1px; - font-size: medium; - font-family: "Arial", "Helvetica Neue", sans-serif; -} -select { - background-color: rgba(160, 204, 255, 0.1); - color: #a0ccff; - border: none; - border-bottom: 1px dotted #a0ccff; - padding: 2px; - margin: 1px; - font-size: medium; - font-family: "Arial", "Helvetica Neue", sans-serif; -} -select option { - background-color: #293c61; - color: #a0ccff; -} -img { - margin-left: auto; - margin-right: auto; - display: block; - max-width: 100%; -} -nav { - display: flex; - justify-content: space-between; - height: 50px; - line-height: 50px; - min-width: 400px; -} -nav .nav-left { - text-align: left; -} -nav .nav-center { - text-align: center; -} -nav .nav-right { - text-align: right; -} -nav .nav-image { - height: 50px; - display: inline; - vertical-align: middle; -} -nav .nav-sitename { - font-weight: bold; -} -nav .nav-login-unavailable { - opacity: 0.25; -} -table { - border-collapse: collapse; -} -table thead { - margin-top: 4px; - margin-left: 4px; - margin-right: 4px; - padding: 8px; -} -table thead th { - background-color: rgba(160, 204, 255, 0.2); - color: #ffffff; - padding-left: 4px; - padding-right: 4px; - text-align: left; - font-size: small; - font-weight: bold; -} -table thead tr:first-child th:first-child { - border-radius: 4px 0 0 0; -} -table thead tr:first-child th:last-child { - border-radius: 0 4px 0 0; -} -table tbody { - margin-bottom: 4px; - margin-left: 4px; - margin-right: 4px; - padding: 8px; -} -table tbody td { - background-color: rgba(160, 204, 255, 0.1); - padding-left: 4px; - padding-right: 4px; -} -table tbody tr { - border-bottom: 1px solid rgba(160, 204, 255, 0.2); -} -table tbody tr:last-child { - border-bottom: none; -} -table tbody tr:last-child td:first-child { - border-radius: 0 0 0 4px; -} -table tbody tr:last-child td:last-child { - border-radius: 0 0 4px 0; -} -form.full label { - margin-top: 4px; - margin-bottom: 4px; - display: flex; -} -form.full label .label-text { - margin-right: 12px; - min-width: 60px; -} -form.full label input { - flex-grow: 1; -} -form.full label.label-big { - font-size: x-large; -} -form.full label.label-big * { - font-size: x-large; -} -*[disabled=""], -.disabled { - opacity: 0.3; -} -/*** Modifiers ***/ -.tiny { - font-size: xx-small; -} -.center { - margin: auto; -} -/*** Custom elements ***/ -.CodeMirror { - font-family: "Consolas", monospace !important; - background-color: #0d193b !important; - color: #a0ccff !important; - border-top: 0 !important; - border-bottom: 0 !important; - border-left: 1px solid rgba(160, 204, 255, 0.2) !important; - border-right: 1px solid rgba(160, 204, 255, 0.2) !important; - border-radius: 0 !important; - caret-color: white; -} -.CodeMirror .cm-link { - color: #7dffff !important; -} -.CodeMirror .cm-url { - color: #00caca !important; -} -.CodeMirror .cm-tag { - color: #ff7dff !important; -} -.CodeMirror .cm-strong { - color: #ffff7d !important; -} -.CodeMirror .cm-em { - color: #ffbb7d !important; -} -.CodeMirror .cm-quote { - color: #7dff7d !important; -} -.CodeMirror .cm-comment { - color: lightgray !important; -} -.CodeMirror .cm-header { - color: #ffffff !important; -} -.CodeMirror .CodeMirror-cursor { - border-left: 1px solid #a0ccff !important; -} -.editor-toolbar, -.editor-statusbar { - background-color: #1c2b4f !important; - color: #a0ccff !important; - opacity: 1 !important; -} -.editor-toolbar a, -.editor-statusbar a { - color: #a0ccff !important; - border: 0 !important; -} -.editor-toolbar a:hover, -.editor-statusbar a:hover { - background-color: rgba(160, 204, 255, 0.2) !important; - color: #ffffff !important; -} -.editor-toolbar a.active, -.editor-statusbar a.active { - background-color: rgba(160, 204, 255, 0.3) !important; - color: white !important; -} -.editor-toolbar a.active:hover, -.editor-statusbar a.active:hover { - background-color: rgba(160, 204, 255, 0.2) !important; - color: #ffffff !important; -} -.editor-toolbar .fas, -.editor-statusbar .fas, -.editor-toolbar .far, -.editor-statusbar .far, -.editor-toolbar .fab, -.editor-statusbar .fab { - color: #a0ccff !important; -} -.editor-toolbar .fas:hover, -.editor-statusbar .fas:hover, -.editor-toolbar .far:hover, -.editor-statusbar .far:hover, -.editor-toolbar .fab:hover, -.editor-statusbar .fab:hover { - color: #a0ccff !important; -} -.editor-toolbar .fas:active, -.editor-statusbar .fas:active, -.editor-toolbar .far:active, -.editor-statusbar .far:active, -.editor-toolbar .fab:active, -.editor-statusbar .fab:active { - color: white !important; -} -.editor-toolbar { - border-top: 1px solid #2b3e62 !important; - border-left: 1px solid #2b3e62 !important; - border-right: 1px solid #2b3e62 !important; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.editor-statusbar { - border-bottom: 1px solid #2b3e62 !important; - border-left: 1px solid #2b3e62 !important; - border-right: 1px solid #2b3e62 !important; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} -.horizontal-container-main { - display: flex; - justify-content: center; - align-content: center; - flex-direction: row; -} -@media (max-width: 1199px) { - .horizontal-container-main { - flex-direction: column; - } -} -.columns-3 { - display: flex; - justify-content: center; - align-content: center; - flex-direction: row; - flex-wrap: wrap; -} -.columns-3 .column { - width: 33.3%; - min-width: 400px; -} -.fill { - width: 100%; - height: 100%; - margin: 0 !important; -} -.vertical-main { - width: 100%; - min-width: 400px; - max-width: 1200px; -} -.box { - background-color: rgba(160, 204, 255, 0.1); - border-radius: 4px; - padding: 8px; - margin: 8px; -} -.dbox { - margin: 8px; -} -.dbox .dbox-top { - display: flex; - justify-content: space-between; - background-color: rgba(160, 204, 255, 0.2); - padding: 4px; - border-radius: 4px 4px 0 0; - color: #ffffff; - font-size: smaller; - font-weight: bold; - height: 16px; -} -.dbox .dbox-top .left { - align-self: flex-start; -} -.dbox .dbox-top .right { - align-self: flex-end; -} -.dbox .dbox-bot { - background-color: rgba(160, 204, 255, 0.1); - padding: 8px; - border-radius: 0 0 4px 4px; -} -.color { - border-radius: 4px; - width: 32px; - height: 32px; - display: inline-block; -} -.color.color-light { - border: 1px solid black; -} -.color.color-dark { - border: 1px solid white; -} -.proscons { - padding: 4px 4px 4px 8px; - margin: 4px; - border-radius: 4px; -} -.proscons.plus { - color: #7dff7d; - background-color: rgba(125, 255, 125, 0.1); -} -.proscons.plus::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0fe"; - margin-right: 6px; -} -.proscons.minus { - color: #ff7d7d; - background-color: rgba(255, 125, 125, 0.1); -} -.proscons.minus::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f146"; - margin-right: 6px; -} -.proscons.stars { - background-color: rgba(255, 255, 125, 0.1); - color: #ffff7d; - display: flex; -} -.proscons.stars .stars-0 { - margin-right: 6px; -} -.proscons.stars .stars-0::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005\f005\f005\f005"; -} -.proscons.stars .stars-1 { - margin-right: 6px; -} -.proscons.stars .stars-1::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005"; -} -.proscons.stars .stars-1::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005\f005\f005"; -} -.proscons.stars .stars-2 { - margin-right: 6px; -} -.proscons.stars .stars-2::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005"; -} -.proscons.stars .stars-2::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005\f005"; -} -.proscons.stars .stars-3 { - margin-right: 6px; -} -.proscons.stars .stars-3::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005\f005"; -} -.proscons.stars .stars-3::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005"; -} -.proscons.stars .stars-4 { - margin-right: 6px; -} -.proscons.stars .stars-4::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005\f005\f005"; -} -.proscons.stars .stars-4::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005"; -} -.proscons.stars .stars-5 { - margin-right: 6px; -} -.proscons.stars .stars-5::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005\f005\f005\f005"; -} -.proscons:not(.plus):not(.minus):not(.stars) { - color: #a0ccff; - background-color: rgba(160, 204, 255, 0.1); -} -.proscons:not(.plus):not(.minus):not(.stars)::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0c8"; - margin-right: 6px; -} -.proscons.label-big { - font-size: xx-large; -} -.spoiler { - color: transparent; - background-color: rgba(255, 125, 125, 0.1); - border: 1px solid rgba(255, 125, 125, 0.1); - border-radius: 2px; - padding: 4px; -} -.spoiler b, -.spoiler strong, -.spoiler i, -.spoiler em { - color: inherit; -} -.spoiler b:hover, -.spoiler strong:hover, -.spoiler i:hover, -.spoiler em:hover { - color: inherit; -} -.spoilerblockquote { - border-radius: 2px; - padding: 4px; -} -.spoiler:hover { - color: #ff7d7d; -} -.wiki .wiki-doublebox .dbox-bot, -.profile-bio .wiki-doublebox .dbox-bot { - background-color: transparent; - border-top: 0; - border-bottom: 4px solid rgba(160, 204, 255, 0.2); - border-left: 4px solid rgba(160, 204, 255, 0.2); - border-right: 4px solid rgba(160, 204, 255, 0.2); -} -.wiki .wiki-doublebox .dbox-bot .wikiview-title, -.profile-bio .wiki-doublebox .dbox-bot .wikiview-title { - text-align: center; - font-size: 42px; - margin-top: 0; -} -.wiki h1, -.profile-bio h1, -.wiki h2, -.profile-bio h2, -.wiki h3, -.profile-bio h3, -.wiki h4, -.profile-bio h4, -.wiki h5, -.profile-bio h5, -.wiki h6, -.profile-bio h6 { - margin-top: revert; - margin-bottom: revert; -} -.error .error-dbox .dbox-top { - background-color: rgba(255, 125, 125, 0.2); - color: #ff7d7d; -} -.error .error-dbox .dbox-bot { - background-color: rgba(255, 125, 125, 0.1); - color: #ff7d7d; -} -.diario { - display: grid; - grid-template-columns: auto auto 40px; -} -.diario .diario-content { - grid-row: 1; - grid-column-start: 1; - grid-column-end: 4; -} -.diario .diario-content .diario-img img { - color: red; - margin-top: 2px; - margin-bottom: 2px; - max-height: 400px; -} -.diario .diario-content .diario-text { - margin-top: 2px; - margin-bottom: 2px; -} -.diario .diario-quote { - grid-row: 2; - grid-column-start: 1; - grid-column-end: 4; - font-size: small; - margin-top: 2px; - margin-bottom: 2px; -} -.diario .diario-quote .diario-context { - font-style: italic; -} -.diario .diario-timestamp { - grid-row: 3; - grid-column: 1; - font-size: x-small; - margin-top: 2px; - margin-bottom: 2px; -} -.diario .diario-created { - grid-row: 3; - grid-column: 2; - justify-self: end; - font-size: x-small; - margin-top: 2px; - margin-bottom: 2px; -} -.diario .diario-id { - grid-row: 3; - grid-column: 3; - justify-self: end; - font-size: x-small; - margin-top: 2px; - margin-bottom: 2px; -} -.diario.diario-spoiler { - color: transparent; - background-color: rgba(255, 125, 125, 0.1); - border-left: 3px solid #ff7d7d; -} -.diario.diario-spoiler:hover { - color: #ff7d7d; -} -ul.multicolumn, -ol.multicolumn { - column-width: 300px; -} -/*** Page specific classes ***/ -.mcstatus-grid { - display: grid; - grid-template-columns: 64px auto auto; - grid-column-gap: 12px; - align-items: center; -} -.mcstatus-grid .mcstatus-icon { - grid-column: 1; - grid-row-start: 1; - grid-row-end: 3; - width: 64px; - height: 64px; -} -.mcstatus-grid .mcstatus-icon .mcstatus-icon-img { - width: 64px; - height: 64px; -} -.mcstatus-grid .mcstatus-address { - font-weight: bold; - grid-column: 2; - justify-self: start; - grid-row: 1; -} -.mcstatus-grid .mcstatus-address .server-up { - color: #7dff7d; -} -.mcstatus-grid .mcstatus-address .server-down { - color: #ff7d7d; -} -.mcstatus-grid .mcstatus-description { - grid-column: 2; - justify-self: start; - grid-row: 2; -} -.mcstatus-grid .mcstatus-players { - grid-column: 3; - justify-self: end; - grid-row: 1; -} -.mcstatus-grid .mcstatus-version { - grid-column: 3; - justify-self: end; - grid-row: 2; -} -.profile .profile-links .links-linked { - font-family: "Consolas", "Source Code Pro", monospace; -} -.profile .profile-links .links-missing { - color: #ff7d7d; -} -.profile .profile-stats .stats-value { - font-weight: bold; -} -.tg-login-container { - width: 238px; - height: 40px; -} -/*# sourceMappingURL=ryg.css.map */ \ No newline at end of file diff --git a/royalnet/web/static/ryg.css.map b/royalnet/web/static/ryg.css.map deleted file mode 100644 index 6bad31c9..00000000 --- a/royalnet/web/static/ryg.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["ryg.less"],"names":[],"mappings":";;AA2BA;EACI,aAPS,SAAS,4BAOlB;EACA,yBAAA;EACA,cAAA;EACA,sBAAA;;AAGJ;EACI,cAAA;EACA,qBAAA;;AAEA,CAAC;EACG,cAAA;;AAGJ,CAAC;EACG,YAAA;;AAOA,CAFH,IAAI,UAEA;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAVH,IAAI,UAUA,sBAAsB;EACnB,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlBH,IAAI,UAkBA,iCAAiC;AAAU,CAlB/C,IAAI,UAkB4C,0BAA0B;EACnE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1BH,IAAI,UA0BA,2BAA2B;AAAU,CA1BzC,IAAI,UA0BsC,kCAAkC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlCH,IAAI,UAkCA,4BAA4B;AAAU,CAlC1C,IAAI,UAkCuC,iCAAiC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AA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I,kBAWI;EACI,cAAA;;AAjCZ,cAqCI;EACI,cAAA;EACA,mBAAA;EACA,WAAA;;AAxCR,cA2CI;EACI,cAAA;EACA,iBAAA;EACA,WAAA;;AA9CR,cAiDI;EACI,cAAA;EACA,iBAAA;EACA,WAAA;;AAIR,QAEI,eAEI;EACI,aA/6BM,YAAY,4BA+6BlB;;AALZ,QAEI,eAMI;EACI,cAAA;;AATZ,QAaI,eAEI;EACI,iBAAA;;AAKZ;EACI,YAAA;EACA,YAAA","file":"ryg.css"} \ No newline at end of file diff --git a/royalnet/web/static/ryg.less b/royalnet/web/static/ryg.less deleted file mode 100644 index dbd9ecd4..00000000 --- a/royalnet/web/static/ryg.less +++ /dev/null @@ -1,985 +0,0 @@ -/*** Variables ***/ - -@bg: #0d193b; //Background color -@fg: #a0ccff; //Foreground color -@li: #00caca; //Link -@ec: #ffffff; //Extra color - -@fg-ten: fade(@fg, 10%); -@fg-twenty: fade(@fg, 20%); - -@fg-ten-hard: screen(@bg, @fg-ten); -@fg-twenty-hard: screen(@bg, @fg-twenty); - -@pastel-red: #ff7d7d; -@pastel-orange: #ffbb7d; -@pastel-yellow: #ffff7d; -@pastel-lime: #7dff7d; -@pastel-cyan: #7dffff; -@pastel-blue: #7d7dff; -@pastel-magenta: #ff7dff; - -@main-fonts: "Arial", "Helvetica Neue", sans-serif; -@monospace-fonts: "Consolas", "Source Code Pro", monospace; - - -/*** Standard elements ***/ - -body { - font-family: @main-fonts; - background-color: @bg; - color: @fg; - box-sizing: border-box; -} - -a { - color: @li; - text-decoration: none; - - &:hover { - color: lighten(@li, 25%); - } - - &:active { - color: white; - } - - //Icon link - //noinspection CssNoGenericFontName - &:not(.no-icon) { - //External link - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0c1"; - margin-right: 4px; - } - - //Telegram link - &[href^="https://t.me"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f2c6"; - margin-right: 3px; - } - - //YouTube link - &[href^="https://www.youtube.com"]::before, &[href^="https://youtu.be"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f167"; - margin-right: 3px; - } - - //Vimeo link - &[href^="https://vimeo.com"]::before, &[href^="https://player.vimeo.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f27d"; - margin-right: 4px; - } - - //GitHub link - &[href^="https://github.com"]::before, &[href^="https://gist.github.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f09b"; - margin-right: 4px; - } - - //Itchio link - &[href^="https://itch.io"]::before, &[href^="https://steffo.itch.io"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f83a"; - margin-right: 3px; - } - - //Kickstarter link - &[href^="https://www.kickstarter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f3bb"; - margin-right: 4px; - } - - //Reddit link - &[href^="https://reddit.com"]::before, &[href^="https://new.reddit.com"]::before, &[href^="https://old.reddit.com"]::before, &[href^="https://redd.it"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f281"; - margin-right: 3px; - } - - //Twitch link - &[href^="https://www.twitch.tv"]::before, &[href^="https://clips.twitch.tv"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1e8"; - margin-right: 4px; - } - - //Steam link - &[href^="https://store.steampowered.com"]::before, &[href^="https://steamcommunity.com"]::before, &[href^="https://partner.steamgames.com"]::before, &[href^="steam:"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1b6"; - margin-right: 4px; - } - - //Twitter link - &[href^="https://twitter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f099"; - margin-right: 3px; - } - - //Wikipedia link - &[href^="https://it.wikipedia.org"]::before, &[href^="https://en.wikipedia.org"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f266"; - margin-right: 3px; - } - - //Anchor - &[href^="#"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f13d"; - margin-right: 3px; - } - - //Unsafe link - &[href^="http:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f09c"; - margin-right: 4px; - } - - //Magnet link - &[href^="magnet:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f076"; - margin-right: 4px; - } - } -} - -b, strong { - color: @pastel-yellow; -} - -i, em { - color: @pastel-orange; -} - -h1, h2, h3, h4, h5, h6 { - color: @ec; - margin-top: 0; - margin-bottom: 0; - font-weight: normal; -} - -pre { - padding: 2px 4px 2px 8px; - margin: 8px; - - color: lightgray; - border: 1px solid fade(lightgray, 20%); - background-color: fade(lightgray, 10%); - font-family: @monospace-fonts; -} - -*:not(pre) > code { - color: lightgray; - border: 1px solid fade(lightgray, 20%); - background-color: fade(lightgray, 10%); -} -code { - font-family: @monospace-fonts; -} - -blockquote { - color: @pastel-lime; - border-left: 3px solid @pastel-lime; - background-color: fade(@pastel-lime, 10%); - padding: 2px 4px 2px 8px; - margin: 8px; -} - -textarea { - background-color: @fg-ten; - color: @fg; - border: 1px solid @fg; - padding: 2px; - margin: 1px; - font-size: small; - font-family: @monospace-fonts; - width: 100%; - height: 300px; -} - -button, input[type="submit"], .btn { - background-color: @fg-ten; - color: @fg !important; - border: 1px solid @fg; - border-radius: 0; - padding: 2px 8px; - margin: 1px; - font-size: medium; - font-family: @main-fonts; - text-decoration: none; - cursor: default; - - &:hover { - background-color: @fg-twenty; - color: lighten(@fg, 25%); - border-color: lighten(@fg, 25%); - } - - &:active { - background-color: fade(@fg, 30%); - color: white; - border-color: white; - } -} - -input[type="text"], input[type="password"], input[type="email"] { - background-color: @fg-ten; - color: @fg; - border: none; - border-bottom: 1px dashed @fg; - padding: 2px; - margin: 1px; - font-size: medium; - font-family: @main-fonts; -} - -select { - background-color: @fg-ten; - color: @fg; - border: none; - border-bottom: 1px dotted @fg; - padding: 2px; - margin: 1px; - font-size: medium; - font-family: @main-fonts; - - option { - background-color: #293c61; - color: @fg; - } -} - -img { - margin-left: auto; - margin-right: auto; - display: block; - max-width: 100%; -} - -nav { - display: flex; - justify-content: space-between; - height: 50px; - line-height: 50px; - min-width: 400px; - - .nav-left { - text-align: left; - } - - .nav-center { - text-align: center; - } - - .nav-right { - text-align: right; - } - - .nav-image { - height: 50px; - display: inline; - vertical-align: middle; - } - - .nav-sitename { - font-weight: bold; - } - - .nav-login-unavailable { - opacity: 0.25; - } -} - -table { - border-collapse: collapse; - - thead { - margin-top: 4px; - margin-left: 4px; - margin-right: 4px; - padding: 8px; - - th { - background-color: @fg-twenty; - color: @ec; - padding-left: 4px; - padding-right: 4px; - text-align: left; - font-size: small; - font-weight: bold; - } - - tr:first-child { - th:first-child { - border-radius: 4px 0 0 0; - } - - th:last-child { - border-radius: 0 4px 0 0; - } - } - } - - tbody { - margin-bottom: 4px; - margin-left: 4px; - margin-right: 4px; - padding: 8px; - - td { - background-color: @fg-ten; - padding-left: 4px; - padding-right: 4px; - } - - tr { - border-bottom: 1px solid @fg-twenty; - - &:last-child { - border-bottom: none; - - td:first-child { - border-radius: 0 0 0 4px; - } - - td:last-child { - border-radius: 0 0 4px 0; - } - } - } - } -} - -form.full { - - label { - margin-top: 4px; - margin-bottom: 4px; - display: flex; - - .label-text { - margin-right: 12px; - min-width: 60px; - } - - input { - flex-grow: 1; - } - - &.label-big { - font-size: x-large; - - * { - font-size: x-large; - } - } - } -} - -*[disabled=""], .disabled { - opacity: 0.3; -} - - -/*** Modifiers ***/ -.tiny { - font-size: xx-small; -} - -.center { - margin: auto; -} - - -/*** Custom elements ***/ - -//Markdown editor -.CodeMirror { - font-family: "Consolas", monospace !important; - background-color: @bg !important; - color: @fg !important; - border-top: 0 !important; - border-bottom: 0 !important; - border-left: 1px solid @fg-twenty !important; - border-right: 1px solid @fg-twenty !important; - border-radius: 0 !important; - caret-color: white; - - .cm-link { - color: @pastel-cyan !important; - } - - .cm-url { - color: @li !important; - } - - .cm-tag { - color: @pastel-magenta !important; - } - - .cm-strong { - color: @pastel-yellow !important; - } - - .cm-em { - color: @pastel-orange !important; - } - - .cm-quote { - color: @pastel-lime !important; - } - - .cm-comment { - color: lightgray !important; - } - - .cm-header { - color: @ec !important; - } - - .CodeMirror-cursor { - border-left: 1px solid @fg !important; - } -} -.editor-toolbar, .editor-statusbar { - background-color: @fg-ten-hard !important; - color: @fg !important; - opacity: 1 !important; - - a { - color: @fg !important; - border: 0 !important; - - &:hover { - background-color: @fg-twenty !important; - color: lighten(@fg, 25%) !important; - } - - &.active { - background-color: fade(@fg, 30%) !important; - color: white !important; - - &:hover { - background-color: @fg-twenty !important; - color: lighten(@fg, 25%) !important; - } - } - } - - .fas, .far, .fab { - color: @fg !important; - - &:hover { - color: @fg !important; - } - - &:active { - color: white !important; - } - } -} -.editor-toolbar { - border-top: 1px solid @fg-twenty-hard !important; - border-left: 1px solid @fg-twenty-hard !important; - border-right: 1px solid @fg-twenty-hard !important; - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.editor-statusbar { - border-bottom: 1px solid @fg-twenty-hard !important; - border-left: 1px solid @fg-twenty-hard !important; - border-right: 1px solid @fg-twenty-hard !important; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} - -//Horizontal container, should contain elements such as main and sidebar -.horizontal-container-main { - display: flex; - justify-content: center; - align-content: center; - flex-direction: row; - - @media (max-width: 1199px) - { - flex-direction: column; - } -} - -//Tripart horizontal container -.columns-3 { - display: flex; - justify-content: center; - align-content: center; - flex-direction: row; - flex-wrap: wrap; - - .column { - width: 33.3%; - min-width: 400px; - } -} - -//Fill the whole parent element and ignore margins -.fill { - width: 100%; - height: 100%; - margin: 0 !important; -} - -//Vertical main page container -.vertical-main { - width: 100%; - min-width: 400px; - max-width: 1200px; -} - -//A simple box -.box { - background-color: @fg-ten; - border-radius: 4px; - padding: 8px; - margin: 8px; -} - -//A double box -.dbox { - margin: 8px; - - .dbox-top { - display: flex; - justify-content: space-between; - background-color: @fg-twenty; - padding: 4px; - border-radius: 4px 4px 0 0; - color: @ec; - font-size: smaller; - font-weight: bold; - height: 16px; - - .left { - align-self: flex-start; - } - - .right { - align-self: flex-end; - } - } - - .dbox-bot { - background-color: @fg-ten; - padding: 8px; - border-radius: 0 0 4px 4px; - } -} - -//A palette color -.color { - border-radius: 4px; - width: 32px; - height: 32px; - display: inline-block; - - &.color-light { - border: 1px solid black; - } - - &.color-dark { - border: 1px solid white; - } -} - -//Pros and cons of something -.proscons { - padding: 4px 4px 4px 8px; - margin: 4px; - border-radius: 4px; - - //noinspection CssNoGenericFontName - &.plus { - color: @pastel-lime; - background-color: fade(@pastel-lime, 10%); - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0fe"; - margin-right: 6px; - } - } - - //noinspection CssNoGenericFontName - &.minus { - color: @pastel-red; - background-color: fade(@pastel-red, 10%); - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f146"; - margin-right: 6px; - } - } - - //noinspection CssNoGenericFontName - &.stars { - background-color: fade(@pastel-yellow, 10%); - color: @pastel-yellow; - display: flex; - - .stars-0 { - margin-right: 6px; - - &::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005\f005\f005\f005"; - } - } - - .stars-1 { - margin-right: 6px; - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005"; - } - - &::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005\f005\f005"; - } - } - - .stars-2 { - margin-right: 6px; - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005"; - } - - &::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005\f005"; - } - } - - .stars-3 { - margin-right: 6px; - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005\f005"; - } - - &::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005\f005"; - } - } - - .stars-4 { - margin-right: 6px; - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005\f005\f005"; - } - - &::after { - font-family: "Font Awesome 5 Free"; - font-weight: normal; - content: "\f005"; - } - } - - .stars-5 { - margin-right: 6px; - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f005\f005\f005\f005\f005"; - } - } - } - - //noinspection CssNoGenericFontName - &:not(.plus):not(.minus):not(.stars) { - color: @fg; - background-color: @fg-ten; - - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0c8"; - margin-right: 6px; - } - } - - &.label-big { - font-size: xx-large; - } -} - -//A spoiler -.spoiler { - color: transparent; - background-color: fade(@pastel-red, 10%); - border: 1px solid fade(@pastel-red, 10%); - border-radius: 2px; - padding: 4px; - - b, strong, i, em { - color: inherit; - - &:hover { - color: inherit; - } - } - - &blockquote { - border-radius: 2px; - padding: 4px; - } - - &:hover { - color: @pastel-red; - } -} - -//Wiki page -.wiki, .profile-bio { - .wiki-doublebox { - .dbox-bot { - background-color: transparent; - border-top: 0; - border-bottom: 4px solid @fg-twenty; - border-left: 4px solid @fg-twenty; - border-right: 4px solid @fg-twenty; - - .wikiview-title { - text-align: center; - font-size: 42px; - margin-top: 0; - } - } - } - - h1, h2, h3, h4, h5, h6 { - margin-top: revert; - margin-bottom: revert; - } -} - -//An error -.error { - .error-dbox { - .dbox-top { - background-color: fade(@pastel-red, 20%); - color: @pastel-red; - } - - .dbox-bot { - background-color: fade(@pastel-red, 10%); - color: @pastel-red; - } - } -} - -//A diario entry -.diario { - display: grid; - grid-template-columns: auto auto 40px; - - .diario-content { - grid-row: 1; - grid-column-start: 1; - grid-column-end: 4; - - .diario-img img { - color: red; - margin-top: 2px; - margin-bottom: 2px; - max-height: 400px; - } - - .diario-text { - margin-top: 2px; - margin-bottom: 2px; - } - } - - .diario-quote { - grid-row: 2; - grid-column-start: 1; - grid-column-end: 4; - font-size: small; - margin-top: 2px; - margin-bottom: 2px; - - .diario-context { - font-style: italic; - } - } - - .diario-timestamp { - grid-row: 3; - grid-column: 1; - font-size: x-small; - margin-top: 2px; - margin-bottom: 2px; - } - - .diario-created { - grid-row: 3; - grid-column: 2; - justify-self: end; - font-size: x-small; - margin-top: 2px; - margin-bottom: 2px; - } - - .diario-id { - grid-row: 3; - grid-column: 3; - justify-self: end; - font-size: x-small; - margin-top: 2px; - margin-bottom: 2px; - } - - &.diario-spoiler { - color: transparent; - background-color: fade(@pastel-red, 10%); - border-left: 3px solid @pastel-red; - - &:hover { - color: @pastel-red; - } - } -} - -//Multicolumn lists -ul.multicolumn, ol.multicolumn { - column-width: 300px; -} - - -/*** Page specific classes ***/ - -.mcstatus-grid { - display: grid; - - grid-template-columns: 64px auto auto; - grid-column-gap: 12px; - - align-items: center; - - .mcstatus-icon { - grid-column: 1; - grid-row-start: 1; - grid-row-end: 3; - width: 64px; - height: 64px; - - .mcstatus-icon-img { - width: 64px; - height: 64px; - } - } - - .mcstatus-address { - font-weight: bold; - - grid-column: 2; - justify-self: start; - grid-row: 1; - - .server-up { - color: @pastel-lime; - } - - .server-down { - color: @pastel-red; - } - } - - .mcstatus-description { - grid-column: 2; - justify-self: start; - grid-row: 2; - } - - .mcstatus-players { - grid-column: 3; - justify-self: end; - grid-row: 1; - } - - .mcstatus-version { - grid-column: 3; - justify-self: end; - grid-row: 2; - } -} - -.profile { - - .profile-links { - - .links-linked { - font-family: @monospace-fonts; - } - - .links-missing { - color: @pastel-red; - } - } - - .profile-stats { - - .stats-value { - font-weight: bold; - } - } -} - -.tg-login-container { - width: 238px; - height: 40px; -} diff --git a/royalnet/web/static/tf2.css b/royalnet/web/static/tf2.css deleted file mode 100644 index 2e73cc59..00000000 --- a/royalnet/web/static/tf2.css +++ /dev/null @@ -1,309 +0,0 @@ -@font-face { - font-family: 'TF2'; - src: url('https://scaleway.steffo.eu/tf2.ttf'); -} -@font-face { - font-family: 'TF2 Build'; - src: url('https://scaleway.steffo.eu/tf2build.ttf'); -} -@font-face { - font-family: 'TF2 Professor'; - src: url('https://scaleway.steffo.eu/tf2professor.ttf'); -} -@font-face { - font-family: 'TF2 Secondary'; - src: url('https://scaleway.steffo.eu/tf2secondary.ttf'); -} -body { - font-family: "TF2 Secondary", sans-serif; - background-color: #2e2a28; - color: #d2cdc8; - box-sizing: border-box; -} -a { - color: #9a4713; - text-decoration: none; -} -a:hover { - color: #e88345; -} -a:active { - color: white; -} -a:not(.no-icon)::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0c1"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://t.me"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f2c6"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://www.youtube.com"]::before, -a:not(.no-icon)[href^="https://youtu.be"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f167"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://vimeo.com"]::before, -a:not(.no-icon)[href^="https://player.vimeo.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f27d"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://github.com"]::before, -a:not(.no-icon)[href^="https://gist.github.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f09b"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://itch.io"]::before, -a:not(.no-icon)[href^="https://steffo.itch.io"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f83a"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://www.kickstarter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f3bb"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://reddit.com"]::before, -a:not(.no-icon)[href^="https://new.reddit.com"]::before, -a:not(.no-icon)[href^="https://old.reddit.com"]::before, -a:not(.no-icon)[href^="https://redd.it"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f281"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://www.twitch.tv"]::before, -a:not(.no-icon)[href^="https://clips.twitch.tv"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1e8"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://store.steampowered.com"]::before, -a:not(.no-icon)[href^="https://steamcommunity.com"]::before, -a:not(.no-icon)[href^="https://partner.steamgames.com"]::before, -a:not(.no-icon)[href^="steam:"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1b6"; - margin-right: 4px; -} -a:not(.no-icon)[href^="https://twitter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f099"; - margin-right: 3px; -} -a:not(.no-icon)[href^="https://it.wikipedia.org"]::before, -a:not(.no-icon)[href^="https://en.wikipedia.org"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f266"; - margin-right: 3px; -} -a:not(.no-icon)[href^="#"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f13d"; - margin-right: 3px; -} -a:not(.no-icon)[href^="http:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f09c"; - margin-right: 4px; -} -a:not(.no-icon)[href^="magnet:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f076"; - margin-right: 4px; -} -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: "TF2 Build", sans-serif; - color: #ffffff; - margin-top: 0; - margin-bottom: 0; - font-weight: normal; -} -code { - font-family: "Consolas", "Source Code Pro", monospace; -} -blockquote { - color: #d2cdc8; - border-left: 3px solid #d2cdc8; - background-color: rgba(210, 205, 200, 0.1); - padding: 2px 4px 2px 8px; - margin: 8px; -} -textarea { - background-color: rgba(210, 205, 200, 0.1); - color: #d2cdc8; - border: 1px solid #d2cdc8; - padding: 2px; - margin: 1px; - font-size: small; - font-family: "Consolas", "Source Code Pro", monospace; - width: 100%; - height: 300px; -} -button, -input[type="submit"], -.btn { - background-color: rgba(210, 205, 200, 0.1); - color: #d2cdc8 !important; - border: 1px solid #d2cdc8; - border-radius: 0; - padding: 2px 8px; - margin: 1px; - font-size: medium; - font-family: sans-serif; - text-decoration: none; - cursor: default; -} -button:hover, -input[type="submit"]:hover, -.btn:hover { - background-color: rgba(210, 205, 200, 0.2); - color: #ffffff; - border-color: #ffffff; -} -button:active, -input[type="submit"]:active, -.btn:active { - background-color: rgba(210, 205, 200, 0.3); - color: white; - border-color: white; -} -pre { - margin: 0; -} -img { - margin-left: auto; - margin-right: auto; - display: block; - max-width: 100%; -} -nav { - display: flex; - justify-content: space-between; - height: 50px; - line-height: 50px; -} -nav .nav-left { - text-align: left; -} -nav .nav-center { - text-align: center; -} -nav .nav-right { - text-align: right; -} -nav .nav-image { - height: 50px; - display: none; - vertical-align: middle; -} -nav .nav-sitename { - font-weight: bold; -} -nav .nav-login-unavailable { - opacity: 0.25; -} -.horizontal-container-main { - display: flex; - justify-content: center; - align-content: center; - flex-direction: column; -} -@media (min-width: 800px) { - .horizontal-container-main { - flex-direction: row; - } -} -.vertical-main { - width: 100%; -} -@media (min-width: 800px) { - .vertical-main { - width: 800px; - } -} -@media (min-width: 1200px) { - .vertical-main { - width: 1200px; - } -} -.box { - background-color: #d2cdc8; - color: black; - border-radius: 2px; - padding: 4px; - margin: 8px; -} -.dbox { - margin: 8px; -} -.dbox .dbox-top { - display: flex; - justify-content: space-between; - background-color: #9a4713; - padding: 8px; - border-radius: 4px 4px 0 0; - color: #ffffff; - font-family: "TF2 Build", sans-serif; - font-weight: normal; -} -.dbox .dbox-top .left { - align-self: flex-start; -} -.dbox .dbox-top .right { - align-self: flex-end; -} -.dbox .dbox-top a { - color: #00caca; -} -.dbox .dbox-bot { - background-color: #d2cdc8; - color: black; - padding: 8px; - border-radius: 0 0 4px 4px; -} -.dbox .dbox-bot h1, -.dbox .dbox-bot h2, -.dbox .dbox-bot h3, -.dbox .dbox-bot h4, -.dbox .dbox-bot h5, -.dbox .dbox-bot h6 { - color: black; -} -.spoiler { - color: rgba(0, 0, 0, 0); - border: 1px solid rgba(210, 205, 200, 0.1); - border-radius: 2px; -} -.spoiler:hover { - color: #d2cdc8; -} -.disabled { - opacity: 0.3; -} -/*# sourceMappingURL=tf2.css.map */ \ No newline at end of file diff --git a/royalnet/web/static/tf2.css.map b/royalnet/web/static/tf2.css.map deleted file mode 100644 index 05323f86..00000000 --- a/royalnet/web/static/tf2.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["tf2.less"],"names":[],"mappings":"AAMA;EACI,aAAa,KAAb;EACA,SAAS,qCAAT;;AAGJ;EACI,aAAa,WAAb;EACA,SAAS,0CAAT;;AAGJ;EACI,aAAa,eAAb;EACA,SAAS,8CAAT;;AAGJ;EACI,aAAa,eAAb;EACA,SAAS,8CAAT;;AAOJ;EACI,aALS,2BAKT;EACA,yBAAA;EACA,cAAA;EACA,sBAAA;;AAGJ;EACI,cAAA;EACA,qBAAA;;AAEA,CAAC;EACG,cAAA;;AAGJ,CAAC;EACG,YAAA;;AAOA,CAFH,IAAI,UAEA;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAVH,IAAI,UAUA,sBAAsB;EACnB,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlBH,IAAI,UAkBA,iCAAiC;AAAU,CAlB/C,IAAI,UAkB4C,0BAA0B;EACnE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1BH,IAAI,UA0BA,2BAA2B;AAAU,CA1BzC,IAAI,UA0BsC,kCAAkC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlCH,IAAI,UAkCA,4BAA4B;AAAU,CAlC1C,IAAI,UAkCuC,iCAAiC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1CH,IAAI,UA0CA,y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ACI,WAAA;;AADJ,KAGI;EACI,aAAA;EACA,8BAAA;EACA,yBAAA;EACA,YAAA;EACA,0BAAA;EACA,cAAA;EACA,aAAa,uBAAb;EACA,mBAAA;;AAXR,KAGI,UAUI;EACI,sBAAA;;AAdZ,KAGI,UAcI;EACI,oBAAA;;AAlBZ,KAGI,UAkBI;EACI,cAAA;;AAtBZ,KA0BI;EACI,yBAAA;EACA,YAAA;EACA,YAAA;EACA,0BAAA;;AA9BR,KA0BI,UAMI;AAhCR,KA0BI,UAMQ;AAhCZ,KA0BI,UAMY;AAhChB,KA0BI,UAMgB;AAhCpB,KA0BI,UAMoB;AAhCxB,KA0BI,UAMwB;EAChB,YAAA;;AAKZ;EACI,uBAAA;EACA,0CAAA;EACA,kBAAA;;AAEA,QAAC;EACG,cAAA;;AAIR;EACI,YAAA","file":"tf2.css"} \ No newline at end of file diff --git a/royalnet/web/static/tf2.less b/royalnet/web/static/tf2.less deleted file mode 100644 index 541033d2..00000000 --- a/royalnet/web/static/tf2.less +++ /dev/null @@ -1,362 +0,0 @@ -@bg: #2e2a28; //Background color -@fg: #d2cdc8; //Foreground color -@li: #9a4713; //Link -@ec: #ffffff; //Extra color - - -@font-face { - font-family: 'TF2'; - src: url('https://scaleway.steffo.eu/tf2.ttf'); -} - -@font-face { - font-family: 'TF2 Build'; - src: url('https://scaleway.steffo.eu/tf2build.ttf'); -} - -@font-face { - font-family: 'TF2 Professor'; - src: url('https://scaleway.steffo.eu/tf2professor.ttf'); -} - -@font-face { - font-family: 'TF2 Secondary'; - src: url('https://scaleway.steffo.eu/tf2secondary.ttf'); -} - -@main-fonts: "TF2 Secondary", sans-serif; -@monospace-fonts: "Consolas", "Source Code Pro", monospace; - -//General -body { - font-family: @main-fonts; - background-color: @bg; - color: @fg; - box-sizing: border-box; -} - -a { - color: @li; - text-decoration: none; - - &:hover { - color: lighten(@li, 25%); - } - - &:active { - color: white; - } - - //Icon link - //noinspection CssNoGenericFontName - &:not(.no-icon) { - //External link - &::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f0c1"; - margin-right: 4px; - } - - //Telegram link - &[href^="https://t.me"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f2c6"; - margin-right: 3px; - } - - //YouTube link - &[href^="https://www.youtube.com"]::before, &[href^="https://youtu.be"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f167"; - margin-right: 3px; - } - - //Vimeo link - &[href^="https://vimeo.com"]::before, &[href^="https://player.vimeo.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f27d"; - margin-right: 4px; - } - - //GitHub link - &[href^="https://github.com"]::before, &[href^="https://gist.github.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f09b"; - margin-right: 4px; - } - - //Itchio link - &[href^="https://itch.io"]::before, &[href^="https://steffo.itch.io"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f83a"; - margin-right: 3px; - } - - //Kickstarter link - &[href^="https://www.kickstarter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f3bb"; - margin-right: 4px; - } - - //Reddit link - &[href^="https://reddit.com"]::before, &[href^="https://new.reddit.com"]::before, &[href^="https://old.reddit.com"]::before, &[href^="https://redd.it"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f281"; - margin-right: 3px; - } - - //Twitch link - &[href^="https://www.twitch.tv"]::before, &[href^="https://clips.twitch.tv"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1e8"; - margin-right: 4px; - } - - //Steam link - &[href^="https://store.steampowered.com"]::before, &[href^="https://steamcommunity.com"]::before, &[href^="https://partner.steamgames.com"]::before, &[href^="steam:"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f1b6"; - margin-right: 4px; - } - - //Twitter link - &[href^="https://twitter.com"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f099"; - margin-right: 3px; - } - - //Wikipedia link - &[href^="https://it.wikipedia.org"]::before, &[href^="https://en.wikipedia.org"]::before { - font-family: "Font Awesome 5 Brands"; - font-weight: bold; - content: "\f266"; - margin-right: 3px; - } - - //Anchor - &[href^="#"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f13d"; - margin-right: 3px; - } - - //Unsafe link - &[href^="http:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f09c"; - margin-right: 4px; - } - - //Magnet link - &[href^="magnet:"]::before { - font-family: "Font Awesome 5 Free"; - font-weight: bold; - content: "\f076"; - margin-right: 4px; - } - } -} - -h1, h2, h3, h4, h5, h6 { - font-family: "TF2 Build", sans-serif; - color: @ec; - margin-top: 0; - margin-bottom: 0; - font-weight: normal; -} - -code { - font-family: @monospace-fonts; -} - -blockquote { - color: @fg; - border-left: 3px solid @fg; - background-color: fade(@fg, 10%); - padding: 2px 4px 2px 8px; - margin: 8px; -} - -textarea { - background-color: fade(@fg, 10%); - color: @fg; - border: 1px solid @fg; - padding: 2px; - margin: 1px; - font-size: small; - font-family: @monospace-fonts; - width: 100%; - height: 300px; -} - -button, input[type="submit"], .btn { - background-color: fade(@fg, 10%); - color: @fg !important; - border: 1px solid @fg; - border-radius: 0; - padding: 2px 8px; - margin: 1px; - font-size: medium; - font-family: sans-serif; - text-decoration: none; - cursor: default; - - &:hover { - background-color: fade(@fg, 20%); - color: lighten(@fg, 25%); - border-color: lighten(@fg, 25%); - } - - &:active { - background-color: fade(@fg, 30%); - color: white; - border-color: white; - } -} - -pre { - margin: 0; -} - -img { - margin-left: auto; - margin-right: auto; - display: block; - max-width: 100%; -} - -nav { - display: flex; - justify-content: space-between; - height: 50px; - line-height: 50px; - - .nav-left { - text-align: left; - } - - .nav-center { - text-align: center; - } - - .nav-right { - text-align: right; - } - - .nav-image { - height: 50px; - display: none; - vertical-align: middle; - } - - .nav-sitename { - font-weight: bold; - } - - .nav-login-unavailable { - opacity: 0.25; - } -} - -//Elements - -.horizontal-container-main { - display: flex; - justify-content: center; - align-content: center; - flex-direction: column; - - @media (min-width: 800px) - { - flex-direction: row; - } -} - -.vertical-main { - width: 100%; - - @media (min-width: 800px) - { - width: 800px; - } - - @media (min-width: 1200px) - { - width: 1200px; - } -} - -.box { - background-color: @fg; - color: black; - border-radius: 2px; - padding: 4px; - margin: 8px; -} - -.dbox { - margin: 8px; - - .dbox-top { - display: flex; - justify-content: space-between; - background-color: @li; - padding: 8px; - border-radius: 4px 4px 0 0; - color: @ec; - font-family: "TF2 Build", sans-serif; - font-weight: normal; - - .left { - align-self: flex-start; - } - - .right { - align-self: flex-end; - } - - a { - color: #00caca; - } - } - - .dbox-bot { - background-color: @fg; - color: black; - padding: 8px; - border-radius: 0 0 4px 4px; - - h1, h2, h3, h4, h5, h6 { - color: black; - } - } -} - -.spoiler { - color: rgba(0, 0, 0, 0); - border: 1px solid fade(@fg, 10%); - border-radius: 2px; - - &:hover { - color: @fg; - } -} - -.disabled { - opacity: 0.3; -} \ No newline at end of file diff --git a/royalnet/web/templates/base.html b/royalnet/web/templates/base.html deleted file mode 100644 index 400e1a12..00000000 --- a/royalnet/web/templates/base.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - {% block title %}{% endblock %} - {{ config["SITE_NAME"] }} - - {% if css %} - - {% else %} - - {% endif %} - - {% block head %}{% endblock %} - - - -
-
- {% block content %}{% endblock %} -
-
-
- {% block footscripts %}{% endblock %} -
- - \ No newline at end of file diff --git a/royalnet/web/templates/error.html b/royalnet/web/templates/error.html deleted file mode 100644 index 3837aff7..00000000 --- a/royalnet/web/templates/error.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Errore -{% endblock %} - -{% block content %} -
-
-
- Errore! -
-
-

- {{ title }} -

-

- {{ reason }} -

-
-
-
-{% endblock %} \ No newline at end of file diff --git a/setup.py b/setup.py index 07a888d1..5c45fba9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as f: long_description = f.read() with open("requirements.txt", "r") as f: - install_requires = f.readlines() + install_requires = [line for line in f.readlines() if not line.startswith("#")] setuptools.setup( name="royalnet",