Skip to content

Commit 38c10bf

Browse files
committed
increased width, updated time, thestaircase
1 parent 0f8ead9 commit 38c10bf

File tree

14 files changed

+81
-16
lines changed

14 files changed

+81
-16
lines changed

app/assets/javascripts/angular/directives/matches.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,27 @@ gg.directive('matches', ['Match', function(Match) {
4949

5050
// sets location to show the given match very bluntly
5151
$scope.go = function(id) {
52-
window.location = '/matches/' + id;
52+
// window.location = '/matches/' + id;
53+
}
54+
55+
$scope.go_middleclick = function(event, id) {
56+
57+
// var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
58+
59+
switch(event.which) {
60+
case 1:
61+
window.location = '/matches/' + id;
62+
break;
63+
case 2:
64+
// window.name = 'testsk'
65+
//var activeTab = $("[href=" + location.hash + "]");
66+
//localStorage.setItem("lastTab", $(this).attr('href'));
67+
window.open('/matches/' + id, '_blank');
68+
// window.open('', 'testsk').focus();
69+
break;
70+
default:
71+
window.open('/matches/' + id,'_blank');
72+
}
5373
}
5474

5575
// bind our identity bind to urlFilter (uhhh)

app/assets/javascripts/angular/templates/matches/index.jst.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,14 @@
4949
<th class="league">avg league<b class="arrow"></b></th>
5050
<th class="date">played<b class="arrow"></b></th>
5151
</tr>
52-
<tr ng-repeat="match in matches" ng-click="go(match.id)">
53-
<td class="num">
52+
<tr ng-repeat="match in matches" ng-click="go(match.id)" ng-mousedown="go_middleclick($event, match.id)">
53+
<td class="num">
5454
{{ matches.total - (((matches.page-1) * matches.limit) + $index ) }}
5555
<div class="ggtipper2 icon icon-text-16" data-gravity='nw' title="{{match.my_matchnote.note}}" ng-show="match.hasMatchNote()"></div>
5656
</td>
5757
<td class="map nowrap"><a target="_self" href="/matches/{{ match.id }}">{{ match.map_name }}</a></td>
5858
<td class="type">{{ match.game_type }}</td>
59-
<td class="matchup">
60-
{{ match.matchup(identity.id) }}
59+
<td class="matchup"><a target="_self" href="/matches/{{ match.id }}">{{ match.matchup(identity.id) }}
6160
</td>
6261
<td class="team1" ng-bind-html="match.team_names(1).join(', ')"></td>
6362
<td class="team2" ng-bind-html="match.team_names(2).join(', ')"></td>
@@ -85,3 +84,4 @@
8584
</div>
8685
8786
</div>
87+

app/assets/javascripts/jquery/jquery.timeago.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
(function($) {
1717
$.timeago = function(timestamp) {
18+
// console.log('timestamp')
19+
// console.log(timestamp)
1820
if (timestamp instanceof Date) {
1921
return inWords(timestamp);
2022
} else if (typeof timestamp === "string") {
@@ -68,7 +70,7 @@
6870
}
6971

7072
var seconds = Math.abs(distanceMillis) / 1000;
71-
var minutes = seconds / 60;
73+
var minutes = seconds / 60 - 60;
7274
var hours = minutes / 60;
7375
var days = hours / 24;
7476
var years = days / 365;
@@ -100,10 +102,17 @@
100102

101103
function substitute(stringOrFunction, number) {
102104
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
103-
var value = ($l.numbers && $l.numbers[number]) || number;
105+
//console.log(stringOrFunction)
106+
//console.log(number)
107+
var value = ($l.numbers && $l.numbers[number]) || number;
104108
return string.replace(/%d/i, value);
105109
}
106110

111+
112+
//var skminutes = substitute($l.minutes, Math.round(minutes))
113+
//console.log(minutes)
114+
//console.log(skminutes)
115+
107116
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
108117
seconds < 90 && substitute($l.minute, 1) ||
109118
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||

app/assets/stylesheets/controllers/matches.css.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
clear: both;
9191

9292
.canvas {
93-
width: 1024px;
93+
max-width: 1600px;
9494
height: 170px;
9595
}
9696
}

app/assets/stylesheets/controllers/tour.css.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#tour {
22
.content {
33
@include center;
4-
width: 1044px;
4+
max-width: 1600px;
55

66
min-height: 600px;
77
// max-width: 900px;

app/assets/stylesheets/directives/army.css.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
// because we never want it transition inwards to leave the background
214214
// exposed ..
215215
&:nth-last-child(1) {
216-
width: 1024px !important;
216+
max-width: 1600px !important;
217217
}
218218
}
219219

@@ -332,4 +332,4 @@
332332
background: white;
333333
@include border-radius(2px);
334334
}
335-
}
335+
}

app/assets/stylesheets/layout.css.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// A bunch of (temporary?) generic mixins
55
@mixin center {
6-
width: $gg-width;
6+
max-width: $gg-width;
77
margin: 0px auto;
88
}
99

@@ -132,7 +132,7 @@ header {
132132
position: relative;
133133

134134
padding: 0px 0px;
135-
width: $gg-width - 0px * 2;
135+
max-width: $gg-width - 0px * 2;
136136

137137
// Notes about the "centering" going on: the line-height and va:middle
138138
// constructs in header are very ..uncompromising currently. This whole

app/views/home/staircase.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<div id="tour">
77
<div class="content">
88
<div class="boxy">
9-
<p>To see charts and league badges for your Saturation Speed, you can use the training methodology called TheStaircase, which is integrated into GGGReplays. You can read more about TheStaircase <a href="http://www.teamliquid.net/forum/viewmessage.php?topic_id=374400">here</a>. To turn on TheStaircase view, click on the menu in the upper-right hand corner of the window:</p>
9+
<p>To see charts and league badges for your Saturation Speed, you can use the training methodology called TheStaircase, which is integrated into GGGReplays. You can read more about TheStaircase <a target='_blank' href="https://docs.google.com/spreadsheets/d/1ZVfn8u6zYFWcuq6xPb6svABp_Q0hbyvrTrlx9tzr3Vk">here</a>. To turn on TheStaircase view, click on the menu in the upper-right hand corner of the window.</p>
10+
<p>More resources about TheStaircase: <a target='_blank' href="http://liquipedia.net/starcraft2/TheStaircase">On Liquipedia</a>.</p>
1011
</div>
1112
</div>

app/views/home/tour.html.erb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
<meta name="Description" content="Track your Starcraft 2 stats so you can get better faster. Spending Skill, race-specific macro, army composition and more.">
44
<% end %>
55

6+
<style>
7+
body{
8+
margin:1em auto;
9+
//max-width:40em;
10+
padding:0.62em;
11+
}
12+
article {
13+
font:1.05em/1.47 sans-serif;
14+
}
15+
16+
h15,h25,h35 {
17+
line-height:1.2;
18+
}
19+
@media print2{
20+
body{
21+
max-width:none
22+
}
23+
}
24+
</style>
25+
26+
627
<div id="tour">
728
<div class="content">
829
<h1>Play, Share, Learn and Win with the help of Science! <a target="_blank" href="http://reddit.com/r/gggreplays">www.reddit.com/r/gggreplays</a></h1>

app/views/layouts/application.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,10 @@ _\%_____/\%_____/\%_____/\%_/ /\%___fx/\%_____/\__/ /\%_____/\__/ /.com_
162162
</ul>
163163
</li>
164164
<!--li><a class="menu-item" target="_self" href="/tour"><span>tour</span></a></li-->
165-
<li><a class="menu-item" target="_self" href="/staircase"><span>staircase</span></a></li>
165+
<li><a class="menu-item" target="_self" href="/staircase"><span>thestaircase</span></a></li>
166166
<li><a class="menu-item" target="_self" href="/feedback"><span>feedback</span></a></li>
167167
<li><a class="menu-item" target="_self" href="/support"><span>support GGG</span></a></li>
168+
<li><a class="menu-item" target="_blank" href="https://reddit.com/r/gggreplays"><span>reddit</span></a></li>
168169
</ul>
169170
</div>
170171

0 commit comments

Comments
 (0)