2012-08-28 21:06:20 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
2012-10-16 06:03:29 +02:00
|
|
|
{# Base template for the whole site. #}
|
2013-02-25 02:59:59 +01:00
|
|
|
{% load compressed %}
|
Reuse minified JS from previous deploys
This is a big change affecting lots of areas:
* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
update-prod-static, is used to copy minified JS from a previous
deploy (i.e., a previous git checkout), if the source files have
not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
than Pipeline's compressed_js
Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.
Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.
(Based on code review, this commit has been revised to:
* Warn if git returns an error in minify-js
* Add missing output redirects in update-prod-static
* Use DEPLOY_ROOT instead of manually constructing that directory
* Use old style formatting)
(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-03 22:42:25 +02:00
|
|
|
{% load minified_js %}
|
2012-10-16 06:03:29 +02:00
|
|
|
|
2012-08-28 21:06:20 +02:00
|
|
|
<head>
|
2012-10-22 20:18:50 +02:00
|
|
|
<meta charset="UTF-8">
|
2013-10-11 22:29:26 +02:00
|
|
|
{% block title %}
|
2013-10-17 17:58:47 +02:00
|
|
|
{% if user_profile.realm.name %}
|
|
|
|
<title>{{user_profile.realm.name}} - Zulip</title>
|
2013-10-11 22:29:26 +02:00
|
|
|
{% else %}
|
|
|
|
<title>Zulip</title>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2012-10-17 19:52:57 +02:00
|
|
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
|
|
<!--[if lt IE 9]>
|
|
|
|
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
|
|
<![endif]-->
|
2013-01-30 21:44:52 +01:00
|
|
|
<link href="/static/favicon.ico?v=2" rel="shortcut icon">
|
2013-05-17 23:32:08 +02:00
|
|
|
|
2013-11-12 18:14:02 +01:00
|
|
|
{% if not enterprise %}
|
2013-10-29 22:21:17 +01:00
|
|
|
<script type="text/javascript">var dropboxAppKey = "{{ dropboxAppKey }}";</script>
|
2013-05-17 23:32:08 +02:00
|
|
|
{# mixpanel #}
|
|
|
|
<script type="text/javascript">
|
2013-06-14 23:16:15 +02:00
|
|
|
(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==
|
|
|
|
typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);
|
|
|
|
b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
|
2013-06-14 23:52:11 +02:00
|
|
|
|
|
|
|
{# You can add {verbose: true} to the second argument of #}
|
|
|
|
{# mixpanel.init to get additional debugging information from it. #}
|
|
|
|
mixpanel.init("{{ mixpanel_token }}", {track_pageview: {{ enable_metrics }}});
|
2013-05-17 23:32:08 +02:00
|
|
|
</script>
|
2013-10-29 22:21:17 +01:00
|
|
|
{% endif %}
|
2013-05-17 23:32:08 +02:00
|
|
|
|
2012-08-28 22:52:23 +02:00
|
|
|
{# We need to import jQuery before Bootstrap #}
|
2013-05-28 21:46:16 +02:00
|
|
|
{% compressed_css 'common' %}
|
2013-05-16 22:42:28 +02:00
|
|
|
{% block page_params %}
|
|
|
|
{# blueslip needs page_params.debug_mode. Set it to false by default. #}
|
|
|
|
<script type="text/javascript">
|
|
|
|
var page_params = {debug_mode: false};
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
2013-06-14 23:52:11 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
page_params.enable_metrics = {{ enable_metrics }};
|
|
|
|
</script>
|
Reuse minified JS from previous deploys
This is a big change affecting lots of areas:
* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
update-prod-static, is used to copy minified JS from a previous
deploy (i.e., a previous git checkout), if the source files have
not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
than Pipeline's compressed_js
Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.
Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.
(Based on code review, this commit has been revised to:
* Warn if git returns an error in minify-js
* Add missing output redirects in update-prod-static
* Use DEPLOY_ROOT instead of manually constructing that directory
* Use old style formatting)
(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-03 22:42:25 +02:00
|
|
|
{% minified_js 'common' %}
|
2012-09-24 17:17:41 +02:00
|
|
|
{% block customhead %}
|
|
|
|
{% endblock %}
|
2012-08-28 21:06:20 +02:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2012-08-28 18:44:51 +02:00
|
|
|
{% block content %}
|
|
|
|
{% endblock %}
|
2012-08-28 21:06:20 +02:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|