Quick-Search: Added Quick-search in the topbar
Changed how and what we store in elastic to unify it with how we store things in mongodb so we can have more generic javascript code to render the data. Elastic changes: Added: Node.project.url Altered to store id instead of url Node.picture Made Post searchable ./manage.py elastic reset_index ./manage.py elastic reindex Thanks to Pablo and Sybren
This commit is contained in:
21
src/scripts/js/es6/common/templates/nodes/Posts.js
Normal file
21
src/scripts/js/es6/common/templates/nodes/Posts.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { NodesBase } from "./NodesBase";
|
||||
|
||||
export class Posts extends NodesBase {
|
||||
static create$item(post) {
|
||||
let content = [];
|
||||
let $title = $('<div>')
|
||||
.addClass('display-4 text-uppercase font-weight-bold')
|
||||
.text(post.name);
|
||||
content.push($title);
|
||||
let $post = $('<div>')
|
||||
.addClass('expand-image-links imgs-fluid')
|
||||
.append(
|
||||
content,
|
||||
$('<div>')
|
||||
.addClass('node-details-description mx-auto')
|
||||
.html(post['properties']['pretty_content'])
|
||||
);
|
||||
|
||||
return $post;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user