diff --git a/.editorconfig b/.editorconfig
index 581a90859..ba9a45611 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -13,7 +13,7 @@ indent_size = 2
indent_style = space
indent_size = 4
-[*.yml]
+[*.{md,yml}]
indent_style = space
indent_size = 2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f4bae0cf..5cb7c4fe8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,30 @@
# Changelog
-## [v2.0.0-alpha.3](https://github.com/marcantondahmen/automad/commit/7403a58c8ede73b18b960191f408926901a2f7ad)
+## [v2.0.0-alpha.4](https://github.com/marcantondahmen/automad/commit/3278dc38395cad81068657e12a7893ebd9e02bd6)
-Thu, 29 Feb 2024 21:01:04 +0100
+Sat, 13 Apr 2024 00:08:53 +0200
+
+### New Features
+
+- **engine**: add syntax highlighting for code blocks and markdown variables ([e9d14ae1d](https://github.com/marcantondahmen/automad/commit/e9d14ae1dcb2fce4efdd22b262ecc923364fccaa))
+- **migration**: map legacy standard theme to new standard-v1 composer package ([94b3714fb](https://github.com/marcantondahmen/automad/commit/94b3714fb6a8b56a837cd653a20087ef8b669e48))
+- **ui**: add syntax highlighting theme selection field to page and shared settings ([cf85d6ae8](https://github.com/marcantondahmen/automad/commit/cf85d6ae854bf0f0d2ed400fc388589ff02dc524))
+- add line numbers and copy button for code blocks ([ca6c70014](https://github.com/marcantondahmen/automad/commit/ca6c70014ba037a9efcd8cff9dd55a696a2a6f3a))
+- add syntax highlighting for the automad template language ([94aefa355](https://github.com/marcantondahmen/automad/commit/94aefa355e6f150f0a4078c939a51aa8aa11c973))
+
+### Bugfixes
+
+- **blocks**: fix gallery counter and caption color ([9049b750e](https://github.com/marcantondahmen/automad/commit/9049b750e6d281aa687d60b95a79c611255f46a1))
+- **core**: set cookie path to base url ([118bd1642](https://github.com/marcantondahmen/automad/commit/118bd16423030b00dbf295b4ff8185d75af15cf5))
+- **dashboard**: fix image editor color select and modal styles ([aca720b55](https://github.com/marcantondahmen/automad/commit/aca720b5531cd15defa9f80106a8658251548c8a))
+- **dashboard**: fix missing publish button on small devices ([8678ab32e](https://github.com/marcantondahmen/automad/commit/8678ab32e66fc2e5e551e899da3c8317198e2f88))
+- **dashboard**: fix text selection colors ([1d7e3203e](https://github.com/marcantondahmen/automad/commit/1d7e3203e24a92981d3f0289cb08f539be254abf))
+- **dashboard**: open in-page edit mode in same tab ([56e89b839](https://github.com/marcantondahmen/automad/commit/56e89b839c9f01271ca3fc957d72a01ee010c521))
+- **engine**: fix missing strikethrough support in markdown fields ([f700a1be7](https://github.com/marcantondahmen/automad/commit/f700a1be79c8f048b8ebee137c8b11b5e14593fc))
+
+## [v2.0.0-alpha.3](https://github.com/marcantondahmen/automad/commit/7f5ae3584e30a3c4e9c8d3430bf52a7c24e55a5a)
+
+Thu, 29 Feb 2024 21:03:22 +0100
### New Features
@@ -313,29 +335,3 @@ Sat, 7 Aug 2021 23:06:36 +0200
- **ui**: fix breadcrumbs position in safari ([0ed10e20d](https://github.com/marcantondahmen/automad/commit/0ed10e20d8d32f963be4d76c84d79bcf967b77c0))
- **ui**: fix status badge for outdated packages ([8b53a821f](https://github.com/marcantondahmen/automad/commit/8b53a821fa0d9cdc57af25f0eb122dc0dd312050))
-
-## [v1.8.0](https://github.com/marcantondahmen/automad/commit/cbdd0e59738ad28a6a0e2c6d235d5fa886438b2c)
-
-Sat, 7 Aug 2021 19:45:51 +0200
-
-### New Features
-
-- **blocks**: add option to use an image block as link ([586875ca3](https://github.com/marcantondahmen/automad/commit/586875ca31f9ec5cb273a1d0dc4de24a1c006346))
-- **blocks**: add option to use custom css classes for button blocks ([dd615b97f](https://github.com/marcantondahmen/automad/commit/dd615b97f0dc20b6f440d44d47e7e73e43483bb0))
-- **blocks**: add option to use custom css classes for section blocks ([aea1beec2](https://github.com/marcantondahmen/automad/commit/aea1beec298eacc4317389b8eb913c93a326111c))
-- **console**: add clearcache command ([f72112406](https://github.com/marcantondahmen/automad/commit/f72112406c5a79adb4c7ab26f1a3d87ae1bd87fc))
-- **console**: add purge command ([9f0ca5a83](https://github.com/marcantondahmen/automad/commit/9f0ca5a8324ffd0833161998f9b2b2bb7777f45f))
-- **system**: add check for required PHP version before updating ([c547d52af](https://github.com/marcantondahmen/automad/commit/c547d52afe2b8c5a86d9eebd1cbea1a09986b583))
-- **ui**: add autocompletion for inline link tool ([fb70070ff](https://github.com/marcantondahmen/automad/commit/fb70070ff30ce818463f6421a2f9ae374a8778f9))
-- **ui**: add site wide search and replace ([91e9ad680](https://github.com/marcantondahmen/automad/commit/91e9ad6802e3f9410364a1bed3b9de7fa1ebf023))
-- **ui**: convert search bar in top navigation into a jump bar ([0ab079586](https://github.com/marcantondahmen/automad/commit/0ab07958624b42a8cbe5f22b939483355ea39b5b))
-- **ui**: implement automatic updates of links to moved pages ([0369e52fd](https://github.com/marcantondahmen/automad/commit/0369e52fdc4eb6bacbc87e08e49d73bffc00c97a))
-- **ui**: implement automatic updates of links to renamed files ([3a26c4065](https://github.com/marcantondahmen/automad/commit/3a26c4065095e616db87b2a2df45101e6d2a58fa))
-- **ui**: verify that a given username is valid when adding accounts ([283a41a2f](https://github.com/marcantondahmen/automad/commit/283a41a2f99b59914e81b48935800cd59fbc1b41))
-
-### Bugfixes
-
-- **theme**: fix inline link styles in blocks ([8b89e00f0](https://github.com/marcantondahmen/automad/commit/8b89e00f027372189a5a25ae5b0e7bb9409ac665))
-- **ui**: fix disabled save button after deleting unused variable field ([fe375915e](https://github.com/marcantondahmen/automad/commit/fe375915e5afaa9fb9ec4798df3c466fd0e283a5))
-- **ui**: fix position of block editor toolbar on large devices ([e19b4b983](https://github.com/marcantondahmen/automad/commit/e19b4b98356d22ed475a8f27489c1d65a26e83e2))
-- **ui**: fix switcher tab update on hashchanges ([2a6725d37](https://github.com/marcantondahmen/automad/commit/2a6725d374ffd0b575b8ce98f7a0eb14707d222e))
diff --git a/README.md b/README.md
index e66cbd045..2c5a7cd5e 100644
--- a/README.md
+++ b/README.md
@@ -2,20 +2,28 @@
A flat-file content management system and template engine.
-![Tag](https://img.shields.io/github/v/tag/marcantondahmen/automad?include_prereleases&sort=semver&color=222222)
-![PHP](https://img.shields.io/packagist/dependency-v/automad/automad/php?version=dev-master&color=222222)
-![Language](https://img.shields.io/github/languages/top/marcantondahmen/automad?color=222222)
-![Size](https://img.shields.io/github/languages/code-size/marcantondahmen/automad?color=222222)
-![License](https://img.shields.io/github/license/marcantondahmen/automad?color=222222)
+![Tag](https://img.shields.io/github/v/tag/marcantondahmen/automad?include_prereleases&sort=semver&color=151619&labelColor=1c1d20)
+![PHP](https://img.shields.io/packagist/dependency-v/automad/automad/php?version=dev-master&color=151619&labelColor=1c1d20)
+![Language](https://img.shields.io/github/languages/top/marcantondahmen/automad?color=151619&labelColor=1c1d20)
+![Size](https://img.shields.io/github/languages/code-size/marcantondahmen/automad?color=151619&labelColor=1c1d20)
+![License](https://img.shields.io/github/license/marcantondahmen/automad?color=151619&labelColor=1c1d20)
[![Twitter](https://img.shields.io/twitter/follow/automadcms?label=Follow)](https://twitter.com/automadcms)
-![](https://raw.githubusercontent.com/marcantondahmen/media-files/master/automad-v2/readme-light.png)
+[![Screenshot](https://raw.githubusercontent.com/marcantondahmen/media-files/master/automad-v2/readme-light.png)](https://try.automad.org)
## Links
-- [Documentation](https://automad.org)
-- [Changelog](https://github.com/marcantondahmen/automad/blob/-/CHANGELOG.md)
-- [Discussion](https://automad.org/discuss)
+- [Documentation](https://automad.org)
+- [Live Demo](https://try.automad.org)
+- [Changelog](https://github.com/marcantondahmen/automad/blob/-/CHANGELOG.md)
+- [Discussion](https://automad.org/discuss)
+
+## Live Demo
+
+In case you quickly want to try out Automad without setting up a server first, just check out the [live demo](https://try.automad.org) for free. There is no sign-up required and you can start exploring new features right in away in your personal demo instance.
+
+> [!IMPORTANT]
+> Please note that in order to keep hosting costs under control, all demos are running on **minimal hardware** and expire after one hour.
## Installation
@@ -61,6 +69,10 @@ In case you are not able to use Docker or Composer, you can also deploy Automad
2. Make sure the PHP process has the permissions to write to the document root and its subdirectories including all installed files.
3. Visit the `/dashboard` route of your site and create the first user.
+## Migrating Content
+
+In order to migrate an old Automad installation to the new version 2, please follow the [migration giude](https://automad.org/version-2#migration) in the documentation.
+
## Documentation
Take a look at the [documentation](https://automad.org) to get started with Automad.
@@ -77,10 +89,10 @@ Join the community, ask questions or start a discussion on the Automad [discussi
In case you are interested in contributing, the following types of contribution are welcome:
-- Improving [language packs](https://github.com/automadcms/automad-language-packs) by fixing translation errors or adding new languages
-- [Publishing packages](https://automad.org/developer-guide/publishing-packages) like themes or extensions to the Automad package [browser](https://packages.automad.org)
-- Giving feedback and helping to grow a [community](https://automad.org/discuss)
-- Reporting bugs or requesting features at [GitHub](https://github.com/marcantondahmen/automad/issues)
+- Improving [language packs](https://github.com/automadcms/automad-language-packs) by fixing translation errors or adding new languages
+- [Publishing packages](https://automad.org/developer-guide/publishing-packages) like themes or extensions to the Automad package [browser](https://packages.automad.org)
+- Giving feedback and helping to grow a [community](https://automad.org/discuss)
+- Reporting bugs or requesting features at [GitHub](https://github.com/marcantondahmen/automad/issues)
However, I do not exclude at this point using parts of Automad's source in future projects under different licenses. In order to avoid having to ask anybody for permission when doing so, I will not accept any contributions to **this** repository. Please understand that pull requests will therefore be ignored.
@@ -88,10 +100,10 @@ However, I do not exclude at this point using parts of Automad's source in futur
To make the development of themes more efficient, plugins providing syntax highlighting and snippets for Automad's template language are available for the following editors:
-- [Neovim (Tree-Sitter)](https://github.com/automadcms/tree-sitter-automad)
-- [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MarcAntonDahmen.automad)
-- [Atom](https://atom.io/packages/language-automad)
-- [Textmate 2](https://github.com/marcantondahmen/automad.tmbundle)
+- [Neovim (Tree-Sitter)](https://github.com/automadcms/tree-sitter-automad)
+- [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=MarcAntonDahmen.automad)
+- [Atom](https://atom.io/packages/language-automad)
+- [Textmate 2](https://github.com/marcantondahmen/automad.tmbundle)
---
diff --git a/automad/lang/english.json b/automad/lang/english.json
index 4ecda5306..8b2c6d21d 100644
--- a/automad/lang/english.json
+++ b/automad/lang/english.json
@@ -50,6 +50,7 @@
"clickToDelete": "Click to delete",
"close": "Close",
"code": "Source Code",
+ "codeBlockLineNumbers": "Show line numbers",
"color": "Color",
"confirmCancelUpload": "Do you want to cancel the upload?",
"confirmDeletePage": "Do you want to delete the current page?",
@@ -474,6 +475,7 @@
"value": "Value",
"vertical": "Vertical",
"visit": "Visit",
+ "visitSyntaxGallery": "Visit the syntax theme gallery",
"warmthTool": "Warmth",
"watermarkTab": "Watermark",
"write": "Write",
diff --git a/automad/src/client/admin/components/Alert.ts b/automad/src/client/admin/components/Alert.ts
index 4fd47f82d..c43f33f64 100644
--- a/automad/src/client/admin/components/Alert.ts
+++ b/automad/src/client/admin/components/Alert.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { App, Attr, CSS, html } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple alert box component.
diff --git a/automad/src/client/admin/components/Autocomplete.ts b/automad/src/client/admin/components/Autocomplete.ts
index 2dd263c94..4f1c1cefe 100644
--- a/automad/src/client/admin/components/Autocomplete.ts
+++ b/automad/src/client/admin/components/Autocomplete.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
-import { AutocompleteItem, AutocompleteItemData, KeyValueMap } from '@/types';
+import { BaseComponent } from '@/admin/components/Base';
+import { AutocompleteItem, AutocompleteItemData, KeyValueMap } from '@/admin/types';
import {
App,
create,
@@ -44,7 +44,7 @@ import {
CSS,
fire,
Attr,
-} from '@/core';
+} from '@/admin/core';
/**
* An input field with page autocompletion.
diff --git a/automad/src/client/admin/components/AutocompleteUrl.ts b/automad/src/client/admin/components/AutocompleteUrl.ts
index 5e9a1be96..4e237080d 100644
--- a/automad/src/client/admin/components/AutocompleteUrl.ts
+++ b/automad/src/client/admin/components/AutocompleteUrl.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { AutocompleteItemData, KeyValueMap, PageMetaData } from '@/types';
-import { App, create, html, Attr } from '@/core';
+import { AutocompleteItemData, KeyValueMap, PageMetaData } from '@/admin/types';
+import { App, create, html, Attr } from '@/admin/core';
import { AutocompleteComponent } from './Autocomplete';
/**
diff --git a/automad/src/client/admin/components/Base.ts b/automad/src/client/admin/components/Base.ts
index 86c1defde..decc0e374 100644
--- a/automad/src/client/admin/components/Base.ts
+++ b/automad/src/client/admin/components/Base.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { KeyValueMap, Listener } from '@/types';
+import { KeyValueMap, Listener } from '@/admin/types';
/**
* The Automad base component. All Automad components are based on this class.
diff --git a/automad/src/client/admin/components/Breadcrumbs/BaseBreadcrumbs.ts b/automad/src/client/admin/components/Breadcrumbs/BaseBreadcrumbs.ts
index 61d8fc5d2..b5d5ce0fa 100644
--- a/automad/src/client/admin/components/Breadcrumbs/BaseBreadcrumbs.ts
+++ b/automad/src/client/admin/components/Breadcrumbs/BaseBreadcrumbs.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { CSS, listen } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { CSS, listen } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A breadcrumbs base component.
diff --git a/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsPage.ts b/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsPage.ts
index e27759d04..a927c4a70 100644
--- a/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsPage.ts
+++ b/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsPage.ts
@@ -43,8 +43,8 @@ import {
Attr,
PageController,
listen,
-} from '@/core';
-import { KeyValueMap } from '@/types';
+} from '@/admin/core';
+import { KeyValueMap } from '@/admin/types';
import { BaseBreadcrumbsComponent } from './BaseBreadcrumbs';
/**
diff --git a/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsRoute.ts b/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsRoute.ts
index f3c4d3493..bf087f0df 100644
--- a/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsRoute.ts
+++ b/automad/src/client/admin/components/Breadcrumbs/BreadcrumbsRoute.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html, listen, Route } from '@/core';
+import { App, Attr, CSS, html, listen, Route } from '@/admin/core';
import { BaseBreadcrumbsComponent } from './BaseBreadcrumbs';
/**
diff --git a/automad/src/client/admin/components/Checkbox.ts b/automad/src/client/admin/components/Checkbox.ts
index b8dd8822a..57b5b4edf 100644
--- a/automad/src/client/admin/components/Checkbox.ts
+++ b/automad/src/client/admin/components/Checkbox.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { create, CSS, html, listen, query } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { create, CSS, html, listen, query } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple checkbox component.
diff --git a/automad/src/client/admin/components/Copy.ts b/automad/src/client/admin/components/Copy.ts
index 60aa32530..cff483668 100644
--- a/automad/src/client/admin/components/Copy.ts
+++ b/automad/src/client/admin/components/Copy.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { listen, notifySuccess } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { listen, notifySuccess } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A copy to clipboard button component.
diff --git a/automad/src/client/admin/components/CustomIconCheckbox.ts b/automad/src/client/admin/components/CustomIconCheckbox.ts
index 3646fdd5b..45a2a2c16 100644
--- a/automad/src/client/admin/components/CustomIconCheckbox.ts
+++ b/automad/src/client/admin/components/CustomIconCheckbox.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { Attr, create, CSS, html, query } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { Attr, create, CSS, html, query } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A custom icon checkbox field.
diff --git a/automad/src/client/admin/components/DashboardThemeToggle.ts b/automad/src/client/admin/components/DashboardThemeToggle.ts
index cb1e8d292..ccc2df3ab 100644
--- a/automad/src/client/admin/components/DashboardThemeToggle.ts
+++ b/automad/src/client/admin/components/DashboardThemeToggle.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { Attr, create, CSS, EventName, html, listen, titleCase } from '@/core';
-import { DashboardTheme, getTheme, setTheme } from '@/core/theme';
-import { BaseComponent } from '@/components/Base';
+import { Attr, create, CSS, EventName, html, listen, titleCase } from '@/admin/core';
+import { DashboardTheme, getTheme, setTheme } from '@/admin/core/theme';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A theme toggle component for the dashboard.
diff --git a/automad/src/client/admin/components/Dropdown.ts b/automad/src/client/admin/components/Dropdown.ts
index c63a1ec88..0ff57efbc 100644
--- a/automad/src/client/admin/components/Dropdown.ts
+++ b/automad/src/client/admin/components/Dropdown.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { Attr, CSS, listen, queryParents } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { Attr, CSS, listen, queryParents } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple dropdown menu component.
diff --git a/automad/src/client/admin/components/EditorJS.ts b/automad/src/client/admin/components/EditorJS.ts
index 3efdfcd84..b1997af08 100644
--- a/automad/src/client/admin/components/EditorJS.ts
+++ b/automad/src/client/admin/components/EditorJS.ts
@@ -32,51 +32,51 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
-import { SectionBlock } from '@/editor/blocks/Section';
-import { BoldInline } from '@/editor/inline/Bold';
-import { CodeInline } from '@/editor/inline/Code';
-import { ColorInline } from '@/editor/inline/Color';
-import { FontSizeInline } from '@/editor/inline/FontSize';
-import { ItalicInline } from '@/editor/inline/Italic';
-import { LineHeightInline } from '@/editor/inline/LineHeight';
-import { LinkInline } from '@/editor/inline/Link';
-import { StrikeThroughInline } from '@/editor/inline/StrikeThrough';
-import { UnderlineInline } from '@/editor/inline/Underline';
-import { DragDrop } from '@/editor/plugins/DragDrop';
-import { LayoutTune } from '@/editor/tunes/Layout';
-import { EditorOutputData, KeyValueMap } from '@/types';
+import { BaseComponent } from '@/admin/components/Base';
+import { SectionBlock } from '@/admin/editor/blocks/Section';
+import { BoldInline } from '@/admin/editor/inline/Bold';
+import { CodeInline } from '@/admin/editor/inline/Code';
+import { ColorInline } from '@/admin/editor/inline/Color';
+import { FontSizeInline } from '@/admin/editor/inline/FontSize';
+import { ItalicInline } from '@/admin/editor/inline/Italic';
+import { LineHeightInline } from '@/admin/editor/inline/LineHeight';
+import { LinkInline } from '@/admin/editor/inline/Link';
+import { StrikeThroughInline } from '@/admin/editor/inline/StrikeThrough';
+import { UnderlineInline } from '@/admin/editor/inline/Underline';
+import { DragDrop } from '@/admin/editor/plugins/DragDrop';
+import { LayoutTune } from '@/admin/editor/tunes/Layout';
+import { EditorOutputData, KeyValueMap } from '@/admin/types';
import EditorJS, { EditorConfig, I18nDictionary } from 'automad-editorjs';
-import { App, CSS } from '@/core';
-import { Delimiter } from '@/editor/blocks/Delimiter';
-import { ImageBlock } from '@/editor/blocks/Image';
-import { NestedListBlock } from '@/editor/blocks/NestedList';
-import { QuoteBlock } from '@/editor/blocks/Quote';
-import { TableBlock } from '@/editor/blocks/Table';
+import { App, CSS } from '@/admin/core';
+import { Delimiter } from '@/admin/editor/blocks/Delimiter';
+import { ImageBlock } from '@/admin/editor/blocks/Image';
+import { NestedListBlock } from '@/admin/editor/blocks/NestedList';
+import { QuoteBlock } from '@/admin/editor/blocks/Quote';
+import { TableBlock } from '@/admin/editor/blocks/Table';
import {
TextAlignCenterInline,
TextAlignLeftInline,
TextAlignRightInline,
-} from '@/editor/inline/TextAlign';
-import { ClassTune } from '@/editor/tunes/Class';
-import { IdTune } from '@/editor/tunes/Id';
-import { SpacingTune } from '@/editor/tunes/Spacing';
-import { CodeBlock } from '@/editor/blocks/Code';
-import { RawBlock } from '@/editor/blocks/Raw';
-import { GalleryBlock } from '@/editor/blocks/Gallery';
-import { ImageSlideshowBlock } from '@/editor/blocks/ImageSlideshow';
-import { ButtonsBlock } from '@/editor/blocks/Buttons';
+} from '@/admin/editor/inline/TextAlign';
+import { ClassTune } from '@/admin/editor/tunes/Class';
+import { IdTune } from '@/admin/editor/tunes/Id';
+import { SpacingTune } from '@/admin/editor/tunes/Spacing';
+import { CodeBlock } from '@/admin/editor/blocks/Code';
+import { RawBlock } from '@/admin/editor/blocks/Raw';
+import { GalleryBlock } from '@/admin/editor/blocks/Gallery';
+import { ImageSlideshowBlock } from '@/admin/editor/blocks/ImageSlideshow';
+import { ButtonsBlock } from '@/admin/editor/blocks/Buttons';
// @ts-ignore
import Embed from '@editorjs/embed';
-import { embedServices } from '@/editor/embedServices';
-import { HeaderBlock } from '@/editor/blocks/Header';
-import { ParagraphBlock } from '@/editor/blocks/Paragraph';
-import { DuplicateTune } from '@/editor/tunes/Duplicate';
-import { MailBlock } from '@/editor/blocks/Mail';
-import { TableOfContentsBlock } from '@/editor/blocks/TableOfContents';
-import { PagelistBlock } from '@/editor/blocks/Pagelist';
-import { FilelistBlock } from '@/editor/blocks/Filelist';
-import { SnippetBlock } from '@/editor/blocks/Snippet';
+import { embedServices } from '@/admin/editor/embedServices';
+import { HeaderBlock } from '@/admin/editor/blocks/Header';
+import { ParagraphBlock } from '@/admin/editor/blocks/Paragraph';
+import { DuplicateTune } from '@/admin/editor/tunes/Duplicate';
+import { MailBlock } from '@/admin/editor/blocks/Mail';
+import { TableOfContentsBlock } from '@/admin/editor/blocks/TableOfContents';
+import { PagelistBlock } from '@/admin/editor/blocks/Pagelist';
+import { FilelistBlock } from '@/admin/editor/blocks/Filelist';
+import { SnippetBlock } from '@/admin/editor/blocks/Snippet';
/**
* A wrapper component for EditorJS that is basically a DOM element that represents an EditorJS instance.
diff --git a/automad/src/client/admin/components/Fields/BaseField.ts b/automad/src/client/admin/components/Fields/BaseField.ts
index a378a5f9e..5c5e5d22a 100644
--- a/automad/src/client/admin/components/Fields/BaseField.ts
+++ b/automad/src/client/admin/components/Fields/BaseField.ts
@@ -43,7 +43,7 @@ import {
query,
queryAll,
Undo,
-} from '@/core';
+} from '@/admin/core';
import {
FieldInitData,
FieldRenderData,
@@ -51,8 +51,8 @@ import {
KeyValueMap,
UndoCapableField,
UndoValue,
-} from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A standard input field with a label.
diff --git a/automad/src/client/admin/components/Fields/Color.ts b/automad/src/client/admin/components/Fields/Color.ts
index c9e047ed4..35092e846 100644
--- a/automad/src/client/admin/components/Fields/Color.ts
+++ b/automad/src/client/admin/components/Fields/Color.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, FieldTag, fire, listen } from '@/core';
+import { create, CSS, FieldTag, fire, listen } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/Date.ts b/automad/src/client/admin/components/Fields/Date.ts
index 11230c49d..148d9d8f7 100644
--- a/automad/src/client/admin/components/Fields/Date.ts
+++ b/automad/src/client/admin/components/Fields/Date.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, FieldTag } from '@/core';
+import { create, CSS, FieldTag } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/Editor.ts b/automad/src/client/admin/components/Fields/Editor.ts
index acb2408cf..731ccb150 100644
--- a/automad/src/client/admin/components/Fields/Editor.ts
+++ b/automad/src/client/admin/components/Fields/Editor.ts
@@ -43,11 +43,11 @@ import {
listen,
listenToClassChange,
query,
-} from '@/core';
+} from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
-import { EditorOutputData, UndoValue } from '@/types';
-import { LayoutTune } from '@/editor/tunes/Layout';
-import { EditorJSComponent } from '@/components/EditorJS';
+import { EditorOutputData, UndoValue } from '@/admin/types';
+import { LayoutTune } from '@/admin/editor/tunes/Layout';
+import { EditorJSComponent } from '@/admin/components/EditorJS';
import { API } from 'automad-editorjs';
/**
diff --git a/automad/src/client/admin/components/Fields/Email.ts b/automad/src/client/admin/components/Fields/Email.ts
index 16141d259..0af69df1c 100644
--- a/automad/src/client/admin/components/Fields/Email.ts
+++ b/automad/src/client/admin/components/Fields/Email.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { FieldTag } from '@/core';
+import { FieldTag } from '@/admin/core';
import { InputComponent } from './Input';
/**
diff --git a/automad/src/client/admin/components/Fields/FeedFieldSelect.ts b/automad/src/client/admin/components/Fields/FeedFieldSelect.ts
index 8080e877d..124f6e894 100644
--- a/automad/src/client/admin/components/Fields/FeedFieldSelect.ts
+++ b/automad/src/client/admin/components/Fields/FeedFieldSelect.ts
@@ -44,7 +44,7 @@ import {
html,
listen,
query,
-} from '@/core';
+} from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
const options: SortableOptions = {
diff --git a/automad/src/client/admin/components/Fields/ImageSelect.ts b/automad/src/client/admin/components/Fields/ImageSelect.ts
index 2f2ce6b74..cf88188fe 100644
--- a/automad/src/client/admin/components/Fields/ImageSelect.ts
+++ b/automad/src/client/admin/components/Fields/ImageSelect.ts
@@ -44,7 +44,7 @@ import {
html,
listen,
resizeImageUrl,
-} from '@/core';
+} from '@/admin/core';
import { ImgComponent } from '../Img';
import { BaseFieldComponent } from './BaseField';
diff --git a/automad/src/client/admin/components/Fields/Input.ts b/automad/src/client/admin/components/Fields/Input.ts
index fd1b8e871..f73f1f311 100644
--- a/automad/src/client/admin/components/Fields/Input.ts
+++ b/automad/src/client/admin/components/Fields/Input.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, FieldTag } from '@/core';
+import { create, CSS, FieldTag } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/MainTheme.ts b/automad/src/client/admin/components/Fields/MainTheme.ts
index bc7d9f0b4..e410b8402 100644
--- a/automad/src/client/admin/components/Fields/MainTheme.ts
+++ b/automad/src/client/admin/components/Fields/MainTheme.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { App, Attr, create, createSelect, CSS, FieldTag, Route } from '@/core';
+import { App, Attr, create, createSelect, CSS, FieldTag, Route } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
-import { SelectComponentOption, Theme } from '@/types';
+import { SelectComponentOption, Theme } from '@/admin/types';
/**
* A theme select field.
diff --git a/automad/src/client/admin/components/Fields/Markdown.ts b/automad/src/client/admin/components/Fields/Markdown.ts
index d485ea0d2..290df5760 100644
--- a/automad/src/client/admin/components/Fields/Markdown.ts
+++ b/automad/src/client/admin/components/Fields/Markdown.ts
@@ -47,15 +47,15 @@ import {
queryAll,
resolveFileUrl,
resolvePageUrl,
-} from '@/core';
+} from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
import Editor, { LinkMdNode } from '@toast-ui/editor';
import { ToolbarCustomOptions } from '@toast-ui/editor/types/ui';
import { Context, OpenTagToken } from '@toast-ui/editor/types/toastmark';
import { CustomHTMLRenderer } from '@toast-ui/editor/dist/toastui-editor-viewer';
-import Prism from 'prismjs';
+import { Prism } from '@/prism/prism';
// @ts-ignore
-import codeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight/dist/toastui-editor-plugin-code-syntax-highlight-all.js';
+import codeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight';
/**
* Create a custom toolbar button.
diff --git a/automad/src/client/admin/components/Fields/Number.ts b/automad/src/client/admin/components/Fields/Number.ts
index 8ab8f004f..fa75e9d36 100644
--- a/automad/src/client/admin/components/Fields/Number.ts
+++ b/automad/src/client/admin/components/Fields/Number.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, FieldTag } from '@/core';
+import { create, CSS, FieldTag } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/NumberUnit.ts b/automad/src/client/admin/components/Fields/NumberUnit.ts
index 94e948d35..3ac6fc104 100644
--- a/automad/src/client/admin/components/Fields/NumberUnit.ts
+++ b/automad/src/client/admin/components/Fields/NumberUnit.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, FieldTag } from '@/core';
+import { create, FieldTag } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/PageTags.ts b/automad/src/client/admin/components/Fields/PageTags.ts
index 604c56123..42bfa0efd 100644
--- a/automad/src/client/admin/components/Fields/PageTags.ts
+++ b/automad/src/client/admin/components/Fields/PageTags.ts
@@ -33,8 +33,8 @@
*/
import Tagify from '@yaireo/tagify';
-import { App, create, CSS, debounce, FieldTag } from '@/core';
-import { PageDataFormComponent } from '@/components/Forms/PageDataForm';
+import { App, create, CSS, debounce, FieldTag } from '@/admin/core';
+import { PageDataFormComponent } from '@/admin/components/Forms/PageDataForm';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/PageTemplate.ts b/automad/src/client/admin/components/Fields/PageTemplate.ts
index 5bbab88dc..c4d17c85d 100644
--- a/automad/src/client/admin/components/Fields/PageTemplate.ts
+++ b/automad/src/client/admin/components/Fields/PageTemplate.ts
@@ -42,10 +42,10 @@ import {
listen,
query,
titleCase,
-} from '@/core';
-import { KeyValueMap, TemplateButtonStatus, TemplateFieldData } from '@/types';
-import { BaseComponent } from '@/components/Base';
-import { SelectComponent } from '@/components/Select';
+} from '@/admin/core';
+import { KeyValueMap, TemplateButtonStatus, TemplateFieldData } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
+import { SelectComponent } from '@/admin/components/Select';
/**
* Beautify a template path to be used as name.
diff --git a/automad/src/client/admin/components/Fields/Password.ts b/automad/src/client/admin/components/Fields/Password.ts
index bd429ce43..a0fb2892a 100644
--- a/automad/src/client/admin/components/Fields/Password.ts
+++ b/automad/src/client/admin/components/Fields/Password.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { FieldTag } from '@/core';
+import { FieldTag } from '@/admin/core';
import { InputComponent } from './Input';
/**
diff --git a/automad/src/client/admin/components/Fields/SyntaxThemeSelect.ts b/automad/src/client/admin/components/Fields/SyntaxThemeSelect.ts
new file mode 100644
index 000000000..fb7682fd3
--- /dev/null
+++ b/automad/src/client/admin/components/Fields/SyntaxThemeSelect.ts
@@ -0,0 +1,96 @@
+/*
+ * ....
+ * .: '':.
+ * :::: ':..
+ * ::. ''..
+ * .:'.. ..':.:::' . :. '':.
+ * :. '' '' '. ::::.. ..:
+ * ::::. ..':.. .'''::::: .
+ * :::::::.. '..:::: :. :::: :
+ * ::'':::::::. ':::.'':.:::: :
+ * :.. ''::::::....': '':: :
+ * :::::. '::::: : .. '' .
+ * .''::::::::... ':::.'' ..'' :.''''.
+ * :..:::''::::: :::::...:'' :..:
+ * ::::::. ':::: :::::::: ..:: .
+ * ::::::::.:::: :::::::: :'':.:: .''
+ * ::: '::::::::.' ''::::: :.' '': :
+ * ::: :::::::::..' :::: ::...' .
+ * ::: .:::::::::: :::: :::: .:'
+ * '::' ''::::::: :::: : :: :
+ * ':::: :::: :'' .:
+ * :::: :::: ..''
+ * :::: ..:::: .:''
+ * '''' '''''
+ *
+ *
+ * AUTOMAD
+ *
+ * Copyright (c) 2024 by Marc Anton Dahmen
+ * https://marcdahmen.de
+ *
+ * Licensed under the MIT license.
+ */
+
+import {
+ FieldTag,
+ createSelect,
+ getPageURL,
+ App,
+ CSS,
+ create,
+ html,
+ Attr,
+} from '@/admin/core';
+import { BaseFieldComponent } from './BaseField';
+import themes from 'automad-prism-themes/dist/themes.json';
+
+const defaultTheme = 'verdandi.light-dark';
+
+/**
+ * A syntax theme select field.
+ *
+ * @extends BaseFieldComponent
+ */
+class SyntaxThemeSelectComponent extends BaseFieldComponent {
+ /**
+ * Render the input field.
+ */
+ createInput(): void {
+ const { name, id, value } = this._data;
+ const isPage = !!getPageURL();
+ const _default = isPage ? '' : defaultTheme;
+ const _value = (value as string) || _default;
+
+ let options = [{ text: '—', value: 'none' }, ...themes];
+
+ if (isPage) {
+ options = [
+ { text: App.text('useSharedDefault'), value: '' },
+ ...options,
+ ];
+ }
+
+ this.classList.add(CSS.flex, CSS.flexColumn, CSS.flexGap);
+ createSelect(options, _value, this, name, id);
+ create(
+ 'div',
+ [],
+ {},
+ this,
+ html`
+
+
+
+ `
+ );
+ }
+}
+
+customElements.define(FieldTag.syntaxSelect, SyntaxThemeSelectComponent);
diff --git a/automad/src/client/admin/components/Fields/Textarea.ts b/automad/src/client/admin/components/Fields/Textarea.ts
index 3349b4d58..7834a2dd4 100644
--- a/automad/src/client/admin/components/Fields/Textarea.ts
+++ b/automad/src/client/admin/components/Fields/Textarea.ts
@@ -39,7 +39,7 @@ import {
FieldTag,
initTabHandler,
listen,
-} from '@/core';
+} from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/Title.ts b/automad/src/client/admin/components/Fields/Title.ts
index 4455a805f..7c076cc2d 100644
--- a/automad/src/client/admin/components/Fields/Title.ts
+++ b/automad/src/client/admin/components/Fields/Title.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, FieldTag } from '@/core';
+import { create, CSS, FieldTag } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/Toggle.ts b/automad/src/client/admin/components/Fields/Toggle.ts
index d937b0f5c..12325bf76 100644
--- a/automad/src/client/admin/components/Fields/Toggle.ts
+++ b/automad/src/client/admin/components/Fields/Toggle.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, FieldTag, html } from '@/core';
+import { create, CSS, FieldTag, html } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/ToggleLarge.ts b/automad/src/client/admin/components/Fields/ToggleLarge.ts
index 02d3523e6..66532eab1 100644
--- a/automad/src/client/admin/components/Fields/ToggleLarge.ts
+++ b/automad/src/client/admin/components/Fields/ToggleLarge.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { CSS, FieldTag } from '@/core';
+import { CSS, FieldTag } from '@/admin/core';
import { ToggleComponent } from './Toggle';
/**
diff --git a/automad/src/client/admin/components/Fields/ToggleSelect.ts b/automad/src/client/admin/components/Fields/ToggleSelect.ts
index 01322841f..51dc4bd2e 100644
--- a/automad/src/client/admin/components/Fields/ToggleSelect.ts
+++ b/automad/src/client/admin/components/Fields/ToggleSelect.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, create, CSS, FieldTag, html, listen, query } from '@/core';
+import { App, create, CSS, FieldTag, html, listen, query } from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/Fields/Url.ts b/automad/src/client/admin/components/Fields/Url.ts
index 77266c465..572f22963 100644
--- a/automad/src/client/admin/components/Fields/Url.ts
+++ b/automad/src/client/admin/components/Fields/Url.ts
@@ -39,7 +39,7 @@ import {
Binding,
createLinkModal,
FieldTag,
-} from '@/core';
+} from '@/admin/core';
import { BaseFieldComponent } from './BaseField';
/**
diff --git a/automad/src/client/admin/components/File/FileCard.ts b/automad/src/client/admin/components/File/FileCard.ts
index d5582eb9c..507bece75 100644
--- a/automad/src/client/admin/components/File/FileCard.ts
+++ b/automad/src/client/admin/components/File/FileCard.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html, queryAll } from '@/core';
-import { File } from '@/types';
-import { BaseComponent } from '@/components/Base';
+import { App, Attr, CSS, html, queryAll } from '@/admin/core';
+import { File } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
import { FileInfoComponent } from './FileInfo';
/**
diff --git a/automad/src/client/admin/components/File/FileCount.ts b/automad/src/client/admin/components/File/FileCount.ts
index 64b3bb081..3445beede 100644
--- a/automad/src/client/admin/components/File/FileCount.ts
+++ b/automad/src/client/admin/components/File/FileCount.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
-import { create, EventName, listen, queryAll } from '@/core';
+import { BaseComponent } from '@/admin/components/Base';
+import { create, EventName, listen, queryAll } from '@/admin/core';
/**
* A file count badge component that displays the total number of file card elements.
diff --git a/automad/src/client/admin/components/File/FileInfo.ts b/automad/src/client/admin/components/File/FileInfo.ts
index ca896161e..bf710be87 100644
--- a/automad/src/client/admin/components/File/FileInfo.ts
+++ b/automad/src/client/admin/components/File/FileInfo.ts
@@ -43,10 +43,10 @@ import {
FileController,
html,
listen,
-} from '@/core';
-import { File } from '@/types';
-import { BaseComponent } from '@/components/Base';
-import { ModalComponent } from '@/components/Modal/Modal';
+} from '@/admin/core';
+import { File } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
/**
* A file edit modal toggle component.
diff --git a/automad/src/client/admin/components/File/FileRobot.ts b/automad/src/client/admin/components/File/FileRobot.ts
index af61a4b30..c9f2eebaf 100644
--- a/automad/src/client/admin/components/File/FileRobot.ts
+++ b/automad/src/client/admin/components/File/FileRobot.ts
@@ -34,7 +34,7 @@
import FilerobotImageEditor from 'filerobot-image-editor';
import { FilerobotImageEditorConfig } from 'react-filerobot-image-editor';
-import { KeyValueMap } from '@/types';
+import { KeyValueMap } from '@/admin/types';
import {
App,
Attr,
@@ -45,10 +45,10 @@ import {
fire,
ImageController,
listen,
-} from '@/core';
-import { ModalComponent } from '@/components/Modal/Modal';
-import { BaseComponent } from '@/components/Base';
-import { FormComponent } from '@/components/Forms/Form';
+} from '@/admin/core';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
+import { BaseComponent } from '@/admin/components/Base';
+import { FormComponent } from '@/admin/components/Forms/Form';
import { fileRobotTheme } from './FileRobotTheme';
/**
diff --git a/automad/src/client/admin/components/File/Upload.ts b/automad/src/client/admin/components/File/Upload.ts
index 9baea50bd..93d09dd63 100644
--- a/automad/src/client/admin/components/File/Upload.ts
+++ b/automad/src/client/admin/components/File/Upload.ts
@@ -47,10 +47,10 @@ import {
notifySuccess,
query,
RequestKey,
-} from '@/core';
-import { BaseComponent } from '@/components/Base';
-import { FileCollectionListFormComponent } from '@/components/Forms/FileCollection/ListForm';
-import { ModalComponent } from '@/components/Modal/Modal';
+} from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
+import { FileCollectionListFormComponent } from '@/admin/components/Forms/FileCollection/ListForm';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
/**
* An upload component.
diff --git a/automad/src/client/admin/components/Filter.ts b/automad/src/client/admin/components/Filter.ts
index ff127c9e6..b4dc3107e 100644
--- a/automad/src/client/admin/components/Filter.ts
+++ b/automad/src/client/admin/components/Filter.ts
@@ -42,9 +42,9 @@ import {
keyCombo,
listen,
queryAll,
-} from '@/core';
-import { InputElement } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { InputElement } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A field and card filter input component.
diff --git a/automad/src/client/admin/components/Forms/ConfigFileForm.ts b/automad/src/client/admin/components/Forms/ConfigFileForm.ts
index 8f504ae64..a91c55f1a 100644
--- a/automad/src/client/admin/components/Forms/ConfigFileForm.ts
+++ b/automad/src/client/admin/components/Forms/ConfigFileForm.ts
@@ -42,8 +42,8 @@ import {
listen,
query,
Undo,
-} from '@/core';
-import { KeyValueMap, UndoValue } from '@/types';
+} from '@/admin/core';
+import { KeyValueMap, UndoValue } from '@/admin/types';
import { FormComponent } from './Form';
/**
diff --git a/automad/src/client/admin/components/Forms/DeleteUsersForm.ts b/automad/src/client/admin/components/Forms/DeleteUsersForm.ts
index 9d2e2e4e1..208c6cd0f 100644
--- a/automad/src/client/admin/components/Forms/DeleteUsersForm.ts
+++ b/automad/src/client/admin/components/Forms/DeleteUsersForm.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, CSS, EventName, html, listen } from '@/core';
+import { App, CSS, EventName, html, listen } from '@/admin/core';
import { FormComponent } from './Form';
/**
diff --git a/automad/src/client/admin/components/Forms/FileCollection/ListForm.ts b/automad/src/client/admin/components/Forms/FileCollection/ListForm.ts
index 6013ddc66..6261bfa46 100644
--- a/automad/src/client/admin/components/Forms/FileCollection/ListForm.ts
+++ b/automad/src/client/admin/components/Forms/FileCollection/ListForm.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { create, CSS, EventName, fire, listen, queryAll } from '@/core';
-import { File, KeyValueMap } from '@/types';
-import { FormComponent } from '@/components/Forms/Form';
+import { create, CSS, EventName, fire, listen, queryAll } from '@/admin/core';
+import { File, KeyValueMap } from '@/admin/types';
+import { FormComponent } from '@/admin/components/Forms/Form';
/**
* The file collection form component.
diff --git a/automad/src/client/admin/components/Forms/FileCollection/Submit.ts b/automad/src/client/admin/components/Forms/FileCollection/Submit.ts
index ad81801e8..1fa70282c 100644
--- a/automad/src/client/admin/components/Forms/FileCollection/Submit.ts
+++ b/automad/src/client/admin/components/Forms/FileCollection/Submit.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { listen, queryAll } from '@/core';
-import { FormComponent } from '@/components/Forms/Form';
-import { SubmitComponent } from '@/components/Forms/Submit';
+import { listen, queryAll } from '@/admin/core';
+import { FormComponent } from '@/admin/components/Forms/Form';
+import { SubmitComponent } from '@/admin/components/Forms/Submit';
/**
* A submit button for the FileCollectionListComponent form.
diff --git a/automad/src/client/admin/components/Forms/Form.ts b/automad/src/client/admin/components/Forms/Form.ts
index 3fe74dc0e..016d67bab 100644
--- a/automad/src/client/admin/components/Forms/Form.ts
+++ b/automad/src/client/admin/components/Forms/Form.ts
@@ -49,10 +49,10 @@ import {
query,
queryAll,
requestAPI,
-} from '@/core';
-import { InputElement, KeyValueMap } from '@/types';
-import { BaseComponent } from '@/components/Base';
-import { ModalComponent } from '@/components/Modal/Modal';
+} from '@/admin/core';
+import { InputElement, KeyValueMap } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
import { SubmitComponent } from './Submit';
import { FormErrorComponent } from './FormError';
diff --git a/automad/src/client/admin/components/Forms/FormError.ts b/automad/src/client/admin/components/Forms/FormError.ts
index 17eab5544..15fa6b7bf 100644
--- a/automad/src/client/admin/components/Forms/FormError.ts
+++ b/automad/src/client/admin/components/Forms/FormError.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { CSS, html } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { CSS, html } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple error message component that is used to display errors inside of forms.
diff --git a/automad/src/client/admin/components/Forms/HistoryModalForm.ts b/automad/src/client/admin/components/Forms/HistoryModalForm.ts
index a5c56771c..fa02d2292 100644
--- a/automad/src/client/admin/components/Forms/HistoryModalForm.ts
+++ b/automad/src/client/admin/components/Forms/HistoryModalForm.ts
@@ -46,10 +46,10 @@ import {
Attr,
HistoryController,
dateFormat,
-} from '@/core';
-import { SelectComponentOption } from '@/types';
-import { BaseComponent } from '@/components/Base';
-import { ModalComponent } from '@/components/Modal/Modal';
+} from '@/admin/core';
+import { SelectComponentOption } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
export class HistoryModalFormComponent extends BaseComponent {
/**
diff --git a/automad/src/client/admin/components/Forms/InPageForm.ts b/automad/src/client/admin/components/Forms/InPageForm.ts
index 859887ed2..86ed5c8df 100644
--- a/automad/src/client/admin/components/Forms/InPageForm.ts
+++ b/automad/src/client/admin/components/Forms/InPageForm.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { InPageBindings, KeyValueMap } from '@/types';
+import { InPageBindings, KeyValueMap } from '@/admin/types';
import { FormComponent } from './Form';
import {
App,
@@ -47,9 +47,9 @@ import {
listen,
query,
setDocumentTitle,
-} from '@/core';
-import { ModalComponent } from '@/components/Modal/Modal';
-import { EditorJSComponent } from '@/components/EditorJS';
+} from '@/admin/core';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
+import { EditorJSComponent } from '@/admin/components/EditorJS';
/**
* The InPage editing form element.
diff --git a/automad/src/client/admin/components/Forms/MailConfigForm.ts b/automad/src/client/admin/components/Forms/MailConfigForm.ts
index 4edf48219..20368cadc 100644
--- a/automad/src/client/admin/components/Forms/MailConfigForm.ts
+++ b/automad/src/client/admin/components/Forms/MailConfigForm.ts
@@ -46,8 +46,8 @@ import {
MailConfigController,
requestAPI,
Undo,
-} from '@/core';
-import { MailConfig } from '@/types';
+} from '@/admin/core';
+import { MailConfig } from '@/admin/types';
import { FormComponent } from './Form';
export const transportOptions = ['sendmail', 'smtp'] as const;
diff --git a/automad/src/client/admin/components/Forms/PageDataForm.ts b/automad/src/client/admin/components/Forms/PageDataForm.ts
index e422bd058..d4c65836b 100644
--- a/automad/src/client/admin/components/Forms/PageDataForm.ts
+++ b/automad/src/client/admin/components/Forms/PageDataForm.ts
@@ -38,7 +38,7 @@ import {
KeyValueMap,
PageBindings,
PageMainSettingsData,
-} from '@/types';
+} from '@/admin/types';
import { FormComponent } from './Form';
import {
App,
@@ -47,6 +47,7 @@ import {
create,
createField,
createFieldSections,
+ createLabelFromField,
CSS,
EventName,
fieldGroup,
@@ -58,9 +59,9 @@ import {
listen,
prepareFieldGroups,
setDocumentTitle,
-} from '@/core';
-import { PageTemplateComponent } from '@/components/Fields/PageTemplate';
-import { BaseFieldComponent } from '@/components/Fields/BaseField';
+} from '@/admin/core';
+import { PageTemplateComponent } from '@/admin/components/Fields/PageTemplate';
+import { BaseFieldComponent } from '@/admin/components/Fields/BaseField';
/**
* Init all URL and slug related bindings.
@@ -215,7 +216,6 @@ export class PageDataFormComponent extends FormComponent {
[],
{
href: `${App.baseURL}${url}`,
- target: '_blank',
},
titleContainer
).innerHTML = html`
@@ -261,6 +261,12 @@ export class PageDataFormComponent extends FormComponent {
readmeLink
);
+ createMainField(
+ FieldTag.syntaxSelect,
+ App.reservedFields.SYNTAX_THEME,
+ createLabelFromField(App.reservedFields.SYNTAX_THEME)
+ );
+
createMainField(
FieldTag.toggle,
App.reservedFields.HIDDEN,
@@ -368,6 +374,10 @@ export class PageDataFormComponent extends FormComponent {
private render(response: KeyValueMap): void {
const { url, fields, shared, template, readme } = response.data;
+ if (!fields) {
+ return;
+ }
+
create(
'input',
[],
diff --git a/automad/src/client/admin/components/Forms/PublishForm.ts b/automad/src/client/admin/components/Forms/PublishForm.ts
index e02899a39..7d364ce24 100644
--- a/automad/src/client/admin/components/Forms/PublishForm.ts
+++ b/automad/src/client/admin/components/Forms/PublishForm.ts
@@ -49,7 +49,7 @@ import {
requestAPI,
Route,
SharedController,
-} from '@/core';
+} from '@/admin/core';
import Tooltip from 'codex-tooltip';
import { BaseComponent } from '../Base';
import { SubmitComponent } from './Submit';
diff --git a/automad/src/client/admin/components/Forms/ResetPasswordForm.ts b/automad/src/client/admin/components/Forms/ResetPasswordForm.ts
index 05932f058..4a4f5fb05 100644
--- a/automad/src/client/admin/components/Forms/ResetPasswordForm.ts
+++ b/automad/src/client/admin/components/Forms/ResetPasswordForm.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, getSearchParam, html, Route } from '@/core';
-import { KeyValueMap } from '@/types';
+import { App, Attr, CSS, getSearchParam, html, Route } from '@/admin/core';
+import { KeyValueMap } from '@/admin/types';
import { FormComponent } from './Form';
/**
diff --git a/automad/src/client/admin/components/Forms/SearchForm.ts b/automad/src/client/admin/components/Forms/SearchForm.ts
index abaa36fb2..5beb55e64 100644
--- a/automad/src/client/admin/components/Forms/SearchForm.ts
+++ b/automad/src/client/admin/components/Forms/SearchForm.ts
@@ -48,9 +48,9 @@ import {
requestAPI,
Route,
SearchController,
-} from '@/core';
-import { FieldResults, FileResults, KeyValueMap } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { FieldResults, FileResults, KeyValueMap } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* Render the inner content for a given field in the results card.
diff --git a/automad/src/client/admin/components/Forms/SetupForm.ts b/automad/src/client/admin/components/Forms/SetupForm.ts
index 8954a0ec5..312bf4e19 100644
--- a/automad/src/client/admin/components/Forms/SetupForm.ts
+++ b/automad/src/client/admin/components/Forms/SetupForm.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS, html, KeyValueMap, Route } from '@/core';
+import { create, CSS, html, KeyValueMap, Route } from '@/admin/core';
import { FormComponent } from './Form';
/**
diff --git a/automad/src/client/admin/components/Forms/SharedDataForm.ts b/automad/src/client/admin/components/Forms/SharedDataForm.ts
index ad623ccfe..70fffbdd9 100644
--- a/automad/src/client/admin/components/Forms/SharedDataForm.ts
+++ b/automad/src/client/admin/components/Forms/SharedDataForm.ts
@@ -45,13 +45,13 @@ import {
fire,
listen,
prepareFieldGroups,
-} from '@/core';
+} from '@/admin/core';
import {
FieldSectionCollection,
FieldSectionName,
KeyValueMap,
SharedBindings,
-} from '@/types';
+} from '@/admin/types';
import { FormComponent } from './Form';
/**
@@ -211,6 +211,12 @@ export class SharedDataFormComponent extends FormComponent {
name: `data[${themeKey}]`,
});
+ createField(FieldTag.syntaxSelect, this.sections.settings, {
+ key: App.reservedFields.SYNTAX_THEME,
+ value: fields[App.reservedFields.SYNTAX_THEME],
+ name: `data[${App.reservedFields.SYNTAX_THEME}]`,
+ });
+
Object.keys(this.sections).forEach((item: FieldSectionName) => {
fieldGroup({
section: this.sections[item],
diff --git a/automad/src/client/admin/components/Forms/Submit.ts b/automad/src/client/admin/components/Forms/Submit.ts
index 3bf5da708..aa4615ced 100644
--- a/automad/src/client/admin/components/Forms/Submit.ts
+++ b/automad/src/client/admin/components/Forms/Submit.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { Attr, listen, queryAll, queryParents } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { Attr, listen, queryAll, queryParents } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
import { FormComponent } from './Form';
/**
diff --git a/automad/src/client/admin/components/Forms/SystemUpdateForm.ts b/automad/src/client/admin/components/Forms/SystemUpdateForm.ts
index 77114b4bc..36cd4ac3c 100644
--- a/automad/src/client/admin/components/Forms/SystemUpdateForm.ts
+++ b/automad/src/client/admin/components/Forms/SystemUpdateForm.ts
@@ -41,9 +41,9 @@ import {
html,
listen,
query,
-} from '@/core';
-import { KeyValueMap, SystemUpdateResponse } from '@/types';
-import { ModalComponent } from '@/components/Modal/Modal';
+} from '@/admin/core';
+import { KeyValueMap, SystemUpdateResponse } from '@/admin/types';
+import { ModalComponent } from '@/admin/components/Modal/Modal';
import { FormComponent } from './Form';
/**
diff --git a/automad/src/client/admin/components/Forms/TrashForm.ts b/automad/src/client/admin/components/Forms/TrashForm.ts
index 0aa4e69e4..5085b2752 100644
--- a/automad/src/client/admin/components/Forms/TrashForm.ts
+++ b/automad/src/client/admin/components/Forms/TrashForm.ts
@@ -40,9 +40,9 @@ import {
html,
PageTrashController,
requestAPI,
-} from '@/core';
-import { DeletedPageMetaData } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { DeletedPageMetaData } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* Create a card for a deleted page.
diff --git a/automad/src/client/admin/components/Home/RecentlyEditedPages.ts b/automad/src/client/admin/components/Home/RecentlyEditedPages.ts
index ac68250b6..db4739b5b 100644
--- a/automad/src/client/admin/components/Home/RecentlyEditedPages.ts
+++ b/automad/src/client/admin/components/Home/RecentlyEditedPages.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
+import { BaseComponent } from '@/admin/components/Base';
import {
App,
Attr,
@@ -45,9 +45,9 @@ import {
resolveFileUrl,
resolvePageUrl,
Route,
-} from '@/core';
-import { PageRecentlyEditedCardData } from '@/types';
-import { Section } from 'common';
+} from '@/admin/core';
+import { PageRecentlyEditedCardData } from '@/admin/types';
+import { Section } from '@/common';
/**
* A grid of recently edited pages.
diff --git a/automad/src/client/admin/components/Home/ServerInfo.ts b/automad/src/client/admin/components/Home/ServerInfo.ts
index bbc0ac350..853b4e5e6 100644
--- a/automad/src/client/admin/components/Home/ServerInfo.ts
+++ b/automad/src/client/admin/components/Home/ServerInfo.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
-import { AppController, html, requestAPI } from '@/core';
+import { BaseComponent } from '@/admin/components/Base';
+import { AppController, html, requestAPI } from '@/admin/core';
/**
* A server info component.
diff --git a/automad/src/client/admin/components/IconText.ts b/automad/src/client/admin/components/IconText.ts
index 319db022f..5996a1309 100644
--- a/automad/src/client/admin/components/IconText.ts
+++ b/automad/src/client/admin/components/IconText.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { Attr, create, CSS } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { Attr, create, CSS } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple icon with text component.
diff --git a/automad/src/client/admin/components/ImageCollection.ts b/automad/src/client/admin/components/ImageCollection.ts
index 3557253d1..a09c66de8 100644
--- a/automad/src/client/admin/components/ImageCollection.ts
+++ b/automad/src/client/admin/components/ImageCollection.ts
@@ -41,7 +41,7 @@ import {
html,
listen,
resizeImageUrl,
-} from '@/core';
+} from '@/admin/core';
import Sortable from 'sortablejs';
import { BaseComponent } from './Base';
diff --git a/automad/src/client/admin/components/ImagePicker.ts b/automad/src/client/admin/components/ImagePicker.ts
index c0c57767b..aef148199 100644
--- a/automad/src/client/admin/components/ImagePicker.ts
+++ b/automad/src/client/admin/components/ImagePicker.ts
@@ -43,9 +43,9 @@ import {
ImageCollectionController,
listen,
requestAPI,
-} from '@/core';
-import { Image } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { Image } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
import { ModalComponent } from './Modal/Modal';
/**
diff --git a/automad/src/client/admin/components/Img.ts b/automad/src/client/admin/components/Img.ts
index 465379b00..001ba1780 100644
--- a/automad/src/client/admin/components/Img.ts
+++ b/automad/src/client/admin/components/Img.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { create, CSS, html, listen } from '@/core';
-import { Listener } from '@/types';
+import { create, CSS, html, listen } from '@/admin/core';
+import { Listener } from '@/admin/types';
import { BaseComponent } from './Base';
/**
diff --git a/automad/src/client/admin/components/Indicators/BaseActivationIndicator.ts b/automad/src/client/admin/components/Indicators/BaseActivationIndicator.ts
index 2656f38dc..4a4e2cf0c 100644
--- a/automad/src/client/admin/components/Indicators/BaseActivationIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/BaseActivationIndicator.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { Attr, CSS, html } from '@/core';
+import { Attr, CSS, html } from '@/admin/core';
import { BaseStateIndicatorComponent } from './BaseStateIndicator';
/**
diff --git a/automad/src/client/admin/components/Indicators/BaseOutdatedPackagesIndicator.ts b/automad/src/client/admin/components/Indicators/BaseOutdatedPackagesIndicator.ts
index 518e541f4..f938d4485 100644
--- a/automad/src/client/admin/components/Indicators/BaseOutdatedPackagesIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/BaseOutdatedPackagesIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { EventName, listen } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { EventName, listen } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A base update indicator component.
diff --git a/automad/src/client/admin/components/Indicators/BaseStateIndicator.ts b/automad/src/client/admin/components/Indicators/BaseStateIndicator.ts
index 92d53773f..cb76646c2 100644
--- a/automad/src/client/admin/components/Indicators/BaseStateIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/BaseStateIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
-import { EventName, listen } from '@/core';
+import { BaseComponent } from '@/admin/components/Base';
+import { EventName, listen } from '@/admin/core';
/**
* The abstract base state component.
diff --git a/automad/src/client/admin/components/Indicators/BaseUpdateIndicator.ts b/automad/src/client/admin/components/Indicators/BaseUpdateIndicator.ts
index 17ba20da8..83d09be0f 100644
--- a/automad/src/client/admin/components/Indicators/BaseUpdateIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/BaseUpdateIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { EventName, listen } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { EventName, listen } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A base update indicator component.
diff --git a/automad/src/client/admin/components/Indicators/Menu/PrivateIndicator.ts b/automad/src/client/admin/components/Indicators/Menu/PrivateIndicator.ts
index 336f50169..ffa974f01 100644
--- a/automad/src/client/admin/components/Indicators/Menu/PrivateIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/Menu/PrivateIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App, create, CSS, EventName, getPageURL, listen } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { App, create, CSS, EventName, getPageURL, listen } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A private indicator badge for pages.
diff --git a/automad/src/client/admin/components/Indicators/Navbar/DebugIndicator.ts b/automad/src/client/admin/components/Indicators/Navbar/DebugIndicator.ts
index d40f2ff60..d5c219f88 100644
--- a/automad/src/client/admin/components/Indicators/Navbar/DebugIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/Navbar/DebugIndicator.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html, Route } from '@/core';
-import { Section } from 'common';
-import { BaseStateIndicatorComponent } from '@/components/Indicators/BaseStateIndicator';
+import { App, Attr, CSS, html, Route } from '@/admin/core';
+import { Section } from '@/common';
+import { BaseStateIndicatorComponent } from '@/admin/components/Indicators/BaseStateIndicator';
/**
* A debug state component.
diff --git a/automad/src/client/admin/components/Indicators/Navbar/OutdatedPackagesIndicator.ts b/automad/src/client/admin/components/Indicators/Navbar/OutdatedPackagesIndicator.ts
index 8bdf73694..c9d4520fc 100644
--- a/automad/src/client/admin/components/Indicators/Navbar/OutdatedPackagesIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/Navbar/OutdatedPackagesIndicator.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html, Route } from '@/core';
+import { App, Attr, CSS, html, Route } from '@/admin/core';
import { BaseOutdatedPackagesIndicator } from '../BaseOutdatedPackagesIndicator';
/**
@@ -57,7 +57,6 @@ class NavbarOutdatedPackagesIndicatorComponent extends BaseOutdatedPackagesIndic
${Attr.tooltip}="${App.text('packagesUpdatesAvailable')}"
>
-
`;
} else {
diff --git a/automad/src/client/admin/components/Indicators/Navbar/SystemUpdateIndicator.ts b/automad/src/client/admin/components/Indicators/Navbar/SystemUpdateIndicator.ts
index 9100ff5ca..4073d159d 100644
--- a/automad/src/client/admin/components/Indicators/Navbar/SystemUpdateIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/Navbar/SystemUpdateIndicator.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html, Route } from '@/core';
-import { Section } from 'common';
-import { BaseUpdateIndicatorComponent } from '@/components/Indicators/BaseUpdateIndicator';
+import { App, Attr, CSS, html, Route } from '@/admin/core';
+import { Section } from '@/common';
+import { BaseUpdateIndicatorComponent } from '@/admin/components/Indicators/BaseUpdateIndicator';
/**
* A system update state button component.
diff --git a/automad/src/client/admin/components/Indicators/Sidebar/OutdatedPackagesIndicator.ts b/automad/src/client/admin/components/Indicators/Sidebar/OutdatedPackagesIndicator.ts
index 74e49b3bd..1f2210324 100644
--- a/automad/src/client/admin/components/Indicators/Sidebar/OutdatedPackagesIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/Sidebar/OutdatedPackagesIndicator.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, CSS, html } from '@/core';
+import { App, CSS, html } from '@/admin/core';
import { BaseOutdatedPackagesIndicator } from '../BaseOutdatedPackagesIndicator';
/**
diff --git a/automad/src/client/admin/components/Indicators/System/CacheIndicator.ts b/automad/src/client/admin/components/Indicators/System/CacheIndicator.ts
index c87525935..81ed36f56 100644
--- a/automad/src/client/admin/components/Indicators/System/CacheIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/CacheIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App } from '@/core';
-import { BaseActivationIndicatorComponent } from '@/components/Indicators/BaseActivationIndicator';
+import { App } from '@/admin/core';
+import { BaseActivationIndicatorComponent } from '@/admin/components/Indicators/BaseActivationIndicator';
/**
* A cache state indicator component.
diff --git a/automad/src/client/admin/components/Indicators/System/DebugIndicator.ts b/automad/src/client/admin/components/Indicators/System/DebugIndicator.ts
index 2bc04f358..044ed87ae 100644
--- a/automad/src/client/admin/components/Indicators/System/DebugIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/DebugIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App } from '@/core';
-import { BaseActivationIndicatorComponent } from '@/components/Indicators/BaseActivationIndicator';
+import { App } from '@/admin/core';
+import { BaseActivationIndicatorComponent } from '@/admin/components/Indicators/BaseActivationIndicator';
/**
* A debug state indicator component.
diff --git a/automad/src/client/admin/components/Indicators/System/FeedIndicator.ts b/automad/src/client/admin/components/Indicators/System/FeedIndicator.ts
index 19fde7576..91a43af05 100644
--- a/automad/src/client/admin/components/Indicators/System/FeedIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/FeedIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App } from '@/core';
-import { BaseActivationIndicatorComponent } from '@/components/Indicators/BaseActivationIndicator';
+import { App } from '@/admin/core';
+import { BaseActivationIndicatorComponent } from '@/admin/components/Indicators/BaseActivationIndicator';
/**
* A feed state indicator component.
diff --git a/automad/src/client/admin/components/Indicators/System/I18nIndicator.ts b/automad/src/client/admin/components/Indicators/System/I18nIndicator.ts
index 66862b566..c31be6e3d 100644
--- a/automad/src/client/admin/components/Indicators/System/I18nIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/I18nIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App } from '@/core';
-import { BaseActivationIndicatorComponent } from '@/components/Indicators/BaseActivationIndicator';
+import { App } from '@/admin/core';
+import { BaseActivationIndicatorComponent } from '@/admin/components/Indicators/BaseActivationIndicator';
/**
* A debug state indicator component.
diff --git a/automad/src/client/admin/components/Indicators/System/MailIndicator.ts b/automad/src/client/admin/components/Indicators/System/MailIndicator.ts
index 72bdb0ed0..f7ba1dc05 100644
--- a/automad/src/client/admin/components/Indicators/System/MailIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/MailIndicator.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS } from '@/core';
+import { App, Attr, CSS } from '@/admin/core';
import { BaseStateIndicatorComponent } from '../BaseStateIndicator';
/**
diff --git a/automad/src/client/admin/components/Indicators/System/SystemUpdateIndicator.ts b/automad/src/client/admin/components/Indicators/System/SystemUpdateIndicator.ts
index d8db5832b..001ec1442 100644
--- a/automad/src/client/admin/components/Indicators/System/SystemUpdateIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/SystemUpdateIndicator.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { App, Attr, CSS, html } from '@/core';
-import { BaseUpdateIndicatorComponent } from '@/components/Indicators/BaseUpdateIndicator';
+import { App, Attr, CSS, html } from '@/admin/core';
+import { BaseUpdateIndicatorComponent } from '@/admin/components/Indicators/BaseUpdateIndicator';
/**
* A system update state component.
diff --git a/automad/src/client/admin/components/Indicators/System/UserCountIndicator.ts b/automad/src/client/admin/components/Indicators/System/UserCountIndicator.ts
index 221f2b034..931c4c907 100644
--- a/automad/src/client/admin/components/Indicators/System/UserCountIndicator.ts
+++ b/automad/src/client/admin/components/Indicators/System/UserCountIndicator.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App } from '@/core';
+import { App } from '@/admin/core';
import { BaseStateIndicatorComponent } from '../BaseStateIndicator';
/**
diff --git a/automad/src/client/admin/components/KeyComboBadge.ts b/automad/src/client/admin/components/KeyComboBadge.ts
index e22f268c4..3630d9a67 100644
--- a/automad/src/client/admin/components/KeyComboBadge.ts
+++ b/automad/src/client/admin/components/KeyComboBadge.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { Attr, CSS, getMetaKeyLabel } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { Attr, CSS, getMetaKeyLabel } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A key combo badge that automatically displays the correct meta key.
diff --git a/automad/src/client/admin/components/Link.ts b/automad/src/client/admin/components/Link.ts
index f18159742..c53963250 100644
--- a/automad/src/client/admin/components/Link.ts
+++ b/automad/src/client/admin/components/Link.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { listen, App, Attr } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { listen, App, Attr } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple link component to change the dashboard view.
diff --git a/automad/src/client/admin/components/Logo.ts b/automad/src/client/admin/components/Logo.ts
index 1d310cd43..fb6cc7f0c 100644
--- a/automad/src/client/admin/components/Logo.ts
+++ b/automad/src/client/admin/components/Logo.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { BaseComponent } from '@/components/Base';
-import logo from 'common/svg/logo.svg';
+import { BaseComponent } from '@/admin/components/Base';
+import logo from '@/common/svg/logo.svg';
/**
* The Automad logo component.
diff --git a/automad/src/client/admin/components/Modal/Modal.ts b/automad/src/client/admin/components/Modal/Modal.ts
index b3a58d8c0..ae717a8d3 100644
--- a/automad/src/client/admin/components/Modal/Modal.ts
+++ b/automad/src/client/admin/components/Modal/Modal.ts
@@ -44,9 +44,9 @@ import {
query,
setFormData,
queryAll,
-} from '@/core';
-import { InputElement, KeyValueMap, Listener } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { InputElement, KeyValueMap, Listener } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A modal component.
diff --git a/automad/src/client/admin/components/Modal/ModalBody.ts b/automad/src/client/admin/components/Modal/ModalBody.ts
index 3d1ea9895..9ad568690 100644
--- a/automad/src/client/admin/components/Modal/ModalBody.ts
+++ b/automad/src/client/admin/components/Modal/ModalBody.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { CSS } from '@/core';
+import { CSS } from '@/admin/core';
import { BaseComponent } from '../Base';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalClose.ts b/automad/src/client/admin/components/Modal/ModalClose.ts
index 9d36eff90..ad1259b2e 100644
--- a/automad/src/client/admin/components/Modal/ModalClose.ts
+++ b/automad/src/client/admin/components/Modal/ModalClose.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { listen } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { listen } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
import { ModalComponent } from './Modal';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalDialog.ts b/automad/src/client/admin/components/Modal/ModalDialog.ts
index c15f6350c..c54068142 100644
--- a/automad/src/client/admin/components/Modal/ModalDialog.ts
+++ b/automad/src/client/admin/components/Modal/ModalDialog.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { CSS } from '@/core';
+import { CSS } from '@/admin/core';
import { BaseComponent } from '../Base';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalField.ts b/automad/src/client/admin/components/Modal/ModalField.ts
index cc2a4da05..b6d5ba388 100644
--- a/automad/src/client/admin/components/Modal/ModalField.ts
+++ b/automad/src/client/admin/components/Modal/ModalField.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, Attr, create, CSS, html, listen, queryAll } from '@/core';
+import { App, Attr, create, CSS, html, listen, queryAll } from '@/admin/core';
import { ModalComponent } from './Modal';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalFooter.ts b/automad/src/client/admin/components/Modal/ModalFooter.ts
index 15efface3..53026da8e 100644
--- a/automad/src/client/admin/components/Modal/ModalFooter.ts
+++ b/automad/src/client/admin/components/Modal/ModalFooter.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { CSS } from '@/core';
+import { CSS } from '@/admin/core';
import { BaseComponent } from '../Base';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalHeader.ts b/automad/src/client/admin/components/Modal/ModalHeader.ts
index 6b5aabd86..a1fe62e7f 100644
--- a/automad/src/client/admin/components/Modal/ModalHeader.ts
+++ b/automad/src/client/admin/components/Modal/ModalHeader.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { create, CSS } from '@/core';
+import { create, CSS } from '@/admin/core';
import { BaseComponent } from '../Base';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalJumpbar.ts b/automad/src/client/admin/components/Modal/ModalJumpbar.ts
index a8d04bb40..52e049cf6 100644
--- a/automad/src/client/admin/components/Modal/ModalJumpbar.ts
+++ b/automad/src/client/admin/components/Modal/ModalJumpbar.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { App, create, keyCombo, listen } from '@/core';
+import { App, create, keyCombo, listen } from '@/admin/core';
import { ModalComponent } from './Modal';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalJumpbarDialog.ts b/automad/src/client/admin/components/Modal/ModalJumpbarDialog.ts
index 1a3494852..0d594d310 100644
--- a/automad/src/client/admin/components/Modal/ModalJumpbarDialog.ts
+++ b/automad/src/client/admin/components/Modal/ModalJumpbarDialog.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { JumpbarItemData, KeyValueMap, PageMetaData } from '@/types';
-import { App, Attr, create, CSS, html, Route } from '@/core';
-import { Section } from 'common';
+import { JumpbarItemData, KeyValueMap, PageMetaData } from '@/admin/types';
+import { App, Attr, create, CSS, html, Route } from '@/admin/core';
+import { Section } from '@/common';
import { AutocompleteComponent } from '../Autocomplete';
/**
diff --git a/automad/src/client/admin/components/Modal/ModalToggle.ts b/automad/src/client/admin/components/Modal/ModalToggle.ts
index 8464eabee..7dc834c97 100644
--- a/automad/src/client/admin/components/Modal/ModalToggle.ts
+++ b/automad/src/client/admin/components/Modal/ModalToggle.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { Attr, listen, query } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { Attr, listen, query } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
import { ModalComponent } from './Modal';
/**
diff --git a/automad/src/client/admin/components/NavItem.ts b/automad/src/client/admin/components/NavItem.ts
index 5d6084f90..202dad392 100644
--- a/automad/src/client/admin/components/NavItem.ts
+++ b/automad/src/client/admin/components/NavItem.ts
@@ -32,8 +32,8 @@
* Licensed under the MIT license.
*/
-import { isActivePage, App, html, CSS, Attr } from '@/core';
-import { BaseComponent } from '@/components/Base';
+import { isActivePage, App, html, CSS, Attr } from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A simple link in the sidebar navigation.
diff --git a/automad/src/client/admin/components/NavTree.ts b/automad/src/client/admin/components/NavTree.ts
index 72d09fad8..43f25f936 100644
--- a/automad/src/client/admin/components/NavTree.ts
+++ b/automad/src/client/admin/components/NavTree.ts
@@ -57,10 +57,10 @@ import {
queryAll,
requestAPI,
Route,
-} from '@/core';
-import { createSortableTreeNodes, treeStyles } from '@/core/tree';
-import { KeyValueMap, PageMetaData } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { createSortableTreeNodes, treeStyles } from '@/admin/core/tree';
+import { KeyValueMap, PageMetaData } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* Handle responses when moving pages.
diff --git a/automad/src/client/admin/components/NumberUnitInput.ts b/automad/src/client/admin/components/NumberUnitInput.ts
index e06b26faf..d594649b2 100644
--- a/automad/src/client/admin/components/NumberUnitInput.ts
+++ b/automad/src/client/admin/components/NumberUnitInput.ts
@@ -39,8 +39,8 @@ import {
fire,
FormDataProviders,
listen,
-} from '@/core';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* A special input that combines a number input with a unit dropdown.
diff --git a/automad/src/client/admin/components/PackageManager/PackageCard.ts b/automad/src/client/admin/components/PackageManager/PackageCard.ts
index b5b07fcf0..76e6ee5f6 100644
--- a/automad/src/client/admin/components/PackageManager/PackageCard.ts
+++ b/automad/src/client/admin/components/PackageManager/PackageCard.ts
@@ -46,9 +46,9 @@ import {
notifySuccess,
PackageManagerController,
requestAPI,
-} from '@/core';
-import { Package } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { Package } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
const packageBrowser = 'https://packages.automad.org';
diff --git a/automad/src/client/admin/components/PackageManager/PackageList.ts b/automad/src/client/admin/components/PackageManager/PackageList.ts
index 678ee65e4..fa8020ead 100644
--- a/automad/src/client/admin/components/PackageManager/PackageList.ts
+++ b/automad/src/client/admin/components/PackageManager/PackageList.ts
@@ -39,9 +39,9 @@ import {
listen,
PackageManagerController,
requestAPI,
-} from '@/core';
-import { KeyValueMap, Package } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { KeyValueMap, Package } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* Get and sort all required package data in order to generate the package card grid.
diff --git a/automad/src/client/admin/components/PackageManager/UpdateAllPackages.ts b/automad/src/client/admin/components/PackageManager/UpdateAllPackages.ts
index ec0002b99..a924e190b 100644
--- a/automad/src/client/admin/components/PackageManager/UpdateAllPackages.ts
+++ b/automad/src/client/admin/components/PackageManager/UpdateAllPackages.ts
@@ -43,8 +43,8 @@ import {
notifySuccess,
PackageManagerController,
requestAPI,
-} from '@/core';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { BaseComponent } from '@/admin/components/Base';
/**
* The update all button component. It is only visible in case there are outdated packages.
diff --git a/automad/src/client/admin/components/PageSelectTree.ts b/automad/src/client/admin/components/PageSelectTree.ts
index f3663801d..571adaf39 100644
--- a/automad/src/client/admin/components/PageSelectTree.ts
+++ b/automad/src/client/admin/components/PageSelectTree.ts
@@ -45,10 +45,10 @@ import {
html,
listen,
query,
-} from '@/core';
-import { createSortableTreeNodes, treeStyles } from '@/core/tree';
-import { PageMetaData } from '@/types';
-import { BaseComponent } from '@/components/Base';
+} from '@/admin/core';
+import { createSortableTreeNodes, treeStyles } from '@/admin/core/tree';
+import { PageMetaData } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
import { ModalComponent } from './Modal/Modal';
/**
diff --git a/automad/src/client/admin/components/Pages/BaseCenteredLayout.ts b/automad/src/client/admin/components/Pages/BaseCenteredLayout.ts
index 5914daa58..744d56533 100644
--- a/automad/src/client/admin/components/Pages/BaseCenteredLayout.ts
+++ b/automad/src/client/admin/components/Pages/BaseCenteredLayout.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { Partials } from '@/types';
+import { Partials } from '@/admin/types';
import { BaseLayoutComponent } from './BaseLayout';
import { centered } from './Templates/CenteredLayoutTemplate';
diff --git a/automad/src/client/admin/components/Pages/BaseDashboardLayout.ts b/automad/src/client/admin/components/Pages/BaseDashboardLayout.ts
index ed88b2193..8c922269e 100644
--- a/automad/src/client/admin/components/Pages/BaseDashboardLayout.ts
+++ b/automad/src/client/admin/components/Pages/BaseDashboardLayout.ts
@@ -32,7 +32,7 @@
* Licensed under the MIT license.
*/
-import { Partials } from '@/types';
+import { Partials } from '@/admin/types';
import { BaseLayoutComponent } from './BaseLayout';
import { dashboardLayout } from './Templates/DashboardLayoutTemplate';
diff --git a/automad/src/client/admin/components/Pages/BaseLayout.ts b/automad/src/client/admin/components/Pages/BaseLayout.ts
index 9d408d958..0162612f8 100644
--- a/automad/src/client/admin/components/Pages/BaseLayout.ts
+++ b/automad/src/client/admin/components/Pages/BaseLayout.ts
@@ -32,9 +32,9 @@
* Licensed under the MIT license.
*/
-import { setDocumentTitle } from '@/core';
-import { Partials } from '@/types';
-import { BaseComponent } from '@/components/Base';
+import { setDocumentTitle } from '@/admin/core';
+import { Partials } from '@/admin/types';
+import { BaseComponent } from '@/admin/components/Base';
/**
* The base view component.
diff --git a/automad/src/client/admin/components/Pages/Home.ts b/automad/src/client/admin/components/Pages/Home.ts
index 6736600b1..c23a9807c 100644
--- a/automad/src/client/admin/components/Pages/Home.ts
+++ b/automad/src/client/admin/components/Pages/Home.ts
@@ -40,8 +40,8 @@ import {
getTagFromRoute,
html,
Route,
-} from '@/core';
-import { Section } from 'common';
+} from '@/admin/core';
+import { Section } from '@/common';
import { BaseDashboardLayoutComponent } from './BaseDashboardLayout';
const systemInfo = (): string => {
@@ -66,11 +66,15 @@ const systemInfo = (): string => {
-