diff --git a/assets/css/common/layout.scss b/assets/css/common/layout.scss index 410b7d7a..fe0ec02a 100644 --- a/assets/css/common/layout.scss +++ b/assets/css/common/layout.scss @@ -385,3 +385,9 @@ figure { text-align: center; padding: 4px 16px; } + +.twofactor { + display: flex; + align-items: center; + justify-content: center; +} diff --git a/lib/philomena_web/controllers/session/totp_controller.ex b/lib/philomena_web/controllers/session/totp_controller.ex index 51dae78a..af44ff09 100644 --- a/lib/philomena_web/controllers/session/totp_controller.ex +++ b/lib/philomena_web/controllers/session/totp_controller.ex @@ -1,13 +1,14 @@ defmodule PhilomenaWeb.Session.TotpController do use PhilomenaWeb, :controller + alias PhilomenaWeb.LayoutView alias Philomena.Users.User alias Philomena.Repo def new(conn, _params) do changeset = Pow.Plug.change_user(conn) - render(conn, "new.html", title: "Two-Factor Authentication", changeset: changeset) + render(conn, "new.html", layout: {LayoutView, "two_factor.html"}, changeset: changeset) end def create(conn, params) do diff --git a/lib/philomena_web/templates/layout/two_factor.html.slime b/lib/philomena_web/templates/layout/two_factor.html.slime new file mode 100644 index 00000000..0057ca31 --- /dev/null +++ b/lib/philomena_web/templates/layout/two_factor.html.slime @@ -0,0 +1,15 @@ +doctype html +html lang="en" + head + meta charset="utf-8" + meta http-equiv="X-UA-Compatible" content="IE=edge" + = viewport_meta_tag(@conn) + + title Two Factor Authentication - Derpibooru + link rel="stylesheet" href=stylesheet_path(@conn, nil) + link rel="icon" href="/favicon.ico" type="image/x-icon" + link rel="icon" href="/favicon.svg" type="image/svg+xml" + + body.twofactor + .twofactor__container + = render @view_module, @view_template, assigns