Skip to content

Commit

Permalink
#103 removed /#/ in url path 🆖 🚢💨
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcfad committed Jun 22, 2015
1 parent c3a2b58 commit 27f2d76
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 26 deletions.
5 changes: 3 additions & 2 deletions client/public/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

var app = angular.module("pongApp", ["ngRoute", "pongAppControllers", "filters", "tableSort"]);

app.config(["$routeProvider",
function($routeProvider) {
app.config(["$routeProvider", "$locationProvider",
function($routeProvider, $locationProvider) {
$routeProvider
.when("/", {
templateUrl: "partials/dashboard.html",
Expand Down Expand Up @@ -36,6 +36,7 @@ app.config(["$routeProvider",
.otherwise({
redirectTo: "/",
});
$locationProvider.html5Mode(true);
}
])
.factory("socket", function ($rootScope) {
Expand Down
3 changes: 3 additions & 0 deletions client/public/views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<base href="/">

<title>Pong Hacks</title>

<script src="assets/js/libs/angularjs/1.4.0/angular.min.js"></script>
Expand Down
22 changes: 11 additions & 11 deletions client/public/views/partials/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<section class="clearfix wgrid-8of12">
<div class="winner">
<img src="{{mostRecentGame.winnerAvatarUrl}}">
<h4><a class="name-large" href="#/user/{{mostRecentGame.winnerUserId}}">{{mostRecentGame.winnerName | shortFullName}} <span class="star"></span></a></h4>
<h4><a class="name-large" href="user/{{mostRecentGame.winnerUserId}}">{{mostRecentGame.winnerName | shortFullName}} <span class="star"></span></a></h4>
</div>
<div class="time-score">
<p class="time-regular">{{mostRecentGame.date | smartDate}}</p>
<p class="score-large"><span>{{mostRecentGame.winnerScore}}</span> - {{mostRecentGame.loserScore}}</p>
</div>
<div class="loser">
<img src="{{mostRecentGame.loserAvatarUrl}}">
<h4><a class="name-large" href="#/user/{{mostRecentGame.loserUserId}}">{{mostRecentGame.loserName | shortFullName}}</a></h4>
<h4><a class="name-large" href="user/{{mostRecentGame.loserUserId}}">{{mostRecentGame.loserName | shortFullName}}</a></h4>
</div>
</section>
</div>
Expand All @@ -20,24 +20,24 @@ <h4><a class="name-large" href="#/user/{{mostRecentGame.loserUserId}}">{{mostRec
<div class="row">
<section class="section elo-ranking wgrid-3wAny marg-l-0">
<div class="section-header">
<h3>Ranking <a href="#/player-stats"><span class="arrow"></span></a></h3>
<h3>Ranking <a href="player-stats"><span class="arrow"></span></a></h3>
</div>
<ol>
<li ng-repeat="player in eloRanking">
<p><a href="#/user/{{player.userId}}">{{player.name | shortFullName}} <span ng-class="{star:$first}"></span></a></p>
<p><a href="user/{{player.userId}}">{{player.name | shortFullName}} <span ng-class="{star:$first}"></span></a></p>
</li>
</ol>
</section>
<section class="section recent-games wgrid-5wAny marg-r-0">
<div class="section-header">
<h3>Recent Games <a href="#/game-history"><span class="arrow"></span></a></h3>
<h3>Recent Games <a href="game-history"><span class="arrow"></span></a></h3>
</div>
<ul>
<li ng-repeat="game in recentGames">
<div class="recent-game clearfix">
<div class="game-info">
<p class="time-regular">{{game.date | smartDate}}</p>
<p><span class="winner-name"><a href="#/user/{{game.winnerUserId}}">{{game.winnerName | shortFullName}}</a></span> won against <span class="loser-name"><a href="#/user/{{game.loserUserId}}">{{game.loserName | shortFullName}}</a></span></p>
<p><span class="winner-name"><a href="user/{{game.winnerUserId}}">{{game.winnerName | shortFullName}}</a></span> won against <span class="loser-name"><a href="user/{{game.loserUserId}}">{{game.loserName | shortFullName}}</a></span></p>
</div>
<div class="game-score">
<span>{{game.winnerScore}} - {{game.loserScore}}</span>
Expand All @@ -58,7 +58,7 @@ <h3>Recent Games <a href="#/game-history"><span class="arrow"></span></a></h3>
<th class="win-rate">Win Rate</th>
</thead>
<tr ng-repeat="playerStats in weeklyStandings">
<td class="name"><a href="#/user/{{playerStats.userId}}">{{playerStats.name | shortFullName}}</a></td>
<td class="name"><a href="user/{{playerStats.userId}}">{{playerStats.name | shortFullName}}</a></td>
<td class="games">{{playerStats.gameCount}}</td>
<td class="wins">{{playerStats.wins}}</td>
<td class="losses">{{playerStats.losses}}</td>
Expand All @@ -71,15 +71,15 @@ <h3>Recent Games <a href="#/game-history"><span class="arrow"></span></a></h3>
<div class="right-column wgrid-4of12 marg-r-0">
<section class="section random-stats">
<div class="section-header">
<h3>Player Stats <a href="#/player-stats"><span class="arrow"></span></a></h3>
<h3>Player Stats <a href="player-stats"><span class="arrow"></span></a></h3>
</div>
<div class="stat streak win-streak clearfix">
<div class="streak-left">
<span class="arrow"></span>
</div>
<div class="streak-right">
<h4>Longest winning streak</h4>
<p><span>{{winStreak.streak}}</span> <a class="uppercase" href="#/user/{{winStreak.userId}}">{{winStreak.name | shortFullName}}</a></p>
<p><span>{{winStreak.streak}}</span> <a class="uppercase" href="user/{{winStreak.userId}}">{{winStreak.name | shortFullName}}</a></p>
</div>
</div>
<div class="stat streak losing-streak clearfix">
Expand All @@ -88,13 +88,13 @@ <h4>Longest winning streak</h4>
</div>
<div class="streak-right">
<h4>Most consecutive losses</h4>
<p><span>{{losingStreak.streak}}</span> <a class="uppercase" href="#/user/{{losingStreak.userId}}">{{losingStreak.name | shortFullName}}</a></p>
<p><span>{{losingStreak.streak}}</span> <a class="uppercase" href="user/{{losingStreak.userId}}">{{losingStreak.name | shortFullName}}</a></p>
</div>
</div>
<div class="stat sweeping-score">
<h4>Largest sweeping score</h4>
<p class="score"><span class="winner-score">{{sweepingScore.winnerScore}}</span> - {{sweepingScore.loserScore}}</p>
<p class="players"><span class="winner-name"><a href="#/user/{{sweepingScore.winnerUserId}}">{{sweepingScore.winnerName | shortFullName}}</a></span> vs. <span class="loser-score"><a href="#/user/{{sweepingScore.loserUserId}}">{{sweepingScore.loserName | shortFullName}}</a></span></p>
<p class="players"><span class="winner-name"><a href="user/{{sweepingScore.winnerUserId}}">{{sweepingScore.winnerName | shortFullName}}</a></span> vs. <span class="loser-score"><a href="user/{{sweepingScore.loserUserId}}">{{sweepingScore.loserName | shortFullName}}</a></span></p>
</div>
<div class="stat total-games-played">
<h4>Total games played</h4>
Expand Down
4 changes: 2 additions & 2 deletions client/public/views/partials/gameHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>Game History</h2>
</div>
<div class="row winner">
<div class="player-info">
<a href="#/user/{{game.winnerUserId}}"><img ng-src="{{game.winnerAvatarUrl}}" alt="avatar"/><span class="player-name">{{game.winnerName | shortFullName}}</span></a>
<a href="user/{{game.winnerUserId}}"><img ng-src="{{game.winnerAvatarUrl}}" alt="avatar"/><span class="player-name">{{game.winnerName | shortFullName}}</span></a>
<span class="star"></span>
<span class="player-score">
{{game.winnerScore}}
Expand All @@ -19,7 +19,7 @@ <h2>Game History</h2>
</div>
<div class="row loser">
<div class="player-info">
<a href="#/user/{{game.loserUserId}}"><img ng-src="{{game.loserAvatarUrl}}" alt="avatar"/><span class="player-name">{{game.loserName | shortFullName}}</span></a>
<a href="user/{{game.loserUserId}}"><img ng-src="{{game.loserAvatarUrl}}" alt="avatar"/><span class="player-name">{{game.loserName | shortFullName}}</span></a>
<span class="player-score">
{{game.loserScore}}
</span>
Expand Down
10 changes: 5 additions & 5 deletions client/public/views/partials/nav.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<div class="logo wgrid-4of12 wgrid-2of8 marg-l-0 marg-r-0">
<a href="#/"><h1 class="header-logo">Pong Hacks</h1></a>
<a href="/"><h1 class="header-logo">Pong Hacks</h1></a>
</div>
<div class="wgrid-8of12 marg-l-0 marg-r-0">
<ul class="row marg-l-0 marg-r-0">
<li ng-class="{active: isActive('/dashboard') || isActive('/')}"class="wgrid-2w8 marg-lr-0 marg-l-0">
<a class="nav-link dashboard" href="#/dashboard">
<a class="nav-link dashboard" href="dashboard">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Vrstva_2" x="0px" y="0px" viewBox="0 0 792 612" enable-background="new 0 0 792 612" xml:space="preserve"><g><path fill="#231F20" d="M324 174.3c-3.6 0-6.6 3-6.6 6.6s3 6.6 6.6 6.6s6.6-3 6.6-6.6S327.6 174.3 324 174.3z M324 184.8 c-2.2 0-4.1-1.9-4.1-4.1s1.9-4.1 4.1-4.1s4.1 1.9 4.1 4.1S326.2 184.8 324 184.8z"/><path fill="#231F20" d="M345 174.3c-3.6 0-6.6 3-6.6 6.6s3 6.6 6.6 6.6c3.6 0 6.6-3 6.6-6.6S348.6 174.3 345 174.3z M345 184.8 c-2.2 0-4.1-1.9-4.1-4.1s1.9-4.1 4.1-4.1c2.2 0 4.1 1.9 4.1 4.1S347.2 184.8 345 184.8z"/><path fill="#231F20" d="M366.4 187.3c3.6 0 6.6-3 6.6-6.6s-3-6.6-6.6-6.6s-6.6 3-6.6 6.6S362.8 187.3 366.4 187.3z M366.4 176.8 c2.2 0 4.1 1.9 4.1 4.1c0 2.2-1.9 4.1-4.1 4.1s-4.1-1.9-4.1-4.1C362.3 178.7 364.2 176.8 366.4 176.8z"/><path fill="#231F20" d="M323.9 208.2c3.6 0 6.6-3 6.6-6.6c0-3.6-3-6.6-6.6-6.6s-6.6 3-6.6 6.6C317.3 205.3 320.3 208.2 323.9 208.2 z M323.9 197.7c2.2 0 4.1 1.9 4.1 4.1c0 2.2-1.9 4.1-4.1 4.1s-4.1-1.9-4.1-4.1C319.8 199.6 321.6 197.7 323.9 197.7z"/><path fill="#231F20" d="M344.9 208.2c3.6 0 6.6-3 6.6-6.6c0-3.6-3-6.6-6.6-6.6c-3.6 0-6.6 3-6.6 6.6 C338.3 205.3 341.3 208.2 344.9 208.2z M344.9 197.7c2.2 0 4.1 1.9 4.1 4.1c0 2.2-1.9 4.1-4.1 4.1c-2.2 0-4.1-1.9-4.1-4.1 C340.8 199.6 342.7 197.7 344.9 197.7z"/><path fill="#231F20" d="M366.2 208.2c3.6 0 6.6-3 6.6-6.6c0-3.6-3-6.6-6.6-6.6s-6.6 3-6.6 6.6C359.7 205.3 362.6 208.2 366.2 208.2 z M366.2 197.7c2.2 0 4.1 1.9 4.1 4.1c0 2.2-1.9 4.1-4.1 4.1c-2.2 0-4.1-1.9-4.1-4.1C362.1 199.6 363.9 197.7 366.2 197.7z"/><path fill="#231F20" d="M324 215.9c-3.6 0-6.6 3-6.6 6.6c0 3.6 3 6.6 6.6 6.6s6.6-3 6.6-6.6C330.4 218.9 327.6 215.9 324 215.9z M324 226.4c-2.2 0-4.1-1.9-4.1-4.1s1.9-4.1 4.1-4.1s4.1 1.9 4.1 4.1S326.2 226.4 324 226.4z"/><path fill="#231F20" d="M345 215.9c-3.6 0-6.6 3-6.6 6.6c0 3.6 3 6.6 6.6 6.6c3.6 0 6.6-3 6.6-6.6 C351.4 218.9 348.6 215.9 345 215.9z M345 226.4c-2.2 0-4.1-1.9-4.1-4.1s1.9-4.1 4.1-4.1c2.2 0 4.1 1.9 4.1 4.1 S347.2 226.4 345 226.4z"/><path fill="#231F20" d="M366.4 215.9c-3.6 0-6.6 3-6.6 6.6c0 3.6 3 6.6 6.6 6.6s6.6-3 6.6-6.6C372.9 218.9 369.9 215.9 366.4 215.9 z M366.4 226.4c-2.2 0-4.1-1.9-4.1-4.1s1.9-4.1 4.1-4.1s4.1 1.9 4.1 4.1S368.5 226.4 366.4 226.4z"/></g></svg>
<span>Dashboard</span>
</a>
</li>
<li ng-class="{active: isActive('/game-history')}"class="wgrid-2w8 marg-lr-0">
<a class="nav-link game-history" href="#/game-history">
<a class="nav-link game-history" href="game-history">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Isolation_Mode" x="0px" y="0px" viewBox="0 0 792 612" enable-background="new 0 0 792 612" xml:space="preserve"><path fill="#5B5B5B" d="M509.2 421.2c-1.2 0-2.3-0.5-3.2-1.3c-0.8-0.8-1.3-2-1.3-3.2l0-82.5l-20.1-20.1c-1.3-1.3-1.7-3.2-1-4.9 c0.7-1.7 2.3-2.8 4.2-2.8h0l63.8 0c1.7 0 3.2 0.9 4 2.4s0.7 3.2-0.2 4.6l-14.6 22.3l0 81c0 2.5-2 4.5-4.5 4.5L509.2 421.2 L509.2 421.2z M498.7 315.4l13.7 13.7c0.8 0.8 1.3 2 1.3 3.2l0 79.9l18.1 0l0-77.8c0-0.9 0.3-1.7 0.7-2.5l10.8-16.5L498.7 315.4z"/><path fill="#5B5B5B" d="M484.4 311.3c-0.8 0-1.5-0.2-2.2-0.6c-7.1-4.1-13.6-8.9-19.1-14.5c-35.1-35.1-35-92.5 0.4-127.9 c14-14 32.7-23.9 52.3-26.7l0.3 9.9c-17.6 2.6-33.6 10.6-46.2 23.1c-31.9 31.9-32 83.5-0.4 115.1c4.7 4.7 10.1 8.9 16.2 12.4l35.5 0 l0 9L484.4 311.3z"/><path fill="#5B5B5B" d="M560.7 311.3h-39.1v-9h37.9c6.2-3.6 11.8-7.9 16.7-12.8c15.4-15.4 24-35.9 24.1-57.7 c0.1-21.7-8.3-42.1-23.6-57.5c-15.1-15.1-35.4-23.5-57-23.5c-0.9 0-2.8 0-3.7 0l-0.3-9c1 0 3 0 4 0c24 0 46.5 9.3 63.3 26.2 c17 17 26.4 39.7 26.3 63.9c-0.1 24.1-9.6 46.9-26.7 64c-5.8 5.8-12.4 10.8-19.7 14.9C562.3 311.1 561.5 311.3 560.7 311.3z"/><rect x="515.5" y="144" fill="#5B5B5B" width="9" height="165.7"/></svg>
<span>Game History</span>
</a>
</li>
<li ng-class="{active: isActive('/player-stats')}"class="wgrid-2w8 marg-lr-0">
<a class="nav-link player-stats" href="#/player-stats">
<a class="nav-link player-stats" href="player-stats">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Vrstva_2" x="0px" y="0px" viewBox="0 0 792 612" enable-background="new 0 0 792 612" xml:space="preserve"><rect x="263.4" y="275" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 236.423 706.9182)" fill="#231F20" width="2.5" height="58.9"/><rect x="327" y="266.2" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 353.7166 730.985)" fill="#231F20" width="2.5" height="52"/><rect x="279.4" y="296.8" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 297.9211 719.5509)" fill="#231F20" width="37.1" height="2.5"/><circle fill="#231F20" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="284.6" cy="284.8" r="6.7"/><circle fill="#231F20" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="310.6" cy="310.8" r="6.7"/><circle fill="#231F20" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="351.4" cy="270" r="6.7"/><circle fill="#231F20" stroke="#FFFFFF" stroke-width="2" stroke-miterlimit="10" cx="241.3" cy="329.4" r="6.7"/></svg>
<span>Player Stats</span>
</a>
</li>
<li ng-class="{active: isActive('/input-score')}"class="wgrid-2w8 marg-lr-0 marg-r-0">
<a class="nav-link add-game" href="#/input-score">
<a class="nav-link add-game" href="input-score">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Vrstva_2" x="0px" y="0px" viewBox="0 0 640 480" enable-background="new 0 0 640 480" xml:space="preserve"><line fill="none" stroke="#231F20" stroke-width="8" stroke-miterlimit="10" x1="320" y1="207.3" x2="320" y2="272.7"/><line fill="none" stroke="#231F20" stroke-width="8" stroke-miterlimit="10" x1="287.3" y1="240" x2="352.7" y2="240"/></svg>
<span>Add Match</span>
</a>
Expand Down
6 changes: 3 additions & 3 deletions client/public/views/partials/playerStats.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="avatar">
<img ng-src="{{leftCompare.avatarUrl}}" alt="player avatar">
</div>
<p class="name"><a href="#/user/{{leftCompare.id}}">{{leftCompare.name}}</a></p>
<p class="name"><a href="user/{{leftCompare.id}}">{{leftCompare.name}}</a></p>
<p class="player-since">Player Since: {{leftCompare.playerSince | ogDate}}</p>
<p class="player-rank uppercase">RANKING: {{leftCompare.rank}}</p>
</div>
Expand Down Expand Up @@ -40,7 +40,7 @@
<div class="avatar">
<img ng-src="{{rightCompare.avatarUrl}}" alt="player avatar">
</div>
<p class="name"><a href="#/user/{{rightCompare.id}}">{{rightCompare.name}}</a></p>
<p class="name"><a href="user/{{rightCompare.id}}">{{rightCompare.name}}</a></p>
<p class="player-since">Player Since: {{rightCompare.playerSince | ogDate}}</p>
<p class="player-rank uppercase">RANKING: {{rightCompare.rank}}</p>
</div>
Expand Down Expand Up @@ -106,7 +106,7 @@ <h2>All Player Stats</h2>
<tr ng-repeat="player in allPlayerStats | tablesort" ts-repeat>
<td class="name">
<div class="name-bump">
<a href="#/user/{{player.id}}" class="profile-img-name">
<a href="user/{{player.id}}" class="profile-img-name">
<img ng-src="{{player.avatarUrl}}"/>
<span>{{player.name}}</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions client/public/views/partials/profile.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="profile row clearfix" ng-init="init()">
<div class="row">
<div class="back-link wgrid-12of12">
<a class="link" href="#/player-stats">&#8249; Back to <span>All Player Stats</span></a>
<a class="link" href="player-stats">&#8249; Back to <span>All Player Stats</span></a>
</div>
</div>
<div class="row">
Expand Down Expand Up @@ -79,7 +79,7 @@ <h3>Game History</h3>
<div class="recent-game clearfix">
<div class="game-info">
<p>{{game.date | smartDate}}</p>
<p><span class="winner-name"><a href="#/user/{{game.winnerUserId}}">{{game.winnerName | shortFullName}}</a></span> won against <span class="loser-name"><a href="#/user/{{game.loserUserId}}">{{game.loserName | shortFullName}}</a></span></p>
<p><span class="winner-name"><a href="user/{{game.winnerUserId}}">{{game.winnerName | shortFullName}}</a></span> won against <span class="loser-name"><a href="user/{{game.loserUserId}}">{{game.loserName | shortFullName}}</a></span></p>
</div>
<div class="game-score">
<span>{{game.winnerScore}} - {{game.loserScore}}</span>
Expand Down
2 changes: 1 addition & 1 deletion client/public/views/partials/tvNav.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tv-nav logo wgrid-12of12 wgrid-2of8 marg-l-0 marg-r-0">
<div class="img-holder">
<a href="#/"><img src="/assets/img/ponghacks-logo.png"/></a>
<a href="/"><img src="/assets/img/ponghacks-logo.png"/></a>
</div>
</div>

0 comments on commit 27f2d76

Please sign in to comment.