Created
February 16, 2015 16:03
-
-
Save al-the-x/7e50dbf83899428d4c19 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> | |
<link rel="stylesheet" href="css/normalize.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="css/main.css"> | |
<script src="js/vendor/modernizr-2.6.2.min.js"></script> | |
</head> | |
<body> | |
<!--[if lt IE 7]> | |
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | |
<![endif]--> | |
<!-- Add your site or application content here --> | |
<table id="chessboard"> | |
<thead> | |
<td></td> | |
<th v-repeat="file: files" id="header-file{{file}}"> {{file}} </th> | |
</thead> | |
<tbody> | |
<tr v-repeat="rank: ranks"> | |
<th> {{rank}} </th> | |
<td v-repeat="file: files" id="{{file}}{{rank}}"></td> | |
</tr> | |
</tbody> | |
</table> | |
<div class="button-group" id="controls"> | |
<i class="fa fa-angle-double-left fa-lg" onClick="rewind()"></i> | |
<i class="fa fa-angle-left fa-lg" onClick="movePieceBack()"></i> | |
<i class="fa fa-angle-right fa-lg" onClick="movePiece()"></i> | |
<i class="fa fa-angle-double-right fa-lg" onclick="fastForward()"></i> | |
</div><!-- .button-group --> | |
<!--bower:js--> | |
<script src="bower_components/jquery/dist/jquery.js"></script> | |
<script src="bower_components/lodash/lodash.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/0.11.5/vue.js"></script> | |
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> | |
<!--endbower--> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script> | |
<script src="js/plugins.js"></script> | |
<script src="js/main.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */ | |
/* | |
* What follows is the result of much research on cross-browser styling. | |
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, | |
* Kroc Camen, and the H5BP dev community and team. | |
*/ | |
/* ========================================================================== | |
Base styles: opinionated defaults | |
========================================================================== */ | |
html, | |
button, | |
input, | |
select, | |
textarea { | |
color: #222; | |
} | |
html { | |
font-size: 1em; | |
line-height: 1.4; | |
} | |
/* | |
* Remove text-shadow in selection highlight: h5bp.com/i | |
* These selection rule sets have to be separate. | |
* Customize the background color to match your design. | |
*/ | |
::-moz-selection { | |
background: #b3d4fc; | |
text-shadow: none; | |
} | |
::selection { | |
background: #b3d4fc; | |
text-shadow: none; | |
} | |
/* | |
* A better looking default horizontal rule | |
*/ | |
hr { | |
display: block; | |
height: 1px; | |
border: 0; | |
border-top: 1px solid #ccc; | |
margin: 1em 0; | |
padding: 0; | |
} | |
/* | |
* Remove the gap between images, videos, audio and canvas and the bottom of | |
* their containers: h5bp.com/i/440 | |
*/ | |
audio, | |
canvas, | |
img, | |
video { | |
vertical-align: middle; | |
} | |
/* | |
* Remove default fieldset styles. | |
*/ | |
fieldset { | |
border: 0; | |
margin: 0; | |
padding: 0; | |
} | |
/* | |
* Allow only vertical resizing of textareas. | |
*/ | |
textarea { | |
resize: vertical; | |
} | |
/* ========================================================================== | |
Browse Happy prompt | |
========================================================================== */ | |
.browsehappy { | |
margin: 0.2em 0; | |
background: #ccc; | |
color: #000; | |
padding: 0.2em 0; | |
} | |
/* ========================================================================== | |
Author's custom styles | |
========================================================================== */ | |
body { | |
background-color: #aaa; | |
} | |
table { | |
width: 90%; | |
margin: 0 auto; | |
} | |
thead { | |
text-align: right; | |
} | |
thead { | |
text-align: center; | |
} | |
thead tr { | |
padding-left: 10em; | |
} | |
thead th { | |
padding-left: 4%; | |
font-size: 4vw; | |
color: #34495e; | |
} | |
tbody th { | |
font-size: 4vw; | |
color: #34495e; | |
} | |
tbody td { | |
border: 2px solid black; | |
width: 12%; padding-bottom: 12%; height: | |
0; | |
} | |
tbody :nth-child(even) td:nth-child(even), | |
tbody :nth-child(odd) td:nth-child(odd) { | |
background-color: #3775ae; | |
} | |
.button-group { | |
text-align: center; | |
padding: 2em 0; | |
} | |
.fa { | |
color: #4d4d4d; | |
background-color: #fff; | |
border: 1px solid #cecece; | |
padding: .5% .8%; | |
margin-right: 0.2ex; | |
} | |
.fa:hover{ | |
color: #fff; | |
background-color: #3775ae; | |
} | |
/********* adding chess pieces********/ | |
td:before { | |
font-size: 9vw; | |
} | |
/****Black Pieces****/ | |
/*rooks*/ | |
#row8-0:before, #row8-7:before { | |
position: absolute; | |
content: "\265C"; | |
} | |
#row8-0:hover { | |
background-color: #758db0; | |
} | |
/*knights*/ | |
#row8-1:before, #row8-6:before { | |
position: absolute; | |
content: "\265E"; | |
} | |
#row8-1:hover { | |
background-color: #758db0; | |
} | |
/*bishops*/ | |
#row8-2:before,#row8-5:before { | |
position: absolute; | |
content: "\265D"; | |
} | |
#row8-2:hover { | |
background-color: #758db0; | |
} | |
/*queen*/ | |
#row8-3:before { | |
position: absolute; | |
content: "\265B"; | |
} | |
#row8-3:hover { | |
background-color: #758db0; | |
} | |
/*king*/ | |
#row8-4:before { | |
position: absolute; | |
content: "\265A"; | |
} | |
#row8-4:hover { | |
background-color: #758db0; | |
} | |
/*pawns*/ | |
#row7-0:before, #row7-1:before, #row7-2:before, #row7-3:before, #row7-4:before, #row7-5:before, #row7-6:before, #row7-7:before { | |
position: absolute; | |
content: "\265F"; | |
} | |
#row7-0:hover, #row7-1:hover, #row7-2:hover, #row7-3:hover, #row7-4:hover, #row7-5:hover, #row7-6:hover, #row7-7:hover { | |
background-color: #758db0; | |
} | |
/******White Pieces******/ | |
/*rooks*/ | |
#row1-0:before, #row1-7:before { | |
position: absolute; | |
content: "\2656"; | |
} | |
#row1-0:hover, #row1-7:hover{ | |
background-color: #758db0; | |
} | |
/*knights*/ | |
#row1-1:before, #row1-6:before { | |
position: absolute; | |
content: "\2658"; | |
} | |
#row1-1:hover, #row1-6:hover { | |
background-color: #758db0; | |
} | |
/*bishops*/ | |
#row1-2:before, #row1-5:before { | |
position: absolute; | |
content: "\2657"; | |
} | |
#row1-2:hover, #row1-5:hover { | |
background-color: #758db0; | |
} | |
/*queen*/ | |
#row1-3:before { | |
position: absolute; | |
content: "\2655"; | |
} | |
#row1-3:hover { | |
background-color: #758db0; | |
} | |
/*king*/ | |
#row1-4:before { | |
position: absolute; | |
content: "\2654"; | |
} | |
#row1-4:hover { | |
background-color: #758db0; | |
} | |
/*pawns*/ | |
#row2-0:before, #row2-1:before, #row2-2:before, #row2-3:before, #row2-4:before, #row2-5:before, #row2-6:before, #row2-7:before { | |
position: absolute; | |
content: "\2659"; | |
} | |
#row2-0:hover, #row2-1:hover, #row2-2:hover, #row2-3:hover, #row2-4:hover, #row2-5:hover, #row2-6:hover, #row2-7:hover { | |
background-color: #758db0; | |
} | |
/* ========================================================================== | |
Helper classes | |
========================================================================== */ | |
/* | |
* Image replacement | |
*/ | |
.ir { | |
background-color: transparent; | |
border: 0; | |
overflow: hidden; | |
/* IE 6/7 fallback */ | |
*text-indent: -9999px; | |
} | |
.ir:before { | |
content: ""; | |
display: block; | |
width: 0; | |
height: 150%; | |
} | |
/* | |
* Hide from both screenreaders and browsers: h5bp.com/u | |
*/ | |
.hidden { | |
display: none !important; | |
visibility: hidden; | |
} | |
/* | |
* Hide only visually, but have it available for screenreaders: h5bp.com/v | |
*/ | |
.visuallyhidden { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: 1px; | |
margin: -1px; | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
} | |
/* | |
* Extends the .visuallyhidden class to allow the element to be focusable | |
* when navigated to via the keyboard: h5bp.com/p | |
*/ | |
.visuallyhidden.focusable:active, | |
.visuallyhidden.focusable:focus { | |
clip: auto; | |
height: auto; | |
margin: 0; | |
overflow: visible; | |
position: static; | |
width: auto; | |
} | |
/* | |
* Hide visually and from screenreaders, but maintain layout | |
*/ | |
.invisible { | |
visibility: hidden; | |
} | |
/* | |
* Clearfix: contain floats | |
* | |
* For modern browsers | |
* 1. The space content is one way to avoid an Opera bug when the | |
* `contenteditable` attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that receive the `clearfix` class. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. | |
*/ | |
.clearfix:before, | |
.clearfix:after { | |
content: " "; /* 1 */ | |
display: table; /* 2 */ | |
} | |
.clearfix:after { | |
clear: both; | |
} | |
/* | |
* For IE 6/7 only | |
* Include this rule to trigger hasLayout and contain floats. | |
*/ | |
.clearfix { | |
*zoom: 1; | |
} | |
/* ========================================================================== | |
EXAMPLE Media Queries for Responsive Design. | |
These examples override the primary ('mobile first') styles. | |
Modify as content requires. | |
========================================================================== */ | |
@media only screen and (min-width: 35em) { | |
/* Style adjustments for viewports that meet the condition */ | |
} | |
@media print, | |
(-o-min-device-pixel-ratio: 5/4), | |
(-webkit-min-device-pixel-ratio: 1.25), | |
(min-resolution: 120dpi) { | |
/* Style adjustments for high resolution devices */ | |
} | |
/* ========================================================================== | |
Print styles. | |
Inlined to avoid required HTTP connection: h5bp.com/r | |
========================================================================== */ | |
@media print { | |
* { | |
background: transparent !important; | |
color: #000 !important; /* Black prints faster: h5bp.com/s */ | |
box-shadow: none !important; | |
text-shadow: none !important; | |
} | |
a, | |
a:visited { | |
text-decoration: underline; | |
} | |
a[href]:after { | |
content: " (" attr(href) ")"; | |
} | |
abbr[title]:after { | |
content: " (" attr(title) ")"; | |
} | |
/* | |
* Don't show links for images, or javascript/internal links | |
*/ | |
.ir a:after, | |
a[href^="javascript:"]:after, | |
a[href^="#"]:after { | |
content: ""; | |
} | |
pre, | |
blockquote { | |
border: 1px solid #999; | |
page-break-inside: avoid; | |
} | |
thead { | |
display: table-header-group; /* h5bp.com/t */ | |
} | |
tr, | |
img { | |
page-break-inside: avoid; | |
} | |
img { | |
max-width: 100% !important; | |
} | |
@page { | |
margin: 0.5cm; | |
} | |
p, | |
h2, | |
h3 { | |
orphans: 3; | |
widows: 3; | |
} | |
h2, | |
h3 { | |
page-break-after: avoid; | |
} | |
} |
This file contains hidden or 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
var chessboard = new Vue({ | |
el: '#chessboard', | |
data: { | |
files: 'ABCDEFGH', | |
ranks: '87654321', | |
}, | |
}); | |
new Vue({ | |
el: '#controls', | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment