Changes for page Context Search
Last modified by bougault on 2023/02/20 16:29
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -26,9 +26,12 @@ 26 26 margin-top: 1em; 27 27 } 28 28 .light { 29 - color: var(--color-gray- 400, #CCC);29 + color: var(--color-gray-500, #CCC); 30 30 font-size: 14px; 31 31 } 32 + a { 33 + color: var(--color-brand-primary, blue); 34 + } 32 32 `; 33 33 constructor() { 34 34 super(); ... ... @@ -65,6 +65,9 @@ 65 65 buildFilter() { 66 66 //https://wiki-dev.ebrains.eu/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&favorite=true&roles= 67 67 } 71 + getLink(xwikiDocSpace) { 72 + return `/bin/view/${xwikiDocSpace.replaceAll('.', '/')}`; 73 + } 68 68 render() { 69 69 return html` 70 70 <div> ... ... @@ -80,9 +80,9 @@ 80 80 <div> 81 81 ${this.results.map(result => html` 82 82 <div class="result"> 83 - <a href="#">${result.title_}</a> 84 - <div>${result.space}</div> 89 + <a href="${this.getLink(result.space)}">${result.title_}</a> 85 85 <div>${result.doccontent_.substring(0, 150)} 91 + <div class="light">${result.space.replaceAll('.', ' > ')}</div> 86 86 </div> 87 87 `)} 88 88 </div>