Skip to content

Commit

Permalink
more game screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
benrbray committed Aug 12, 2024
1 parent 0f83a1b commit b321578
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
Binary file added public/flash/screenshots/pixel-launch-4.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 public/flash/screenshots/pixel-launch-5.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 public/flash/screenshots/pixel-launch-6.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 public/flash/screenshots/windows-doors-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/content/blog/projects/flash-games.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ summary: In high school, my curiosity about game development led me to <b>Newgr
<GamePreview gameSlug="windows-doors" />

<img src="/flash/screenshots/windows-doors-2.png" alt="" />
<img src="/flash/screenshots/windows-doors-3.png" alt="" />
<img src="/flash/screenshots/windows-doors-1.png" alt="" />

# Thoreau (2011)
Expand All @@ -31,8 +32,9 @@ summary: In high school, my curiosity about game development led me to <b>Newgr
<GamePreview gameSlug="pixel-launch" />

<img src="/flash/screenshots/pixel-launch-1.png" alt="" />
<img src="/flash/screenshots/pixel-launch-2.png" alt="" />
<img src="/flash/screenshots/pixel-launch-3.png" alt="" />
<img src="/flash/screenshots/pixel-launch-4.png" alt="" />
<img src="/flash/screenshots/pixel-launch-5.png" alt="" />

# Untitled Wolf Game (2014)

Expand Down
2 changes: 1 addition & 1 deletion src/content/game/windows-doors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import RuffleEmbed from "@components/game/RuffleEmbed.astro";
The classic Windows simulation game, played more than **2.5 million** times!

* Browse the internet with **Internet Appendage 8**!
* Create your own games with **Adoozy Falsch CS4 Professional**!
* Create your own games with **Adoozy Falsch CS4 Poofessional**!
* Compose ransom letters with help from **Clippy**!
* Keep your viruses up to date with **NoTron Virus**!

Expand Down
5 changes: 3 additions & 2 deletions src/pages/game/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { type CollectionEntry } from 'astro:content';
import LayoutGame from '@root/layouts/LayoutGame.astro';
import { getGames } from '@root/util/query';
import { getGames, getPostUrlBySlug } from '@root/util/query';
import FormattedDate from '@root/components/dates/FormattedDate.astro';
export async function getStaticPaths() {
Expand All @@ -16,13 +16,14 @@ export async function getStaticPaths() {
type Props = CollectionEntry<'game'>;
const game = Astro.props;
const moreGamesUrl = await getPostUrlBySlug("projects/flash-games");
let { Content: GameContent } = await game.render();
---

<LayoutGame pageTitle={game.data.title}>
<div class="content">
<div class="header">
<a href="/">« Benjamin R. Bray</a>
<a href={moreGamesUrl}>« Benjamin R. Bray</a>
</div>
<h1>{game.data.title}</h1>
<div class="date-published">
Expand Down
19 changes: 12 additions & 7 deletions src/util/query.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getCollection, type CollectionEntry } from "astro:content";
import { getCollection, type CollectionEntry, getEntry } from "astro:content";
import { asyncFilter } from "./async";

export const IS_PROD = import.meta.env.PROD;
Expand All @@ -11,13 +11,13 @@ export const IS_DEV = import.meta.env.DEV;
* folder can be freely reorganized without breaking URLs.
*/
export const shortenProjectSlug = (slug: string) => {
const prefix = "projects/";
if(slug.startsWith(prefix)) {
return slug.slice(prefix.length);
} else {
return slug;
}
const prefix = "projects/";
if(slug.startsWith(prefix)) {
return slug.slice(prefix.length);
} else {
return slug;
}
}

/**
* Computes the URL for a given post, so that the `content/`
Expand All @@ -37,6 +37,11 @@ export const getPostUrl = (post: CollectionEntry<"blog">) => {
}
}

export const getPostUrlBySlug = async (postSlug: CollectionEntry<"blog">["slug"]) => {
const post = await getEntry({ collection: "blog", slug: postSlug });
return getPostUrl(post);
}

export const postIsPublished = (post: CollectionEntry<"blog">) => {
return post.data.published;
}
Expand Down

0 comments on commit b321578

Please sign in to comment.