Skip to content

Commit

Permalink
deploy: 0ce6805
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasRamos5 committed Jun 15, 2023
1 parent d2a26ee commit 5fe1ad3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
10 changes: 5 additions & 5 deletions assets/css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/search-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"post0": {
"title": "Mario",
"content": "%%html <style> body { margin: 0; # background-color: #c0fdfb; display: flex; align-items: center; justify-content: center; height: 100vh } </style> <canvas></canvas> . %%javascript const canvas = document.querySelector('canvas'); const c = canvas.getContext('2d'); canvas.width = 600; canvas.height = 576; let gravity = 2; class Player { constructor() { this.speed = 10; this.position = { x: 100, y: canvas.height - 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; this.color = 'red'; } draw() { c.fillStyle = this.color; c.fillRect( this.position.x, this.position.y, this.width, this.height ); } update() { this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height >= canvas.height) { this.position.y = canvas.height - this.height; this.velocity.y = 0; } else if (this.position.y <= 0) { this.position.y = 0; this.velocity.y = 0; } if (this.position.x + this.width >= canvas.width) { this.position.x = canvas.width - this.width; this.velocity.x = 0; } else if (this.position.x <= 0) { this.position.x = 0; this.velocity.x = 0; } if (this.position.y + this.height < canvas.height) { this.velocity.y += gravity; } this.draw(); } } let player = new Player(); function animate() { requestAnimationFrame(animate); c.clearRect(0, 0, canvas.width, canvas.height); player.update(); } animate(); function handleKeyDown(event) { if (event.key === 'w' || event.key === 'W') { player.velocity.y = -30; } else if (event.key === 's' || event.key === 'S') { player.velocity.y = player.speed; } else if (event.key === 'ArrowLeft') { player.velocity.x = -player.speed; } else if (event.key === 'ArrowRight') { player.velocity.x = player.speed; } } function handleKeyUp(event) { if ( event.key === 'w' || event.key === 's' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' ) { player.velocity.x = 0; } } document.addEventListener('keydown', handleKeyDown); document.addEventListener('keyup', handleKeyUp); .",
"content": "# <style> # body { # margin: 0; # # background-color: #c0fdfb; # display: flex; # align-items: center; # justify-content: center; # height: 100vh # } # </style> # <canvas></canvas> . %%javascript const canvas = document.querySelector('canvas'); const c = canvas.getContext('2d'); canvas.width = 600; canvas.height = 576; let gravity = 2; class Player { constructor() { this.speed = 10; this.position = { x: 100, y: canvas.height - 100 }; this.velocity = { x: 0, y: 0 }; this.width = 30; this.height = 30; this.color = 'red'; } draw() { c.fillStyle = this.color; c.fillRect( this.position.x, this.position.y, this.width, this.height ); } update() { this.position.y += this.velocity.y; this.position.x += this.velocity.x; if (this.position.y + this.height >= canvas.height) { this.position.y = canvas.height - this.height; this.velocity.y = 0; } else if (this.position.y <= 0) { this.position.y = 0; this.velocity.y = 0; } if (this.position.x + this.width >= canvas.width) { this.position.x = canvas.width - this.width; this.velocity.x = 0; } else if (this.position.x <= 0) { this.position.x = 0; this.velocity.x = 0; } if (this.position.y + this.height < canvas.height) { this.velocity.y += gravity; } this.draw(); } } let player = new Player(); function animate() { requestAnimationFrame(animate); c.clearRect(0, 0, canvas.width, canvas.height); player.update(); } animate(); function handleKeyDown(event) { if (event.key === 'w' || event.key === 'W') { player.velocity.y = -30; } else if (event.key === 's' || event.key === 'S') { player.velocity.y = player.speed; } else if (event.key === 'ArrowLeft') { player.velocity.x = -player.speed; } else if (event.key === 'ArrowRight') { player.velocity.x = player.speed; } } function handleKeyUp(event) { if ( event.key === 'w' || event.key === 's' || event.key === 'ArrowLeft' || event.key === 'ArrowRight' ) { player.velocity.x = 0; } } document.addEventListener('keydown', handleKeyDown); document.addEventListener('keyup', handleKeyUp); .",
"url": "https://nicholasramos5.github.io/VSCodings/javascript/2023/06/13/Mario.html",
"relUrl": "/javascript/2023/06/13/Mario.html",
"date": " • Jun 13, 2023"
Expand Down
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.1.1">Jekyll</generator><link href="https://nicholasramos5.github.io/VSCodings/feed.xml" rel="self" type="application/atom+xml" /><link href="https://nicholasramos5.github.io/VSCodings/" rel="alternate" type="text/html" /><updated>2023-06-15T16:28:11-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/feed.xml</id><title type="html">Nicholas’ fastpages</title><subtitle>A very cool blog platform</subtitle><entry><title type="html">Mario</title><link href="https://nicholasramos5.github.io/VSCodings/javascript/2023/06/13/Mario.html" rel="alternate" type="text/html" title="Mario" /><published>2023-06-13T00:00:00-05:00</published><updated>2023-06-13T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/javascript/2023/06/13/Mario</id><author><name></name></author><category term="javascript" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">College Board Notes</title><link href="https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/10/CollegeBoardPrep.html" rel="alternate" type="text/html" title="College Board Notes" /><published>2023-06-10T00:00:00-05:00</published><updated>2023-06-10T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/10/CollegeBoardPrep</id><author><name></name></author><category term="college board" /><category term="java" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">APCSA Reflection</title><link href="https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/06/Reflection.html" rel="alternate" type="text/html" title="APCSA Reflection" /><published>2023-06-06T00:00:00-05:00</published><updated>2023-06-06T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/06/Reflection</id><author><name></name></author><category term="college board" /><category term="java" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Lesson 3 Hacks</title><link href="https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/04/27/LessonTheLast.html" rel="alternate" type="text/html" title="Lesson 3 Hacks" /><published>2023-04-27T00:00:00-05:00</published><updated>2023-04-27T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/04/27/LessonTheLast</id><author><name></name></author><category term="college board" /><category term="java" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Title</title><link href="https://nicholasramos5.github.io/VSCodings/2023/04/27/Lesson3.html" rel="alternate" type="text/html" title="Title" /><published>2023-04-27T00:00:00-05:00</published><updated>2023-04-27T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/2023/04/27/Lesson3</id><author><name></name></author><summary type="html"><![CDATA[]]></summary></entry></feed>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.1.1">Jekyll</generator><link href="https://nicholasramos5.github.io/VSCodings/feed.xml" rel="self" type="application/atom+xml" /><link href="https://nicholasramos5.github.io/VSCodings/" rel="alternate" type="text/html" /><updated>2023-06-15T16:36:55-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/feed.xml</id><title type="html">Nicholas’ fastpages</title><subtitle>A very cool blog platform</subtitle><entry><title type="html">Mario</title><link href="https://nicholasramos5.github.io/VSCodings/javascript/2023/06/13/Mario.html" rel="alternate" type="text/html" title="Mario" /><published>2023-06-13T00:00:00-05:00</published><updated>2023-06-13T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/javascript/2023/06/13/Mario</id><author><name></name></author><category term="javascript" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">College Board Notes</title><link href="https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/10/CollegeBoardPrep.html" rel="alternate" type="text/html" title="College Board Notes" /><published>2023-06-10T00:00:00-05:00</published><updated>2023-06-10T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/10/CollegeBoardPrep</id><author><name></name></author><category term="college board" /><category term="java" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">APCSA Reflection</title><link href="https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/06/Reflection.html" rel="alternate" type="text/html" title="APCSA Reflection" /><published>2023-06-06T00:00:00-05:00</published><updated>2023-06-06T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/06/06/Reflection</id><author><name></name></author><category term="college board" /><category term="java" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Lesson 3 Hacks</title><link href="https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/04/27/LessonTheLast.html" rel="alternate" type="text/html" title="Lesson 3 Hacks" /><published>2023-04-27T00:00:00-05:00</published><updated>2023-04-27T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/college%20board/java/2023/04/27/LessonTheLast</id><author><name></name></author><category term="college board" /><category term="java" /><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Title</title><link href="https://nicholasramos5.github.io/VSCodings/2023/04/27/Lesson3.html" rel="alternate" type="text/html" title="Title" /><published>2023-04-27T00:00:00-05:00</published><updated>2023-04-27T00:00:00-05:00</updated><id>https://nicholasramos5.github.io/VSCodings/2023/04/27/Lesson3</id><author><name></name></author><summary type="html"><![CDATA[]]></summary></entry></feed>
27 changes: 13 additions & 14 deletions javascript/2023/06/13/Mario.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,17 @@ <h1 class="post-title p-name" itemprop="name headline">Mario</h1><p class="post-

<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">%%html</span>
<span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span>
<span class="nt">body</span> <span class="p">{</span>
<span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
<span class="err">#</span> <span class="k">background-color</span><span class="p">:</span> <span class="mh">#c0fdfb</span><span class="p">;</span>
<span class="k">display</span><span class="p">:</span> <span class="kc">flex</span><span class="p">;</span>
<span class="k">align-items</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span>
<span class="k">justify-content</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span>
<span class="k">height</span><span class="p">:</span> <span class="mi">100</span><span class="kt">vh</span>
<span class="p">}</span>
<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">canvas</span><span class="p">&gt;&lt;/</span><span class="nt">canvas</span><span class="p">&gt;</span>
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># &lt;style&gt;</span>
<span class="c1"># body {</span>
<span class="c1"># margin: 0;</span>
<span class="c1"># # background-color: #c0fdfb;</span>
<span class="c1"># display: flex;</span>
<span class="c1"># align-items: center;</span>
<span class="c1"># justify-content: center;</span>
<span class="c1"># height: 100vh</span>
<span class="c1"># }</span>
<span class="c1"># &lt;/style&gt;</span>
<span class="c1"># &lt;canvas&gt;&lt;/canvas&gt;</span>
</pre></div>

</div>
Expand Down Expand Up @@ -294,10 +293,10 @@ <h1 class="post-title p-name" itemprop="name headline">Mario</h1><p class="post-



<div id="d81c7d7e-7a3a-4328-a0e6-bab94706d670"></div>
<div id="138125af-c04a-4f31-9a72-58e1803cf2ab"></div>
<div class="output_subarea output_javascript ">
<script type="text/javascript">
var element = $('#d81c7d7e-7a3a-4328-a0e6-bab94706d670');
var element = $('#138125af-c04a-4f31-9a72-58e1803cf2ab');
const canvas = document.querySelector('canvas');
const c = canvas.getContext('2d');
canvas.width = 600;
Expand Down

0 comments on commit 5fe1ad3

Please sign in to comment.