Ajout du service main manquant
|
@ -1 +0,0 @@
|
|||
Subproject commit 6b18b1d67ba1bbce134c827e983974a2ac9430dd
|
5
main/Dockerfiles/app/App/app/.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
12
main/Dockerfiles/app/App/app/.idea/app.iml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
main/Dockerfiles/app/App/app/.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/app.iml" filepath="$PROJECT_DIR$/.idea/app.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
107
main/Dockerfiles/app/App/app/app.py
Normal file
|
@ -0,0 +1,107 @@
|
|||
# app/__init__.py
|
||||
|
||||
from flask import Flask, render_template , request, redirect, url_for, abort
|
||||
from flask_bootstrap import Bootstrap
|
||||
import requests
|
||||
import shutil
|
||||
import os
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
Bootstrap(app)
|
||||
|
||||
|
||||
NB_QUESTIONS = 8 # Number of questions (i.e attributes handle by yolo)
|
||||
|
||||
|
||||
|
||||
@app.route('/', methods=['POST', 'GET'])
|
||||
def homepage():
|
||||
if request.method == "POST":
|
||||
# TO DO
|
||||
# GENERATE GRID
|
||||
r = requests.get('http://127.0.0.1:50001/')
|
||||
filename = r.text
|
||||
shutil.copy('/Datasets/grids/'+filename+'.png', './static/images/'+filename+'.png')
|
||||
#r = requests.get('http://127.0.0.1:50011/create/TEST/')
|
||||
#r = requests.get('http://127.0.0.1:50011/create/'+filename+'/')
|
||||
return redirect(url_for('play',n=1,id=filename))
|
||||
return render_template('homepage.html')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route('/play/<string:id>/<int:n>/', methods=['POST', 'GET'])
|
||||
def play(id="grille",n=1):
|
||||
if (n==1):
|
||||
# Call YOLO
|
||||
r = requests.get('http://127.0.0.1:50015/create/'+id+'/')
|
||||
r = requests.get('http://127.0.0.1:50011/create/'+id+'/')
|
||||
if (n > NB_QUESTIONS or n < 1) :
|
||||
abort(404)
|
||||
|
||||
# TO DO
|
||||
# Get question n from database
|
||||
r = requests.get("http://127.0.0.1:50011/question/"+str(n)).json()
|
||||
q = r["intitule"]
|
||||
attribute = r["attribut"]
|
||||
answers=r["response"].split(";")
|
||||
if request.method == "POST":
|
||||
response=""
|
||||
if 'YES' in request.form: # ON CLICK YES
|
||||
response = "0"
|
||||
elif 'NO' in request.form: # ON CLICK NO
|
||||
response = "1"
|
||||
elif 'STOP' in request.form: # ON CLICK STOP
|
||||
# TO DO
|
||||
# DELETE IMG
|
||||
# parameters : id
|
||||
return redirect(url_for('homepage'))
|
||||
else:
|
||||
for a in answers:
|
||||
if a.upper() in request.form :
|
||||
attribute=a
|
||||
response="0"
|
||||
# TO DO
|
||||
# UPDATE GRID
|
||||
# parameters : attribute , response, id
|
||||
r = requests.get("http://127.0.0.1:50009/update/"+id+"/"+attribute+"/"+response)
|
||||
nb_characters = int(r.text)
|
||||
os.remove('./static/images/'+id+'.png')
|
||||
shutil.copy('/Datasets/grids/'+id+'.png', './static/images/'+id+'.png')
|
||||
if n == NB_QUESTIONS :
|
||||
# EVERY QUESTIONS HAVE BEEN DONE
|
||||
# Prendre un perso au pif ?
|
||||
return redirect(url_for('end',id=id))
|
||||
elif nb_characters == 1 :
|
||||
# OR THE COMPUTER FOUND THE CHARACTER
|
||||
return redirect(url_for('end',id=id))
|
||||
elif nb_characters == 0 :
|
||||
return render_template('lost.html')
|
||||
else:
|
||||
return redirect(url_for('play',n=n+1, id=id))
|
||||
return render_template('play.html', numero = n, question = q, img = id,answers=answers)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route('/end/<string:id>', methods=['POST', 'GET'])
|
||||
def end(id = "grille") :
|
||||
if request.method == "POST":
|
||||
if 'YES' in request.form:
|
||||
# TO DO
|
||||
# GENERATE GRID
|
||||
filename = "grille"
|
||||
return redirect(url_for('play',n=1,id=filename))
|
||||
elif 'NO' in request.form:
|
||||
# TO DO
|
||||
# DELETE IMG
|
||||
# parameters : id
|
||||
return redirect(url_for('homepage'))
|
||||
|
||||
return render_template('end.html',img=id)
|
||||
|
||||
|
||||
|
||||
return app
|
81
main/Dockerfiles/app/App/app/app.py.save
Normal file
|
@ -0,0 +1,81 @@
|
|||
# app/__init__.py
|
||||
|
||||
from flask import Flask, render_template , request, redirect, url_for, abort
|
||||
from flask_bootstrap import Bootstrap
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
Bootstrap(app)
|
||||
|
||||
|
||||
NB_QUESTIONS = 5 # Number of questions (i.e attributes handle by yolo)
|
||||
|
||||
|
||||
|
||||
@app.route('/', methods=['POST', 'GET'])
|
||||
def homepage():
|
||||
if request.method == "POST":
|
||||
# TO DO
|
||||
# GENERATE GRID
|
||||
r = requests.get('127.0.0.1:50001/')filename = r
|
||||
return redirect(url_for('play',n=1,id=filename))
|
||||
return render_template('homepage.html')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route('/play/<string:id>/<int:n>/', methods=['POST', 'GET'])
|
||||
def play(id="grille",n=1):
|
||||
if (n > NB_QUESTIONS or n < 1) :
|
||||
abort(404)
|
||||
# TO DO
|
||||
# Get question n from database
|
||||
q = "Does your character wear a hat ?"
|
||||
attribute = "Hat"
|
||||
if request.method == "POST":
|
||||
if 'YES' in request.form: # ON CLICK YES
|
||||
response = 1
|
||||
elif 'NO' in request.form: # ON CLICK NO
|
||||
response = 0
|
||||
elif 'STOP' in request.form: # ON CLICK STOP
|
||||
# TO DO
|
||||
# DELETE IMG
|
||||
# parameters : id
|
||||
return redirect(url_for('homepage'))
|
||||
# TO DO
|
||||
# UPDATE GRID
|
||||
# parameters : attribute , response, id
|
||||
nb_characters = 2 # TO DO
|
||||
if n == NB_QUESTIONS :
|
||||
# EVERY QUESTIONS HAVE BEEN DONE
|
||||
# Prendre un perso au pif ?
|
||||
return redirect(url_for('end',id=id))
|
||||
elif nb_characters == 1 :
|
||||
# OR THE COMPUTER FOUND THE CHARACTER
|
||||
return redirect(url_for('end',id=id))
|
||||
else:
|
||||
return redirect(url_for('play',n=n+1, id=id))
|
||||
return render_template('play.html', numero = n, question = q, img = id)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route('/end/<string:id>', methods=['POST', 'GET'])
|
||||
def end(id = "grille") :
|
||||
if request.method == "POST":
|
||||
if 'YES' in request.form:
|
||||
# TO DO
|
||||
# GENERATE GRID
|
||||
filename = "grille"
|
||||
return redirect(url_for('play',n=1,id=filename))
|
||||
elif 'NO' in request.form:
|
||||
# TO DO
|
||||
# DELETE IMG
|
||||
# parameters : id
|
||||
return redirect(url_for('homepage'))
|
||||
|
||||
return render_template('end.html',img=id)
|
||||
|
||||
return app
|
165
main/Dockerfiles/app/App/app/static/css/homepage.css
Normal file
|
@ -0,0 +1,165 @@
|
|||
/* BOUTON */
|
||||
/* ----------------------------------------------------------------- */
|
||||
@import url('https://fonts.googleapis.com/css?family=Poppins:900i');
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom : 50px;
|
||||
}
|
||||
|
||||
.cta {
|
||||
display: flex;
|
||||
padding: 10px 45px;
|
||||
text-decoration: none;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-size: 40px;
|
||||
color: white;
|
||||
background: #6225E6;
|
||||
transition: 1s;
|
||||
box-shadow: 6px 6px 0 black;
|
||||
transform: skewX(-15deg);
|
||||
}
|
||||
|
||||
.cta:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cta:hover {
|
||||
transition: 0.5s;
|
||||
box-shadow: 10px 10px 0 #FBC638;
|
||||
}
|
||||
|
||||
.cta span:nth-child(2) {
|
||||
transition: 0.5s;
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.cta:hover span:nth-child(2) {
|
||||
transition: 0.5s;
|
||||
margin-right: 45px;
|
||||
}
|
||||
|
||||
span {
|
||||
transform: skewX(15deg)
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
width: 20px;
|
||||
margin-left: 30px;
|
||||
position: relative;
|
||||
top: 12%;
|
||||
}
|
||||
|
||||
/**************SVG****************/
|
||||
|
||||
path.one {
|
||||
transition: 0.4s;
|
||||
transform: translateX(-60%);
|
||||
}
|
||||
|
||||
path.two {
|
||||
transition: 0.5s;
|
||||
transform: translateX(-30%);
|
||||
}
|
||||
|
||||
.cta:hover path.three {
|
||||
animation: color_anim 1s infinite 0.2s;
|
||||
}
|
||||
|
||||
.cta:hover path.one {
|
||||
transform: translateX(0%);
|
||||
animation: color_anim 1s infinite 0.6s;
|
||||
}
|
||||
|
||||
.cta:hover path.two {
|
||||
transform: translateX(0%);
|
||||
animation: color_anim 1s infinite 0.4s;
|
||||
}
|
||||
|
||||
/* SVG animations */
|
||||
|
||||
@keyframes color_anim {
|
||||
0% {
|
||||
fill: white;
|
||||
}
|
||||
50% {
|
||||
fill: #FBC638;
|
||||
}
|
||||
100% {
|
||||
fill: white;
|
||||
}
|
||||
}
|
||||
/* ----------------------------------------------------------------- */
|
||||
body,h1,h2,h3,h4,h5,h6 {font-family: "Lato", sans-serif;}
|
||||
body, html {
|
||||
height: 100%;
|
||||
color: black;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* Create a Parallax Effect */
|
||||
.bgimg-1, .bgimg-2, .bgimg-3 {
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
/* First image (Logo. Full height) */
|
||||
.bgimg-1 {
|
||||
background-image: url("/static/images/paparazzi.png");
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.w3-wide {letter-spacing: 10px;}
|
||||
.w3-hover-opacity {cursor: pointer;}
|
||||
|
||||
/* Turn off parallax scrolling for tablets and phones */
|
||||
@media only screen and (max-device-width: 1600px) {
|
||||
.bgimg-1, .bgimg-2, .bgimg-3 {
|
||||
background-attachment: scroll;
|
||||
min-height: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
body,h1,h2,h3,h4,h5,h6 {font-family: "Lato", sans-serif;}
|
||||
body, html {
|
||||
height: 100%;
|
||||
color: black;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
/* Create a Parallax Effect */
|
||||
.bgimg-1, .bgimg-2, .bgimg-3 {
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
/* First image (Logo. Full height) */
|
||||
.bgimg-1 {
|
||||
background-image: url("/static/images/paparazzi.png");
|
||||
min-height: 100%;
|
||||
background-size:300px;
|
||||
}
|
||||
|
||||
.w3-wide {letter-spacing: 10px;}
|
||||
.w3-hover-opacity {cursor: pointer;}
|
||||
|
||||
/* Turn off parallax scrolling for tablets and phones */
|
||||
@media only screen and (max-device-width: 1600px) {
|
||||
.bgimg-1, .bgimg-2, .bgimg-3 {
|
||||
background-attachment: scroll;
|
||||
min-height: 400px;
|
||||
margin-top : 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.coloriage{
|
||||
background-color: khaki;
|
||||
}
|
66
main/Dockerfiles/app/App/app/static/css/play.css
Normal file
|
@ -0,0 +1,66 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Patrick+Hand+SC');
|
||||
*{
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
body{
|
||||
font-family: 'Patrick Hand SC', cursive;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.title{
|
||||
text-align:center;
|
||||
color:#41403E;
|
||||
font-size:5rem;
|
||||
font-family: 'Patrick Hand SC', cursive;
|
||||
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
|
||||
box-shadow:2px 8px 4px -6px hsla(0,0%,0%,.3);
|
||||
border:solid 2px #41403E;
|
||||
margin: 20px !important;
|
||||
background-color: khaki;
|
||||
}
|
||||
|
||||
.grid{
|
||||
height: 400px;
|
||||
padding-left: 20px;
|
||||
margin-bottom: 50px;
|
||||
margin-top:50px;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.question{
|
||||
font-family: 'Patrick Hand SC', cursive;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.yes_no{
|
||||
border:dashed 2px #41403E;
|
||||
align-self:center;
|
||||
background:transparent;
|
||||
padding:1rem 1rem;
|
||||
margin:0 1rem;
|
||||
transition:all .5s ease;
|
||||
color:#41403E;
|
||||
font-size:2rem;
|
||||
letter-spacing:1px;
|
||||
outline:none;
|
||||
box-shadow: 20px 38px 34px -26px hsla(0,0%,0%,.2);
|
||||
border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
|
||||
}
|
||||
|
||||
.buttons{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.paparazzi{
|
||||
height: 200px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.center{
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
BIN
main/Dockerfiles/app/App/app/static/images/0OGT77OE.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/1YBGKB4W.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/2RSXZ2IT.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/3EKW3K1A.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/4EVLZIC0.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/7J5E86WI.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/7OXPVDNT.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/BIHYBMDS.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/BYKYLYXYJYDYH.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/D14JMEG4.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/DVORUQMI.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/DVVVYVPVKVMVY.png
Normal file
After Width: | Height: | Size: 484 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/EVGVQVVVNVVVR.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/FUIXIR47.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/JFZFUFPFWFSFO.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/JHRLW7IN.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/JNAQW11Y.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/KN02NRA4.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/OI1PW5Z4.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/PJCJTJNJTJQJJ.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/PXMCEA4U.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/QDADRDCDBDYDJ.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/TEST.png
Executable file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/THJKM4Z5.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/UWKWIWZWLWNWQ.png
Normal file
After Width: | Height: | Size: 271 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/WAYARAVAUANAV.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/WEKQJXVH.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/YWZWLWVWCWYWP.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/Z8EWCF6S.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/ZIND6B2S.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
main/Dockerfiles/app/App/app/static/images/game-over.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/grille.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/paparazzi.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
main/Dockerfiles/app/App/app/static/images/winner.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
3
main/Dockerfiles/app/App/app/templates/base.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{# app/templates/base.html #}
|
||||
{% extends "bootstrap/base.html" %}
|
||||
|
77
main/Dockerfiles/app/App/app/templates/end.html
Normal file
|
@ -0,0 +1,77 @@
|
|||
<!-- app/templates/play.html -->
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/play.css') }}">
|
||||
|
||||
<div class="title">Guess Who </div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p class="question" style="font-size:3rem;" > End ... </p>
|
||||
<p class="question" style="font-size:3rem;" > Is this your character ? </p>
|
||||
<br>
|
||||
<img class="paparazzi center" src="{{url_for('static',filename='images/paparazzi.png')}}" alt="Guess who">
|
||||
<form method = "POST">
|
||||
<div class="buttons">
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="yes_no btn btn-primary" data-toggle="modal" data-target="#LOST">Yes </button>
|
||||
<button type="button" class="yes_no btn btn-primary" data-toggle="modal" data-target="#WIN">No </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<img class="grid center"
|
||||
src="{{url_for('static',filename='images/' + img + '.png')}}"
|
||||
alt="grid">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Win Modal -->
|
||||
<div class="modal fade" id="WIN" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #ffc857;">
|
||||
<h2 class="modal-title" id="WinLabel">End of the game ...</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h3> WINNER </h3>
|
||||
<img class="paparazzi center" src="{{url_for('static',filename='images/winner.png')}}" alt="Winner">
|
||||
<h3> Do you want to play again ? </h3>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<form method="POST">
|
||||
<button type="submit" class="yes_no btn btn-secondary" style="background-color: #5c80bc;" name="YES">Yes</button>
|
||||
<button type="submit" class="yes_no btn btn-secondary" style="background-color: #5c80bc;" name="NO">No</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- LOST Modal -->
|
||||
<div class="modal fade" id="LOST" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #ffc857;">
|
||||
<h2 class="modal-title" id="LostLabel">End of the game ...</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h3> LOSER </h3>
|
||||
<img class="paparazzi center" src="{{url_for('static',filename='images/game-over.png')}}" alt="Loser">
|
||||
<h3> Do you want to play again ? </h3>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<form method="POST">
|
||||
<button type="submit" class="yes_no btn btn-secondary" style="background-color: #5c80bc;" name="YES">Yes</button>
|
||||
<button type="submit" class="yes_no btn btn-secondary" style="background-color: #5c80bc;" name="NO">No</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
125
main/Dockerfiles/app/App/app/templates/homepage.html
Normal file
|
@ -0,0 +1,125 @@
|
|||
<!-- app/templates/homepage.html -->
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}
|
||||
|
||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/homepage.css') }}">
|
||||
|
||||
<!-- Navbar (sit on top) -->
|
||||
<div class="w3-top coloriage">
|
||||
<div class="w3-bar" id="myNavbar">
|
||||
<a class="w3-bar-item w3-button w3-hover-black w3-hide-medium w3-hide-large w3-right" href="javascript:void(0);" onclick="toggleFunction()" title="Toggle Navigation Menu">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
<a href="#home" class="w3-bar-item w3-button">HOME</a>
|
||||
<a href="#about" class="w3-bar-item w3-button w3-hide-small"><i class="fa fa-user"></i> ABOUT</a>
|
||||
</div>
|
||||
|
||||
<!-- Navbar on small screens -->
|
||||
<div id="navDemo" class="w3-bar-block w3-white w3-hide w3-hide-large w3-hide-medium">
|
||||
<a href="#about" class="w3-bar-item w3-button" onclick="toggleFunction()">ABOUT</a>
|
||||
<a href="#portfolio" class="w3-bar-item w3-button" onclick="toggleFunction()">PORTFOLIO</a>
|
||||
<a href="#contact" class="w3-bar-item w3-button" onclick="toggleFunction()">CONTACT</a>
|
||||
<a href="#" class="w3-bar-item w3-button">SEARCH</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- First Parallax Image with Logo Text -->
|
||||
<div class="bgimg-1 w3-display-container w3-opacity-min" id="home">
|
||||
<div class="w3-display-middle" style="white-space:nowrap;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<form method = "POST">
|
||||
<button class="cta">Let's play
|
||||
<span>
|
||||
<svg width="66px" height="43px" viewBox="0 0 66 43" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="arrow" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path class="one" d="M40.1543933,3.89485454 L43.9763149,0.139296592 C44.1708311,-0.0518420739 44.4826329,-0.0518571125 44.6771675,0.139262789 L65.6916134,20.7848311 C66.0855801,21.1718824 66.0911863,21.8050225 65.704135,22.1989893 C65.7000188,22.2031791 65.6958657,22.2073326 65.6916762,22.2114492 L44.677098,42.8607841 C44.4825957,43.0519059 44.1708242,43.0519358 43.9762853,42.8608513 L40.1545186,39.1069479 C39.9575152,38.9134427 39.9546793,38.5968729 40.1481845,38.3998695 C40.1502893,38.3977268 40.1524132,38.395603 40.1545562,38.3934985 L56.9937789,21.8567812 C57.1908028,21.6632968 57.193672,21.3467273 57.0001876,21.1497035 C56.9980647,21.1475418 56.9959223,21.1453995 56.9937605,21.1432767 L40.1545208,4.60825197 C39.9574869,4.41477773 39.9546013,4.09820839 40.1480756,3.90117456 C40.1501626,3.89904911 40.1522686,3.89694235 40.1543933,3.89485454 Z" fill="#FFFFFF"></path>
|
||||
<path class="two" d="M20.1543933,3.89485454 L23.9763149,0.139296592 C24.1708311,-0.0518420739 24.4826329,-0.0518571125 24.6771675,0.139262789 L45.6916134,20.7848311 C46.0855801,21.1718824 46.0911863,21.8050225 45.704135,22.1989893 C45.7000188,22.2031791 45.6958657,22.2073326 45.6916762,22.2114492 L24.677098,42.8607841 C24.4825957,43.0519059 24.1708242,43.0519358 23.9762853,42.8608513 L20.1545186,39.1069479 C19.9575152,38.9134427 19.9546793,38.5968729 20.1481845,38.3998695 C20.1502893,38.3977268 20.1524132,38.395603 20.1545562,38.3934985 L36.9937789,21.8567812 C37.1908028,21.6632968 37.193672,21.3467273 37.0001876,21.1497035 C36.9980647,21.1475418 36.9959223,21.1453995 36.9937605,21.1432767 L20.1545208,4.60825197 C19.9574869,4.41477773 19.9546013,4.09820839 20.1480756,3.90117456 C20.1501626,3.89904911 20.1522686,3.89694235 20.1543933,3.89485454 Z" fill="#FFFFFF"></path>
|
||||
<path class="three" d="M0.154393339,3.89485454 L3.97631488,0.139296592 C4.17083111,-0.0518420739 4.48263286,-0.0518571125 4.67716753,0.139262789 L25.6916134,20.7848311 C26.0855801,21.1718824 26.0911863,21.8050225 25.704135,22.1989893 C25.7000188,22.2031791 25.6958657,22.2073326 25.6916762,22.2114492 L4.67709797,42.8607841 C4.48259567,43.0519059 4.17082418,43.0519358 3.97628526,42.8608513 L0.154518591,39.1069479 C-0.0424848215,38.9134427 -0.0453206733,38.5968729 0.148184538,38.3998695 C0.150289256,38.3977268 0.152413239,38.395603 0.154556228,38.3934985 L16.9937789,21.8567812 C17.1908028,21.6632968 17.193672,21.3467273 17.0001876,21.1497035 C16.9980647,21.1475418 16.9959223,21.1453995 16.9937605,21.1432767 L0.15452076,4.60825197 C-0.0425130651,4.41477773 -0.0453986756,4.09820839 0.148075568,3.90117456 C0.150162624,3.89904911 0.152268631,3.89694235 0.154393339,3.89485454 Z" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Container (About Section) -->
|
||||
<div class = "coloriage">
|
||||
<div class="w3-content w3-container w3-padding-64" id="about">
|
||||
<h3 class="w3-center">ABOUT US</h3>
|
||||
<p class="w3-center"><em> Team Guess Who </em></p>
|
||||
<p>
|
||||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
|
||||
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
|
||||
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
|
||||
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
|
||||
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions
|
||||
of Lorem Ipsum
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w3-row w3-center w3-dark-grey w3-padding-16">
|
||||
<div class="w3-quarter w3-section">
|
||||
<span class="w3-xlarge">270 000 </span><br>
|
||||
Images
|
||||
</div>
|
||||
<div class="w3-quarter w3-section">
|
||||
<span class="w3-xlarge">6</span><br>
|
||||
Classmates
|
||||
</div>
|
||||
<div class="w3-quarter w3-section">
|
||||
<span class="w3-xlarge">3</span><br>
|
||||
Tutors
|
||||
</div>
|
||||
<div class="w3-quarter w3-section">
|
||||
<span class="w3-xlarge">15</span><br>
|
||||
Meetings
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="w3-center w3-padding-64 w3-opacity w3-hover-opacity-off coloriage">
|
||||
<a href="#home" class="w3-button w3-light-grey"><i class="fa fa-arrow-up w3-margin-right"></i>To the top</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<script>
|
||||
// Modal Image Gallery
|
||||
function onClick(element) {
|
||||
document.getElementById("img01").src = element.src;
|
||||
document.getElementById("modal01").style.display = "block";
|
||||
var captionText = document.getElementById("caption");
|
||||
captionText.innerHTML = element.alt;
|
||||
}
|
||||
|
||||
// Change style of navbar on scroll
|
||||
window.onscroll = function() {myFunction()};
|
||||
function myFunction() {
|
||||
var navbar = document.getElementById("myNavbar");
|
||||
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
||||
navbar.className = "w3-bar" + " w3-card" + " w3-animate-top" + " w3-white";
|
||||
} else {
|
||||
navbar.className = navbar.className.replace(" w3-card w3-animate-top w3-white", "");
|
||||
}
|
||||
}
|
||||
|
||||
// Used to toggle the menu on small screens when clicking on the menu button
|
||||
function toggleFunction() {
|
||||
var x = document.getElementById("navDemo");
|
||||
if (x.className.indexOf("w3-show") == -1) {
|
||||
x.className += " w3-show";
|
||||
} else {
|
||||
x.className = x.className.replace(" w3-show", "");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
{% endblock %}
|
37
main/Dockerfiles/app/App/app/templates/lost.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<!-- Win Modal -->
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/play.css') }}">
|
||||
|
||||
<div class="modal fade" id="WIN" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-keyboard="false" data-backdrop="static">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #ffc857;">
|
||||
<h2 class="modal-title" id="WinLabel">End of the game ...</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h3> WINNER </h3>
|
||||
<h4> I was not smart enough, I could not find your character...</h4>
|
||||
<img class="paparazzi center" src="{{url_for('static',filename='images/winner.png')}}" alt="Winner">
|
||||
<h3> Do you want to play again ? </h3>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<form method="POST">
|
||||
<button type="submit" class="yes_no btn btn-secondary" style="background-color: #5c80bc;" name="YES">Yes</button>
|
||||
<button type="submit" class="yes_no btn btn-secondary" style="background-color: #5c80bc;" name="NO">No</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#WIN").modal('show')
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
37
main/Dockerfiles/app/App/app/templates/play.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<!-- app/templates/play.html -->
|
||||
{% extends 'base.html' %}
|
||||
{% block content %}<div class="title">Guess Who </div>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/play.css') }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<img class="grid center"
|
||||
src="{{url_for('static',filename='images/' + img + '.png')}}"
|
||||
alt="grid">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p class="question" style="font-size:3rem;" > Question {{ numero }} : </p>
|
||||
<p class="question" style="font-size:3rem;" > {{ question }} </p>
|
||||
<br>
|
||||
<img class="paparazzi center" src="{{url_for('static',filename='images/paparazzi.png')}}" alt="Guess who">
|
||||
<form method = "POST">
|
||||
<div class="buttons">
|
||||
{% for item in answers %}
|
||||
<button type="submit" class="yes_no btn btn-secondary" name="{{ item | upper }}"> {{item}} </button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="text-center text-lg-start bg-light text-muted" style="padding-top: 10px">
|
||||
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05); padding: 10px">
|
||||
<p class="question" style="font-style: italic"> Bored and you want to stop ? </p>
|
||||
<form method = "POST">
|
||||
<button class="yes_no btn btn-secondary" style="font-size: 1rem;font-style: italic;padding: 5px" type="submit" name="STOP"> Stop </button>
|
||||
</form>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|