Commit d865bf4c by Ian Gustavo

resolvendo conflitos e atualizando pastas

parents 6811033b 35090024
class Animal: from flask_sqlalchemy import SQLAlchemy
def __init__(self, nome, especie, idade, peso):
self.nome = nome db = SQLAlchemy()
self.especie = especie
self.idade = idade class Animal(db.Model):
self.peso = peso id = db.Column(db.Integer, primary_key=True)
\ No newline at end of file nome = db.Column(db.String(100), nullable=False)
especie = db.Column(db.String(50), nullable=False)
idade = db.Column(db.Integer, nullable=False)
peso = db.Column(db.Float, nullable=False)
\ No newline at end of file
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f4f7f2;
color: #333;
padding: 40px;
}
h1 {
text-align: center;
margin-bottom: 30px;
color: #2d6a4f;
font-size: 36px;
}
a {
text-decoration: none;
transition: 0.3s;
}
a[href="/cadastro"] {
display: inline-block;
background-color: #40916c;
color: white;
padding: 12px 20px;
border-radius: 8px;
margin-bottom: 25px;
font-weight: bold;
}
a[href="/cadastro"]:hover {
background-color: #2d6a4f;
}
ul {
list-style: none;
max-width: 800px;
margin: auto;
}
li {
background-color: white;
padding: 18px;
margin-bottom: 15px;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
}
li a {
background-color: #d62828;
color: white;
padding: 8px 14px;
border-radius: 6px;
font-size: 14px;
}
li a:hover {
background-color: #a4161a;
}
form {
background-color: white;
max-width: 450px;
margin: auto;
padding: 30px;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
input {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 16px;
}
button {
width: 100%;
padding: 12px;
border: none;
border-radius: 8px;
background-color: #40916c;
color: white;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: 0.3s;
}
button:hover {
background-color: #2d6a4f;
}
body > a {
display: block;
text-align: center;
margin-top: 20px;
color: #2d6a4f;
font-weight: bold;
}
body > a:hover {
color: #1b4332;
}
\ No newline at end of file
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
......
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Lista de Animais</title> <title>Lista de Animais</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head> </head>
<body> <body>
...@@ -13,7 +15,7 @@ ...@@ -13,7 +15,7 @@
{% for animal in animais %} {% for animal in animais %}
<li> <li>
{{ animal.nome }} - {{ animal.especie }} - {{ animal.idade }} anos - {{ animal.peso }} kg {{ animal.nome }} - {{ animal.especie }} - {{ animal.idade }} anos - {{ animal.peso }} kg
<a href="/excluir/{{ loop.index0 }}">❌ Excluir</a> <a href="/excluir/{{ animal.id }}">❌ Excluir</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
} }
/* BODY */ /* BODY */
body { body {
font-family: 'Segoe UI', sans-serif; font-family: 'Segoe UI', sans-serif;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment