Browse Source

Decoraciones para que quede presentable

politica
Celestino Rey 1 year ago
parent
commit
2d49198433
8 changed files with 22515 additions and 49 deletions
  1. +11
    -2
      Padel/padel/README.md
  2. +0
    -1
      Padel/padel/__init__.py
  3. +22437
    -0
      Padel/padel/static/bulma.css
  4. +42
    -18
      Padel/padel/templates/_navegacion.html
  5. +7
    -9
      Padel/padel/templates/base.html
  6. +14
    -15
      Padel/padel/templates/reservas/eligedia.html
  7. +2
    -2
      Padel/padel/templates/reservas/misreservas.html
  8. +2
    -2
      Padel/padel/templates/reservas/reservar.html

+ 11
- 2
Padel/padel/README.md View File

@ -1,2 +1,11 @@
# fuente
https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login
# fuente para la autenticación
https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login
# y para servir apps con unicorn y nginx
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-22-04
# crear un sitio con flask
https://dev.to/seattledataguy/building-your-first-website-with-flask-part-1-hello-world-and-beyond-53ik

+ 0
- 1
Padel/padel/__init__.py View File

@ -34,7 +34,6 @@ def create_app():
# since the user_id is just the primary key of our user table, use it in the query for the user # since the user_id is just the primary key of our user table, use it in the query for the user
return User.query.get(int(user_id)) return User.query.get(int(user_id))
from . import models from . import models
with app.app_context(): with app.app_context():


+ 22437
- 0
Padel/padel/static/bulma.css
File diff suppressed because it is too large
View File


+ 42
- 18
Padel/padel/templates/_navegacion.html View File

@ -1,13 +1,27 @@
<div class="hero-head">
<nav class="navbar">
<div class="container">
<div id="navbarMenuHeroA" class="navbar-menu">
<div class="navbar-end">
<nav class="navbar is-primary" role="navigation" aria-label="main navigation">
<!--
Aquí podría ir un logo con su botón
-->
<a href="{{ url_for('auth.index') }}" class="navbar-item">Inicio</a>
<a class="navbar-burger" role="button" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
{% if current_user.is_authenticated %}
<!--
<div id="navbarMenuHeroA" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="{{ url_for('auth.index') }}" >
Inicio
</a>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
{% if current_user.is_authenticated %}
<!--
<a href="{{ url_for('paginas.inicio') }}" class="navbar-item"> <a href="{{ url_for('paginas.inicio') }}" class="navbar-item">
Inicio Inicio
</a> </a>
@ -18,17 +32,27 @@
<a href="{{ url_for('reservas.misreservas') }}" class="navbar-item"> <a href="{{ url_for('reservas.misreservas') }}" class="navbar-item">
Mis reservas Mis reservas
</a> </a>
-->
<a href="{{ url_for('reservas.eligedia') }}" class="navbar-item">
Reservar
</a>
<a href="{{ url_for('auth.logout') }}" class="navbar-item">Salir</a>
{% else %}
<a href="{{ url_for('auth.login') }}" class="navbar-item">Entrar</a>
<a href="{{ url_for('auth.signup') }}" class="navbar-item">Registrarse</a>
{% endif %}
-->
<a href="{{ url_for('reservas.eligedia') }}" class="navbar-item">
Reservar
</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
{{ current_user.name }}
</a>
<div class="navbar-dropdown">
<a href="{{ url_for('auth.logout') }}" class="navbar-item">Salir</a>
</div>
</div>
{% else %}
<a href="{{ url_for('auth.login') }}" class="button is-primary">Entrar</a>
<a href="{{ url_for('auth.signup') }}" class="button is-light">Registrarse</a>
{% endif %}
</div>
</div> </div>
</div> </div>
</div> </div>
</nav> </nav>
</div>

+ 7
- 9
Padel/padel/templates/base.html View File

@ -9,25 +9,23 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Reservas de padel - {% block title %}{% endblock title %}</title> <title>Reservas de padel - {% block title %}{% endblock title %}</title>
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">--> <!-- <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">-->
<link rel="stylesheet" href="{{ url_for('static', filename='bulma.css') }}">
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href=""> <link rel="stylesheet" href="">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css" />
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css" />-->
</head> </head>
<body> <body>
<section class="hero is-primary is-fullheight">
<section class="hero is-fullheight">
{% include("_navegacion.html") %} {% include("_navegacion.html") %}
<header> <header>
{% block header %}{% endblock header %} {% block header %}{% endblock header %}
</header> </header>
<div class="hero-body">
<div class="container has-text-centered">
{% block content %}
{% endblock %}
</div>
</div>
<div class="container has-text-centered mt-5">
{% block content %}
{% endblock %}
</div>
<script src="" async defer></script> <script src="" async defer></script>
</section> </section>
</body> </body>

+ 14
- 15
Padel/padel/templates/reservas/eligedia.html View File

@ -1,32 +1,31 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block header %} {% block header %}
<h2>{% block title %}Hacer una nueva reserva{% endblock title %}</h2>
<section class="hero has-text-centered">
<h1 class="subtitle is-2 has-text-centered">
Elegir día para la reserva.
</h1>
</section>
{% endblock header %} {% endblock header %}
{% block content %} {% block content %}
<div>
<fieldset>
<div class="field">
<form action="/eligedia" method="POST"> <form action="/eligedia" method="POST">
<legend>Elige día</legend>
<p class="title is-2">Elige día</p>
<div> <div>
<input type="radio" name="dias" id="hoy" value="{{ hoy }}" checked/>
<label for="hoy">{{ hoy }}</label>
<input class="radio" type="radio" name="dias" id="hoy" value="{{ hoy }}" checked/>
<label class="radio" for="hoy">{{ hoy }}</label>
<input type="radio" name="dias" id="manana" value="{{ manana }}"/>
<label for="manana">{{ manana }}</label>
<input class="radio" type="radio" name="dias" id="manana" value="{{ manana }}"/>
<label class="radio" for="manana">{{ manana }}</label>
<input type="radio" name="dias" id="pasado" value="{{ pasado }}"/>
<label for="pasado">{{ pasado }}</label>
<input class="radio" type="radio" name="dias" id="pasado" value="{{ pasado }}"/>
<label class="radio" for="pasado">{{ pasado }}</label>
</div> </div>
<div> <div>
<button type="submit">Enviar</button>
<button class="button is-primary mt-5" type="submit">Enviar</button>
</div> </div>
</form> </form>
</fieldset>
</div> </div>
{% endblock content %} {% endblock content %}

+ 2
- 2
Padel/padel/templates/reservas/misreservas.html View File

@ -1,7 +1,7 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% block header %} {% block header %}
<section class="hero is-primary has-text-centered">
<section class="hero has-text-centered">
<h1 class="title is-1"> <h1 class="title is-1">
¡Bienvenido, {{ name }}! ¡Bienvenido, {{ name }}!
</h1> </h1>
@ -12,7 +12,7 @@
{% endblock header %} {% endblock header %}
{% block content %} {% block content %}
<table class="table" id="tablareservas" border = 1>
<table class="table is-fullwidth" id="tablareservas" border = 1>
<thead> <thead>
<th id="columnid">ID</th> <th id="columnid">ID</th>
<th id="columnnombre">Nombre</th> <th id="columnnombre">Nombre</th>


+ 2
- 2
Padel/padel/templates/reservas/reservar.html View File

@ -7,12 +7,12 @@
{% endblock header %} {% endblock header %}
{% block content %} {% block content %}
<section class="hero is-primary has-text-centered">
<section class="hero has-text-centered">
<h1 class="subtitle is-2 has-text-centered"> <h1 class="subtitle is-2 has-text-centered">
Estas son las horas disponibles y las ocupadas Estas son las horas disponibles y las ocupadas
</h1> </h1>
</section> </section>
<table class="table" id="tablareservas" border = 1>
<table class="table is-fullwidth mt-5" id="tablareservas" border = 1>
<thead> <thead>
<th id="columnid">ID</th> <th id="columnid">ID</th>
<th id="columnnombre">Nombre</th> <th id="columnnombre">Nombre</th>


Loading…
Cancel
Save