Timeline: Remove header and lead from posts.
Headers don't really match with the rest of the listing.
This commit is contained in:
parent
801cda88bf
commit
119291f817
@ -1,52 +1,24 @@
|
||||
import { NodesFactoryInterface } from './nodes'
|
||||
import { thenLoadImage } from './utils';
|
||||
|
||||
class Posts extends NodesFactoryInterface {
|
||||
static create$item(post) {
|
||||
let content = [];
|
||||
let $title = $('<div>')
|
||||
.addClass('display-4 text-uppercase font-weight-bold')
|
||||
let $title = $('<a>')
|
||||
.attr('href', '/nodes/' + post._id + '/redir')
|
||||
.addClass('h2 text-uppercase font-weight-bold d-block pb-3')
|
||||
.text(post.name);
|
||||
content.push($title);
|
||||
let $text = $('<div>')
|
||||
.addClass('lead')
|
||||
.text(post['pretty_created']);
|
||||
content.push($text);
|
||||
let $jumbotron = $('<a>')
|
||||
.addClass('jumbotron text-white jumbotron-overlay')
|
||||
.attr('href', '/nodes/' + post._id + '/redir')
|
||||
.append(
|
||||
$('<div>')
|
||||
.addClass('container')
|
||||
.append(
|
||||
$('<div>')
|
||||
.addClass('row')
|
||||
.append(
|
||||
$('<div>')
|
||||
.addClass('col-md-9')
|
||||
.append(content)
|
||||
)
|
||||
)
|
||||
);
|
||||
thenLoadImage(post.picture, 'l')
|
||||
.then((img)=>{
|
||||
$jumbotron.attr('style', 'background-image: url(' + img.link + ');')
|
||||
})
|
||||
.fail((error)=>{
|
||||
let msg = xhrErrorResponseMessage(error);
|
||||
console.log(msg || error);
|
||||
})
|
||||
let $post = $('<div>')
|
||||
.addClass('expand-image-links imgs-fluid')
|
||||
.append(
|
||||
$jumbotron,
|
||||
content,
|
||||
$('<div>')
|
||||
.addClass('node-details-description mx-auto py-5')
|
||||
.addClass('node-details-description mx-auto')
|
||||
.html(post['properties']['_content_html'])
|
||||
);
|
||||
|
||||
|
||||
return $post;
|
||||
}
|
||||
}
|
||||
|
||||
export { Posts };
|
||||
export { Posts };
|
||||
|
Loading…
x
Reference in New Issue
Block a user