static-fe overhaul (#236)
[akkoma] / lib / pleroma / web / views / layout_view.ex
index e5183701d6610c2a58ac4f24f678fd208bd11569..ac13cf9626e73390e2091567e8e631270db3751f 100644 (file)
@@ -1,7 +1,14 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.LayoutView do
   use Pleroma.Web, :view
+  import Phoenix.HTML
+
+  def render_html(file) do
+    case :httpc.request(Pleroma.Web.Endpoint.url() <> file) do
+      {:ok, {{_, 200, _}, _headers, body}} -> body
+    end
+  end
 end