{% extends "base.html" %} {% from "layout/icons.html" import icon %} {% block content %} {% macro since_last_update() %}

{{ _("Since the last update") }}

{% if signal is none %} — {% elif signal.updating %} … {% elif signal.commits == 0 %} {{ _("Up to date") }} {% else %} {% trans count=signal.commits %}{{ count }} commit behind{% pluralize %}{{ count }} commits behind{% endtrans %} {% endif %}

{%- if signal is none %}{{ _("Couldn't check for new commits just now.") }} {%- elif signal.updating %}{{ _("An update is running.") }} {%- elif signal.commits == 0 %}{{ _("The guide matches the branch.") }} {%- else %}{% trans count=signal.merges %}{{ count }} merge landed{% pluralize %}{{ count }} merges landed{% endtrans %}{% if signal.areas %} · {{ signal.areas[:3] | join(", ") }}{% endif %}{% endif -%}

{% if last_update %}

{% trans tokens=last_update.tokens|tokens, cost=last_update.cost_usd|dollars %}The last update used ~{{ tokens }} tokens ({{ cost }} at API prices).{% endtrans %}

{% endif %}
{% endmacro %} {% macro what_changed() %}

{{ _("What changed") }}

{% if unread_digests %} {{ unread_digests[0].title }}

{% trans count=unread_digests|length %}{{ count }} unread digest{% pluralize %}{{ count }} unread digests{% endtrans %}

{% elif latest_digest %} {{ latest_digest.title }}

{{ _("You're caught up.") }}

{% else %}

{{ _("No digest yet.") }}

{% endif %}
{% endmacro %} {% macro system_card() %} {% if system %}
{{ icon("system") }}

{{ _("Your system") }}

{% trans count=system.parts %}{{ count }} part{% pluralize %}{{ count }} parts{% endtrans %} · {% trans count=system.connections %}{{ count }} connection{% pluralize %}{{ count }} connections{% endtrans %}{{ _(", drawn from the code") }}

{{ _("See how it fits together") }}
{% endif %} {% endmacro %} {% macro documentation_card() %} {% if snapshot %}
{{ icon("metrics") }}

{{ _("Documentation") }}

{% if documentation and documentation.percent is not none %}

{% trans percent=documentation.percent %}{{ percent }}% of the guide's rationale is documented{% endtrans %}

{% if documentation.change is not none %}

{% trans change="%+d"|format(documentation.change) %}{{ change }} points since the last update{% endtrans %}

{% endif %} {% else %}

{{ _("How well the repository explains itself: rationale, commits, decisions and documents.") }}

{% endif %} {{ _("See what's documented") }}
{% endif %} {% endmacro %} {% macro repository_card() %} {% if snapshot and repository %}
{{ icon("repository") }}

{{ _("Repository") }}

{% if repository.commits is not none %}

{% trans count=repository.commits, commits=repository.commits|number %}{{ commits }} commit{% pluralize %}{{ commits }} commits{% endtrans %}

{% endif %}

{% if repository.first %}{% trans date=repository.first.isoformat() %}Started on {{ date }}{% endtrans %}{% if repository.code_lines is not none %} · {% endif %}{% endif %}{% if repository.code_lines is not none %}{% trans count=repository.code_lines, lines=repository.code_lines|number %}{{ lines }} line of code{% pluralize %}{{ lines }} lines of code{% endtrans %}{% endif %}

{{ _("See the repository's statistics") }}
{% endif %} {% endmacro %} {% macro browse_the_code() %}

{{ _("Browse the code") }}

{% if areas %} {% else %}

{% trans name=target %}No sources yet. Run codetrail update {{ name }} to read the repository.{% endtrans %}

{% endif %} {% if counts %}

{{ _("Facts:") }} {% for kind, count in counts %}{{ kind }} {{ count }}{% if not loop.last %} · {% endif %}{% endfor %}

{% endif %}
{% endmacro %}

{{ target }}

{% if nav.branch %}{{ nav.branch }}{% endif %}{% if snapshot %} · {{ snapshot.commit[:12] }} · {{ snapshot.taken_at | utc }}{% endif %}

{% if not guide_pages %}

{{ _("Run your first update") }}

{{ _("Codetrail reads the code for free, then your assistant writes the guide: concept pages, guided paths and checks. You'll see the estimate before anything is spent.") }}

{% trans name=target %}Or from a terminal: codetrail update {{ name }}{% endtrans %}

{% else %} {% if continue_reading %} {% set path, step, steps_learned, steps_total = continue_reading %}

{{ _("Continue where you left off") }}

{{ path.title }}

{{ step.title }}

{% trans learned=steps_learned, total=steps_total %}{{ learned }} of {{ total }} learned{% endtrans %}

{{ _("Continue") }} {{ icon("arrow") }}
{% elif nav.paths %}

{{ _("Every path learned") }}

{{ _("You've learned every guided path. Updates will tell you what changes.") }}

{% endif %}
{% if nav.paths %}
    {% for path, steps_learned, steps_total in nav.paths %}
  • {{ path.title }}{{ steps_learned }}/{{ steps_total }}
  • {% endfor %}
{% endif %}
{% if stale_pages %}

{{ _("Changed since you learned them") }}

{% endif %}

{{ _("Areas") }}

{% endif %}
{% endblock %}