Skip to content

Commit 95a3c65

Browse files
committed
feat: markdown iframe
1 parent 8ee9bb9 commit 95a3c65

10 files changed

+42
-6
lines changed

public/logs/dhanush-why-this-kolaveri-di.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010

1111
## About
1212

13-
The song 'Why This Kolaveri Di' translates roughly to 'Why this murderous rage, girl?' or 'Why this killer rage, girl?'. It tells the story of a man who is drunk and heartbroken after a love failure, questioning his girlfriend about why she left him. The song is often referred to as a 'soup song,' a term for a love failure song. Its lyrics are a distinctive blend of Tamil and English, known as 'Tanglish.' The song achieved immense popularity and became an internet phenomenon due to several factors: its catchy tune and simple music, the 'Tanglish' lyrics which made it accessible and relatable, its theme of unrequited love and heartbreak, and its viral spread through social media platforms. Dhanush's unpolished, 'mistake-filled' vocal delivery was perceived as fitting the song's casual tone and making it easily hummable.
13+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/Ja168gMpb3o?si=gdvm1o1JZ8ulP-n8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
14+
15+
The song 'Why This Kolaveri Di' translates roughly to 'Why this murderous rage, girl?' or 'Why this killer rage, girl?'. It tells the story of a man who is drunk and heartbroken after a love failure, questioning his girlfriend about why she left him. The song is often referred to as a 'soup song,' a term for a love failure song. Its lyrics are a distinctive blend of Tamil and English, known as 'Tanglish.' The song achieved immense popularity and became an internet phenomenon due to several factors: its catchy tune and simple music, the 'Tanglish' lyrics which made it accessible and relatable, its theme of unrequited love and heartbreak, and its viral spread through social media platforms. Dhanush's unpolished, 'mistake-filled' vocal delivery was perceived as fitting the song's casual tone and making it easily hummable.

public/logs/frederic-oddloop.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
## About
1212

13+
<iframe width="560" height="315" src="https://www.youtube.com/embed/PCp2iXA1uLE?si=Sr96UeCKy6-dT71t" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
14+
1315
**frederic** is a Japanese rock band that originated in Kobe in 2009. The band's core members are twin brothers Kenji Mihara (vocals, guitar) and Koji Mihara (bass, vocals). The band's name is inspired by Leo Lionni's children's book character, Frederick the mouse, who gathers stories to warm hearts during winter. The band aims to similarly warm people's hearts with their music.
1416

1517
**Name Origin**: The title "Oddloop" is a combination of the Japanese verb "odoru" (踊る), meaning "to dance," and the English phrase "odd loop."
@@ -20,4 +22,4 @@
2022

2123
**Anime Connection**: The song "Oddloop" was featured as the ending theme for the *Yamada-kun and the Seven Witches* OVA in 2014.
2224

23-
**Musical Style**: Frederic is recognized for its upbeat, infectious songs with a disco-funk influence, often incorporating elements of jazz rock, light rock, and punk.
25+
**Musical Style**: Frederic is recognized for its upbeat, infectious songs with a disco-funk influence, often incorporating elements of jazz rock, light rock, and punk.

public/logs/in-the-aeroplane-over-the-sea.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
- **Date:** 2025-10-06
66
- **Rating:** 5/5
77
- **Link:** [YouTube](https://www.youtube.com/watch?v=0_5qaeIAl5E)
8+
9+
<iframe width="560" height="315" src="https://www.youtube.com/embed/W6H8WcTPnWM?si=98myJ3oXnylD-0jG" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

public/logs/maxs-choice-duty-vs-passion.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
## About
1111

12+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/spK_F8zsttI?si=pXGtOwmsovcZuLu2&amp;controls=1" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin"></iframe>
13+
1214
Kärtsy Hatakka and Kimmo Kajasto are Finnish musicians who composed the soundtracks for the video games Max Payne and Max Payne 2: The Fall of Max Payne.
1315
Kärtsy Hatakka is the vocalist, bassist, and keyboardist for the Finnish rock band Waltari. Kimmo Kajasto is a composer, sound producer,
1416
and has worked with many Finnish bands.

public/logs/morcheeba-easier-said-than-done.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010

1111
## About
1212

13+
<iframe width="560" height="315" src="https://www.youtube.com/embed/27lPAUdE1ys?si=Qg6NI1aJkwjTSbuh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
14+
1315
**Morcheeba** is a British electronic band formed in 1995 with members Skye Edwards, Paul Godfrey, and Ross Godfrey. They blend trip-hop, R&B, and pop influences.
1416

1517
**Skye Edwards' Return**: "Blood Like Lemonade" marked the significant return of lead singer Skye Edwards to Morcheeba, who had previously left the band in 2003. Her distinctive vocals are a prominent feature of the track.
1618

1719
**Lyrical Theme**: The song's lyrics delve into the common human experience of knowing what needs to be done, such as letting go or trusting oneself, but finding it challenging to actually execute those actions. The phrase "It's easier said than done" encapsulates this theme of difficulty in translating intention into action.
1820

19-
**Album Success**: The album "Blood Like Lemonade," which includes "Easier Said Than Done," achieved commercial success, earning a silver certification from the Independent Music Companies Association in 2010 for selling over 30,000 copies in Europe. It was later upgraded to gold certification in 2011 for exceeding 75,000 copies sold across Europe.
21+
**Album Success**: The album "Blood Like Lemonade," which includes "Easier Said Than Done," achieved commercial success, earning a silver certification from the Independent Music Companies Association in 2010 for selling over 30,000 copies in Europe. It was later upgraded to gold certification in 2011 for exceeding 75,000 copies sold across Europe.

public/logs/yoo-se-yoon-dont-skip-the-interlude.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414

1515
## About
1616

17-
![Ayyaaah](images/logs/dont-skip-the-interlude.png)
17+
<iframe width="560" height="315" src="https://www.youtube.com/embed/esCNvfKV9Rc?si=eYqihTNkFkprbL4F" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
1818

1919
Yoo Se Yoon's 'Don't Skip the Interlude' (간주점프는 안돼요) is a unique musical comedy track that blends seemingly
2020
heartfelt lyrics with an extended, humorous instrumental interlude. The song's title directly instructs listeners
2121
not to skip this interlude, as it is central to the piece's comedic intent and overall experience.
2222

23+
![Ayyaaah](images/logs/dont-skip-the-interlude.png)
24+
25+
2326
The song features lyrics that appear serious and even heartfelt, discussing themes of love, memories,
2427
and not wanting to waste a single second with a loved one. However, this earnestness is juxtaposed with a
2528
deliberately long and often comically exaggerated instrumental break. In performances,

src/index.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,28 @@ code {
3636
border-radius: 0.25rem; /* rounded corners */
3737
}
3838

39+
.prose iframe {
40+
width: 100%; /* Make iframe responsive */
41+
max-width: 75%; /* Same as images */
42+
height: auto; /* Adjust height automatically */
43+
aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
44+
display: block;
45+
margin-left: auto;
46+
margin-right: auto;
47+
border: 5px solid #4b5563; /* subtle gray border, same as images */
48+
border-radius: 0.25rem; /* rounded corners, same as images */
49+
}
50+
3951
@media (min-width: 768px) {
4052
/* md breakpoint */
4153
.prose img {
4254
/*max-width: 55%;*/
4355
max-height: 600px;
4456
/*max-width: 100%; !* 25% width on larger screens *!*/
4557
}
58+
.prose iframe {
59+
/*max-width: 55%;*/ /* If we want it smaller on desktop, consistent with images*/
60+
}
4661
}
4762

4863
/* Styling for inline code blocks */

src/pages/AboutPage.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import ReactMarkdown from 'react-markdown';
3+
import remarkGfm from 'remark-gfm';
4+
import rehypeRaw from 'rehype-raw';
35
import { Link } from 'react-router-dom';
46
import {
57
ArrowLeftIcon,
@@ -134,7 +136,7 @@ const AboutPage = () => {
134136
</h1>
135137

136138
<div className="prose prose-invert max-w-none leading-snug">
137-
<ReactMarkdown components={{ a: LinkRenderer }}>
139+
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw]} components={{ a: LinkRenderer }}>
138140
{content}
139141
</ReactMarkdown>
140142
</div>

src/pages/LogDetailPage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import ImageModal from '../components/ImageModal';
77

88
import Seo from '../components/Seo';
99
import remarkGfm from 'remark-gfm';
10+
import rehypeRaw from 'rehype-raw';
1011

1112
const LinkRenderer = ({ href, children }) => {
1213
const isExternal = href.startsWith('http') || href.startsWith('https');
@@ -146,6 +147,7 @@ const LogDetailPage = () => {
146147
>
147148
<ReactMarkdown
148149
remarkPlugins={[remarkGfm]}
150+
rehypePlugins={[rehypeRaw]}
149151
components={{ a: LinkRenderer, img: ImageRenderer }}
150152
>
151153
{log.body}

src/pages/ProjectPage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22
import { useParams, Link } from 'react-router-dom';
33
import ReactMarkdown from 'react-markdown';
4+
import remarkGfm from 'remark-gfm';
5+
import rehypeRaw from 'rehype-raw';
46
import { useProjects } from '../utils/projectParser';
57
import { useProjectContent } from '../hooks/useProjectContent'; // Import the new hook
68
import ProjectMetadata from '../components/metadata-cards/ProjectMetadata';
@@ -111,7 +113,9 @@ const ProjectPage = () => {
111113
{/* />*/}
112114
{/*)}*/}
113115
<div className="mt-6 text-lg leading-8 text-gray-300 prose prose-dark">
114-
<ReactMarkdown>{fullProject.fullContent}</ReactMarkdown>
116+
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw]}>
117+
{fullProject.fullContent}
118+
</ReactMarkdown>
115119
</div>
116120
</div>
117121
<div className="hidden lg:block">

0 commit comments

Comments
 (0)