diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.ts similarity index 69% rename from docs/.vuepress/config.js rename to docs/.vuepress/config.ts index b762f9a..952ae54 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.ts @@ -1,23 +1,19 @@ import { defineUserConfig } from '@vuepress/cli'; -import { viteBundler } from '@vuepress/bundler-vite' +import { viteBundler } from '@vuepress/bundler-vite'; -import { hope } from 'vuepress-theme-hope'; - -import themeConfig from './themeConfig'; +import theme from './theme.js'; export default defineUserConfig({ title: 'ct.js Documentation', description: 'Docs, tutorials, guides', - bundler: viteBundler({ - viteOptions: {}, - vuePluginOptions: {}, - }), - plugins: [], base: '/', head: [ - ['script', { - src: '/themeSwitcher.js' - }], + [ + 'script', + { + src: '/themeSwitcher.js', + }, + ], ['link', { rel: 'icon', href: '/assets/img/logo.png' }], ], @@ -30,12 +26,12 @@ export default defineUserConfig({ '/ru/': { lang: 'ru-Ru', title: 'Документация к игровому движку ct.js', - description: 'Референсы, туториалы, гайды' + description: 'Референсы, туториалы, гайды', }, '/pt_BR/': { lang: 'pt-BR', title: 'Documentação ct.js', - description: 'Docs, tutoriais, guias' + description: 'Docs, tutoriais, guias', }, '/it/': { lang: 'it', @@ -44,11 +40,15 @@ export default defineUserConfig({ }, }, - theme: hope(themeConfig), markdown: { toc: { level: [2, 3, 4], }, }, - shouldPrefetch: false + + bundler: viteBundler(), + + theme, + + shouldPrefetch: false, }); diff --git a/docs/.vuepress/configs/en.ts b/docs/.vuepress/configs/en.ts new file mode 100644 index 0000000..ab57347 --- /dev/null +++ b/docs/.vuepress/configs/en.ts @@ -0,0 +1,238 @@ +import { navbar, sidebar } from 'vuepress-theme-hope'; + +export const enNavbar = navbar([ + { + text: 'Home', + link: '/', + icon: 'home', + }, + { + text: 'Get ct.js', + link: 'https://ctjs.rocks', + icon: 'download', + }, + { + text: 'Discord', + link: 'https://discord.gg/yuvuDW5', + icon: 'user-group', + }, + { + text: 'Forum', + link: 'https://forum.ctjs.rocks/', + icon: 'comments', + }, +]); + +export const enSidebar = sidebar([ + { + link: '/', + text: 'Home', + icon: 'home', + }, + { + text: 'Learn Catnip', + collapsible: true, + icon: 'book', + prefix: '/learn-catnip/', + children: ['introduction', 'conditions-and-loops', 'working-with-copies'], + }, + { + text: 'Learn JavaScript', + collapsible: true, + icon: 'book', + prefix: '/learn-js/', + children: ['jsintro_pt1', 'jsintro_pt2', 'jsintro_pt3'], + }, + { + collapsible: false, + text: 'Tutorials', + icon: 'arrows-turn-to-dots', + prefix: '/tutorials/', + children: [ + 'making-games-shooter', + 'making-games-platformer', + 'making-games-jettycat', + 'making-games-polishing-jettycat', + ], + }, + { + text: 'The `core` library', + collapsible: false, + icon: 'certificate', + children: [ + 'ct-concepts', + 'backgrounds', + 'behaviors', + 'camera', + 'emitters', + { + link: '/inputs', + text: 'inputs and actions', + }, + 'res', + 'rooms', + 'settings', + 'sounds', + 'styles', + 'tilemaps', + 'timer', + 'templates', + { + link: '/u', + text: 'u (utilities)', + }, + { + link: '/catmoddocs.md', + text: 'Where are the docs for catmods?', + }, + ], + }, + { + text: 'Built-in ct.js classes', + collapsible: false, + icon: 'icons', + children: [ + { + link: '/background', + text: 'Background', + }, + { + link: '/copy', + text: 'Copy', + }, + { + link: '/room', + text: 'Room', + }, + ], + }, + { + text: 'Working with the editor', + collapsible: false, + icon: 'laptop-code', + children: [ + 'actions', + { + link: '/room-editor', + text: 'Using the room editor', + }, + { + link: '/bitmap-fonts', + text: 'Using bitmap fonts', + }, + { + link: '/content-subsystem', + text: 'Content editor', + }, + 'enumerations', + 'building-your-game', + 'deployment-itch-io', + ], + }, + { + text: 'Tips & tricks', + collapsible: false, + icon: 'lightbulb', + prefix: '/tips-n-tricks/', + children: [ + 'game-and-ui-coordinates', + 'movement', + 'game-pause', + 'localstorage', + 'viewport-management', + 'textures-magic-properties', + 'dragging-copies', + 'gamedev-resources', + ], + }, + { + text: 'Technical stuff', + collapsible: true, + icon: 'gears', + children: ['/event-order'], + }, + { + text: 'Modding ct.js', + collapsible: true, + icon: 'plug', + prefix: '/modding-ctjs/', + children: [ + { + link: 'mod-structure', + text: "Directory structure and module's manifest", + }, + { + link: 'events-and-injections', + text: 'Extending ct.js code with injections', + }, + { + link: 'settings-and-extensions', + text: 'Settings and additional fields', + }, + { + link: 'input-methods', + text: 'Adding new input methods', + }, + { + link: 'modded-events', + text: 'Adding new events', + }, + { + link: 'typings-and-intellisense', + text: 'Autocompletion and IntelliSense', + }, + { + link: 'adding-blocks-to-catnip', + text: 'Adding blocks to catnip', + }, + { + link: 'fields-declaration', + text: 'Fields reference', + }, + ], + }, + { + text: 'Troubleshooting', + collapsible: true, + icon: 'hand', + prefix: '/troubleshooting/', + children: [ + { + link: 'migration-0to1', + text: 'Migration from 0.x to 1.x', + }, + { + link: 'migration-1-2to1-3', + text: 'Migration from 1.2 to 1.3', + }, + { + link: 'migration-1to2', + text: 'Migration from 1.x to 2.0', + }, + { + link: 'migration-2to3', + text: 'Migration from 2.x to 3.0', + }, + { + link: 'migration-3to4', + text: 'Migration from 3.x to 4.0', + }, + { + link: 'migration-4to5', + text: 'Migration from 4.0 to 5.0', + }, + { + link: 'teared-background', + text: 'Background splits into squares!', + }, + { + link: 'leaking-pixels', + text: 'Textures have leaked pixels!', + }, + { + link: 'sounds-not-playing', + text: "Sounds don't play at game start!", + }, + ], + }, +]); diff --git a/docs/.vuepress/configs/index.ts b/docs/.vuepress/configs/index.ts new file mode 100644 index 0000000..3dad526 --- /dev/null +++ b/docs/.vuepress/configs/index.ts @@ -0,0 +1,3 @@ +export * from './en.js'; +export * from './ru.js'; +export * from './ptBR.js'; diff --git a/docs/.vuepress/configs/it.ts b/docs/.vuepress/configs/it.ts new file mode 100644 index 0000000..6e3eb2c --- /dev/null +++ b/docs/.vuepress/configs/it.ts @@ -0,0 +1,55 @@ +import { navbar, sidebar } from 'vuepress-theme-hope'; + +export const itNavbar = navbar([ + { + text: 'Home', + link: '/it/', + }, + { + text: 'Scarica ct.js', + link: 'https://ctjs.rocks', + }, + { + text: 'Discord', + link: 'https://discord.gg/yuvuDW5', + }, + { + text: 'Forum', + link: 'https://forum.ctjs.rocks/', + }, +]); + +export const itSidebar = sidebar([ + { + text: 'Home', + link: '/it/', + }, + { + text: 'Introduzione a JS', + collapsible: false, + children: ['/it/jsintro_pt1', '/it/jsintro_pt2', '/it/jsintro_pt3'], + }, + { + collapsible: false, + text: 'Tutorial', + children: [ + '/it/tut-making-shooter', + '/it/tut-making-platformer', + '/it/tut-making-jettycat', + '/it/tut-polishing-jettycat', + ], + }, + { + text: "Utilizzare l'editor", + collapsible: false, + children: [ + '/it/actions', + '/it/room-editor', + '/it/bitmap-fonts', + '/it/skeletal-animation', + '/it/content-subsystem', + '/it/building-your-game', + '/it/deployment-itch-io', + ], + }, +]); diff --git a/docs/.vuepress/configs/ptBR.ts b/docs/.vuepress/configs/ptBR.ts new file mode 100644 index 0000000..29a0a35 --- /dev/null +++ b/docs/.vuepress/configs/ptBR.ts @@ -0,0 +1,204 @@ +import { navbar, sidebar } from 'vuepress-theme-hope'; + +export const ptBRNavbar = navbar([ + { + text: 'Início', + link: '/pt_BR/', + }, + { + text: 'Baixe o ct.js', + link: 'https://ctjs.rocks', + }, + { + text: 'Discord', + link: 'https://discord.gg/yuvuDW5', + }, + { + text: 'Fórum', + link: 'https://forum.ctjs.rocks/', + }, +]); + +export const ptBRSidebar = sidebar([ + { + link: '/pt_BR/', + text: 'Página Inicial', + }, + { + text: 'Introdução ao JS', + collapsible: false, + children: [ + '/pt_BR/jsintro_pt1', + '/pt_BR/jsintro_pt2', + '/pt_BR/jsintro_pt3', + ], + }, + { + collapsible: false, + text: 'Tutoriais', + children: [ + '/pt_BR/tut-making-shooter', + '/pt_BR/tut-making-platformer', + '/pt_BR/tut-making-jettycat', + '/pt_BR/tut-polishing-jettycat', + '/pt_BR/deployment-itch-io', + ], + }, + { + text: 'Biblioteca Principal', + collapsible: false, + children: [ + '/pt_BR/ct-concepts', + '/pt_BR/ct', + '/pt_BR/ct.backgrounds', + '/pt_BR/ct.camera', + '/pt_BR/ct.emitters', + { + link: '/pt_BR/ct.inputs', + text: 'ct.inputs e ct.actions', + }, + '/pt_BR/ct.res', + '/pt_BR/ct.rooms', + '/pt_BR/ct.styles', + '/pt_BR/ct.tilemaps', + '/pt_BR/ct.timer', + '/pt_BR/ct.templates', + { + link: '/pt_BR/ct.u', + text: 'ct.u (Utilitários)', + }, + { + link: '/pt_BR/catmoddocs', + text: 'Onde está a documentação para os outros módulos ct.*?', + }, + ], + }, + { + text: 'Classes incorporadas no ct.js', + collapsible: false, + children: [ + { + link: '/pt_BR/Background', + text: 'Background', + }, + { + link: '/pt_BR/Copy', + text: 'Copy', + }, + { + link: '/pt_BR/Room', + text: 'Room', + }, + ], + }, + { + text: 'Trabalhando com o editor', + collapsible: false, + children: [ + '/pt_BR/actions', + { + link: '/pt_BR/room-editor', + text: 'Usando o editor de salas', + }, + { + link: '/pt_BR/bitmap-fonts', + text: 'Usando fontes bitmap', + }, + { + link: '/pt_BR/skeletal-animation', + text: 'Usando animações por ossos', + }, + { + link: '/pt_BR/content-subsystem', + text: 'Editor de conteúdo', + }, + { + link: '/pt_BR/building-your-game', + text: 'Exportando o seu jogo', + }, + ], + }, + { + text: 'Dicas & truques', + collapsible: false, + children: [ + '/pt_BR/game-and-ui-coordinates', + '/pt_BR/movement', + '/pt_BR/game-pause', + '/pt_BR/localstorage', + '/pt_BR/viewport-management', + '/pt_BR/textures-magic-properties', + '/pt_BR/dragging-copies', + '/pt_BR/gamedev-resources', + ], + }, + { + text: 'Material técnico', + collapsible: true, + children: ['/pt_BR/event-order'], + }, + { + text: 'Estendendo ct.js', + collapsible: false, + children: [ + { + link: '/pt_BR/modding-structure', + text: 'Estrutura de diretórios e manifesto de módulos', + }, + { + link: '/pt_BR/modding-events-and-injections', + text: 'Estendendo eventos com injeções', + }, + { + link: '/pt_BR/modding-settings-and-extensions', + text: 'Adicionando e definindo campos', + }, + { + link: '/pt_BR/modding-input-methods', + text: 'Adicionando novos métodos de entrada', + }, + { + link: '/pt_BR/modding-adding-sound-module', + text: 'Adicionando um novo pacote de som', + }, + { + link: '/pt_BR/modding-typings-and-intellisense', + text: 'Autocompletação e sugestão de código', + }, + { + link: '/pt_BR/modding-fields-declaration', + text: 'Referência de campos', + }, + ], + }, + { + text: 'Solução de problemas', + collapsible: false, + children: [ + { + link: '/pt_BR/migration-0to1', + text: 'Migrando da 0.x para 1.x', + }, + { + link: '/pt_BR/migration-1-2to1-3', + text: 'Migrando da 1.2 para 1.3', + }, + { + link: '/pt_BR/migration-1to2', + text: 'Migrando dat 1.x para 2.0', + }, + { + link: '/pt_BR/troubleshooting-teared-background', + text: 'Minha imagem de fundo dividida em quadrados!', + }, + { + link: '/pt_BR/troubleshooting-leaking-pixels', + text: 'Texturas têm pixels extras!', + }, + { + link: '/pt_BR/troubleshooting-sounds-not-playing', + text: 'Som não toca no início do jogo!', + }, + ], + }, +]); diff --git a/docs/.vuepress/configs/ru.ts b/docs/.vuepress/configs/ru.ts new file mode 100644 index 0000000..a0f4285 --- /dev/null +++ b/docs/.vuepress/configs/ru.ts @@ -0,0 +1,238 @@ +import { navbar, sidebar } from 'vuepress-theme-hope'; + +export const ruNavbar = navbar([ + { + text: 'Главная', + link: '/ru/', + icon: 'home', + }, + { + text: 'Скачать ct.js', + link: 'https://ctjs.rocks/ru/download/', + icon: 'download', + }, + { + text: 'Discord', + link: 'https://comigo.games/rudiscord', + icon: 'user-group', + }, + { + text: 'Форум', + link: 'https://forum.ctjs.rocks/', + icon: 'comments', + }, +]); + +export const ruSidebar = sidebar([ + { + link: '/', + text: 'Главная', + icon: 'home', + }, + { + text: 'Учим Котомяту (Catnip)', + collapsible: true, + icon: 'book', + prefix: '/ru/learn-catnip/', + children: ['introduction', 'conditions-and-loops', 'working-with-copies'], + }, + { + text: 'Учим JavaScript', + collapsible: true, + icon: 'book', + prefix: '/ru/learn-js/', + children: ['jsintro_pt1', 'jsintro_pt2', 'jsintro_pt3'], + }, + { + collapsible: false, + text: 'Туториалы', + icon: 'arrows-turn-to-dots', + prefix: '/ru/tutorials/', + children: [ + 'making-games-shooter', + 'making-games-platformer', + 'making-games-jettycat', + 'making-games-polishing-jettycat', + ], + }, + { + text: 'Основная библиотека', + collapsible: false, + icon: 'certificate', + prefix: '/ru/', + children: [ + 'ct-concepts', + 'backgrounds', + 'behaviors', + 'camera', + 'emitters', + { + link: '/ru/inputs', + text: 'inputs и actions', + }, + 'res', + 'rooms', + 'settings', + 'sounds', + 'styles', + 'tilemaps', + 'timer', + 'templates', + { + link: 'u', + text: 'u (утилиты)', + }, + { + link: 'catmoddocs', + text: 'Где документация к котомодам?', + }, + ], + }, + { + text: 'Встроенные классы', + collapsible: false, + icon: 'icons', + prefix: '/ru/', + children: [ + { + link: 'background', + text: 'Background (фон)', + }, + { + link: 'copy', + text: 'Copy (копия)', + }, + { + link: 'room', + text: 'Room (комната)', + }, + ], + }, + { + text: 'Работа с редактором', + collapsible: false, + icon: 'laptop-code', + prefix: '/ru/', + children: [ + 'actions', + { + link: 'room-editor', + text: 'Работа с редактором комнат', + }, + { + link: 'bitmap-fonts', + text: 'Использование битмап-шрифтов', + }, + { + link: 'content-subsystem', + text: 'Подсистема контента', + }, + 'enumerations', + 'building-your-game', + 'deployment-itch-io', + ], + }, + { + text: 'Подсказки и приёмы', + collapsible: false, + icon: 'lightbulb', + prefix: '/ru/tips-n-tricks/', + children: [ + 'game-and-ui-coordinates', + 'movement', + 'game-pause', + 'localstorage', + 'viewport-management', + 'textures-magic-properties', + 'dragging-copies', + 'gamedev-resources', + ], + }, + { + prefix: '/ru/', + text: 'Техническая информация', + collapsible: true, + icon: 'gears', + children: ['event-order'], + }, + { + text: 'Моддинг ct.js', + collapsible: true, + icon: 'plug', + prefix: '/ru/modding-ctjs/', + children: [ + { + link: 'mod-structure', + text: 'Структура модуля и его манифест', + }, + { + link: 'events-and-injections', + text: 'Расширение кода ct.js инъекциями', + }, + { + link: 'settings-and-extensions', + text: 'Добавление настроек и дополнительных полей', + }, + { + link: 'input-methods', + text: 'Добавление новых методов ввода', + }, + { + link: 'modded-events', + text: 'Добавление новых событий', + }, + { + link: 'typings-and-intellisense', + text: 'Автозаполнение и IntelliSense', + }, + { + link: 'fields-declaration', + text: 'Справка по полям ввода', + }, + ], + }, + { + text: 'В случае неполадок', + collapsible: false, + icon: 'hand', + prefix: '/ru/troubleshooting/', + children: [ + { + link: 'migration-0to1', + text: 'Миграция с 0.x на 1.x', + }, + { + link: 'migration-1-2to1-3', + text: 'Миграция с 1.2 на 1.3', + }, + { + link: 'migration-1to2', + text: 'Миграция с 1.x на 2.0', + }, + { + link: 'migration-2to3', + text: 'Миграция с 2.x на 3.0', + }, + { + link: 'migration-3to4', + text: 'Миграция с 3.x на 4.0', + }, + { + link: 'migration-4to5', + text: 'Миграция с 4.0 на 5.0', + }, + { + link: 'teared-background', + text: 'Фоны разваливаются на квадраты!', + }, + { + link: 'leaking-pixels', + text: 'У текстур видны странные края!', + }, + { + link: 'sounds-not-playing', + text: 'Звуки не проигрываются на старте!', + }, + ], + }, +]); diff --git a/docs/.vuepress/localeIt.js b/docs/.vuepress/localeIt.js deleted file mode 100644 index 4a77f37..0000000 --- a/docs/.vuepress/localeIt.js +++ /dev/null @@ -1,73 +0,0 @@ -export default { - navbarLocales: { - langName: 'Italiano' - }, - // text for the edit-on-github link - editLinkText: "Aiutare a migliorare questa pagina!", - repoLabel: "Contribuisci!", - navbar: [ - { - text: "Home", - link: "/", - }, - { - text: "Scarica ct.js", - link: "https://ctjs.rocks", - }, - { - text: "Discord", - link: "https://discord.gg/yuvuDW5", - }, - { - text: "Forum", - link: "https://forum.ctjs.rocks/", - }, - ], - sidebar: [ - { - link: "/", - // text: "La documentazione italiana è ancora incompleta e può differire da quella originale!", - }, - { - link: "/it/", - text: "Home", - }, - { - text: "Introduzione a JS", - collapsible: false, - children: [ - "/it/jsintro_pt1", - "/it/jsintro_pt2", - "/it/jsintro_pt3", - ], - }, - { - collapsible: false, - text: "Tutorial", - children: [ - "/it/tut-making-shooter", - "/it/tut-making-platformer", - "/it/tut-making-jettycat", - "/it/tut-polishing-jettycat", - ], - }, { - text: "Utilizzare l\'editor", - collapsible: false, - children: [ - "/it/actions", - "/it/room-editor", - "/it/bitmap-fonts", - "/it/skeletal-animation", - "/it/content-subsystem", - "/it/building-your-game", - "/it/deployment-itch-io", - ], - }, - ], - serviceWorker: { - updatePopup: { - message: "Sono disponibili nuovi contenuti.", - buttonText: "Ricarica la pagina", - }, - }, -}; diff --git a/docs/.vuepress/localePtBR.js b/docs/.vuepress/localePtBR.js deleted file mode 100644 index e04f1b2..0000000 --- a/docs/.vuepress/localePtBR.js +++ /dev/null @@ -1,220 +0,0 @@ -export default { - // text for the language dropdown - selectLanguageText: "Idioma", - // label for this locale in the language dropdown - selectLanguageName: "Português - Brasil", - // text for the edit-on-github link - editLinkText: "Ajude a melhorar esta página!", - repoLabel: "Contribua!", - navbar: [ - { - text: "Início", - link: "/", - }, - { - text: "Baixe o ct.js", - link: "https://ctjs.rocks", - }, - { - text: "Discord", - link: "https://discord.gg/yuvuDW5", - }, - { - text: "Fórum", - link: "https://forum.ctjs.rocks/", - }, - ], - serviceWorker: { - updatePopup: { - message: "Novo conteúdo está disponível.", - buttonText: "Atualize a página", - }, - }, - sidebar: [ - { - link: "/", - // text: "A documentação em português ainda está incompleta e pode divergir do inglês!", - }, - { - link: "/pt_BR/", - text: "Página Inicial", - }, - { - text: "Introdução ao JS", - collapsible: false, - children: [ - "/pt_BR/jsintro_pt1", - "/pt_BR/jsintro_pt2", - "/pt_BR/jsintro_pt3", - ], - }, - { - collapsible: false, - text: "Tutoriais", - children: [ - "/pt_BR/tut-making-shooter", - "/pt_BR/tut-making-platformer", - "/pt_BR/tut-making-jettycat", - "/pt_BR/tut-polishing-jettycat", - "/pt_BR/deployment-itch-io", - ], - }, - { - text: "Biblioteca Principal", - collapsible: false, - children: [ - "/pt_BR/ct-concepts", - "/pt_BR/ct", - "/pt_BR/ct.backgrounds", - "/pt_BR/ct.camera", - "/pt_BR/ct.emitters", - { - link: "/pt_BR/ct.inputs", - text: "ct.inputs e ct.actions", - }, - "/pt_BR/ct.res", - "/pt_BR/ct.rooms", - "/pt_BR/ct.styles", - "/pt_BR/ct.tilemaps", - "/pt_BR/ct.timer", - "/pt_BR/ct.templates", - { - link: "/pt_BR/ct.u", - text: "ct.u (Utilitários)", - }, - { - link: "/pt_BR/catmoddocs", - text: "Onde está a documentação para os outros módulos ct.*?", - }, - ], - }, - { - text: "Classes incorporadas no ct.js", - collapsible: false, - children: [ - { - link: "/pt_BR/Background", - text: "Background", - }, - { - link: "/pt_BR/Copy", - text: "Copy", - }, - { - link: "/pt_BR/Room", - text: "Room", - }, - ], - }, - { - text: "Trabalhando com o editor", - collapsible: false, - children: [ - "/pt_BR/actions", - { - link: "/pt_BR/room-editor", - text: "Usando o editor de salas", - }, - { - link: "/pt_BR/bitmap-fonts", - text: "Usando fontes bitmap", - }, - { - link: "/pt_BR/skeletal-animation", - text: "Usando animações por ossos", - }, - { - link: "/pt_BR/content-subsystem", - text: "Editor de conteúdo", - }, - { - link: "/pt_BR/building-your-game", - text: "Exportando o seu jogo", - }, - ], - }, - { - text: "Dicas & truques", - collapsible: false, - children: [ - "/pt_BR/game-and-ui-coordinates", - "/pt_BR/movement", - "/pt_BR/game-pause", - "/pt_BR/localstorage", - "/pt_BR/viewport-management", - "/pt_BR/textures-magic-properties", - "/pt_BR/dragging-copies", - "/pt_BR/gamedev-resources", - ], - }, - { - text: "Material técnico", - collapsible: true, - children: ["/pt_BR/event-order"], - }, - { - text: "Estendendo ct.js", - collapsible: false, - children: [ - { - link: "/pt_BR/modding-structure", - text: "Estrutura de diretórios e manifesto de módulos", - }, - { - link: "/pt_BR/modding-events-and-injections", - text: "Estendendo eventos com injeções", - }, - { - link: "/pt_BR/modding-settings-and-extensions", - text: "Adicionando e definindo campos", - }, - { - link: "/pt_BR/modding-input-methods", - text: "Adicionando novos métodos de entrada", - }, - { - link: "/pt_BR/modding-adding-sound-module", - text: "Adicionando um novo pacote de som", - }, - { - link: "/pt_BR/modding-typings-and-intellisense", - text: "Autocompletação e sugestão de código", - }, - { - link: "/pt_BR/modding-fields-declaration", - text: "Referência de campos", - }, - ], - }, - { - text: "Solução de problemas", - collapsible: false, - children: [ - { - link: "/pt_BR/migration-0to1", - text: "Migrando da 0.x para 1.x", - }, - { - link: "/pt_BR/migration-1-2to1-3", - text: "Migrando da 1.2 para 1.3", - }, - { - link: "/pt_BR/migration-1to2", - text: "Migrando dat 1.x para 2.0", - }, - { - link: "/pt_BR/troubleshooting-teared-background", - text: "Minha imagem de fundo dividida em quadrados!", - }, - { - link: "/pt_BR/troubleshooting-leaking-pixels", - text: "Texturas têm pixels extras!", - }, - { - link: "/pt_BR/troubleshooting-sounds-not-playing", - text: "Som não toca no início do jogo!", - }, - ], - }, - ], -}; diff --git a/docs/.vuepress/localeRu.js b/docs/.vuepress/localeRu.js deleted file mode 100644 index d658c7a..0000000 --- a/docs/.vuepress/localeRu.js +++ /dev/null @@ -1,233 +0,0 @@ -export default { - /*// text for the language dropdown - selectLanguageText: "Язык", - // label for this locale in the language dropdown - selectLanguageName: "Русский", - // text for the edit-on-github link - editLinkText: "Помогите сделать эту страницу лучше!",*/ - navbar: [ - { - text: "Главная", - link: "/ru/", - icon: 'home' - }, - { - text: "Скачать ct.js", - link: "https://ctjs.rocks/ru/download/", - icon: 'download' - }, - { - text: "Discord", - link: "https://comigo.games/rudiscord", - icon: 'user-group' - }, - { - text: "Форум", - link: "https://forum.ctjs.rocks/", - icon: 'comments' - }, - ], - sidebar: [ - { - link: '/', - text: 'Главная', - icon: 'home' - }, { - text: 'Учим Котомяту (Catnip)', - collapsible: true, - icon: 'book', - prefix: '/ru/learn-catnip/', - children: [ - 'introduction', - 'conditions-and-loops', - 'working-with-copies' - ] - }, { - text: 'Учим JavaScript', - collapsible: true, - icon: 'book', - prefix: '/ru/learn-js/', - children: [ - 'jsintro_pt1', - 'jsintro_pt2', - 'jsintro_pt3' - ], - }, { - collapsible: false, - text: 'Туториалы', - icon: 'arrows-turn-to-dots', - prefix: '/ru/tutorials/', - children: [ - 'making-games-shooter', - 'making-games-platformer', - 'making-games-jettycat', - 'making-games-polishing-jettycat' - ], - }, { - text: 'Основная библиотека', - collapsible: false, - icon: 'certificate', - prefix: '/ru/', - children: [ - 'ct-concepts', - 'backgrounds', - 'behaviors', - 'camera', - 'emitters', - { - link: '/ru/inputs', - text: 'inputs и actions' - }, - 'res', - 'rooms', - 'settings', - 'sounds', - 'styles', - 'tilemaps', - 'timer', - 'templates', - { - link: 'u', - text: 'u (утилиты)' - }, - { - link: 'catmoddocs', - text: 'Где документация к котомодам?' - } - ] - }, { - text: 'Встроенные классы', - collapsible: false, - icon: 'icons', - prefix: '/ru/', - children: [ - { - link: 'background', - text: 'Background (фон)' - }, { - link: 'copy', - text: 'Copy (копия)' - }, { - link: 'room', - text: 'Room (комната)' - } - ] - }, { - text: 'Работа с редактором', - collapsible: false, - icon: 'laptop-code', - prefix: '/ru/', - children: [ - 'actions', - { - link: 'room-editor', - text: 'Работа с редактором комнат' - }, - { - link: 'bitmap-fonts', - text: 'Использование битмап-шрифтов' - }, - { - link: 'content-subsystem', - text: 'Подсистема контента' - }, - "enumerations", - "building-your-game", - "deployment-itch-io" - ] - }, { - text: 'Подсказки и приёмы', - collapsible: false, - icon: 'lightbulb', - prefix: '/ru/tips-n-tricks/', - children: [ - 'game-and-ui-coordinates', - 'movement', - 'game-pause', - 'localstorage', - 'viewport-management', - 'textures-magic-properties', - 'dragging-copies', - 'gamedev-resources' - ] - }, { - prefix: '/ru/', - text: 'Техническая информация', - collapsible: true, - icon: 'gears', - children: [ - 'event-order' - ] - }, { - text: 'Моддинг ct.js', - collapsible: true, - icon: 'plug', - prefix: "/ru/modding-ctjs/", - children: [ - { - link: 'mod-structure', - text: 'Структура модуля и его манифест' - }, { - link: 'events-and-injections', - text: 'Расширение кода ct.js инъекциями' - }, { - link: 'settings-and-extensions', - text: 'Добавление настроек и дополнительных полей' - }, { - link: 'input-methods', - text: 'Добавление новых методов ввода' - }, { - link: 'modded-events', - text: 'Добавление новых событий' - }, { - link: 'typings-and-intellisense', - text: 'Автозаполнение и IntelliSense' - }, { - link: 'fields-declaration', - text: 'Справка по полям ввода' - } - ] - }, { - text: 'В случае неполадок', - collapsible: false, - icon: 'hand', - prefix: "/ru/troubleshooting/", - children: [ - { - link: 'migration-0to1', - text: 'Миграция с 0.x на 1.x' - }, { - link: 'migration-1-2to1-3', - text: 'Миграция с 1.2 на 1.3' - }, { - link: 'migration-1to2', - text: 'Миграция с 1.x на 2.0' - }, { - link: 'migration-2to3', - text: 'Миграция с 2.x на 3.0' - }, { - link: 'migration-3to4', - text: 'Миграция с 3.x на 4.0' - }, { - link: 'migration-4to5', - text: 'Миграция с 4.0 на 5.0' - }, { - link: 'teared-background', - text: 'Фоны разваливаются на квадраты!' - }, { - link: 'leaking-pixels', - text: 'У текстур видны странные края!' - }, { - link: 'sounds-not-playing', - text: 'Звуки не проигрываются на старте!' - } - ] - } - ], - serviceWorker: { - updatePopup: { - message: "Доступно новое содержимое.", - buttonText: "Обновить страницу", - }, - }, -}; diff --git a/docs/.vuepress/styles/catnip.scss b/docs/.vuepress/styles/catnip.scss index fcb521b..0560437 100644 --- a/docs/.vuepress/styles/catnip.scss +++ b/docs/.vuepress/styles/catnip.scss @@ -1,394 +1,395 @@ .feather { - width: 1.5rem; - height: 1.5rem; + width: 1.5rem; + height: 1.5rem; } catnip-block { - display: flex; - align-items: center; - flex-flow: row wrap; - gap: .1rem .25rem; - background: #fff; - background: var(--code-bg-color); - border-radius: .2rem; - border: 1px solid #c8cdd1; - border-color: var(--code-border-color); - line-height: 1; - transition: .15s ease all -} - -catnip-block img, catnip-block button, catnip-block .catnip-block-anAsyncMarker { - pointer-events: none + display: flex; + align-items: center; + flex-flow: row wrap; + gap: 0.1rem 0.25rem; + background: #fff; + background: var(--code-bg-color); + border-radius: 0.2rem; + border: 1px solid #c8cdd1; + border-color: var(--code-border-color); + line-height: 1; + transition: 0.15s ease all; +} + +catnip-block img, +catnip-block button, +catnip-block .catnip-block-anAsyncMarker { + pointer-events: none; } catnip-block button { - * { - vertical-align: middle; - } - padding: 0.25rem 0.5rem; - margin: 0.25rem 0.5rem; + padding: 0.25rem 0.5rem; + margin: 0.25rem 0.5rem; + + * { + vertical-align: middle; + } } catnip-block.command + catnip-block.command { - margin-top: 0.25rem; + margin-top: 0.25rem; } -catnip-block.computed{ - display: inline-flex +catnip-block.computed { + display: inline-flex; } -catnip-block>* { - vertical-align: middle; - flex: 0 0 auto +catnip-block > * { + vertical-align: middle; + flex: 0 0 auto; } catnip-block .catnip-block-aFiller, catnip-block .catnip-block-anAsyncMarker { - flex: 1 1 0; - text-align: right + flex: 1 1 0; + text-align: right; } catnip-block .catnip-block-aBreak { - flex: 0 0 100%; - height: 0 + flex: 0 0 100%; + height: 0; } catnip-block .catnip-block-Options { - flex: 1 0 100%; - border-top: 1px solid #74747437; - border-top: 1px solid var(--code-border-color); - margin: -.25rem -.75rem -.5rem !important; + flex: 1 0 100%; + border-top: 1px solid #74747437; + border-top: 1px solid var(--code-border-color); + margin: -0.25rem -0.75rem -0.5rem !important; } .catnip-block-Options .toright { - float: right; + float: right; } catnip-block .catnip-block-Options:last-child { - border-bottom-left-radius: .2rem; - border-bottom-right-radius: .2rem + border-bottom-left-radius: 0.2rem; + border-bottom-right-radius: 0.2rem; } -catnip-block .catnip-block-Options>.catnip-block-anOptionsToggle { - padding-top: .25rem; - text-align: center; - font-size: 80%; - opacity: .5; - transition: .15s ease all +catnip-block .catnip-block-Options > .catnip-block-anOptionsToggle { + padding-top: 0.25rem; + text-align: center; + font-size: 80%; + opacity: 0.5; + transition: 0.15s ease all; } -catnip-block .catnip-block-Options>.catnip-block-anOptionsToggle span { - margin: 0 .5rem; - vertical-align: middle; +catnip-block .catnip-block-Options > .catnip-block-anOptionsToggle span { + margin: 0 0.5rem; + vertical-align: middle; } -catnip-block .catnip-block-Options>.catnip-block-anOptionsToggle>img { - width: 1rem; - height: 1rem; - margin: 0; - vertical-align: middle; - pointer-events: none; +catnip-block .catnip-block-Options > .catnip-block-anOptionsToggle > img { + width: 1rem; + height: 1rem; + margin: 0; + vertical-align: middle; + pointer-events: none; } catnip-block .catnip-block-Options dl { - border-top: 1px solid #e1e2e5; - border-top: 1px solid var(--code-border-color); - display: flex; - flex-flow: row nowrap; - padding: .5rem .75rem; - margin: 0; - gap: .25rem; - align-items: center + border-top: 1px solid #e1e2e5; + border-top: 1px solid var(--code-border-color); + display: flex; + flex-flow: row nowrap; + padding: 0.5rem 0.75rem; + margin: 0; + gap: 0.25rem; + align-items: center; } catnip-block .catnip-block-Options dt { - flex: 1 1 25% + flex: 1 1 25%; } catnip-block .catnip-block-Options dd { - flex: 1 1 70% + flex: 1 1 70%; } catnip-block .catnip-block-anAsyncMarker { - cursor: help + cursor: help; } catnip-block .catnip-block-Blocks { - flex: 1 1 100% + flex: 1 1 100%; } -catnip-block.command>.catnip-block-aTextLabel { - overflow: hidden; - line-height: 1.25; - text-overflow: ellipsis; - flex: 0 1 auto; - word-wrap: nowrap; - white-space: nowrap; - max-width: calc(100% - 2rem) +catnip-block.command > .catnip-block-aTextLabel { + overflow: hidden; + line-height: 1.25; + text-overflow: ellipsis; + flex: 0 1 auto; + word-wrap: nowrap; + white-space: nowrap; + max-width: calc(100% - 2rem); } catnip-block asset-input { - line-height: 2 + line-height: 2; } - catnip-block.command { - padding: .5rem .75rem; - margin: .5rem 0; - gap: .5rem + padding: 0.5rem 0.75rem; + margin: 0.5rem 0; + gap: 0.5rem; } catnip-block.computed, catnip-block .catnip-block-aConstantInput { - gap: .25rem; - border-radius: 100em !important; - margin: .5rem 0; - padding: .1rem .25rem .1rem .5rem !important; - flex: 0 0 auto; - width: max-content; - box-sizing: content-box + gap: 0.25rem; + border-radius: 100em !important; + margin: 0.5rem 0; + padding: 0.1rem 0.25rem 0.1rem 0.5rem !important; + flex: 0 0 auto; + width: max-content; + box-sizing: content-box; } -catnip-block.computed>img, -catnip-block .catnip-block-aConstantInput>img { - width: 1rem; - height: 1rem +catnip-block.computed > img, +catnip-block .catnip-block-aConstantInput > img { + width: 1rem; + height: 1rem; } catnip-block.computed { - padding: .1rem .5rem .1rem .5rem !important + padding: 0.1rem 0.5rem 0.1rem 0.5rem !important; } catnip-block.computed.wildcard, catnip-block .catnip-block-aConstantInput.wildcard { - color: #423b87; - border: 1px solid #5144db; - background-color: #edecfb + color: #423b87; + border: 1px solid #5144db; + background-color: #edecfb; } -catnip-block.computed.wildcard>img, -catnip-block .catnip-block-aConstantInput.wildcard>img { - filter: hue-rotate(20deg); +catnip-block.computed.wildcard > img, +catnip-block .catnip-block-aConstantInput.wildcard > img { + filter: hue-rotate(20deg); } catnip-block.computed.wildcard::placeholder, catnip-block .catnip-block-aConstantInput.wildcard::placeholder { - color: #5144db; - opacity: .65 + color: #5144db; + opacity: 0.65; } catnip-block.computed.string, catnip-block .catnip-block-aConstantInput.string { - color: #873b87; - border: 1px solid #db44db; - background-color: #fbecfb + color: #873b87; + border: 1px solid #db44db; + background-color: #fbecfb; } - -catnip-block.computed.string>img, -catnip-block .catnip-block-aConstantInput.string>img { - filter: hue-rotate(60deg) +catnip-block.computed.string > img, +catnip-block .catnip-block-aConstantInput.string > img { + filter: hue-rotate(60deg); } catnip-block.computed.string::placeholder, catnip-block .catnip-block-aConstantInput.string::placeholder { - color: #db44db; - opacity: .65 + color: #db44db; + opacity: 0.65; } catnip-block.computed.number, catnip-block .catnip-block-aConstantInput.number { - color: #40842f; - border: 1px solid #4ed62c; - background-color: #edfae9 + color: #40842f; + border: 1px solid #4ed62c; + background-color: #edfae9; } -catnip-block.computed.number>img, -catnip-block .catnip-block-aConstantInput.number>img { - filter: hue-rotate(-90deg) +catnip-block.computed.number > img, +catnip-block .catnip-block-aConstantInput.number > img { + filter: hue-rotate(-90deg); } catnip-block.computed.number::placeholder, catnip-block .catnip-block-aConstantInput.number::placeholder { - color: #4ed62c; - opacity: .65 + color: #4ed62c; + opacity: 0.65; } catnip-block.computed.boolean, catnip-block .catnip-block-aConstantInput.boolean { - color: #87673b; - border: 1px solid #db9c44; - background-color: #fbf5ec + color: #87673b; + border: 1px solid #db9c44; + background-color: #fbf5ec; } - -catnip-block.computed.boolean>img, -catnip-block .catnip-block-aConstantInput.boolean>img { - filter: hue-rotate(-180deg) +catnip-block.computed.boolean > img, +catnip-block .catnip-block-aConstantInput.boolean > img { + filter: hue-rotate(-180deg); } catnip-block.computed.boolean::placeholder, catnip-block .catnip-block-aConstantInput.boolean::placeholder { - color: #db9c44; - opacity: .65 + color: #db9c44; + opacity: 0.65; } catnip-block.computed.color, catnip-block .catnip-block-aConstantInput.color { - color: #3b6e87; - border: 1px solid #44a9db; - background-color: #ecf6fb + color: #3b6e87; + border: 1px solid #44a9db; + background-color: #ecf6fb; } - -catnip-block.computed.color>img, -catnip-block .catnip-block-aConstantInput.color>img { - filter: hue-rotate(-60deg); +catnip-block.computed.color > img, +catnip-block .catnip-block-aConstantInput.color > img { + filter: hue-rotate(-60deg); } catnip-block.computed.color::placeholder, catnip-block .catnip-block-aConstantInput.color::placeholder { - color: #44a9db; - opacity: .65 + color: #44a9db; + opacity: 0.65; } catnip-block.computed.userdefined, catnip-block .catnip-block-aConstantInput.userdefined { - background: #5144db; - border: 1px solid #5144db; - color: #fff; - font-weight: bold; + background: #5144db; + border: 1px solid #5144db; + color: #fff; + font-weight: bold; } catnip-block.computed, catnip-block .catnip-block-aConstantInput { - &.userdefined, &.constant { - &>img { - filter: brightness(1000%) - } + &.userdefined, + &.constant { + > img { + filter: brightness(1000%); } + } } catnip-block.computed.constant { - font-weight: bold; - color: #fff + font-weight: bold; + color: #fff; } catnip-block.computed.constant.wildcard { - border: 1px solid #5144db; - background: #5144db + border: 1px solid #5144db; + background: #5144db; } catnip-block.computed.constant.string { - border: 1px solid #db44db; - background: #db44db + border: 1px solid #db44db; + background: #db44db; } catnip-block.computed.constant.number { - border: 1px solid #4ed62c; - background: #4ed62c + border: 1px solid #4ed62c; + background: #4ed62c; } catnip-block.computed.constant.boolean { - border: 1px solid #db9c44; - background: #db9c44 + border: 1px solid #db9c44; + background: #db9c44; } catnip-block.computed.constant.color { - border: 1px solid #44a9db; - background: #44a9db + border: 1px solid #44a9db; + background: #44a9db; } catnip-block catnip-block.computed, catnip-block .catnip-block-aConstantInput, catnip-block catnip-block.constant { - margin: 0 + margin: 0; } -catnip-block>img { - vertical-align: middle +catnip-block > img { + vertical-align: middle; } catnip-block catnip-block .catnip-block-aTextLabel { - font-size: 15px + font-size: 15px; } catnip-block catnip-block catnip-block .catnip-block-aTextLabel { - font-size: 14px + font-size: 14px; } catnip-block textarea, .catnip-block textarea { - width: 100%; - box-sizing: border-box + width: 100%; + box-sizing: border-box; } catnip-block .catnip-block-Blocks { - background: rgba(0, 26, 43, 0.082); - border-radius: .2rem; - border: 1px solid var(--code-border-color); - padding: 0 .75rem + background: rgba(0, 26, 43, 0.082); + border-radius: 0.2rem; + border: 1px solid var(--code-border-color); + padding: 0 0.75rem; } -catnip-block .catnip-block-Blocks+* { - margin-left: 0 +catnip-block .catnip-block-Blocks + * { + margin-left: 0; } catnip-block .catnip-block-aBlockPlaceholder { - opacity: .65; - margin: .5rem 0 + opacity: 0.65; + margin: 0.5rem 0; } catnip-block .catnip-block-aBlockPlaceholder * { - vertical-align: middle; + vertical-align: middle; } -catnip-block .catnip-block-aBlockPlaceholder>*+* { - margin-left: .35rem +catnip-block .catnip-block-aBlockPlaceholder > * + * { + margin-left: 0.35rem; } catnip-block.note { - background: #ffff8026; - border-color: #c4bd3483; - color: black; - box-shadow: 0 .1rem .1rem rgba(0, 0, 0, 0.05), 0 .2rem .3rem rgba(0, 0, 0, 0.1), 0 .3rem .5rem rgba(0, 0, 0, 0.05); - display: flex; - flex-flow: row nowrap + background: #ffff8026; + border-color: #c4bd3483; + color: black; + box-shadow: 0 0.1rem 0.1rem rgba(0, 0, 0, 0.05), + 0 0.2rem 0.3rem rgba(0, 0, 0, 0.1), 0 0.3rem 0.5rem rgba(0, 0, 0, 0.05); + display: flex; + flex-flow: row nowrap; } catnip-block.note .catnip-block-aTextLabel { - display: none + display: none; } catnip-block.note img { - flex: 0 0 auto; - filter: hue-rotate(180deg) saturate(200%); + flex: 0 0 auto; + filter: hue-rotate(180deg) saturate(200%); } catnip-block.note textarea { - font: inherit; - font-size: 80%; - line-height: 120%; - flex: 1 1 auto; - border: 0; - margin: 0; - font-style: italic; - background: transparent; - height: 1.5rem; - resize: none; + font: inherit; + font-size: 80%; + line-height: 120%; + flex: 1 1 auto; + border: 0; + margin: 0; + font-style: italic; + background: transparent; + height: 1.5rem; + resize: none; } .catnip-block-aConstantInput { - box-sizing: content-box; - vertical-align: middle + box-sizing: content-box; + vertical-align: middle; } .catnip-block-aConstantInput span { - vertical-align: middle; - margin-right: .25rem + vertical-align: middle; + margin-right: 0.25rem; } .catnip-block-aConstantInput img { - width: 1rem; - height: 1rem; - vertical-align: middle -} \ No newline at end of file + width: 1rem; + height: 1rem; + vertical-align: middle; +} diff --git a/docs/.vuepress/styles/config.scss b/docs/.vuepress/styles/config.scss index 149aba9..e9bbf6b 100644 --- a/docs/.vuepress/styles/config.scss +++ b/docs/.vuepress/styles/config.scss @@ -1 +1,2 @@ -$theme-colors: #44dbb5 #E95378 #FFCFD4 #c4a7e7 #88C0D0; \ No newline at end of file +$theme-color: #446adb; +$theme-colors: #44dbb5 #e95378 #ffcfd4 #c4a7e7 #88c0d0; diff --git a/docs/.vuepress/styles/index.scss b/docs/.vuepress/styles/index.scss index aec0dfc..24ec695 100644 --- a/docs/.vuepress/styles/index.scss +++ b/docs/.vuepress/styles/index.scss @@ -1,13 +1,15 @@ -@media (min-width: 1440px) { - .vp-feature-item { - flex-basis: calc(33.3% - 3rem); - } -} +@use 'catnip'; + .vp-hero-infos { - text-align: center; + text-align: center; } + #main-description { - margin: 1.8rem auto + margin: 1.8rem auto; } -@import './catnip.scss'; \ No newline at end of file +.vp-feature-item { + @media (min-width: 1440px) { + flex-basis: calc(33.3% - 3rem); + } +} diff --git a/docs/.vuepress/styles/palette.scss b/docs/.vuepress/styles/palette.scss index 321d549..9928981 100644 --- a/docs/.vuepress/styles/palette.scss +++ b/docs/.vuepress/styles/palette.scss @@ -1,2 +1 @@ -$theme-color: #446adb; -$font-family-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", STHeiti, "Microsoft YaHei", SimSun, sans-serif; \ No newline at end of file +$font-family-heading: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', STHeiti, 'Microsoft YaHei', SimSun, sans-serif"; diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts new file mode 100644 index 0000000..19b014a --- /dev/null +++ b/docs/.vuepress/theme.ts @@ -0,0 +1,98 @@ +import { + enNavbar, + enSidebar, + ptBRNavbar, + ptBRSidebar, + ruNavbar, + ruSidebar, +} from './configs/index.js'; +import localeIt, { itNavbar, itSidebar } from './configs/it.js'; +import { hopeTheme } from 'vuepress-theme-hope'; + +export default hopeTheme({ + hostname: 'https://docs.ctjs.rocks', + logo: '/assets/img/logo.png', + repo: 'https://github.com/ct-js/docs.ctjs.rocks', + docsRepo: 'https://github.com/ct-js/docs.ctjs.rocks', + docsBranch: 'master', + docsDir: '/docs', + titleIcon: false, + darkmode: 'switch', + iconAssets: 'fontawesome', + + locales: { + '/': { + navbar: enNavbar, + sidebar: enSidebar, + }, + + '/pt_BR/': { + navbar: ptBRNavbar, + + sidebar: ptBRSidebar, + + repoLabel: 'Contribua!', + + navbarLocales: { + langName: 'Idioma', + selectLangAriaLabel: 'Português - Brasil', + }, + + metaLocales: { + editLink: 'Ajude a melhorar esta página!', + }, + }, + + '/ru/': { + navbar: ruNavbar, + sidebar: ruSidebar, + }, + + '/it/': { + navbar: itNavbar, + + sidebar: itSidebar, + + repoLabel: 'Contribuisci!', + + navbarLocales: { + langName: 'Italiano', + }, + + metaLocales: { + // text for the edit-on-github link + editLink: 'Aiutare a migliorare questa pagina!', + }, + }, + }, + + headerDepth: 2, + + markdown: { + gfm: true, + codeTabs: true, + tabs: true, + imgLazyload: true, + sup: true, + sub: true, + tasklist: true, + align: true, + }, + + plugins: { + comment: { + provider: 'Giscus', + repo: 'ct-js/docs.ctjs.rocks', + repoId: 'MDEwOlJlcG9zaXRvcnkxNzE2MDQ5MDE=', + category: "Pages' discussions", + categoryId: 'DIC_kwDOCjp7pc4CTa2u', + reactionsEnabled: false, + }, + + search: { + maxSuggestions: 10, + }, + + readingTime: false, + }, +}); diff --git a/docs/.vuepress/themeConfig.js b/docs/.vuepress/themeConfig.js deleted file mode 100644 index 1a1c0f1..0000000 --- a/docs/.vuepress/themeConfig.js +++ /dev/null @@ -1,278 +0,0 @@ -import localeRu from './localeRu'; -import localePtBR from './localePtBR'; -import localeIt from './localeIt'; - -export default { - hostname: 'https://docs.ctjs.rocks', - logo: '/assets/img/logo.png', - repo: 'https://github.com/ct-js/docs.ctjs.rocks', - docsRepo: 'https://github.com/ct-js/docs.ctjs.rocks', - docsBranch: 'master', - docsDir: '/docs', - titleIcon: false, - darkmode: 'switch', - iconAssets: 'fontawesome', - plugins: { - mdEnhance: { - // Markdown options - gfm: true, - hint: true, - tabs: true, - codetabs: true, - sup: true, - sub: true, - tasklist: true, - align: true, - - imgLazyload: true, - checkLinks: true - }, - comment: { - provider: 'Giscus', - repo: 'ct-js/docs.ctjs.rocks', - repoId: 'MDEwOlJlcG9zaXRvcnkxNzE2MDQ5MDE=', - category: 'Pages\' discussions', - categoryId: 'DIC_kwDOCjp7pc4CTa2u', - reactionsEnabled: false - }, - search: { - maxSuggestions: 10 - }, - readingTime: false - }, - - locales: { - "/": { - // text for the language dropdown - selectLanguageText: "Languages", - // label for this locale in the language dropdown - selectLanguageName: "English", - }, - "/ru/": localeRu, - "/pt_BR/": localePtBR, - "/it/": localeIt - }, - - navbarIcon: true, - navbar: [ - { - text: "Home", - link: "/", - icon: 'home' - }, - { - text: "Get ct.js", - link: "https://ctjs.rocks", - icon: 'download' - }, - { - text: "Discord", - link: "https://discord.gg/yuvuDW5", - icon: 'user-group' - }, - { - text: "Forum", - link: "https://forum.ctjs.rocks/", - icon: 'comments' - }, - ], - - headerDepth: 2, - sidebarIcon: true, - sidebar: [ - { - link: '/', - text: 'Home', - icon: 'home' - }, { - text: 'Learn Catnip', - collapsible: true, - icon: 'book', - prefix: '/learn-catnip/', - children: [ - 'introduction', - 'conditions-and-loops', - 'working-with-copies' - ] - }, { - text: 'Learn JavaScript', - collapsible: true, - icon: 'book', - prefix: '/learn-js/', - children: [ - 'jsintro_pt1', - 'jsintro_pt2', - 'jsintro_pt3' - ], - }, { - collapsible: false, - text: 'Tutorials', - icon: 'arrows-turn-to-dots', - prefix: '/tutorials/', - children: [ - 'making-games-shooter', - 'making-games-platformer', - 'making-games-jettycat', - 'making-games-polishing-jettycat' - ], - }, { - text: 'The `core` library', - collapsible: false, - icon: 'certificate', - children: [ - 'ct-concepts', - 'backgrounds', - 'behaviors', - 'camera', - 'emitters', - { - link: '/inputs', - text: 'inputs and actions' - }, - 'res', - 'rooms', - 'settings', - 'sounds', - 'styles', - 'tilemaps', - 'timer', - 'templates', - { - link: '/u', - text: 'u (utilities)' - }, - { - link: '/catmoddocs.md', - text: 'Where are the docs for catmods?' - } - ] - }, { - text: 'Built-in ct.js classes', - collapsible: false, - icon: 'icons', - children: [ - { - link: '/background', - text: 'Background' - }, { - link: '/copy', - text: 'Copy' - }, { - link: '/room', - text: 'Room' - } - ] - }, { - text: 'Working with the editor', - collapsible: false, - icon: 'laptop-code', - children: [ - 'actions', - { - link: '/room-editor', - text: 'Using the room editor' - }, - { - link: '/bitmap-fonts', - text: 'Using bitmap fonts' - }, - { - link: '/content-subsystem', - text: 'Content editor' - }, - 'enumerations', - "building-your-game", - "deployment-itch-io" - ] - }, { - text: 'Tips & tricks', - collapsible: false, - icon: 'lightbulb', - prefix: "/tips-n-tricks/", - children: [ - 'game-and-ui-coordinates', - 'movement', - 'game-pause', - 'localstorage', - 'viewport-management', - 'textures-magic-properties', - 'dragging-copies', - 'gamedev-resources' - ] - }, { - text: 'Technical stuff', - collapsible: true, - icon: 'gears', - children: [ - '/event-order' - ] - }, { - text: 'Modding ct.js', - collapsible: true, - icon: 'plug', - prefix: "/modding-ctjs/", - children: [ - { - link: 'mod-structure', - text: 'Directory structure and module\'s manifest' - }, { - link: 'events-and-injections', - text: 'Extending ct.js code with injections' - }, { - link: 'settings-and-extensions', - text: 'Settings and additional fields' - }, { - link: 'input-methods', - text: 'Adding new input methods' - }, { - link: 'modded-events', - text: 'Adding new events' - }, { - link: 'typings-and-intellisense', - text: 'Autocompletion and IntelliSense' - }, { - link: 'adding-blocks-to-catnip', - text: 'Adding blocks to catnip' - }, { - link: 'fields-declaration', - text: 'Fields reference' - } - ] - }, { - text: 'Troubleshooting', - collapsible: true, - icon: 'hand', - prefix: "/troubleshooting/", - children: [ - { - link: 'migration-0to1', - text: 'Migration from 0.x to 1.x' - }, { - link: 'migration-1-2to1-3', - text: 'Migration from 1.2 to 1.3' - }, { - link: 'migration-1to2', - text: 'Migration from 1.x to 2.0' - }, { - link: 'migration-2to3', - text: 'Migration from 2.x to 3.0' - }, { - link: 'migration-3to4', - text: 'Migration from 3.x to 4.0' - }, { - link: 'migration-4to5', - text: 'Migration from 4.0 to 5.0' - }, { - link: 'teared-background', - text: 'Background splits into squares!' - }, { - link: 'leaking-pixels', - text: 'Textures have leaked pixels!' - }, { - link: 'sounds-not-playing', - text: 'Sounds don\'t play at game start!' - } - ] - } - ] -}; \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 3ecedef..879bdaa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,57 +4,59 @@ home: true heroText: Welcome to the official ct.js docs! tagline: Learn ct.js, complete tutorials, and contribute to ct.js documentation actions: - - text: Read the docs → + - text: Get started → link: /ct-concepts.html type: primary footer: Ct.js documentation. Except where otherwise noted, content is licensed under a Creative Commons Attribution 4.0 International License. highlights: - - # header: Let's start making great stuff! - features: - - title: Learn JavaScript - details: - Games made in ct.js can use JavaScript, or simply JS, to code their gameplay logic. Learn the needed part of it in our little Introduction to JavaScript. -
-
-

Learn Catnip

- Catnip is ct.js' visual programming language. Learn how to write scripts in Catnip fast🔥 and correctly🧑‍🔬 in our three-chapter guide. - - title: Complete tutorials - details: - 'The best way to learn is by making, and you can create real games with our step-by-step tutorials: -