LogoTeamNBA + LogoSIte
7
app.py
|
|
@ -97,6 +97,10 @@ def assignTeam(idUser, idTeam):
|
|||
team.idUser = idUser
|
||||
db.session.commit()
|
||||
|
||||
def get_team_logo(idTeam):
|
||||
# Supposons que les logos sont stockés dans le dossier 'static/logos/' avec des noms comme 'team1.png', 'team2.png', etc.
|
||||
return f"static/logo/team_nba/team_{idTeam}.png"
|
||||
|
||||
def createEvent(summary, start_time, end_time):
|
||||
event = Event()
|
||||
event.add('summary', summary)
|
||||
|
|
@ -133,8 +137,7 @@ def index():
|
|||
if (Team.query.filter_by(idUser=user.id, idTeam=i).first() is None):
|
||||
otherTeams.append(i)
|
||||
|
||||
return render_template('index.html', userTeams=getTeams(user.id), otherTeams=otherTeams, getTeamName=getTeamName)
|
||||
|
||||
return render_template('index.html', userTeams=getTeams(user.id), otherTeams=otherTeams, getTeamName=getTeamName, getTeamLogo=get_team_logo)
|
||||
|
||||
return redirect("/login", code=302)
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 205 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 291 KiB |
|
After Width: | Height: | Size: 201 KiB |
|
After Width: | Height: | Size: 246 KiB |
|
After Width: | Height: | Size: 374 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 259 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 221 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 668 KiB |
|
After Width: | Height: | Size: 293 KiB |
|
|
@ -20,7 +20,7 @@
|
|||
align-items: center;
|
||||
}
|
||||
.logo {
|
||||
width: 150px;
|
||||
width: 250px;
|
||||
height: auto;
|
||||
}
|
||||
.header-links {
|
||||
|
|
@ -37,8 +37,7 @@
|
|||
color: #ffffff;
|
||||
}
|
||||
.container {
|
||||
background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), /* White faded background */
|
||||
linear-gradient(to right, #0C2340, #1D428A, #006BB6); /* Background for the content */
|
||||
background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), grey; /* Background for the content */
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
margin-top: 20px;
|
||||
|
|
@ -47,7 +46,7 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #1D428A;
|
||||
background-color: #343434;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
margin-bottom: 5px;
|
||||
|
|
@ -56,15 +55,20 @@
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.team-logo {
|
||||
width: 75px;
|
||||
height: auto;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.list-group-item.d-none {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<img src="static/logo/nba.png" alt="Logo NBA" class="logo">
|
||||
<img src="static/logo/logo.png" alt="Logo SC" class="logo">
|
||||
<div class="header-links">
|
||||
<a href="">Accueil</a>
|
||||
<a href="/logout">Déconnexion</a>
|
||||
|
|
@ -75,18 +79,18 @@
|
|||
<h1 class="text-center mb-4">Liste d'Équipes</h1>
|
||||
<input type="text" id="searchInput" class="form-control mb-4" placeholder="Rechercher une équipe..." oninput="filterTeams()">
|
||||
<ul id="teamList" class="list-group">
|
||||
|
||||
{% for team in userTeams %}
|
||||
<li class="list-group-item">
|
||||
<img src="{{ getTeamLogo(team.idTeam) }}" alt="Logo de l'équipe" class="team-logo">
|
||||
{{ getTeamName(team.idTeam) }}
|
||||
<div class="button-group">
|
||||
<a class="btn btn-danger" href="/del/{{ team.idTeam }}">Retirer</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% for team in otherTeams %}
|
||||
<li class="list-group-item">
|
||||
<img src="{{ getTeamLogo(team) }}" alt="Logo de l'équipe" class="team-logo">
|
||||
{{ getTeamName(team) }}
|
||||
<div class="button-group">
|
||||
<a class="btn btn-success" href="/add/{{ team }}">Ajouter</a>
|
||||
|
|
|
|||