added index.php and its css

This commit is contained in:
Louis Vallat 2019-11-20 23:16:27 +01:00
parent 71009bd737
commit 0990e971a0
4 changed files with 181 additions and 0 deletions

18
assets/css/common.css Normal file
View File

@ -0,0 +1,18 @@
@import url('https://fonts.googleapis.com/css?family=Noto+Sans&display=swap');
@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');
.montserrat {
font-family: 'Montserrat', sans-serif;
}
.noto-sans {
font-family: 'Noto Sans', sans-serif;
}
.white {
color: white;
}
.bold-900 {
font-weight: 900;
}

76
assets/css/index.css Normal file
View File

@ -0,0 +1,76 @@
body {
min-height: 100vh;
background: rgb(2, 0, 36);
background: -moz-linear-gradient(140deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 30%, rgba(0, 111, 131, 1) 100%);
background: -webkit-linear-gradient(140deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 30%, rgba(0, 111, 131, 1) 100%);
background: linear-gradient(140deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 30%, rgba(0, 111, 131, 1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#020024", endColorstr="#006f83", GradientType=1);
}
#indexTitle {
position: absolute;
top: 50%;
left: 40%;
transform: translateX(-50%) translateY(-50%);
z-index: auto;
}
#login {
position: fixed;
display: block;
top: 35px;
right: 35px;
z-index: auto;
}
#loginButton {
text-decoration: none;
letter-spacing: 2px;
padding: 12px;
border: solid white;
border-radius: 15px;
transition: all 500ms;
}
#loginButton:hover {
transition: all 500ms;
color: #546a7b;
background-color: #fdfdff;
box-shadow: 0 0 100px white;
}
/* Very small devices (portrait phone, 575 and down) */
@media (max-width: 575px) {
#title {
font-size: 3em;
}
#subtitle {
font-size: 1em;
}
}
/* Small devices (landscape phones, 576px and up)*/
@media (min-width: 576px) {
#title {
font-size: 5em;
}
#subtitle {
font-size: 1.5em;
}
}
/* Large devices (desktops, 992px and up)*/
@media (min-width: 992px) {
#title {
font-size: 7em;
}
#subtitle {
font-size: 2.5em;
}
}

53
assets/css/reset.css Normal file
View File

@ -0,0 +1,53 @@
/* http://meyerweb.com/eric/tools/css/reset/ */
/* v1.0 | 20080212 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}

34
index.php Normal file
View File

@ -0,0 +1,34 @@
<?php
require_once("./assets/php/utils.php")
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- TODO : ADD SEO STUFF -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="/assets/css/reset.css" rel="stylesheet">
<link href="/assets/css/common.css" rel="stylesheet">
<link href="/assets/css/index.css" rel="stylesheet">
<title>Food inventory</title>
</head>
<body>
<div id="indexTitle">
<h1 class="montserrat white bold-900 big" id="title">Food inventory</h1>
<h2 class="white bold-900 noto-sans" id="subtitle">Keep an eye on your food.</h2>
</div>
<div class="noto-sans" id="login">
<a class="white" href="/login.php" id="loginButton">
<?php echo is_connected() ? "Compte\n" : "Connexion\n"; ?>
</a>
</div>
</body>
</html>