Skip to content

Commit b53b6f1

Browse files
author
eshaan7
committed
changes related to organization info
1 parent a0f350e commit b53b6f1

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/FlaskRTBCTF/templates/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="content-section">
55
<div class="jumbotron jumbotron-fluid">
66
<div class="container">
7-
<h1 class="display-5">Welcome to {{ ctfname }}</h1>
7+
<h1 class="display-5">Welcome to {{ organization['ctfname'] }}</h1>
88
{% if current_user.is_authenticated %}
99
<p class="lead">If you owned the box then you can submit the hashes <a class="red-underlined-link" href="{{ url_for('ctf.machine') }}">here</a>.</p>
1010
{% else %}

src/FlaskRTBCTF/templates/layout.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css') }}">
1616
<!-- Title -->
1717
{% if title %}
18-
<title>{{ ctfname }} - {{ title }}</title>
18+
<title>{{ organization['ctfname'] }} - {{ title }}</title>
1919
{% else %}
20-
<title>{{ ctfname }}</title>
20+
<title>{{ organization['ctfname'] }}</title>
2121
{% endif %}
2222
</head>
2323
<body>
2424

2525
<header class="site-header">
2626
<nav class="navbar navbar-expand-md navbar-dark bg-steel fixed-top">
2727
<div class="container">
28-
<a class="navbar-brand mr-4" href="/">{{ ctfname }}</a>
28+
<a class="navbar-brand mr-4" href="/">{{ organization['ctfname'] }}</a>
2929
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggle" aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation">
3030
<span class="navbar-toggler-icon"></span>
3131
</button>
@@ -78,12 +78,12 @@
7878
</div>
7979
<div class="col-md-4">
8080
<div class="content-section">
81-
<h3>DEFCON 91120</h3>
82-
<p class='text-muted'>Delhi/NCR based DCG
81+
<h3>{{ organization['name'] }}</h3>
82+
<p class='text-muted'>{{ organization['tagline'] }}
8383
<ul class="list-group">
84-
<a target="_blank" href="https://dc91120.org/" class="list-group-item list-group-item-action">Official DC91120 Website</a>
85-
<a target="_blank" href="https://dc91120.org/events.html" class="list-group-item list-group-item-action">Events</a>
86-
<a target="_blank" href="https://dc91120.org/#footer" class="list-group-item list-group-item-action">About Us</a>
84+
<a target="_blank" href="{{ organization['website']['url'] }}" class="list-group-item list-group-item-action">{{ organization['website']['name'] }}</a>
85+
<a target="_blank" href="{{ organization['website_2']['url'] }}" class="list-group-item list-group-item-action">{{ organization['website_2']['name'] }}</a>
86+
<a target="_blank" href="{{ organization['website_3']['url'] }}" class="list-group-item list-group-item-action">{{ organization['website_3']['name'] }}</a>
8787
</ul>
8888
</p>
8989
</div>

src/FlaskRTBCTF/users/routes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from FlaskRTBCTF.users.forms import (RegistrationForm, LoginForm, UpdateAccountForm,
66
RequestResetForm, ResetPasswordForm)
77
from FlaskRTBCTF.users.utils import send_reset_email
8-
from FlaskRTBCTF.config import ctfname
8+
from FlaskRTBCTF.config import organization
99

1010
users = Blueprint('users', __name__)
1111

@@ -28,7 +28,7 @@ def register():
2828
db.session.commit()
2929
flash('Your account has been created! You are now able to log in.', 'success')
3030
return redirect(url_for('users.login'))
31-
return render_template('register.html', title='Register', form=form, ctfname=ctfname)
31+
return render_template('register.html', title='Register', form=form, organization=organization)
3232

3333
@users.route("/login", methods=['GET', 'POST'])
3434
def login():
@@ -44,7 +44,7 @@ def login():
4444
return redirect(next_page) if next_page else redirect(url_for('main.home'))
4545
else:
4646
flash('Login Unsuccessful. Please check username and password.', 'danger')
47-
return render_template('login.html', title='Login', form=form, ctfname=ctfname)
47+
return render_template('login.html', title='Login', form=form, organization=organization)
4848

4949

5050
@users.route("/logout")
@@ -58,7 +58,7 @@ def logout():
5858
@users.route("/account")
5959
@login_required
6060
def account():
61-
return render_template('account.html', title='Account', ctfname=ctfname)
61+
return render_template('account.html', title='Account', organization=organization)
6262

6363

6464
@users.route("/reset_password", methods=['GET', 'POST'])
@@ -71,7 +71,7 @@ def reset_request():
7171
send_reset_email(user)
7272
flash('An email has been sent with instructions to reset your password.', 'info')
7373
return redirect(url_for('users.login'))
74-
return render_template('reset_request.html', title='Reset Password', form=form, ctfname=ctfname)
74+
return render_template('reset_request.html', title='Reset Password', form=form, organization=organization)
7575

7676

7777
@users.route("/reset_password/<token>", methods=['GET', 'POST'])
@@ -93,4 +93,4 @@ def reset_token(token):
9393
flash('Your password has been updated! You are now able to log in', 'success')
9494
return redirect(url_for('users.login'))
9595

96-
return render_template('reset_token.html', title='Reset Password', form=form, ctfname=ctfname)
96+
return render_template('reset_token.html', title='Reset Password', form=form, organization=organization)

0 commit comments

Comments
 (0)