remove ttrss_login stuff, use utility class

This commit is contained in:
Andrew Dolgov 2019-02-19 15:14:42 +03:00
parent c11f32ac38
commit e2c9e283a2
9 changed files with 131 additions and 337 deletions

View File

@ -862,70 +862,6 @@ body.ttrss_main #feedEditDlg img.feedIcon {
height: auto; height: auto;
width: auto; width: auto;
} }
body.ttrss_login .container {
background: #f5f5f5;
color: black;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
position: absolute;
}
body.ttrss_login .container .footer {
text-align: center;
padding: 10px;
}
body.ttrss_login .container .center {
width: 100%;
display: flex;
align-items: center;
flex-grow: 1;
justify-content: center;
}
body.ttrss_login .container .center .login-form {
background: white;
padding: 20px;
border: 1px solid #ddd;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
}
body.ttrss_login .container .center .login-form form {
margin: 0px;
}
body.ttrss_login fieldset > label:first-of-type {
width: 120px;
margin-right: 20px;
display: inline-block;
text-align: right;
font-weight: bold;
}
body.ttrss_login fieldset {
border-width: 0;
padding: 5px 0px;
}
body.ttrss_login fieldset.narrow {
padding: 2px 0px;
}
body.ttrss_login fieldset.align-right {
text-align: right;
}
body.ttrss_login a {
color: #257aa7;
text-decoration: none;
}
body.ttrss_login a:hover,
body.ttrss_login a:focus {
color: #257aa7;
text-decoration: underline;
}
body.ttrss_login div.footer a {
color: gray;
}
body.ttrss_login div.footer a:hover {
color: #257aa7;
}
body.ttrss_login div.row {
padding-bottom: 5px;
}
body.ttrss_main .dijitDialog h1:first-of-type, body.ttrss_main .dijitDialog h1:first-of-type,
body.ttrss_main .dijitDialog h2:first-of-type, body.ttrss_main .dijitDialog h2:first-of-type,
body.ttrss_main .dijitDialog h3:first-of-type, body.ttrss_main .dijitDialog h3:first-of-type,
@ -1664,6 +1600,12 @@ body.ttrss_utility fieldset {
border-width: 0px; border-width: 0px;
padding: 5px 0px; padding: 5px 0px;
} }
body.ttrss_utility fieldset.narrow {
padding: 2px 0px;
}
body.ttrss_utility fieldset.align-right {
text-align: right;
}
body.ttrss_utility fieldset > label:first-of-type { body.ttrss_utility fieldset > label:first-of-type {
width: 120px; width: 120px;
margin-right: 20px; margin-right: 20px;
@ -1671,6 +1613,16 @@ body.ttrss_utility fieldset > label:first-of-type {
text-align: right; text-align: right;
font-weight: bold; font-weight: bold;
} }
body.ttrss_utility .footer {
text-align: center;
padding-top: 10px;
}
body.ttrss_utility .footer a {
color: gray;
}
body.ttrss_utility .footer a:hover {
color: #257aa7;
}
body.ttrss_utility body.otp { body.ttrss_utility body.otp {
margin: 1em; margin: 1em;
padding: 0px; padding: 0px;

File diff suppressed because one or more lines are too long

View File

@ -1022,87 +1022,6 @@ body.ttrss_main {
} }
} }
body.ttrss_login {
.container {
background : @color-panel-bg;
color : @default-fg;
display : flex;
flex-direction: column;
width : 100%;
height : 100%;
position : absolute;
.footer {
text-align : center;
padding : 10px;
}
.center {
width : 100%;
display : flex;
align-items: center;
flex-grow : 1;
justify-content : center;
.login-form {
form {
margin : 0px;
}
background : white;
padding : 20px;
border : 1px solid #ddd;
box-shadow : 0px 1px 1px -1px rgba(0,0,0,0.1);
}
}
}
fieldset > label:first-of-type {
width : 120px;
margin-right : 20px;
display : inline-block;
text-align : right;
font-weight : bold;
}
fieldset {
border-width : 0;
padding : 5px 0px;
}
fieldset.narrow {
padding : 2px 0px;
}
fieldset.align-right {
text-align : right;
}
a {
color: @color-accent;
text-decoration: none;
}
a:hover,
a:focus {
color: @color-accent;
text-decoration: underline;
}
div.footer a {
color : gray;
}
div.footer a:hover {
color : @color-accent;
}
div.row {
padding-bottom : 5px;
}
}
body.ttrss_main .dijitDialog { body.ttrss_main .dijitDialog {
h1:first-of-type, h1:first-of-type,
h2:first-of-type, h2:first-of-type,

View File

@ -149,6 +149,14 @@ body.ttrss_utility {
padding : 5px 0px; padding : 5px 0px;
} }
fieldset.narrow {
padding : 2px 0px;
}
fieldset.align-right {
text-align : right;
}
fieldset > label:first-of-type { fieldset > label:first-of-type {
width : 120px; width : 120px;
margin-right : 20px; margin-right : 20px;
@ -157,6 +165,19 @@ body.ttrss_utility {
font-weight : bold; font-weight : bold;
} }
.footer {
text-align : center;
padding-top : 10px;
a {
color : gray;
}
a:hover {
color : @color-accent;
}
}
body.otp { body.otp {
margin : 1em; margin : 1em;
padding : 0px; padding : 0px;

View File

@ -21,7 +21,7 @@
</script> </script>
</head> </head>
<body class="flat ttrss_main ttrss_login"> <body class="flat ttrss_main ttrss_utility">
<script type="text/javascript"> <script type="text/javascript">
require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox', 'dijit/form/Form', require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox', 'dijit/form/Form',
@ -64,86 +64,84 @@ function bwLimitChange(elem) {
<div class="container"> <div class="container">
<div class="center"> <h1><?php echo "Authentication" ?></h1>
<div class="login-form"> <div class="content">
<form action="public.php?return=<?php echo $return ?>"
dojoType="dijit.form.Form" method="POST">
<form action="public.php?return=<?php echo $return ?>" <?php print_hidden("op", "login"); ?>
dojoType="dijit.form.Form" method="POST">
<?php print_hidden("op", "login"); ?> <?php if ($_SESSION["login_error_msg"]) { ?>
<?php echo format_error($_SESSION["login_error_msg"]) ?>
<?php $_SESSION["login_error_msg"] = ""; ?>
<?php } ?>
<?php if ($_SESSION["login_error_msg"]) { ?> <fieldset>
<?php echo format_error($_SESSION["login_error_msg"]) ?> <label><?php echo __("Login:") ?></label>
<?php $_SESSION["login_error_msg"] = ""; ?> <input name="login" id="login" dojoType="dijit.form.TextBox" type="text"
onchange="fetchProfiles()" onfocus="fetchProfiles()" onblur="fetchProfiles()"
required="1" value="<?php echo $_SESSION["fake_login"] ?>" />
</fieldset>
<fieldset>
<label><?php echo __("Password:") ?></label>
<input type="password" name="password" required="1"
dojoType="dijit.form.TextBox"
class="input input-text"
value="<?php echo $_SESSION["fake_password"] ?>"/>
<?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?>
<a href="public.php?op=forgotpass"><?php echo __("I forgot my password") ?></a>
<?php } ?> <?php } ?>
</fieldset>
<fieldset> <fieldset>
<label><?php echo __("Login:") ?></label> <label><?php echo __("Profile:") ?></label>
<input name="login" id="login" dojoType="dijit.form.TextBox" type="text"
onchange="fetchProfiles()" onfocus="fetchProfiles()" onblur="fetchProfiles()"
required="1" value="<?php echo $_SESSION["fake_login"] ?>" />
</fieldset>
<fieldset> <select disabled='disabled' name="profile" id="profile" dojoType='dijit.form.Select'>
<label><?php echo __("Password:") ?></label> <option><?php echo __("Default profile") ?></option>
</select>
</fieldset>
<input type="password" name="password" required="1" <fieldset class="narrow">
dojoType="dijit.form.TextBox" <label> </label>
class="input input-text"
value="<?php echo $_SESSION["fake_password"] ?>"/>
<?php if (strpos(PLUGINS, "auth_internal") !== FALSE) { ?> <label id="bw_limit_label"><input dojoType="dijit.form.CheckBox" name="bw_limit" id="bw_limit"
<a href="public.php?op=forgotpass"><?php echo __("I forgot my password") ?></a> type="checkbox" onchange="bwLimitChange(this)">
<?php } ?> <?php echo __("Use less traffic") ?></label>
</fieldset> </fieldset>
<fieldset> <div dojoType="dijit.Tooltip" connectId="bw_limit_label" position="below" style="display:none">
<label><?php echo __("Profile:") ?></label> <?php echo __("Does not display images in articles, reduces automatic refreshes."); ?>
</div>
<select disabled='disabled' name="profile" id="profile" dojoType='dijit.form.Select'> <?php if (SESSION_COOKIE_LIFETIME > 0) { ?>
<option><?php echo __("Default profile") ?></option>
</select>
</fieldset>
<fieldset class="narrow"> <fieldset class="narrow">
<label> </label> <label> </label>
<label>
<label id="bw_limit_label"><input dojoType="dijit.form.CheckBox" name="bw_limit" id="bw_limit" <input dojoType="dijit.form.CheckBox" name="remember_me" id="remember_me" type="checkbox">
type="checkbox" onchange="bwLimitChange(this)"> <?php echo __("Remember me") ?>
<?php echo __("Use less traffic") ?></label> </label>
</fieldset> </fieldset>
<div dojoType="dijit.Tooltip" connectId="bw_limit_label" position="below" style="display:none"> <?php } ?>
<?php echo __("Does not display images in articles, reduces automatic refreshes."); ?>
</div>
<?php if (SESSION_COOKIE_LIFETIME > 0) { ?> <hr/>
<fieldset class="narrow"> <fieldset class="align-right">
<label> </label> <label> </label>
<label>
<input dojoType="dijit.form.CheckBox" name="remember_me" id="remember_me" type="checkbox">
<?php echo __("Remember me") ?>
</label>
</fieldset>
<button dojoType="dijit.form.Button" type="submit" class="alt-primary"><?php echo __('Log in') ?></button>
<?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
<button onclick="return gotoRegForm()" dojoType="dijit.form.Button">
<?php echo __("Create new account") ?></button>
<?php } ?> <?php } ?>
</fieldset>
<hr/> </form>
<fieldset class="align-right">
<label> </label>
<button dojoType="dijit.form.Button" type="submit" class="alt-primary"><?php echo __('Log in') ?></button>
<?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
<button onclick="return gotoRegForm()" dojoType="dijit.form.Button">
<?php echo __("Create new account") ?></button>
<?php } ?>
</fieldset>
</form>
</div>
</div> </div>
<div class="footer"> <div class="footer">

View File

@ -863,70 +863,6 @@ body.ttrss_main #feedEditDlg img.feedIcon {
height: auto; height: auto;
width: auto; width: auto;
} }
body.ttrss_login .container {
background: #222;
color: #ccc;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
position: absolute;
}
body.ttrss_login .container .footer {
text-align: center;
padding: 10px;
}
body.ttrss_login .container .center {
width: 100%;
display: flex;
align-items: center;
flex-grow: 1;
justify-content: center;
}
body.ttrss_login .container .center .login-form {
background: white;
padding: 20px;
border: 1px solid #ddd;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
}
body.ttrss_login .container .center .login-form form {
margin: 0px;
}
body.ttrss_login fieldset > label:first-of-type {
width: 120px;
margin-right: 20px;
display: inline-block;
text-align: right;
font-weight: bold;
}
body.ttrss_login fieldset {
border-width: 0;
padding: 5px 0px;
}
body.ttrss_login fieldset.narrow {
padding: 2px 0px;
}
body.ttrss_login fieldset.align-right {
text-align: right;
}
body.ttrss_login a {
color: #b87d2c;
text-decoration: none;
}
body.ttrss_login a:hover,
body.ttrss_login a:focus {
color: #b87d2c;
text-decoration: underline;
}
body.ttrss_login div.footer a {
color: gray;
}
body.ttrss_login div.footer a:hover {
color: #b87d2c;
}
body.ttrss_login div.row {
padding-bottom: 5px;
}
body.ttrss_main .dijitDialog h1:first-of-type, body.ttrss_main .dijitDialog h1:first-of-type,
body.ttrss_main .dijitDialog h2:first-of-type, body.ttrss_main .dijitDialog h2:first-of-type,
body.ttrss_main .dijitDialog h3:first-of-type, body.ttrss_main .dijitDialog h3:first-of-type,
@ -1665,6 +1601,12 @@ body.ttrss_utility fieldset {
border-width: 0px; border-width: 0px;
padding: 5px 0px; padding: 5px 0px;
} }
body.ttrss_utility fieldset.narrow {
padding: 2px 0px;
}
body.ttrss_utility fieldset.align-right {
text-align: right;
}
body.ttrss_utility fieldset > label:first-of-type { body.ttrss_utility fieldset > label:first-of-type {
width: 120px; width: 120px;
margin-right: 20px; margin-right: 20px;
@ -1672,6 +1614,16 @@ body.ttrss_utility fieldset > label:first-of-type {
text-align: right; text-align: right;
font-weight: bold; font-weight: bold;
} }
body.ttrss_utility .footer {
text-align: center;
padding-top: 10px;
}
body.ttrss_utility .footer a {
color: gray;
}
body.ttrss_utility .footer a:hover {
color: #b87d2c;
}
body.ttrss_utility body.otp { body.ttrss_utility body.otp {
margin: 1em; margin: 1em;
padding: 0px; padding: 0px;

File diff suppressed because one or more lines are too long

View File

@ -863,70 +863,6 @@ body.ttrss_main #feedEditDlg img.feedIcon {
height: auto; height: auto;
width: auto; width: auto;
} }
body.ttrss_login .container {
background: #222;
color: #ccc;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
position: absolute;
}
body.ttrss_login .container .footer {
text-align: center;
padding: 10px;
}
body.ttrss_login .container .center {
width: 100%;
display: flex;
align-items: center;
flex-grow: 1;
justify-content: center;
}
body.ttrss_login .container .center .login-form {
background: white;
padding: 20px;
border: 1px solid #ddd;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
}
body.ttrss_login .container .center .login-form form {
margin: 0px;
}
body.ttrss_login fieldset > label:first-of-type {
width: 120px;
margin-right: 20px;
display: inline-block;
text-align: right;
font-weight: bold;
}
body.ttrss_login fieldset {
border-width: 0;
padding: 5px 0px;
}
body.ttrss_login fieldset.narrow {
padding: 2px 0px;
}
body.ttrss_login fieldset.align-right {
text-align: right;
}
body.ttrss_login a {
color: #257aa7;
text-decoration: none;
}
body.ttrss_login a:hover,
body.ttrss_login a:focus {
color: #257aa7;
text-decoration: underline;
}
body.ttrss_login div.footer a {
color: gray;
}
body.ttrss_login div.footer a:hover {
color: #257aa7;
}
body.ttrss_login div.row {
padding-bottom: 5px;
}
body.ttrss_main .dijitDialog h1:first-of-type, body.ttrss_main .dijitDialog h1:first-of-type,
body.ttrss_main .dijitDialog h2:first-of-type, body.ttrss_main .dijitDialog h2:first-of-type,
body.ttrss_main .dijitDialog h3:first-of-type, body.ttrss_main .dijitDialog h3:first-of-type,
@ -1665,6 +1601,12 @@ body.ttrss_utility fieldset {
border-width: 0px; border-width: 0px;
padding: 5px 0px; padding: 5px 0px;
} }
body.ttrss_utility fieldset.narrow {
padding: 2px 0px;
}
body.ttrss_utility fieldset.align-right {
text-align: right;
}
body.ttrss_utility fieldset > label:first-of-type { body.ttrss_utility fieldset > label:first-of-type {
width: 120px; width: 120px;
margin-right: 20px; margin-right: 20px;
@ -1672,6 +1614,16 @@ body.ttrss_utility fieldset > label:first-of-type {
text-align: right; text-align: right;
font-weight: bold; font-weight: bold;
} }
body.ttrss_utility .footer {
text-align: center;
padding-top: 10px;
}
body.ttrss_utility .footer a {
color: gray;
}
body.ttrss_utility .footer a:hover {
color: #257aa7;
}
body.ttrss_utility body.otp { body.ttrss_utility body.otp {
margin: 1em; margin: 1em;
padding: 0px; padding: 0px;

File diff suppressed because one or more lines are too long