[Checkins] SVN: zope.kgs/trunk/src/zope/kgs/ separate out KGS introduction from front page.

Paul Carduner paulcarduner at gmail.com
Tue Jan 27 07:47:55 EST 2009


Log message for revision 95159:
  separate out KGS introduction from front page.

Changed:
  U   zope.kgs/trunk/src/zope/kgs/site.py
  U   zope.kgs/trunk/src/zope/kgs/template.py
  U   zope.kgs/trunk/src/zope/kgs/templates/index.html
  A   zope.kgs/trunk/src/zope/kgs/templates/intro.html
  D   zope.kgs/trunk/src/zope/kgs/templates/intro.pt
  U   zope.kgs/trunk/src/zope/kgs/templates/master.pt

-=-
Modified: zope.kgs/trunk/src/zope/kgs/site.py
===================================================================
--- zope.kgs/trunk/src/zope/kgs/site.py	2009-01-27 12:47:17 UTC (rev 95158)
+++ zope.kgs/trunk/src/zope/kgs/site.py	2009-01-27 12:47:55 UTC (rev 95159)
@@ -97,7 +97,7 @@
     return {'versions': versions,
             'latest': versions[0],
             'title': set.name,
-            'resourceDir':'resources'}
+            'siteRoot':''}
 
 def generateSite(siteDir, templateDir, force=False):
     # Create some important variables

Modified: zope.kgs/trunk/src/zope/kgs/template.py
===================================================================
--- zope.kgs/trunk/src/zope/kgs/template.py	2009-01-27 12:47:17 UTC (rev 95158)
+++ zope.kgs/trunk/src/zope/kgs/template.py	2009-01-27 12:47:55 UTC (rev 95159)
@@ -69,13 +69,13 @@
                 versionDir = os.path.join(dst, version['name'])
                 newData = copy.deepcopy(data)
                 newData['version'] = version
-                newData['resourceDir'] = '../%s' % newData['resourceDir']
+                newData['siteRoot'] = '../%s' % newData['siteRoot']
                 generateSite(srcPath, versionDir, newData, templates)
         elif os.path.isdir(srcPath):
             if not os.path.exists(dstPath):
                 os.mkdir(dstPath)
             newData = copy.deepcopy(data)
-            newData['resourceDir'] = '../%s' % newData['resourceDir']
+            newData['siteRoot'] = '../%s' % newData['siteRoot']
             generateSite(srcPath, dstPath, newData, templates)
         else:
             shutil.copyfile(srcPath, dstPath)

Modified: zope.kgs/trunk/src/zope/kgs/templates/index.html
===================================================================
--- zope.kgs/trunk/src/zope/kgs/templates/index.html	2009-01-27 12:47:17 UTC (rev 95158)
+++ zope.kgs/trunk/src/zope/kgs/templates/index.html	2009-01-27 12:47:55 UTC (rev 95159)
@@ -5,126 +5,16 @@
   </head>
   <body>
     <span metal:fill-slot="title"><em class="name" tal:replace="title">name</em> Known Good Set</span>
-    <ul class="level-one" metal:fill-slot="left-nav">
-      <li tal:repeat="version versions">
-          <a href="#">Version <span tal:replace="version/name">1</span></a>
-          <ul class="level-two" style="display: none;">
 
-            <li tal:condition="version/announcement/url">
-              <a href="#"
-                 tal:attributes="href version/announcement/url">Announcement</a>
-            </li>
-            <li tal:condition="version/changelog/url">
-              <a href="#"
-                 tal:attributes="href version/changelog/url">Changelog</a>
-            </li>
-            <li tal:repeat="feature version/features">
-              <a href="#"
-                 tal:attributes="href feature/url"
-                 tal:content="feature/title">Feature 1</a>
-            </li>
-            <li tal:replace="nothing">
-              <a href="#">Feature 2</a>
-            </li>
-            <li tal:replace="nothing">
-              <a href="#">Feature 3</a>
-            </li>
-            <li tal:replace="nothing">
-              <a href="#">Feature 4</a>
-            </li>
-          </ul>
-
-      </li>
-      <li>
-          <a href="intro.html">KGS Introduction</a>
-      </li>
-    </ul>
-
     <div metal:fill-slot="content">
-      <h1 id="pageheading">Known Good Sets</h1>
+      <h1 id="pageheading">
+        <span tal:replace="title" />
+        <span tal:replace="latest/name"/> Has Been Released!
+      </h1>
 
-      <h2>Usage</h2>
+      <div tal:content="structure latest/announcement/html"/>
+      <div tal:content="structure latest/changelog/html"/>
 
-      <p>
-        This KGS was designed to work with many of the tools developed to
-        manage and install Python pacakges. The following sub-sections will
-        explain its use in more detail.
-      </p>
-
-      <h3>The Index</h3>
-
-      <p>
-        You can use the index directly. It then behaves exactly like
-        <a href="http://pypi.python.org/simple">http://pypi.python.org/simple</a>,
-        except that only the good versions of the controlled packages are
-        available. The advantage of using the KGS as an index is that you get
-        bug fixes automatically.
-      </p>
-
-      <ul>
-        <li>
-          <div>In <strong>Buildout</strong> you can set this index in your <code>buildout.cfg</code> file:</div>
-          <pre>
-[buildout]
-index = http://download.project.org/kgs
-...</pre>
-        </li>
-        <li>
-          <div>With <strong>SetupTools</strong> you can specify the index as a command line option to the <code>easy_install</code> command:</div>
-          <pre>$ easy_install -i http://download.project.org/kgs mypackage</pre>
-        </li>
-      </ul>
-
-      <h3>Nailed or Pinned Versions</h3>
-
-      <p>
-        When deploying an application, it is often important to nail or pin down
-        the versions of all used packages, so that it can be guaranteed that the
-        setup is identical all the time.
-      </p>
-
-      <ul>
-        <li>
-          <div>In <strong>Buildout</strong>, the versions can be specified in the <code>buildout.cfg</code> file like this by either copying the contents of <code>versions-*.cfg</code> or referencing it with the <code>extends</code> option:</div>
-          <pre>
-[buildout]
-versions = versions
-...
-[version]
-zope.interface = 3.4.0
-&lt;copy the contents of versions-*.cfg here&gt;</pre>
-              or
-          <pre>
-[buildout]
-extends = http://download.project.org/kgs/versions-1.0.0.cfg</pre>
-        </li>
-        <li>
-          <div><strong>SetupTools</strong> itself cannot use the <code>version.cfg</code>
-          file.</div>
-        </li>
-      </ul>
-
-      <h3>Find Links</h3>
-
-      <p>
-        The way of providing the installation tools with additional locations to
-        look for packages is via find links. Those URLs are expected to be an
-        HTML page with links to files or files directly.
-      </p>
-
-      <ul>
-        <li>
-          <div>Buildout, <code>buildout.cfg</code>:</div>
-          <pre>
-[buildout]
-find-links = http://download.project.org/kgs/links.html
-...</pre>
-        </li>
-        <li>
-          <div>Setup Tools, <code>easy_install</code></div>
-          <pre>$ easy_install -f http://download.project.org/kgs/links.html mypackage</pre>
-        </li>
-      </ul>
     </div>
   </body>
 </html>

Added: zope.kgs/trunk/src/zope/kgs/templates/intro.html
===================================================================
--- zope.kgs/trunk/src/zope/kgs/templates/intro.html	                        (rev 0)
+++ zope.kgs/trunk/src/zope/kgs/templates/intro.html	2009-01-27 12:47:55 UTC (rev 95159)
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html metal:use-macro="templates/master.pt/macros/page" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <title metal:fill-slot="page-title">Introduction to the KGS</title>
+  </head>
+  <body>
+    <span metal:fill-slot="title"><em class="name" tal:replace="title">name</em> Known Good Set</span>
+
+    <div metal:fill-slot="content">
+      <h1 id="pageheading">Known Good Sets</h1>
+
+      <h2>Usage</h2>
+
+      <p>
+        This KGS was designed to work with many of the tools developed to
+        manage and install Python pacakges. The following sub-sections will
+        explain its use in more detail.
+      </p>
+
+      <h3>The Index</h3>
+
+      <p>
+        You can use the index directly. It then behaves exactly like
+        <a href="http://pypi.python.org/simple">http://pypi.python.org/simple</a>,
+        except that only the good versions of the controlled packages are
+        available. The advantage of using the KGS as an index is that you get
+        bug fixes automatically.
+      </p>
+
+      <ul>
+        <li>
+          <div>In <strong>Buildout</strong> you can set this index in your <code>buildout.cfg</code> file:</div>
+          <pre>
+[buildout]
+index = http://download.project.org/kgs
+...</pre>
+        </li>
+        <li>
+          <div>With <strong>SetupTools</strong> you can specify the index as a command line option to the <code>easy_install</code> command:</div>
+          <pre>$ easy_install -i http://download.project.org/kgs mypackage</pre>
+        </li>
+      </ul>
+
+      <h3>Nailed or Pinned Versions</h3>
+
+      <p>
+        When deploying an application, it is often important to nail or pin down
+        the versions of all used packages, so that it can be guaranteed that the
+        setup is identical all the time.
+      </p>
+
+      <ul>
+        <li>
+          <div>In <strong>Buildout</strong>, the versions can be specified in the <code>buildout.cfg</code> file like this by either copying the contents of <code>versions-*.cfg</code> or referencing it with the <code>extends</code> option:</div>
+          <pre>
+[buildout]
+versions = versions
+...
+[version]
+zope.interface = 3.4.0
+&lt;copy the contents of versions-*.cfg here&gt;</pre>
+              or
+          <pre>
+[buildout]
+extends = http://download.project.org/kgs/versions-1.0.0.cfg</pre>
+        </li>
+        <li>
+          <div><strong>SetupTools</strong> itself cannot use the <code>version.cfg</code>
+          file.</div>
+        </li>
+      </ul>
+
+      <h3>Find Links</h3>
+
+      <p>
+        The way of providing the installation tools with additional locations to
+        look for packages is via find links. Those URLs are expected to be an
+        HTML page with links to files or files directly.
+      </p>
+
+      <ul>
+        <li>
+          <div>Buildout, <code>buildout.cfg</code>:</div>
+          <pre>
+[buildout]
+find-links = http://download.project.org/kgs/links.html
+...</pre>
+        </li>
+        <li>
+          <div>Setup Tools, <code>easy_install</code></div>
+          <pre>$ easy_install -f http://download.project.org/kgs/links.html mypackage</pre>
+        </li>
+      </ul>
+    </div>
+  </body>
+</html>


Property changes on: zope.kgs/trunk/src/zope/kgs/templates/intro.html
___________________________________________________________________
Added: svn:eol-style
   + native

Deleted: zope.kgs/trunk/src/zope/kgs/templates/intro.pt
===================================================================
--- zope.kgs/trunk/src/zope/kgs/templates/intro.pt	2009-01-27 12:47:17 UTC (rev 95158)
+++ zope.kgs/trunk/src/zope/kgs/templates/intro.pt	2009-01-27 12:47:55 UTC (rev 95159)
@@ -1,153 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-  <head>
-    <title>Introduction to the KGS</title>
-    <link rel="stylesheet" type="text/css" href="resources/style.css" />
-    <script type="text/javascript" language="Javascript"
-            src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
-    <script type="text/javascript" language="Javascript">
-      $(document).ready(
-        function(){
-
-          $("#left-hand-navigation .level-one > li").click(
-            function(){
-              $("#left-hand-navigation .level-one > li").removeClass('selected');
-              $("#left-hand-navigation .level-one > li > a").removeClass('selected');
-              $("#left-hand-navigation .level-two").hide();
-              $(this).children('a').andSelf().addClass('selected').find('.level-two').show();
-            });
-
-          $("#left-hand-navigation .level-one > li").eq(0).click();
-        });
-    </script>
-
-  </head>
-  <body>
-    <h1 id="header">Introduction to the KGS</h1>
-
-    <div id="left-hand-navigation">
-      <!-- Main Menu -->
-      <div id="menu">
-
-        <ul class="level-one">
-
-          <li tal:repeat="version self/versions">
-            <a href="#">Version <span tal:replace="version/name" /></a>
-            <ul class="level-two" style="display: none;">
-              <li tal:repeat="feature version/features">
-                <a href="versions-1.0.0.cfg"
-                   tal:attributes="href feature/url"
-                   tal:content="feature/title">Versions</a>
-              </li>
-            </ul>
-
-          </li>
-
-        </ul>
-      </div>
-    </div>
-
-    <div id="content-body">
-      <div id="body-main">
-
-        <div id="content">
-
-          <h1 id="pageheading">Known Good Sets</h1>
-
-          <h2>Usage</h2>
-
-          <p>
-            This KGS was designed to work with many of the tools developed to
-            manage and install Python pacakges. The following sub-sections will
-            explain its use in more detail.
-          </p>
-
-          <h3>The Index</h3>
-
-          <p>
-            You can use the index directly. It then behaves exactely like
-            <a href="http://pypi.python.org/simple">http://pypi.python.org/simple</a>,
-            except that for the controlled packages only the good versions are
-            available. The advantage of using the KGS as an index is that you get
-            bug fixes automatically.
-          </p>
-
-          <ul>
-            <li>
-              <div>Buildout, <code>buildout.cfg</code>:</div>
-              <pre>
-                [buildout]
-                index = http://download.project.org/kgs
-                ...
-              </pre>
-            </li>
-            <li>
-              <div>Setup Tools, <code>easy_install</code></div>
-              <pre>
-                $ easy_install -i http://download.project.org/kgs mypackage
-              </pre>
-            </li>
-          </ul>
-
-          <h3>Nailed or Pinned Versions</h3>
-
-          <p>
-            When deploying an application, it is often important to nail or pin down
-            the versions of all used packages, so that it can be guaranteed that the
-            setup is identical all the time.
-          </p>
-
-          <ul>
-            <li>
-              <div>Buildout, <code>buildout.cfg</code>:</div>
-              <pre>
-                [buildout]
-                versions = versions
-                ...
-                [version]
-                zope.interface = 3.4.0
-                (copy the content here)
-              </pre>
-              or
-              <pre>
-                [buildout]
-                extends = http://download.project.org/kgs/versions-1.0.0.cfg
-              </pre>
-            </li>
-            <li>
-              <div>Setup Tools itself cannot use the <code>version.cfg</code>
-              file.</div>
-            </li>
-          </ul>
-
-          <h3>Find Links</h3>
-
-          <p>
-            The way of providing the installation tools with additional locations to
-            look for packages is via find links. Those URLs are expected to be an
-            HTML page with links to files or files directly.
-          </p>
-
-          <ul>
-            <li>
-              <div>Buildout, <code>buildout.cfg</code>:</div>
-              <pre>
-                [buildout]
-                find-links = http://download.project.org/kgs/links.html
-                ...
-              </pre>
-            </li>
-            <li>
-              <div>Setup Tools, <code>easy_install</code></div>
-              <pre>
-                $ easy_install -f http://download.project.org/kgs/links.html mypackage
-              </pre>
-            </li>
-          </ul>
-        </div>
-
-      </div>
-    </div>
-
-  </body>
-</html>

Modified: zope.kgs/trunk/src/zope/kgs/templates/master.pt
===================================================================
--- zope.kgs/trunk/src/zope/kgs/templates/master.pt	2009-01-27 12:47:17 UTC (rev 95158)
+++ zope.kgs/trunk/src/zope/kgs/templates/master.pt	2009-01-27 12:47:55 UTC (rev 95159)
@@ -5,7 +5,7 @@
     <title metal:define-slot="page-title">Page Title</title>
     <link rel="stylesheet" type="text/css"
           href="resources/style.css"
-          tal:attributes="href string:${resourceDir}/style.css"/>
+          tal:attributes="href string:${siteRoot}resources/style.css"/>
     <script type="text/javascript" language="Javascript"
             src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
     <script type="text/javascript" language="Javascript">
@@ -32,10 +32,42 @@
       <!-- Main Menu -->
       <div id="menu">
 
-        <div class="level-one" metal:define-slot="left-nav">
+        <ul class="level-one" metal:define-slot="left-nav">
 
+          <li tal:repeat="version versions">
+            <a href="#">Version <span tal:replace="version/name">1</span></a>
+            <ul class="level-two" style="display: none;">
 
-        </div>
+              <li tal:condition="version/announcement/url">
+                <a href="#"
+                   tal:attributes="href version/announcement/url">Announcement</a>
+              </li>
+              <li tal:condition="version/changelog/url">
+                <a href="#"
+                   tal:attributes="href version/changelog/url">Changelog</a>
+              </li>
+              <li tal:repeat="feature version/features">
+                <a href="#"
+                   tal:attributes="href feature/url"
+                   tal:content="feature/title">Feature 1</a>
+              </li>
+              <li tal:replace="nothing">
+                <a href="#">Feature 2</a>
+              </li>
+              <li tal:replace="nothing">
+                <a href="#">Feature 3</a>
+              </li>
+              <li tal:replace="nothing">
+                <a href="#">Feature 4</a>
+              </li>
+            </ul>
+
+          </li>
+          <li>
+            <a href="intro.html">KGS Introduction</a>
+          </li>
+
+        </ul>
       </div>
     </div>
 



More information about the Checkins mailing list