feat: Add callout and YouTube shortcodes, implement related posts, enable view transitions, and update profile with YouTube link.

This commit is contained in:
2026-03-11 22:37:33 +03:00
parent 6c8776a4cc
commit 5396af296d
16 changed files with 294 additions and 34 deletions
-30
View File
@@ -1,30 +0,0 @@
# TODO — pwnforfunandprofit.xyz
Feature backlog for the blog. Check off items as they're implemented.
---
## Discovery & Navigation
- [ ] **Related posts** — show 2–3 posts with overlapping tags at the bottom of each post
- [ ] **Post series support** — `series` front-matter field; render a "Part N of X" callout with links to all parts in the series
---
## Content Enhancements
- [ ] **Callout / admonition shortcodes** — `{% note %}`, `{% warning %}`, `{% tip %}`, `{% danger %}` Tera shortcodes styled as terminal callout boxes
---
## Post List & Filtering
---
## UI / UX Polish
- [ ] **Smooth page transitions** — CSS View Transitions API for navigation between pages
## Distribution & Reach
- [ ] **Newsletter / email subscription** — integrate Buttondown or self-hosted Listmonk with a subscribe form
+2
View File
@@ -10,3 +10,5 @@ Welcome to **pwnforfunandprofit**, your home for all things binary exploitation,
In a world increasingly built on code, understanding its vulnerabilities is not just a niche skill; it's a superpower. Here, we're not just reading about exploits; we're _crafting_ them. We're not just looking at binaries; we're _disassembling_ them. And we're not just talking about offensive security; we're _doing_ it.
My mission is simple yet ambitious: to transform the daunting landscapes of low-level security into accessible, engaging, and ultimately, empowering knowledge. Whether you're aiming to land that dream cybersecurity role, dominate CTF leaderboards, uncover critical bugs, or satisfy a deep intellectual curiosity, I'm here to guide you.
You can also find video versions of my teardowns and explorations on my **[YouTube Channel](https://www.youtube.com/@pwnforfunandprofit)**.
+140
View File
@@ -260,3 +260,143 @@
text-align: right;
}
}
// ──────────────────────────────────────────
// Media Wrappers (YouTube, etc)
// ──────────────────────────────────────────
.youtube-wrapper {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border-color);
margin: 2rem 0;
background: #000;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
}
// ──────────────────────────────────────────
// Callouts / Admonitions
// ──────────────────────────────────────────
.callout {
margin: 2rem 0;
padding: 1.25rem 1.5rem;
border-radius: 6px;
border-left: 4px solid var(--callout-color, var(--border-color));
background: var(--surface-color);
color: var(--text-color);
font-size: 0.95rem;
line-height: 1.6;
.callout-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
font-weight: 600;
color: var(--callout-color, var(--heading-color));
}
.callout-icon {
width: 1.25rem;
height: 1.25rem;
flex-shrink: 0;
}
.callout-title {
font-family: var(--font-mono);
text-transform: uppercase;
letter-spacing: 0.05em;
font-size: 0.85rem;
}
.callout-content {
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
// Variants
&.callout-note {
--callout-color: #3b82f6; // Blue
background: rgba(59, 130, 246, 0.05);
}
&.callout-warning {
--callout-color: #f59e0b; // Amber
background: rgba(245, 158, 11, 0.05);
}
&.callout-tip {
--callout-color: #10b981; // Emerald
background: rgba(16, 185, 129, 0.05);
}
&.callout-danger {
--callout-color: #ef4444; // Red
background: rgba(239, 68, 68, 0.05);
}
}
// ──────────────────────────────────────────
// Related Posts
// ──────────────────────────────────────────
.related-posts-section {
margin-top: 4rem;
padding-top: 2rem;
border-top: 1px dashed var(--border-color);
h3 {
margin-bottom: 2rem;
font-size: 1.5rem;
color: var(--heading-color);
letter-spacing: -0.02em;
}
.related-posts-grid {
display: grid;
grid-template-columns: 1fr;
gap: 2rem;
@media (min-width: 768px) {
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 2.5rem;
}
// Override some constraints from feed-page cards when inside the grid
.feed-item {
border-bottom: none !important;
padding-bottom: 0 !important;
background: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1.5rem !important;
height: 100%;
display: flex;
flex-direction: column;
transition: var(--transition-smooth);
&:hover {
border-color: var(--accent-color);
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.item-snippet {
flex: 1;
}
}
}
}
+55
View File
@@ -0,0 +1,55 @@
/*
* Cross-Document View Transitions
* Enabled via <meta name="view-transition" content="same-origin" />
*/
// Disable default CSS transitions on the whole page during a view transition
// so they don't fight with the View Transition API animation.
html::view-transition-group(*) {
animation-duration: 0.3s;
animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
// Custom animation for the old page leaving
@keyframes fade-out-scale {
from {
opacity: 1;
transform: scale(1);
}
to {
opacity: 0;
transform: scale(0.98);
}
}
// Custom animation for the new page entering
@keyframes fade-in-scale {
from {
opacity: 0;
transform: scale(1.02);
}
to {
opacity: 1;
transform: scale(1);
}
}
// Apply the custom animations to the root view transition pseudo-elements
html::view-transition-old(root) {
animation: fade-out-scale 0.25s cubic-bezier(0.4, 0, 1, 1) both;
}
html::view-transition-new(root) {
animation: fade-in-scale 0.35s cubic-bezier(0, 0, 0.2, 1) both;
// Delay slightly so the old page fades down first before the new one pops over
animation-delay: 0.05s;
}
// Respect user preference for reduced motion
@media (prefers-reduced-motion: reduce) {
html::view-transition-group(*),
html::view-transition-old(*),
html::view-transition-new(*) {
animation: none !important;
}
}
+1
View File
@@ -12,5 +12,6 @@
@import 'article';
@import 'footer';
@import 'search';
@import 'transitions';
@import 'utilities';
@import 'scroll-top';
+4 -2
View File
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
<meta name="view-transition" content="same-origin">
<!-- Canonical URL -->
<link rel="canonical" href="{% block canonical %}{{ config.base_url }}/{% endblock canonical %}">
@@ -67,8 +68,9 @@
"name": "{{ config.extra.author | default(value="mockingspectre") }}",
"url": "{{ config.base_url }}/about/",
"sameAs": [
{% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url %},{% endif %}{% endif %}
{% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% endif %}
{% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %}
{% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% if config.extra.youtube_url %},{% endif %}{% endif %}
{% if config.extra.youtube_url %}"{{ config.extra.youtube_url }}"{% endif %}
]
}
]
+2
View File
@@ -124,6 +124,8 @@
{% include "partials/post-nav.html" %}
{% include "partials/related-posts.html" %}
<footer class="post-footer">
<div class="post-tags-share">
<div class="post-tags">
+3 -2
View File
@@ -67,8 +67,9 @@
"name": "{{ config.extra.author | default(value="mockingspectre") }}",
"url": "{{ config.base_url }}/about/",
"sameAs": [
{% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url %},{% endif %}{% endif %}
{% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% endif %}
{% if config.extra.github_url %}"{{ config.extra.github_url }}"{% if config.extra.twitter_url or config.extra.youtube_url %},{% endif %}{% endif %}
{% if config.extra.twitter_url %}"{{ config.extra.twitter_url }}"{% if config.extra.youtube_url %},{% endif %}{% endif %}
{% if config.extra.youtube_url %}"{{ config.extra.youtube_url }}"{% endif %}
]
}
]
+5
View File
@@ -20,6 +20,11 @@
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>
</a>
{% endif %}
{% if config.extra.youtube_url %}
<a href="{{ config.extra.youtube_url }}" style="color: inherit;" class="hover-scale" aria-label="YouTube">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.42a2.78 2.78 0 0 0-1.94 2C1 8.13 1 12 1 12s0 3.87.46 5.58a2.78 2.78 0 0 0 1.94 2C5.12 20 12 20 12 20s6.88 0 8.6-.42a2.78 2.78 0 0 0 1.94-2C23 15.87 23 12 23 12s0-3.87-.46-5.58z"></path><polygon points="9.75 15.02 15.5 12 9.75 8.98 9.75 15.02"></polygon></svg>
</a>
{% endif %}
{% if config.extra.linkedin_url %}
<a href="{{ config.extra.linkedin_url }}" style="color: inherit;" class="hover-scale" aria-label="LinkedIn">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
+37
View File
@@ -0,0 +1,37 @@
{% if page.taxonomies.tags %}
{# Get all pages in the posts section #}
{% set section = get_section(path="posts/_index.md") %}
{# Initialize an array to hold related pages #}
{% set related_pages = [] %}
{% for other_page in section.pages %}
{% if other_page.permalink != page.permalink and other_page.taxonomies.tags %}
{# Check for intersection manually #}
{% set has_common_tag = false %}
{% for tag in page.taxonomies.tags %}
{% if tag in other_page.taxonomies.tags %}
{% set_global has_common_tag = true %}
{% endif %}
{% endfor %}
{% if has_common_tag %}
{% set_global related_pages = related_pages | concat(with=other_page) %}
{% endif %}
{% endif %}
{% endfor %}
{# If we found any related pages, pick top 3 and display them #}
{% if related_pages | length > 0 %}
<div class="related-posts-section">
<h3>Related Posts</h3>
<div class="related-posts-grid">
{% for related_page in related_pages | slice(end=3) %}
{# We can use a simplified card or the existing post-card.html #}
{% set page = related_page %}
{% include "partials/post-card.html" %}
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
+9
View File
@@ -0,0 +1,9 @@
<aside class="callout callout-danger">
<div class="callout-header">
<svg class="callout-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>
<span class="callout-title">{% if title %}{{ title }}{% else %}Danger{% endif %}</span>
</div>
<div class="callout-content">
{{ body | markdown | safe }}
</div>
</aside>
+9
View File
@@ -0,0 +1,9 @@
<aside class="callout callout-note">
<div class="callout-header">
<svg class="callout-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
<span class="callout-title">{% if title %}{{ title }}{% else %}Note{% endif %}</span>
</div>
<div class="callout-content">
{{ body | markdown | safe }}
</div>
</aside>
+9
View File
@@ -0,0 +1,9 @@
<aside class="callout callout-tip">
<div class="callout-header">
<svg class="callout-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 8v4"></path><path d="M12 16h.01"></path></svg>
<span class="callout-title">{% if title %}{{ title }}{% else %}Tip{% endif %}</span>
</div>
<div class="callout-content">
{{ body | markdown | safe }}
</div>
</aside>
+9
View File
@@ -0,0 +1,9 @@
<aside class="callout callout-warning">
<div class="callout-header">
<svg class="callout-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
<span class="callout-title">{% if title %}{{ title }}{% else %}Warning{% endif %}</span>
</div>
<div class="callout-content">
{{ body | markdown | safe }}
</div>
</aside>
+8
View File
@@ -0,0 +1,8 @@
<div class="youtube-wrapper">
<iframe
src="https://www.youtube-nocookie.com/embed/{{ id }}{% if autoplay %}?autoplay=1{% endif %}"
{% if title %}title="{{ title }}"{% endif %}
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</div>
+1
View File
@@ -31,6 +31,7 @@ profile_subtitle = "offending binaries"
# Social Links
github_url = "https://github.com/andwati"
twitter_url = "https://twitter.com/andwati_"
youtube_url = "https://www.youtube.com/@pwnforfunandprofit"
linkedin_url = ""
email = "[email protected]"