erudit 4.0.0-dev.4 → 4.0.0-dev.5
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/.nuxtrc +1 -1
- package/app/app.vue +34 -34
- package/app/components/EruditLink.ts +7 -7
- package/app/components/FancyBold.vue +16 -16
- package/app/components/FancyCard.vue +52 -58
- package/app/components/FancyCardTag.vue +16 -16
- package/app/components/Loading.vue +7 -7
- package/app/components/Prose.vue +55 -52
- package/app/components/ScrollHolder.vue +13 -13
- package/app/components/SmartMedia.vue +107 -112
- package/app/components/ads/Ads.vue +17 -17
- package/app/components/ads/AdsBannerAside.vue +29 -29
- package/app/components/ads/AdsBannerBottom.vue +6 -6
- package/app/components/ads/AdsReplacer.vue +19 -21
- package/app/components/ads/provider/Custom.vue +9 -9
- package/app/components/ads/provider/Yandex.vue +56 -56
- package/app/components/aside/AsideListItem.vue +47 -52
- package/app/components/aside/AsideMajor.vue +6 -6
- package/app/components/aside/AsideMinor.vue +47 -52
- package/app/components/aside/AsidePlainMessage.vue +9 -9
- package/app/components/aside/AsideSwitch.vue +53 -54
- package/app/components/aside/major/PaneHolder.vue +61 -61
- package/app/components/aside/major/PaneSwitcher.vue +50 -55
- package/app/components/aside/major/PaneSwitcherButton.vue +24 -24
- package/app/components/aside/major/PaneTemplate.vue +3 -3
- package/app/components/aside/major/SiteInfo.vue +40 -42
- package/app/components/aside/major/contentNav/PaneBookNav.vue +107 -116
- package/app/components/aside/major/contentNav/PaneGlobalNav.vue +19 -19
- package/app/components/aside/major/contentNav/items/ContentNavBook.vue +8 -8
- package/app/components/aside/major/contentNav/items/ContentNavFolder.vue +55 -56
- package/app/components/aside/major/contentNav/items/ContentNavItem.vue +16 -16
- package/app/components/aside/major/contentNav/items/ContentNavPage.vue +2 -6
- package/app/components/aside/major/contentNav/items/ContentNavSeparator.vue +34 -35
- package/app/components/aside/major/contentNav/items/ContentNavTopic.vue +6 -6
- package/app/components/aside/major/contentNav/items/Flags.vue +31 -33
- package/app/components/aside/major/contentNav/items/ItemTemplate.vue +13 -13
- package/app/components/aside/major/languages/PaneLanguages.vue +40 -40
- package/app/components/aside/major/pages/PanePages.vue +45 -45
- package/app/components/aside/major/search/PaneSearch.vue +109 -100
- package/app/components/aside/major/search/SearchInput.vue +52 -53
- package/app/components/aside/major/search/SearchResult.vue +123 -75
- package/app/components/aside/major/search/SearchStatus.vue +28 -28
- package/app/components/aside/major/search/search.worker.ts +129 -129
- package/app/components/aside/major/settings/BuildTime.vue +15 -15
- package/app/components/aside/major/settings/EngineVersion.vue +8 -7
- package/app/components/aside/major/settings/PaneSettings.vue +8 -8
- package/app/components/aside/major/settings/ThemeSwitcher.vue +36 -36
- package/app/components/aside/major/settings/repository/Repository.vue +18 -18
- package/app/components/aside/major/settings/repository/SecondaryGitHub.vue +47 -47
- package/app/components/aside/minor/AsideMinorPane.vue +5 -5
- package/app/components/aside/minor/AsideMinorPlainHeader.vue +20 -20
- package/app/components/aside/minor/content/AsideMinorContentContributions.vue +47 -51
- package/app/components/aside/minor/content/AsideMinorContentPage.vue +37 -37
- package/app/components/aside/minor/content/AsideMinorContentTopic.vue +61 -66
- package/app/components/aside/minor/content/ButtonPaneContributions.vue +101 -114
- package/app/components/aside/minor/content/ButtonPaneImprove.vue +112 -123
- package/app/components/aside/minor/content/Contribution.vue +36 -36
- package/app/components/aside/minor/content/Toc.vue +163 -163
- package/app/components/aside/minor/content/TocItem.vue +91 -91
- package/app/components/aside/minor/content/TopicPartButton.vue +35 -35
- package/app/components/aside/minor/contributor/AsideMinorContributor.vue +36 -39
- package/app/components/aside/minor/contributor/ItemBook.vue +33 -39
- package/app/components/aside/minor/contributor/ItemContent.vue +17 -17
- package/app/components/aside/minor/news/AsideMinorNews.vue +132 -132
- package/app/components/aside/minor/news/NewsItem.vue +69 -69
- package/app/components/aside/minor/news/RenderNewsElement.vue +42 -42
- package/app/components/aside/minor/news/elements/Mix.vue +11 -11
- package/app/components/aside/minor/news/elements/P.vue +14 -14
- package/app/components/aside/minor/news/elements/Ref.vue +59 -58
- package/app/components/aside/minor/news/elements/Text.vue +18 -18
- package/app/components/indexPage/IndexPagePersons.vue +116 -117
- package/app/components/main/MainAction.vue +26 -26
- package/app/components/main/MainBreadcrumbs.vue +28 -28
- package/app/components/main/MainContentChild.vue +44 -47
- package/app/components/main/MainContentChildren.vue +13 -14
- package/app/components/main/MainDecoration.vue +15 -15
- package/app/components/main/MainDescription.vue +13 -13
- package/app/components/main/MainFlag.vue +129 -133
- package/app/components/main/MainFlags.vue +17 -17
- package/app/components/main/MainGlow.vue +12 -12
- package/app/components/main/MainQuickLink.vue +90 -91
- package/app/components/main/MainQuickLinks.vue +40 -40
- package/app/components/main/MainQuote.vue +149 -161
- package/app/components/main/MainQuoteLoader.vue +86 -86
- package/app/components/main/MainSection.vue +44 -44
- package/app/components/main/MainSectionPreamble.vue +5 -5
- package/app/components/main/MainSubTitle.vue +11 -12
- package/app/components/main/MainTitle.vue +32 -32
- package/app/components/main/MainTopicPartPage.vue +88 -88
- package/app/components/main/MainTopicPartSwitch.vue +67 -71
- package/app/components/main/connections/Deps.vue +30 -34
- package/app/components/main/connections/Externals.vue +80 -104
- package/app/components/main/connections/MainConnections.vue +90 -94
- package/app/components/main/connections/MainConnectionsButton.vue +81 -81
- package/app/components/main/connections/ScrollPane.vue +10 -10
- package/app/components/main/contentStats/Item.vue +28 -34
- package/app/components/main/contentStats/ItemElement.vue +19 -19
- package/app/components/main/contentStats/ItemMaterials.vue +11 -11
- package/app/components/main/contentStats/MainContentStats.vue +50 -53
- package/app/components/preview/Preview.vue +110 -118
- package/app/components/preview/PreviewError.vue +4 -4
- package/app/components/preview/PreviewLoading.vue +3 -3
- package/app/components/preview/PreviewScreen.vue +48 -48
- package/app/components/preview/PreviewScreenButton.vue +27 -27
- package/app/components/preview/screen/ContentPage.vue +27 -30
- package/app/components/preview/screen/DirectLink.vue +13 -13
- package/app/components/preview/screen/Unique.vue +31 -32
- package/app/components/site/SiteAside.vue +50 -51
- package/app/components/site/SiteAsideOverlay.vue +8 -8
- package/app/components/site/SiteMain.vue +11 -11
- package/app/components/transition/Fade.vue +16 -16
- package/app/components/transition/Slide.vue +27 -27
- package/app/components/tree/TreeContainer.vue +3 -3
- package/app/components/tree/TreeItem.vue +27 -31
- package/app/composables/ads.ts +11 -11
- package/app/composables/analytics.ts +102 -102
- package/app/composables/appElements.ts +21 -21
- package/app/composables/aside.ts +15 -15
- package/app/composables/asideMajorPane.ts +82 -82
- package/app/composables/asideMinor.ts +109 -109
- package/app/composables/contentNav.ts +7 -7
- package/app/composables/favicon.ts +103 -108
- package/app/composables/file.ts +4 -3
- package/app/composables/formatText.ts +100 -100
- package/app/composables/loading.ts +26 -26
- package/app/composables/mainContent.ts +22 -22
- package/app/composables/og.ts +184 -182
- package/app/composables/phrases.ts +98 -98
- package/app/composables/preview.ts +44 -44
- package/app/composables/route.ts +4 -2
- package/app/composables/theme.ts +47 -51
- package/app/composables/url.ts +19 -11
- package/app/formatters/ru.ts +14 -14
- package/app/pages/article/[...articleId].vue +12 -12
- package/app/pages/book/[...bookId].vue +56 -56
- package/app/pages/contributor/[contributorId].vue +144 -150
- package/app/pages/contributors.vue +95 -102
- package/app/pages/group/[...groupId].vue +58 -58
- package/app/pages/index.vue +113 -117
- package/app/pages/page/[...pageId].vue +60 -60
- package/app/pages/practice/[...practiceId].vue +12 -12
- package/app/pages/sponsors.vue +88 -92
- package/app/pages/summary/[...summaryId].vue +12 -12
- package/app/plugins/appSetup/client/htmlBranding.ts +6 -6
- package/app/plugins/appSetup/client/welcome.ts +37 -35
- package/app/plugins/appSetup/config.ts +6 -6
- package/app/plugins/appSetup/global.ts +3 -3
- package/app/plugins/appSetup/index.ts +27 -28
- package/app/plugins/prerender.server.ts +40 -40
- package/app/router.options.ts +5 -5
- package/app/scripts/theme.js +21 -24
- package/app/styles/main.css +128 -124
- package/bin/erudit.js +12 -0
- package/modules/erudit/env.ts +8 -0
- package/modules/erudit/globals/content.ts +4 -4
- package/modules/erudit/globals/contributor.ts +1 -1
- package/modules/erudit/globals/eruditConfig.ts +5 -10
- package/modules/erudit/globals/problem.ts +1 -1
- package/modules/erudit/globals/prose.ts +1 -1
- package/modules/erudit/globals/public.ts +18 -18
- package/modules/erudit/index.ts +50 -60
- package/modules/erudit/logger.ts +10 -10
- package/modules/erudit/setup/elements/appTemplate.ts +44 -45
- package/modules/erudit/setup/elements/globalTemplate.ts +82 -82
- package/modules/erudit/setup/elements/globalTypes.ts +259 -273
- package/modules/erudit/setup/elements/setup.ts +163 -167
- package/modules/erudit/setup/elements/shared.ts +10 -10
- package/modules/erudit/setup/elements/tagsTable.ts +28 -28
- package/modules/erudit/setup/fullRestart.ts +61 -71
- package/modules/erudit/setup/globals.ts +206 -196
- package/modules/erudit/setup/publicAssets.ts +43 -52
- package/modules/erudit/setup/runtimeConfig.ts +106 -58
- package/modules/erudit/watcher.ts +20 -27
- package/nuxt.config.ts +102 -84
- package/package.json +51 -55
- package/server/api/aside/major/frontNav/book/[...shortId].ts +10 -10
- package/server/api/aside/major/frontNav/global.ts +5 -5
- package/server/api/aside/major/pages.ts +6 -6
- package/server/api/contributor/list.ts +60 -61
- package/server/api/contributor/page/[contributorId].ts +68 -68
- package/server/api/indexPage.ts +81 -81
- package/server/api/language/functions.ts +11 -11
- package/server/api/language/phrase/[phraseKey].ts +35 -35
- package/server/api/main/content/[...contentTypePath].ts +149 -153
- package/server/api/news/batch/[batchIndex].ts +5 -5
- package/server/api/pageSponsors.ts +56 -58
- package/server/api/prerender/content.ts +79 -82
- package/server/api/prerender/default.ts +35 -35
- package/server/api/prerender/files.ts +10 -10
- package/server/api/prerender/frontNav.ts +13 -13
- package/server/api/prerender/language.ts +7 -7
- package/server/api/prerender/news.ts +8 -8
- package/server/api/prerender/quotes.ts +15 -15
- package/server/api/preview/contentPage/[...contentTypePath].ts +63 -63
- package/server/api/preview/contentUnique/[...contentTypePathUnique].ts +73 -81
- package/server/api/problemScript/[...problemScriptPath].ts +88 -92
- package/server/api/quote/data/[quoteId].ts +84 -87
- package/server/api/quote/ids.ts +3 -3
- package/server/erudit/build.ts +132 -137
- package/server/erudit/cameos/build.ts +161 -161
- package/server/erudit/config.ts +13 -13
- package/server/erudit/content/global/build.ts +300 -297
- package/server/erudit/content/global/singleton.ts +5 -5
- package/server/erudit/content/nav/build.ts +459 -463
- package/server/erudit/content/nav/front.ts +125 -127
- package/server/erudit/content/nav/repository/books.ts +37 -40
- package/server/erudit/content/nav/repository/get.ts +33 -33
- package/server/erudit/content/nav/repository/hasChildren.ts +5 -5
- package/server/erudit/content/nav/repository/hasNav.ts +3 -3
- package/server/erudit/content/nav/repository/hasParent.ts +5 -5
- package/server/erudit/content/nav/repository/id.ts +9 -9
- package/server/erudit/content/nav/repository/index.ts +9 -9
- package/server/erudit/content/nav/repository/order.ts +14 -14
- package/server/erudit/content/nav/repository/previousNext.ts +35 -35
- package/server/erudit/content/nav/repository/walk.ts +127 -127
- package/server/erudit/content/nav/setup.ts +13 -13
- package/server/erudit/content/nav/types.ts +24 -24
- package/server/erudit/content/repository/breadcrumbs.ts +24 -24
- package/server/erudit/content/repository/children.ts +47 -47
- package/server/erudit/content/repository/connections.ts +35 -35
- package/server/erudit/content/repository/contentLink.ts +16 -16
- package/server/erudit/content/repository/decoration.ts +23 -23
- package/server/erudit/content/repository/deps.ts +121 -84
- package/server/erudit/content/repository/description.ts +11 -11
- package/server/erudit/content/repository/elementSnippets.ts +105 -105
- package/server/erudit/content/repository/externals.ts +50 -50
- package/server/erudit/content/repository/flags.ts +33 -33
- package/server/erudit/content/repository/seo.ts +12 -12
- package/server/erudit/content/repository/stats.ts +97 -97
- package/server/erudit/content/repository/title.ts +27 -27
- package/server/erudit/content/repository/topicParts.ts +39 -39
- package/server/erudit/content/repository/unique.ts +76 -76
- package/server/erudit/content/resolve/book.ts +29 -32
- package/server/erudit/content/resolve/group.ts +34 -39
- package/server/erudit/content/resolve/index.ts +272 -290
- package/server/erudit/content/resolve/page.ts +80 -87
- package/server/erudit/content/resolve/topic.ts +220 -246
- package/server/erudit/content/resolve/utils/contentError.ts +10 -10
- package/server/erudit/content/resolve/utils/insertContentItem.ts +113 -122
- package/server/erudit/content/resolve/utils/insertContentResolved.ts +126 -132
- package/server/erudit/content/search.ts +146 -163
- package/server/erudit/contributors/build.ts +158 -166
- package/server/erudit/contributors/global.ts +3 -3
- package/server/erudit/contributors/repository/avatarUrl.ts +10 -10
- package/server/erudit/contributors/repository/contributions.ts +171 -178
- package/server/erudit/contributors/repository/count.ts +3 -3
- package/server/erudit/contributors/search.ts +34 -34
- package/server/erudit/db/repository/pushFile.ts +23 -26
- package/server/erudit/db/repository/pushProblemScript.ts +19 -19
- package/server/erudit/db/repository/pushProseLink.ts +40 -40
- package/server/erudit/db/schema/cameos.ts +7 -7
- package/server/erudit/db/schema/content.ts +18 -18
- package/server/erudit/db/schema/contentContributions.ts +15 -15
- package/server/erudit/db/schema/contentDeps.ts +21 -21
- package/server/erudit/db/schema/contentElementStats.ts +20 -20
- package/server/erudit/db/schema/contentProseLinks.ts +23 -23
- package/server/erudit/db/schema/contentSnippets.ts +15 -15
- package/server/erudit/db/schema/contentToc.ts +16 -16
- package/server/erudit/db/schema/contentUniques.ts +19 -25
- package/server/erudit/db/schema/contributors.ts +12 -12
- package/server/erudit/db/schema/files.ts +11 -11
- package/server/erudit/db/schema/groups.ts +6 -6
- package/server/erudit/db/schema/index.ts +17 -17
- package/server/erudit/db/schema/news.ts +7 -7
- package/server/erudit/db/schema/pages.ts +7 -7
- package/server/erudit/db/schema/problemScripts.ts +14 -14
- package/server/erudit/db/schema/sponsors.ts +9 -9
- package/server/erudit/db/schema/topics.ts +9 -9
- package/server/erudit/db/setup.ts +62 -62
- package/server/erudit/db/types.ts +10 -10
- package/server/erudit/global.ts +38 -33
- package/server/erudit/importer.ts +94 -97
- package/server/erudit/index.ts +96 -90
- package/server/erudit/language/list/en.ts +116 -116
- package/server/erudit/language/list/ru.ts +120 -120
- package/server/erudit/language/list.ts +6 -6
- package/server/erudit/language/setup.ts +36 -36
- package/server/erudit/language/types.ts +16 -16
- package/server/erudit/logger.ts +73 -77
- package/server/erudit/news/build.ts +112 -114
- package/server/erudit/news/repository/batch.ts +61 -61
- package/server/erudit/path.ts +19 -0
- package/server/erudit/prose/repository/finalize.ts +68 -68
- package/server/erudit/prose/repository/get.ts +54 -54
- package/server/erudit/prose/repository/resolve.ts +17 -17
- package/server/erudit/prose/storage/callout.ts +16 -14
- package/server/erudit/prose/storage/image.ts +22 -20
- package/server/erudit/prose/storage/link.ts +222 -226
- package/server/erudit/prose/storage/problemScript.ts +23 -21
- package/server/erudit/prose/storage/video.ts +16 -14
- package/server/erudit/prose/transform/bundleProblemScript.ts +6 -6
- package/server/erudit/prose/transform/extensions.ts +15 -15
- package/server/erudit/quote/repository/ids.ts +31 -31
- package/server/erudit/repository.ts +96 -96
- package/server/erudit/sponsors/build.ts +161 -165
- package/server/erudit/sponsors/repository/avatarUrl.ts +10 -10
- package/server/erudit/sponsors/repository/count.ts +4 -4
- package/server/erudit/staticFile.ts +28 -28
- package/server/plugins/augmentCss.ts +17 -17
- package/server/plugins/lang.ts +5 -7
- package/server/plugins/metaViewport.ts +15 -15
- package/server/plugins/theme.ts +13 -13
- package/server/routes/file/[...path].ts +18 -18
- package/server/routes/robots.txt.ts +9 -9
- package/server/routes/search.json.gz.ts +76 -75
- package/server/routes/sitemap.xml.ts +83 -81
- package/shared/search/encoders.ts +10 -10
- package/shared/types/asideMajorPages.ts +2 -2
- package/shared/types/breadcrumbs.ts +3 -3
- package/shared/types/contentChildren.ts +10 -10
- package/shared/types/contentConnections.ts +27 -27
- package/shared/types/contentStats.ts +6 -6
- package/shared/types/elementSnippet.ts +14 -14
- package/shared/types/frontContentNav.ts +17 -17
- package/shared/types/indexPage.ts +20 -20
- package/shared/types/language.ts +174 -174
- package/shared/types/mainContent.ts +40 -40
- package/shared/types/news.ts +13 -13
- package/shared/types/preview.ts +28 -28
- package/shared/types/runtimeConfig.ts +29 -48
- package/shared/types/search.ts +32 -32
- package/shared/utils/contentTypePath.ts +44 -44
- package/shared/utils/icons.ts +7 -7
- package/shared/utils/pages.ts +19 -20
- package/shared/utils/stringColor.ts +8 -8
- package/shared/utils/toStringEqual.ts +13 -13
- package/shared/utils/zip.ts +64 -64
- package/test/shared/utils/zip.test.ts +8 -8
- package/tsconfig.json +15 -15
- package/bin/erudit.mjs +0 -2
- package/modules/erudit/setup/aliases.ts +0 -17
- package/modules/erudit/setup/baseUrl.ts +0 -19
- package/modules/erudit/setup/nuxtConfig.ts +0 -62
- package/modules/erudit/setup/projectConfig.ts +0 -115
- package/shared/utils/slasher.ts +0 -64
- package/test/shared/utils/slasher.test.ts +0 -75
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { MaybeMyIconName } from '#my-icons';
|
|
3
|
-
|
|
4
|
-
const { color = 'var(--color-brand)' } = defineProps<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}>();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { MaybeMyIconName } from '#my-icons';
|
|
3
|
+
|
|
4
|
+
const { color = 'var(--color-brand)' } = defineProps<{
|
|
5
|
+
icon: MaybeMyIconName;
|
|
6
|
+
title: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
}>();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<section
|
|
13
|
+
:style="{ '--titleColor': color }"
|
|
14
|
+
class="gap-small micro:gap-normal micro:flex-row micro:justify-start px-main
|
|
15
|
+
py-main-half not-first:micro:-my-3 not-first:micro:-top-1.5 relative flex
|
|
16
|
+
flex-col items-center justify-center"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="max-micro:rounded-full max-micro:p-4
|
|
20
|
+
max-micro:bg-(--titleColor)/80"
|
|
21
|
+
>
|
|
22
|
+
<MaybeMyIcon
|
|
23
|
+
:name="icon"
|
|
24
|
+
class="max-micro:text-white micro:text-[38px] text-[30px]
|
|
25
|
+
text-[color-mix(in_srgb,var(--titleColor),var(--color-text)_70%)]"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<h1 class="text-size-h1 max-micro:text-center">
|
|
29
|
+
<FancyBold :text="title" :color="color" />
|
|
30
|
+
</h1>
|
|
31
|
+
</section>
|
|
32
|
+
</template>
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const { mainContent } = defineProps<{
|
|
3
|
-
|
|
4
|
-
}>();
|
|
5
|
-
|
|
6
|
-
const { showContentTopicAside } = useAsideMinor();
|
|
7
|
-
|
|
8
|
-
async function proseMounted() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const phrase = await usePhrases(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
await useContentSeo({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<template>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const { mainContent } = defineProps<{
|
|
3
|
+
mainContent: MainContentTopicPart;
|
|
4
|
+
}>();
|
|
5
|
+
|
|
6
|
+
const { showContentTopicAside } = useAsideMinor();
|
|
7
|
+
|
|
8
|
+
async function proseMounted() {
|
|
9
|
+
await nextTick();
|
|
10
|
+
showContentTopicAside({
|
|
11
|
+
part: mainContent.part,
|
|
12
|
+
parts: mainContent.parts,
|
|
13
|
+
shortContentId: mainContent.shortId,
|
|
14
|
+
contentRelativePath: mainContent.contentRelativePath,
|
|
15
|
+
toc: mainContent.toc,
|
|
16
|
+
contributions: mainContent.contributions,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const phrase = await usePhrases(
|
|
21
|
+
'summary',
|
|
22
|
+
'practice',
|
|
23
|
+
'article_seo_description',
|
|
24
|
+
'summary_seo_description',
|
|
25
|
+
'practice_seo_description',
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
await useContentSeo({
|
|
29
|
+
title: mainContent.title,
|
|
30
|
+
bookTitle: mainContent.bookTitle,
|
|
31
|
+
contentTypeSuffix:
|
|
32
|
+
mainContent.part !== 'article' ? phrase[mainContent.part] : undefined,
|
|
33
|
+
contentTypePath: {
|
|
34
|
+
type: 'topic',
|
|
35
|
+
topicPart: mainContent.part,
|
|
36
|
+
contentId: mainContent.shortId,
|
|
37
|
+
},
|
|
38
|
+
description:
|
|
39
|
+
mainContent.part === 'article'
|
|
40
|
+
? mainContent.description ||
|
|
41
|
+
phrase.article_seo_description(mainContent.title)
|
|
42
|
+
: mainContent.part === 'summary'
|
|
43
|
+
? phrase.summary_seo_description(mainContent.title)
|
|
44
|
+
: mainContent.part === 'practice'
|
|
45
|
+
? phrase.practice_seo_description(mainContent.title)
|
|
46
|
+
: undefined,
|
|
47
|
+
seo: mainContent.seo,
|
|
48
|
+
snippets: mainContent.snippets,
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<MainGlow />
|
|
54
|
+
<MainDecoration :decoration="mainContent.decoration" />
|
|
55
|
+
<MainSectionPreamble>
|
|
56
|
+
<MainBreadcrumbs :breadcrumbs="mainContent.breadcrumbs" />
|
|
57
|
+
<MainTitle :icon="ICONS[mainContent.part]" :title="mainContent.title" />
|
|
58
|
+
<MainFlags :flags="mainContent.flags" />
|
|
59
|
+
<MainDescription :description="mainContent.description" />
|
|
60
|
+
<MainQuickLinks mode="single" :elementSnippets="mainContent.snippets" />
|
|
61
|
+
<MainConnections :connections="mainContent.connections" />
|
|
62
|
+
<MainContentStats mode="single" :stats="mainContent.stats" />
|
|
63
|
+
<div class="h-main-half"></div>
|
|
64
|
+
<MainQuoteLoader />
|
|
65
|
+
<div class="h-main-half"></div>
|
|
66
|
+
</MainSectionPreamble>
|
|
67
|
+
<MainSection>
|
|
68
|
+
<template #header>
|
|
69
|
+
<MainTopicPartSwitch
|
|
70
|
+
:shortContentId="mainContent.shortId"
|
|
71
|
+
:parts="mainContent.parts"
|
|
72
|
+
:activePart="mainContent.part"
|
|
73
|
+
/>
|
|
74
|
+
</template>
|
|
75
|
+
<template #default>
|
|
76
|
+
<Prose
|
|
77
|
+
:element="mainContent.proseElement"
|
|
78
|
+
:storage="mainContent.storage"
|
|
79
|
+
:urlPath="'/' + mainContent.fullId"
|
|
80
|
+
:useHashUrl="true"
|
|
81
|
+
@vue:mounted="proseMounted"
|
|
82
|
+
/>
|
|
83
|
+
</template>
|
|
84
|
+
</MainSection>
|
|
85
|
+
<MainSection v-if="adsBottomAllowed()">
|
|
86
|
+
<AdsBannerBottom />
|
|
87
|
+
</MainSection>
|
|
88
|
+
</template>
|
|
@@ -1,71 +1,67 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { type TopicPart } from '@erudit-js/core/content/topic';
|
|
3
|
-
|
|
4
|
-
interface TopicPartSwitchData {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { shortContentId, parts, activePart } = defineProps<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}>();
|
|
15
|
-
|
|
16
|
-
const phrase = await usePhrases('article', 'summary', 'practice');
|
|
17
|
-
|
|
18
|
-
const getPartData = (part: TopicPart): TopicPartSwitchData => ({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const data: Record<TopicPart, TopicPartSwitchData> = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<template>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
>
|
|
69
|
-
</EruditLink>
|
|
70
|
-
</div>
|
|
71
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { type TopicPart } from '@erudit-js/core/content/topic';
|
|
3
|
+
|
|
4
|
+
interface TopicPartSwitchData {
|
|
5
|
+
state: 'active' | 'inactive' | 'missing';
|
|
6
|
+
label: string;
|
|
7
|
+
link: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { shortContentId, parts, activePart } = defineProps<{
|
|
11
|
+
shortContentId: string;
|
|
12
|
+
parts: TopicPart[];
|
|
13
|
+
activePart: TopicPart;
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
const phrase = await usePhrases('article', 'summary', 'practice');
|
|
17
|
+
|
|
18
|
+
const getPartData = (part: TopicPart): TopicPartSwitchData => ({
|
|
19
|
+
state:
|
|
20
|
+
activePart === part
|
|
21
|
+
? 'active'
|
|
22
|
+
: parts.includes(part)
|
|
23
|
+
? 'inactive'
|
|
24
|
+
: 'missing',
|
|
25
|
+
label: phrase[part],
|
|
26
|
+
link: PAGES.topic(part, shortContentId),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const data: Record<TopicPart, TopicPartSwitchData> = {
|
|
30
|
+
article: getPartData('article'),
|
|
31
|
+
summary: getPartData('summary'),
|
|
32
|
+
practice: getPartData('practice'),
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<div
|
|
38
|
+
:style="{ '--switchHeight': '45px' }"
|
|
39
|
+
class="gap-normal flex justify-center"
|
|
40
|
+
>
|
|
41
|
+
<EruditLink
|
|
42
|
+
v-for="(partData, partKey) of data"
|
|
43
|
+
:to="partData.state !== 'missing' ? partData.link : undefined"
|
|
44
|
+
:class="[
|
|
45
|
+
`micro:[--switchHeight:50px] micro:gap-small px-small micro:px-normal
|
|
46
|
+
border-border relative -bottom-[2px] flex h-(--switchHeight)
|
|
47
|
+
items-center gap-1 rounded rounded-b-none border-2 transition-[color]`,
|
|
48
|
+
partData.state === 'missing' &&
|
|
49
|
+
'text-text-disabled/75 border-b-border cursor-not-allowed',
|
|
50
|
+
partData.state === 'active' &&
|
|
51
|
+
'text-brand bg-bg-main border-b-transparent',
|
|
52
|
+
partData.state === 'inactive' &&
|
|
53
|
+
`text-text-muted hocus:text-text bg-bg-aside
|
|
54
|
+
border-b-[color-mix(in_srgb,var(--color-border),var(--color-bg-main)_65%)]`,
|
|
55
|
+
]"
|
|
56
|
+
>
|
|
57
|
+
<MyIcon :name="ICONS[partKey]" class="max-micro:mx-1 text-[1.2em]" />
|
|
58
|
+
<span
|
|
59
|
+
:class="[
|
|
60
|
+
'micro:inline font-semibold',
|
|
61
|
+
partData.state !== 'active' && 'max-micro:hidden',
|
|
62
|
+
]"
|
|
63
|
+
>{{ partData.label }}</span
|
|
64
|
+
>
|
|
65
|
+
</EruditLink>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import ScrollPane from './ScrollPane.vue';
|
|
3
|
-
|
|
4
|
-
defineProps<{ deps: ContentDep[] }>();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</ScrollPane>
|
|
34
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ScrollPane from './ScrollPane.vue';
|
|
3
|
+
|
|
4
|
+
defineProps<{ deps: ContentDep[] }>();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<ScrollPane class="py-normal gap-main-half flex max-h-[500px] flex-col">
|
|
9
|
+
<div v-for="dep of deps" class="gap-small flex">
|
|
10
|
+
<MyIcon :name="ICONS[dep.contentType]" class="relative top-1 shrink-0" />
|
|
11
|
+
<div class="flex flex-col gap-0.5">
|
|
12
|
+
<div>
|
|
13
|
+
<EruditLink :to="dep.link" class="text-hover-underline">
|
|
14
|
+
{{ formatText(dep.title) }}
|
|
15
|
+
<MyIcon
|
|
16
|
+
name="arrow/outward"
|
|
17
|
+
class="text-text-disabled text-main-sm relative -top-1 inline"
|
|
18
|
+
/>
|
|
19
|
+
</EruditLink>
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
v-if="dep.type === 'hard'"
|
|
23
|
+
class="text-text-muted text-main-sm italic"
|
|
24
|
+
>
|
|
25
|
+
{{ formatText(dep.reason) }}
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</ScrollPane>
|
|
30
|
+
</template>
|
|
@@ -1,104 +1,80 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { ContentExternals } from '@erudit-js/core/content/externals';
|
|
3
|
-
import ScrollPane from './ScrollPane.vue';
|
|
4
|
-
|
|
5
|
-
defineProps<{ externals: ContentExternals }>();
|
|
6
|
-
|
|
7
|
-
const phrase = await usePhrases('externals_own', 'externals_from');
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class="
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
class="text-text-disabled text-main-sm
|
|
82
|
-
relative -top-1 inline"
|
|
83
|
-
/>
|
|
84
|
-
</EruditLink>
|
|
85
|
-
</template>
|
|
86
|
-
<template v-else>
|
|
87
|
-
<span>{{ formatText(external.title) }}</span>
|
|
88
|
-
</template>
|
|
89
|
-
</div>
|
|
90
|
-
<div
|
|
91
|
-
v-if="external.info"
|
|
92
|
-
class="text-text-muted text-main-sm"
|
|
93
|
-
>
|
|
94
|
-
{{ formatText(external.info) }}
|
|
95
|
-
</div>
|
|
96
|
-
<div class="text-text-muted text-main-sm italic">
|
|
97
|
-
{{ formatText(external.reason) }}
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</ScrollPane>
|
|
104
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ContentExternals } from '@erudit-js/core/content/externals';
|
|
3
|
+
import ScrollPane from './ScrollPane.vue';
|
|
4
|
+
|
|
5
|
+
defineProps<{ externals: ContentExternals }>();
|
|
6
|
+
|
|
7
|
+
const phrase = await usePhrases('externals_own', 'externals_from');
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<ScrollPane class="max-h-[800px]">
|
|
12
|
+
<div v-for="group of externals">
|
|
13
|
+
<div
|
|
14
|
+
:class="[
|
|
15
|
+
`border-border gap-small pl-small py-small bg-bg-main relative sticky
|
|
16
|
+
top-0 z-10 flex w-full items-center border-b border-dashed`,
|
|
17
|
+
group.type === 'own'
|
|
18
|
+
? 'font-semibold text-amber-600 dark:text-amber-400'
|
|
19
|
+
: 'text-text-muted',
|
|
20
|
+
]"
|
|
21
|
+
>
|
|
22
|
+
<div
|
|
23
|
+
:class="[
|
|
24
|
+
'absolute top-0 left-0 h-full w-full bg-linear-to-t to-transparent',
|
|
25
|
+
group.type === 'own' ? 'from-amber-400/10' : 'from-bg-aside/50',
|
|
26
|
+
]"
|
|
27
|
+
></div>
|
|
28
|
+
<MyIcon
|
|
29
|
+
:name="group.type === 'own' ? 'arrow/left' : 'arrow/up-to-right'"
|
|
30
|
+
:class="['relative', group.type === 'own' && '-scale-x-100']"
|
|
31
|
+
/>
|
|
32
|
+
<span>
|
|
33
|
+
{{
|
|
34
|
+
group.type === 'own' ? phrase.externals_own : phrase.externals_from
|
|
35
|
+
}}
|
|
36
|
+
</span>
|
|
37
|
+
<span v-if="group.type === 'parent'" class="relative font-semibold">
|
|
38
|
+
{{ formatText(`"${group.title}"`) }}
|
|
39
|
+
</span>
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<div v-for="external of group.items" class="gap-small py-normal flex">
|
|
43
|
+
<MyIcon
|
|
44
|
+
:name="external.type === 'physical' ? 'book' : 'globe'"
|
|
45
|
+
class="relative top-1 shrink-0"
|
|
46
|
+
/>
|
|
47
|
+
<div class="flex flex-col gap-0.5">
|
|
48
|
+
<div>
|
|
49
|
+
<template v-if="external.link">
|
|
50
|
+
<EruditLink
|
|
51
|
+
external
|
|
52
|
+
target="_blank"
|
|
53
|
+
:to="external.link"
|
|
54
|
+
:class="[external.link && 'text-hover-underline']"
|
|
55
|
+
>
|
|
56
|
+
{{ formatText(external.title) }}
|
|
57
|
+
<MyIcon
|
|
58
|
+
v-if="external.link"
|
|
59
|
+
name="arrow/outward"
|
|
60
|
+
class="text-text-disabled text-main-sm relative -top-1
|
|
61
|
+
inline"
|
|
62
|
+
/>
|
|
63
|
+
</EruditLink>
|
|
64
|
+
</template>
|
|
65
|
+
<template v-else>
|
|
66
|
+
<span>{{ formatText(external.title) }}</span>
|
|
67
|
+
</template>
|
|
68
|
+
</div>
|
|
69
|
+
<div v-if="external.info" class="text-text-muted text-main-sm">
|
|
70
|
+
{{ formatText(external.info) }}
|
|
71
|
+
</div>
|
|
72
|
+
<div class="text-text-muted text-main-sm italic">
|
|
73
|
+
{{ formatText(external.reason) }}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</ScrollPane>
|
|
80
|
+
</template>
|