diff --git a/CHANGELOG.md b/CHANGELOG.md
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/bdd_proj.sql b/bdd_proj.sql
old mode 100644
new mode 100755
index bd0cd0e..74895f6
--- a/bdd_proj.sql
+++ b/bdd_proj.sql
@@ -11,6 +11,8 @@ CREATE TABLE posts (
title VARCHAR(32),
url VARCHAR(32),
content TEXT,
+ short varchar(256),
+ dt DATETIME DEFAULT CURRENT_TIMESTAMP,
categorie INT,
author INT
);
@@ -33,11 +35,10 @@ CREATE TABLE tag (
CREATE TABLE categories (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- url VARCHAR(32),
name VARCHAR(32)
);
-CREATE TABLE user (
+CREATE TABLE users (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(128),
linkedin VARCHAR(560)
@@ -45,13 +46,47 @@ CREATE TABLE user (
ALTER TABLE post_tag
-ADD FOREIGN KEY (post_id) REFERENCES posts(post_id);
+ADD FOREIGN KEY (post_id) REFERENCES posts(id);
ALTER TABLE post_tag
-ADD FOREIGN KEY (categorie) REFERENCES tag(categorie);
+ADD FOREIGN KEY (categorie) REFERENCES tag(id);
ALTER TABLE posts
-ADD FOREIGN KEY (categorie) REFERENCES categories(id)
+ADD FOREIGN KEY (categorie) REFERENCES categories(id);
ALTER TABLE posts
-ADD FOREIGN KEY (author) REFERENCES users(id)
\ No newline at end of file
+ADD FOREIGN KEY (author) REFERENCES users(id);
+
+
+-- posts
+INSERT INTO posts (title, url, content, short, categorie, author)
+VALUES ('pokemon', 'pokemon', 'cacacacacacacacacacacacaca\r\ncacacacacacacacacacacacaca\r\ncacacacacacacacacacacacaca', 'caca', 1, 2),
+('Pokemon Go', 'pokemon-go', 'I PLAY POKEMON GO EVERYDAY', 'I PLAY POKEMON GO', 2, 1);
+
+-- users
+INSERT INTO users (username, linkedin) VALUES ('Florian Bouillon', NULL), ('Adrien huchet', 'adrienhuchet');
+
+-- categories
+INSERT INTO categories (name) VALUES ('devops'), ('ops'), ('dev'), ('digi');
+
+-- requete 1 :
+-- recuperer 10 posts avec la categorie associé la date du post et les 256 premiers mots du contenu
+
+SELECT title, short, categorie, url FROM posts
+LIMIT 10;
+
+-- requete 2 :
+-- recuperer 1 post son titre, Categories, dates, contenu, nom_auteur, photo_auteur, lien linkedin
+
+SELECT post.title as title, post.categorie as categorie, post.date as date, post.content as content, user.username as author, user.linkedin as linkedin
+FROM post
+INNER JOIN users BY post.author=user.id
+LIMIT 1;
+
+-- requette 3 : comme la 1 sauf uniquement les 6 posts les plus récents
+-- requete lancée lors sur la page d'accueil
+SELECT title, categories.name as categorie, dt as date, short as content
+FROM posts
+INNER JOIN categories ON categories.id=posts.categorie
+ORDER BY date DESC
+LIMIT 6;
diff --git a/idées.md b/idées.md
old mode 100644
new mode 100755
diff --git a/index.html b/index.html
new file mode 100755
index 0000000..fe17661
--- /dev/null
+++ b/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+ Page Title
+
+
+
+
+
+ pouet
+
+
\ No newline at end of file
diff --git a/project/.htaccess b/project/.htaccess
old mode 100644
new mode 100755
index ca51626..e84c0e2
--- a/project/.htaccess
+++ b/project/.htaccess
@@ -36,20 +36,26 @@ Options All -Indexes
# lorsque qu'une url va correspondre a un fichier finissant par .php ou .html on interdit l'acces (retourne une erreur 403 (ensuite geré par notre ligne plus haut))
- Order Allow,Deny
- Deny from all
+ # Order Allow,Deny
+ # Deny from all
+
+ Require all denied
# on donne l'autorisation d'acceder au fichier handler.php (sinon le site ne sera pas foncitonnel)
- Order Allow,Deny
- Allow from all
+ # Order Allow,Deny
+ # Allow from all
+
+ Require all granted
# on donne acces au fichiers webmanifest et svg
- Order Allow,Deny
- Allow from all
+ # Order Allow,Deny
+ # Allow from all
+
+ Require all granted
# si le serveur apache a le module mod_deflate.c
diff --git a/project/assets/css/style.css b/project/assets/css/style.css
old mode 100644
new mode 100755
index 88bd686..4cef3a1
--- a/project/assets/css/style.css
+++ b/project/assets/css/style.css
@@ -63,14 +63,9 @@ h2{
font-weight: 600;
font-size: 17px;
}
-<<<<<<< HEAD
-.test{
- height: 300vh;
-=======
.contenue{
height: 285vh;
->>>>>>> 5029010f15d22427dc323fafc747a1a08afbeb77
}
.articleHome{
margin: auto;
@@ -193,7 +188,7 @@ h2{
.bloc-plus{
margin-top: 40px;
float: right;
- background-color: #190034;;
+ background-color: #190034;
padding: 10px 15px;
color: white;
}
@@ -327,21 +322,44 @@ input {outline: none}
}
.fullFooter{
+ font-family: 'Open Sans', sans-serif;
+ width: 100%;
height: 220px;
- background-color: grey;
+ background-color: #190034;
+ font-weight: bold;
}
-.iconFooter{
+.upFooter{
height: 160px;
- background-color: lightgray;
+ background-color: #42027e;
+ text-align: center;
+}
+.lowFooter{
text-align: center;
}
+.lowFooterItem{
+ font-size:16px;
+ color: white;
+ padding-top:22px;
+ display: inline-block;
+ margin-right:15px;
+}
.iconOnFooter{
- padding-top:125px;
+ padding-top:60px;
display: inline-block;
color: black;
-
}
+
+.pad{
+ padding:0;
+}
+
+.phraseFooter{
+ font-size: 18px;
+ padding-top:10px;
+ color: white;
+}
+
#twi{
height: 18px;
width: 18px;
diff --git a/project/assets/font/blod.otf b/project/assets/font/blod.otf
old mode 100644
new mode 100755
diff --git a/project/assets/font/roman.otf b/project/assets/font/roman.otf
old mode 100644
new mode 100755
diff --git a/project/assets/html/404.html b/project/assets/html/404.html
old mode 100644
new mode 100755
diff --git a/project/assets/html/includes/footer.html b/project/assets/html/includes/footer.html
old mode 100644
new mode 100755
index 37f6149..612f1c1
--- a/project/assets/html/includes/footer.html
+++ b/project/assets/html/includes/footer.html
@@ -1,15 +1,24 @@