Skip to content
New issue

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

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

Already on GitHub? # to your account

Batal:Jerald Files #70

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Updated
  • Loading branch information
jerald committed Apr 30, 2021
commit d379e31873e137154a5c4fae095f703643dce2d5
109 changes: 109 additions & 0 deletions batal-jerald/chessboard_flex/chessboard-flex.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Chessboard Flex</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style-flex.css" rel="stylesheet">
</head>
<body>

<h1>Responsive Chessboard (Flex)</div>

<div class="chessboard">

<div class="odd" id="epawn1">♖</div>
<div class="even" id="epawn2">♘</div>
<div class="odd" id="epawn3">♗</div>
<div class="even" id="epawn4">♕</div>
<div class="odd" id="epawn5">♔</div>
<div class="even" id="epawn6">♗</div>
<div class="odd" id="epawn7">♘</div>
<div class="even" id="epawn8">♖</div>

<div class="even" id="epawn9">♙</div>
<div class="odd" id="epawn10">♙</div>
<div class="even" id="epawn11">♙</div>
<div class="odd" id="epawn12">♙</div>
<div class="even" id="epawn13">♙</div>
<div class="odd" id="epawn14">♙</div>
<div class="even" id="epawn15">♙</div>
<div class="odd" id="epawn16">♙</div>

<div class="odd" id="move1"></div>
<div class="even" id="move2"></div>
<div class="odd" id="move3"></div>
<div class="even" id="move4"></div>
<div class="odd" id="move5"></div>
<div class="even" id="move6"></div>
<div class="odd" id="move7"></div>
<div class="even" id="move8"></div>

<div class="even" id="move9"></div>
<div class="odd" id="move10"></div>
<div class="even" id="move11"></div>
<div class="odd" id="move12"></div>
<div class="even" id="move13"></div>
<div class="odd" id="move14"></div>
<div class="even" id="move15"></div>
<div class="odd" id="move16"></div>

<div class="odd" id="move17"></div>
<div class="even" id="move18"></div>
<div class="odd" id="move19"></div>
<div class="even" id="move20"></div>
<div class="odd" id="move21"></div>
<div class="even" id="move22"></div>
<div class="odd" id="move23"></div>
<div class="even" id="move24"></div>

<div class="even" id="move25"></div>
<div class="odd" id="move26"></div>
<div class="even" id="move27"></div>
<div class="odd" id="move28"></div>
<div class="even" id="move29"></div>
<div class="odd" id="move30"></div>
<div class="even" id="move31"></div>
<div class="odd" id="move32"></div>

<div class="odd" id="pawn16">♟</div>
<div class="even" id="pawn15">♟</div>
<div class="odd" id="pawn14">♟</div>
<div class="even" id="pawn13">♟</div>
<div class="odd" id="pawn12">♟</div>
<div class="even" id="pawn11">♟</div>
<div class="odd" id="pawn10">♟</div>
<div class="even" id="pawn9">♟</div>

<div class="even" id="pawn8">♜</div>
<div class="odd" id="pawn7">♞</div>
<div class="even" id="pawn6">♝</div>
<div class="odd" id="pawn5">♛</div>
<div class="even" id="pawn4">♚</div>
<div class="odd" id="pawn3">♝</div>
<div class="even" id="pawn2">♞</div>
<div class="odd" id="pawn1">♜</div>

</div>
</body>

<script>
const chessBoard = document.querySelector('.chessboard')
const move = []
chessBoard.addEventListener('click', (e) => {
const target = e.target
console.log(e)
const textContent = target.textContent
const targetId = target.id
const chessSelectorId = document.querySelector('#'+targetId)
const moveSelectorId = document.querySelector('#'+targetId)
if(textContent !== '') {
chessSelectorId.textContent = ''
move.length = 0
move.push(textContent)
} else {
moveSelectorId.textContent = move[0]
}
})
</script>
</html>
Binary file added batal-jerald/chessboard_flex/images/chess.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added batal-jerald/chessboard_flex/images/chessbg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added batal-jerald/chessboard_flex/images/chesss.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions batal-jerald/chessboard_flex/style-flex.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
* {
margin: 0;
padding: 0;
}

body {
background-image:url(./images/wp2418790-king-and-queen-wallpapers.png) ;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: cover;
text-align: center;
margin-top: 5.1vw;
font-family:'Courier New', Courier, monospace;
color: white;
}
h1 {
font-size: 1.7vw;
}

.chessboard {
display: flex;
flex-wrap: wrap;
width: 30.3vw;
height: 30.3vw;
margin: 3.3vw auto;
border-style: groove;
border-color: #DEB887;
font-size:2.3vw;
}

.chessboard > div {
width:12.5%;
height: 12.5%;
}

.odd {
background:#DEB887;
cursor: pointer;
transition: transform .2s;
}

.even {
background:#CD853F;
cursor: pointer;
}

.chessboard > div:nth-child(n+30):nth-child(-n+64){
color: #222;
}

.chessboard > div:nth-child(n+49):nth-child(-n+64):hover{
background-color: greenyellow;
transform: translateY(-10px);
}

.chessboard > div:nth-child(n+1):nth-child(-n+16):hover {
transform: translateY(10px);
background-color: greenyellow;
}
111 changes: 111 additions & 0 deletions batal-jerald/chessboard_grid/chessboard-grid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<!DOCTYPE html>
<html lang="en">
<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">
<link href="style-grid.css" rel="stylesheet">
<title>Chessboard Grid</title>
</head>
<style>

</style>
<body>
<h1>Responsive Chessboard (Grid)</div>

<div class="chessboard">

<div class="odd" id="epawn1">♖</div>
<div class="even" id="epawn2">♘</div>
<div class="odd" id="epawn3">♗</div>
<div class="even" id="epawn4">♕</div>
<div class="odd" id="epawn5">♔</div>
<div class="even" id="epawn6">♗</div>
<div class="odd" id="epawn7">♘</div>
<div class="even" id="epawn8">♖</div>

<div class="even" id="epawn9">♙</div>
<div class="odd" id="epawn10">♙</div>
<div class="even" id="epawn11">♙</div>
<div class="odd" id="epawn12">♙</div>
<div class="even" id="epawn13">♙</div>
<div class="odd" id="epawn14">♙</div>
<div class="even" id="epawn15">♙</div>
<div class="odd" id="epawn16">♙</div>

<div class="odd" id="move1"></div>
<div class="even" id="move2"></div>
<div class="odd" id="move3"></div>
<div class="even" id="move4"></div>
<div class="odd" id="move5"></div>
<div class="even" id="move6"></div>
<div class="odd" id="move7"></div>
<div class="even" id="move8"></div>

<div class="even" id="move9"></div>
<div class="odd" id="move10"></div>
<div class="even" id="move11"></div>
<div class="odd" id="move12"></div>
<div class="even" id="move13"></div>
<div class="odd" id="move14"></div>
<div class="even" id="move15"></div>
<div class="odd" id="move16"></div>

<div class="odd" id="move17"></div>
<div class="even" id="move18"></div>
<div class="odd" id="move19"></div>
<div class="even" id="move20"></div>
<div class="odd" id="move21"></div>
<div class="even" id="move22"></div>
<div class="odd" id="move23"></div>
<div class="even" id="move24"></div>

<div class="even" id="move25"></div>
<div class="odd" id="move26"></div>
<div class="even" id="move27"></div>
<div class="odd" id="move28"></div>
<div class="even" id="move29"></div>
<div class="odd" id="move30"></div>
<div class="even" id="move31"></div>
<div class="odd" id="move32"></div>

<div class="odd" id="pawn16">♟</div>
<div class="even" id="pawn15">♟</div>
<div class="odd" id="pawn14">♟</div>
<div class="even" id="pawn13">♟</div>
<div class="odd" id="pawn12">♟</div>
<div class="even" id="pawn11">♟</div>
<div class="odd" id="pawn10">♟</div>
<div class="even" id="pawn9">♟</div>

<div class="even" id="pawn8">♜</div>
<div class="odd" id="pawn7">♞</div>
<div class="even" id="pawn6">♝</div>
<div class="odd" id="pawn5">♛</div>
<div class="even" id="pawn4">♚</div>
<div class="odd" id="pawn3">♝</div>
<div class="even" id="pawn2">♞</div>
<div class="odd" id="pawn1">♜</div>

</div>
</body>
<script>
const chessBoard = document.querySelector('.chessboard')
const move = []
chessBoard.addEventListener('click', (e) => {
const target = e.target
console.log(e)
const textContent = target.textContent
const targetId = target.id
const chessSelectorId = document.querySelector('#'+targetId)
const moveSelectorId = document.querySelector('#'+targetId)
if(textContent !== '') {
chessSelectorId.textContent = ''
move.length = 0
move.push(textContent)
} else {
moveSelectorId.textContent = move[0]
}
})
</script>
</html>
Binary file added batal-jerald/chessboard_grid/images/chess.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added batal-jerald/chessboard_grid/images/chessbg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added batal-jerald/chessboard_grid/images/chesss.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions batal-jerald/chessboard_grid/style-grid.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
* {
margin: 0;
padding: 0
}

body {
background-image:url(./images/wp2418790-king-and-queen-wallpapers.png) ;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: cover;
text-align: center;
margin-top: 100px;
font-family:'Courier New', Courier, monospace;
color: white;
}

.chessboard {
display: grid;
grid-template-columns: repeat(8, 12.5%);
grid-template-rows: repeat(8, 12.5%);
font-size: 45px;
max-width:580px;
height: 580px;
margin: 60px auto;
border-style: groove;
border-color: #DEB887;
}

.odd {
position: relative;
background:#DEB887;
cursor: pointer;
transition: transform .2s;
}

.even {
position: relative;
background:#CD853F;
cursor: pointer;
}

.chessboard > div:nth-child(n+33):nth-child(-n+64){
color: #222;
}


.chessboard > div:nth-child(n+49):nth-child(-n+64):hover{
background-color: greenyellow;
transform: translateY(-10px);
}

.chessboard > div:nth-child(n+1):nth-child(-n+16):hover {
transform: translateY(10px);
background-color: greenyellow;
}
4 changes: 2 additions & 2 deletions batal-jerald/tribute_page/index.html
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
<title>Tribute Page</title>
</head>
<body>

<div id="main">
<nav>
<input type="checkbox" id="check">
@@ -25,7 +25,7 @@
<div class="line"></div>
<div class="line"></div>
</label>
</nav>
</nav>

<div id="image-div">
<div class="lds-hourglass"></div>
2 changes: 2 additions & 0 deletions batal-jerald/tribute_page/style.css
Original file line number Diff line number Diff line change
@@ -114,6 +114,8 @@ nav ul {
display: flex;
align-items: center;
justify-content: space-around;
display: none;

}

nav a {