Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec3c7e3241 |
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
||||
FROM node:22-alpine AS sass-builder
|
||||
FROM node:18-alpine AS sass-builder
|
||||
|
||||
RUN NODE_OPTIONS=--dns-result-order=ipv4first npm install -g sass@1.107.1 --omit=dev --no-fund --no-audit
|
||||
RUN NODE_OPTIONS=--dns-result-order=ipv4first npm install -g sass@latest --omit=dev --no-fund --no-audit
|
||||
WORKDIR /build
|
||||
COPY ./blueprints ./blueprints
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from modules import locale
|
||||
from modules import domains
|
||||
|
||||
from blueprints.root import bp as root_bp
|
||||
from blueprints.risdeveau import bp as rdv_bp
|
||||
@@ -20,6 +21,7 @@ app.jinja_env.add_extension('pypugjs.ext.jinja.PyPugJSExtension')
|
||||
|
||||
app.before_request(locale.before_request)
|
||||
app.context_processor(locale.inject_translations)
|
||||
app.context_processor(domain.inject_get_domain)
|
||||
|
||||
app.register_blueprint(root_bp)
|
||||
app.register_blueprint(rdv_bp)
|
||||
|
||||
@@ -75,8 +75,6 @@ table, tbody {
|
||||
background-color: color.change(theme.$surface1, $alpha:75%);
|
||||
}
|
||||
|
||||
.green { color: theme.$green; }
|
||||
|
||||
th {
|
||||
text-align: unset;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
table
|
||||
tr
|
||||
td Programmer
|
||||
td 3/4yr.
|
||||
tr.green
|
||||
td 2.5/4yr.
|
||||
tr
|
||||
td Translator
|
||||
td 3/3yr.
|
||||
td 2.5/3yr.
|
||||
@@ -0,0 +1,20 @@
|
||||
from flask import g, request
|
||||
|
||||
def get_curr_mode() -> str:
|
||||
match request.headers['host']:
|
||||
case "lair.moe": return "clearnet"
|
||||
case "ygg.lair.moe": return "ygg-dns"
|
||||
case "lair.ygg": return "ygg-alfis"
|
||||
case "lair.ygg.at": return "ygg-alfis-at"
|
||||
else: return "ip"
|
||||
|
||||
def inject_get_domain():
|
||||
def get_domain(domain: str, mode=get_cur_mode(): str) -> str:
|
||||
match mode:
|
||||
case "clearnet": return f"{domain}.lair.moe"
|
||||
case "ygg-dns": return f"{domain}.ygg.lair.moe"
|
||||
case "ygg-alfis": return f"{domain}.lair.ygg"
|
||||
case "ygg-alfis-at": return f"{domain}.lair.ygg.at"
|
||||
else: return ""
|
||||
|
||||
return {':': get_domain}
|
||||
+1
-1
@@ -5,4 +5,4 @@ requests
|
||||
APScheduler
|
||||
musicbrainzngs
|
||||
python-magic
|
||||
pypugjs
|
||||
git+https://github.com/VerySweetBread/pypugjs
|
||||
Reference in new issue
Block a user