summaryrefslogtreecommitdiffstats
path: root/forum/skins/default/templates/base.html
blob: dd7c60837dc7c5148a2433bae3bce1fc248b0706 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- template base.html -->
{% load extra_filters %}
{% load extra_tags %}
{% load smart_if %}
{% load i18n %}
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE }}</title>
        {% spaceless %}
        {% block meta %}{% endblock %}
        {% block meta_description %}
        <meta name="description" content="{{settings.APP_DESCRIPTION}}" />
        {% endblock %}
        {% endspaceless %}
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="keywords" content="{%block keywords%}{%endblock%},{{settings.APP_KEYWORDS}}" />
        {% if settings.GOOGLE_SITEMAP_CODE %}
        <meta name="google-site-verification" content="{{settings.GOOGLE_SITEMAP_CODE}}" />
        {% endif %}
        <link rel="shortcut icon" href="{% media  "/media/images/favicon.gif" %}" />
        <link href="{% media  "/media/style/style.css" %}" rel="stylesheet" type="text/css" />
        <script src="http://www.google.com/jsapi" type="text/javascript"></script>
        <script type="text/javascript">google.load("jquery", "1.2.6");</script>
        <script type="text/javascript">
            var i18nLang = '{{settings.LANGUAGE_CODE}}';
            var scriptUrl = '/{{settings.FORUM_SCRIPT_ALIAS}}'
            var askbotSkin = '{{settings.ASKBOT_DEFAULT_SKIN}}';
        </script>
        <script type='text/javascript' src='{% media  "/media/js/com.cnprog.i18n.js" %}'></script>
        <script type='text/javascript' src='{% media  "/media/js/jquery.i18n.js" %}'></script>
        <script type='text/javascript' src='{% media  "/media/js/com.cnprog.utils.js" %}'></script>
        {% if user_messages %}
        <style type="text/css">
            body { margin-top:2.4em; }
        </style>
        <script type="text/javascript">
            $(document).ready(function() {
                $('#validate_email_alert').click(function(){notify.close(true)})
                notify.show();
            });
        </script>
        {% endif %}
        {% if active_tab != "tags" and active_tab != "users" %}
        {% comment %}start asking question with title from search query{% endcomment %}
        <script type="text/javascript">
            $(document).ready(function(){
                $('#nav_ask').click(
                    function(){
                        var starting_title = $('#keywords').attr('value');
                        var new_url = $(this).attr('href') + '?title=' + starting_title;
                        window.location.href = new_url;
                        return false;
                    }
                );
            });
        </script>
        {% comment %}focus input on the search bar{% endcomment %}
        <script type="text/javascript">
            $(document).ready(function() {
                {% if active_tab != "ask" %}
                    $('#keywords').focus();
                {% else %}
                    $('#id_title').focus();
                {% endif %}
            });
        </script>
        {% endif %}
        {% block forejs %}
        {% endblock %}
    </head>
    <body>
        <div class="notify" style="display:none">
            {% autoescape off %}
                {% if user_messages %}
                    {% for message in user_messages %}
                          <p class="darkred">{{ message }}</p>
                    {% endfor %}
                {% endif %}
            {% endautoescape %}
            <a id="close-notify" onclick="notify.close(true)">&times;</a>
        </div>
        {% include "header.html" %}
        <div id="wrapper">
            <div id="room">
                <div id="CALeft">
                    {% include "input_bar.html" %}
                    {% block content%}
                    {% endblock%}

                </div>
                <div id="CARight">
                    {% block sidebar%}
                    {% endblock%}

                </div>
                <div id="tail" style="clear:both;">
                    {% block tail %}
                    {% endblock %}
                </div>
            </div>
            <div class="spacer3"></div>
        </div>
        {% include "footer.html" %}
        {% block endjs %}
        {% endblock %}
    </body>
</html>
<!-- end template base.html -->