Pote.Theme.Templates (Pote v2.2.0)

Copy Markdown View Source

Built-in theme templates that ship with Pote.

Consumers can install any of these via MyApp.Theme.install_template("dracula") (where MyApp.Theme is the module built with use Pote.Theme).

Adding a new template is a one-liner: add an entry to @templates and it becomes available everywhere.

Summary

Functions

Returns all built-in templates.

Looks up a built-in template by name.

Returns the list of built-in template theme names.

Functions

all()

@spec all() :: %{optional(String.t()) => Pote.Theme.Theme.t()}

Returns all built-in templates.

fetch(name)

@spec fetch(String.t()) :: {:ok, Pote.Theme.Theme.t()} | :error

Looks up a built-in template by name.

names()

@spec names() :: [String.t()]

Returns the list of built-in template theme names.