witten
/
luminotes
Archived
1
0
Fork 0

Introduced some <meta> description and keywords tags on the product pages.

Also switched view.Page to use isinstance() instead of "type() in".
This commit is contained in:
Dan Helfman 2008-05-27 14:06:51 -07:00
parent 5257126d6c
commit 23665a0e6c
2 changed files with 6 additions and 4 deletions

View File

@ -15,16 +15,16 @@ class Page( Html ):
self, self,
Head( Head(
Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css" ), Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css" ),
Script( type = u"text/javascript", src = u"https://ssl.google-analytics.com/urchin.js" ) or None,
Meta( content = u"text/html; charset=UTF-8", http_equiv = u"content-type" ), Meta( content = u"text/html; charset=UTF-8", http_equiv = u"content-type" ),
[ child for child in children if type( child ) in head_types ], Script( type = u"text/javascript", src = u"https://ssl.google-analytics.com/urchin.js" ) or None,
[ child for child in children if isinstance( child, head_types ) ],
Title( title and u"%s: %s" % ( app_name, title ) or app_name ), Title( title and u"%s: %s" % ( app_name, title ) or app_name ),
"""<!--[if IE 6]><link href="/static/css/ie6.css" type="text/css" rel="stylesheet"></link><![endif]-->""", """<!--[if IE 6]><link href="/static/css/ie6.css" type="text/css" rel="stylesheet"></link><![endif]-->""",
"""<!--[if IE 7]><link href="/static/css/ie7.css" type="text/css" rel="stylesheet"></link><![endif]-->""", """<!--[if IE 7]><link href="/static/css/ie7.css" type="text/css" rel="stylesheet"></link><![endif]-->""",
), ),
Body( Body(
Div( Div(
*[ child for child in children if type( child ) not in head_types ], *[ child for child in children if not isinstance( child, head_types ) ],
**attrs **attrs
), ),
), ),

View File

@ -1,6 +1,6 @@
from Page import Page from Page import Page
from Header import Header from Header import Header
from Tags import Link, Div, A, Span from Tags import Link, Meta, Div, A, Span
class Product_page( Page ): class Product_page( Page ):
@ -10,6 +10,8 @@ class Product_page( Page ):
None, # use the default title None, # use the default title
Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ), Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ),
Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/product.css" ), Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/product.css" ),
Meta( name = u"description", content = u"Luminotes is a WYSIWYG personal wiki notebook for organizing your notes and ideas." ),
Meta( name = u"keywords", content = u"note taking, personal wiki, wysiwyg wiki, easy wiki, simple wiki, wiki notebook" ),
Header( user, first_notebook, login_url, logout_url, note_title ), Header( user, first_notebook, login_url, logout_url, note_title ),