Commit fdafb062 authored by Abdelmoujib Megzari's avatar Abdelmoujib Megzari
Browse files

Merge remote-tracking branch 'origin/master'

parents d3045d90 9f0d2892
<div class="menu">
<span class="website_Title">
Storytime
<a href="index.jsp">
Storytime
</a>
</span>
<span class="login_out" style="cursor:pointer" onclick="${empty sessionScope.username?"showLogin()":"showSideBar()" }">
<div class="login_logout_btn">
......
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<title>Projet ACOL</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8"/>
<link rel="stylesheet" href="style.css">
<script>var story_id=${story.id};</script>
<script>var story_id =${story.id};</script>
<script src="index.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<%@ include file="menu.jsp" %>
<%@ include file="sideMenu.jsp" %>
<%@ include file="login.jsp" %>
<div style="position: absolute; top: 80px;left:0;width:100%">
<c:if test="${edit}" var="maVariable" scope="request">
<div class="edit_mode" id="switch_mode" style="${published?"display:block;":"display:none"}" onclick="switchMode()"><button>edit_mode</button></div>
</c:if>
<c:if test="${owner}" var="maVariable" scope="request">
<div class="edit_mode" id="publish" onclick="publish(${story.id})"><button>publish</button></div>
<div class="story_title">${empty story? "no title" :story.titre}</div>
<div class="column edit_sideBar">
<c:if test="${edit}" var="maVariable" scope="request">
<div id="switch_mode" class="${published?"edit_mode":"edit_mode_block"}" onclick="switchMode()"><button>edit_mode</button></div>
</c:if>
<c:if test="${owner}" var="maVariable" scope="request">
<div class="edit_mode" id="publish" onclick="publish(${story.id})"><button>publish</button></div>
<c:if test="${!publicStory}" var="maVariable" scope="request">
<input type="text" placeholder="login du nouveau auteur" id="user_to_invite"></form>
<div class="edit_mode" id="invite" onclick="inviteAuthor(${story.id})"><button type="button">inviter auteur</button></div>
<span id="invited">invited
<c:forEach items="${invitedList}" var="invited">
<div>${invited}</div>
</c:forEach>
</span>
</c:if>
</c:if>
<div class="story_title">${empty story? "no title" :story.titre}</div>
<div class="liste_de_paragraphes">
<jsp:include page="/LookupParagraph?paragraph_id=${story.idPremierParagraphe}&storyid=${story.id}&mode=idle" />
<c:if test="${!publicStory}" var="maVariable" scope="request">
<div class="edit_mode edit_mode_authors">
<div>Invite An Author</div>
<input type="text" placeholder="Username of author" id="user_to_invite">
<div id="invite" onclick="inviteAuthor(${story.id})">
<button type="button">Invite</button>
</div>
</div>
<div class="edit_mode_authors" id="invited">Invited Authors
<c:forEach items="${invitedList}" var="invited">
<div>${invited}</div>
</c:forEach>
</div>
</c:if>
</c:if>
</div>
<div class=" column liste_de_paragraphes">
<jsp:include page="/LookupParagraph?paragraph_id=${story.idPremierParagraphe}&storyid=${story.id}&mode=idle" />
</div>
</div>
<script>
var last="${story.idPremierParagraphe}";
<c:forEach items="${history[story.id].paragraphs}" var="paragraph">
choose(last,${paragraph.id},${story.id},"idle");
last=${paragraph.id};
</c:forEach>
var last = "${story.idPremierParagraphe}";
<c:forEach items="${history[story.id].paragraphs}" var="paragraph">
choose(last,${paragraph.id},${story.id}, "idle");
last =${paragraph.id};
</c:forEach>
</script>
<script>
${published?"":"window.onload=switchMode();"}
${published?"":"window.onload=switchMode();"}
</script>
</body>
</html>
</body>
</html>
......@@ -20,6 +20,12 @@
font-family: 'Dela Gothic One', cursive;
padding-left: 200px;
}
.website_Title a{
text-decoration: none;
color: black;
cursor: pointer;
}
.login_out{
/*background-color: #EE9D1B;
color: white;*/
......@@ -200,22 +206,12 @@
outline:none;
}
.story_title{
position: fixed;
top:100px;
width: 100%;
text-align: center;
font-size: xx-large;
font-style: italic;
font-weight: bold;
background-color: red;
text-align: center;
padding: 20px;
margin-top: 20px;
}
.liste_de_paragraphes{
position: relative;
top: 120px;
left:20%;
right: 20%;
width: 60%;
}
.paragraph_contents{
border: 2px solid #5267fa;
background-color: #5267fa;
......@@ -289,3 +285,41 @@
background-color: #203AF7;
box-shadow:none;
}
/*for story.jsp
edit and read mode layout*/
.column{
float:left;
padding: 15px;
}
/*Edit/Read side bar*/
.column.edit_sideBar{
width:20%;
background-color: #5267fa;
margin-top:10px;
height:600px;
}
.edit_mode{
background-color: red;
height:70px;
margin-top: 15px;
margin-bottom:auto;
display:flex;
justify-content: center;
align-items: center;
}
.edit_mode_authors{
background-color: blue;
height: 100px;
}
.edit_mode_block{
display:none;
}
/*The paragraph*/
.column.liste_de_paragraphes{
width:60%;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment