Skip to content

Commit

Permalink
Geting things pulled together. Still need a lot of styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickHodges committed Apr 1, 2024
1 parent f93cfe7 commit 18a8bba
Show file tree
Hide file tree
Showing 18 changed files with 481 additions and 51 deletions.
29 changes: 29 additions & 0 deletions src/components/BookList.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
// Import the books data from the JSON file
import books from "@/pagedata/books.json";
interface Book {
title: string;
author: string;
link: string;
}
---

<!-- Define your component's HTML here -->
<div>
<h1>Books</h1>
<ul>
{
books.map((book: Book) => (
<li>
<strong>
<a href={book.link} target="_blank" rel="noopener noreferrer">
{book.title}
</a>
</strong>{" "}
by {book.author}
</li>
))
}
</ul>
</div>
12 changes: 0 additions & 12 deletions src/components/ChangeLog.astro

This file was deleted.

65 changes: 65 additions & 0 deletions src/components/ChangeLogComp.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
// Import the changelog data
import changelogData from "@/pagedata/changelog.json";
// Define TypeScript types for the changelog entries
type ChangelogEntry = {
date: string;
event: string;
comments: string;
};
// Assert the imported data matches the ChangelogEntry type
const data: ChangelogEntry[] = changelogData as ChangelogEntry[];
---

<style>
table {
width: 100%;
border-collapse: collapse;
border: 1px solid #ccc;
}
th {
border: 1px solid #ccc;
padding: 8px;
text-align: center;
font-weight: bold; /* Makes text bold */
font-size: 18px; /* Increases the font size to be slightly larger */
background-color: gray;
}
td {
border: 1px solid #ccc;
padding: 8px;
text-align: left;
}
tr:nth-child(odd) {
background-color: #e0e0e0;
}

th:first-child,
td:first-child {
min-width: 120px; /* Adjust the value as needed to prevent wrapping */
white-space: nowrap; /* This will ensure the content doesn't wrap */
}
</style>

<table>
<thead>
<tr>
<th>Date</th>
<th>Event</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
{
data.map((entry: ChangelogEntry) => (
<tr>
<td>{entry.date}</td>
<td>{entry.event}</td>
<td>{entry.comments}</td>
</tr>
))
}
</tbody>
</table>
22 changes: 22 additions & 0 deletions src/components/MovieList.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
// Import the movies data from the JSON file
import movies from "@/pagedata/movies.json";
interface Movie {
title: string;
}
---

<!-- Define your component's HTML here -->
<div>
<h1>Movies</h1>
<ul>
{
movies.map((movie: Movie) => (
<li>
<strong>{movie.title}</strong>
</li>
))
}
</ul>
</div>
26 changes: 26 additions & 0 deletions src/components/Quotations.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
import quotes from "@/pagedata/quotes.json";
interface Quote {
ID: number;
quote: string;
author: string;
}
---

<!-- Define your component's HTML here -->
<div>
<ul>
{
quotes.map((quote: Quote) => (
<div class="mb-2">
<div>
<a href={`/quotes/${quote.ID}`}>#</a>
<em>{quote.quote}</em>
</div>
<div> -- {quote.author}</div>
</div>
))
}
</ul>
</div>
13 changes: 0 additions & 13 deletions src/components/Quotes.astro

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/layout/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const year = new Date().getFullYear();
>
<div class="me-0 sm:me-4">
&copy; {siteConfig.author}
{year}.<span class="inline-block">&nbsp;🚀&nbsp;siteConfig.title</span>
{year}.<span class="inline-block">&nbsp;🚀&nbsp;{siteConfig.title}</span>
</div>
<nav
aria-label="More on this site"
Expand Down
16 changes: 0 additions & 16 deletions src/content/info/FavoriteStuff.astro

This file was deleted.

9 changes: 9 additions & 0 deletions src/pages/ChangeLog.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
// Import the necessary components
import PageLayout from "@/layouts/Base.astro";
import ChangeLogComp from "@/components/ChangeLogComp.astro";
---

<PageLayout meta={{ title: "Fuck you, this should be optional" }}>
<ChangeLogComp />
</PageLayout>
12 changes: 6 additions & 6 deletions src/pages/data/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ I have a [general disclaimer](../info/disclaimer) about my blog.

Here is a [short bio](../info/shortbio) about me

These are some of my [favorite quotes](Quotes)
These are some of my [favorite quotes](../quotes)

Here is some [of my favorite stuff](FavoriteStuff)
Here is some [of my favorite stuff](../favoritestuff)

[What I'm trying to do here](info/aboutthissite) on this site
[What I'm trying to do here](../info/aboutthissite) on this site

This is a list (with links) of [some people whom I admire and from whom I like to learn](Admire)
This is a list (with links) of [some people whom I admire and from whom I like to learn](../info/admire)

[Information about how I built this site](SiteTech)
[Information about how I built this site](../info/sitetech)

[My public PGP key](PGPKey)
[My public PGP key](../info/pgpkey)
67 changes: 67 additions & 0 deletions src/pages/data/books.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[
{
"title": "Lonesome Dove",
"author": "Larry McMurtry",
"link": "https://amzn.to/49cjSr6"
},
{
"title": "The Caine Mutiny",
"author": "Herman Wouk",
"link": "https://amzn.to/48d0kBH"
},
{
"title": "Gone With the Wind",
"author": "Margaret Mitchell",
"link": "https://amzn.to/3wmm3JW"
},
{
"title": "To Kill a Mockingbird",
"author": "Harper Lee",
"link": "https://amzn.to/48bz9Ho"
},
{
"title": "Pride and Prejudice",
"author": "Jane Austin",
"link": "https://amzn.to/3P1H3MX"
},
{
"title": "Presumed Innocent",
"author": "Scott Turow",
"link": "https://amzn.to/4byQeOd"
},
{
"title": "All the Harry Potter books",
"author": "J.K. Rowling",
"link": "https://amzn.to/42CoVOV"
},
{
"title": "The Godfather",
"author": "Mario Puzo",
"link": "https://amzn.to/3OGozBb"
},
{
"title": "A Walk to Remember",
"author": "Nicholas Sparks",
"link": "https://amzn.to/48gYyPQ"
},
{
"title": "A Gentleman in Moscow",
"author": "Amor Towles",
"link": "https://amzn.to/42we9Kl"
},
{
"title": "A Man Called Ove",
"author": "Fredrik Backman",
"link": "https://amzn.to/3utAADa"
},
{
"title": "Pillars of the Earth",
"author": "Ken Follett",
"link": "https://amzn.to/3w5qAAs"
},
{
"title": "Defending Jacob",
"author": "William Landay",
"link": "https://amzn.to/3OFtFO3"
}
]
Loading

0 comments on commit 18a8bba

Please sign in to comment.