def scoreboard_view(): if scores_visible() and not authed(): return redirect(url_for('auth.login', next=request.path)) if not scores_visible(): return render_template('scoreboard.html', errors=['Scores are currently hidden']) standings = get_standings() challenges, categories = get_challenges() return render_template('scoreboard.html', standings=standings, score_frozen=is_scoreboard_frozen(), mode='users' if is_users_mode() else 'teams', challenges=challenges, categories=categories, theme=ctf_theme())
def inject_theme(endpoint, values): if "theme" not in values and app.url_map.is_endpoint_expecting( endpoint, "theme"): values["theme"] = ctf_theme()
def inject_theme(endpoint, values): if 'theme' not in values and app.url_map.is_endpoint_expecting( endpoint, 'theme'): values['theme'] = ctf_theme()
def manifest_css(self): theme = ctf_theme() manifest = os.path.join(current_app.root_path, "themes", theme, "static", "manifest-css.json") return get_asset_json(path=manifest)