2fa layout

This commit is contained in:
byte[] 2019-12-20 16:29:29 -05:00
parent 81800cf83d
commit 2ef4bdbbad
3 changed files with 23 additions and 1 deletions

View file

@ -385,3 +385,9 @@ figure {
text-align: center;
padding: 4px 16px;
}
.twofactor {
display: flex;
align-items: center;
justify-content: center;
}

View file

@ -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

View file

@ -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