updating styles
This commit is contained in:
parent
0741118255
commit
222231994f
41
index.php
41
index.php
|
@ -1,3 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="pt-br">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Register with txt</title>
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="style.css"> <!-- css -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet"> <!-- Font -->
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="container column">
|
||||
<h1>Titulo</h1>
|
||||
<form method="POST" class="column" action="recebedor.php">
|
||||
<input type="text" name="title" autofocus placeholder="Digite aqui o titulo...">
|
||||
<h1>Anotação</h1>
|
||||
<textarea name="text" placeholder="Digite aqui suas anotações..."></textarea>
|
||||
<input type="submit" value="Salvar">
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
<span>Novo Nome:</span><br>
|
||||
|
||||
<form method="POST" action="recebedor.php">
|
||||
|
@ -5,11 +37,6 @@
|
|||
<input type="submit" value="Adicionar">
|
||||
</form>
|
||||
|
||||
<h1>Lista de nomes</h1>
|
||||
|
||||
<?php
|
||||
$nomes = file_get_contents('nomes.txt'); // ler arquivo
|
||||
$nomes = explode("\n", $nomes); // quebrar texto por linhas
|
||||
$nomes = implode(' ', $nomes); // transformando em string
|
||||
echo $nomes;
|
||||
?>
|
||||
|
||||
-->
|
||||
|
|
8
note.php
Normal file
8
note.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<h1>Lista de nomes</h1>
|
||||
|
||||
<?php
|
||||
$titles = file_get_contents('note.txt'); // ler arquivo
|
||||
$titles = explode("\n", $titles); // quebrar texto por linhas
|
||||
$titles = implode(' ', $titles); // transformando em string
|
||||
echo $titles;
|
||||
?>
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_SPECIAL_CHARS); // pegando nome digitado e validando
|
||||
$title = filter_input(INPUT_POST, 'title', FILTER_SANITIZE_SPECIAL_CHARS); // pegando o titulo digitado e validando
|
||||
|
||||
// verificar se nome está preenchido
|
||||
if($nome) {
|
||||
$nomes = file_get_contents('nomes.txt'); // ler o texto
|
||||
$nomes .= "\n<li>$nome</li>"; // adicionar nova linha
|
||||
file_put_contents('nomes.txt', $nomes); // adicionar o contéudo novo
|
||||
// verificar se title está preenchido
|
||||
if($title) {
|
||||
$titles = file_get_contents('note.txt'); // ler o texto
|
||||
$titles .= "\n<li>$title</li>"; // adicionar nova linha
|
||||
file_put_contents('note.txt', $titles); // adicionar o contéudo novo
|
||||
|
||||
header("Location: index.php"); // depois de adicionar enviar para o index;
|
||||
header("Location: note.php"); // depois de adicionar envia para a página note;
|
||||
exit;
|
||||
} else {
|
||||
header("Location: index.php"); // se não tiver preenchido ele volta para o index
|
||||
|
|
84
style.css
Normal file
84
style.css
Normal file
|
@ -0,0 +1,84 @@
|
|||
*{
|
||||
outline:none;
|
||||
box-sizing:border-box;
|
||||
font-family:'Poppins', sans-serif;
|
||||
}
|
||||
body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
/* ================================================== default ================================================= */
|
||||
:root {
|
||||
--text:#747474;
|
||||
--black:#141414;
|
||||
--primary:#2DC5FF;
|
||||
}
|
||||
.container {
|
||||
width:772px;
|
||||
display:flex;
|
||||
border-radius:10px;
|
||||
background-color:#FEFEFE;
|
||||
box-shadow:-1px 10px 20px #2dc5ff33;
|
||||
}
|
||||
.column {
|
||||
flex-direction:column;
|
||||
}
|
||||
h1 {
|
||||
margin:0;
|
||||
margin-top:30px;
|
||||
font-size:30px;
|
||||
font-weight:700;
|
||||
color:var(--black);
|
||||
margin-left:30px;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
/* ================================================== main ================================================= */
|
||||
main {
|
||||
width:100vw;
|
||||
height:100vh;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
background-color:#222;
|
||||
}
|
||||
/* ================================================== form ================================================= */
|
||||
form {
|
||||
display:flex;
|
||||
}
|
||||
input[type="text"] {
|
||||
height:50px;
|
||||
font-size:20px;
|
||||
font-weight:400;
|
||||
color:var(--text);
|
||||
padding:10px;
|
||||
border-radius:6px;
|
||||
border:2px solid #E4E4E4;
|
||||
background-color:#F1F1F1;
|
||||
margin:0px 30px 0px 30px;
|
||||
}
|
||||
textarea {
|
||||
height:242px;
|
||||
font-size:20px;
|
||||
font-weight:400;
|
||||
color:var(--text);
|
||||
padding:10px;
|
||||
border-radius:6px;
|
||||
background-color:#E8E8E8;
|
||||
margin:0px 30px 30px 30px;
|
||||
border:0;
|
||||
border-top-right-radius:6px;
|
||||
border-bottom-right-radius:6px;
|
||||
border-left:8px solid var(--primary);
|
||||
}
|
||||
input[type="submit"] {
|
||||
cursor:pointer;
|
||||
height:60px;
|
||||
color:#FFF;
|
||||
font-size:35px;
|
||||
font-weight:700;
|
||||
border:0;
|
||||
border-radius:6px;
|
||||
margin:0px 30px 30px 30px;
|
||||
background-color:var(--primary);
|
||||
box-shadow:-2px 10px 20px #3ba8fb33;
|
||||
}
|
Loading…
Reference in New Issue
Block a user