Skip to content
Snippets Groups Projects
Commit 9e03407a authored by Paul Pestov's avatar Paul Pestov
Browse files

feat: reuse edition links with base URL

closes #84
parent 84abac02
No related branches found
No related tags found
2 merge requests!39Merge to main,!38feat: reuse edition links with base URL
import axios from 'axios';
class ApiService {
constructor(baseURL) {
this.http = axios.create({
baseURL: baseURL,
timeout: 5000,
});
this.http.interceptors.response.use(
(response) => response.data,
(error) => {
return Promise.reject(error);
},
);
}
async search(value, from, size) {
return this.request('/search', 'POST', {
query: {
simple_query_string: {
query: value
}
},
from,
size
})
}
async request (url, method, data, params) {
return await this.http.request({
url,
method,
data,
params,
});
}
}
export default new ApiService(process.env.VUE_APP_BASE_URL_API);
......@@ -86,20 +86,19 @@
</template>
<script>
export default {
data: () => ({
editions: [
{ title: 'Syriac Texts', to: 'https://ahikar-dev.sub.uni-goettingen.de/syriac' },
{ title: 'Arabic and Kashuni Texts', to: 'https://ahikar-dev.sub.uni-goettingen.de/arabic-karshuni' },
],
metaEdition: [
{ title: 'Manuscripts', to: '/manuscripts.html' },
{ title: 'Motifs', to: '/motifs.html' },
{ title: 'Stemmata', to: '/stemmata.html' },
{ title: 'Collation', to: '/collation.html' },
{ title: 'Edition guidelines', to: '/editionguidelines.html' },
{ title: 'Related Literature', to: '/relatedliterature.html' },
],
}),
}
import editions from "../utilities/editionLinks";
export default {
data: () => ({
editions,
metaEdition: [
{ title: 'Manuscripts', to: '/manuscripts.html' },
{ title: 'Motifs', to: '/motifs.html' },
{ title: 'Stemmata', to: '/stemmata.html' },
{ title: 'Collation', to: '/collation.html' },
{ title: 'Edition guidelines', to: '/editionguidelines.html' },
{ title: 'Related Literature', to: '/relatedliterature.html' },
],
}),
}
</script>
......@@ -9,7 +9,8 @@
>
<a
class="white--text text-overline text-decoration-none text-uppercase"
href="https://ahikar-dev.sub.uni-goettingen.de/syriac"
:href="editionSyriac.to"
:title="editionSyriac.title"
role="link"
tabindex="0"
>
......@@ -25,7 +26,8 @@
>
<a
class="white--text text-overline text-decoration-none text-uppercase"
href="https://ahikar-dev.sub.uni-goettingen.de/arabic-karshuni"
:href="editionArabic.to"
:title="editionArabic.title"
role="link"
tabindex="0"
>
......@@ -36,3 +38,13 @@
</v-layout>
</v-container>
</template>
<script>
import editionLinks from "../utilities/editionLinks";
export default {
data: () => ({
editionSyriac: editionLinks[0],
editionArabic: editionLinks[1]
})
}
</script>
export const baseUrlViewer = process.env.VUE_APP_BASE_URL_VIEWER;
import {baseUrlViewer} from "./constants";
export default [
{ title: 'Syriac Texts', to: baseUrlViewer + '/syriac' },
{ title: 'Arabic and Kashuni Texts', to: baseUrlViewer + '/arabic-karshuni' },
];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment