API Reference scales_cms v#0.2.0
Copy MarkdownModules
ScalesCms keeps the contexts that define your domain and business logic.
The Cms context.
The CMS API Keys context.
The Cms context.
The Cms context.
Combined CMS listing for directory index screens.
The CmsMediaLibrary context.
The Cms context.
The Cms context.
The Cms context.
The Cms context.
Insert a block in a list and fix the sorting of that list of blocks. Supports both regular component blocks and template-backed blocks.
Set the new order of blocks after moving them
Deletes a page including its descendants.
Find the correct page variant for a specific locale if this is missing.
A collections of flows to aid publishing
Select the right version of a page variant based on the locale
Set a page variant to the latest version per locale. This provides the API of an easy way to find the latest version of a specific page
Starts a new version based on a give page variant. It copies then relevant parameters, and duplicates all blocks.
The Locales helper offers a list of supported locales and the default locale
A set of helper functions to aid the AWS S3 usage throughout the application
Dependency-free S3 Form Upload using HTTP POST sigv4 https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
A slugify helper thanks to Mudassar (https://mudssrali.com/blog/slugify-a-string-in-elixir)
Module defining button color variants
Module containind topics for pubsub
Error handler for JWT
Guardian Implementation to resolve module to user
Resolves block based on if it has a template assigned to it.
The entrypoint for defining your web interface, such as controllers, components, channels, and so on.
A modal live component for selecting or uploading media files. Can be embedded in editors to pick existing media or upload new files.
Shared utility functions for the CMS Media Library. Contains common logic used by both the Index and Modal components.
Macros for defining CMS routes in the host application.
CMS Settings LiveView component for managing API keys.
An index of all components and insertable template blocks for the CMS drawer.
A header component for the CMS
Editor for the button component
The schema for the MD component
A button collection component for the CMS
The button collection editor component for the CMS
Schema for button collection properties.
The wrapper that goes around a block that is rendered in the WYSIWYG editor
A header component for the CMS
Editor for the CTA button component
The schema for the MD component
Editor for the custom component block
The schema for the MD component
A header component for the CMS
Editor for the header component
The schema for the MD component
A multi use Phoenix LiveView file uploader ready for direct to S3 uploading
A first draft of a fileuploader that can be used more than once in a live view
An upload to s3 image component
An image components editor
The image upload component schema
A header component for the CMS
Editor for the image button component
The schema for the MD component
A button collection component for the CMS
The image button collection editor component for the CMS
Schema for button collection properties.
An upload to s3 lottie component
A lottie animation components editor
The lottie component schema
The markdown component, allowing the user to use a HTML WYSIWYG editor, transforming that HTML back to MD
The MD editor, rendering the TipTap WYSIWYG editor for the MD component
The schema for the MD component
An upload to s3 video component
A video components editor with media library support
The video component schema
The renderer of all the blocks, linking them to the right components
A struct representing a configurable dashboard tile.
The renderer and config for the dashboard tiles.
The wrapper that goes around a block that is rendered in the WYSIWYG editor
Shared drawer preview for the component library. Supports both regular components and template-backed insertables.
The wrapper that goes around a block that is rendered in the WYSIWYG editor
A default component base
A locale switcher component, that provides a PubSub feature throughout the whole application so they can tag along with locale changes
The renderer and config for the menu items.
Provides a reusable context menu component that can be used across the CMS interface tables.
Provides core UI components.
This module is invoked by your endpoint in case of errors on HTML requests.
This module is invoked by your endpoint in case of errors on JSON requests.
A module providing Internationalization with a gettext-based API.
Helper functions for building CMS template blocks paths and URLs.
Helper functions for building CMS directory paths and URLs.
A starting point for date helpers
Shared presentation helpers for template mode badges and indicators.
Shared LiveView hook for context menu state and events.
Generic LiveView on_mount hook for managing persisted UI state.
This module holds different layouts used by your application.
Main layout component that wraps all CMS pages.
Provides custom made Media components.
This module contains pages rendered by PageController.
Controller for persisting UI state to the session.
PersistedStateStore is a GenServer that manages an ETS table for storing persisted state across LiveView navigations.
Plug to serve specific assets for the CMS. Inspired from the LiveView Dashboard way of serving assets
This plug authenticates the API request based on JWT
Hooks into on_mount to keep track of current uri
Provides custom made UI components.
Provides a demo UserAuth environment to develop the CMS with a logged in user. Taken from mix.gen auth, so it matches with most Phoenix envs.
Mix Tasks
Only run this task if views are missing
Copies pending ScalesCMS migrations into the host app.