mirror of
https://github.com/CoolnsX/my-website.git
synced 2025-12-20 07:15:19 +05:30
feat: use page.html instead of blog-page.html in blogs
This commit is contained in:
@@ -2,5 +2,5 @@
|
|||||||
title = "Blog Posts"
|
title = "Blog Posts"
|
||||||
sort_by = "date"
|
sort_by = "date"
|
||||||
template = "blog.html"
|
template = "blog.html"
|
||||||
page_template = "blog-page.html"
|
page_template = "page.html"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% block title %}{{ page.title }}{% endblock title %}
|
|
||||||
|
|
||||||
{% block head_extra %}
|
|
||||||
{% if page.description %}
|
|
||||||
<meta name="description" content="{{ page.description | safe }}">
|
|
||||||
{% endif %}
|
|
||||||
{% endblock head_extra %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<h1 class="text-4xl md:text-5xl font-extrabold mb-8 text-center">
|
|
||||||
{{ page.title }}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p class="subtitle">
|
|
||||||
{% if page.updated %}
|
|
||||||
Last Updated:
|
|
||||||
<strong class="text-sky-400">
|
|
||||||
<time datetime="{{ page.updated | date(format="%Y-%m-%d") }}">
|
|
||||||
{{ page.updated | date(format="%B %d, %Y") }}
|
|
||||||
</time>
|
|
||||||
</strong>
|
|
||||||
{% else %}
|
|
||||||
<strong class="text-sky-400">
|
|
||||||
<time datetime="{{ page.date | date(format="%Y-%m-%d") }}">
|
|
||||||
{{ page.date | date(format="%B %d, %Y") }}
|
|
||||||
</time>
|
|
||||||
</strong>
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% if page.extra.image %}
|
|
||||||
{% set image = page.extra.image %}
|
|
||||||
{% if image is starting_with("http") %}
|
|
||||||
{% set image_url = image %}
|
|
||||||
{% else %}
|
|
||||||
{% set image_url = get_url(path=image) %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="flex justify-center my-4">
|
|
||||||
<img
|
|
||||||
src="{{ image_url | safe }}"
|
|
||||||
alt="{{ page.title }}"
|
|
||||||
class="max-w-full max-h-100 object-cover border border-gray-600 rounded-2xl"
|
|
||||||
loading="lazy"
|
|
||||||
decoding="async"
|
|
||||||
onclick="openFullscreenImage(this)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="mt-6 text-xl text-gray-300">
|
|
||||||
{{ page.content | safe }}
|
|
||||||
</div>
|
|
||||||
{% endblock content %}
|
|
||||||
Reference in New Issue
Block a user