<div class="navbar-end">
{# Show a search bar for blog #}
{% if request.path.startswith("/blog") %}
+ {# Navigation for Blog Authors #}
+ {% if current_user and current_user.is_blog_author() %}
+ <a class="navbar-item {% if request.path == "/blog/drafts" %}is-active{% end %}" href="/blog/drafts">
+ {{ _("My Drafts") }}
+ </a>
+ {% end %}
+
<div class="navbar-item">
<form action="/blog" method="GET">
<div class="field">
{% block title %}{{ _("My Drafts") }}{% end block %}
-{% block main %}
- <div class="card">
- <div class="card-body">
- <h5>{{ _("My Drafts") }}</h5>
+{% block container %}
+ <section class="hero is-primary">
+ <div class="hero-body">
+ <div class="container">
+ <nav class="breadcrumb is-medium" aria-label="breadcrumbs">
+ <ul>
+ <li>
+ <a href="/">{{ _("Home") }}</a>
+ </li>
+ <li>
+ <a href="/blog">{{ _("Blog") }}</a>
+ </li>
+ <li class="is-active">
+ <a href="#" aria-current="page">{{ _("My Drafts") }}</a>
+ </li>
+ </ul>
+ </nav>
- {% if drafts %}
- {% for post in drafts %}
- <strong class="mb-0">
- <a href="/post/{{ post.slug }}">{{ post.title }}</a>
- </strong>
-
- <p class="text-muted small">
- {% if post.published_at %}
- <span class="text-danger">{{ _("Scheduled to be published %s") % locale.format_date(post.published_at, relative=False) }}</span>,
- {% end %}
+ <h1 class="title is-1">{{ _("My Drafts") }}</h1>
+ </div>
+ </div>
+ </section>
- {% if post.updated_at %}
- {{ _("Updated %s") % locale.format_date(post.updated_at) }}
- {% else %}
- {{ _("Created %s") % locale.format_date(post.created_at) }}
- {% end %}
- </p>
- {% end %}
+ <section class="section">
+ <div class="container">
+ {% if drafts %}
+ {% module BlogList(drafts, show_author=False) %}
{% else %}
- <p class="text-center text-muted my-4">
- {{ _("You currently do not have any drafts") }}
- </p>
+ <div class="notification">
+ {{ _("You don't have any drafts, yet") }}
+ </div>
{% end %}
- <div class="btn-toolbar justify-content-center">
- <a class="btn btn-primary" href="/compose">
- {{ _("Write a new post") }}
+ <div class="block">
+ <a class="button is-primary is-fullwidth" href="/blog/compose">
+ {{ _("Write a New Post") }}
</a>
</div>
</div>
- </div>
+ </section>
{% end block %}
</h5>
<h6 class="subtitle is-6">
- {{ locale.format_date(post.published_at, shorter=True, relative=relative) }}
+ {% if post.published_at %}
+ {{ locale.format_date(post.published_at, shorter=True, relative=relative) }}
+ {% elif post.created_at %}
+ {{ _("Created %s") % locale.format_date(post.created_at, shorter=True, relative=True) }}
+ {% end %}
{% if "lightningwirelabs.com" in post.tags %}
<span class="has-text-lwl">{{ _("by Lightning Wire Labs") }}</span>