Compare commits
3 Commits
9db739e56d
...
24432cd52a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24432cd52a | ||
|
|
9a1a4996bc | ||
|
|
1832c53980 |
@@ -70,7 +70,7 @@
|
||||
type="text"
|
||||
name="title"
|
||||
value=""
|
||||
placeholder="Post title..."
|
||||
placeholder="{{ 'Page title...' if is_page else 'Post title...' }}"
|
||||
class="w-full text-[36px] font-bold bg-transparent border-none outline-none
|
||||
placeholder:text-stone-300 mb-[8px] leading-tight"
|
||||
>
|
||||
@@ -101,7 +101,7 @@
|
||||
type="submit"
|
||||
class="px-[20px] py-[6px] bg-stone-700 text-white text-[14px] rounded-[8px]
|
||||
hover:bg-stone-800 transition-colors cursor-pointer"
|
||||
>Create Post</button>
|
||||
>{{ 'Create Page' if is_page else 'Create Post' }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,17 +1,6 @@
|
||||
{# Main panel fragment for HTMX navigation - post article content #}
|
||||
{# Main panel fragment for HTMX navigation - post/page article content #}
|
||||
<article class="relative">
|
||||
{# ❤️ like button - always visible in top right of article #}
|
||||
{% if g.user %}
|
||||
<div class="absolute top-2 right-2 z-10 text-8xl md:text-6xl">
|
||||
{% set slug = post.slug %}
|
||||
{% set liked = post.is_liked or False %}
|
||||
{% set like_url = url_for('blog.post.like_toggle', slug=slug)|host %}
|
||||
{% set item_type = 'post' %}
|
||||
{% include "_types/browse/like/button.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Draft indicator + edit link #}
|
||||
{# Draft indicator + edit link (shown for both posts and pages) #}
|
||||
{% if post.status == "draft" %}
|
||||
<div class="flex items-center justify-center gap-2 mb-3">
|
||||
<span class="inline-block px-3 py-1 rounded-full text-sm font-semibold bg-amber-100 text-amber-800">Draft</span>
|
||||
@@ -36,6 +25,18 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not post.is_page %}
|
||||
{# ── Blog post chrome: like button, excerpt, tags/authors ── #}
|
||||
{% if g.user %}
|
||||
<div class="absolute top-2 right-2 z-10 text-8xl md:text-6xl">
|
||||
{% set slug = post.slug %}
|
||||
{% set liked = post.is_liked or False %}
|
||||
{% set like_url = url_for('blog.post.like_toggle', slug=slug)|host %}
|
||||
{% set item_type = 'post' %}
|
||||
{% include "_types/browse/like/button.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if post.custom_excerpt %}
|
||||
<div class="w-full text-center italic text-3xl p-2">
|
||||
{{post.custom_excerpt|safe}}
|
||||
@@ -44,6 +45,8 @@
|
||||
<div class="hidden md:block">
|
||||
{% include '_types/blog/_card/at_bar.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if post.feature_image %}
|
||||
<div class="mb-3 flex justify-center">
|
||||
<img
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
type="text"
|
||||
name="title"
|
||||
value="{{ ghost_post.title if ghost_post else '' }}"
|
||||
placeholder="Post title..."
|
||||
placeholder="{{ 'Page title...' if post and post.is_page else 'Post title...' }}"
|
||||
class="w-full text-[36px] font-bold bg-transparent border-none outline-none
|
||||
placeholder:text-stone-300 mb-[8px] leading-tight"
|
||||
>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{# ── Post Settings Form ── #}
|
||||
{# ── Post/Page Settings Form ── #}
|
||||
{% set gp = ghost_post or {} %}
|
||||
{% set _is_page = post.is_page if post else False %}
|
||||
|
||||
{% macro field_label(text, field_for=None) %}
|
||||
<label {% if field_for %}for="{{ field_for }}"{% endif %}
|
||||
@@ -68,7 +69,7 @@
|
||||
{% call section('General', open=True) %}
|
||||
<div>
|
||||
{{ field_label('Slug', 'settings-slug') }}
|
||||
{{ text_input('slug', gp.slug or '', 'post-slug') }}
|
||||
{{ text_input('slug', gp.slug or '', 'page-slug' if _is_page else 'post-slug') }}
|
||||
</div>
|
||||
<div>
|
||||
{{ field_label('Published at', 'settings-published_at') }}
|
||||
@@ -83,7 +84,7 @@
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
{{ checkbox_input('featured', gp.featured, 'Featured post') }}
|
||||
{{ checkbox_input('featured', gp.featured, 'Featured page' if _is_page else 'Featured post') }}
|
||||
</div>
|
||||
<div>
|
||||
{{ field_label('Visibility', 'settings-visibility') }}
|
||||
@@ -176,7 +177,7 @@
|
||||
{% call section('Advanced') %}
|
||||
<div>
|
||||
{{ field_label('Custom template', 'settings-custom_template') }}
|
||||
{{ text_input('custom_template', gp.custom_template or '', 'custom-post.hbs') }}
|
||||
{{ text_input('custom_template', gp.custom_template or '', 'custom-page.hbs' if _is_page else 'custom-post.hbs') }}
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user