diff examples/tutorial/geddit/templates/layout.html @ 615:06165fee45ab trunk

GenshiTutorial: make URLs dynamic so that the app could theoretically be mounted on some other SCRIPT_NAME.
author cmlenz
date Wed, 29 Aug 2007 20:12:54 +0000
parents 236c351928a2
children 725488d315f3
line wrap: on
line diff
--- a/examples/tutorial/geddit/templates/layout.html
+++ b/examples/tutorial/geddit/templates/layout.html
@@ -7,8 +7,8 @@
       <title py:with="title = list(select('title/text()'))">
         geddit<py:if test="title">: ${title}</py:if>
       </title>
-      <link rel="stylesheet" href="/media/layout.css" type="text/css" />
-      <script type="text/javascript" src="/media/jquery.js"></script>
+      <link rel="stylesheet" href="${url('/media/layout.css')}" type="text/css" />
+      <script type="text/javascript" src="${url('/media/jquery.js')}"></script>
       ${select('*[local-name()!="title"]')}
     </head>
   </py:match>
@@ -16,7 +16,7 @@
   <py:match path="body" once="true">
     <body py:attrs="select('@*')"><div id="wrap">
       <div id="header">
-        <a href="/"><img src="/media/logo.gif" width="201" height="79" alt="geddit?" /></a>
+        <a href="/"><img src="${url('/media/logo.gif')}" width="201" height="79" alt="geddit?" /></a>
       </div>
       <div id="content">
         ${select('*|text()')}
Copyright (C) 2012-2017 Edgewall Software