Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: nicoolas25/gosui
base: 225f84f291
...
head fork: nicoolas25/gosui
compare: a2dedc7cb6
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
31 source/images/gobans/create-sprite.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# create-sprites.sh original 304x437 15x10
+#
+
+cd $1
+
+mkdir sprites
+
+for D in *; do
+ if [ -d "${D}" ]
+ then
+ cp ${D}/*.jpg ./sprites/
+ fi
+done
+
+mkdir sprites/gosu
+mkdir sprites/kamakor
+
+for I in ./sprites/*.jpg; do
+ if [ "$I" \< "./sprites/076.jpg" ]
+ then
+ mv "${I}" ./sprites/gosu/
+ else
+ mv "${I}" ./sprites/kamakor/
+ fi
+done
+
+#echo "montage -resize $1! -geometry $1 -tile $2 ./sprites/*.jpg all.jpg"
+montage -quality 70 -resize $2! -geometry $2 -tile $3 ./sprites/gosu/*.jpg gosu.jpg
+montage -quality 70 -resize $2! -geometry $2 -tile $3 ./sprites/kamakor/*.jpg kamakor.jpg
View
13 source/javascripts/gosui.js.coffee
@@ -37,9 +37,10 @@ $ ->
this
# Preload fullsize image
- preload: ->
- img = $('<img />')
- img.attr('src', @model.getImagePath('original')).load -> img.remove()
+ preload: (cb) ->
+ @preloaded_img = $('<img />')
+ @preloaded_img.attr('src', @model.getImagePath('original'))
+ @preloaded_img.load(cb) if cb?
# Army cards get a popover on them
window.ArmyGobanCardView = GobanCardView.extend
@@ -56,7 +57,11 @@ $ ->
mouseover: 'zoom'
zoom: ->
- @options.deck.$('div.zoom').html("<img src=\"#{@model.getImagePath('original')}\" />")
+ if @preloaded_img?
+ @options.deck.$('div.zoom').html(@preloaded_img)
+ else
+ @preload =>
+ @options.deck.$('div.zoom').html(@preloaded_img)
window.ArmyView = Backbone.View.extend
tagName: 'div'
View
19 source/stylesheets/site.css.scss
@@ -1,20 +1,24 @@
@import "bootstrap.min.css";
+@mixin small-shadow {
+ box-shadow: 3px 3px 3px #888;
+}
+
div.army {
ul.ozekis, ul.heros, ul.bakutos {
list-style: none;
margin: 0;
padding: 0;
- min-height: 102px;
+ min-height: 110px;
li {
margin: 5px;
display: inline-block;
- border: 1px solid black;
height: 100px;
width: 70px;
text-align: center;
font-size: 6pt;
background: url(/images/gobans/small/placeholder.jpg);
+ @include small-shadow;
}
}
}
@@ -30,19 +34,20 @@ div.popover.army-card {
}
div.deck {
+ @include small-shadow;
margin: 5px;
height: 447px;
- max-width: 411px;
+ max-width: 569px;
background: #CCC;
border-radius: 5px;
- box-shadow: 5px 5px 5px #888;
div.zoom {
float: left;
margin: 5px;
+ @include small-shadow;
}
ul.list {
height: 100%;
- width: 97px;
+ width: 255px;
float: left;
overflow: auto;
overflow-x: hidden;
@@ -50,11 +55,11 @@ div.deck {
padding: 0;
list-style: none;
li {
- display: block;
+ display: inline-block;
margin: 5px;
- border: 1px solid black;
height: 100px;
width: 70px;
+ @include small-shadow;
}
}
}

No commit comments for this range

Something went wrong with that request. Please try again.