erudit 3.0.0-dev.3 → 3.0.0-dev.30
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/app/app.vue +35 -172
- package/app/assets/icons/array-check.svg +3 -0
- package/app/assets/icons/array-lines.svg +3 -0
- package/app/assets/icons/array-star.svg +3 -0
- package/app/assets/icons/arrow/from-circle.svg +3 -0
- package/app/assets/icons/arrow/left.svg +3 -0
- package/app/assets/icons/arrow/outward-box.svg +3 -0
- package/app/assets/icons/arrow/outward.svg +3 -0
- package/app/assets/icons/arrow/to-circle.svg +3 -0
- package/app/assets/icons/arrow/up-to-right.svg +3 -0
- package/app/assets/icons/aside-open.svg +2 -2
- package/app/assets/icons/asterisk.svg +2 -2
- package/app/assets/icons/bell.svg +3 -0
- package/app/assets/icons/book-outline.svg +3 -0
- package/app/assets/icons/book-question.svg +2 -2
- package/app/assets/icons/book.svg +2 -2
- package/app/assets/icons/box.svg +3 -0
- package/app/assets/icons/bug.svg +2 -2
- package/app/assets/icons/chevron-right.svg +3 -0
- package/app/assets/icons/cog.svg +3 -0
- package/app/assets/icons/construction.svg +2 -2
- package/app/assets/icons/diamond.svg +3 -0
- package/app/assets/icons/draw.svg +2 -2
- package/app/assets/icons/erudit.svg +3 -0
- package/app/assets/icons/file-lines.svg +2 -2
- package/app/assets/icons/files.svg +3 -0
- package/app/assets/icons/flame.svg +3 -0
- package/app/assets/icons/folder-open.svg +2 -2
- package/app/assets/icons/folder.svg +2 -2
- package/app/assets/icons/globe.svg +2 -2
- package/app/assets/icons/graduation.svg +3 -0
- package/app/assets/icons/handshake.svg +3 -0
- package/app/assets/icons/house.svg +2 -2
- package/app/assets/icons/lines.svg +3 -0
- package/app/assets/icons/moon.svg +2 -2
- package/app/assets/icons/plus-circle.svg +2 -2
- package/app/assets/icons/plus.svg +2 -2
- package/app/assets/icons/puzzle.svg +2 -2
- package/app/assets/icons/question-circle.svg +3 -0
- package/app/assets/icons/rocket.svg +3 -0
- package/app/assets/icons/search/check.svg +3 -0
- package/app/assets/icons/search/dead.svg +3 -0
- package/app/assets/icons/search/glass.svg +3 -0
- package/app/assets/icons/search/wtf.svg +3 -0
- package/app/assets/icons/sun-moon.svg +2 -2
- package/app/assets/icons/sun.svg +2 -2
- package/app/assets/icons/translate.svg +3 -0
- package/app/assets/icons/user.svg +2 -2
- package/app/assets/icons/users.svg +2 -2
- package/app/assets/icons/warning.svg +3 -0
- package/app/components/EruditLink.ts +9 -0
- package/app/components/FancyBold.vue +17 -0
- package/app/components/FancyCard.vue +58 -0
- package/app/components/FancyCardTag.vue +16 -0
- package/app/components/Prose.vue +51 -0
- package/app/components/ScrollHolder.vue +20 -0
- package/app/components/SmartMedia.vue +112 -0
- package/app/components/ads/Ads.vue +39 -0
- package/app/components/ads/AdsBannerAside.vue +46 -0
- package/app/components/ads/AdsBannerBottom.vue +17 -0
- package/app/components/ads/AdsReplacer.vue +28 -0
- package/app/components/ads/provider/Custom.vue +19 -0
- package/app/components/ads/provider/Yandex.vue +84 -0
- package/app/components/aside/AsideListItem.vue +52 -60
- package/app/components/aside/AsideMajor.vue +4 -52
- package/app/components/aside/AsideMinor.vue +65 -60
- package/app/components/aside/AsideSwitch.vue +67 -0
- package/app/components/aside/major/PaneHolder.vue +106 -0
- package/app/components/aside/major/PaneSwitcher.vue +73 -0
- package/app/components/aside/major/PaneSwitcherButton.vue +38 -0
- package/app/components/aside/major/PaneTemplate.vue +5 -0
- package/app/components/aside/major/SiteInfo.vue +54 -71
- package/app/components/aside/major/contentNav/PaneBookNav.vue +116 -0
- package/app/components/aside/major/contentNav/PaneGlobalNav.vue +24 -0
- package/app/components/aside/major/contentNav/items/ContentNavBook.vue +21 -0
- package/app/components/aside/major/contentNav/items/ContentNavFolder.vue +92 -0
- package/app/components/aside/major/contentNav/items/ContentNavItem.vue +33 -0
- package/app/components/aside/major/contentNav/items/ContentNavPage.vue +18 -0
- package/app/components/aside/major/contentNav/items/ContentNavSeparator.vue +62 -0
- package/app/components/aside/major/contentNav/items/ContentNavTopic.vue +18 -0
- package/app/components/aside/major/contentNav/items/Flags.vue +52 -0
- package/app/components/aside/major/contentNav/items/ItemTemplate.vue +27 -0
- package/app/components/aside/major/languages/PaneLanguages.vue +55 -0
- package/app/components/aside/major/pages/PanePages.vue +60 -0
- package/app/components/aside/major/search/PaneSearch.vue +145 -0
- package/app/components/aside/major/search/SearchInput.vue +104 -0
- package/app/components/aside/major/search/SearchResult.vue +103 -0
- package/app/components/aside/major/search/SearchStatus.vue +48 -0
- package/app/components/aside/major/search/search.worker.ts +164 -0
- package/app/components/aside/major/settings/BuildTime.vue +25 -0
- package/app/components/aside/major/settings/EngineVersion.vue +13 -0
- package/app/components/aside/major/settings/PaneSettings.vue +17 -0
- package/app/components/aside/major/settings/ThemeSwitcher.vue +53 -0
- package/app/components/aside/major/settings/repository/Repository.vue +33 -0
- package/app/components/aside/major/settings/repository/SecondaryGitHub.vue +71 -0
- package/app/components/aside/minor/AsideMinorPane.vue +5 -15
- package/app/components/aside/minor/AsideMinorPlainHeader.vue +21 -0
- package/app/components/aside/minor/content/AsideMinorContentContributions.vue +53 -0
- package/app/components/aside/minor/content/AsideMinorContentPage.vue +37 -0
- package/app/components/aside/minor/content/AsideMinorContentTopic.vue +66 -0
- package/app/components/aside/minor/content/ButtonPaneContributions.vue +116 -0
- package/app/components/aside/minor/content/ButtonPaneImprove.vue +121 -0
- package/app/components/aside/minor/content/Contribution.vue +34 -0
- package/app/components/aside/minor/content/Toc.vue +165 -0
- package/app/components/aside/minor/content/TocItem.vue +77 -0
- package/app/components/aside/minor/content/TopicPartButton.vue +35 -0
- package/app/components/aside/minor/contributor/AsideMinorContributor.vue +41 -0
- package/app/components/aside/minor/contributor/ItemBook.vue +39 -0
- package/app/components/aside/minor/contributor/ItemContent.vue +17 -0
- package/app/components/aside/minor/news/AsideMinorNews.vue +135 -0
- package/app/components/aside/minor/news/NewsItem.vue +69 -0
- package/app/components/aside/minor/news/RenderNewsElement.vue +42 -0
- package/app/components/aside/minor/news/elements/Mix.vue +11 -0
- package/app/components/aside/minor/news/elements/P.vue +14 -0
- package/app/components/aside/minor/news/elements/Ref.vue +58 -0
- package/app/components/aside/minor/news/elements/Text.vue +18 -0
- package/app/components/indexPage/IndexPagePersons.vue +117 -0
- package/app/components/main/MainAction.vue +20 -0
- package/app/components/main/MainBreadcrumbs.vue +28 -0
- package/app/components/main/MainContentChild.vue +48 -0
- package/app/components/main/MainContentChildren.vue +14 -0
- package/app/components/main/MainDecoration.vue +15 -0
- package/app/components/main/MainDescription.vue +13 -0
- package/app/components/main/MainFlag.vue +133 -0
- package/app/components/main/MainFlags.vue +17 -0
- package/app/components/main/MainGlow.vue +12 -0
- package/app/components/main/MainQuickLink.vue +76 -0
- package/app/components/main/MainQuickLinks.vue +42 -0
- package/app/components/main/MainQuote.vue +160 -0
- package/app/components/main/MainQuoteLoader.vue +86 -0
- package/app/components/main/MainSection.vue +55 -0
- package/app/components/main/MainSectionPreamble.vue +5 -0
- package/app/components/main/MainSubTitle.vue +12 -0
- package/app/components/main/MainTitle.vue +33 -0
- package/app/components/main/MainTopicPartPage.vue +88 -0
- package/app/components/main/MainTopicPartSwitch.vue +71 -0
- package/app/components/main/connections/Deps.vue +34 -0
- package/app/components/main/connections/Externals.vue +46 -0
- package/app/components/main/connections/MainConnections.vue +41 -0
- package/app/components/main/connections/MainConnectionsButton.vue +80 -0
- package/app/components/main/connections/ScrollPane.vue +11 -0
- package/app/components/main/contentStats/Item.vue +35 -0
- package/app/components/main/contentStats/ItemElement.vue +19 -0
- package/app/components/main/contentStats/ItemMaterials.vue +11 -0
- package/app/components/main/contentStats/MainContentStats.vue +50 -0
- package/app/components/preview/Preview.vue +155 -159
- package/app/components/preview/PreviewError.vue +10 -0
- package/app/components/preview/PreviewLoading.vue +2 -11
- package/app/components/preview/PreviewScreen.vue +56 -90
- package/app/components/preview/PreviewScreenButton.vue +39 -0
- package/app/components/preview/screen/ContentPage.vue +50 -0
- package/app/components/preview/screen/DirectLink.vue +23 -0
- package/app/components/preview/screen/Unique.vue +54 -0
- package/app/components/site/SiteAside.vue +70 -0
- package/app/components/site/SiteAsideOverlay.vue +21 -0
- package/app/components/site/SiteMain.vue +16 -0
- package/app/components/transition/Fade.vue +23 -12
- package/app/components/transition/Slide.vue +47 -0
- package/app/components/tree/TreeContainer.vue +1 -7
- package/app/components/tree/TreeItem.vue +30 -79
- package/app/composables/ads.ts +17 -0
- package/app/composables/analytics.ts +102 -0
- package/app/composables/appElements.ts +40 -0
- package/app/composables/aside.ts +28 -0
- package/app/composables/asideMajorPane.ts +135 -0
- package/app/composables/asideMinor.ts +109 -0
- package/app/composables/contentNav.ts +7 -0
- package/app/composables/favicon.ts +108 -8
- package/app/composables/file.ts +3 -0
- package/app/composables/formatText.ts +96 -86
- package/app/composables/loading.ts +2 -0
- package/app/composables/mainContent.ts +31 -0
- package/app/composables/og.ts +169 -0
- package/app/composables/phrases.ts +110 -64
- package/app/composables/preview.ts +53 -0
- package/app/composables/route.ts +4 -0
- package/app/composables/theme.ts +64 -22
- package/app/composables/url.ts +16 -27
- package/app/formatters/ru.ts +14 -0
- package/app/pages/article/[...articleId].vue +12 -3
- package/app/pages/book/[...bookId].vue +56 -47
- package/app/pages/contributor/[contributorId].vue +151 -0
- package/app/pages/contributors.vue +100 -0
- package/app/pages/group/[...groupId].vue +58 -65
- package/app/pages/index.vue +120 -32
- package/app/pages/page/[...pageId].vue +60 -0
- package/app/pages/practice/[...practiceId].vue +12 -0
- package/app/pages/sponsors.vue +85 -0
- package/app/pages/summary/[...summaryId].vue +12 -3
- package/app/plugins/appSetup/client/htmlBranding.ts +6 -0
- package/app/plugins/appSetup/client/welcome.ts +35 -0
- package/app/plugins/appSetup/config.ts +6 -0
- package/app/plugins/appSetup/global.ts +3 -0
- package/app/plugins/appSetup/index.ts +28 -0
- package/app/plugins/prerender.server.ts +39 -0
- package/app/router.options.ts +5 -0
- package/app/scripts/theme.js +33 -0
- package/app/styles/main.css +173 -0
- package/bin/erudit.mjs +2 -0
- package/modules/erudit/globals/content.ts +4 -0
- package/modules/erudit/globals/contributor.ts +1 -0
- package/modules/erudit/globals/eruditConfig.ts +10 -0
- package/modules/erudit/globals/problem.ts +1 -0
- package/modules/erudit/globals/prose.ts +1 -0
- package/modules/erudit/globals/public.ts +18 -0
- package/modules/erudit/index.ts +60 -0
- package/{module → modules/erudit}/logger.ts +10 -10
- package/modules/erudit/setup/aliases.ts +17 -0
- package/modules/erudit/setup/baseUrl.ts +19 -0
- package/modules/erudit/setup/elements/appTemplate.ts +45 -0
- package/modules/erudit/setup/elements/globalTemplate.ts +82 -0
- package/modules/erudit/setup/elements/globalTypes.ts +273 -0
- package/modules/erudit/setup/elements/setup.ts +167 -0
- package/modules/erudit/setup/elements/shared.ts +10 -0
- package/modules/erudit/setup/elements/tagsTable.ts +28 -0
- package/modules/erudit/setup/fullRestart.ts +71 -0
- package/modules/erudit/setup/globals.ts +196 -0
- package/modules/erudit/setup/nuxtConfig.ts +48 -0
- package/modules/erudit/setup/projectConfig.ts +114 -0
- package/modules/erudit/setup/publicAssets.ts +52 -0
- package/modules/erudit/setup/runtimeConfig.ts +58 -0
- package/modules/erudit/watcher.ts +27 -0
- package/nuxt.config.ts +84 -112
- package/package.json +43 -18
- package/proxy/prose.app.ts +1 -0
- package/proxy/prose.ts +1 -0
- package/public/favicons/default.svg +1 -0
- package/{app/public → public}/logotype.svg +3 -3
- package/public/og.png +0 -0
- package/server/api/aside/major/frontNav/book/[...shortId].ts +10 -0
- package/server/api/aside/major/frontNav/global.ts +5 -0
- package/server/api/aside/major/pages.ts +6 -0
- package/server/api/contributor/list.ts +45 -0
- package/server/api/contributor/page/[contributorId].ts +68 -0
- package/server/api/indexPage.ts +81 -0
- package/server/api/language/functions.ts +11 -12
- package/server/api/language/phrase/[phraseKey].ts +32 -0
- package/server/api/main/content/[...contentTypePath].ts +153 -0
- package/server/api/news/batch/[batchIndex].ts +5 -0
- package/server/api/pageSponsors.ts +56 -0
- package/server/api/prerender/content.ts +82 -0
- package/server/api/prerender/files.ts +10 -0
- package/server/api/prerender/frontNav.ts +13 -0
- package/server/api/prerender/language.ts +7 -0
- package/server/api/prerender/news.ts +8 -0
- package/server/api/prerender/quotes.ts +15 -0
- package/server/api/preview/contentPage/[...contentTypePath].ts +63 -0
- package/server/api/preview/contentUnique/[...contentTypePathUnique].ts +81 -0
- package/server/api/problemScript/[...problemScriptPath].ts +92 -0
- package/server/api/quote/data/[quoteId].ts +87 -0
- package/server/api/quote/ids.ts +3 -0
- package/server/erudit/build.ts +135 -0
- package/server/erudit/cameos/build.ts +111 -0
- package/server/erudit/config.ts +11 -0
- package/server/erudit/content/global/build.ts +271 -0
- package/server/erudit/content/global/singleton.ts +5 -0
- package/server/erudit/content/nav/build.ts +431 -0
- package/server/erudit/content/nav/front.ts +127 -0
- package/server/erudit/content/nav/repository/books.ts +40 -0
- package/server/erudit/content/nav/repository/get.ts +33 -0
- package/server/erudit/content/nav/repository/hasChildren.ts +5 -0
- package/server/erudit/content/nav/repository/hasNav.ts +3 -0
- package/server/erudit/content/nav/repository/hasParent.ts +5 -0
- package/server/erudit/content/nav/repository/id.ts +9 -0
- package/server/erudit/content/nav/repository/index.ts +9 -0
- package/server/erudit/content/nav/repository/order.ts +14 -0
- package/server/erudit/content/nav/repository/previousNext.ts +35 -0
- package/server/erudit/content/nav/repository/walk.ts +127 -0
- package/server/erudit/content/nav/setup.ts +13 -0
- package/server/erudit/content/nav/types.ts +24 -0
- package/server/erudit/content/repository/breadcrumbs.ts +24 -0
- package/server/erudit/content/repository/children.ts +47 -0
- package/server/erudit/content/repository/connections.ts +35 -0
- package/server/erudit/content/repository/contentLink.ts +16 -0
- package/server/erudit/content/repository/decoration.ts +23 -0
- package/server/erudit/content/repository/deps.ts +84 -0
- package/server/erudit/content/repository/description.ts +11 -0
- package/server/erudit/content/repository/elementSnippets.ts +64 -0
- package/server/erudit/content/repository/externals.ts +25 -0
- package/server/erudit/content/repository/flags.ts +33 -0
- package/server/erudit/content/repository/seo.ts +12 -0
- package/server/erudit/content/repository/stats.ts +97 -0
- package/server/erudit/content/repository/title.ts +27 -0
- package/server/erudit/content/repository/topicParts.ts +39 -0
- package/server/erudit/content/repository/unique.ts +76 -0
- package/server/erudit/content/resolve/book.ts +32 -0
- package/server/erudit/content/resolve/group.ts +39 -0
- package/server/erudit/content/resolve/index.ts +139 -0
- package/server/erudit/content/resolve/page.ts +87 -0
- package/server/erudit/content/resolve/topic.ts +113 -0
- package/server/erudit/content/resolve/utils/contentError.ts +10 -0
- package/server/erudit/content/resolve/utils/insertContentItem.ts +122 -0
- package/server/erudit/content/resolve/utils/insertContentResolved.ts +93 -0
- package/server/erudit/content/search.ts +135 -0
- package/server/erudit/contributors/build.ts +111 -0
- package/server/erudit/contributors/global.ts +3 -0
- package/server/erudit/contributors/repository/avatarUrl.ts +10 -0
- package/server/erudit/contributors/repository/contributions.ts +178 -0
- package/server/erudit/contributors/repository/count.ts +3 -0
- package/server/erudit/contributors/search.ts +34 -0
- package/server/erudit/db/repository/pushFile.ts +23 -0
- package/server/erudit/db/repository/pushProblemScript.ts +19 -0
- package/server/erudit/db/repository/pushProseLink.ts +40 -0
- package/server/erudit/db/schema/cameos.ts +7 -0
- package/server/erudit/db/schema/content.ts +18 -0
- package/server/erudit/db/schema/contentContributions.ts +15 -0
- package/server/erudit/db/schema/contentDeps.ts +21 -0
- package/server/erudit/db/schema/contentElementStats.ts +20 -0
- package/server/erudit/db/schema/contentProseLinks.ts +23 -0
- package/server/erudit/db/schema/contentSnippets.ts +32 -0
- package/server/erudit/db/schema/contentToc.ts +16 -0
- package/server/erudit/db/schema/contentUniques.ts +25 -0
- package/server/erudit/db/schema/contributors.ts +12 -0
- package/server/erudit/db/schema/files.ts +11 -0
- package/server/erudit/db/schema/groups.ts +6 -0
- package/server/erudit/db/schema/index.ts +17 -0
- package/server/erudit/db/schema/news.ts +7 -0
- package/server/erudit/db/schema/pages.ts +7 -0
- package/server/erudit/db/schema/problemScripts.ts +14 -0
- package/server/erudit/db/schema/sponsors.ts +9 -0
- package/server/erudit/db/schema/topics.ts +9 -0
- package/server/erudit/db/setup.ts +62 -0
- package/server/erudit/db/types.ts +10 -0
- package/server/erudit/global.ts +33 -0
- package/server/erudit/importer.ts +97 -0
- package/server/erudit/index.ts +90 -0
- package/server/erudit/language/list/en.ts +209 -0
- package/server/erudit/language/list/ru.ts +214 -0
- package/server/erudit/language/list.ts +6 -0
- package/server/erudit/language/setup.ts +36 -0
- package/server/erudit/language/types.ts +16 -0
- package/server/erudit/logger.ts +77 -0
- package/server/erudit/news/build.ts +77 -0
- package/server/erudit/news/repository/batch.ts +61 -0
- package/server/erudit/prose/repository/finalize.ts +68 -0
- package/server/erudit/prose/repository/get.ts +54 -0
- package/server/erudit/prose/repository/resolve.ts +17 -0
- package/server/erudit/prose/storage/callout.ts +14 -0
- package/server/erudit/prose/storage/image.ts +20 -0
- package/server/erudit/prose/storage/link.ts +226 -0
- package/server/erudit/prose/storage/problemScript.ts +21 -0
- package/server/erudit/prose/storage/video.ts +14 -0
- package/server/erudit/prose/transform/bundleProblemScript.ts +6 -0
- package/server/erudit/prose/transform/extensions.ts +15 -0
- package/server/erudit/quote/repository/ids.ts +31 -0
- package/server/erudit/repository.ts +96 -0
- package/server/erudit/sponsors/build.ts +114 -0
- package/server/erudit/sponsors/repository/avatarUrl.ts +10 -0
- package/server/erudit/sponsors/repository/count.ts +4 -0
- package/server/erudit/staticFile.ts +28 -0
- package/server/plugins/augmentCss.ts +17 -0
- package/server/plugins/lang.ts +7 -0
- package/server/plugins/metaViewport.ts +15 -0
- package/server/plugins/theme.ts +13 -0
- package/server/routes/file/[...path].ts +18 -0
- package/server/routes/robots.txt.ts +9 -0
- package/server/routes/search.json.gz.ts +72 -0
- package/server/routes/sitemap.xml.ts +74 -0
- package/shared/search/encoders.ts +20 -0
- package/shared/types/asideMajorPages.ts +4 -0
- package/shared/types/breadcrumbs.ts +9 -0
- package/shared/types/contentChildren.ts +10 -0
- package/shared/types/contentConnections.ts +27 -0
- package/shared/types/contentStats.ts +6 -0
- package/shared/types/elementSnippet.ts +8 -0
- package/shared/types/frontContentNav.ts +38 -0
- package/shared/types/indexPage.ts +20 -0
- package/shared/types/language.ts +169 -55
- package/shared/types/mainContent.ts +69 -0
- package/shared/types/news.ts +13 -0
- package/shared/types/preview.ts +28 -0
- package/shared/types/runtimeConfig.ts +64 -0
- package/shared/types/search.ts +79 -0
- package/shared/utils/contentTypePath.ts +63 -0
- package/shared/utils/icons.ts +11 -0
- package/shared/utils/pages.ts +24 -0
- package/shared/utils/slasher.ts +64 -0
- package/shared/utils/stringColor.ts +5 -1
- package/shared/utils/toStringEqual.ts +21 -0
- package/shared/utils/zip.ts +64 -0
- package/test/shared/utils/slasher.test.ts +75 -0
- package/test/shared/utils/zip.test.ts +8 -0
- package/tsconfig.json +15 -6
- package/app/assets/icons/alert.svg +0 -3
- package/app/assets/icons/angle-right.svg +0 -3
- package/app/assets/icons/arrow-in-text.svg +0 -3
- package/app/assets/icons/arrow-left.svg +0 -3
- package/app/assets/icons/arrow-up-to-right.svg +0 -3
- package/app/assets/icons/chip.svg +0 -3
- package/app/assets/icons/circle-help.svg +0 -3
- package/app/assets/icons/cross.svg +0 -3
- package/app/assets/icons/ellipsis-vertical.svg +0 -3
- package/app/assets/icons/file-check.svg +0 -3
- package/app/assets/icons/file-star.svg +0 -3
- package/app/assets/icons/link-external.svg +0 -3
- package/app/assets/icons/link.svg +0 -3
- package/app/assets/icons/outline/book.svg +0 -3
- package/app/assets/icons/outline/file-lines.svg +0 -3
- package/app/assets/icons/pirate.svg +0 -3
- package/app/assets/icons/search.svg +0 -3
- package/app/assets/icons/shuffle.svg +0 -3
- package/app/assets/icons/star.svg +0 -3
- package/app/components/Loading.vue +0 -23
- package/app/components/SiteAside.vue +0 -382
- package/app/components/SiteMain.vue +0 -35
- package/app/components/ads/BannerTemplate.vue +0 -51
- package/app/components/ads/BottomBanner.vue +0 -45
- package/app/components/ads/LeftBanner.vue +0 -50
- package/app/components/aside/major/PaneContentScroll.vue +0 -23
- package/app/components/aside/major/PaneSwitch.vue +0 -54
- package/app/components/aside/major/PaneSwitchButton.vue +0 -63
- package/app/components/aside/major/panes/Language.vue +0 -79
- package/app/components/aside/major/panes/Pages.vue +0 -34
- package/app/components/aside/major/panes/Search.vue +0 -11
- package/app/components/aside/major/panes/nav/Nav.vue +0 -91
- package/app/components/aside/major/panes/nav/NavBook.vue +0 -86
- package/app/components/aside/major/panes/nav/NavBookLoading.vue +0 -24
- package/app/components/aside/major/panes/nav/NavGlobal.vue +0 -16
- package/app/components/aside/major/panes/nav/fnav/FNav.vue +0 -105
- package/app/components/aside/major/panes/nav/fnav/FNavBook.vue +0 -32
- package/app/components/aside/major/panes/nav/fnav/FNavFlags.vue +0 -40
- package/app/components/aside/major/panes/nav/fnav/FNavFolder.vue +0 -60
- package/app/components/aside/major/panes/nav/fnav/FNavItem.vue +0 -34
- package/app/components/aside/major/panes/nav/fnav/FNavSeparator.vue +0 -80
- package/app/components/aside/major/panes/nav/fnav/FNavTopic.vue +0 -24
- package/app/components/aside/major/panes/other/ItemContent.vue +0 -29
- package/app/components/aside/major/panes/other/ItemGenerator.vue +0 -15
- package/app/components/aside/major/panes/other/ItemTheme.vue +0 -54
- package/app/components/aside/major/panes/other/Other.vue +0 -16
- package/app/components/aside/minor/AsideMinorContributor.vue +0 -5
- package/app/components/aside/minor/AsideMinorNews.vue +0 -11
- package/app/components/aside/minor/AsideMinorTopLink.vue +0 -67
- package/app/components/aside/minor/Contribute.vue +0 -145
- package/app/components/aside/minor/content/AsideMinorContent.vue +0 -92
- package/app/components/aside/minor/topic/AsideMinorTopic.vue +0 -32
- package/app/components/aside/minor/topic/TopicContributors.vue +0 -177
- package/app/components/aside/minor/topic/TopicNav.vue +0 -49
- package/app/components/aside/minor/topic/TopicToc.vue +0 -203
- package/app/components/aside/minor/topic/TopicTocItem.vue +0 -31
- package/app/components/aside/utils/AsideOverlayPane.vue +0 -40
- package/app/components/bitran/BitranContent.vue +0 -63
- package/app/components/bitran/RenderWrapper.vue +0 -10
- package/app/components/contributor/ContributorAvatar.vue +0 -43
- package/app/components/contributor/ContributorListItem.vue +0 -35
- package/app/components/main/topic/MainTopic.vue +0 -79
- package/app/components/main/topic/TopicPartSwitch.vue +0 -118
- package/app/components/main/utils/Breadcrumb.vue +0 -75
- package/app/components/main/utils/ContentDecoration.vue +0 -29
- package/app/components/main/utils/ContentDescription.vue +0 -19
- package/app/components/main/utils/ContentFlag.vue +0 -15
- package/app/components/main/utils/ContentPopover.vue +0 -176
- package/app/components/main/utils/ContentPopovers.vue +0 -105
- package/app/components/main/utils/ContentReferences.vue +0 -70
- package/app/components/main/utils/ContentSection.vue +0 -45
- package/app/components/main/utils/ContentTitle.vue +0 -39
- package/app/components/main/utils/reference/ReferenceGroup.vue +0 -38
- package/app/components/main/utils/reference/ReferenceItem.vue +0 -68
- package/app/components/main/utils/reference/ReferenceSource.vue +0 -116
- package/app/components/preview/PreviewDisplay.vue +0 -139
- package/app/components/preview/PreviewFooterAction.vue +0 -73
- package/app/components/preview/display/Alert.vue +0 -50
- package/app/components/preview/display/Custom.vue +0 -18
- package/app/components/preview/display/GenericLink.vue +0 -48
- package/app/components/preview/display/PageLink.vue +0 -20
- package/app/components/preview/display/Unique.vue +0 -49
- package/app/composables/bitran.ts +0 -127
- package/app/composables/bitranContent.ts +0 -39
- package/app/composables/bitranLocation.ts +0 -7
- package/app/composables/contentData.ts +0 -36
- package/app/composables/contentPage.ts +0 -156
- package/app/composables/contentRoute.ts +0 -45
- package/app/composables/darkMagic.ts +0 -24
- package/app/composables/externalApi.ts +0 -63
- package/app/composables/majorPane.ts +0 -60
- package/app/pages/_test/preview.vue +0 -110
- package/app/pages/members.vue +0 -6
- package/app/pages/practice/[...practice].vue +0 -3
- package/app/public/favicon/article.svg +0 -10
- package/app/public/favicon/default.svg +0 -10
- package/app/public/favicon/practice.svg +0 -10
- package/app/public/favicon/summary.svg +0 -10
- package/app/public/og-default.png +0 -0
- package/app/public/user.svg +0 -10
- package/app/scripts/_immediate.js +0 -9
- package/app/scripts/aside/index.ts +0 -59
- package/app/scripts/aside/major/nav.ts +0 -26
- package/app/scripts/aside/minor/state.ts +0 -37
- package/app/scripts/aside/minor/topic.ts +0 -3
- package/app/scripts/flag.ts +0 -28
- package/app/scripts/og.ts +0 -27
- package/app/scripts/preview/build.ts +0 -73
- package/app/scripts/preview/data/alert.ts +0 -19
- package/app/scripts/preview/data/custom.ts +0 -8
- package/app/scripts/preview/data/genericLink.ts +0 -24
- package/app/scripts/preview/data/pageLink.ts +0 -20
- package/app/scripts/preview/data/unique.ts +0 -71
- package/app/scripts/preview/data.ts +0 -24
- package/app/scripts/preview/display.ts +0 -37
- package/app/scripts/preview/footer.ts +0 -9
- package/app/scripts/preview/request.ts +0 -51
- package/app/scripts/preview/state.ts +0 -63
- package/app/styles/_immediate.css +0 -7
- package/app/styles/_util.scss +0 -43
- package/app/styles/_utils.scss +0 -44
- package/app/styles/app.scss +0 -91
- package/app/styles/def/_bp.scss +0 -27
- package/app/styles/def/_size.scss +0 -7
- package/app/styles/def/_z.scss +0 -5
- package/app/styles/default.scss +0 -83
- package/app/styles/normalize.scss +0 -63
- package/app/styles/partials/_darkMagic.scss +0 -5
- package/app/styles/partials/_fnav.scss +0 -15
- package/app/styles/partials/_preview.scss +0 -5
- package/globalPath.ts +0 -21
- package/globals/bitran.ts +0 -47
- package/globals/content.ts +0 -22
- package/globals/contributor.ts +0 -5
- package/globals/erudit.ts +0 -5
- package/globals/register.ts +0 -18
- package/languages/en.ts +0 -95
- package/languages/ru.ts +0 -99
- package/module/bitran.ts +0 -34
- package/module/config.ts +0 -34
- package/module/imports.ts +0 -46
- package/module/index.ts +0 -47
- package/module/paths.ts +0 -22
- package/module/restart.ts +0 -61
- package/server/api/aside/major/nav/bookIds.ts +0 -5
- package/server/api/aside/major/nav/bookNav/[...bookId].ts +0 -20
- package/server/api/aside/major/nav/global.ts +0 -7
- package/server/api/aside/minor/news.ts +0 -7
- package/server/api/aside/minor/path.ts +0 -78
- package/server/api/bitran/content/[location].ts +0 -8
- package/server/api/bitran/toc/[location].ts +0 -7
- package/server/api/content/data.ts +0 -72
- package/server/api/contributor/count.ts +0 -6
- package/server/api/fake/content.ts +0 -11
- package/server/api/fake/shared/languages.ts +0 -12
- package/server/api/language/phrase/[phraseId].ts +0 -19
- package/server/api/language/phraseIds.ts +0 -8
- package/server/api/preview/page/[...parts].ts +0 -51
- package/server/api/preview/unique/[location].ts +0 -57
- package/server/plugin/bitran/content.ts +0 -187
- package/server/plugin/bitran/location.ts +0 -25
- package/server/plugin/bitran/products/include.ts +0 -230
- package/server/plugin/bitran/products/link.ts +0 -116
- package/server/plugin/bitran/setup.ts +0 -9
- package/server/plugin/bitran/toc.ts +0 -83
- package/server/plugin/bitran/transpiler.ts +0 -46
- package/server/plugin/build/close.ts +0 -10
- package/server/plugin/build/jobs/content/builderArgs.ts +0 -8
- package/server/plugin/build/jobs/content/generic.ts +0 -176
- package/server/plugin/build/jobs/content/parse.ts +0 -100
- package/server/plugin/build/jobs/content/path.ts +0 -6
- package/server/plugin/build/jobs/content/type/book.ts +0 -9
- package/server/plugin/build/jobs/content/type/group.ts +0 -37
- package/server/plugin/build/jobs/content/type/topic.ts +0 -36
- package/server/plugin/build/jobs/contributors.ts +0 -66
- package/server/plugin/build/jobs/language.ts +0 -36
- package/server/plugin/build/jobs/nav.ts +0 -210
- package/server/plugin/build/process.ts +0 -25
- package/server/plugin/build/rebuild.ts +0 -55
- package/server/plugin/build/setup.ts +0 -21
- package/server/plugin/content/absoluteId.ts +0 -94
- package/server/plugin/content/context.ts +0 -112
- package/server/plugin/db/entities/Book.ts +0 -7
- package/server/plugin/db/entities/Content.ts +0 -49
- package/server/plugin/db/entities/Contribution.ts +0 -10
- package/server/plugin/db/entities/Contributor.ts +0 -16
- package/server/plugin/db/entities/Group.ts +0 -14
- package/server/plugin/db/entities/Hash.ts +0 -15
- package/server/plugin/db/entities/Topic.ts +0 -20
- package/server/plugin/db/entities/Unique.ts +0 -21
- package/server/plugin/db/setup.ts +0 -34
- package/server/plugin/global.ts +0 -18
- package/server/plugin/importer.ts +0 -12
- package/server/plugin/index.ts +0 -9
- package/server/plugin/logger.ts +0 -23
- package/server/plugin/nav/node.ts +0 -26
- package/server/plugin/nav/utils.ts +0 -129
- package/server/plugin/repository/book.ts +0 -21
- package/server/plugin/repository/content.ts +0 -238
- package/server/plugin/repository/contributor.ts +0 -8
- package/server/plugin/repository/frontNav.ts +0 -148
- package/server/plugin/repository/topic.ts +0 -32
- package/server/tsconfig.json +0 -9
- package/shared/aside/minor.ts +0 -50
- package/shared/asset.ts +0 -15
- package/shared/bitran/context.ts +0 -8
- package/shared/bitran/default.ts +0 -46
- package/shared/bitran/link/Link.vue +0 -167
- package/shared/bitran/link/factory.ts +0 -24
- package/shared/bitran/link/icon.svg +0 -3
- package/shared/bitran/link/languages/en.ts +0 -7
- package/shared/bitran/link/languages/ru.ts +0 -7
- package/shared/bitran/link/renderer.ts +0 -21
- package/shared/bitran/link/shared.ts +0 -17
- package/shared/bitran/link/target.ts +0 -134
- package/shared/bitran/link/transpiler.ts +0 -10
- package/shared/bitran/location.ts +0 -166
- package/shared/bitran/toc.ts +0 -8
- package/shared/content/context.ts +0 -9
- package/shared/content/data/base.ts +0 -32
- package/shared/content/data/index.ts +0 -5
- package/shared/content/data/type/book.ts +0 -5
- package/shared/content/data/type/group.ts +0 -6
- package/shared/content/data/type/topic.ts +0 -11
- package/shared/content/previousNext.ts +0 -9
- package/shared/contributor.ts +0 -5
- package/shared/frontNav.ts +0 -41
- package/shared/icons.ts +0 -38
- package/shared/image.ts +0 -5
- package/shared/link.ts +0 -25
- package/shared/utils/objectsEqual.ts +0 -4
- package/test/bitran/link/target.test.ts +0 -141
- package/test/bitran/location.test.ts +0 -143
- package/utils/stress.ts +0 -9
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { topicParts, type TopicPart } from 'erudit-cog/schema';
|
|
3
|
-
|
|
4
|
-
import { injectAsideData } from '@app/scripts/aside/minor/state';
|
|
5
|
-
import type { AsideMinorTopic } from '@shared/aside/minor';
|
|
6
|
-
import { TOPIC_PART_ICON } from '@erudit/shared/icons';
|
|
7
|
-
|
|
8
|
-
const phrase = await usePhrases('article', 'summary', 'practice');
|
|
9
|
-
|
|
10
|
-
const topicData = injectAsideData<AsideMinorTopic>();
|
|
11
|
-
|
|
12
|
-
const currentTopicPart = computed(() => {
|
|
13
|
-
return topicData.value.location.type as TopicPart;
|
|
14
|
-
});
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<section :class="$style.topicNav">
|
|
19
|
-
<AsideMinorTopLink
|
|
20
|
-
:title="topicData.nav?.previous?.title"
|
|
21
|
-
:link="topicData.nav?.previous?.link"
|
|
22
|
-
:icon="'arrow-left'"
|
|
23
|
-
/>
|
|
24
|
-
|
|
25
|
-
<AsideMinorTopLink
|
|
26
|
-
v-for="topicPart of topicParts"
|
|
27
|
-
:title="phrase[topicPart]"
|
|
28
|
-
:icon="TOPIC_PART_ICON[topicPart]"
|
|
29
|
-
:link="topicData.nav?.[topicPart]"
|
|
30
|
-
:active="topicPart === currentTopicPart"
|
|
31
|
-
/>
|
|
32
|
-
|
|
33
|
-
<AsideMinorTopLink
|
|
34
|
-
:title="topicData.nav?.next?.title"
|
|
35
|
-
:link="topicData.nav?.next?.link"
|
|
36
|
-
:icon="'arrow-left'"
|
|
37
|
-
class="icon-flip-h"
|
|
38
|
-
/>
|
|
39
|
-
</section>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<style lang="scss" module>
|
|
43
|
-
.topicNav {
|
|
44
|
-
border-bottom: 1px solid var(--border);
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
gap: 10px;
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { headingName } from '@erudit-js/bitran-elements/heading/shared';
|
|
3
|
-
|
|
4
|
-
import { stringifyBitranLocation } from '@shared/bitran/location';
|
|
5
|
-
import type { TocItem } from '@erudit/shared/bitran/toc';
|
|
6
|
-
import { topicLocation } from '@app/scripts/aside/minor/topic';
|
|
7
|
-
import { injectAsideData } from '@app/scripts/aside/minor/state';
|
|
8
|
-
import type { AsideMinorTopic } from '@shared/aside/minor';
|
|
9
|
-
|
|
10
|
-
import TopicTocItem from './TopicTocItem.vue';
|
|
11
|
-
|
|
12
|
-
interface RuntimeTocItem extends TocItem {
|
|
13
|
-
/**
|
|
14
|
-
* * `0` — Not active
|
|
15
|
-
* * `1` — Active for `window` events
|
|
16
|
-
* * `2` — Active for Intersection Observer and currently in viewport
|
|
17
|
-
*/
|
|
18
|
-
_active: 0 | 1 | 2;
|
|
19
|
-
_position: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
type RuntimeToc = RuntimeTocItem[];
|
|
23
|
-
|
|
24
|
-
const topicData = injectAsideData<AsideMinorTopic>();
|
|
25
|
-
const phrase = await usePhrases('empty_toc');
|
|
26
|
-
const runtimeToc = ref<RuntimeToc>();
|
|
27
|
-
const tocStateKey = ref(0);
|
|
28
|
-
|
|
29
|
-
watch(topicData, setupRuntimeToc);
|
|
30
|
-
setupRuntimeToc();
|
|
31
|
-
|
|
32
|
-
function setupRuntimeToc() {
|
|
33
|
-
const _newToc: RuntimeToc = [];
|
|
34
|
-
|
|
35
|
-
for (let i = 0; i < topicData.value.toc.length; i++) {
|
|
36
|
-
_newToc.push({
|
|
37
|
-
...topicData.value.toc[i]!,
|
|
38
|
-
_active: 0,
|
|
39
|
-
_position: i,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
tocStateKey.value++;
|
|
44
|
-
runtimeToc.value = _newToc;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
//
|
|
48
|
-
// Live TOC
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
let observer: IntersectionObserver;
|
|
52
|
-
let id2TocItemIndex: Record<string, number> = {};
|
|
53
|
-
|
|
54
|
-
const windowEvents = ['DOMContentLoaded', 'load', 'resize', 'scroll'];
|
|
55
|
-
let headings: RuntimeTocItem[];
|
|
56
|
-
let closestAboveHeading: RuntimeTocItem;
|
|
57
|
-
|
|
58
|
-
function disableLiveToc() {
|
|
59
|
-
// Live TOC heading with `window` events
|
|
60
|
-
|
|
61
|
-
for (const event of windowEvents)
|
|
62
|
-
window.removeEventListener(event, updateActiveTopHeading);
|
|
63
|
-
|
|
64
|
-
headings = closestAboveHeading = null;
|
|
65
|
-
|
|
66
|
-
// Live TOC with Intersection Observer
|
|
67
|
-
|
|
68
|
-
id2TocItemIndex = null;
|
|
69
|
-
|
|
70
|
-
observer?.disconnect();
|
|
71
|
-
observer = null;
|
|
72
|
-
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
if (runtimeToc.value?.length) {
|
|
76
|
-
for (const tocItem of runtimeToc.value) tocItem._active = 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function enableLiveToc() {
|
|
81
|
-
if (!runtimeToc.value?.length) return;
|
|
82
|
-
|
|
83
|
-
// Live TOC heading with `window` events
|
|
84
|
-
|
|
85
|
-
headings = runtimeToc.value.filter(
|
|
86
|
-
(item) => item.productName === headingName,
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
for (const event of windowEvents)
|
|
90
|
-
window.addEventListener(event, updateActiveTopHeading);
|
|
91
|
-
|
|
92
|
-
updateActiveTopHeading();
|
|
93
|
-
|
|
94
|
-
// Live TOC with Intersection Observer
|
|
95
|
-
|
|
96
|
-
observer = new IntersectionObserver(intersectionTrigger);
|
|
97
|
-
id2TocItemIndex = {};
|
|
98
|
-
|
|
99
|
-
for (const tocItem of runtimeToc.value) {
|
|
100
|
-
const id = tocItem.id;
|
|
101
|
-
id2TocItemIndex[id] = tocItem._position;
|
|
102
|
-
observer.observe(document.getElementById(id));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function updateActiveTopHeading() {
|
|
107
|
-
function getBottom(id: string) {
|
|
108
|
-
const defaultBottom = 1;
|
|
109
|
-
const element = document.getElementById(id);
|
|
110
|
-
return element ? element.getBoundingClientRect().bottom : defaultBottom;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if (closestAboveHeading) {
|
|
114
|
-
closestAboveHeading._active = closestAboveHeading._active === 2 ? 2 : 0;
|
|
115
|
-
closestAboveHeading = null;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (runtimeToc.value?.length) {
|
|
119
|
-
let topIndex = 0;
|
|
120
|
-
let bottomIndex = headings.length;
|
|
121
|
-
let targetIndex = 0;
|
|
122
|
-
|
|
123
|
-
while (topIndex < bottomIndex) {
|
|
124
|
-
const middleIndex = ((topIndex + bottomIndex) / 2) | 0;
|
|
125
|
-
const middleHeading = headings[middleIndex];
|
|
126
|
-
const middleHeadingTop = getBottom(middleHeading.id);
|
|
127
|
-
|
|
128
|
-
if (middleHeadingTop <= 0) {
|
|
129
|
-
targetIndex = middleIndex;
|
|
130
|
-
topIndex = middleIndex + 1;
|
|
131
|
-
} else {
|
|
132
|
-
bottomIndex = middleIndex;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
closestAboveHeading = headings[targetIndex];
|
|
137
|
-
if (closestAboveHeading && closestAboveHeading._active < 2)
|
|
138
|
-
closestAboveHeading._active =
|
|
139
|
-
getBottom(closestAboveHeading.id) <= 0 ? 1 : 0;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function intersectionTrigger(entries: IntersectionObserverEntry[]) {
|
|
144
|
-
for (const entry of entries) {
|
|
145
|
-
const tocItem = runtimeToc.value[id2TocItemIndex[entry.target.id]];
|
|
146
|
-
tocItem._active = entry.isIntersecting
|
|
147
|
-
? 2
|
|
148
|
-
: tocItem._active === 1
|
|
149
|
-
? 1
|
|
150
|
-
: 0;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
onMounted(() => {
|
|
155
|
-
watch(
|
|
156
|
-
[topicData, topicLocation],
|
|
157
|
-
() => {
|
|
158
|
-
disableLiveToc();
|
|
159
|
-
|
|
160
|
-
if (!topicData.value.location || !topicLocation.value) return;
|
|
161
|
-
|
|
162
|
-
if (
|
|
163
|
-
stringifyBitranLocation(topicData.value.location) ===
|
|
164
|
-
stringifyBitranLocation(topicLocation.value)
|
|
165
|
-
)
|
|
166
|
-
enableLiveToc();
|
|
167
|
-
},
|
|
168
|
-
{ immediate: true },
|
|
169
|
-
);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
onUnmounted(() => {
|
|
173
|
-
disableLiveToc();
|
|
174
|
-
});
|
|
175
|
-
</script>
|
|
176
|
-
|
|
177
|
-
<template>
|
|
178
|
-
<section :class="$style.topicToc">
|
|
179
|
-
<TreeContainer v-if="runtimeToc.length > 0">
|
|
180
|
-
<TopicTocItem
|
|
181
|
-
v-for="tocItem of runtimeToc"
|
|
182
|
-
v-memo="[tocStateKey, tocItem.id, tocItem._active]"
|
|
183
|
-
:active="!!tocItem._active"
|
|
184
|
-
:tocItem
|
|
185
|
-
/>
|
|
186
|
-
</TreeContainer>
|
|
187
|
-
<div v-else :class="$style.tocEmpty">{{ phrase.empty_toc }}</div>
|
|
188
|
-
</section>
|
|
189
|
-
</template>
|
|
190
|
-
|
|
191
|
-
<style lang="scss" module>
|
|
192
|
-
.topicToc {
|
|
193
|
-
flex: 1;
|
|
194
|
-
overflow: auto;
|
|
195
|
-
@include scroll();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.tocEmpty {
|
|
199
|
-
padding: var(--gap);
|
|
200
|
-
text-align: center;
|
|
201
|
-
color: var(--textMuted);
|
|
202
|
-
}
|
|
203
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { TocItem } from '@erudit/shared/bitran/toc';
|
|
3
|
-
|
|
4
|
-
const { tocItem } = defineProps<{ tocItem: TocItem; active: boolean }>();
|
|
5
|
-
|
|
6
|
-
const productName = tocItem.productName;
|
|
7
|
-
const productIcon = await useBitranElementIcon(productName);
|
|
8
|
-
const productPhrase = await useBitranElementLanguage(productName);
|
|
9
|
-
|
|
10
|
-
function tocItemClick(event: Event) {
|
|
11
|
-
navigateTo({
|
|
12
|
-
query: {
|
|
13
|
-
element: tocItem.id,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
event.preventDefault();
|
|
17
|
-
event.stopPropagation();
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<TreeItem
|
|
24
|
-
:label="tocItem.title || productPhrase('_element_title')"
|
|
25
|
-
:level="tocItem.level"
|
|
26
|
-
:link="`?element=${tocItem.id}` /* Apply page hash! */"
|
|
27
|
-
:svg="productIcon"
|
|
28
|
-
:active
|
|
29
|
-
@click="tocItemClick"
|
|
30
|
-
/>
|
|
31
|
-
</template>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{ stick?: 'top' | 'bottom' }>();
|
|
3
|
-
const style = useCssModule();
|
|
4
|
-
|
|
5
|
-
const classes = computed(() => {
|
|
6
|
-
const _classes: string[] = [style.asideOverlayPane];
|
|
7
|
-
|
|
8
|
-
if (props.stick === 'bottom') _classes.push(style.stickBottom);
|
|
9
|
-
|
|
10
|
-
return _classes;
|
|
11
|
-
});
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<section :class="classes">
|
|
16
|
-
<slot></slot>
|
|
17
|
-
</section>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<style lang="scss" module>
|
|
21
|
-
@use '$/def/bp';
|
|
22
|
-
|
|
23
|
-
.asideOverlayPane {
|
|
24
|
-
position: absolute;
|
|
25
|
-
z-index: 10;
|
|
26
|
-
top: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 100%;
|
|
30
|
-
background: var(--bgAside);
|
|
31
|
-
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
justify-content: start;
|
|
35
|
-
|
|
36
|
-
&.stickBottom {
|
|
37
|
-
justify-content: end;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { Bitran, type BitranContent } from '@bitran-js/renderer-vue';
|
|
3
|
-
|
|
4
|
-
import type { BitranContext } from '@shared/bitran/context';
|
|
5
|
-
|
|
6
|
-
import RenderWrapper from './RenderWrapper.vue';
|
|
7
|
-
|
|
8
|
-
const props = defineProps<{
|
|
9
|
-
content: BitranContent;
|
|
10
|
-
context: BitranContext;
|
|
11
|
-
}>();
|
|
12
|
-
|
|
13
|
-
const bitranTranspiler = await useBitranTranspiler();
|
|
14
|
-
const bitranRenderers = await useBitranRenderers();
|
|
15
|
-
|
|
16
|
-
const formatText = useFormatText();
|
|
17
|
-
|
|
18
|
-
// onMounted(() => {
|
|
19
|
-
// watch(urlElement, () => {
|
|
20
|
-
// //console.log('Highlighting product:', urlElement.value);
|
|
21
|
-
// }, { immediate: true });
|
|
22
|
-
// });
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<template>
|
|
26
|
-
<Bitran
|
|
27
|
-
:class="$style.eruditBitranContainer"
|
|
28
|
-
:transpiler="bitranTranspiler"
|
|
29
|
-
:renderers="bitranRenderers"
|
|
30
|
-
:content
|
|
31
|
-
:editMode="false"
|
|
32
|
-
:formatText
|
|
33
|
-
:RenderWrapper
|
|
34
|
-
/>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<style lang="scss" module>
|
|
38
|
-
@use '@bitran-js/renderer-vue/scss/def' as bitranDef;
|
|
39
|
-
|
|
40
|
-
.eruditBitranContainer {
|
|
41
|
-
padding: var(--_pMainY) var(--_pMainX);
|
|
42
|
-
padding-left: calc(var(--_pMainX) - #{bitranDef.$asideWidth});
|
|
43
|
-
|
|
44
|
-
// Setting up Bitran
|
|
45
|
-
|
|
46
|
-
--bitran_gap: var(--gap);
|
|
47
|
-
--bitran_gapSmall: var(--gapSmall);
|
|
48
|
-
--bitran_gapBig: var(--gapBig);
|
|
49
|
-
--bitran_gapBlocks: var(--gapBig);
|
|
50
|
-
|
|
51
|
-
--bitran_xPadding: var(--_pMainX);
|
|
52
|
-
--bitran_transitionSpeed: var(--transitionSpeed);
|
|
53
|
-
--bitran_transitionFunction: var(--transitionFunction);
|
|
54
|
-
|
|
55
|
-
--bitran_fontMain: 'Noto Sans', sans-serif;
|
|
56
|
-
--bitran_fontAlt: 'Noto Serif', serif;
|
|
57
|
-
|
|
58
|
-
--bitran_text: var(--text);
|
|
59
|
-
--bitran_textMuted: var(--textMuted);
|
|
60
|
-
--bitran_textDimmed: var(--textDimmed);
|
|
61
|
-
--bitran_textDisabled: var(--textDisabled);
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps<{ contributorId: string; avatar?: string }>();
|
|
3
|
-
const baseUrlPath = useBaseUrlPath();
|
|
4
|
-
|
|
5
|
-
const hasAvatar = computed(() => !!props.avatar);
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<template>
|
|
9
|
-
<div
|
|
10
|
-
:class="[$style.contributorAvatar, !hasAvatar && $style.noAvatar]"
|
|
11
|
-
:style="{ '--_avatarBlendColor': stringColor(props.contributorId) }"
|
|
12
|
-
>
|
|
13
|
-
<img
|
|
14
|
-
v-if="hasAvatar"
|
|
15
|
-
:src="baseUrlPath(contributorAsset(avatar!))"
|
|
16
|
-
loading="lazy"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<style lang="scss" module>
|
|
22
|
-
.contributorAvatar {
|
|
23
|
-
$avatarSize: 40px;
|
|
24
|
-
--_avatarBlendColor: var(--brand);
|
|
25
|
-
|
|
26
|
-
position: relative;
|
|
27
|
-
width: #{$avatarSize};
|
|
28
|
-
height: #{$avatarSize};
|
|
29
|
-
border-radius: 50%;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
background: var(--border);
|
|
32
|
-
|
|
33
|
-
&.noAvatar {
|
|
34
|
-
background-image: url('/_erudit-asset/user.svg');
|
|
35
|
-
background-color: var(--_avatarBlendColor);
|
|
36
|
-
background-blend-mode: hard-light;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
> img {
|
|
40
|
-
display: block;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { type ContentContributor } from '@shared/contributor';
|
|
3
|
-
import { createContributorLink } from '@shared/link';
|
|
4
|
-
|
|
5
|
-
defineProps<ContentContributor>();
|
|
6
|
-
|
|
7
|
-
const Link = defineNuxtLink({ prefetch: false });
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<Link
|
|
12
|
-
:class="$style.contributor"
|
|
13
|
-
:to="createContributorLink(contributorId)"
|
|
14
|
-
>
|
|
15
|
-
<ContributorAvatar :contributorId :avatar />
|
|
16
|
-
<span>{{ displayName || contributorId }}</span>
|
|
17
|
-
</Link>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<style lang="scss" module>
|
|
21
|
-
.contributor {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
gap: var(--gap);
|
|
25
|
-
padding: var(--gap);
|
|
26
|
-
color: var(--text);
|
|
27
|
-
text-decoration: none;
|
|
28
|
-
|
|
29
|
-
@include transition(background);
|
|
30
|
-
|
|
31
|
-
&:hover {
|
|
32
|
-
background: var(--bgAccent);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</style>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { TopicPart } from 'erudit-cog/schema';
|
|
3
|
-
import { NO_ALIASES } from '@erudit-js/bitran-elements/aliases/shared';
|
|
4
|
-
|
|
5
|
-
import eruditConfig from '#erudit/config';
|
|
6
|
-
|
|
7
|
-
import { type ContentTopicData } from '@erudit/shared/content/data/type/topic';
|
|
8
|
-
import { topicLocation } from '@app/scripts/aside/minor/topic';
|
|
9
|
-
|
|
10
|
-
import ContentDecoration from '../utils/ContentDecoration.vue';
|
|
11
|
-
import ContentTitle from '../utils/ContentTitle.vue';
|
|
12
|
-
import ContentDescription from '../utils/ContentDescription.vue';
|
|
13
|
-
import TopicPartSwitch from './TopicPartSwitch.vue';
|
|
14
|
-
import Breadcrumb from '../utils/Breadcrumb.vue';
|
|
15
|
-
import ContentPopovers from '../utils/ContentPopovers.vue';
|
|
16
|
-
import ContentReferences from '../utils/ContentReferences.vue';
|
|
17
|
-
import ContentSection from '../utils/ContentSection.vue';
|
|
18
|
-
import { TOPIC_PART_ICON } from '@erudit/shared/icons';
|
|
19
|
-
|
|
20
|
-
const location = useBitranLocation();
|
|
21
|
-
const topicPart = computed(() => location.value?.type as TopicPart);
|
|
22
|
-
|
|
23
|
-
const topicData = await useContentData<ContentTopicData>();
|
|
24
|
-
await useContentPage(topicData);
|
|
25
|
-
|
|
26
|
-
const phrase = await usePhrases('article', 'summary', 'practice');
|
|
27
|
-
|
|
28
|
-
const content = await useBitranContent(location);
|
|
29
|
-
|
|
30
|
-
onMounted(() => {
|
|
31
|
-
watchEffect(() => {
|
|
32
|
-
// Telling live toc that content is mounted
|
|
33
|
-
topicLocation.value = location.value;
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<template>
|
|
39
|
-
<ContentDecoration
|
|
40
|
-
v-if="topicData.generic.decoration"
|
|
41
|
-
:decoration="topicData.generic.decoration"
|
|
42
|
-
/>
|
|
43
|
-
|
|
44
|
-
<Breadcrumb
|
|
45
|
-
v-if="topicData.generic.context?.length > 1"
|
|
46
|
-
:context="topicData.generic.context"
|
|
47
|
-
/>
|
|
48
|
-
|
|
49
|
-
<ContentTitle
|
|
50
|
-
:title="
|
|
51
|
-
topicData.generic?.title ||
|
|
52
|
-
topicData.generic.contentId.split('/').pop()!
|
|
53
|
-
"
|
|
54
|
-
:icon="TOPIC_PART_ICON[location!.type as TopicPart]"
|
|
55
|
-
:hint="phrase[location!.type as TopicPart]"
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
<ContentDescription
|
|
59
|
-
v-if="topicData.generic?.description"
|
|
60
|
-
:description="topicData.generic?.description"
|
|
61
|
-
/>
|
|
62
|
-
|
|
63
|
-
<ContentPopovers :generic="topicData.generic" />
|
|
64
|
-
|
|
65
|
-
<TopicPartSwitch
|
|
66
|
-
:partLinks="topicData.topicPartLinks"
|
|
67
|
-
:active="topicPart"
|
|
68
|
-
/>
|
|
69
|
-
|
|
70
|
-
<div style="clear: both"></div>
|
|
71
|
-
|
|
72
|
-
<BitranContent :content :context="{ location, aliases: NO_ALIASES() }" />
|
|
73
|
-
|
|
74
|
-
<ContentSection v-if="topicData.generic.references">
|
|
75
|
-
<ContentReferences :references="topicData.generic.references" />
|
|
76
|
-
</ContentSection>
|
|
77
|
-
|
|
78
|
-
<AdsBottomBanner v-if="eruditConfig.ads?.bottomBlockId" />
|
|
79
|
-
</template>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { topicParts, type TopicPart } from 'erudit-cog/schema';
|
|
3
|
-
|
|
4
|
-
import type { TopicPartLinks } from '@erudit/shared/content/data/type/topic';
|
|
5
|
-
import { TOPIC_PART_ICON } from '@erudit/shared/icons';
|
|
6
|
-
|
|
7
|
-
defineProps<{ partLinks: TopicPartLinks; active: TopicPart }>();
|
|
8
|
-
|
|
9
|
-
const phrase = await usePhrases('article', 'summary', 'practice');
|
|
10
|
-
const Link = defineNuxtLink({ prefetch: false });
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<section :class="$style.topicPartSwitch">
|
|
15
|
-
<Link
|
|
16
|
-
v-for="topicPart of topicParts"
|
|
17
|
-
:to="partLinks[topicPart]"
|
|
18
|
-
:class="[
|
|
19
|
-
$style.partButton,
|
|
20
|
-
active === topicPart && $style.active,
|
|
21
|
-
!partLinks[topicPart] && $style.noLink,
|
|
22
|
-
]"
|
|
23
|
-
>
|
|
24
|
-
<MyIcon :name="TOPIC_PART_ICON[topicPart]" />
|
|
25
|
-
<div :class="$style.label">{{ phrase[topicPart] }}</div>
|
|
26
|
-
</Link>
|
|
27
|
-
</section>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<style lang="scss" module>
|
|
31
|
-
@use '$/def/bp';
|
|
32
|
-
|
|
33
|
-
.topicPartSwitch {
|
|
34
|
-
--height: 50px;
|
|
35
|
-
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: end;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
gap: var(--gapBig);
|
|
40
|
-
margin: var(--_pMainY) 0;
|
|
41
|
-
margin-top: var(--gapBig);
|
|
42
|
-
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: var(--height);
|
|
45
|
-
background: linear-gradient(to bottom, transparent, var(--bgAside));
|
|
46
|
-
border-bottom: 2px solid var(--border);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.partButton {
|
|
50
|
-
position: relative;
|
|
51
|
-
top: 2px;
|
|
52
|
-
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
gap: calc(var(--gap) / 1.3);
|
|
56
|
-
padding: 0 var(--gap);
|
|
57
|
-
|
|
58
|
-
height: var(--height);
|
|
59
|
-
background: var(--bgMain);
|
|
60
|
-
border: 2px solid var(--border);
|
|
61
|
-
border-bottom-color: transparent;
|
|
62
|
-
border-top-left-radius: 5px;
|
|
63
|
-
border-top-right-radius: 5px;
|
|
64
|
-
|
|
65
|
-
line-height: 0;
|
|
66
|
-
text-decoration: none;
|
|
67
|
-
font-weight: 550;
|
|
68
|
-
color: var(--textMuted);
|
|
69
|
-
|
|
70
|
-
@include transition(color, background, border-color);
|
|
71
|
-
|
|
72
|
-
[my-icon] {
|
|
73
|
-
font-size: 1.1em;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:not(.active) {
|
|
77
|
-
background: var(--bgAside);
|
|
78
|
-
border-bottom-color: color-mix(
|
|
79
|
-
in srgb,
|
|
80
|
-
var(--border),
|
|
81
|
-
var(--bgMain) 50%
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
&.noLink {
|
|
85
|
-
color: color-mix(in srgb, var(--textDisabled), transparent 35%);
|
|
86
|
-
border-bottom-color: var(--border);
|
|
87
|
-
cursor: not-allowed;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&:not(.noLink):hover {
|
|
91
|
-
color: var(--text);
|
|
92
|
-
background: var(--bgMain);
|
|
93
|
-
border-bottom-color: transparent;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&.active {
|
|
98
|
-
color: var(--brand);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@include bp.below('mobile') {
|
|
103
|
-
.topicPartSwitch {
|
|
104
|
-
--height: 45px;
|
|
105
|
-
gap: var(--gap);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.partButton {
|
|
109
|
-
gap: var(--gapSmall);
|
|
110
|
-
|
|
111
|
-
&:not(.active) {
|
|
112
|
-
.label {
|
|
113
|
-
display: none;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
</style>
|