[ADD] : customize option for blog background cover

bzr revid: aja@tinyerp.com-20140129092750-p24fv06yt4ydnz75
This commit is contained in:
ajay javiya (OpenERP) 2014-01-29 14:57:50 +05:30
parent 4ea4c699b7
commit 6a11a5b1cf
3 changed files with 36 additions and 0 deletions

View File

@ -21,3 +21,15 @@ p.post-meta {
position: relative;
top: -5px;
}
.blog_cover {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-position: center;
height: 100vh;
color: white;
padding-top: 20%;
margin-bottom: 8px;
}

View File

@ -20,3 +20,13 @@ p.post-meta
position: relative
top: -5px
.blog_cover
-webkit-background-size: cover
-moz-background-size: cover
-o-background-size: cover
background-size: cover
background-position: center
height: 100vh
color: white
padding-top: 20%
margin-bottom: 8px

View File

@ -225,6 +225,20 @@
</xpath>
</template>
<template id="blog_background_cover" name="Blog Cover"
inherit_option_id="website_blog.blog_post_complete">
<xpath expr="//div[@id='title']" position="attributes">
<attribute name="class">blog_cover</attribute>
<attribute t-if="blog_post.content_image" name="t-attf-style">background : url('data:image/png;base64,#{blog_post.content_image}') center center no-repeat;</attribute>
<attribute t-if="not blog_post.content_image" name="style">background : #34495E;</attribute>
</xpath>
<xpath expr="//div[@id='title']" position="inside">
<div class="text-center blog_item">
<img class="img-circle" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(blog_post.create_uid.id)" style="width: 50px; margin-right: 10px;"/>
<small class="text-muted" id="blog_author" t-field="blog_post.create_uid.name"/>
</div>
</xpath>
</template>
<!-- Options: Blog Post: user can reply -->
<template id="opt_blog_post_complete_comment" name="Allow Comments"