diff options
Diffstat (limited to 'tbc/templates/base.html')
-rwxr-xr-x | tbc/templates/base.html | 139 |
1 files changed, 90 insertions, 49 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html index a317de5..fb9ae55 100755 --- a/tbc/templates/base.html +++ b/tbc/templates/base.html @@ -2,7 +2,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <title> + <title> {% block title %} Python Textbook Companion Project | FOSSEE, IIT Bombay {% endblock %} @@ -14,8 +14,47 @@ <meta name="author" content=""> {% endblock %} - <link rel="stylesheet" href="{% static 'css/base.css' %}" type="text/css" /> + <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css" /> <link rel ="stylesheet" href="{% static 'css/responsive.css' %}" type="text/css"/> + <style> + .module-list { + float: left; + height: 220px; + margin-top: 20px; + margin-bottom: 20px; + margin-left: 50px; + padding: 10px; + padding-bottom: 25px; + position: relative; + width: 300px; + background: #2c3e50; + } + .module-list img { + height: 220px; + } + .module-list img:hover{ + height: 220px; + border-radius: 15px; + } + + .module-list a{ + color: #ffffff; + } + .navbar .container { + max-width: 1100px; + } + #content-wrap{ + max-width: 1100px; + margin: 0 auto; + } + input[type="text"] { + width: 100%; + } + input[type="password"] { + width: 100%; + } + </style> + {% block css %} <style type="text/css"> body { @@ -30,7 +69,7 @@ </head> <body> -<div class="navbar navbar-inverse navbar-fixed-top"> +<div class="navbar navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> @@ -40,8 +79,8 @@ </button> <a class="brand" href="/">Python Textbook Companion</a> <div class="nav-collapse collapse"> - <ul class="nav"> - <li><a href="#">Internship Forms</a></li> + + <ul class="nav pull-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">About<b class="caret"></b></a> <ul class="dropdown-menu"> @@ -50,46 +89,41 @@ <li><a href="#" target="_blank">Python Team</a></li> </ul> </li> - </ul> - {% if user %} - <div class="btn-group pull-right"> - <button class="btn">{{ user.first_name }} {{ user.last_name }}</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"> - <span class="caret"></span> - </button> - <ul class="dropdown-menu"> - <li><a href="{% url 'tbc:SubmitBook' %}">Submit Book</a></li> - <li><a href="{% url 'tbc:UpdateBook' %}">Update Submission</a></li> - <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> - </ul> - </div> - {% endif %} - {% if reviewer %} - <div class="btn-group pull-right"> - <button class="btn">{{ reviewer.first_name }} {{ reviewer.last_name }}</button> - <button class="btn dropdown-toggle" data-toggle="dropdown"> - <span class="caret"></span> - </button> - <ul class="dropdown-menu"> - <li><a href="{% url 'tbc:BookReview' %}">Review Books</a></li> - <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> - </ul> - </div> - {% endif %} - {% if anonymous %} - <form action="" method="post" class="navbar-form pull-right"> - <button type="button" class="btn" onclick='location.replace("{% url 'tbc:UserLogin' %}");'>Login</button> - <button type="button" class="btn" onclick='location.replace("{% url 'tbc:UserRegister' %}");'>Sign Up</button> - </form> - {% endif %} - + <li><a href="#">Internship Forms</a></li> + + {% if user %} + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.first_name }}<b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:SubmitBook' %}">Submit Book</a></li> + <li><a href="{% url 'tbc:UpdateBook' %}">Update Submission</a></li> + <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> + </ul> + </li> + {% endif %} + + {% if reviewer %} + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ reviewer.first_name }} {{ reviewer.last_name }} <b class="caret"></b></a> + <ul class="dropdown-menu"> + <li><a href="{% url 'tbc:BookReview' %}">Review Books</a></li> + <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li> + </ul> + </li> + {% endif %} + + {% if anonymous %} + <li><a href="{% url 'tbc:UserLogin' %}">Login</a></li> + <li><a href="{% url 'tbc:UserRegister' %}">Sign Up</a></li> + {% endif %} + + </ul> <!--/.nav --> </div><!--/.nav-collapse --> </div> </div> </div> <div class="container"> <!-- Main hero unit for a primary marketing message or call to action --> - <div class="hero-unit"> {% block content %} {% if up %} <p>Book has been uploaded successfully. Please be patient while the reviewer reviews the book</p> @@ -106,20 +140,27 @@ {% if update_book %} <p>Book has been updated successfully </p> {% endif %} + <div class="row-fluid"> - <center><h3>Latest Books</h3></center> - {% for item in items %} - <div class ="module-list"> - <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.title }}</a></center> - <a href="{% url 'tbc:BookDetails' item.book.id %}"><img src="{% static 'uploads/' %}{{ item.image.image }}"></a> - </div> - {% endfor %} + <center><h3>Latest Books</h3></center> + {% for item in items %} + <div class ="module-list"> + <a href="{% url 'tbc:BookDetails' item.book.id %}"><img src="{% static 'uploads/' %}{{ item.image.image }}"></a> + <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.title }}</a></center> + </div> + {% endfor %} </div> + + <br> + + <center> + <a class="btn btn-primary" href="{% url 'tbc:BrowseBooks' %}">Browse All Books</a> + </center> <br> - <hr> - <input type=text> <input type=submit value=Search><a href="{% url 'tbc:BrowseBooks' %}" style="float:right;">Browse All Books</a> + <!-- + <input type=text> <input type=submit value=Search> + --> {% endblock %} - </div> <hr> <footer> |