Skip to content

Commit

Permalink
Merge pull request #2
Browse files Browse the repository at this point in the history
Feat/imprint service
  • Loading branch information
oliviareichl authored Nov 6, 2023
2 parents 54a60b0 + 380123e commit 88cc631
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/OADFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const frontenVersion = `${config.public.gitTag ?? "version"} - ${
style="font-size: 0.75em"
class="w-50 mx-auto d-flex justify-center justify-space-between align-center">
<div>
<NuxtLink style="text-decoration: none; color: inherit" to="/">Home</NuxtLink>
<NuxtLink style="text-decoration: none; color: inherit" to="/imprint">{{ $t('global.imprint') }}</NuxtLink>
</div>

<div class="text-center" >
Expand Down
4 changes: 2 additions & 2 deletions deployment/loadContent.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from "fs-extra";

const clonedContentPath = "temp";

// from env variable or argument or default value
// from .env variable or argument or default value
const repo =
process.env.CONTENT_REPO ?? process.argv[2] ?? "acdh-oeaw/OpenAtlas-Discovery-Content-Template";
const branch = process.env.CONTENT_BRANCH ?? process.argv[3] ?? "main";
Expand Down Expand Up @@ -40,7 +40,7 @@ if (fs.existsSync(clonedContentPath)) {
*/
function cloneRepo(targetpath, repo, branch, useHttp = true) {
// From https://cheatcode.co/tutorials/how-to-clone-and-sync-a-github-repo-via-node-js
// child_process.execSync(`git clone ${getBranch(branch)} https://${username}:${process.env.PERSONAL_ACCESS_TOKEN}@github.com/${username}/${repo}.git ${targetpath}`);
// child_process.execSync(`git clone ${getBranch(branch)} https://${username}:${process..env.PERSONAL_ACCESS_TOKEN}@github.com/${username}/${repo}.git ${targetpath}`);

if (fs.existsSync(targetpath)) {
fs.rmSync(clonedContentPath, { recursive: true, force: true });
Expand Down
3 changes: 2 additions & 1 deletion locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"end to": "Ende bis",
"realation to id": "Beziehung-ID",
"id": "ID"
}
},
"imprint": "Impressum"
},
"components": {
"entity": {
Expand Down
3 changes: 2 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"end to": "end to",
"realation to id": "realation to id",
"id": "id"
}
},
"imprint": "Imprint"
},
"components": {
"entity": {
Expand Down
15 changes: 15 additions & 0 deletions pages/imprint.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div class="ma-16 ">
<h1>{{ $t('global.imprint') }}</h1>
<div v-html="data" />
</div>
</template>
<script setup lang="ts">
const imprintServiceURL = 'https://imprint.acdh.oeaw.ac.at/';
const serviceID = '21614';
const { locale } = useI18n();
const { data } = await useFetch(imprintServiceURL + serviceID + `/?locale=${locale.value}`);
</script>

0 comments on commit 88cc631

Please sign in to comment.