Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
ajout integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodac committed Mar 28, 2018
1 parent aefa57e commit 6317947
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 23 deletions.
64 changes: 64 additions & 0 deletions public/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,60 @@ Lobby
.lobby h1 {
display: inline;
}
/*
Creation partie
*/
.creation h1 {
text-align: center;
}
.creation label{
display: block;
}
.creation form {
width: 425px;
text-align: center;
margin: auto;
border: 1px solid lightgray;
padding: 20px;
box-shadow: 0px 0px 4px black;
}
#partie div {
margin: 25px 10px;
}
.envoiPartie {
height: 50px;
width: 200px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42;
text-align: center;
white-space: nowrap;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
user-select: none;


}

.profil {
text-align: center;
}
.profil .info {
margin-top: 50px;
}

.headerPartie {
height: 40px;
line-height: 0;
}
.partieMain {
overflow: hidden;
}
.onglets {
overflow: hidden;
}
textarea {
border-radius: 10px;

Expand Down Expand Up @@ -596,6 +650,16 @@ body, .text-light-black {
border: none;
border-bottom: 5px solid #2196fe;
}
.red-hover {
transition: all 0.25s ease-in;
border-bottom: 5px solid transparent;
}
.red-hover:hover {
transform: translateY(-5px);

border: none;
border-bottom: 5px solid #ed6a15;
}



Expand Down
10 changes: 5 additions & 5 deletions src/Form/PartieType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)

->add('nom',TextType::class,[
'required' => true,
'label' => 'Votre titre ',
'label' => 'Titre de votre partie ',
'attr' => [
'placeholder' => 'Votre titre'
]
Expand All @@ -38,29 +38,29 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'choice_label' => 'categorielibelle',
'expanded' => false,
'multiple' => false,
'label' => false,
'label' => 'Genre de votre partie',
'attr' => [
'class' => 'form-control'
]
])
->add('description' , TextareaType::class,[
'required' => true,
'label' => 'Votre description :',
'label' => 'Description de votre partie',
'attr' => [
'placeholder' => 'Votre description'
]
])
->add('featuredimage', FileType::class,[
'required' => true,
'label' => 'Votre image',
'label' => 'Image de votre partie',
'attr' => [
'class' => 'image'
]
])
->add('envoi',SubmitType::class, [

'attr'=> [
'class' => 'envoi'
'class' => 'envoiPartie'
]
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20180326183741 extends AbstractMigration
class Version20180328140830 extends AbstractMigration
{
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE actualites (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, titre VARCHAR(255) NOT NULL, chapo VARCHAR(255) NOT NULL, contenu VARCHAR(255) NOT NULL, date DATE NOT NULL, featuredimage VARCHAR(255) NOT NULL, INDEX IDX_75315B6DA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE actualites (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, titre VARCHAR(255) NOT NULL, chapo VARCHAR(255) NOT NULL, contenu VARCHAR(255) NOT NULL, date INT NOT NULL, featuredimage VARCHAR(255) NOT NULL, INDEX IDX_75315B6DA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE categories (id INT AUTO_INCREMENT NOT NULL, categorielibelle VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE chat (id INT AUTO_INCREMENT NOT NULL, partie_id INT DEFAULT NULL, pseudo VARCHAR(255) NOT NULL, message VARCHAR(255) NOT NULL, date INT NOT NULL, UNIQUE INDEX UNIQ_659DF2AAE075F7A4 (partie_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE fiche_personnages (id INT AUTO_INCREMENT NOT NULL, nom VARCHAR(255) NOT NULL, image VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, caracteristique VARCHAR(255) NOT NULL, competence VARCHAR(255) NOT NULL, inventaire VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE parties (id INT AUTO_INCREMENT NOT NULL, categorie_id INT NOT NULL, user_id INT NOT NULL, resume_id INT DEFAULT NULL, nom VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, INDEX IDX_43631805BCF5E72D (categorie_id), INDEX IDX_43631805A76ED395 (user_id), UNIQUE INDEX UNIQ_43631805D262AF09 (resume_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE resume (id INT AUTO_INCREMENT NOT NULL, partie_id INT DEFAULT NULL, titre VARCHAR(255) NOT NULL, contenu VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_60C1D0A0E075F7A4 (partie_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE parties (id INT AUTO_INCREMENT NOT NULL, categorie_id INT NOT NULL, user_id INT NOT NULL, resume_id INT DEFAULT NULL, nom VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, featuredimage VARCHAR(255) NOT NULL, INDEX IDX_43631805BCF5E72D (categorie_id), INDEX IDX_43631805A76ED395 (user_id), UNIQUE INDEX UNIQ_43631805D262AF09 (resume_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE resume (id INT AUTO_INCREMENT NOT NULL, partie_id INT DEFAULT NULL, titre VARCHAR(255) NOT NULL, date INT NOT NULL, contenu VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_60C1D0A0E075F7A4 (partie_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('CREATE TABLE users (id INT AUTO_INCREMENT NOT NULL, login VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE actualites ADD CONSTRAINT FK_75315B6DA76ED395 FOREIGN KEY (user_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE chat ADD CONSTRAINT FK_659DF2AAE075F7A4 FOREIGN KEY (partie_id) REFERENCES parties (id)');
Expand Down
4 changes: 2 additions & 2 deletions templates/Inscription/inscription.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% block body %}
<header class="col-xs-12">
<div>
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo">
</div>
<a href="/">
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo"></a> </div>
<ul>
<li><a href="/inscription">inscription</a></li>
<li> <a href="/connexion">connexion</a></li>
Expand Down
32 changes: 30 additions & 2 deletions templates/Partie/creer_partie.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,41 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

{% endblock %}
</head>
<body>
{% block body %}
<header class="col-xs-12">
<div>
<a href="/">
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo"></a>
</div>
<ul>
<li><a href="/inscription">inscription</a></li>
<li> <a href="/connexion">connexion</a></li>
{% if is_granted('IS_AUTHENTICATED_FULLY') %}


<li><a href="/deconnexion">deconnexion</a></li>
<li><a href="/lobby">Mon lobby</a></li>
</ul>
{% endif %}



</header>
<main class="col-xs-12 creation">

<h1>Créer partie</h1>
{{ form(form) }}

</main>
<footer class="col-xs-12 footerinscription">
<p>Copyright - NFatorySchool - ce site a ete crée dans le cadre d'un exercice </p>
</footer>
{% endblock %}
{% block javascripts %}{% endblock %}
</body>
Expand Down
6 changes: 3 additions & 3 deletions templates/Partie/lobby_partie.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{% block body %}
<header class="col-xs-12">
<div>
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo">
</div>
<a href="/">
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo"></a> </div>
<ul>
{% if not is_granted('IS_AUTHENTICATED_FULLY') %}
<li><a href="/inscription">inscription</a></li>
Expand Down Expand Up @@ -46,7 +46,7 @@



<div class="my-2 mx-auto p-relative bg-white shadow-1 blue-hover col-sm-3" style="width: 360px; overflow: hidden; border-radius: 1px;height: 500px;">
<div class="my-2 mx-auto p-relative bg-white shadow-1 red-hover col-sm-3" style="width: 360px; overflow: hidden; border-radius: 1px;height: 500px;">
<img src="images/{{ partie.featuredimage }}" alt="Man with backpack"
class="d-block w-full">
<img src="{{ partie.featuredimage }}" alt="">
Expand Down
19 changes: 19 additions & 0 deletions templates/Partie/partie.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@
</head>
<body>
{% block body %}
<header class="col-xs-12 headerPartie">

<ul>
{% if not is_granted('IS_AUTHENTICATED_FULLY') %}
<li><a href="/inscription">inscription</a></li>
<li> <a href="/connexion">connexion</a></li>
{% endif %}
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
<li><a href="/">Accueil</a></li>
<li><a href="/deconnexion">deconnexion</a></li>
<li><a href="/lobby">Mon lobby</a></li>
</ul>
{% endif %}



</header>
<main class="col-xs-12 partieMain">
<div class="container-full">
<main class="col-sm-9">
<div class="col-xs-12 plateau" style="background: black; height: 100vh;padding: 0 !important;">
Expand Down Expand Up @@ -81,6 +99,7 @@
</div>
</div>
</div>
</main>
{% endblock %}
{% block javascripts %}
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
Expand Down
49 changes: 45 additions & 4 deletions templates/Profil/profil.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,54 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('assets/css/style.css') }}">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

{% endblock %}
</head>
<body>
{% block body %}
<h1>Profil</h1>
{{ user.login }}<br>
{{ user.email }}
<header class="col-xs-12">
<div>
<a href="/">
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo"></a>
</div>
<ul>
<li><a href="/inscription">inscription</a></li>
<li> <a href="/connexion">connexion</a></li>
{% if is_granted('IS_AUTHENTICATED_FULLY') %}


<li><a href="/deconnexion">deconnexion</a></li>
<li><a href="/lobby">Mon lobby</a></li>
</ul>
{% endif %}



</header>
<main class="col-xs-12 profil">
<div class="container">
<div class="col-sm-9">
<h2>Votre Profil </h2>
<div class="info">
<h4>Votre login : {{ user.login }}</h4>

</div>
<div class="info">
<h4>Votre E-mail : {{ user.email }}</h4>
</div>

</div>
<div class="col-sm-3">

</div>
</div>
</main>
<footer class="col-xs-12 footerinscription">
<p>Copyright - NFatorySchool - ce site a ete crée dans le cadre d'un exercice </p>
</footer>
{% endblock %}
{% block javascripts %}{% endblock %}
</body>
Expand Down
3 changes: 2 additions & 1 deletion templates/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<main class="col-xs-12">
<header class="col-xs-12">
<div>
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo">
<a href="/">
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo"></a>
</div>
<ul>
{% if not is_granted('IS_AUTHENTICATED_FULLY') %}
Expand Down
4 changes: 2 additions & 2 deletions templates/security/connexion.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{% block body %}
<header class="col-xs-12">
<div>
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo">
</div>
<a href="/">
<img src="https://media.discordapp.net/attachments/425285814352609280/427771591800389634/Fichier_4.png" alt="logo"></a> </div>
<ul>
<li><a href="/inscription">inscription</a></li>
<li> <a href="/connexion">connexion</a></li>
Expand Down

0 comments on commit 6317947

Please sign in to comment.