provide mobile skin (work in progress
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4141 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									ee2b56437a
								
							
						
					
					
						commit
						d8a40be261
					
				
					 7 changed files with 94 additions and 5 deletions
				
			
		|  | @ -750,5 +750,6 @@ | |||
| 
 | ||||
|   <include package=".skin" /> | ||||
|   <include package=".lobo" /> | ||||
|   <include package=".mobile" /> | ||||
| 
 | ||||
| </configure> | ||||
|  |  | |||
							
								
								
									
										4
									
								
								browser/mobile/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								browser/mobile/__init__.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| """ | ||||
| $Id$ | ||||
| """ | ||||
| 
 | ||||
							
								
								
									
										9
									
								
								browser/mobile/configure.zcml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								browser/mobile/configure.zcml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| <!-- $Id$ --> | ||||
| 
 | ||||
| <configure xmlns:zope="http://namespaces.zope.org/zope" | ||||
|            xmlns:browser="http://namespaces.zope.org/browser" | ||||
|            i18n_domain="loops"> | ||||
| 
 | ||||
|   <zope:module module="loops.browser.mobile.default" /> | ||||
| 
 | ||||
| </configure> | ||||
							
								
								
									
										25
									
								
								browser/mobile/default.pt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								browser/mobile/default.pt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| <body metal:define-macro="body"> | ||||
|     <div id="content"> | ||||
|         <tal:sub repeat="view view/layouts/center"> | ||||
|           <metal:sub use-macro="view/renderer" /> | ||||
|         </tal:sub> | ||||
|     </div> | ||||
| </body> | ||||
| 
 | ||||
| 
 | ||||
| <metal:content define-macro="center"> | ||||
|     <tal:sub repeat="view view/layouts/content"> | ||||
|       <metal:sub use-macro="view/renderer" /> | ||||
|     </tal:sub> | ||||
| </metal:content> | ||||
| 
 | ||||
| 
 | ||||
| <metal:content define-macro="homepage"> | ||||
|     <h1>loops mobile</h1> | ||||
| </metal:content> | ||||
| 
 | ||||
| 
 | ||||
| <metal:content define-macro="notfound"> | ||||
|   <tal:status define="dummy python: request.response.setStatus(404)" /> | ||||
|   <h1 i18n:translate="">Page not found</h1> | ||||
| </metal:content> | ||||
							
								
								
									
										52
									
								
								browser/mobile/default.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								browser/mobile/default.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,52 @@ | |||
| # | ||||
| #  Copyright (c) 2011 Helmut Merz helmutm@cy55.de | ||||
| # | ||||
| #  This program is free software; you can redistribute it and/or modify | ||||
| #  it under the terms of the GNU General Public License as published by | ||||
| #  the Free Software Foundation; either version 2 of the License, or | ||||
| #  (at your option) any later version. | ||||
| # | ||||
| #  This program is distributed in the hope that it will be useful, | ||||
| #  but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
| #  GNU General Public License for more details. | ||||
| # | ||||
| #  You should have received a copy of the GNU General Public License | ||||
| #  along with this program; if not, write to the Free Software | ||||
| #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | ||||
| # | ||||
| 
 | ||||
| """ | ||||
| Default layouts for the loops mobile skin. | ||||
| 
 | ||||
| $Id$ | ||||
| """ | ||||
| 
 | ||||
| from zope.app.pagetemplate import ViewPageTemplateFile | ||||
| from zope.cachedescriptors.property import Lazy | ||||
| from zope import component | ||||
| from zope.interface import implements | ||||
| 
 | ||||
| from cybertools.browser.renderer import RendererFactory | ||||
| from cybertools.composer.layout.base import Layout | ||||
| from cybertools.composer.layout.browser.standard import standardRenderers | ||||
| 
 | ||||
| 
 | ||||
| defaultRenderers = RendererFactory(ViewPageTemplateFile('default.pt')) | ||||
| 
 | ||||
| 
 | ||||
| Layout('page.loops.mobile', 'page', renderer=standardRenderers.page, | ||||
|        sublayouts=set(['body.loops.mobile']), | ||||
|        favicon='favicon.png') | ||||
| 
 | ||||
| Layout('body.loops.mobile', 'page.body', renderer=defaultRenderers.body, | ||||
|        sublayouts=set(['center.loops.mobile'])) | ||||
| 
 | ||||
| Layout('center.loops.mobile', 'body.center', renderer=defaultRenderers.center, | ||||
|        instanceName='target', sublayouts=[], | ||||
|        defaultSublayout='notfound.loops') | ||||
| 
 | ||||
| Layout('homepage.loops.mobile', 'center.content', renderer=defaultRenderers.homepage, | ||||
|        instanceName='target') | ||||
| 
 | ||||
| Layout('notfound.loops', 'center.content', renderer=defaultRenderers.notfound) | ||||
|  | @ -50,7 +50,7 @@ | |||
|     <div id="footer" class="footer clear" | ||||
|          metal:define-macro="footer"> | ||||
|       <metal:footer define-slot="footer"> | ||||
|         © Copyright 2010, cyberconcepts IT-Consulting Dr. Helmut Merz | ||||
|         © Copyright 2011, cyberconcepts IT-Consulting Dr. Helmut Merz | ||||
|         (<a href="#" | ||||
|           tal:attributes="href string:${view/topMenu/url}/impressum">Impressum</a>) | ||||
|         <br /> | ||||
|  |  | |||
|  | @ -217,6 +217,7 @@ fieldset.box td { | |||
| } | ||||
| 
 | ||||
| .content-1 h1, h1 { | ||||
|     padding-top: 0.5em; | ||||
|     font-size: 180%; | ||||
| } | ||||
| 
 | ||||
|  | @ -321,10 +322,7 @@ div.menu-1, div.menu-2 { | |||
| .object-actions { | ||||
|     float: right; | ||||
|     margin: 0; | ||||
| } | ||||
| 
 | ||||
| .object-actions { | ||||
|     padding: 0.5em 0 0 0; | ||||
|     padding: 1em 0 0 0; | ||||
| } | ||||
| 
 | ||||
| .content-2 .object-actions { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm