[fix] for blog
This commit is contained in:
parent
b808fb44e7
commit
a52d927e28
2 changed files with 3 additions and 3 deletions
|
|
@ -190,7 +190,7 @@ def get_blog_list(doctype, txt=None, filters=None, limit_start=0, limit_page_len
|
|||
post.category = frappe.db.get_value('Blog Category', post.blog_category,
|
||||
['route', 'title'], as_dict=True)
|
||||
|
||||
if post.avatar and (not "http:" in post.avatar or "https:" in post.avatar) and not post.avatar.startswith("/"):
|
||||
if post.avatar and (not "http:" in post.avatar or not "https:" in post.avatar) and not post.avatar.startswith("/"):
|
||||
post.avatar = "/" + post.avatar
|
||||
|
||||
return posts
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@
|
|||
<h2><a href="/{{ post.route }}">{{ post.title }}</a></h2>
|
||||
{% if post.cover_image %}
|
||||
<p style="height: 200px; overflow: hidden;">
|
||||
<img src="{{ post.cover_image }}" alt="{{post.title}} - Cover Image" style="width: 60%;"/>
|
||||
<img src="{{ post.cover_image }}" alt="{{post.title}} - Cover Image" style="width: 60%;"/ style='blog-cover-image'>
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="post-description">{{ post.intro }}</p>
|
||||
|
||||
<div style='margin-top: 15px;'>
|
||||
<div class="inline-block" style="vertical-align: top">
|
||||
<div class="avatar avatar-small">
|
||||
<div class="avatar">
|
||||
<img itemprop="thumbnailUrl" src="{{ post.avatar or "/assets/frappe/images/default-avatar.png" }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue