forked from rDrama/rDrama
parent
b56005f761
commit
bf9f7896a7
|
@ -48,9 +48,9 @@ app.config["SESSION_COOKIE_SAMESITE"] = "Lax"
|
||||||
app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365
|
app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365
|
||||||
app.config["SESSION_REFRESH_EACH_REQUEST"] = True
|
app.config["SESSION_REFRESH_EACH_REQUEST"] = True
|
||||||
|
|
||||||
app.config["SLOGAN"] = environ.get("SLOGAN").strip()
|
app.config["SLOGAN"] = environ.get("SLOGAN", "").strip()
|
||||||
app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR").strip()
|
app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR", "ff0000").strip()
|
||||||
app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME").strip() + "_" + environ.get("DEFAULT_COLOR").strip()
|
app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME", "light").strip() + "_" + environ.get("DEFAULT_COLOR", "ff0000").strip()
|
||||||
|
|
||||||
app.config["FORCE_HTTPS"] = int(environ.get("FORCE_HTTPS", 1)) if ("localhost" not in app.config["SERVER_NAME"] and "127.0.0.1" not in app.config["SERVER_NAME"]) else 0
|
app.config["FORCE_HTTPS"] = int(environ.get("FORCE_HTTPS", 1)) if ("localhost" not in app.config["SERVER_NAME"] and "127.0.0.1" not in app.config["SERVER_NAME"]) else 0
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ app.config["RATELIMIT_HEADERS_ENABLED"]=True
|
||||||
limiter = Limiter(
|
limiter = Limiter(
|
||||||
app,
|
app,
|
||||||
key_func=get_ipaddr,
|
key_func=get_ipaddr,
|
||||||
default_limits=["100/minute"],
|
#default_limits=["100/minute"],
|
||||||
headers_enabled=True,
|
headers_enabled=True,
|
||||||
strategy="fixed-window"
|
strategy="fixed-window"
|
||||||
)
|
)
|
||||||
|
|
|
@ -190,17 +190,30 @@
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<script src="/assets/js/sparkle.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
{% if p.award_count("gold") %}
|
{% if p.award_count("gold") %}
|
||||||
|
{% set sparkles = 10*p.award_count("gold") if p.award_count("gold") <= 5 else 50 %}
|
||||||
<script>
|
<script>
|
||||||
{% set minstars = 10*p.award_count("gold") if p.award_count("gold") <= 5 else 50 %}
|
document.querySelector("#post-text").sparkle({
|
||||||
{% set maxstars = 20*p.award_count("gold") if p.award_count("gold") <= 5 else 100 %}
|
count: {{ sparkles }},
|
||||||
<script type="text/javascript">
|
minAge: 500,
|
||||||
new BugController({
|
maxAge: 1000,
|
||||||
imageSprite: "/assets/images/star.png",
|
starsource: `
|
||||||
canDie: false,
|
<svg
|
||||||
minBugs: {{minstars}},
|
width="100%"
|
||||||
maxBugs: {{maxstars}},
|
height="100%"
|
||||||
mouseOver: "multiply"
|
viewBox="0 0 15 15"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg" x
|
||||||
|
mlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xml:space="preserve"
|
||||||
|
xmlns:serif="http://www.serif.com/"
|
||||||
|
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||||
|
<path d="M1.125,4.95l4.462,0l1.913,-3.825l0.637,3.825l5.738,0l-4.463,3.188l0.638,5.737l-3.187,-3.825l-4.463,3.825l1.913,-5.737l-3.188,-3.188Z"
|
||||||
|
style="fill:#aaad00;">
|
||||||
|
</path>
|
||||||
|
</svg>`,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue