Author: Pedro Lucas Porcellis <pedrolucasporcellis@gmail.com>
Add minimal stylesheet and some basic app factory Remembering that the focus for this version of the project is to be minimal but powerful and consistent
src/__init__.py | 10 ++++++ src/static/stylesheet.css | 60 +++++++++++++++++++++++++++++++++++++++++ src/templates/index.html | 20 +++++++++++++ src/templates/layout.html | 20 +++++++++++++
diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38dcb3d3cd5e4738a3d3caa472fec7bdcc77cd31 --- /dev/null +++ b/src/__init__.py @@ -0,0 +1,10 @@ +from flask import Flask, render_template + +def create_app(): + app = Flask(__name__) + + @app.route("/") + def index(): + return render_template('index.html', title = "Feira Virtual Bem da Terra") + + return app diff --git a/src/static/stylesheet.css b/src/static/stylesheet.css new file mode 100644 index 0000000000000000000000000000000000000000..8205f01e9ba06f4564874fb93d29cc24852ea0bc --- /dev/null +++ b/src/static/stylesheet.css @@ -0,0 +1,60 @@ +/* + * Simple and minimal css + */ + +body { + margin: 40px auto; + max-width: 800px; + padding: 0 10px; + color: #555; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 110%; + text-rendering: optimizeLegibility; + line-height: 1.6; +} + +a { + color: #3366CC; + border: 1px solid rgba(255, 255, 255, 0); +} + +a:focus { + outline: 0; + color: red; + text-decoration: none; + border: 1px dotted #aaa; +} + +a:hover { + color: #333; + text-decoration: none; +} + +h1 { + font-size: 2.1rem; +} + +h1, h2, h3 { + color: #000; + line-height: 1.2; + font-weight: normal; +} + +h1, h2 { + color: #444 +} + +ul { + margin: 0; + padding: 0; + margin-left: 35px; +} + +li { + margin-bottom: 10px; + line-height: 18px; +} + +li ul { + margin-top: 5px; +} diff --git a/src/templates/index.html b/src/templates/index.html new file mode 100644 index 0000000000000000000000000000000000000000..606c3f0ded031709d3e5364ff38d0e1abe49fd0f --- /dev/null +++ b/src/templates/index.html @@ -0,0 +1,20 @@ +{% extends "layout.html" %} + +{% block body %} +<h1> Bem vindo a feira virtual Bem da Terra! </h1> + +<section> + <p> + Comércio <strong> justo e solidário </strong> + </p> + + <ul> + <li> Trabalho Coletivo </li> + <li> Auto Gestão </li> + <li> Consumo Responsável </li> + </ul> + + <a href="/login">Entrar</a> +</section> + +{% endblock %} diff --git a/src/templates/layout.html b/src/templates/layout.html new file mode 100644 index 0000000000000000000000000000000000000000..843ea3ffb7798dce8c1c902cee21199289a01de4 --- /dev/null +++ b/src/templates/layout.html @@ -0,0 +1,20 @@ +<!doctype html> +<html lang="pt-br"> + <head> + <meta charset="utf-8" /> + {% block title %} + <title>{{ title }}</title> + {% endblock %} + + <link href="/static/stylesheet.css" rel="stylesheet" /> + </head> + + <body> + <div class='container-content'> + {% block body %} + + {% endblock %} + </div> + </body> + +</html>