Login for default theme
Here I have started another approach, to include css into <style> tags since it seems that browsers don't like the idea of having .php files as css files that much, oh well.
This commit is contained in:
parent
903d00da39
commit
e52070b3c5
|
@ -1,2 +1,2 @@
|
|||
*.db
|
||||
|
||||
*~
|
||||
|
|
24
login.php
24
login.php
|
@ -72,23 +72,37 @@ if(isset($_POST["reg"])){
|
|||
<head>
|
||||
<?php include("themes/$theme_name/login.php"); ?>
|
||||
<meta http-equiv="content-type" content="text/html;chartset=utf8"/>
|
||||
<title>Login</title>
|
||||
<title>Login | LibreCat</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Login</h2>
|
||||
<?php include("include/header.php"); ?>
|
||||
<div id="main-container">
|
||||
|
||||
<!-- Login -->
|
||||
|
||||
<div id="login-container" class="section">
|
||||
<h2 class="title">Login</h2>
|
||||
<form name="input" action="" method="post">
|
||||
<label for="logname">Username:</label><input type="text" value="<?= $_POST["logname"] ?>" id="logname" name="logname"/><br/>
|
||||
<label for="password">Password:</label><input type="password" id="password" name="password"/>
|
||||
<?php if(isset($logErrorMsg)) echo "<p>$logErrorMsg</p>\n"; ?>
|
||||
<?php if(isset($logErrorMsg)) echo "<p class='errmsg'>$logErrorMsg</p>\n"; ?>
|
||||
<input type="submit" value="Login" name="log"/>
|
||||
</form>
|
||||
<h2>Register</h2>
|
||||
</div>
|
||||
|
||||
<!-- Register -->
|
||||
|
||||
<div id="register-container" class="section">
|
||||
<h2 class="title">Register</h2>
|
||||
<form name="input" action="" method="post">
|
||||
<label for="regname">Username:</label><input type="text" value="<?= $_POST["regname"] ?>" id="regname" name="regname"/><br/>
|
||||
<label for="password">Password:</label><input type="password" id="password" name="password"/><br/>
|
||||
<label for="invite">Invite code:</label><input type="text" value="<?= $_POST["invite"] ?>" id="invite" name="invite"/><br/>
|
||||
<?php if(isset($regErrorMsg)) echo "<p>$regErrorMsg</p>\n"; ?>
|
||||
<?php if(isset($regErrorMsg)) echo "<p class='errmsg'>$regErrorMsg</p>\n"; ?>
|
||||
<input type="submit" value="Register" name="reg"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div> <!-- Main container -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?php
|
||||
$color_main = "#353942";
|
||||
$color_bg = "#282b32";
|
||||
?>
|
|
@ -0,0 +1,28 @@
|
|||
<?php include("themes/minimalpunk/colors.php"); ?>
|
||||
#main-container{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.section{
|
||||
flex: 50%;
|
||||
margin: 30px;
|
||||
margin-bottom: 60px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.section input{
|
||||
margin: 10px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 2pc;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px){
|
||||
#main-container{
|
||||
display: block;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<?php include("themes/minimalpunk/colors.php"); ?>
|
||||
@font-face{
|
||||
font-family: liberation-sans;
|
||||
src: url(/themes/minimalpunk/assets/liberation-sans-Regular.ttf) format("truetype");
|
||||
}
|
||||
@font-face{
|
||||
font-family: liberation-sans;
|
||||
font-weight: bold;
|
||||
src: url(/themes/minimalpunk/assets/liberation-sans-Bold.ttf) format("truetype");
|
||||
}
|
||||
|
||||
body{
|
||||
font-family: liberation-sans;
|
||||
background-color: <?= $color_bg ?>;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a{
|
||||
color: white;
|
||||
}
|
||||
|
||||
input{
|
||||
background-color: <?= $color_3 ?>;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
body{
|
||||
background-image: url("/themes/minimalpunk/assets/logo_1000px.png"):
|
||||
background-size: 100px 100px;
|
||||
}
|
||||
|
||||
#header{
|
||||
text-align: right;
|
||||
padding: 20px;
|
||||
background-color: <?= $color_main ?>;
|
||||
}
|
|
@ -30,4 +30,3 @@ body{
|
|||
background-image: url("/themes/minimalpunk/assets/logo_1000px.png"):
|
||||
background-size: 100px 100px;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,3 +46,4 @@ table {
|
|||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
<?php
|
||||
echo('<link rel="stylesheet" type="text/css" href="/themes/minimalpunk/css/reset.css">');
|
||||
echo('<link rel="stylesheet" type="text/css" href="/themes/minimalpunk/css/main.css.php">');
|
||||
echo('<link rel="shortcut icon" type="image/png" href="/themes/minimalpunk/assets/favicon.png"/>');
|
||||
echo('<meta name="viewport" content="width=device-width, initial-scale=1.0">');
|
||||
echo("<link rel='stylesheet' type='text/css' href='/themes/minimalpunk/css/reset.css'>\n\t");
|
||||
|
||||
// For some reason inclusion of .css.php fails sometimes on browser, so I have
|
||||
// to do this workaround
|
||||
echo("<style>");
|
||||
include("css/main.css");
|
||||
include('css/login.css');
|
||||
echo("</style>");
|
||||
|
||||
echo("<link rel='shortcut icon' type='image/png' href='/themes/minimalpunk/assets/favicon.png'/>\n\t");
|
||||
echo("<meta name='viewport' content='width=device-width, initial-scale=1.0'>\n");
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue