mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
2fa layout
This commit is contained in:
parent
81800cf83d
commit
2ef4bdbbad
3 changed files with 23 additions and 1 deletions
|
@ -385,3 +385,9 @@ figure {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 4px 16px;
|
padding: 4px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.twofactor {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
defmodule PhilomenaWeb.Session.TotpController do
|
defmodule PhilomenaWeb.Session.TotpController do
|
||||||
use PhilomenaWeb, :controller
|
use PhilomenaWeb, :controller
|
||||||
|
|
||||||
|
alias PhilomenaWeb.LayoutView
|
||||||
alias Philomena.Users.User
|
alias Philomena.Users.User
|
||||||
alias Philomena.Repo
|
alias Philomena.Repo
|
||||||
|
|
||||||
def new(conn, _params) do
|
def new(conn, _params) do
|
||||||
changeset = Pow.Plug.change_user(conn)
|
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
|
end
|
||||||
|
|
||||||
def create(conn, params) do
|
def create(conn, params) do
|
||||||
|
|
15
lib/philomena_web/templates/layout/two_factor.html.slime
Normal file
15
lib/philomena_web/templates/layout/two_factor.html.slime
Normal 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
|
Loading…
Reference in a new issue