mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 06:55:26 +02:00
Auth page styles improved
This commit is contained in:
parent
404fb4642e
commit
858106bbaa
11 changed files with 1635 additions and 132 deletions
376
public/dist/code-styling.bundle.js
vendored
376
public/dist/code-styling.bundle.js
vendored
File diff suppressed because one or more lines are too long
393
public/dist/editor.bundle.js
vendored
393
public/dist/editor.bundle.js
vendored
File diff suppressed because one or more lines are too long
940
public/dist/main.bundle.js
vendored
940
public/dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
public/dist/main.css
vendored
2
public/dist/main.css
vendored
File diff suppressed because one or more lines are too long
33
src/frontend/styles/components/auth.pcss
Normal file
33
src/frontend/styles/components/auth.pcss
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
.auth-form {
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 30vh;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@media (--mobile){
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 40px 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="password"] {
|
||||||
|
padding: 9px;
|
||||||
|
font-size: 15px;
|
||||||
|
outline: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border: 1px solid var(--color-line-gray);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="submit"]{
|
||||||
|
@apply --button;
|
||||||
|
@apply --button-primary;
|
||||||
|
font-size: 15px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
line-height: inherit;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
}
|
|
@ -98,10 +98,11 @@
|
||||||
* ==================
|
* ==================
|
||||||
*/
|
*/
|
||||||
.block-code {
|
.block-code {
|
||||||
padding: 20px !important;
|
padding: 15px !important;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
//border: 1px solid var(--color-line-gray);
|
background: #fcfaff !important;
|
||||||
|
border: 1px solid #ededf0;
|
||||||
font-family: Menlo,Monaco,Consolas,Courier New,monospace;
|
font-family: Menlo,Monaco,Consolas,Courier New,monospace;
|
||||||
line-height: 1.7em;
|
line-height: 1.7em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
@import './components/writing.pcss';
|
@import './components/writing.pcss';
|
||||||
@import './components/page.pcss';
|
@import './components/page.pcss';
|
||||||
@import './components/landing.pcss';
|
@import './components/landing.pcss';
|
||||||
|
@import './components/auth.pcss';
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: system-ui, Helvetica, Arial, Verdana;
|
font-family: system-ui, Helvetica, Arial, Verdana;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
/**
|
/**
|
||||||
* Site layout sizes
|
* Site layout sizes
|
||||||
*/
|
*/
|
||||||
--layout-padding-horisontal: 40px;
|
--layout-padding-horisontal: 30px;
|
||||||
--layout-padding-vertical: 40px;
|
--layout-padding-vertical: 40px;
|
||||||
--layout-width-aside: 200px;
|
--layout-width-aside: 200px;
|
||||||
--layout-width-main-col: 650px;
|
--layout-width-main-col: 650px;
|
||||||
|
@ -30,6 +30,8 @@
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border: 0;
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
margin: 0 0.3em 0 -0.05em;
|
margin: 0 0.3em 0 -0.05em;
|
||||||
|
|
|
@ -17,7 +17,6 @@ const parseForm = bodyParser.urlencoded({ extended: false });
|
||||||
router.get('/auth', csrfProtection, function (req, res) {
|
router.get('/auth', csrfProtection, function (req, res) {
|
||||||
res.render('auth', {
|
res.render('auth', {
|
||||||
title: 'Login page',
|
title: 'Login page',
|
||||||
header: 'Enter password',
|
|
||||||
csrfToken: req.csrfToken()
|
csrfToken: req.csrfToken()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,6 +16,7 @@ module.exports = async function verifyToken(req, res, next) {
|
||||||
if (!userDoc) {
|
if (!userDoc) {
|
||||||
res.locals.isAuthorized = false;
|
res.locals.isAuthorized = false;
|
||||||
next();
|
next();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
jwt.verify(token, userDoc.passHash + config.secret, (err, decodedToken) => {
|
jwt.verify(token, userDoc.passHash + config.secret, (err, decodedToken) => {
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
{% extends 'layout.twig' %}
|
{% extends 'layout.twig' %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>{{header}}</h1>
|
<form class="auth-form" method="post" action="/auth">
|
||||||
<form method="post" action="/auth">
|
<h1>
|
||||||
|
┬┴┬┴┤ ͜ʖ ͡°) ├┬┴┬┴
|
||||||
|
</h1>
|
||||||
|
<p>
|
||||||
|
Enter a password to access pages editing
|
||||||
|
</p>
|
||||||
<input type="hidden" name="_csrf" value={{csrfToken}}>
|
<input type="hidden" name="_csrf" value={{csrfToken}}>
|
||||||
<input type="password" name="password" placeholder="Password">
|
<input type="password" name="password" placeholder="Password">
|
||||||
<input type="submit" value="login">
|
<input type="submit" value="Login">
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue