mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Hide DBL banner if already voted, however homepage always shows regardless
This commit is contained in:
parent
470607af1a
commit
5cf32ffb0c
@ -81,4 +81,9 @@ def before_first_request():
|
|||||||
|
|
||||||
@app.context_processor
|
@app.context_processor
|
||||||
def context_processor():
|
def context_processor():
|
||||||
return {"devs": get_administrators_list(), "constants": constants, "af_mode_enabled": datetime.datetime.now().date() == datetime.date(datetime.datetime.now().year, 4, 1)}
|
return {
|
||||||
|
"devs": get_administrators_list(),
|
||||||
|
"constants": constants,
|
||||||
|
"af_mode_enabled": datetime.datetime.now().date() == datetime.date(datetime.datetime.now().year, 4, 1),
|
||||||
|
"dbl_voted": session.get("unauthenticated", True) == False and bool(redis_store.get("DiscordBotsOrgVoted/" + str(session.get("user_id", -1))))
|
||||||
|
}
|
||||||
|
@ -93,11 +93,13 @@
|
|||||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js" integrity="sha256-uWtSXRErwH9kdJTIr1swfHFJn/d/WQ6s72gELOHXQGM=" crossorigin="anonymous"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js" integrity="sha256-uWtSXRErwH9kdJTIr1swfHFJn/d/WQ6s72gELOHXQGM=" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
{% if not dbl_voted or (dbl_voted and request.path == "/") %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#dblbanner').delay(1000).slideDown("slow");
|
$('#dblbanner').delay(1000).slideDown("slow");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if af_mode_enabled %}
|
{% if af_mode_enabled %}
|
||||||
<script type="text/javascript" src="{{ url_for('static', filename='js/site.af.sausage.js') }}"></script>
|
<script type="text/javascript" src="{{ url_for('static', filename='js/site.af.sausage.js') }}"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user