-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f86558e
commit 92d5dec
Showing
8 changed files
with
290 additions
and
313 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<head> | ||
<title>Pixel Country Picker</title> | ||
<link rel="shortcut icon" href="../images/favicon.jpg" /> | ||
<link rel="stylesheet" type="text/css" href="../index.css" /> | ||
</head> | ||
<body> | ||
<div class="flags"></div> | ||
</body> | ||
<script type="text/javascript" src="../flags.js"></script> | ||
<script type="text/javascript" src="index.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
x = 15; | ||
y = 9; | ||
fi = -1; | ||
flagNodes = document.querySelector('.flags'); | ||
for (i = 0; i < flags.length - 1; i++) { | ||
flagNodes.appendChild(document.createElement('div')).classList.add('flag'); | ||
flagNodes.appendChild(document.createElement('p')).innerHTML=flagnames[i]; | ||
flagNodes.appendChild(document.createElement('br')); | ||
} | ||
let divs = document.querySelectorAll('.flag'); | ||
divs.forEach(n=>{ | ||
fi ++; | ||
for (i = 0; i < x * y; i++) { | ||
s=n.appendChild(document.createElement("span")); | ||
s.classList.add("pixel"); | ||
s.style.background=flags[fi][i]; | ||
} | ||
|
||
}); |