blob: 8847e893c268711c2d3b3f30c090b12e6b5acf0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
<!--
Same Game - drugie podejście do JSP
data:2024-02-19
IDE: Eclipse
napisał: Przemysłąw R. Pietraszczyk
licencja: GPL3
-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="pl">
<head>
<title>Same Game</title>
<style>
body {
background-color: brown;
}
.about {
padding: 5rem 8rem;
width: 30rem;
height: 10rem;
background-color: green;
}
.play {
padding: 1rem 8rem;
width: 30rem;
height: 10rem;
background-color: blue;
font-size: 5rem;
}
.center {
margin-left: auto;
margin-right: auto;
margin-top: cener;;
margin-bottom: auto;
border-collapse:separate;
border-spacing: 0 1em;
}
.center_img {
margin-left: auto;
margin-right: auto;
margin-top: center;
margin-bottom: 10rem;
border-collapse:separate;
border-spacing: 0 1em;
}
a.button {
padding: 1px 6px;
border: 1px outset buttonborder;
border-radius: 3px;
color: buttontext;
background-color: buttonface;
text-decoration: none;
}
</style>
<script type="text/javascript">
function launchFullScreen(element) {
if(element.requestFullScreen) {
element.requestFullScreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
}
</script>
</head>
<body>
<%
String orient = request.getParameter("data");
if (orient.equals("landscape")) {
out.print("<table class=\"center_img\"><tr>");
out.print("<td><img src=\"img/SameGame.png\" alt=\"Same Game\"></td></tr>");
out.print("</tablae>");
out.print("<table class=\"center\"><tr>");
//out.print("td><button class=\"about\" type=\"button\" onclick=\"location.href='about.jsp?data=landscape'\">O MNIE...</button><td>");
out.print("<td><button class=\"play\" type=\"button\" onclick=\"location.href='display.jsp?data=landscape'\">GRAJ</button><td>");
// przykłąd
// out.print("<td><a href=\"display.jsp?data=landscape\" class=\"button\" onclick=\"launchFullScreen(document.documentElement)\">Play</a></td>");
out.print("</tr></table>");
}
else if (orient.equals("portrait")) {
out.print("<table class=\"center_img\"><tr>");
out.print("<td><img src=\"img/SameGame.png\" alt=\"Same Game\"></td></tr>");
out.print("</tablae>");
out.print("<table class=\"center\"><tr>");
//out.print("<td><button class=\"about\" type=\"button\" onclick=\"location.href='about.jsp?data=portrait'\">O MNIE...</button><td></tr>");
out.print("<td><button class=\"play\" type=\"button\" onclick=\"location.href='display.jsp?data=portrait'\">GRAJ</button><td>");
// przykłąd
// out.print("<td><a href=\"display.jsp?data=portraid\" class=\"button\" onclick=\"launchFullScreen(document.documentElement)\"O mnie...</a></td>");
out.print("</tr></table>");
}
%>
</body>
</html>
|