Skip to content

Commit 47b4233

Browse files
committed
Merge branch 'dsf.dev_restructuring_2.0' of https://github.com/datasharingframework/datasharingframework.github.io into dsf.dev_restructuring_2.0
2 parents e8143f6 + 5fe79c6 commit 47b4233

File tree

1,596 files changed

+53717
-56865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,596 files changed

+53717
-56865
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Move into docs folder
1010
cd docs
11+
### Install dependencies
12+
npm i
1113
### Build
1214
npm run docs:build
1315
### Run

docs/src/.vuepress/client.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { defineClientConfig } from 'vuepress/client'
2-
import { Layout as ParentLayout, NotFound } from "vuepress-theme-hope/client";
2+
import { Layout as ParentLayout } from "vuepress-theme-hope/client";
33

44
import Layout from './layouts/PageLayout.vue'
5+
import NotFoundLayout from './layouts/NotFoundLayout.vue'
56

67
export default defineClientConfig({
78
layouts: {
8-
//ParentLayout,
9-
Layout
9+
ParentLayout,
10+
Layout,
11+
NotFound: NotFoundLayout
1012
},
1113
})
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<script setup lang="ts">
2+
// import ParentLayout from '@vuepress/theme-default/layouts/Layout.vue'
3+
import { NotFound as ParentLayout, PageContent } from 'vuepress-theme-hope/client'
4+
import { useRoute, useRouter } from "vue-router";
5+
import { ref } from 'vue'
6+
7+
const route = useRoute();
8+
const router = useRouter();
9+
10+
function removeLastPathComponent(path) {
11+
const parts = path.replace(/\/+$/, '').split('/');
12+
parts.pop(); // Remove the last component
13+
const newPath = parts.join('/');
14+
return (newPath ? newPath : '') + '/';
15+
}
16+
17+
function redirectToParentDirectoryIfInOperations() : void {
18+
if (route.path.startsWith('/operations/')) {
19+
router.push(removeLastPathComponent(route.path));
20+
21+
}
22+
}
23+
24+
25+
redirectToParentDirectoryIfInOperations();
26+
27+
/*router.afterEach((_to, _from) => {
28+
redirectToParentDirectoryIfInOperations();
29+
30+
});*/
31+
32+
</script>
33+
34+
<template>
35+
<ParentLayout>
36+
<template #default>
37+
<div class="not-found-hint"><p class="error-code">404</p><h1 class="error-title">Page not found</h1><p class="error-hint">That’s a Four-Oh-Four.</p></div><div class="actions"><button type="button" class="action-button">Go back</button><button type="button" class="action-button">Take me home</button></div>
38+
</template>
39+
</ParentLayout>
40+
</template>
41+
42+
<style lang="css">
43+
.version-selector {
44+
margin-top: 20px;
45+
}
46+
</style>

docs/src/.vuepress/layouts/PageLayout.vue

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<script setup lang="ts">
2-
// import ParentLayout from '@vuepress/theme-default/layouts/Layout.vue'
32
import { Layout as ParentLayout, PageContent } from 'vuepress-theme-hope/client'
43
import { useRoute, useRouter } from "vue-router";
5-
import { ref } from 'vue'
4+
import { ref, onMounted } from 'vue'
65
76
const version = ref("");
7+
const latestVersion = "v1.8.0";
88
99
1010
function setVersionBasedOnCurrentPath() : void {
1111
if (route.path.startsWith('/operations/')) {
1212
const input = route.path.substring('/operations/'.length);
1313
const firstSlash = input.indexOf("/");
14-
const secondSlash = input.indexOf("/", firstSlash + 1);
15-
const result = secondSlash !== -1 ? input.slice(0, secondSlash) : input;
16-
14+
var result = firstSlash !== -1 ? input.slice(0, firstSlash) : input;
15+
if (result === "latest") {
16+
result = latestVersion;
17+
}
1718
version.value = result;
1819
1920
@@ -30,14 +31,20 @@ router.afterEach((_to, _from) => {
3031
setVersionBasedOnCurrentPath();
3132
});
3233
33-
setVersionBasedOnCurrentPath();
34+
onMounted(() => {
35+
setVersionBasedOnCurrentPath();
36+
})
3437
3538
function navigateToNewVersion() {
3639
const input = route.path.substring('/operations/'.length);
3740
const firstSlash = input.indexOf("/");
38-
const secondSlash = input.indexOf("/", firstSlash + 1);
39-
const result = secondSlash !== -1 ? input.slice(secondSlash + 1) : "";
40-
router.push('/operations/' + version.value + "/" + result);
41+
const result = firstSlash !== -1 ? input.slice(firstSlash + 1) : "";
42+
if (version.value === latestVersion) {
43+
router.push('/operations/' + "latest" + "/" + result);
44+
} else {
45+
router.push('/operations/' + version.value + "/" + result);
46+
47+
}
4148
}
4249
4350
</script>
@@ -46,22 +53,23 @@ function navigateToNewVersion() {
4653
<ParentLayout>
4754
<template #sidebarTop>
4855
<div class="version-selector" v-if="route.path.startsWith('/operations/')">
49-
<label class="vp-sidebar-header" for="version-select">Version: </label>
56+
<label class="vp-sidebar-header" for="version-select"><strong>Version:</strong> </label>
5057
<select id="version-select" class="vp-sidebar-header" v-model="version" @change="navigateToNewVersion">
51-
<option value="v2/latest">next (v2.0.0-M2)</option>
52-
<option value="v1/latest">latest (v1.7.1)</option>
53-
<option value="v1/v1.7.0">v1.7.0</option>
54-
<option value="v1/v1.6.0">v1.6.0</option>
55-
<option value="v1/v1.5.2">v1.5.2</option>
56-
<option value="v1/v1.5.1">v1.5.1</option>
57-
<option value="v1/v1.5.0">v1.5.0</option>
58-
<option value="v1/v1.4.0">v1.4.0</option>
59-
<option value="v1/v1.3.2">v1.3.2</option>
60-
<option value="v1/v1.3.1">v1.3.1</option>
61-
<option value="v1/v1.3.0">v1.3.0</option>
62-
<option value="v1/v1.2.0">v1.2.0</option>
63-
<option value="v1/v1.1.0">v1.1.0</option>
64-
<option value="v1/v1.0.0">v1.0.0</option>
58+
<option value="v1.8.0">latest (1.8.0)</option>
59+
<option value="v1.7.1">1.7.1</option>
60+
<option value="v1.7.0">1.7.0</option>
61+
<option value="v1.6.0">1.6.0</option>
62+
<option value="v1.5.2">1.5.2</option>
63+
<option value="v1.5.1">1.5.1</option>
64+
<option value="v1.5.0">1.5.0</option>
65+
<option value="v1.4.0">1.4.0</option>
66+
<option value="v1.3.2">1.3.2</option>
67+
<option value="v1.3.1">1.3.1</option>
68+
<option value="v1.3.0">1.3.0</option>
69+
<option value="v1.2.0">1.2.0</option>
70+
<option value="v1.1.0">1.1.0</option>
71+
<option value="v1.0.0">1.0.0</option>
72+
<option value="v2.0.0-M3">2.0.0-M3</option>
6573
</select></div>
6674
</template>
6775
<PageContent id="main-content" class="vp-page"/>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Manifest-Version: 1.0
2+
Created-By: Maven Javadoc Plugin 3.11.2
3+
Build-Jdk-Spec: 21
4+

0 commit comments

Comments
 (0)