[Commits] python.it commit r273 -
code/pythonisti/trunk/pythonisti/templates
commit a svn.python.it
commit a svn.python.it
Lun 22 Gen 2007 16:26:22 CET
Author: rhymes
Date: Mon Jan 22 16:26:19 2007
New Revision: 273
Modified:
code/pythonisti/trunk/pythonisti/templates/base.html
code/pythonisti/trunk/pythonisti/templates/index.html
Log:
some tweaks to the template
Modified: code/pythonisti/trunk/pythonisti/templates/base.html
==============================================================================
--- code/pythonisti/trunk/pythonisti/templates/base.html (original)
+++ code/pythonisti/trunk/pythonisti/templates/base.html Mon Jan 22 16:26:19 2007
@@ -8,11 +8,15 @@
<!-- <link rel="icon" href="./i/favicon.gif" type="image/gif" /> -->
<link rel="stylesheet" href="/media/s/site.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/media/s/layout.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/media/s/home.css" type="text/css" media="screen" />
+ {% block css_head %}
+ <link rel="stylesheet" href="/media/s/home.css" type="text/css" media="screen" />
+ {% endblock %}
{% block js_head %}<!-- js links go here -->{% endblock %}
</head>
-<body onload="load()" onunload="GUnload()">
+{% block body_start_tag %}
+<body onload="load()" onunload="GUnload()">
+{% endblock %}
<a class="hidden" href="#content">Skip to page contents</a>
<div id="main">
<div id="header">
@@ -25,10 +29,10 @@
</ul>
<ul id="main-nav" class="clear-float">
- <li class="current"><a href="#">Home</a>
+ <li class="current"><a href="/">Home</a>
</li>
- <li id="li-xxx"><a href="#">Menu 2</a>
+ <li id="li-xxx"><a href="/user/add">Signup!</a>
</li>
<li id=""><a href="#">Menu 3</a>
</li>
@@ -48,31 +52,12 @@
<div id="content">
- <div class="clear-float">
-
- <div id="map" class="double-col">
- {% block map %}
- <p>{% trans "Map goes here." %}</p>
- {% endblock %}
- </div>
-
- <div class="double-col last">
- <div id="splash" class="clear-float">
- <!--
- TAGS GOES HERE
- -->
- <p>{% trans "Tags goes here." %}</p>
- </div>
-
- <!-- /double-col -->
- </div>
-
- <!-- /clear-float -->
- </div>
-
<!--
Other stuff
-->
+ {% block content %}
+
+ {% endblock %}
<!-- /content -->
</div>
Modified: code/pythonisti/trunk/pythonisti/templates/index.html
==============================================================================
--- code/pythonisti/trunk/pythonisti/templates/index.html (original)
+++ code/pythonisti/trunk/pythonisti/templates/index.html Mon Jan 22 16:26:19 2007
@@ -5,41 +5,58 @@
type="text/javascript"></script>
<script src="/media/j/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
- //<![CDATA[
- var center = {{ center }};
- var zoom = {{ zoom }};
-
+ //<![CDATA[
function load() {
- $.getJSON("/geo/json", fillMap);
+ $.getJSON("/geo/json", fillMap);
}
function fillMap(locations) {
- if (GBrowserIsCompatible()) {
+ var center = {{ center }};
+ var zoom = {{ zoom }};
- var map = new GMap2(document.getElementById("map"));
- map.addControl(new GSmallMapControl());
- map.addControl(new GMapTypeControl());
- map.setCenter(new GLatLng(center[1], center[0]), zoom);
+ if (GBrowserIsCompatible()) {
+ var map = new GMap2(document.getElementById("map"));
+ map.addControl(new GSmallMapControl());
+ map.addControl(new GMapTypeControl());
+ map.setCenter(new GLatLng(center[1], center[0]), zoom);
- /* Define a custom marker function, that adds an info window
- about the pythonista */
- function createMarker(point, i) {
- var marker = new GMarker(point);
- GEvent.addListener(marker, "click", function() {
- info = locations[i]["info"]
- marker.openInfoWindowHtml("<strong>" + info + "</strong>");
- });
- return marker;
- }
+ // Define a custom marker function, that adds an info window
+ // about the pythonista
+ function createMarker(point, i) {
+ var marker = new GMarker(point);
+ GEvent.addListener(marker, "click", function() {
+ info = locations[i]["info"]
+ marker.openInfoWindowHtml(
+ "<strong>" + info + "</strong>");
+ });
+ return marker;
+ }
- // Add the pythonisti markers
- for (var i = 0, n = locations.length; i < n; i++) {
- var location = locations[i]["location"];
- var point = new GLatLng(location[1], location[0]);
- map.addOverlay(createMarker(point, i));
+ // add the markers
+ for (var i = 0, n = locations.length; i < n; i++) {
+ var location = locations[i]["location"];
+ var point = new GLatLng(location[1], location[0]);
+ map.addOverlay(createMarker(point, i));
+ }
}
- }
}
- //]]>
+ //]]>
</script>
{% endblock %}
+
+{% block content %}
+ <div class="clear-float">
+ <div id="map" class="double-col">
+ {% block map %}
+ {% endblock %}
+ </div>
+
+ <div class="double-col last">
+ <div id="splash" class="clear-float">
+ <!-- TAGS GO HERE -->
+ </div>
+ <!-- /double-col -->
+ </div>
+ <!-- /clear-float -->
+ </div>
+{% endblock %}
Maggiori informazioni sulla lista
Commits