Changeset 8065 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 8 Apr 2012, 16:28:37 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt
r8062 r8065 30 30 >>> browser = Browser() 31 31 32 Let's get the default view of a university:: 32 Let's get the default view of a university and see if the 33 favicon is properly referenced:: 33 34 34 35 >>> browser.open('http://localhost/myuniversity') 35 36 >>> print browser.contents 36 37 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"... 38 ...href="http://localhost/myuniversity/@@/waeup_kofa/favicon.ico" 37 39 ...Welcome to WAeUP.Kofa... 38 40 ... -
main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py
r7819 r8065 20 20 #from hurry import yui 21 21 from hurry.resource import Library, ResourceInclusion 22 from hurry.resource.core import inclusion_renderers, EXTENSIONS 22 23 from hurry.jqueryui import jqueryui, base, blitzer, ui_lightness, humanity 23 24 from hurry.jquery import jquery … … 26 27 #: All local resources are registered under the name ``waeup_kofa``. 27 28 waeup_kofa = Library('waeup_kofa', 'static') 29 30 #: A resource that includes a favicon. 31 #: In the `gerResource()` method of the theme 32 #: require the JavaScript code to be rendered into the page:: 33 #: 34 #: from waeup.kofa.browser.resources import favicon 35 #: # ... 36 #: class MyTheme(grok.GlobalUtility): 37 #: # ... 38 #: def getResources(self): 39 #: favicon.need() 40 #: return [...] 41 42 def render_ico(url): 43 return '<link rel="shortcut icon" type="image/x-icon" href="%s" />' % url 44 inclusion_renderers['.ico'] = render_ico 45 EXTENSIONS.append('.ico') 46 47 favicon = ResourceInclusion(waeup_kofa, 'favicon.ico') 28 48 29 49 #: A resource that binds a jQueryUI datepicker widget to each … … 43 63 #: datepicker.need() 44 64 #: 45 #: This way all required JavaScript swill be rendered correctly65 #: This way all required JavaScript will be rendered correctly 46 66 #: into the HTML page generated. 47 67 #: -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt
r8063 r8065 8 8 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 9 9 <meta name="robots" content="index, follow" /> 10 <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" />11 10 <link rel="alternate" type="application/rss+xml" title="RSS" 12 11 href="http://www.example.net/feed.rss" -
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt
r8063 r8065 12 12 tal:attributes="href python: view.url(layout.site, '@@/waeup.kofa.browser/mobile.css')" 13 13 type="text/css" /> 14 <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" />15 14 <link rel="alternate" type="application/rss+xml" title="RSS" 16 15 href="http://www.example.net/feed.rss" -
main/waeup.kofa/trunk/src/waeup/kofa/browser/theming.py
r7819 r8065 26 26 from waeup.kofa.browser.interfaces import ITheme 27 27 from waeup.kofa.browser.resources import ( 28 waeuptheme_empty, waeup_base_css, 28 waeuptheme_empty, waeup_base_css, favicon 29 29 ) 30 30 … … 36 36 37 37 def getResources(self): 38 favicon.need() 38 39 return [waeup_base_css] 39 40 #class KofaThemeRed1(grok.GlobalUtility):41 # grok.implements(ITheme)42 # grok.name('red waeup theme')43 44 # description = u"Uli's Red Theme"45 46 # def getResources(self):47 # return [waeuptheme_red1]48 49 #class KofaThemeGray1(grok.GlobalUtility):50 # grok.implements(ITheme)51 # grok.name('gray waeup theme')52 53 # description = u"Henrik's Gray Theme"54 55 # def getResources(self):56 # return [waeuptheme_gray1]57 40 58 41 class KofaThemeEmpty(grok.GlobalUtility):
Note: See TracChangeset for help on using the changeset viewer.