Mercurial > agora-palash
annotate templates/base.djhtml @ 102:f872c643b056
Updates to snippet functionality (see details)
Sorry about the large commit, but it was difficult to break it up as a lot
of new functionality was introduced. Most of it is specific to the snippet
feature but there are some other changes as well.
Commit highlights:
* Added the ability to switch the syntax highlighting colour scheme when
viewing a snippet. This is currently done on a per-snippet basis only,
but eventually it will be possible to set a default in your profile to
have all the snippets you view use that colour scheme. There are currently
8 different colour schemes, all of which were taken from the default
pygments stylesheets (some were modified).
* Added a "num_views" field to the Snippet model, with the field being
incremented any time the snippet view is called (raw or regular view).
* Created a simple "explore" view that lists the recently-posted snippets.
Will implement pagination and sorting by other attributes ("popularity",
for example, based on number of views) as well.
* Added a post-save hook to the User model to ensure that a Profile is created
for every user as soon as the User itself is created. This alleviates the
need for a get_profile method that checks if the user has a profile or not
and creates one if necessary. (The code is currently still there, will be
cleaned up soon).
* Added back the wordwrap toggling feature. Currently, if you want to enable
word-wrapping, the line numbers have to be hidden in order to ensure that
the lines and their numbers don't go out of sync. This will be fixed soon.
* History/diff view is back
* And some other minor cosmetic changes.
Note: since some existing models have been changed, you'll likely need to
delete the existing sqlite database before running syncdb. The alternative
is to determine the necessary column changes/additions and run the SQL
query yourself.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Fri, 31 Aug 2012 02:53:22 -0400 |
parents | eaa36eaaf74a |
children | 2bca07be6e51 |
rev | line source |
---|---|
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
4 <head> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
5 <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
6 <meta http-equiv="Content-Language" content="en-us" /> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
7 |
33
28a512881850
Several fixes. See detailed commit message.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
32
diff
changeset
|
8 <title>Agora Octave — |
23
d9658d30b814
Implement initial user registration and authentication. Still way buggy.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
9 {% block title %} |
35
290dd9208cc4
Implement editing user profiles and fix bugs related to the login/logout buttons. Implement 403 exception
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
33
diff
changeset
|
10 Free your numbers! |
23
d9658d30b814
Implement initial user registration and authentication. Still way buggy.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
11 {% endblock %} |
d9658d30b814
Implement initial user registration and authentication. Still way buggy.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
12 </title> |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
13 |
9
2da64c6aa689
Begin implementing Fotios' design
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
14 <meta name="Copyright" content="Agora Octave is free software |
2da64c6aa689
Begin implementing Fotios' design
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
15 under the Affero General Public License version 3 as published by |
2da64c6aa689
Begin implementing Fotios' design
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
16 the Free Software Foundation, or at your option, any later |
2da64c6aa689
Begin implementing Fotios' design
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
17 version" /> |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
18 |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
19 <meta name="keywords" content="Octave, mathematics, numerical |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
20 analysis, open source, free software, Agora" /> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
21 |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
22 <meta name="description" content="Agora Octave is a website that |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
23 enables collaboration with Octave-related personal projects and |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
24 code" /> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
25 |
80
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
26 <link href="/static/css/imports.less" |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
27 rel="stylesheet/less" type="text/css" media="screen" /> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
28 |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
29 <script src="/static/js/less.min.js" type="text/javascript"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
30 </script> |
23
d9658d30b814
Implement initial user registration and authentication. Still way buggy.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
17
diff
changeset
|
31 {% block extrahead %}{% endblock %} |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
32 </head> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
33 |
33
28a512881850
Several fixes. See detailed commit message.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
32
diff
changeset
|
34 <body id="{% block sectionid %}generic{% endblock %}" |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
35 class="{% block coltype %}default{% endblock %}"> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
36 |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
37 <div id="container"> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
38 <div id="header"> |
80
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
39 <div class="wrap"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
40 <a href="{% url home %}"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
41 <img src="/static/img/logo.png" alt="Agora Octave" class="logo"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
42 </a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
43 <ul class="nav"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
44 <li><a href="{% url code %}" class="code">Code</a></li> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
45 <li><a href="{% url discuss %}" class="discuss">Discuss</a></li> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
46 <li><a href="{% url help %}" class="help">Help</a></li> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
47 <li><a href="{% url about %}" class="about">About</a></li> |
9
2da64c6aa689
Begin implementing Fotios' design
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
48 </ul> |
2da64c6aa689
Begin implementing Fotios' design
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
8
diff
changeset
|
49 </div> |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
50 </div> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
51 <!-- END Header --> |
80
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
52 {% block billboard %}<div id="header-below"></div>{% endblock %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
53 <div id="content"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
54 {% block navbar %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
55 <div id="breadcrumbs"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
56 <div class="right-float"> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
57 {% if user.is_authenticated %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
58 <a href="{% url auth_logout %}">Logout</a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
59 :: |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
60 <a href="{% url edit_profile %}">Account settings</a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
61 :: |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
62 <a href="{% url show_profile user %}">View your profile ({{ user }})</a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
63 {% else %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
64 <a href="{% url auth_login %}?next={{ request.path }}">Login</a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
65 :: |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
66 <a href="{% url registration_register %}">Register</a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
67 {% endif %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
68 </div> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
69 <div> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
70 {% block breadcrumbs %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
71 |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
72 {% endblock %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
73 </div> |
33
28a512881850
Several fixes. See detailed commit message.
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
32
diff
changeset
|
74 </div> |
80
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
75 {% endblock %} |
17
cb9a7c6c3800
Implement rounded boxes and titles for holding content
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
15
diff
changeset
|
76 |
80
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
77 {% block content %} |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
78 {% endblock %} |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
79 </div> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
80 <!-- END #content --> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
81 </div> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
82 <!-- END #container --> |
31
b2fd20d03fb4
CSS hack to make the footer stick to the bottom
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
83 <div id="footer"> |
b2fd20d03fb4
CSS hack to make the footer stick to the bottom
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
84 <p id="copyright"> |
b2fd20d03fb4
CSS hack to make the footer stick to the bottom
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
85 © 1998-{% now "Y"%} |
b2fd20d03fb4
CSS hack to make the footer stick to the bottom
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
86 <a href="http://www.gnu.org/software/octave/acknowledgments.html"> |
b2fd20d03fb4
CSS hack to make the footer stick to the bottom
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
87 John W. Eaton and others</a> unless otherwise noted. |
80
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
88 :: |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
89 Help us build this site! Clone the |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
90 <a href="http://inversethought.com/hg/hgwebdir.cgi/agora/">source</a> |
eaa36eaaf74a
Start integration of new design
dellsystem <ilostwaldo@gmail.com>
parents:
71
diff
changeset
|
91 and start contributing. :: About |
31
b2fd20d03fb4
CSS hack to make the footer stick to the bottom
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
23
diff
changeset
|
92 </p> |
102
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
80
diff
changeset
|
93 </div> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
80
diff
changeset
|
94 <!-- END #footer --> |
f872c643b056
Updates to snippet functionality (see details)
dellsystem <ilostwaldo@gmail.com>
parents:
80
diff
changeset
|
95 <script src="/static/js/jquery.min.js"></script> |
47
139e4b8ffb17
Fix display of js code and copy-pastability of displayed code
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
96 {% block script_footer %} |
139e4b8ffb17
Fix display of js code and copy-pastability of displayed code
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
42
diff
changeset
|
97 {% endblock %} |
7
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
98 </body> |
6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents:
diff
changeset
|
99 </html> |