{% extends "madga/studio/base.html" %} {% load i18n humanize madga_studio_tags %} {% block title %}{% trans "Dashboard" %} · {{ site.name|default:"MADGA" }}{% endblock %} {% block breadcrumbs %}{% trans "Dashboard" %}{% endblock %} {% block content %}

{{ greeting|default:_("Hello") }}, {{ request.user.first_name|default:request.user.username }}

{% now "l, j F Y" %} {% if stats.draft or stats.scheduled %} · {% blocktrans count drafts=stats.draft|default:0 with scheduled=stats.scheduled|default:0 trimmed %} You have {{ drafts }} draft {% plural %} You have {{ drafts }} drafts {% endblocktrans %} {% if stats.draft and stats.scheduled %} {% trans "and" %} {% endif %} {% if stats.scheduled %} {% blocktrans count n=stats.scheduled trimmed %} {{ n }} scheduled {% plural %} {{ n }} scheduled {% endblocktrans %} {% endif %}. {% endif %}

{# Total #}
{% studio_icon "post" size=13 %} {% trans "Total posts" %}
{{ stats.total|default:0 }}
{% if stats.created_last_30d %}
{% studio_icon "chevron-up" size=11 stroke=2.5 %} {% blocktrans with n=stats.created_last_30d %}+{{ n }} in 30 days{% endblocktrans %}
{% else %}
{% trans "No activity yet" %}
{% endif %} {% if stats.spark_total %} {% endif %}
{# Published #}
{% studio_icon "check" size=13 %} {% trans "Published" %}
{{ stats.published|default:0 }}
{% if stats.published_last_7d %}
{% studio_icon "chevron-up" size=11 stroke=2.5 %} {% blocktrans with n=stats.published_last_7d %}+{{ n }} this week{% endblocktrans %}
{% else %}
{% trans "Nothing published recently" %}
{% endif %} {% if stats.spark_published %} {% endif %}
{# Drafts #}
{% studio_icon "edit" size=13 %} {% trans "Drafts" %}
{{ stats.draft|default:0 }}
{% blocktrans count n=stats.scheduled|default:0 %}{{ n }} scheduled{% plural %}{{ n }} scheduled{% endblocktrans %}
{% if stats.spark_drafts %} {% endif %}
{# Views #}
{% studio_icon "eye" size=13 %} {% trans "Total views" %}
{{ stats.views_total|default:0 }}
{% if stats.views_delta_pct is not None %} {% if stats.views_delta_pct >= 0 %}
{% studio_icon "chevron-up" size=11 stroke=2.5 %} {% blocktrans with pct=stats.views_delta_pct %}+{{ pct }}% vs last month{% endblocktrans %}
{% else %}
{% studio_icon "chevron-down" size=11 stroke=2.5 %} {% blocktrans with pct=stats.views_delta_pct %}{{ pct }}% vs last month{% endblocktrans %}
{% endif %} {% else %}
{% trans "No history yet" %}
{% endif %} {% if stats.spark_views %} {% endif %}

{% trans "Recent posts" %}

{% trans "Latest on this site" %}

{% studio_btn label=_("View all") href="/studio/posts/" variant="ghost" size="sm" icon="chevron-right" %}
{% for post in recent_posts %}
{{ post.title|default:_("Untitled") }}
{% studio_badge post.status post.get_status_display %} {{ post.author.username|default:"—" }} {{ post.updated_at|date:"M j" }}
{% if post.status == 'published' %}
{% studio_icon "eye" size=13 stroke=2 %}{{ post.views }}
{% endif %}
{% empty %} {% studio_empty title=_("No posts yet") message=_("Create the first one and it'll show up here.") action_label=_("New post") action_href="/studio/posts/new/" %} {% endfor %}

{% trans "Activity" %}

{% trans "Latest changes on this site" %}

{% if recent_activity %} {% for ev in recent_activity %}
{{ ev.title|first|upper|default:"·" }}
{{ ev.label }}: {{ ev.title }}
{{ ev.when|naturaltime }}
{% endfor %} {% else %}
{% trans "When you publish or upload something, it'll show up here." %}
{% endif %}
{% endblock %}