@@ -127,7 +136,7 @@ input {
list-style-type: none;
z-index: 1000;
position: absolute;
- max-height: 200px;
+ max-height: 192px;
overflow-y: auto;
overflow: hidden;
background: white;
@@ -140,15 +149,17 @@ input {
.autocomplete-result-item {
list-style: none;
text-align: left;
- /* padding: 7px 10px; */
+ padding: 0px 0px 0px 5px; // top,right,bottom,left
cursor: pointer;
}
.autocomplete-result-item.is-active {
background: rgba(0, 180, 255, 0.15);
+ // background: #3cc;
}
.autocomplete-result-item:hover {
- background: rgba(0, 180, 255, 0.075);
+ // background: rgba(0, 180, 255, 0.075);
+ background: #baedf1;
}
diff --git a/src/components/vs-result/vs-result.ts b/src/components/vs-result/vs-result.ts
index 6984809..39f6514 100644
--- a/src/components/vs-result/vs-result.ts
+++ b/src/components/vs-result/vs-result.ts
@@ -14,6 +14,16 @@ export default class VsResult extends Vue {
return this.datasets;
}
+ public simplifyAuthor(author:string): string {
+
+ if (author.endsWith(" ")) {
+ return author.substring(0, author.indexOf(","));
+ } else {
+ let firstNameInitial:string = author.charAt(author.indexOf(",") + 2);
+ return author.substring(0, author.indexOf(",") + 2) + firstNameInitial;
+ }
+ }
+
public getDomainWithoutSubdomain(): string {
const urlParts = new URL(window.location.href).hostname.split(".");
@@ -23,13 +33,15 @@ export default class VsResult extends Vue {
.join(".");
}
- private convert(unixtimestamp: number): string {
+ // private convert(unixtimestamp: number): string { // SOLR
+ private convert(unixtimestamp: string): string { // OpenSearch
// Unixtimestamp
// var unixtimestamp = document.getElementById('timestamp').value;
// Months array
const months_arr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
// Convert timestamp to milliseconds
- const date = new Date(unixtimestamp * 1000);
+ // const date = new Date(unixtimestamp * 1000); // SOLR
+ const date = new Date(Number(unixtimestamp) * 1000); // OpenSearch
// Year
const year = date.getFullYear();
// Month
diff --git a/src/components/vs-result/vs-result.vue b/src/components/vs-result/vs-result.vue
index 60b1494..5387123 100644
--- a/src/components/vs-result/vs-result.vue
+++ b/src/components/vs-result/vs-result.vue
@@ -3,49 +3,46 @@
-
-
-
{{ "https://doi.org/" + document.identifier[0] + " ➤" }}
- {{ document.author[0] }}
+
+
+
+
+
+
+ {{ simplifyAuthor(document.author[0]) }}
+
+
+
+
+ {{ simplifyAuthor(author) }};
+
+
+
+
+
+ {{ simplifyAuthor(author) }};
+
+ et al.
+
+
-
-
-
-
- {{
- document.title_output
- }}
+
-
-
{{ convert(document.server_date_published) + ": " }}
- {{ document.abstract_output }}
+
+ {{ document.abstract[0] }}
...
@@ -53,11 +50,9 @@
{{ document.doctype }}
-
Open Access
-
diff --git a/src/constants.ts b/src/constants.ts
index acd7381..2bc8d53 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -1,20 +1,26 @@
-// declare const POINT_URL: string;
-// declare const EDGE_URL: string;
declare const APP_URL: string;
declare const VUE_API: string;
-declare const SOLR_HOST: string;
-declare const SOLR_CORE: string;
+// declare const SOLR_HOST: string;
+// declare const SOLR_CORE: string;
+
+// OPENSEARCH
+declare const OPEN_HOST: string;
+declare const OPEN_CORE: string;
-// const _EDGE_URL = EDGE_URL;
-// const _POINT_URL = POINT_URL;
const _APP_URL = APP_URL;
const _VUE_API = VUE_API;
-const _SOLR_HOST = SOLR_HOST;
-const _SOLR_CORE = SOLR_CORE;
+// const _SOLR_HOST = SOLR_HOST;
+// const _SOLR_CORE = SOLR_CORE;
+
+// OPENSEARCH
+const _OPEN_HOST = OPEN_HOST;
+const _OPEN_CORE = OPEN_CORE;
-// export { _EDGE_URL as EDGE_URL };
-// export { _POINT_URL as POINT_URL };
export { _APP_URL as APP_URL };
export { _VUE_API as VUE_API };
-export { _SOLR_HOST as SOLR_HOST };
-export { _SOLR_CORE as SOLR_CORE };
+// export { _SOLR_HOST as SOLR_HOST };
+// export { _SOLR_CORE as SOLR_CORE };
+
+// OPENSEARCH
+export { _OPEN_HOST as OPEN_HOST };
+export { _OPEN_CORE as OPEN_CORE };
diff --git a/src/main.ts b/src/main.ts
index e4bd3bd..34651e1 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -15,7 +15,7 @@ const host = window.location.host;
const parts = host.split(".");
// const domainLength = 2; // route1.example.com => domain length = 3
let router, app;
-// let routes;
+// exmample change
if (parts[0] === "doi") {
router = route1;
app = App2;
diff --git a/src/models/dataset.ts b/src/models/dataset.ts
index c3de319..9df56f3 100644
--- a/src/models/dataset.ts
+++ b/src/models/dataset.ts
@@ -1,72 +1,92 @@
// import moment from "moment";
import dayjs from "dayjs";
+// // SOLR Dataset original
+// export interface Dataset {
+// abstract_additional: Array