Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popupEnd with Pacman.User().score #2

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 105 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,110 @@

<style type="text/css">
@font-face {
font-family: 'BDCartoonShoutRegular';
font-family: 'BDCartoonShoutRegular';
src: url('BD_Cartoon_Shout-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-weight: normal;
font-style: normal;
}

#pacman {
height:450px;
width:342px;
margin:20px auto;
}

#shim {
font-family: BDCartoonShoutRegular;
position:absolute;
visibility:hidden
}
h1 { font-family: BDCartoonShoutRegular; text-align:center; }
body { width:342px; margin:0px auto; font-family:sans-serif; }
a { text-decoration:none; }

h1 {
font-family: BDCartoonShoutRegular; text-align:center;
}

body {
width:342px; margin:0px auto; font-family:sans-serif;
}

a {
text-decoration:none;
}

.popup, .popupEnd {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #d9d9d9;
padding: 30px;
z-index: 9999;
border-radius: 20px;
}

.popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
padding: 20px;
border: 1px solid #ccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
z-index: 9999;
text-align: center;
}

.close-button {
background-color: #ff0000;
color: #fff;
margin-top: 10px;
padding: 5px 10px;
border: none;
cursor: pointer;
}

.close-button:hover {
background-color: #cc0000;
}
text-align: left;
}

.popupEnd {
text-align: center;
}

#question {
width: 90%;
text-align: left;
color: #ef626c;
}

.popup button, .popupEnd button {
border-radius: 10px;
border: 1px solid #ef626c;
padding: 10px 20px;
background-color: #ef626c;
color: white;
}

.popup button {
display: block;
margin-bottom: 25px;
width: 100%;
text-align: left;
}

.popupEnd p {
width: 100%;
text-align: center;
}

.popupEnd button:hover, .popup button:hover {
transition: 0.2s;
border: 1px solid #ef626c;
background-color: #d9d9d9;
color: #ef626c;
}

#points {
color: #ef626c;
font-size: 20px;
}

hr {
border: 1px solid #ef626c;
}

.close-button {
background-color: #ff0000;
color: #fff;
margin-top: 10px;
padding: 5px 10px;
border: none;
cursor: pointer;
}

.close-button:hover {
background-color: #cc0000;
}


</style>
Expand All @@ -70,12 +129,22 @@ <h1>HTML5 Pacman</h1>

<div id="popup" class="popup">
<h3 id="question">Question: How many points do you want to gain?</h3>
<
<button id="R1" onclick="selectResponse(this)">10 Points</button>
<button id="R2" onclick="selectResponse(this)">20 Points</button>
<button id="R3" onclick="selectResponse(this)">30 Points</button>
<!-- <button class="close-button" onclick="closePopup()">Validate</button> -->
<hr>
<br>
<button id="R1" onclick="selectResponse(10)">10 Points</button>
<button id="R2" onclick="selectResponse(20)">20 Points</button>
<button id="R3" onclick="selectResponse(30)">30 Points</button>

</div>

<div id="popupEnd" class="popupEnd">
<p id="points">Vos points : 600</p>
<hr>
<br>
<button onclick="popupButtonReplay()">Rejouer</button>
<button onclick="popupButtonBack()">Accueil</button>
</div>

<script src="question.js"></script>
<script src="pacman.js"></script>
<script src="modernizr-1.5.min.js"></script>
Expand Down
Loading