Skip to content

Commit

Permalink
Added featured images to the post and page templates
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdevore committed Nov 8, 2024
1 parent ae15881 commit 6c431a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

{% block content %}
<main class="container max-w-2xl m-auto py-10 px-4" id="main-content">
{% if page.featured_image %}
<img src="{{ page.featured_image }}" alt="Featured Image for {{ page.title }}" class="featured-image" />
{% endif %}
<h1 class="text-6xl font-bold mb-8 pb-8 text-links quicksand-700 border-b border-primary">{{ title }}</h1>
<div class="stattic-content prose dark:prose-dark">
{{ content | safe }}
Expand Down
3 changes: 3 additions & 0 deletions templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{% block content %}
<main class="container max-w-2xl m-auto py-10 px-4" id="main-content">
<article class="prose dark:prose-dark max-w-none">
{% if page.featured_image %}
<img src="{{ page.featured_image }}" alt="Featured Image for {{ page.title }}" class="featured-image" />
{% endif %}
<h1 class="text-6xl font-bold mb-4 text-links quicksand-700">{{ title }}</h1>
<p class="text-2md post-meta mb-4 pb-2 text-accent italic border-b border-primary"><span class="date">{{ date }}</span> &middot; <span class="author">{{ author }}</span></p>
{% if featured_image %}
Expand Down

0 comments on commit 6c431a4

Please sign in to comment.