Browse Source

Fixed image width issue on single post pages.

pull/4/head
jrtechs 5 years ago
parent
commit
9e8ae921fd
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      posts/singlePost.js

+ 8
- 8
posts/singlePost.js View File

@ -114,23 +114,23 @@ module.exports=
{
return new Promise(function (resolve, reject)
{
var html = "<div class=\"blogPost\">";
var htmlHead = "<div class=\"blogPost\">";
//image
if(!(post.picture_url === "n/a"))
{
html +="<img src=\"/img/posts/" + post.picture_url +
htmlHead +="<img src=\"/img/posts/" + post.picture_url +
"\" alt=\"\" style=\"width:100%; height:10%\">";
}
html += "<div class=\"p-4\"><div class=\"\">";
htmlHead += "<div class=\"p-4\"><div class=\"\">";
//title
html += "<h3><b>" + post.name + "</b></h3>";
htmlHead += "<h3><b>" + post.name + "</b></h3>";
//date
html += "<h5><span class=\"w3-opacity\">" +
htmlHead += "<h5><span class=\"w3-opacity\">" +
post.published.toDateString() + "</span></h5>";
html +="</div>";
htmlHead +="</div>";
html += "<div class=\"\">";
var html = "<div class=\"\">";
try
{
sql.getCategory(post.category_id).then(function(category)
@ -146,7 +146,7 @@ module.exports=
html = html.split("<code>").join("<code class='hljs cpp'>");
html += "</div></div></div><br><br>";
resolve(html);
resolve(htmlHead + html);
});
}
catch(ex)

Loading…
Cancel
Save