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