Skip to content

Commit

Permalink
weak but something to work with
Browse files Browse the repository at this point in the history
  • Loading branch information
raganwald committed Jun 8, 2010
1 parent e34b437 commit 2a31fe9
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 78 deletions.
9 changes: 4 additions & 5 deletions c/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@
.landscape .foot.toolbar {
display: none; }

.head .message {
.head.bubble {
margin-left: -200px; }

.foot .message {
margin-left: 0; }
.foot .bubble {
.foot.bubble {
margin-left: 0;
/* NOTE: webkit gradient implementation is not as per spec */
background: -webkit-gradient(linear, left top, left bottom, from(#f9d835), to(#f3961c));
background: -moz-linear-gradient(top, #f9d835, #f3961c);
background: -o-linear-gradient(top, #f9d835, #f3961c);
background: linear-gradient(top, #f9d835, #f3961c); }
.foot .bubble:after {
.foot.bubble:after {
top: -30px;
/* value = - border-top-width - border-bottom-width */
right: 50px;
Expand Down
20 changes: 20 additions & 0 deletions c/board.ipad.css
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,23 @@
-webkit-background-size: 100%;
-khtml-background-size: 100%;
-moz-background-size: 100%; }

.board .head .guest {
display: inline;
left: 100%;
margin-left: -100%; }

.landscape .move.play .board .head {
display: none; }
.landscape .move.play .board .foot .black {
display: inline;
float: left;
margin-left: 10px; }
.landscape .move.play .board .foot .black:before {
content: url("../i/simple-black.png"); }
.landscape .move.play .board .foot .white {
display: inline;
float: right;
margin-right: 10px; }
.landscape .move.play .board .foot .white:after {
content: url("../i/simple-white.png"); }
37 changes: 17 additions & 20 deletions c/sass/application.sass
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,24 @@ $messagewidth: 200px
$bubblefrom: #f3961c
$bubbleto: #f9d835

.head
.message
margin-left: -1 * $messagewidth
.head.bubble
margin-left: -1 * $messagewidth

.foot
.message
margin-left: 0
.bubble
/* NOTE: webkit gradient implementation is not as per spec
background: -webkit-gradient(linear, left top, left bottom, from($bubbleto), to($bubblefrom))
background: -moz-linear-gradient(top, $bubbleto, $bubblefrom)
background: -o-linear-gradient(top, $bubbleto, $bubblefrom)
background: linear-gradient(top, $bubbleto, $bubblefrom)
&:after
top: -30px
/* value = - border-top-width - border-bottom-width
right: 50px
/* controls horizontal position
bottom: auto
left: auto
border-color: transparent transparent $bubbleto
.foot.bubble
margin-left: 0
/* NOTE: webkit gradient implementation is not as per spec
background: -webkit-gradient(linear, left top, left bottom, from($bubbleto), to($bubblefrom))
background: -moz-linear-gradient(top, $bubbleto, $bubblefrom)
background: -o-linear-gradient(top, $bubbleto, $bubblefrom)
background: linear-gradient(top, $bubbleto, $bubblefrom)
&:after
top: -30px
/* value = - border-top-width - border-bottom-width
right: 50px
/* controls horizontal position
bottom: auto
left: auto
border-color: transparent transparent $bubbleto

.message
width: $messagewidth
Expand Down
28 changes: 27 additions & 1 deletion c/sass/board.ipad.sass
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,30 @@ $zoom_in_size: $large
-o-background-size: 100%
-webkit-background-size: 100%
-khtml-background-size: 100%
-moz-background-size: 100%
-moz-background-size: 100%

.board
.head
.guest
display: inline
left: 100%
margin-left: -100%

.landscape
.move.play
.board
.head
display: none
.foot
.black
display: inline
float: left
margin-left: 10px
&:before
content: url("../i/simple-black.png")
.white
display: inline
float: right
margin-right: 10px
&:after
content: url("../i/simple-white.png")
4 changes: 3 additions & 1 deletion cache.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CACHE MANIFEST
# This is a comment.
# Cache manifest version 4
# Cache manifest version 5
# If you change the version number in this comment,
# the cache manifest is no longer byte-for-byte
# identical.
Expand Down Expand Up @@ -92,6 +92,8 @@ i/board/temporary/tile0.png
i/ajax-loader-black.gif
i/dot_clear.gif
i/in_progress.gif
i/simple-black.png
i/simple-white.png

i/themes/jqt/img/back_button.png
i/themes/jqt/img/back_button_clicked.png
Expand Down
Binary file removed i/board/bowl/black.jpg
Binary file not shown.
Binary file removed i/board/bowl/white.jpg
Binary file not shown.
Binary file added i/simple-black.png
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 i/simple-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 13 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,21 @@
<style media='screen' type='text/css'>@import "c/application.css";</style>
<style media='screen' type='text/css'>@import "c/board.ipad.css";</style>
<style id='toolbar_titles'></style>
<style id='bubbles'></style>
<script type='text/javascript'>
//<![CDATA[
// (c) 2010 Reg Braithwaite. All rights to the entirety of the program and its parts are reserved with
// the exception of specific files otherwise licensed. Other licenses apply only to the files where
// they appear.
var jQT = new $.jQTouch({
icon: 'i/board/bowl/black.jpg',
icon: 'i/black_white.png',
statusBar: 'black-translucent',
touchSelector: '.board .intersection, .board, .touch'
touchSelector: '.board .intersection, .board, .touch',
preloadImages: [
'i/back_button_clicked.png',
'i/button_clicked.png',
'i/ajax-loader-black.gif'
]
});
$(function(){
jQT.addAnimation({
Expand Down Expand Up @@ -133,16 +139,13 @@ <h1></h1>
</div>
</div>
<div class='board zoomout scrub pass play'>
<div class='head'>
<div class='message'>
<div class='bubble'>Head</div>
</div>
<div class='head bubble'>
<div class='guest'></div>
</div>
<div class='intersections'></div>
<div class='foot'>
<div class='message'>
<div class='bubble'>Foot</div>
</div>
<div class='foot bubble'>
<div class='black'>3</div>
<div class='white host'>5</div>
</div>
</div>
<div class='foot'>
Expand Down
13 changes: 5 additions & 8 deletions index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
%script{:src=>"j/jquery.1.4.2.js", :type=>"text/javascript", :charset=>"utf-8"}
%script{:src=>"j/jquery.timers-1.2.js", :type=>"text/javascript", :charset=>"utf-8"}
%script{:src=>"j/jqtouch.customized.js", :type=>"text/javascript", :charset=>"utf-8"}
%script{:src=>"j/jquery.min.jquery.saveit.js", :type=>"text/javascript", :charset=>"utf-8"}

%script{:src=>"j/md5.js", :type=>"text/javascript", :charset=>"utf-8"}

Expand All @@ -37,7 +36,6 @@
%script{:src=>"j/start.js", :type=>"text/javascript", :charset=>"utf-8"}
%script{:src=>"j/ui.js", :type=>"text/javascript", :charset=>"utf-8"}
%script{:src=>"j/history.js", :type=>"text/javascript", :charset=>"utf-8"}
%script{:src=>"j/tooling.js", :type=>"text/javascript", :charset=>"utf-8"}

%style{:type=>"text/css", :media=>"screen"} @import "c/jqtouch.css";
%style{:type=>"text/css", :media=>"screen"} @import "c/jqtouch.ipad.customized.css";
Expand Down Expand Up @@ -130,13 +128,12 @@
.toolbar
%h1
.board.zoomout.scrub.pass.play
.head
.message
.bubble Head
.head.bubble
.guest
.intersections
.foot
.message
.bubble Foot
.foot.bubble
.black 3
.white.host 5
.foot
.toolbar
%h1
63 changes: 30 additions & 33 deletions j/go.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,39 +96,36 @@
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
]
).join(' '));
$('style#bubbles')
.text([
'.move.re_black,.move.re_white,.move.re_draw .message{ visibility: hidden; }',

'.landscape .move.black:not(.swap):not(re_black):not(re_white):not(re_draw) .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PB.match(/black/i) ? 'Black to play' : go.sgf.game_info.PB + ' to play black') + '"; } ',
'.landscape .move.white:not(.swap) .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play' : go.sgf.game_info.PW + ' to play white') + '"; } ',
'.landscape .move.black.swap .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PB.match(/black/i) ? 'Black to play or swap' : go.sgf.game_info.PB + ' to play black or swap') + '"; } ',
'.landscape .move.white.swap .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
].concat(
go.sgf.game_info.PB == go.sgf.game_info.PH ? [
'.profile .move.black:not(.swap):not(re_black):not(re_white):not(re_draw) .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PB.match(/black/i) ? 'Black to play' : go.sgf.game_info.PB + ' to play black') + '"; } ',
'.profile .move.white:not(.swap) .foot .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play' : go.sgf.game_info.PW + ' to play white') + '"; } ',
'.profile .move.black.swap .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PB.match(/black/i) ? 'Black to play or swap' : go.sgf.game_info.PB + ' to play black or swap') + '"; } ',
'.profile .move.white.swap .foot .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
] : [
'.profile .move.black:not(.swap):not(re_black):not(re_white):not(re_draw) .foot .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PB.match(/black/i) ? 'Black to play' : go.sgf.game_info.PB + ' to play black') + '"; } ',
'.profile .move.white:not(.swap) .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play' : go.sgf.game_info.PW + ' to play white') + '"; } ',
'.profile .move.black.swap .foot .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PB.match(/black/i) ? 'Black to play or swap' : go.sgf.game_info.PB + ' to play black or swap') + '"; } ',
'.profile .move.white.swap .head .toolbar h1:before{ content: "'
+ (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
]
).join(' '));
// $('style#bubbles')
// .text([
// '.landscape .move.play .board .toolbar h1:before{ } ',
// '.landscape .move.white:not(.swap) .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PW.match(/white/i) ? 'White to play' : go.sgf.game_info.PW + ' to play white') + '"; } ',
// '.landscape .move.black.swap .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PB.match(/black/i) ? 'Black to play or swap' : go.sgf.game_info.PB + ' to play black or swap') + '"; } ',
// '.landscape .move.white.swap .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
// ].concat(
// go.sgf.game_info.PB == go.sgf.game_info.PH ? [
// '.profile .move.black:not(.swap):not(re_black):not(re_white):not(re_draw) .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PB.match(/black/i) ? 'Black to play' : go.sgf.game_info.PB + ' to play black') + '"; } ',
// '.profile .move.white:not(.swap) .foot .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PW.match(/white/i) ? 'White to play' : go.sgf.game_info.PW + ' to play white') + '"; } ',
// '.profile .move.black.swap .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PB.match(/black/i) ? 'Black to play or swap' : go.sgf.game_info.PB + ' to play black or swap') + '"; } ',
// '.profile .move.white.swap .foot .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
// ] : [
// '.profile .move.black:not(.swap):not(re_black):not(re_white):not(re_draw) .foot .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PB.match(/black/i) ? 'Black to play' : go.sgf.game_info.PB + ' to play black') + '"; } ',
// '.profile .move.white:not(.swap) .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PW.match(/white/i) ? 'White to play' : go.sgf.game_info.PW + ' to play white') + '"; } ',
// '.profile .move.black.swap .foot .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PB.match(/black/i) ? 'Black to play or swap' : go.sgf.game_info.PB + ' to play black or swap') + '"; } ',
// '.profile .move.white.swap .head .toolbar h1:before{ content: "'
// + (go.sgf.game_info.PW.match(/white/i) ? 'White to play or swap' : go.sgf.game_info.PW + ' to play white or swap') + '"; } '
// ]
// ).join(' '));
};

var predoit = function (board, this_move) {
Expand Down

0 comments on commit 2a31fe9

Please sign in to comment.