summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2011-02-15 01:16:18 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2011-02-15 01:16:18 +0100
commit6040154bde912222528cd84b0d8bec7bc60bb65a (patch)
tree90441a1d48ca6e05fd99df053a7e0cce4dfce806
parent0efc1162f77bcea770f72dbe8db1caafa8090e66 (diff)
downloadweb-6040154bde912222528cd84b0d8bec7bc60bb65a.tar.gz
web-6040154bde912222528cd84b0d8bec7bc60bb65a.tar.bz2
web-6040154bde912222528cd84b0d8bec7bc60bb65a.zip
More of this w3c stuff
-rw-r--r--controller.py2
-rw-r--r--templates/page.mako8
-rw-r--r--templates/pages/index.mako6
-rw-r--r--templates/root.mako5
4 files changed, 12 insertions, 9 deletions
diff --git a/controller.py b/controller.py
index 894cd42..f24b435 100644
--- a/controller.py
+++ b/controller.py
@@ -9,7 +9,7 @@ class Page:
All the general and simple pages.
"""
def GET(self, name = '/'):
- web.header("Content-Type", "application/xhtml+xml;;charset=utf-8", unique = True)
+ web.header("Content-Type", "text/html;charset=utf-8", unique = True)
if not name or name == '/': name = 'index'
return render(name)
diff --git a/templates/page.mako b/templates/page.mako
index aa2aa51..1a43d49 100644
--- a/templates/page.mako
+++ b/templates/page.mako
@@ -1,4 +1,5 @@
<%!
+ trans = {ord(" "):u"-", ord("/"):"-", ord("(") : None, ord(")"):None}
title = ""
uses_toc = False
%>
@@ -24,15 +25,16 @@ ${page_text}
<%
if self.attr.uses_toc:
c = capture(caller.body)
- name = c.replace(" ", "_").replace("/", "_").lower()
+ name = c.translate(trans)
tlist = getattr(self.attr, "tlist", [])
tlist.append((str(name), str(c)))
self.attr.tlist = tlist
+ id_tag = "id=\"%s\"" % name
else:
- name = "#"
+ id_tag = ''
%>
- <${tag}><a name="${name}"><span class="hstart">» </span></a>${caller.body()}</${tag}>
+ <${tag}><a ${id_tag}><span class="hstart">» </span></a>${caller.body()}</${tag}>
</%def>
<%def name="toc()">
diff --git a/templates/pages/index.mako b/templates/pages/index.mako
index 02d4a48..9922178 100644
--- a/templates/pages/index.mako
+++ b/templates/pages/index.mako
@@ -39,8 +39,8 @@ emerge -av portato
<%self:h2>Forums</%self:h2>
<p>
- This project itself does not have any forums. But there are a couple of threads in other forums:<br>
- If you are using Gentoo look into <a href="http://forums.gentoo.org/viewtopic-t-502350.html">this forum thread (engl)</a> or into <a href="http://forums.gentoo.org/viewtopic-t-495971.html">the German one</a>. If you are using Sabayon, use <a href="http://sabayonlinux.org/forum/viewtopic.php?f=54&t=10158">this one</a>.
+ This project itself does not have any forums. But there are a couple of threads in other forums:<br />
+ If you are using Gentoo look into <a href="http://forums.gentoo.org/viewtopic-t-502350.html">this forum thread (engl)</a> or into <a href="http://forums.gentoo.org/viewtopic-t-495971.html">the German one</a>. If you are using Sabayon, use <a href="http://sabayonlinux.org/forum/viewtopic.php?f=54&amp;t=10158">this one</a>.
</p>
<%self:h2>Similar projects</%self:h2>
@@ -50,5 +50,5 @@ emerge -av portato
<ul>
<li><a href="http://www.haskell.org/himerge">Himerge</a> - a frontend written in Haskell (yeah ;P)</li>
<li><a href="http://porthole.sourceforge.net/">Porthole</a> - also written in Python and using GTK+. This frontend inspired me to do my own ;). I also suggest this one as the alternative if Portato does not work as expected.</li>
- <li><a href="http://www.kuroo.org/">Kuroo</a> - a frontend especially aimed for the KDE environment. <em>(Development seems to have stopped)</em>
+ <li><a href="http://www.kuroo.org/">Kuroo</a> - a frontend especially aimed for the KDE environment. <em>(Development seems to have stopped)</em></li>
</ul>
diff --git a/templates/root.mako b/templates/root.mako
index 46fd88f..936ce57 100644
--- a/templates/root.mako
+++ b/templates/root.mako
@@ -1,5 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="shortcut icon" href=${"/favicon.ico" | url} type="image/icon" />
@@ -10,7 +11,7 @@
<body>
<div id="wrapper">
<div id="logo">
- <img src=${"/static/images/portato.png" | url} />
+ <img src=${"/static/images/portato.png" | url} alt="logo" />
<h1><a href=${"/" | url}>Portato</a></h1>
<h2>»   A Portage GUI</h2>
</div>