From c09a5feb3c57d25ba97d12333e530d9f258701ef Mon Sep 17 00:00:00 2001 From: Goffi Date: Mon, 22 Jan 2018 08:36:36 +0100 Subject: [PATCH] plugin blog static: added background parameter, to set an image --- src/plugins/plugin_misc_static_blog.py | 39 ++++++++++++++------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/plugins/plugin_misc_static_blog.py b/src/plugins/plugin_misc_static_blog.py index 944389ed..3a635ce8 100644 --- a/src/plugins/plugin_misc_static_blog.py +++ b/src/plugins/plugin_misc_static_blog.py @@ -44,29 +44,32 @@ PLUGIN_INFO = { class StaticBlog(object): - params = """ + params = u""" - - - - - + + + + + + - """ % { - 'category_name': C.STATIC_BLOG_KEY, - 'category_label': D_(C.STATIC_BLOG_KEY), - 'title_name': C.STATIC_BLOG_PARAM_TITLE, - 'title_label': D_('Page title'), - 'banner_name': C.STATIC_BLOG_PARAM_BANNER, - 'banner_label': D_('Banner URL'), - 'keywords_name': C.STATIC_BLOG_PARAM_KEYWORDS, - 'keywords_label': D_('Keywords'), - 'description_name': C.STATIC_BLOG_PARAM_DESCRIPTION, - 'description_label': D_('Description'), - } + """.format( + category_name = C.STATIC_BLOG_KEY, + category_label = D_(C.STATIC_BLOG_KEY), + title_name = C.STATIC_BLOG_PARAM_TITLE, + title_label = D_('Page title'), + banner_name = C.STATIC_BLOG_PARAM_BANNER, + banner_label = D_('Banner URL'), + background_name = u"Background", + background_label = D_(u"Background image URL"), + keywords_name = C.STATIC_BLOG_PARAM_KEYWORDS, + keywords_label = D_('Keywords'), + description_name = C.STATIC_BLOG_PARAM_DESCRIPTION, + description_label = D_('Description'), + ) def __init__(self, host): try: # TODO: remove this attribute when all blogs can be retrieved