Skip to content

Instantly share code, notes, and snippets.

@Kevin-Allain
Created April 7, 2013 19:34
Show Gist options
  • Select an option

  • Save Kevin-Allain/5332131 to your computer and use it in GitHub Desktop.

Select an option

Save Kevin-Allain/5332131 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Page principale</title>
<link href="struct_main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
</head>
<body bgcolor="silver">
<div id="upPart">
<div id="logo">
<img class="logo_img" src="picture.jpg" />
</div>
<div id="zone_recherche">
<br> <br> <br> Search Zone <input type="text"
name="zone de recherche" /> <input type="button" value="Rechercher" />
<br> Friends Only <input type="checkbox" name="checkFriendsOnly" />
</div>
<div id="liens_connexion_deconnexion">
Zone connexion deconnexion enregistrement qui devrait s'adapter selon la connexion <br /> <br />
</div>
<br/><br><br/><br><br/>
<div id="disconnect">
Deconnexion
<input type="submit" value="disconnect" />
</div>
</div>
<br/><br/><br/>
<div id="bigPart">
<div id="zone_statistiques">
<hr />
<br /> <i> Statistiques hyper interessantes: <br> </i> <br>Nobody ever checks
this website. Who cares I'm awesome !
<hr />
</div>
<div id="main">
<h1>The awesome Social Network</h1>
<hr>
<h3>Because being awesome is all that matters</h3>
<form method=get action="javascript:function{}()">
<div id="zone_nouveau_post">
<h5>Zone nouveau post</h5>
<span>
<br> post <input type="text" name="post" /> <br> <br>
<input type="button" value="Post" />
<br/><br/>
</span>
</div>
<div id="liste_posts">
<h3>Liste posts Exemples</h3>
Lucky Luke : Je suis trop rapide <img src="plus.jpg" class="plus_img"> <img
src="minus.png" class="minus_img"> <br> <br>
Flash : C'est moi le plus rapide <img src="plus.jpg" class="plus_img"> <img
src="minus.png" class="minus_img"> <br> <br>
Batman : I'm the best <img src="plus.jpg" class="plus_img"> <img
src="minus.png" class="minus_img"> <br> <br> <br>
<br>
</div>
</form>
</div>
</div>
<script type="text/javascript">
$(main)
</script>
</body>
</html>
function main(){
environnement=new Object();
environnement.users=new Array();
environnement.actif=undefined;
// BUG DANS LA CREATION DU USER
var utilisateur= new User(7,'Yoda','Yoda','Yoda',true);
environnement.actif=utilisateur;
getDivConnexion();
getListe_posts();
}
function User(idUser,login,prenom,nom,contact){
this.idUser=idUser;
this.login=login;
this.contact=contact;
this.prenom=prenom;
this.nom=nom;
if(contact==undefined){
this.contact=false;
}
if(environnement==undefined){
environnement={};
}
if(environnement.users==undefined){
environnement.users=[];
}
// BUG ICI POUR LA CREATION DE L'USER
//environnements.users[id]=this;
}
User.prototype.modifStatus=function(){
if(this.contact){
this.contact=false;
} else {
this.contact=true;
}
}
function Commentaire(idCommentaire,auteur,texte,date,score){
this.idCommentaire=idCommentaire;
this.auteur=auteur;
this.texte=texte;
this.date=date;
this.score=score;
/*
this.getHtml(){
return ("Id : "+this.id+"<br>Auteur : "+this.auteur+"<br>Texte : "+this.texte+"<br>Date : "+this.date+"<br>Score : "+this.score+"<br>"
+ "<img src=\"plus.jpg\" class=\"plus_img\"> <img src=\"minus.png\" class=\"minus_img\"> <br> <br>");
};
*/
}
//Il faut rajouter un test verifiant si le id de la personne connectée est different du id de la personne qui a posté.
//Si c'est le cas alors on ajoute un bouton qui permet de rajouter en ami cette personne.
Commentaire.prototype.getHtml = function() {
return ("Id : "+this.idCommentaire+" <br>Auteur : "+this.auteur+" <br>Texte : "+this.texte+" <br>Date : "+this.date+" <br>Score : "+this.score+" <br>"
+ "<img src=\"plus.jpg\" class=\"plus_img\"> <img src=\"minus.png\" class=\"minus_img\"> <br> <br>");
}
function envoiCommentaires(){
var u1=new User(1,'Joe','Joe','Dalton',false);
var u2=new User(2,'Jack','Jack','Dalton',true);
var c1=new Commentaire(45,u1.idUser,'Je hais Lucky Luke', new Date(), 4);
var c2=new Commentaire(46,u2,'Lucky Luke tire vraiment trop vite', new Date(), 4);
var c3=new Commentaire(47,u1,'Satan
#all{
background-color: white;
}
#upPart{
background-color: white;
border:solid;
border-color:black;
position:relative;
margin-right:150px;
margin-left:5%;
height:205px;
width:1200px;
}
.logo_img{
Background-Color:black;
position: absolute;
border: solid;
border-color:black;
width:200px;
margin-right:80%;
}
#zone_recherche{
background-color: slategrey;
position: absolute;
margin-top: 300 px;
margin-left: 400px;
margin-right:30%;
height:200px;
border:solid;
}
.logo_img{
color:grey;
Background-Color:white;
position: absolute;
border: solid;
width:200px;
margin-right:auto;
}
.skull_img{
width:30px;
border:solid;
border-color:silver;
}
.plus_img{
width:30px;
}
.minus_img{
width:30px;
}
#liens_connexion_deconnexion{
border: solid;
color: black;
border-color:white;
position: absolute;
margin-left: 70%;
margin-right:auto;
text-align:right;
}
#disconnect{
border: solid;
color: black;
border-color:white;
position: absolute;
margin-left: 70%;
margin-right:auto;
text-align:right;
}
#bigPart{
position:absolute;
height:auto;
margin-right:150px;
margin-left:5%;
width:1200px;
}
#zone_statistiques{
background-color:royalblue;
color:white;
position:absolute;
weight:300px;
border:solid;
border-color:black;
text-align:left;
width:300px;
height:1000px;
}
#main{
Background-Color:white;
border:solid;
border-color:black;
position: absolute;
float:right;
margin-left: 300px;
margin-right:auto;
text-align:center;
height:1000px;
width:890px;
}
#zone_nouveau_post{
background-color:red;
border:solid;
border-color:grey;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment