shevchenko 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/shevchenko.js +120 -31
- package/dist/cjs/shevchenko.js.map +1 -1
- package/dist/es/shevchenko.js +120 -31
- package/dist/es/shevchenko.js.map +1 -1
- package/dist/umd/shevchenko.min.js +2 -2
- package/dist/umd/shevchenko.min.js.map +1 -1
- package/nuxt/.eslintrc.json +27 -0
- package/nuxt/.prettierrc.json +6 -0
- package/nuxt/README.md +27 -0
- package/nuxt/app.config.ts +3 -0
- package/nuxt/app.vue +5 -0
- package/nuxt/assets/img/shevchenko_pixelized_304x304.jpg +0 -0
- package/nuxt/assets/img/shevchenko_pixelized_304x304.png +0 -0
- package/nuxt/assets/img/shevchenko_pixelized_608x608.jpg +0 -0
- package/nuxt/assets/style/main.scss +3 -0
- package/nuxt/components/about-modal.vue +58 -0
- package/nuxt/components/api-spec.vue +25 -0
- package/nuxt/components/contact-me-button.vue +11 -0
- package/nuxt/components/contact-me-modal.vue +63 -0
- package/nuxt/components/copy-button.vue +38 -0
- package/nuxt/components/declension-demo.vue +32 -0
- package/nuxt/components/declension-form.vue +91 -0
- package/nuxt/components/declension-preview.vue +170 -0
- package/nuxt/components/declension-results.vue +116 -0
- package/nuxt/components/error-404.vue +15 -0
- package/nuxt/components/github-issue-count.vue +18 -0
- package/nuxt/components/how-it-works.vue +51 -0
- package/nuxt/components/installation-instructions.vue +33 -0
- package/nuxt/components/library-docs.vue +27 -0
- package/nuxt/components/page-copyright.vue +15 -0
- package/nuxt/components/page-footer.vue +32 -0
- package/nuxt/components/page-header.vue +4 -0
- package/nuxt/components/preview-banner.vue +32 -0
- package/nuxt/components/share-links.vue +108 -0
- package/nuxt/components/top-nav-bar.vue +165 -0
- package/nuxt/components/ukrainian-flag.vue +37 -0
- package/nuxt/components/usage-example.vue +32 -0
- package/nuxt/composables/declension.ts +81 -0
- package/nuxt/composables/page-i18n.ts +11 -0
- package/nuxt/composables/page-meta.ts +5 -0
- package/nuxt/composables/route-utils.ts +17 -0
- package/nuxt/config.ts +20 -0
- package/nuxt/error.vue +25 -0
- package/nuxt/layouts/default.vue +5 -0
- package/nuxt/locales/en-US.json +60 -0
- package/nuxt/locales/uk-UA.json +62 -0
- package/nuxt/nuxt.config.ts +99 -0
- package/nuxt/package-lock.json +19524 -0
- package/nuxt/package.json +37 -0
- package/nuxt/pages/en-US/index.vue +41 -0
- package/nuxt/pages/index.vue +68 -0
- package/nuxt/plugins/i18n.ts +26 -0
- package/nuxt/public/.nojekyll +0 -0
- package/nuxt/public/CNAME +1 -0
- package/nuxt/public/android-icon-144x144.png +0 -0
- package/nuxt/public/android-icon-192x192.png +0 -0
- package/nuxt/public/android-icon-36x36.png +0 -0
- package/nuxt/public/android-icon-48x48.png +0 -0
- package/nuxt/public/android-icon-72x72.png +0 -0
- package/nuxt/public/android-icon-96x96.png +0 -0
- package/nuxt/public/apple-icon-114x114.png +0 -0
- package/nuxt/public/apple-icon-120x120.png +0 -0
- package/nuxt/public/apple-icon-144x144.png +0 -0
- package/nuxt/public/apple-icon-152x152.png +0 -0
- package/nuxt/public/apple-icon-180x180.png +0 -0
- package/nuxt/public/apple-icon-57x57.png +0 -0
- package/nuxt/public/apple-icon-60x60.png +0 -0
- package/nuxt/public/apple-icon-72x72.png +0 -0
- package/nuxt/public/apple-icon-76x76.png +0 -0
- package/nuxt/public/apple-icon-precomposed.png +0 -0
- package/nuxt/public/apple-icon.png +0 -0
- package/nuxt/public/browserconfig.xml +2 -0
- package/nuxt/public/favicon-16x16.png +0 -0
- package/nuxt/public/favicon-32x32.png +0 -0
- package/nuxt/public/favicon-96x96.png +0 -0
- package/nuxt/public/favicon.ico +0 -0
- package/nuxt/public/manifest.json +41 -0
- package/nuxt/public/ms-icon-144x144.png +0 -0
- package/nuxt/public/ms-icon-150x150.png +0 -0
- package/nuxt/public/ms-icon-310x310.png +0 -0
- package/nuxt/public/ms-icon-70x70.png +0 -0
- package/nuxt/public/preview-608x608.jpg +0 -0
- package/nuxt/scripts/postgenerate.js +7 -0
- package/nuxt/scripts/publish.js +7 -0
- package/nuxt/server/plugins/google-tag-manager.js +37 -0
- package/nuxt/tsconfig.json +11 -0
- package/package.json +3 -2
- package/src/resources/inflector/rules.json +118 -30
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true
|
|
5
|
+
},
|
|
6
|
+
"globals": {
|
|
7
|
+
"useFetch": "readonly",
|
|
8
|
+
"useState": "readonly",
|
|
9
|
+
"useAppConfig": "readonly"
|
|
10
|
+
},
|
|
11
|
+
"extends": [
|
|
12
|
+
"plugin:prettier/recommended",
|
|
13
|
+
"eslint:recommended",
|
|
14
|
+
"plugin:vue/vue3-essential",
|
|
15
|
+
"@vue/eslint-config-typescript",
|
|
16
|
+
"plugin:import/typescript"
|
|
17
|
+
],
|
|
18
|
+
"parserOptions": {
|
|
19
|
+
"parser": "@typescript-eslint/parser"
|
|
20
|
+
},
|
|
21
|
+
"plugins": [
|
|
22
|
+
"vue"
|
|
23
|
+
],
|
|
24
|
+
"rules": {
|
|
25
|
+
"vue/no-multiple-template-root": "off"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/nuxt/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# shevchenko landing page
|
|
2
|
+
|
|
3
|
+
Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Make sure to install the dependencies:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Static site generation
|
|
14
|
+
|
|
15
|
+
Generate the static site to `.output/public` directory:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm run generate
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Development
|
|
22
|
+
|
|
23
|
+
Serve the static site from `.output/public` directory:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run serve
|
|
27
|
+
```
|
package/nuxt/app.vue
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted } from 'vue';
|
|
3
|
+
|
|
4
|
+
const appConfig = useAppConfig();
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
|
|
7
|
+
onMounted(() => {
|
|
8
|
+
if (route.hash === '#about') {
|
|
9
|
+
$('#about-modal').modal('show');
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div
|
|
16
|
+
id="about-modal"
|
|
17
|
+
class="modal fade"
|
|
18
|
+
tabindex="-1"
|
|
19
|
+
role="dialog"
|
|
20
|
+
aria-labelledby="about-label"
|
|
21
|
+
>
|
|
22
|
+
<div class="modal-dialog" role="document">
|
|
23
|
+
<div class="modal-content">
|
|
24
|
+
<div class="modal-header">
|
|
25
|
+
<h4 id="about-label" class="modal-title">
|
|
26
|
+
{{ $t('about.modalTitle', { appName: appConfig.library.name }) }}
|
|
27
|
+
</h4>
|
|
28
|
+
|
|
29
|
+
<button type="button" class="close" data-dismiss="modal" :aria-label="$t('action.close')">
|
|
30
|
+
<span aria-hidden="true">×</span>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="modal-body">
|
|
35
|
+
<p>
|
|
36
|
+
{{ $t('about.modalMessage') }}
|
|
37
|
+
</p>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="modal-footer">
|
|
41
|
+
<nav>
|
|
42
|
+
<ul class="list-unstyled mb-0" role="menubar">
|
|
43
|
+
<p class="d-inline mr-2 mb-0">
|
|
44
|
+
<PageCopyright />
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<p class="d-inline mr-2 mb-0">
|
|
48
|
+
<ContactMeButton data-dismiss="modal" button-class="btn btn-link p-0">
|
|
49
|
+
{{ $t('action.contactMe') }}
|
|
50
|
+
</ContactMeButton>
|
|
51
|
+
</p>
|
|
52
|
+
</ul>
|
|
53
|
+
</nav>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useI18n } from 'vue-i18n';
|
|
3
|
+
|
|
4
|
+
const { t: $t } = useI18n();
|
|
5
|
+
|
|
6
|
+
// prettier-ignore
|
|
7
|
+
let apiSpec = `
|
|
8
|
+
shevchenko.inNominative(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inNominativeCase')}
|
|
9
|
+
shevchenko.inGenitive(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inGenitiveCase')}
|
|
10
|
+
shevchenko.inDative(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inDativeCase')}
|
|
11
|
+
shevchenko.inAccusative(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inAccusativeCase')}
|
|
12
|
+
shevchenko.inAblative(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inAblativeCase')}
|
|
13
|
+
shevchenko.inLocative(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inLocativeCase')}
|
|
14
|
+
shevchenko.inVocative(anthroponym: Anthroponym): Anthroponym; // ${$t('action.inflect.inVocativeCase')}
|
|
15
|
+
`;
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div id="api-spec" class="card my-3">
|
|
20
|
+
<div class="card-body">
|
|
21
|
+
<h5 class="card-title mb-3">API</h5>
|
|
22
|
+
<pre class="mb-0">{{ apiSpec.trim() }}</pre>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import { useI18n } from 'vue-i18n';
|
|
4
|
+
|
|
5
|
+
const appConfig = useAppConfig();
|
|
6
|
+
const { t: $t } = useI18n();
|
|
7
|
+
|
|
8
|
+
const mailtoUrl = computed(() => {
|
|
9
|
+
const url = new URL(`mailto:${appConfig.website.email}`);
|
|
10
|
+
url.searchParams.set('subject', $t('contactMe.messageSubject').toString());
|
|
11
|
+
return url.toString();
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
id="contact-me-modal"
|
|
18
|
+
class="modal fade"
|
|
19
|
+
tabindex="-1"
|
|
20
|
+
role="dialog"
|
|
21
|
+
aria-labelledby="contact-me-label"
|
|
22
|
+
>
|
|
23
|
+
<div class="modal-dialog" role="document">
|
|
24
|
+
<div class="modal-content">
|
|
25
|
+
<div class="modal-header">
|
|
26
|
+
<h4 id="contact-me-label" class="modal-title">
|
|
27
|
+
{{ $t('contactMe.modalTitle') }}
|
|
28
|
+
</h4>
|
|
29
|
+
|
|
30
|
+
<button type="button" class="close" data-dismiss="modal" :aria-label="$t('action.close')">
|
|
31
|
+
<span aria-hidden="true">×</span>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="modal-body">
|
|
36
|
+
<p>
|
|
37
|
+
{{ $t('contactMe.modalMessage') }}
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<div class="input-group mb-3">
|
|
41
|
+
<input
|
|
42
|
+
:value="appConfig.website.email"
|
|
43
|
+
readonly
|
|
44
|
+
type="email"
|
|
45
|
+
class="form-control"
|
|
46
|
+
:aria-label="$t('contactMe.recipientEmail')"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="modal-footer">
|
|
52
|
+
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">
|
|
53
|
+
{{ $t('action.close') }}
|
|
54
|
+
</button>
|
|
55
|
+
|
|
56
|
+
<a target="_blank" :href="mailtoUrl" class="btn btn-primary">
|
|
57
|
+
<i aria-hidden="true" class="fa fa-paper-plane"></i> {{ $t('action.write') }}
|
|
58
|
+
</a>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useClipboard } from '@vueuse/core';
|
|
3
|
+
import { computed, toRefs } from 'vue';
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
source: { type: String, required: true },
|
|
7
|
+
trim: { type: Boolean, default: true },
|
|
8
|
+
buttonId: { type: String, required: false },
|
|
9
|
+
buttonClass: { type: String, default: 'btn btn-btn btn-link py-0 px-1' },
|
|
10
|
+
buttonTitle: { type: String, default: null },
|
|
11
|
+
iconClass: { type: String, default: 'fa fa-clipboard' },
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const { source, trim } = toRefs(props);
|
|
15
|
+
|
|
16
|
+
const modifiedSource = computed(() => {
|
|
17
|
+
return trim.value ? source.value.trim() : source.value;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const { copy, copied } = useClipboard({
|
|
21
|
+
source: modifiedSource,
|
|
22
|
+
legacy: true,
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
:title="buttonTitle ?? $t('action.copy')"
|
|
30
|
+
:aria-label="$t('action.copy')"
|
|
31
|
+
@click="copy()"
|
|
32
|
+
:id="buttonId"
|
|
33
|
+
:class="buttonClass"
|
|
34
|
+
>
|
|
35
|
+
<i v-if="copied" aria-hidden="true" class="fa fa-check"></i>
|
|
36
|
+
<i v-else aria-hidden="true" :class="iconClass"></i>
|
|
37
|
+
</button>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section id="demo" class="my-4">
|
|
3
|
+
<div class="row mb-3">
|
|
4
|
+
<div class="col-12 col-lg-9">
|
|
5
|
+
<h2 class="mb-0">
|
|
6
|
+
{{ $t('demo') }}
|
|
7
|
+
<small class="d-block h6 text-muted mt-2 mb-0">
|
|
8
|
+
{{ $t('demo.message') }}
|
|
9
|
+
</small>
|
|
10
|
+
</h2>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="col-12 col-lg-3">
|
|
14
|
+
<div class="d-flex">
|
|
15
|
+
<ShareLinks buttons-class="ml-auto" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="row">
|
|
21
|
+
<div class="col-lg-5 mb-2 mb-lg-0">
|
|
22
|
+
<DeclensionForm v-bind="$attrs" />
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="col-lg-7">
|
|
26
|
+
<div class="card mb-2">
|
|
27
|
+
<DeclensionResults />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Anthroponym, Gender } from 'shevchenko';
|
|
3
|
+
import { toRefs, PropType } from 'vue';
|
|
4
|
+
import { shevchenkoAnthroponym, useDeclension } from '~/composables/declension';
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
initialAnthroponym: { type: Object as PropType<Anthroponym>, default: () => ({}) },
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const { initialAnthroponym } = toRefs(props);
|
|
11
|
+
|
|
12
|
+
const emit = defineEmits(['declension']);
|
|
13
|
+
|
|
14
|
+
const { anthroponym, inflect } = useDeclension(initialAnthroponym.value);
|
|
15
|
+
|
|
16
|
+
function onInflect(): void {
|
|
17
|
+
inflect();
|
|
18
|
+
emit('declension', anthroponym);
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<form id="declension-form" @submit.prevent="onInflect">
|
|
24
|
+
<div class="card">
|
|
25
|
+
<div class="card-body">
|
|
26
|
+
<div class="alert alert-info" role="alert">
|
|
27
|
+
{{ $t('declensionForm.instructionMessage') }}
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="form-group">
|
|
31
|
+
<label class="radio-inline mr-2" v-for="gender in Gender" :key="gender">
|
|
32
|
+
<input v-model="anthroponym.gender" type="radio" name="gender" :value="gender" />
|
|
33
|
+
{{ $t(`gender.${gender}`) }}
|
|
34
|
+
</label>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="form-group">
|
|
38
|
+
<label for="last-name">
|
|
39
|
+
{{ $t('anthroponym.lastName') }}
|
|
40
|
+
</label>
|
|
41
|
+
<input
|
|
42
|
+
v-model.trim="anthroponym.lastName"
|
|
43
|
+
type="text"
|
|
44
|
+
class="form-control"
|
|
45
|
+
name="last-name"
|
|
46
|
+
id="last-name"
|
|
47
|
+
:placeholder="shevchenkoAnthroponym.lastName"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div class="form-group">
|
|
52
|
+
<label for="first-name">
|
|
53
|
+
{{ $t('anthroponym.firstName') }}
|
|
54
|
+
</label>
|
|
55
|
+
<input
|
|
56
|
+
v-model.trim="anthroponym.firstName"
|
|
57
|
+
type="text"
|
|
58
|
+
class="form-control"
|
|
59
|
+
name="first-name"
|
|
60
|
+
id="first-name"
|
|
61
|
+
:placeholder="shevchenkoAnthroponym.firstName"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="form-group">
|
|
66
|
+
<label for="middle-name">
|
|
67
|
+
{{ $t('anthroponym.middleName') }}
|
|
68
|
+
</label>
|
|
69
|
+
<input
|
|
70
|
+
v-model.trim="anthroponym.middleName"
|
|
71
|
+
type="text"
|
|
72
|
+
class="form-control"
|
|
73
|
+
name="middle-name"
|
|
74
|
+
id="middle-name"
|
|
75
|
+
:placeholder="shevchenkoAnthroponym.middleName"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<div class="card-footer">
|
|
81
|
+
<button type="submit" class="btn btn-primary">
|
|
82
|
+
{{ $t('action.inflect') }}
|
|
83
|
+
</button>
|
|
84
|
+
|
|
85
|
+
<ContactMeButton button-class="btn btn-link pull-right">
|
|
86
|
+
{{ $t('foundBug') }}
|
|
87
|
+
</ContactMeButton>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</form>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import { useIntervalFn } from '@vueuse/core';
|
|
4
|
+
import * as shevchenko from 'shevchenko';
|
|
5
|
+
|
|
6
|
+
const anthroponyms: shevchenko.Anthroponym[] = [
|
|
7
|
+
{
|
|
8
|
+
gender: shevchenko.Gender.Male,
|
|
9
|
+
lastName: 'Шевченко',
|
|
10
|
+
firstName: 'Тарас',
|
|
11
|
+
middleName: 'Григорович',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
gender: shevchenko.Gender.Male,
|
|
15
|
+
lastName: 'Франко',
|
|
16
|
+
firstName: 'Іван',
|
|
17
|
+
middleName: 'Якович',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
gender: shevchenko.Gender.Male,
|
|
21
|
+
lastName: 'Нечуй-Левицький',
|
|
22
|
+
firstName: 'Іван',
|
|
23
|
+
middleName: 'Семенович',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
gender: shevchenko.Gender.Male,
|
|
27
|
+
lastName: 'Рудченко',
|
|
28
|
+
firstName: 'Панас',
|
|
29
|
+
middleName: 'Якович',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
gender: shevchenko.Gender.Male,
|
|
33
|
+
lastName: 'Рудченко',
|
|
34
|
+
firstName: 'Іван',
|
|
35
|
+
middleName: 'Якович',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
gender: shevchenko.Gender.Male,
|
|
39
|
+
lastName: "Лозов'яга",
|
|
40
|
+
firstName: 'Іван',
|
|
41
|
+
middleName: 'Павлович',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
gender: shevchenko.Gender.Male,
|
|
45
|
+
lastName: 'Котляревський',
|
|
46
|
+
firstName: 'Іван',
|
|
47
|
+
middleName: 'Петрович',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
gender: shevchenko.Gender.Male,
|
|
51
|
+
lastName: 'Сосюра',
|
|
52
|
+
firstName: 'Володимир',
|
|
53
|
+
middleName: 'Миколайович',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
gender: shevchenko.Gender.Male,
|
|
57
|
+
lastName: 'Тичина',
|
|
58
|
+
firstName: 'Павло',
|
|
59
|
+
middleName: 'Григорович',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
gender: shevchenko.Gender.Male,
|
|
63
|
+
lastName: 'Симоненко',
|
|
64
|
+
firstName: 'Василь',
|
|
65
|
+
middleName: 'Андрійович',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
gender: shevchenko.Gender.Male,
|
|
69
|
+
lastName: 'Фітільов',
|
|
70
|
+
firstName: 'Микола',
|
|
71
|
+
middleName: 'Григорович',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
gender: shevchenko.Gender.Male,
|
|
75
|
+
lastName: 'Коцюбинський',
|
|
76
|
+
firstName: 'Михайло',
|
|
77
|
+
middleName: 'Михайлович',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
gender: shevchenko.Gender.Male,
|
|
81
|
+
lastName: 'Сковорода',
|
|
82
|
+
firstName: 'Григорій',
|
|
83
|
+
middleName: 'Савич',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
gender: shevchenko.Gender.Male,
|
|
87
|
+
lastName: 'Куліш',
|
|
88
|
+
firstName: 'Пантелеймон',
|
|
89
|
+
middleName: 'Олександрович',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
gender: shevchenko.Gender.Male,
|
|
93
|
+
lastName: 'Глібов',
|
|
94
|
+
firstName: 'Леонід',
|
|
95
|
+
middleName: 'Іванович',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
gender: shevchenko.Gender.Male,
|
|
99
|
+
lastName: 'Гончар',
|
|
100
|
+
firstName: 'Олександр',
|
|
101
|
+
middleName: 'Терентійович',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
gender: shevchenko.Gender.Male,
|
|
105
|
+
lastName: 'Довженко',
|
|
106
|
+
firstName: 'Олександр',
|
|
107
|
+
middleName: 'Петрович',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
gender: shevchenko.Gender.Female,
|
|
111
|
+
lastName: 'Косач-Квітка',
|
|
112
|
+
firstName: 'Лариса',
|
|
113
|
+
middleName: 'Петрівна',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
gender: shevchenko.Gender.Female,
|
|
117
|
+
lastName: 'Косач',
|
|
118
|
+
firstName: 'Ольга',
|
|
119
|
+
middleName: 'Петрівна',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
gender: shevchenko.Gender.Female,
|
|
123
|
+
lastName: 'Вілінська',
|
|
124
|
+
firstName: 'Марія',
|
|
125
|
+
middleName: 'Олександрівна',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
gender: shevchenko.Gender.Female,
|
|
129
|
+
lastName: 'Кобилянська',
|
|
130
|
+
firstName: 'Ольга',
|
|
131
|
+
middleName: 'Юліанівна',
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
const anthroponym = ref(shevchenko.inVocative(anthroponyms[0]));
|
|
136
|
+
|
|
137
|
+
// Shuffle the array of anthroponyms before the preview.
|
|
138
|
+
anthroponyms.sort(() => (Math.random() > 0.5 ? 1 : -1));
|
|
139
|
+
|
|
140
|
+
let index = 0;
|
|
141
|
+
function previewNextAnthroponym(): void {
|
|
142
|
+
index = index + 1;
|
|
143
|
+
if (index > anthroponyms.length - 1) {
|
|
144
|
+
index = 0;
|
|
145
|
+
}
|
|
146
|
+
anthroponym.value = shevchenko.inVocative(anthroponyms[index]);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
useIntervalFn(previewNextAnthroponym, 5_000);
|
|
150
|
+
</script>
|
|
151
|
+
|
|
152
|
+
<template>
|
|
153
|
+
<transition name="preview" mode="out-in">
|
|
154
|
+
<span :key="`${anthroponym.firstName}${anthroponym.middleName}${anthroponym.lastName}`">
|
|
155
|
+
{{ anthroponym.firstName }} {{ anthroponym.middleName }} {{ anthroponym.lastName }}
|
|
156
|
+
</span>
|
|
157
|
+
</transition>
|
|
158
|
+
</template>
|
|
159
|
+
|
|
160
|
+
<style scoped>
|
|
161
|
+
.preview-enter-active,
|
|
162
|
+
.preview-leave-active {
|
|
163
|
+
transition: opacity 0.4s;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.preview-enter,
|
|
167
|
+
.preview-leave-active {
|
|
168
|
+
opacity: 0;
|
|
169
|
+
}
|
|
170
|
+
</style>
|