diff options
author | Przemyslaw <prymula76@outlook.com> | 2024-04-18 18:46:24 +0200 |
---|---|---|
committer | Przemyslaw <prymula76@outlook.com> | 2024-04-18 18:46:24 +0200 |
commit | 11818054364b6248be8ff092d2914598f1081dc5 (patch) | |
tree | 361ab82dcba66f79a7cd4f911dc0873a0bf0632a /web/samegame/src/main/webapp/menu.jsp |
Init
Diffstat (limited to 'web/samegame/src/main/webapp/menu.jsp')
-rw-r--r-- | web/samegame/src/main/webapp/menu.jsp | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/web/samegame/src/main/webapp/menu.jsp b/web/samegame/src/main/webapp/menu.jsp new file mode 100644 index 0000000..8847e89 --- /dev/null +++ b/web/samegame/src/main/webapp/menu.jsp @@ -0,0 +1,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>
\ No newline at end of file |