mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
Interpret org files as a list and put them in separate divs. Update styling of search results to separate into cards
This commit is contained in:
@@ -24,13 +24,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function render_org(query, data, classPrefix="") {
|
function render_org(query, data, classPrefix="") {
|
||||||
var orgCode = data.map(function (item) {
|
return data.map(function (item) {
|
||||||
return `${item.entry}`
|
var orgParser = new Org.Parser();
|
||||||
}).join("\n")
|
var orgDocument = orgParser.parse(item.entry);
|
||||||
var orgParser = new Org.Parser();
|
var orgHTMLDocument = orgDocument.convert(Org.ConverterHTML, { htmlClassPrefix: classPrefix });
|
||||||
var orgDocument = orgParser.parse(orgCode);
|
return `<div class="results-org">` + orgHTMLDocument.toString() + `</div>`;
|
||||||
var orgHTMLDocument = orgDocument.convert(Org.ConverterHTML, { htmlClassPrefix: classPrefix });
|
}).join("\n");
|
||||||
return `<div class="results-org">` + orgHTMLDocument.toString() + `</div>`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function render_markdown(query, data) {
|
function render_markdown(query, data) {
|
||||||
@@ -407,7 +406,12 @@
|
|||||||
div.results-markdown,
|
div.results-markdown,
|
||||||
div.results-org,
|
div.results-org,
|
||||||
div.results-pdf {
|
div.results-pdf {
|
||||||
border: black 1px solid;
|
text-align: left;
|
||||||
|
box-shadow: 2px 2px 2px var(--primary-hover);
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 10px 0;
|
||||||
|
border: 1px solid rgb(229, 229, 229);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user