Allow config to define home page image URL
This commit is contained in:
parent
6156a80db0
commit
a3d0966139
|
@ -1,4 +1,4 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
## -*- coding: utf-8; -*-
|
||||
<%inherit file="/base.mako" />
|
||||
|
||||
<%def name="title()">Home</%def>
|
||||
|
@ -16,6 +16,6 @@
|
|||
</%def>
|
||||
|
||||
<div class="logo">
|
||||
${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo")}
|
||||
<h1>Welcome to Tailbone</h1>
|
||||
${h.image(image_url, "{} logo".format(capture(self.app_title)), id='logo', width=500)}
|
||||
<h1>Welcome to ${self.app_title()}</h1>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: utf-8; -*-
|
||||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2016 Lance Edgar
|
||||
# Copyright © 2010-2017 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -60,7 +60,10 @@ class CommonView(View):
|
|||
"""
|
||||
Home page view.
|
||||
"""
|
||||
return {}
|
||||
image_url = self.rattail_config.get(
|
||||
'tailbone', 'main_image_url',
|
||||
default=self.request.static_url('tailbone:static/img/home_logo.png'))
|
||||
return {'image_url': image_url}
|
||||
|
||||
def mobile_home(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue