summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-03-11 14:22:02 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2017-03-11 14:22:02 +0100
commit5f51bd8bca61a5ad77d5680e8be9a2d96db9de91 (patch)
treea613ceb00ec954042bcc0837c62ab80895e6e6c4 /themes
parentc6afe44a13b76eea146266f928c0fcbfc3fb358a (diff)
downloadwww-andreasbaumann-cc-5f51bd8bca61a5ad77d5680e8be9a2d96db9de91.tar.gz
www-andreasbaumann-cc-5f51bd8bca61a5ad77d5680e8be9a2d96db9de91.tar.bz2
highlightin in title and in text (still buggy)
Diffstat (limited to 'themes')
-rw-r--r--themes/new_theme/layouts/partials/ranklist.html62
1 files changed, 58 insertions, 4 deletions
diff --git a/themes/new_theme/layouts/partials/ranklist.html b/themes/new_theme/layouts/partials/ranklist.html
index 9e37ab4..9ed4877 100644
--- a/themes/new_theme/layouts/partials/ranklist.html
+++ b/themes/new_theme/layouts/partials/ranklist.html
@@ -81,19 +81,25 @@
for( var i = 0; i < data.ranklist.ranks.length; i++ ) {
var rank = data.ranklist.ranks[i];
var abstract = '';
- var title = 'No Title';
+ var title = '';
+ var title_attribute = 'No title';
var docid = '';
html += "<li>";
for( var j = 0; j < rank.attributes.length; j++ ) {
var attribute = rank.attributes[j];
if( attribute.key == 'title' ) {
- title = attribute.value;
+ title += ' ' + attribute.value;
+ } else if( attribute.key == 'title_attribute' ) {
+ title_attribute = attribute.value;
} else if( attribute.key == 'docid' ) {
docid = attribute.value;
- } else {
+ } else if( attribute.key == 'text' ) {
abstract += ' ' + attribute.value;
}
}
+ if( title == '' ) {
+ title = title_attribute;
+ }
html += "<div class='title'>"
html += "<a href=\"" + docid + "\">" + title + "</a></div>";
if( abstract != '' ) {
@@ -142,13 +148,55 @@
]
},
{
- attribute: "title",
+ attribute: "title_attribute",
name: "attribute",
params: [
{
key : "name",
value : "title"
}
+ ],
+ resultnames: [
+ {
+ key : "resultname",
+ value : "title_attribute"
+ }
+ ]
+ },
+ {
+ attribute: "title",
+ name: "test",
+ params: [
+ {
+ key: "type",
+ value: "title"
+ },
+ {
+ key: "match",
+ value: "feat"
+ },
+ {
+ key: "N",
+ value: 50
+ },
+ {
+ key: "add_dots",
+ value: 0
+ },
+ {
+ key: "start_first_match",
+ value: 0
+ },
+ {
+ key: "mark",
+ value: "<font color='black'>%1%</font>"
+ }
+ ],
+ resultnames: [
+ {
+ key: "resultname",
+ value: "title"
+ }
]
},
{
@@ -179,6 +227,12 @@
key: "mark",
value: "<b>%1%</b>"
}
+ ],
+ resultnames: [
+ {
+ key: "resultname",
+ value: "text"
+ }
]
}
]