static-fe overhaul (#236)
[akkoma] / lib / pleroma / web / views / layout_view.ex
index ba94b9defde27beb05da89438cb93b66d346e237..ac13cf9626e73390e2091567e8e631270db3751f 100644 (file)
@@ -1,7 +1,14 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 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