Skip to content

Commit

Permalink
Merge pull request #298 from jermspeaks/content/blurbs-2
Browse files Browse the repository at this point in the history
Intro to curations and adding a few more book blurbs
  • Loading branch information
jermspeaks authored Jan 27, 2024
2 parents 9fec955 + 8a9c3dc commit 9b1838e
Show file tree
Hide file tree
Showing 23 changed files with 334 additions and 226 deletions.
169 changes: 62 additions & 107 deletions src/components/Aside.astro
Original file line number Diff line number Diff line change
@@ -1,118 +1,73 @@
---
export interface Props {
type?: 'note' | 'tip' | 'caution' | 'danger';
title?: string;
type?: "note" | "tip" | "caution" | "danger";
title?: string;
}
const { type = 'note', title = `aside.${type}` } = Astro.props as Props;
const { type = "note", title = `aside.${type}` } = Astro.props as Props;
// SVG icon paths based on GitHub Octicons
const icons: Record<NonNullable<Props['type']>, { viewBox: string; d: string }> = {
note: {
viewBox: '0 0 18 18',
d: 'M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 14H1.75A1.75 1.75 0 010 12.25v-8.5zm1.75-.25a.25.25 0 00-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H1.75zM3.5 6.25a.75.75 0 01.75-.75h7a.75.75 0 010 1.5h-7a.75.75 0 01-.75-.75zm.75 2.25a.75.75 0 000 1.5h4a.75.75 0 000-1.5h-4z',
},
tip: {
viewBox: '0 0 18 18',
d: 'M14 0a8.8 8.8 0 0 0-6 2.6l-.5.4-.9 1H3.3a1.8 1.8 0 0 0-1.5.8L.1 7.6a.8.8 0 0 0 .4 1.1l3.1 1 .2.1 2.4 2.4.1.2 1 3a.8.8 0 0 0 1 .5l2.9-1.7a1.8 1.8 0 0 0 .8-1.5V9.5l1-1 .4-.4A8.8 8.8 0 0 0 16 2v-.1A1.8 1.8 0 0 0 14.2 0h-.1zm-3.5 10.6-.3.2L8 12.3l.5 1.8 2-1.2a.3.3 0 0 0 .1-.2v-2zM3.7 8.1l1.5-2.3.2-.3h-2a.3.3 0 0 0-.3.1l-1.2 2 1.8.5zm5.2-4.5a7.3 7.3 0 0 1 5.2-2.1h.1a.3.3 0 0 1 .3.3v.1a7.3 7.3 0 0 1-2.1 5.2l-.5.4a15.2 15.2 0 0 1-2.5 2L7.1 11 5 9l1.5-2.3a15.3 15.3 0 0 1 2-2.5l.4-.5zM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-8.4 9.6a1.5 1.5 0 1 0-2.2-2.2 7 7 0 0 0-1.1 3 .2.2 0 0 0 .3.3c.6 0 2.2-.4 3-1.1z',
},
caution: {
viewBox: '-1 1 18 18',
d: 'M8.9 1.5C8.7 1.2 8.4 1 8 1s-.7.2-.9.5l-7 12a1 1 0 0 0 0 1c.2.3.6.5 1 .5H15c.4 0 .7-.2.9-.5a1 1 0 0 0 0-1l-7-12zM9 13H7v-2h2v2zm0-3H7V6h2v4z',
},
danger: {
viewBox: '0 1 14 17',
d: 'M5 .3c.9 2.2.5 3.4-.5 4.3C3.5 5.6 2 6.5 1 8c-1.5 2-1.7 6.5 3.5 7.7-2.2-1.2-2.6-4.5-.3-6.6-.6 2 .6 3.3 2 2.8 1.4-.4 2.3.6 2.2 1.7 0 .8-.3 1.4-1 1.8A5.6 5.6 0 0 0 12 10c0-2.9-2.5-3.3-1.3-5.7-1.5.2-2 1.2-1.8 2.8 0 1-1 1.8-2 1.3-.6-.4-.6-1.2 0-1.8C8.2 5.3 8.7 2.5 5 .3z',
},
const icons: Record<
NonNullable<Props["type"]>,
{ viewBox: string; d: string }
> = {
note: {
viewBox: "0 0 18 18",
d: "M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 14H1.75A1.75 1.75 0 010 12.25v-8.5zm1.75-.25a.25.25 0 00-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H1.75zM3.5 6.25a.75.75 0 01.75-.75h7a.75.75 0 010 1.5h-7a.75.75 0 01-.75-.75zm.75 2.25a.75.75 0 000 1.5h4a.75.75 0 000-1.5h-4z",
},
tip: {
viewBox: "0 0 18 18",
d: "M14 0a8.8 8.8 0 0 0-6 2.6l-.5.4-.9 1H3.3a1.8 1.8 0 0 0-1.5.8L.1 7.6a.8.8 0 0 0 .4 1.1l3.1 1 .2.1 2.4 2.4.1.2 1 3a.8.8 0 0 0 1 .5l2.9-1.7a1.8 1.8 0 0 0 .8-1.5V9.5l1-1 .4-.4A8.8 8.8 0 0 0 16 2v-.1A1.8 1.8 0 0 0 14.2 0h-.1zm-3.5 10.6-.3.2L8 12.3l.5 1.8 2-1.2a.3.3 0 0 0 .1-.2v-2zM3.7 8.1l1.5-2.3.2-.3h-2a.3.3 0 0 0-.3.1l-1.2 2 1.8.5zm5.2-4.5a7.3 7.3 0 0 1 5.2-2.1h.1a.3.3 0 0 1 .3.3v.1a7.3 7.3 0 0 1-2.1 5.2l-.5.4a15.2 15.2 0 0 1-2.5 2L7.1 11 5 9l1.5-2.3a15.3 15.3 0 0 1 2-2.5l.4-.5zM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-8.4 9.6a1.5 1.5 0 1 0-2.2-2.2 7 7 0 0 0-1.1 3 .2.2 0 0 0 .3.3c.6 0 2.2-.4 3-1.1z",
},
caution: {
viewBox: "0 0 16 16",
d: "M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z",
},
danger: {
viewBox: "0 1 14 17",
d: "M5 .3c.9 2.2.5 3.4-.5 4.3C3.5 5.6 2 6.5 1 8c-1.5 2-1.7 6.5 3.5 7.7-2.2-1.2-2.6-4.5-.3-6.6-.6 2 .6 3.3 2 2.8 1.4-.4 2.3.6 2.2 1.7 0 .8-.3 1.4-1 1.8A5.6 5.6 0 0 0 12 10c0-2.9-2.5-3.3-1.3-5.7-1.5.2-2 1.2-1.8 2.8 0 1-1 1.8-2 1.3-.6-.4-.6-1.2 0-1.8C8.2 5.3 8.7 2.5 5 .3z",
},
};
const { viewBox, d } = icons[type];
---

<aside class={`content ${type}`} aria-label={title}>
<p class="title" aria-hidden="true">
<span class="icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox={viewBox} width={16} height={16}>
<path fill-rule="evenodd" d={d}></path>
</svg>
</span>
{title}
</p>
<section>
<slot />
</section>
<aside
class:list={[
"border-l-4 rounded-l-lg px-8 py-4 my-4",
{
["bg-yellow-100 dark:bg-yellow-900 border-yellow-300 dark:border-yellow-700"]:
type === "caution",
["bg-slate-100 dark:bg-slate-900 border-slate-300 dark:border-slate-700"]:
type === "tip",
["bg-purple-100 dark:bg-purple-900 border-purple-300 dark:border-purple-700"]:
type === "note",
["bg-red-100 dark:bg-red-900 border-red-300 dark:border-red-700"]:
type === "danger",
},
]}
aria-label={title}
>
<div class="flex justify-start items-center gap-4" aria-hidden="true">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox={viewBox}
width={16}
height={16}
class:list={[
"w-8 h-8",
{
["fill-yellow-500"]: type === "caution",
["fill-slate-500"]: type === "tip",
["fill-purple-500"]: type === "note",
["fill-red-500"]: type === "danger",
},
]}
>
<path fill-rule="evenodd" d={d}></path>
</svg>
<div class="font-bold">{title}</div>
</div>
<section>
<slot />
</section>
</aside>

<style>
aside {
--aside-color-base: var(--color-base-purple);
--aside-color-lightness: 54%;
--aside-accent-color: hsl(var(--aside-color-base), var(--aside-color-lightness));
--aside-text-lightness: 20%;
--aside-text-accent-color: hsl(var(--aside-color-base), var(--aside-text-lightness));

border-inline-start: 4px solid var(--aside-accent-color);
padding: 1rem;
background-color: hsla(
var(--aside-color-base),
var(--aside-color-lightness),
var(--theme-accent-opacity)
);
/* Indicates the aside boundaries for forced colors users, transparent is changed to a solid color */
outline: 1px solid transparent;
}

:global(.theme-dark) aside {
--aside-text-lightness: 85%;
}

.title {
line-height: 1;
margin-bottom: 0.5rem;
font-size: 0.9rem;
letter-spacing: 0.05em;
font-weight: bold;
text-transform: uppercase;
color: var(--aside-text-accent-color);
}

.icon svg {
width: 1.5em;
height: 1.5em;
vertical-align: middle;
fill: currentcolor;
}

aside :global(a),
aside :global(a > code:not([class*='language'])) {
color: var(--aside-text-accent-color);
}

aside :global(p),
aside.content :global(ul) {
color: var(--theme-text);
}

:global(.theme-dark) aside :global(code:not([class*='language'])) {
color: var(--theme-code-text);
}

aside :global(pre) {
margin-left: 0;
margin-right: 0;
}

.tip {
--aside-color-lightness: 42%;
--aside-color-base: var(--color-base-teal);
}

.caution {
--aside-color-lightness: 59%;
--aside-color-base: var(--color-base-yellow);
}

.danger {
--aside-color-lightness: 54%;
--aside-color-base: var(--color-base-red);
}
</style>
6 changes: 3 additions & 3 deletions src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import AlgoliaSearch from "./AlgoliaSearch.astro";
import HeaderLink from "./HeaderLink.astro";
---

<header class="mb-8 flex justify-between align-middle print:hidden">
<header class="mb-4 flex justify-between align-middle print:hidden">
<h2
class="text-xl font-bold mb-8 text-black no-underline hover:text-gray-600 dark:text-white"
class="text-xl font-bold mb-4 text-black no-underline hover:text-gray-600 dark:text-white"
>
<a href="/">{SITE_TITLE}</a>
</h2>
<nav class="hidden md:flex md:gap-3 md:items-center md:mb-8 dark:text-white">
<nav class="hidden md:flex md:gap-3 md:items-center md:mb-4 dark:text-white">
<AlgoliaSearch />
<HeaderLink href="/blog">Writing</HeaderLink>
<HeaderLink href="/project">Projects</HeaderLink>
Expand Down
1 change: 1 addition & 0 deletions src/content/antiLibrary/2023-05-30-coders-at-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for Coders At Work"
link: "https://amzn.to/3OLTRrm"
pubDate: "2023-05-30"
title: "Coders at Work: Reflections on the Craft of Programming"
blurb: "\"Peter Seibel interviews 15 of the most interesting computer programmers alive today in Coders at Work, offering a companion volume to Apress’s highly acclaimed best-seller Founders at Work by Jessica Livingston.\""
---

I read pieces of this back in 2014 when I was at DevBootcamp. I remember reading Max Levchin, co-founder of Paypal, from its sister book, Founders At Work, and was mesmerized by the stories. Coders at work have a similar vein in its interviews
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for The Psychology of Money"
link: "https://amzn.to/42aV7qY"
pubDate: "2023-05-31"
title: "The Psychology of Money: Timeless lessons on wealth, greed, and happiness"
blurb: "\"Morgan Housel shares 19 short stories exploring the strange ways people think about money and teaches you how to make better sense of one of life’s most important topics.\""
---

I've heard this book being recommended by multiple people, so maybe it's worth taking a glance at it. People include Ali Abdaal. It has other advise on how to think about money. I've read in the past Money: Master the Game by Tony Robbins, and a lot of the book felt like a promotional talk. So going away from that, I'm hoping this advice is more down to earth and straight to the point.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for Writing for Software Developers"
link: "https://wfsd.com/"
pubDate: "2023-05-31"
title: "Writing for Software Developers"
blurb: "\"Writing for Software Developers focuses on teaching you how to envision, create, and publish mid-length technical tutorials and articles, but the principles and practices you’ll develop will help you write anything from a short README to an entire technical book. And regardless of why you write, this guide aims to provide you with the techniques you will need to reach your goals.\""
---

Recommended by Shawn Swyx Wang. I'm especially interested in content writing that can help me improve my writing skills.
Expand Down
2 changes: 1 addition & 1 deletion src/content/blog/2024-01-24-website-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tags: ["essay", "reflection", "review"]

## New Year, Combined Pages

I haven't given a website update since June 2023. Since some other things have happened,
I haven't given a website update since June 2023. Since some other things have happened,
here's a short recap of some major updates.

- [Resume](/about/resume) updates
Expand Down
39 changes: 39 additions & 0 deletions src/content/blog/2024-01-26-curations.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
description: "Curations is my attempt at blending the warm hug of nostalgia with a little nook tailor-made for my personal obsessions—steering clear of the 'oh-so-common listicle' abyss. Let's dive into the fun zone! 🚀✨"
draft: false
heroImage: "https://images.unsplash.com/photo-1581905764498-f1b60bae941a?q=80&w=2264&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
heroImageAlt: "Black and white photo of a video store. Credits: Unsplash, Sean Benesh"
pubDate: "2024-01-26"
tags: ["essay", "website", "updates"]
title: "Introducing Curations"
---

I'm proud of the re-write I've made towards [curations](/curation). The idea behind this was to combine the things that I've liked, consumed, gestated on, and share with you my thoughts about different things that matter to me.

For my books, I wanted the feeling you get at the bookstore where I write a short blurb about why you should pick up this book. I would spend the first few minutes reading the index cards nicely decorated about why the staff member chose a specific book. There was more potential for a chance encounter. When I read listicles online, there's often a sense of sameness. It's not as fun when websites all feel the same.

The same about films in a video store. I love the feeling you get, back when video stores were more popular, about staffpicks. Some small streaming services have this feeling, like [FilmStruck](https://en.wikipedia.org/wiki/FilmStruck), and more recently the [Criterion Channel](https://www.criterionchannel.com/). When the Netflix algorithm is feeding you, or for that matter any algorithm, that hand-feel of someone's journey into film has turned into "this is what thousands of people in your target demographic cohort also like". And there's something missing from that. I want to share what I like about a film, or dislike. And I also want to share why other people appear to have similar or dissonant feelings about it.

People shouldn't feel boxed into groups of "books I like", "movies I like", and "music I like". It makes everything feel dull, like these are the only categories that define our dating profile. And while I'm starting off with the books and music, I can think of other things I want to curate in the future. One thing people might not know about me is I own a 20+ year old business card collection. It reminds me of places I've traveled or people I've met. I also want to share a inspirational persons curation of people who I love and have made an impact.

import Aside from "../../components/Aside.astro";

<Aside type="note" title="Hot Take on Generic Dating Profile">
Dating profiles are riddled with generic descriptions. If you're going to dive into that, please at least do better than the following.

> Adventure/looking for an adventure buddy
We're all trying to look for our someone.

> Travel/world traveller
We all love traveling. Maybe not the act itself, but the idea of going around the world, you jetsetter.

> Height
Opens the can of worms, eh?
</Aside>

Aside from everything else, I want my personal MySpace back. Back in the day, you would have a customized profile page where you make it play your favorite music, share your favorite lousy quotes, and give it your own personal flair. Even if that flair was like design vomit. It was your vomit. So with that, I'm having a little fun giving you multiple perspectives on what is essentially a listicle. But it's my listicle. And I can call it something other than a listicle. Like an curated art exhibit. That sounds so much more sophisticated. You're welcome.

If you missed the link above, check out [curations](/curation)!
1 change: 1 addition & 0 deletions src/content/book/2012-12-30-the-inner-game-of-tennis.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for The inner game of tennis"
link: "https://amzn.to/3N2rBzm"
pubDate: "2012-12-30"
title: "The Inner Game of Tennis: The Classic Guide to the Mental Side of Peak Performance"
blurb: "The mental aspects of tennis and how they can be applied to achieve peak performance in the sport and beyond, like the inner game, relaxed concentration, and the mind/body connection."
---

- [Goodreads Link](https://www.goodreads.com/book/show/905.The_Inner_Game_of_Tennis)
Expand Down
1 change: 1 addition & 0 deletions src/content/book/2015-02-09-quiet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for Quiet"
link: "https://amzn.to/45B1iHK"
pubDate: "2015-02-09"
title: "Quiet: The Power of Introverts in a World That Can't Stop Talking"
blurb: "Exploring introversion as a personality trait and provides insights into the strengths and needs of both introverts and extroverts. The book presents a history of how Western culture transformed from a culture of character to a culture of personality, where an \"extrovert ideal\" dominates."
---

This book was a struggle to keep on the list, but after thinking about the impact it had on me, I had to keep it on. Susan Cain talks about how one mode of thinking is not great across the entire spectrum of introverts / extroverts. In fact, most of the commonplace attitudes to think about how to collaborate, how to think, how to work are based off of the ideas of extroverts. What may work for you may not work for someone else who's an introvert. Also, she details that most people lie on a spectrum, and not actual opposite ends. This is where I found out I'm actually an ambivert, someone who lies in the middle of the introvert / extrovert spectrum.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for So Good They Can't Ignore You"
link: "https://amzn.to/42d7v9Z"
pubDate: "2015-02-09"
title: "So Good They Can't Ignore You"
blurb: "Counter advice to \"follow your passion\" and about the importance of becoming exceptional at what you do."
---

I've followed [Mr. Newport's blog](https://calnewport.com/blog/) for quite some time and read his other book, "[How to Be a High School Superstar](https://amzn.to/3MA7szc)", because I wanted to know if it was good to give my sister a few years back when she asked me what she should do in High School. To me, this is thecareer book. It begins by telling you that the pursuit to do something your passionate about is a myth. In fact, Mr. Newport claims that it's the job and career that guides you to your passion. You have to build your own career up, and it's going to have lots of twists and turns before you truly know what you're going to do. I've gifted this to my cousin and she has taken this advice and went back to graduate school because she wants to build up the skill to do more in graphic communication. I didn't consider this book to give to you because I thought about self-help before career advice, so maybe you should ask me nicely for your birthday next year (but in all seriousness, purchase this book if you can. It really is worth it).
1 change: 1 addition & 0 deletions src/content/book/2015-02-09-thanks-for-the-feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ heroImageAlt: "Book cover for Thanks for the Feedback"
link: "https://amzn.to/3WITjoa"
pubDate: "2015-02-09"
title: "Thanks for the Feedback: The Science and Art of Receiving Feedback Well"
blurb: "A focus on the importance of receiving feedback effectively and provides practical strategies for dealing with different types of feedback."
---

A group from the Harvard Business School came out over a decade ago with their seminal work about office relationships and communication called "Difficult Conversations" in which the team tried to understand what it is that makes us avoid having tough conversations with co-workers, family and friends. They turned that study into a book called "Difficult Conversations" on how to initiate these conversations. This book, "Thanks for the Feedback" explores the next step, which is someone has posed a difficult conversation to you, and explains how you should respond. You don't have to read "Difficult Conversations" to understand this book at all, and it's practical from the very beginning. I really wish I had read this when I did my senior project and had to manage a group of 5 people.
2 changes: 1 addition & 1 deletion src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const blog = defineCollection({
draft: z.boolean().optional(),
heroImage: z.string().optional(),
heroImageAlt: z.string().optional(),
minutesRead: z.string().optional(),
// Transform string to Date object
pubDate: z
.string()
.or(z.date())
.transform((val) => new Date(val)),
tags: z.array(z.string()).optional(),
title: z.string(),
minutesRead: z.string().optional(),
updatedDate: z
.string()
.optional()
Expand Down
1 change: 1 addition & 0 deletions src/content/lindy/every-programmer-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ heroImage: "https://images.unsplash.com/photo-1541029071515-84cc54f84dc5?q=80&w=
heroImageAlt: "Solid state memory, photographed by Liam Briese"
link: ''
dateConsumed: "2015-03-01 03:00:00 GMT"
blurb: "A paper which provides an extensive exploration of memory, covering topics such as management, organization, and optimization. Despite being over a decade old, the paper remains highly relevant to software engineering today, as some of its insights and concepts continue to be applicable for optimal code performance."
---

What Every Programmer Should Know About Memory by Ulrich Drepper
Expand Down
1 change: 1 addition & 0 deletions src/content/lindy/ira-glass-on-storytelling.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ heroImage: "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS__A5jam3cTG4w
heroImageAlt: "Courtesy of Vulture"
link: ""
dateConsumed: "2014-02-01 03:00:00 GMT"
blurb: "Ira Glass, the host of This American Life, shared his insights on storytelling in a short 30 minute interview revolving around the importance of engaging the audience, using vivid language, and focusing on the structure and characters of the story."
---

- [Part 1, The Building Blocks of a Good Story](https://www.youtube.com/watch?v=5pFI9UuC_fc)
Expand Down
Loading

0 comments on commit 9b1838e

Please sign in to comment.