Adds breadcrumbs

This commit is contained in:
Mouse Reeve 2022-02-11 14:58:40 -05:00
parent b95f0ed287
commit 89de03bffe
4 changed files with 53 additions and 20 deletions

View file

@ -6,24 +6,24 @@
{% block content %} {% block content %}
<header class="block content"> <header class="block">
<h1 class="title"> <h1 class="title">
{% blocktrans with title=book|book_title %} {% blocktrans with title=book|book_title %}
Links for "<em>{{ title }}</em>" Links for "<em>{{ title }}</em>"
{% endblocktrans %} {% endblocktrans %}
</h1> </h1>
</header>
<nav class="breadcrumb subtitle" aria-label="breadcrumbs"> <nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul> <ul>
<li><a href="{% url 'book' book.id %}">{{ book|book_title }}</a></li> <li><a href="{% url 'book' book.id %}">{{ book|book_title }}</a></li>
<li class="is-active"> <li class="is-active">
<a href="#" aria-current="page"> <a href="#" aria-current="page">
{% trans "Edit links" %} {% trans "Edit links" %}
</a> </a>
</li> </li>
</ul> </ul>
</nav> </nav>
</header>
<section class="block content"> <section class="block content">
<div class="table-container"> <div class="table-container">

View file

@ -6,7 +6,6 @@
{% block header %} {% block header %}
{% trans "Announcement" %} {% trans "Announcement" %}
<a href="{% url 'settings-announcements' %}" class="has-text-weight-normal help">{% trans "Back to list" %}</a>
{% endblock %} {% endblock %}
{% block edit-button %} {% block edit-button %}
@ -14,7 +13,7 @@
<div class="control"> <div class="control">
<a class="button" href="{% url 'settings-announcements-edit' announcement.id %}"> <a class="button" href="{% url 'settings-announcements-edit' announcement.id %}">
<span class="icon icon-pencil m-0-mobile" aria-hidden="true"></span> <span class="icon icon-pencil m-0-mobile" aria-hidden="true"></span>
<span class="is-sr-only-mobile">{% trans "Edit Announcement" %}</span> <span class="is-sr-only-mobile">{% trans "Edit" %}</span>
</a> </a>
</div> </div>
<form class="control" action="{% url 'settings-announcements-delete' announcement.id %}" method="post"> <form class="control" action="{% url 'settings-announcements-delete' announcement.id %}" method="post">
@ -27,8 +26,20 @@
</div> </div>
{% endblock %} {% endblock %}
{% block panel %} {% block breadcrumbs %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'settings-announcements' %}">{% trans "Announcements" %}</a></li>
<li class="is-active">
<a href="#" aria-current="page">
{{ announcement.preview|truncatechars:30 }}
</a>
</li>
</ul>
</nav>
{% endblock %}
{% block panel %}
<div class="block content"> <div class="block content">
<dl> <dl>
<dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "Visible:" %}</dt> <dt class="is-pulled-left mr-5 has-text-weight-bold">{% trans "Visible:" %}</dt>

View file

@ -2,11 +2,31 @@
{% load i18n %} {% load i18n %}
{% block header %} {% block header %}
{% if announcement %} {% if announcement %}
{% trans "Edit Announcement" %} {% trans "Edit Announcement" %}
{% else %} {% else %}
{% trans "Create Announcement" %} {% trans "Create Announcement" %}
{% endif %} {% endif %}
{% endblock %}
{% block breadcrumbs %}
<nav class="breadcrumb subtitle" aria-label="breadcrumbs">
<ul>
<li><a href="{% url 'settings-announcements' %}">{% trans "Announcements" %}</a></li>
{% if announcement %}
<li>
<a href="{% url 'settings-announcements' announcement.id %}">
{{ announcement.preview|truncatechars:30 }}
</a>
</li>
{% endif %}
<li class="is-active">
<a href="#" aria-current="page">
Edit
</a>
</li>
</ul>
</nav>
{% endblock %} {% endblock %}
{% block panel %} {% block panel %}

View file

@ -9,6 +9,7 @@
<div class="columns is-mobile"> <div class="columns is-mobile">
<div class="column"> <div class="column">
<h1 class="title">{% block header %}{% endblock %}</h1> <h1 class="title">{% block header %}{% endblock %}</h1>
{% block breadcrumbs %}{% endblock %}
</div> </div>
<div class="column is-narrow"> <div class="column is-narrow">
{% block edit-button %}{% endblock %} {% block edit-button %}{% endblock %}
@ -16,6 +17,7 @@
</div> </div>
</header> </header>
<div class="block columns"> <div class="block columns">
<nav class="menu column is-one-quarter"> <nav class="menu column is-one-quarter">
<h2 class="menu-label"> <h2 class="menu-label">