Skip to content

Commit

Permalink
authors to projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Nelson committed Aug 7, 2023
1 parent 43e1154 commit ada7b63
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 88 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "astroplate",
"name": "reednel.com",
"version": "1.4.1",
"description": "Astro and Tailwindcss boilerplate",
"author": "zeon.studio",
"description": "Reed Nelson's personal website.",
"author": "reednel",
"license": "MIT",
"packageManager": "[email protected]",
"scripts": {
Expand Down
25 changes: 21 additions & 4 deletions src/content/blog/ent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ draft: true
Prove that a positive integer $n$ is prime if and only if $n$ is not divisible
by any prime $p$ with $1 < p \leq \sqrt{n}$.

Proving $\implies$.
Proving $\implies$
This follows directly from the definition of prime.

Proving $\impliedby$.
Proving $\impliedby$
Clearly if there were such a prime $p$ in range $(1, \sqrt{n}]$, n would not be prime. So then it suffices to show why the range $(\sqrt{n}, n)$ need not be checked.
The largest value that can be produced by a pair in range $(1, \sqrt{n}]$ is $\sqrt{n} \cdot \sqrt{n} = n$.
That means in order for a value greater than $\sqrt{n}$ to be a divisor, so too must there be a value less than $\sqrt{n}$.
Expand Down Expand Up @@ -119,8 +119,25 @@ Therefore, for all primes greater than 3, $3 | p^2 + 2$, and $p^2 + 2$ is compos

## Hard

### Goldbach Conjecture?
### Fermat's Last Theorem

Prove that no triple $a, b, c, \in \mathbb{N}$ satisfy the equation $a^n + b^n = c^n$, where $n \in \mathbb{N}$ is greater than $2$.

### Collatz Conjecture

### Fermat's Last Theorem
Consider the following operation on an arbitrary positive integer:

$
f(n) = \left\{
\begin{array}{lr}
n / 2, & \text{if } n \equiv 0 \pmod{2}\\
3n + 1, & \text{if }n \equiv 1 \pmod{2}
\end{array}
\right\}
$

Prove that for all $n$, this function will eventually return 1.

### Goldbach's Conjecture

Prove that every even $n \in \mathbb{n}$ greater than 2 is the sum of two primes.
8 changes: 3 additions & 5 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ const drinkCollection = defineCollection({
}),
});

// Author collection schema
const authorsCollection = defineCollection({
// Project collection schema
const projectCollection = defineCollection({
schema: z.object({
title: z.string(),
meta_title: z.string().optional(),
email: z.string().optional(),
image: z.string().optional(),
description: z.string().optional(),
social: z
.array(
Expand Down Expand Up @@ -68,6 +66,6 @@ const pagesCollection = defineCollection({
export const collections = {
blog: blogCollection,
drinks: drinkCollection,
authors: authorsCollection,
projects: projectCollection,
pages: pagesCollection,
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Authors"
title: "Projects"
meta_title: ""
description: "this is meta description"
---
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
---
title: John Doe
email: [email protected]
image: "/images/avatar.png"
title: Project 1
description: this is meta description
social:
- name: github
icon: FaGithub
link: https://github.com

- name: twitter
icon: FaTwitter
link: https://twitter.com

- name: linkedin
icon: FaLinkedin
link: https://linkedin.com
---

lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr navigation et dolore magna aliqua.
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
---
title: Sam Wilson
email: [email protected]
image: "/images/avatar.png"
title: Project 2
description: this is meta description
social:
- name: github
icon: FaGithub
link: https://github.com

- name: twitter
icon: FaTwitter
link: https://twitter.com

- name: linkedin
icon: FaLinkedin
link: https://linkedin.com
---

lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr navigation et dolore magna aliqua.
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
---
title: William Jacob
email: [email protected]
image: "/images/avatar.png"
title: Project 3
description: this is meta description
social:
- name: github
icon: FaGithub
link: https://github.com

- name: twitter
icon: FaTwitter
link: https://twitter.com

- name: linkedin
icon: FaLinkedin
link: https://linkedin.com
---

lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostr navigation et dolore magna aliqua.
6 changes: 2 additions & 4 deletions src/layouts/PostSingle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ const { title, description, author, categories, image, date, tags } = post.data;
<h1 set:html={markdownify(title)} class="h2 mb-4" />
<ul class="mb-4">
<li class="mr-4 inline-block">
<a href={`/authors/${slugify(author)}`}>
<FaRegUserCircle className={"mr-2 -mt-1 inline-block"} />
{humanize(author)}
</a>
<FaRegUserCircle className={"mr-2 -mt-1 inline-block"} />
{humanize(author)}
</li>
<li class="mr-4 inline-block">
<FaRegFolder className={"mr-2 -mt-1 inline-block"} />
Expand Down
10 changes: 4 additions & 6 deletions src/layouts/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ const Search = ({ searchList }: Props) => {
</h4>
<ul className="mb-4">
<li className="mr-4 inline-block">
<a href={`/authors/${slugify(item.data.author)}`}>
<FaRegUserCircle
className={"-mt-1 mr-2 inline-block"}
/>
{humanize(item.data.author)}
</a>
<FaRegUserCircle
className={"-mt-1 mr-2 inline-block"}
/>
{humanize(item.data.author)}
</li>
<li className="mr-4 inline-block">
<FaRegFolder className={"-mt-1 mr-2 inline-block"} />
Expand Down
6 changes: 2 additions & 4 deletions src/layouts/components/BlogCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ const { title, image, date, author, categories } = data.data;
</h4>
<ul class="mb-4">
<li class="mr-4 inline-block">
<a href={`/authors/${slugify(author)}`}>
<FaRegUserCircle className={"mr-2 -mt-1 inline-block"} />
{humanize(author)}
</a>
<FaRegUserCircle className={"mr-2 -mt-1 inline-block"} />
{humanize(author)}
</li>
<li class="mr-4 inline-block">
<FaRegFolder className={"mr-2 -mt-1 inline-block"} />
Expand Down
6 changes: 2 additions & 4 deletions src/layouts/components/DrinkCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ const { title, image, date, author, categories } = data.data;
</h4>
<ul class="mb-4">
<li class="mr-4 inline-block">
<a href={`/authors/${slugify(author)}`}>
<FaRegUserCircle className={"mr-2 -mt-1 inline-block"} />
{humanize(author)}
</a>
<FaRegUserCircle className={"mr-2 -mt-1 inline-block"} />
{humanize(author)}
</li>
<li class="mr-4 inline-block">
<FaRegFolder className={"mr-2 -mt-1 inline-block"} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
---
import { plainify } from "@/lib/utils/textConverter";
import { Image } from "@astrojs/image/components";
import Social from "./Social.astro";
const { data } = Astro.props;
const { title, image, social } = data.data;
const { title, social } = data.data;
---

<div
class="rounded bg-theme-light p-8 text-center dark:bg-darkmode-theme-light"
>
{
image && (
<Image
class="mx-auto mb-6 rounded"
src={image}
alt={title}
width={120}
height={120}
format="webp"
/>
)
}
<h4 class="mb-3">
<a href={`/authors/${data.slug}`}>{title}</a>
<a href={`/projects/${data.slug}`}>{title}</a>
</h4>
<p class="mb-4">
{plainify(data.body?.slice(0, 100))}
Expand Down
14 changes: 7 additions & 7 deletions src/pages/authors/index.astro → src/pages/projects/index.astro
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
import AuthorCard from "@/components/AuthorCard.astro";
import ProjectCard from "@/components/ProjectCard.astro";
import Base from "@/layouts/Base.astro";
import { getSinglePage } from "@/lib/contentParser.astro";
import PageHeader from "@/partials/PageHeader.astro";
import { getEntryBySlug } from "astro:content";
const authorIndex = await getEntryBySlug<any, string>("authors", "-index");
const authors = await getSinglePage("authors");
const projectIndex = await getEntryBySlug<any, string>("projects", "-index");
const projects = await getSinglePage("projects");
---

<Base title={authorIndex.data.title}>
<PageHeader title={authorIndex.data.title} />
<Base title={projectIndex.data.title}>
<PageHeader title={projectIndex.data.title} />
<section class="section-sm pb-0">
<div class="container">
<div class="row justify-center">
{
authors.map((author) => (
projects.map((project) => (
<div class="mb-14 md:col-6 lg:col-4">
<AuthorCard data={author} />
<ProjectCard data={project} />
</div>
))
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/authors/[single].astro → src/pages/projects/singleastro
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
<!-- ---
import BlogCard from "@/components/BlogCard.astro";
import Social from "@/components/Social.astro";
import config from "@/config/config.json";
Expand Down Expand Up @@ -72,4 +72,4 @@ const postFilterByAuthor = posts.filter(
</div>
</div>
</section>
</Base>
</Base> -->

0 comments on commit ada7b63

Please sign in to comment.