initial commit

This commit is contained in:
Erdei Levente 2022-12-14 11:16:40 +01:00
commit fc4a2b9599
4 changed files with 107 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

25
index.html Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<title>Színházjegyek</title>
</head>
<body>
<div class="container">
<div id='szinhazterem'>
<script src="script.js"></script>
</div>
</div>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
</body>
</html>

26
script.js Normal file
View File

@ -0,0 +1,26 @@
hely = new Array()
for(i = 1; i <= 15; i++)
{
if(i == 1) document.write("<span class='helyar'>7500.- Ft</span>")
if(i == 6) document.write("<span class='helyar'>5900.- Ft</span>")
if(i == 11) document.write("<span class='helyar'>4500.- Ft</span>")
hely[i] = new Array()
document.write("<span class='sorszam'>" + i + ".</span>")
for(j = 1; j <= 24; j++)
{
hely[i][j] = Math.floor((1 - Math.random() * Math.random()) * 2)
if(hely[i][j] == 1)
{
document.write("<span class='szek foglalt' title='hely[" + i + "][" + j + "] = " + hely[i][j] + "'>" + j + "</span>")
}
else
{
document.write("<span class='szek szabad' title='hely[" + i + "][" + j + "] = " + hely[i][j] + "'>" + j + "</span>")
}
}
document.write("<br>")
if(i % 5 == 0) document.write("<hr size=1 color=#880000>")
}

56
style.css Normal file
View File

@ -0,0 +1,56 @@
div#szinhazterem
{
max-width : 620px ;
margin : 0 auto ;
}
span.helyar
{
display : inline-block ;
float : right ;
margin : 40px -24px 0 0 ;
width : 128px ;
height : 60px ;
line-height : 60px ;
background-color : #AAF ;
text-align : center ;
font-size : 16px ;
font-weight : bold ;
transform : rotate(-90deg) ;
}
span.sorszam
{
display : inline-block ;
width : 24px ;
height : 14px ;
margin-right : 8px ;
text-align : right ;
}
span.szek
{
display : inline-block ;
margin : 6px 2px ;
width : 14px ;
height : 14px ;
border-radius : 2px ;
text-align : center ;
line-height : 14px ;
font-size : 9px ;
color : #333 ;
}
span.foglalt
{
border : solid 1px #844 ;
background-color : #FAA ;
color : #600 ;
}
span.szabad
{
border : solid 1px #484 ;
background-color : #8D8 ;
color : #040 ;
}