mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-14 14:22:16 +00:00
start working on adding more game info
This commit is contained in:
parent
e6794d42af
commit
9676819871
4 changed files with 32 additions and 18 deletions
|
@ -1,10 +1,9 @@
|
|||
from flask import Blueprint, render_template, redirect, flash, abort
|
||||
from flask_login import login_user, logout_user, login_required, current_user
|
||||
from flask_login import login_user, logout_user, login_required
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField
|
||||
from wtforms.validators import DataRequired
|
||||
from website.models import Users, Games
|
||||
from website.extensions import db
|
||||
from website.models import Users, Games, Images, Authors, Tags
|
||||
|
||||
|
||||
blueprint = Blueprint("website", __name__)
|
||||
|
@ -36,6 +35,11 @@ def g(game_id):
|
|||
if not game:
|
||||
abort(404)
|
||||
|
||||
# TODO: Add images, authors, and tags to the game page
|
||||
# images = Images.query.filter_by(game_id=game_id).all()
|
||||
# authors = Authors.query.filter_id(game_id=game_id).all()
|
||||
# tags = Tags.query.filter_by(game_id=game_id).all()
|
||||
|
||||
return render_template("game.html", game=game)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
nav
|
||||
padding: 0 0.5rem
|
||||
width: 100%
|
||||
height: 3rem
|
||||
|
||||
display: flex
|
||||
|
@ -54,7 +53,7 @@ nav
|
|||
&:hover
|
||||
color: RGB($accent)
|
||||
|
||||
> .title
|
||||
.title
|
||||
height: 3rem
|
||||
display: flex
|
||||
flex-direction: row
|
||||
|
@ -73,7 +72,7 @@ nav
|
|||
color: RGB($accent)
|
||||
|
||||
&.scrolled
|
||||
> .title
|
||||
.title
|
||||
opacity: 1
|
||||
|
||||
&::before
|
||||
|
@ -84,12 +83,10 @@ nav
|
|||
height: 6rem
|
||||
top: -3rem
|
||||
display: flex
|
||||
flex-direction: column
|
||||
justify-content: center
|
||||
|
||||
transition: top 0.2s ease-in-out
|
||||
|
||||
> .title > p
|
||||
.title > p
|
||||
font-size: 1.3rem
|
||||
|
||||
&.scrolled
|
||||
|
|
|
@ -107,6 +107,7 @@ div.login
|
|||
flex-direction: column
|
||||
|
||||
font-family: $main-font
|
||||
font-size: 1rem
|
||||
|
||||
background-color: RGB($primary)
|
||||
color: RGB($secondary)
|
||||
|
@ -118,11 +119,9 @@ div.login
|
|||
|
||||
> img
|
||||
margin: 0 0 0.5rem
|
||||
width: auto
|
||||
height: 10rem
|
||||
object-fit: cover
|
||||
width: 100%
|
||||
display: block
|
||||
border-radius: calc(#{$radius} - 0.5rem) calc(#{$radius} - 0.5rem) calc(calc(#{$radius} - 0.5rem) / 2) calc(calc(#{$radius} - 0.5rem) / 2)
|
||||
// border-radius: calc(#{$radius} - 0.5rem) calc(#{$radius} - 0.5rem) calc(calc(#{$radius} - 0.5rem) / 2) calc(calc(#{$radius} - 0.5rem) / 2)
|
||||
|
||||
> h2
|
||||
margin: 0 0 0.5rem
|
||||
|
@ -132,7 +131,6 @@ div.login
|
|||
> p
|
||||
height: 100%
|
||||
margin: 0 0 1rem
|
||||
font-size: 1rem
|
||||
|
||||
> .options
|
||||
display: flex
|
||||
|
@ -150,7 +148,6 @@ div.login
|
|||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
font-size: 1rem
|
||||
text-decoration: none
|
||||
|
||||
background-color: RGB($primary-button)
|
||||
|
|
|
@ -9,10 +9,26 @@
|
|||
{% block content %}
|
||||
<header style="height: 40vh">
|
||||
<h1>{{ game.name }}</h1>
|
||||
<p>{{ game.developer }}</p>
|
||||
<p>{% for person in game.autors %}{{ person }}{% if not loop.last %},{% endif %}{% endfor %}</p>
|
||||
</header>
|
||||
|
||||
<section class="fill">
|
||||
<h2>Games</h2>
|
||||
<p>Here are some games AAAA</p>
|
||||
<section class="fill" id="Description">
|
||||
<h2>Description</h2>
|
||||
<p>{{ game.description }}</p>
|
||||
</section>
|
||||
|
||||
<section id="Tags">
|
||||
<ul>
|
||||
{% for tag in game.tags %}
|
||||
<li>{{ tag }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section id="Images">
|
||||
{% for image in game.images %}
|
||||
<img src="{{ url_for('static', filename='images/' + image) }}" alt="{{ image.alt }}">
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endblock %}
|
Loading…
Add table
Reference in a new issue