summaryrefslogtreecommitdiff
path: root/base.html
blob: e47cbf66b3d55016da1357b5ae8ce872989badfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
{% load static %}
{% load taggit_templatetags2_tags %}
<!DOCTYPE html>
<html lang="en">
  <head>
        <title>
       {% block title %}
       Python Textbook Companion Project | FOSSEE, IIT Bombay
       {% endblock %}
     </title>
   {% block meta %}
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
   {% endblock %}
   
   <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css" /> 
   <link rel ="stylesheet" href="{% static 'css/responsive.css' %}" type="text/css"/>
<style>
.showonhover .hovertext { display: none;}
.showonhover:hover .hovertext {display: inline;}
a.viewdescription {color:#999;}
a.viewdescription:hover {background-color:#999; color: White;}
.hovertext {position:absolute;z-index:1000;border:1px solid #ffd971;background-color:#fffdce;padding:11px;width:250px;font-size: 0.75em;}
</style>    
<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%;
        }
        .gsc-search-button,
        .gsc-clear-button {
            position: relative;
            top: -2px;
        }
       .badge-custom {
            padding: 1.5px 7px 1.5px;
            font-size: 12.025px;
            font-weight: bold;
            white-space: nowrap;
            color: #ffffff;
            background-color: #f89406;
            -webkit-border-radius: 9px;
            -moz-border-radius: 9px;
            border-radius: 15px;
        }

        .tooltip-inner {
            background-color: #1ABC9C;
            width: 150px;
        }

        .tooltip.bottom .tooltip-arrow {
            border-bottom: 5px solid #1ABC9C;
        }
    </style>
<style>
      
span.question {
  cursor: pointer;
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #89A4CC;
  line-height: 16px;
  color: White;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  text-align: center;
  position: relative;
}
span.question:hover { background-color: #3D6199; }

    </style>
   {% block css %}
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
    </style>
   {% endblock %}
   </head>

<body>
<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">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="/">Python Textbook Companion <sup><span style="font-size:12px; color: white;">beta</span></sup></a>
          <div class="nav-collapse collapse">

            <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">
                  <li><a href="{% url 'tbc:AboutPytbc' %}">TBC Coding Guidelines</a></li>
                  <li><a href="http://fossee.in" target="_blank">FOSSEE</a></li>
                  <li><a href="http://python.fossee.in" target="_blank">Python Team</a></li>
                </ul>
              </li>
	            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Textbooks<b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="{% url 'tbc:CompletedBooks' %}">Completed Books</a></li>
                  <li><a href="{% url 'tbc:BooksUnderProgress' %}">Books Under Progress</a></li>
                </ul>
              </li>
              <li><a href="{% url 'tbc:InternshipForms' %}">Internship Forms</a></li>

            {% if user %}
                {% if proposal_position %}
                     <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.first_name }}<span class="badge-custom" rel="tooltip" title="Pending Proposal Position: {{ proposal_position }}" data-placement="bottom" style="margin-left:5px; margin-right:5px; display: inline-block">{{ proposal_position }}</span>
                        <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                          <li><a href="{% url 'tbc:SubmitBook' %}">Submit Book (OLD)</a></li>
                          <li><a href="{% url 'tbc:ListAICTE' %}">Submit Proposal</a></li>
                          <li><a href="{% url 'tbc:SubmitSample' %}">Submit Sample Notebook</a></li>
                          <li><a href="{% url 'tbc:ConfirmBookDetails' %}">Submit Codes</a></li>
                          <li><a href="{% url 'tbc:GetCertificate' %}">Get Certificate</a></li>
                          <li><a href="{% url 'tbc:UpdateProfile' %}">Update Profile</a></li>
                          <li><a href="{% url 'tbc:UpdatePassword' %}">Update Password</a></li>
                          <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li>
                        </ul>
                     </li>
                {% else %}
                     <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 (OLD)</a></li>
                          <li><a href="{% url 'tbc:ListAICTE' %}">Submit Proposal</a></li>
                          <li><a href="{% url 'tbc:SubmitSample' %}">Submit Sample Notebook</a></li>
                          <li><a href="{% url 'tbc:ConfirmBookDetails' %}">Submit Codes</a></li>
                          <li><a href="{% url 'tbc:GetCertificate' %}">Get Certificate</a></li>
                          <li><a href="{% url 'tbc:UpdateProfile' %}">Update Profile</a></li>
                          <li><a href="{% url 'tbc:UpdatePassword' %}">Update Password</a></li>
                          <li><a href="{% url 'tbc:UserLogout' %}">Logout</a></li>
                        </ul>
                     </li>
                {% endif %}
            {% 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:ReviewProposals' %}">Review Proposals</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">
	{% block content %}
	{% if up %}
        <center>
            <div class="alert" style="width:500px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>Book has been uploaded successfully !</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if login %}
        <center>
            <div class="alert" style="width:150px;height:23px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>Login Successful !</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if logout %}
        <center>
            <div class="alert" style="width:300px;height:23px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>You have logged out successfully !</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if update_book %}
        <center>
            <div class="alert" style="width:300px;height:23px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>Book has been updated successfully !</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if not_found %}
        <center>
            <div class="alert" style="width:650px;height:23px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>It seems that currently there is no book that you can update ! Please submit one.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if proposal_submitted %}
        <center>
            <div class="alert" style="width:650px;height:40px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>Thank you for showing interest in contributing to Python TBC. <br>We have received your proposal. Please be patient we will get back to you within few days.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if proposal_pending %}
        <center>
            <div class="alert" style="width:650px;height:40px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>You either have a proposal pending or you are already working on a book. You cannot submit a proposal at this moment.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if book_pending %}
        <center>
            <div class="alert" style="width:650px;height:40px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>You either have a proposal pending or you are already working on a book. You cannot submit a proposal at this moment.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if no_book_alloted %}
        <center>
            <div class="alert" style="width:400px;height:25px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>There is no book alloted to you. You cannot submit codes.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if sample_notebook %}
        <center>
            <div class="alert" style="width:550px;height:40px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>Sample notebook has been submitted successfully. Please be patient while the reviewer reviews your codes & get backs to you.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if cannot_submit_sample %}
        <center>
            <div class="alert" style="width:400px;height:25px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>You have not been permitted to send sample notebook.</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    {% if bookupdate %}
        <center>
            <div class="alert" style="width:400px;height:25px;">
                <a class="close" data-dismiss="alert" href="#">&times;</a>
                <p>Thank You ! Codes have been updated successfully !</p>
            </div>
        </center>
        <div class="clearfix"></div>
    {% endif %}
    
<div class="row-fluid">
 <h3 style='float: left;margin-left: 50px; display: inline-block;'>Editors' Picks</h3>
<div style="float:right; margin-right: 50px; width: 400px;"><gcse:search></gcse:search>
    </div>
<td>

    <span class="showonhover">
     <span class="question">?</span>
        <span class="hovertext">
            Minimum or NO trivial examples<br>
            Maximum usage of scientific libraries
        </span>
    </span>
</td>
      {% get_taglist as tags for 'tbc.book' %}
 <div style="clear:both;"></div>
      {% for item in items %}
       {% if item.book.tags.all %}
<div class ="module-list">
                <a href="{% url 'tbc:BookDetails' item.book.id %}"><img src="{% static 'Python-Textbook-Companions/' %}{{ item.image.image }}"></a>
                <center><a href="{% url 'tbc:BookDetails' item.book.id %}">{{ item.book.title }}</a></center>
            </div>
      {% endif %}
   {% endfor %}


</div>



    <div class="row-fluid">
    <h3 style='float: left;margin-left: 50px; display: inline-block;'>Recent Submissions</h3>
    <div style="float:right; margin-right: 50px; width: 400px;">
        <script>
          (function() {
            var cx = '001620609421546248003:nyipppxclkw';
            var gcse = document.createElement('script');
            gcse.type = 'text/javascript';
            gcse.async = true;
            gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
                '//www.google.com/cse/cse.js?cx=' + cx;
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(gcse, s);
          })();
        </script>
        
    </div>
    <div style="clear:both;"></div>
        {% for item in items|slice:":3" %}
            <div class ="module-list">
                <a href="{% url 'tbc:BookDetails' item.book.id %}"><img src="{% static 'Python-Textbook-Companions/' %}{{ 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>
    <!-- 
        <input type=text> <input type=submit value=Search>
    -->
 
    
    {% endblock %}
      <hr>
      
      <footer>
        <center><p>&copy; FOSSEE - IIT Bombay 2014</p></center>
        <center><img src="{% static 'images/fossee.png' %}" width=100 height=70><br><br>
        <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</center>
      </footer>

    </div> <!-- /container -->
    
    <script src="{% static 'js/jquery.js' %}"></script>
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
    {% block script %}
    {% endblock %}

    <!-- google analytics -->
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-10406287-2', 'fossee.in');
      ga('send', 'pageview');
    </script>
    <!-- / google analytics -->
    <!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.spoken-tutorial.org/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', 15]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
    g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<script type="text/javascript">
  $(document).ready(function(){
    $("[rel=tooltip]").tooltip();
  });
</script>
<noscript><p><img src="http://analytics.spoken-tutorial.org/piwik.php?idsite=15" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

</body>
</html>