Add initial mobile templates: base, home, about
This commit is contained in:
		
							parent
							
								
									34bd40ca86
								
							
						
					
					
						commit
						d77216374f
					
				
					 4 changed files with 67 additions and 2 deletions
				
			
		
							
								
								
									
										12
									
								
								tailbone/templates/mobile/about.mako
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								tailbone/templates/mobile/about.mako
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
## -*- coding: utf-8 -*-
 | 
			
		||||
<%inherit file="/mobile/base.mako" />
 | 
			
		||||
 | 
			
		||||
<%def name="title()">About ${project_title}</%def>
 | 
			
		||||
 | 
			
		||||
<h2>${project_title} ${project_version}</h2>
 | 
			
		||||
 | 
			
		||||
% for name, version in packages.iteritems():
 | 
			
		||||
    <h3>${name} ${version}</h3>
 | 
			
		||||
% endfor
 | 
			
		||||
 | 
			
		||||
<p>Please see <a href="https://rattailproject.org/">rattailproject.org</a> for more info.</p>
 | 
			
		||||
							
								
								
									
										42
									
								
								tailbone/templates/mobile/base.mako
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								tailbone/templates/mobile/base.mako
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,42 @@
 | 
			
		|||
## -*- coding: utf-8 -*-
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 | 
			
		||||
    <title>${self.global_title()} » ${capture(self.title)}</title>
 | 
			
		||||
	<meta name="viewport" content="width=device-width, initial-scale=1" />
 | 
			
		||||
    ${h.javascript_link('https://code.jquery.com/jquery-1.12.4.min.js')}
 | 
			
		||||
    ${h.javascript_link('http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js')}
 | 
			
		||||
    ${h.stylesheet_link('http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css')}
 | 
			
		||||
    % if not request.rattail_config.production():
 | 
			
		||||
        <style type="text/css">
 | 
			
		||||
          .ui-page-theme-a { background-image: url(${request.static_url('tailbone:static/img/testing.png')}); }
 | 
			
		||||
        </style>
 | 
			
		||||
    % endif
 | 
			
		||||
  </head>
 | 
			
		||||
 | 
			
		||||
  <body>
 | 
			
		||||
    <div data-role="page">
 | 
			
		||||
 | 
			
		||||
      <div data-role="header">
 | 
			
		||||
        ${h.link_to("Home", url('mobile.home'), class_='ui-btn-left')}
 | 
			
		||||
        ${h.link_to("About", url('mobile.about'), class_='ui-btn-right')}
 | 
			
		||||
        <h1>${self.global_title()}</h1>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div role="main" class="ui-content">
 | 
			
		||||
        % if capture(self.title):
 | 
			
		||||
            <h2>${self.title()}</h2>
 | 
			
		||||
        % endif
 | 
			
		||||
        ${self.body()}
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div data-role="footer">
 | 
			
		||||
        <h4>powered by ${h.link_to("Rattail", url('mobile.about'))}</h4>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
<%def name="global_title()">${"[STAGE] " if not request.rattail_config.production() else ''}Rattail Demo</%def>
 | 
			
		||||
							
								
								
									
										9
									
								
								tailbone/templates/mobile/home.mako
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tailbone/templates/mobile/home.mako
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
## -*- coding: utf-8 -*-
 | 
			
		||||
<%inherit file="/mobile/base.mako" />
 | 
			
		||||
 | 
			
		||||
<%def name="title()"></%def>
 | 
			
		||||
 | 
			
		||||
<div style="text-align: center;">
 | 
			
		||||
  ${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo", width='400')}
 | 
			
		||||
  <h1>Welcome to Tailbone</h1>
 | 
			
		||||
</div>
 | 
			
		||||
| 
						 | 
				
			
			@ -93,9 +93,11 @@ class CommonView(View):
 | 
			
		|||
    @classmethod
 | 
			
		||||
    def defaults(cls, config):
 | 
			
		||||
 | 
			
		||||
        # about
 | 
			
		||||
        config.add_route('about', '/about')
 | 
			
		||||
        config.add_view(cls, attr='about', route_name='about', 
 | 
			
		||||
                        renderer='/about.mako')
 | 
			
		||||
        config.add_view(cls, attr='about', route_name='about', renderer='/about.mako')
 | 
			
		||||
        config.add_route('mobile.about', '/mobile/about')
 | 
			
		||||
        config.add_view(cls, attr='about', route_name='mobile.about', renderer='/mobile/about.mako')
 | 
			
		||||
 | 
			
		||||
        config.add_route('feedback', '/feedback')
 | 
			
		||||
        config.add_view(cls, attr='feedback', route_name='feedback',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue