diff --git a/images/404.png b/images/404.png new file mode 100644 index 0000000..116c3e7 Binary files /dev/null and b/images/404.png differ diff --git a/public/404.css b/public/404.css new file mode 100644 index 0000000..74f4081 --- /dev/null +++ b/public/404.css @@ -0,0 +1,18 @@ +body { + display: flex; + align-items: center; + justify-content: center; + height: 100vh; +} + +div.page { + display: flex; + align-items: center; +} + +.pic { + background-image: url("404.png"); + min-width: 512px; + min-height: 512px; + background-size: contain; +} diff --git a/public/authorization.css b/public/authorization.css index 2b1cf94..8137a7a 100644 --- a/public/authorization.css +++ b/public/authorization.css @@ -8,7 +8,6 @@ body { align-items: center; justify-content: center; height: 100vh; - overflow: hidden; margin-top: -5%; color: #333; opacity: 0; @@ -55,7 +54,6 @@ input:hover { .title { margin: 30px; - color:#333333 } .label { diff --git a/public/style.css b/public/style.css index 71ea28c..8cd066b 100644 --- a/public/style.css +++ b/public/style.css @@ -18,7 +18,7 @@ body { div.div-header { display: flex; align-items: center; - width: 60%; + width: 70%; justify-content: center; margin-top: 30px } @@ -67,7 +67,7 @@ input { /* BODY */ .content { - width: 60%; + width: 70%; margin-top: 20px } @@ -136,7 +136,7 @@ tr.row:hover, tr.row:nth-child(even):hover { .server-value { text-align: left; - padding-left: 10px; + padding: 2px 0 2px 10px; } .server-input { diff --git a/source/daster.d b/source/daster.d index 020c75f..0f4876c 100644 --- a/source/daster.d +++ b/source/daster.d @@ -180,7 +180,7 @@ void postReq(HTTPServerRequest req, HTTPServerResponse res) { return; } - log.d("json request: " ~ jsr.to!string); + log.d("%s: json request %s".format(req.clientAddress.toAddressString(), jsr.to!string)); switch (query) { case "login": diff --git a/source/requests/authorization.d b/source/requests/authorization.d index e046886..5456424 100644 --- a/source/requests/authorization.d +++ b/source/requests/authorization.d @@ -10,7 +10,7 @@ void login(HTTPServerRequest req, HTTPServerResponse res, AuthData serverAuthDat if (!(serverAuthData.login == userAuthData.login && serverAuthData.password == userAuthData.password)) { - log.i(("Данные авторизации не верны: %s").format(req.json)); + log.i(req.clientAddress.toAddressString() ~ ": Данные авторизации не верны"); res.send( true, "Данные авторизации не верны" @@ -23,7 +23,7 @@ void login(HTTPServerRequest req, HTTPServerResponse res, AuthData serverAuthDat req.session = res.startSession(); req.session.set!UserData("user", user); - log.i("Авторизация успешно пройдена"); + log.i(req.clientAddress.toAddressString() ~ ": Вход в систему"); res.send(); } @@ -32,7 +32,7 @@ void logout(HTTPServerRequest req, HTTPServerResponse res) { req.session.set!UserData("user", UserData.init); res.terminateSession(); - log.i("Выход из системы"); + log.i(req.clientAddress.toAddressString() ~ ": Выход из системы"); res.send(); } @@ -41,7 +41,7 @@ bool checkAuth(HTTPServerRequest req) { if (req.session) return req.session.get!UserData("user").login; - log.d("Отсутствует авторизация"); + log.d(req.clientAddress.toAddressString() ~ ": Отсутствует авторизация"); return false; } diff --git a/source/version_.d b/source/version_.d index e8028ea..fa80cc9 100644 --- a/source/version_.d +++ b/source/version_.d @@ -1,3 +1,3 @@ module version_; -enum dasterVersion = "v0.0.10"; +enum dasterVersion = "v0.1.0-beta.1"; diff --git a/views/404.dt b/views/404.dt index ae9c976..0d4d34b 100644 --- a/views/404.dt +++ b/views/404.dt @@ -1,6 +1,8 @@ doctype html head - title 404 + title Страница не найдена + link(rel='icon', type='image/png', sizes='128x128', href='favicon.png') + link(rel='stylesheet', type='text/css', href='404.css') body - div - p Страница не найдена + div.page + div.pic