Custom CTF Name

selenium-screenshot-testing
CodeKevin 2015-03-15 14:55:50 -04:00
parent c26d0924bf
commit 0179fa7115
2 changed files with 8 additions and 2 deletions

View File

@ -23,6 +23,12 @@ def init_utils(app):
app.jinja_env.globals.update(pages=pages) app.jinja_env.globals.update(pages=pages)
app.jinja_env.globals.update(can_register=can_register) app.jinja_env.globals.update(can_register=can_register)
app.jinja_env.globals.update(mailserver=mailserver) app.jinja_env.globals.update(mailserver=mailserver)
app.jinja_env.globals.update(ctf_name=ctf_name())
def ctf_name():
name = get_config('ctf_name')
return name if name else 'CTF'
def pages(): def pages():

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title></title> <title>{{ ctf_name }} - </title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon">
@ -17,7 +17,7 @@
<nav class="top-bar" data-topbar> <nav class="top-bar" data-topbar>
<ul class="title-area"> <ul class="title-area">
<li class="name"> <li class="name">
<h1><a href="/">CTF</a></h1> <h1><a href="/">{{ ctf_name|upper }}</a></h1>
</li> </li>
<li class="toggle-topbar menu-icon"><a href="#">Menu</a></li> <li class="toggle-topbar menu-icon"><a href="#">Menu</a></li>
</ul> </ul>