10000 Made the layout better · code93/trantor-bootcamp@961289b · GitHub
[go: up one dir, main page]

Skip to content

Commit 961289b

Browse files
committed
Made the layout better
Only login and Homepage feature, adjusted the Registration box, Added Bootstrap to the Signout and added Footer.
1 parent beab93f commit 961289b

File tree

11 files changed

+64
-55
lines changed

11 files changed

+64
-55
lines changed
1 Byte
Binary file not shown.

Project/Website/app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@
2424
def create_all():
2525
db.create_all()
2626

27-
@app.route('/blogs')
27+
@app.route('/dashboard')
2828
@login_required
2929
def blog():
30-
return render_template('blogs.html')
30+
return render_template('dashboard.html')
3131

3232

3333
@app.route('/login', methods = ['POST', 'GET'])
3434
def login():
3535
if current_user.is_authenticated:
36-
return redirect('/blogs')
36+
return redirect('/dashboard')
3737

3838
if request.method == 'POST':
3939
email = request.form['email']
4040
user = UserModel.query.filter_by(email = email).first()
4141
if user is not None and user.check_password(request.form['password']):
4242
login_user(user)
43-
return redirect('/blogs')
43+
return redirect('/dashboard')
4444

4545
return render_template('login.html')
4646

@@ -68,13 +68,13 @@ def register():
6868
@app.route('/logout')
6969
def logout():
7070
logout_user()
71-
return redirect('/blogs')
71+
return redirect('/')
7272

7373

7474

7575
@app.route("/")
7676
def index():
77-
return render_template("index.html")
77+
return render_template("Homepage.html")
7878

7979
@app.route("/Homepage")
8080
def Homepage():
-7.47 KB
Binary file not shown.

Project/Website/static/green code.jpg

-38 KB
Binary file not shown.

Project/Website/templates/Homepage.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@
55
<h1 >
66
Homepage
77
</h1>
8+
<article>
9+
<h2>About</h2>
10+
<p>After all, the primary challenge is not so much in the
11+
hardware, or the physical form of the systems of
12+
intercommunication and interaction around which society develops.
13+
The important work is in developing the social forms of use of
14+
this technology which forwards the common good as well as that of
15+
the individual. New ways of thinking, as Einstein said, are the
16+
urgently needed ingredient for the humanization and survival of
17+
society. </p>
18+
<p>This Website Aims on developing Interactive LambdaMOO like virtual Space
19+
that not only allows Communication and formation of Communities but also
20+
allows Real Utilities which can be developed by the Users themselves as Features,
21+
to be able to make their own Virtual Spaces linked together to a Global Virtual Space.
22+
</p>
23+
</article>
24+
825
</div>
926

1027

Project/Website/templates/Login.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ <h2>Login</h2>
66
<form class="form-horizontal" action="" method = "POST">
77

88
<div class="form-group">
9-
10-
<input type = "email" name = "email" placeholder="Email"/>
9+
<span><i class="glyphicon glyphicon-user"></i></span>
10+
<input type = "email" name = "email" placeholder="Email" required="required" />
1111
</div>
1212
<div class="form-group">
13-
14-
<input type = "password" name = "password" placeholder="Email"/>
13+
<span ><i class="glyphicon glyphicon-lock"></i></span>
14+
<input type = "password" name = "password" placeholder="Email" required="required"/>
1515
</div>
1616
<div class="form-group">
17-
<div class="col-sm-offset-2 col-sm-10">
17+
<div class="form-group">
1818
<button type="submit" class="btn btn-default">Submit</button>
1919
</div>
2020
</div>
2121
</form>
2222

23-
<h3>Dont Have an account??</h3>
24-
<h3><a href = "{{url_for('register') }}">Register Here</a></h3>
23+
<h4>Dont Have an account??</h4>
24+
<h4><a href = "{{url_for('register') }}">Register Here</a></h4>
2525
</div>
2626
{% endblock %}

Project/Website/templates/blogs.html

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% extends "layout.html" %}
2+
{% block dashboard %}
3+
<div>
4+
<h2>Welcome to the Dashboard</h2>
5+
6+
<h3>Hi {{ current_user.username }}</h3>
7+
8+
</div>
9+
10+
{% endblock %}

Project/Website/templates/index.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,6 @@
33
{% block body %}
44

55

6-
<article>
7-
<h1>About</h1>
8-
<p>After all, the primary challenge is not so much in the
9-
hardware, or the physical form of the systems of
10-
intercommunication and interaction around which society develops.
11-
The important work is in developing the social forms of use of
12-
this technology which forwards the common good as well as that of
13-
the individual. New ways of thinking, as Einstein said, are the
14-
urgently needed ingredient for the humanization and survival of
15-
society. </p>
16-
<p>This Website Aims on developing Interactive LambdaMOO like virtual Space
17-
that not only allows Communication and formation of Communities but also
18-
allows Real Utilities which can be developed by the Users themselves as Features,
19-
to be able to make their own Virtual Spaces linked together to a Global Virtual Space.
20-
</p>
21-
</article>
226

237

248

Project/Website/templates/layout.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@
1111

1212
<title>Cyberspace Gateway</title>
1313
</head>
14-
<div class="container">
14+
<div class="container-fluid">
1515
<div class="jumbotron text-center">
1616
<nav class="navbar navbar-inverse navbar-fixed-top">
1717
<div class="container-fluid">
1818
<div class="navbar-header">
19-
<a class="navbar-brand" href="#">Cyberspace Gateway</a>
19+
<a class="navbar-brand" href="Homepage">Cyberspace Gateway</a>
2020
</div>
21-
<ul class="nav navbar-nav">
22-
<li class="active"><a href="#">Home</a></li>
23-
<li><a href="Homepage">Homepage</a></li>
24-
<li> <a href="login">Login</a></li>
25-
<li><a href="register">Sign Up</a></li>
26-
<li><a href="blogs">Blogs</a></li>
27-
<li><a href="Contact">Contact</a></li>
21+
<ul class="nav navbar-nav ">
22+
{% if not current_user.is_authenticated %} <li class="active"> <a href="login">Login</a></li>{% endif %}
23+
{% if current_user.is_authenticated %}<li><a href="dashboard"></span>Dashboard</a></li>{% endif %}
24+
{% if current_user.is_authenticated %}<li><a href="logout"><span class="glyphicon glyphicon-user"></span B493 >Logout</a></li>{% endif %}
25+
2826
</ul>
2927
</div>
3028

@@ -34,10 +32,17 @@
3432
{% block Homepage %}{% endblock %}
3533
{% block register %}{% endblock %}
3634
{% block login %}{% endblock %}
37-
35+
{% block dashboard %}{% endblock %}
3836
{% block body %}{% endblock %}
3937

4038
</body>
39+
40+
<nav class="navbar navbar-inverse navbar-fixed-bottom">
41+
<div class="container-fluid">
42+
<h3> contact me: shubhambirmi@hotmail.com </h3>
43+
</div>
44+
</nav>
45+
4146
</div>
4247
</div>
4348
<script>

0 commit comments

Comments
 (0)
0