Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from newsguildny/misc-fixes
Browse files Browse the repository at this point in the history
Assets and navigation fixed
  • Loading branch information
jrapala authored Nov 7, 2024
2 parents c0ee858 + dc22376 commit fa03e48
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 40 deletions.
4 changes: 4 additions & 0 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ canvas {
scale: 1;
}

.button:focus-visible {
outline-offset: 2px;
}

.primary-button {
background-color: green;
color: white;
Expand Down
Binary file added src/images/sbs_bus.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 src/images/sbs_bus_reverse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 32 additions & 32 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NY Frogger</title>
<link rel="stylesheet" href="css/style.css">
</head>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NY Frogger</title>
<link rel="stylesheet" href="css/style.css">
</head>

<body>
<div id="instructions" class="modal">
<h1>NYT Striker</h1>
<p>
<body>
<div id="instructions" class="modal">
<h1>NYT Striker</h1>
<p>
Help Scabby get strikers across 8th Avenue to the picket line.
</p>
<div class="image-container">
<img src="images/scabby.png" alt="scabby avatar" height="50px" />
</div>
<p>In addition to vehicles, avoid executives who are trying to intimidate strikers away from the picket line.</p>
<div class="image-container">
<img src="images/cab.png" alt="taxi cab" height="50px" />
<img src="images/exec2.png" alt="executive" height="50px" />
</div>
<p>The game speed increases with each striker you get to the picket line.</p>
<div class="button-container">
<button class="button primary-button" onclick="closeModal()" onkeyup="closeModal()">Start!</button>
</div>
<div class="image-container">
<img src="images/scabby.png" alt="scabby avatar" height="50px"/>
</div>
<p>In addition to vehicles, avoid executives who are trying to intimidate strikers away from the picket line.</p>
<div class="image-container">
<img src="images/cab.png" alt="taxi cab" height="50px"/>
<img src="images/exec2.png" alt="executive" height="50px"/>
</div>
<p>The game speed increases with each striker you get to the picket line.</p>
<div class="button-container">
<button class="button primary-button" onclick="closeModal()">Start!</button>
</div>

</div>
<div class="modal" id="game-over">
<p>Nice job!</p>
<p>Since we have called a strike, we are asking our public supporters to boycott NYT Games as well as the NYT
</div>
<div class="modal" id="game-over">
<p>Nice job!</p>
<p>Since we have called a strike, we are asking our public supporters to boycott NYT Games as well as the NYT
Cooking
App. </p>
<p>The general guidance is “don't cross the picket line - break your streak with us in solidarity.”</p>
<p>Please also
<p>The general guidance is “don't cross the picket line - break your streak with us in solidarity.”</p>
<p>Please also
consider donating to <a target="_blank" rel="noreferrer noopener"
href="https://www.gofundme.com/f/nyt-tech-strike-fund">our strike
solidarity fund</a>.</p>
<div class="button-container">
<button class="button primary-button" onclick="closeModal()" onkeyup="closeModal()">Play Again</button>
<button onclick="hideCallToAction()" onkeyup="hideCallToAction()" class="button link-button">Don't show this
<div class="button-container">
<button class="button primary-button" onclick="closeModal()">Play Again</button>
<button onclick="hideCallToAction()" class="button link-button">Don't show this
message again</button>
</div>
</div>
</div>
</div>
<div class="wrapper">
<canvas id="canvas1"></canvas>
<canvas id="canvas2"></canvas>
Expand Down
11 changes: 3 additions & 8 deletions src/javascript/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ var particlesArray = []
var maxParticles = 300
var ripplesArray = []
var carsArray = []
var logsArray = []
var numberOfCars = 3
var safe = false
var hiddenCallToAction = false
Expand All @@ -44,18 +43,14 @@ const background_lvl2 = createImage('background')

const collision = createImage('collisions')

const turtle = createImage('turtles')
const bus = createImage('sbs_bus')

const bus = createImage('mta_bus')

const bus_reverse = createImage('mta_bus_reverse')
const bus_reverse = createImage('sbs_bus_reverse')

const cab = createImage('cab')

const cab_reverse = createImage('cab_reverse')

const log = createImage('log')

const scabby = createImage('scabby')

const execImages = {
Expand Down Expand Up @@ -85,7 +80,7 @@ class KeyboardHandler {
}

static isDownKey() {
return (keys["ArrowDown"] || keys["W"] || keys["w"]) === true
return (keys["ArrowDown"] || keys["S"] || keys["s"]) === true
}

static isKeyboardKey() {
Expand Down

0 comments on commit fa03e48

Please sign in to comment.