2021-03-19 19:32:18 +00:00
|
|
|
defmodule Legendary.Admin.Kaffy.EditorExtension do
|
2021-07-20 20:50:51 +00:00
|
|
|
@moduledoc """
|
|
|
|
Bring in additional CSS and JS for the admin interface e.g. the
|
|
|
|
markdown editor library.
|
|
|
|
"""
|
|
|
|
|
2021-10-19 19:28:25 +00:00
|
|
|
import Phoenix.HTML.Tag, only: [tag: 2]
|
|
|
|
|
2020-08-18 20:56:43 +00:00
|
|
|
def stylesheets(_conn) do
|
|
|
|
[
|
2021-10-19 19:28:25 +00:00
|
|
|
{:safe, ~s(<link rel="stylesheet" href="/css/admin.css" />)},
|
2020-08-18 20:56:43 +00:00
|
|
|
{:safe, ~s(<link rel="stylesheet" href="/css/app.css" />)},
|
2021-10-19 19:28:25 +00:00
|
|
|
tag(:meta, property: "og:site_name", content: Legendary.I18n.t!("en", "site.title"))
|
2020-08-18 20:56:43 +00:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def javascripts(_conn) do
|
|
|
|
[
|
2021-10-19 19:28:25 +00:00
|
|
|
{:safe, ~s(<script src="/js/admin.js"></script>)},
|
2020-08-18 20:56:43 +00:00
|
|
|
{:safe, ~s(<script src="/js/app.js"></script>)},
|
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|