[Cdd-commits] r671 - cdd/trunk/webtools
CDD Subversion Commit
noreply at alioth.debian.org
Fri Apr 4 22:20:56 UTC 2008
Author: tille
Date: Fri Apr 4 22:20:56 2008
New Revision: 671
Added:
cdd/trunk/webtools/tasks_idx.py (contents, props changed)
cdd/trunk/webtools/tasks_idx.xhtml
Modified:
cdd/trunk/webtools/gexample.py
cdd/trunk/webtools/tasks.xhtml
Log:
Start creating the index page
Modified: cdd/trunk/webtools/gexample.py
==============================================================================
--- cdd/trunk/webtools/gexample.py (original)
+++ cdd/trunk/webtools/gexample.py Fri Apr 4 22:20:56 2008
@@ -6,6 +6,7 @@
loader = genshi.template.TemplateLoader('.')
data = dict(
+ css = 'http://cdd.alioth.debian.org/science/inc/style.css',
projectname = 'Debian Med',
projecturl = 'http://debian-med.alioth.debian.org/',
logourl = 'http://people.debian.org/~tille/debian-med/logos/med-06.jpg',
@@ -32,7 +33,9 @@
# Make sure that long description is taken over verbatim because it might
# contain several html tags
-data['tasklongdesc'] = genshi.Markup(data['tasklongdesc'])
+VERBATIM=('tasklongdesc', 'projectadvertising')
+for verbatim in VERBATIM:
+ data[verbatim] = genshi.Markup(data[verbatim])
template = loader.load('tasks.xhtml')
Modified: cdd/trunk/webtools/tasks.xhtml
==============================================================================
--- cdd/trunk/webtools/tasks.xhtml (original)
+++ cdd/trunk/webtools/tasks.xhtml Fri Apr 4 22:20:56 2008
@@ -6,7 +6,7 @@
<head>
<title>$projectname</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
-<link href="imaging.php.xhtml_content/style.css" type="text/css" rel="stylesheet"/>
+<link href="$css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div style="text-align: center;">
Added: cdd/trunk/webtools/tasks_idx.py
==============================================================================
--- (empty file)
+++ cdd/trunk/webtools/tasks_idx.py Fri Apr 4 22:20:56 2008
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+import genshi
+import genshi.template
+
+loader = genshi.template.TemplateLoader('.')
+
+data = dict(
+ gtstrTasksPage = 'Tasks page',
+ gtstrSummary = 'Summary',
+
+ projectname = 'Debian Med',
+ projecturl = 'http://debian-med.alioth.debian.org/',
+ logourl = 'http://people.debian.org/~tille/debian-med/logos/med-06.jpg',
+ projectadvertising = """Help us to see Debian used by medical practicioners and researchers!
+ Join us on the
+ <a href="http://alioth.debian.org/projects/debian-med">Alioth page</a>."""
+ ,
+ tasks = ('Bio', 'Bio-dev', 'Imaging'),
+ taskshortdesc = 'Debian-Med imaging packages',
+ tasklongdesc = """This meta package will install Debian packages which might be useful in medical
+image processing.
+<br/>
+It installs several packages supporting DICOM (Digital Imaging and
+Communications in Medicine) which is the de-facto standard for medical
+image management. The standard defines data structures and services for
+the exchange of medical images and related information. The latest release
+has been published in 2004 and consists of 18 parts.
+<br/>
+For more information, you can visit the NEMA homepage <a href="http://medical.nema.org/">http://medical.nema.org/</a>
+or download the current DICOM standard as PDF files from
+<a href="http://www.dclunie.com/dicom-status/status.html">http://www.dclunie.com/dicom-status/status.html</a> . """,
+ )
+# Make sure that long description is taken over verbatim because it might
+# contain several html tags
+VERBATIM=('tasklongdesc', 'projectadvertising')
+for verbatim in VERBATIM:
+ data[verbatim] = genshi.Markup(data[verbatim])
+
+template = loader.load('tasks_idx.xhtml')
+
+print template.generate(**data).render('xhtml')
Added: cdd/trunk/webtools/tasks_idx.xhtml
==============================================================================
--- (empty file)
+++ cdd/trunk/webtools/tasks_idx.xhtml Fri Apr 4 22:20:56 2008
@@ -0,0 +1,47 @@
+<!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"
+ xmlns:py="http://genshi.edgewall.org/">
+<head>
+<title>$projectname</title>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
+<link href="$css" type="text/css" rel="stylesheet"/>
+</head>
+<body>
+<div style="text-align: center;">
+<a href="$projecturl">
+ <img src="$logourl" alt="$projectname Project"/>
+</a>
+</div>
+<div class="heading" py:if="projectadvertising">
+ <div class="tabBar" style="text-align: center;">$projectadvertising</div>
+</div>
+<table class="columns">
+<tr>
+ <td class="left">
+ <span class="section">$gtstrSummary</span>
+ <div class="section">
+ <div class="sectionTop"></div>
+ <div class="row">
+ <strong>$gtstrTasksPage</strong>
+ </div>
+ </div>
+ </td>
+ <td class="main">
+ <div class="pageBody">
+ <h1>$gtstrTasksPage</h1>
+ <p>
+ This is a list of the Tasks $projectname is made of:
+ </p>
+ <ul>
+ <py:for each="task in tasks">
+ <li>${task}</li>
+ </py:for>
+ </ul>
+ </div>
+ </td>
+</tr>
+</table>
+</body>
+</html>
More information about the Cdd-commits
mailing list