Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rows/cols; make gazette item tweakable #1730

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 47 additions & 51 deletions peachjam/templates/peachjam/gazette_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,60 +24,56 @@ <h1 class="my-4">
</h1>
{% endblock %}
{% include 'peachjam/_quick_search.html' %}
<div class="row">
{% block localities %}
{% if not locality %}
{% include 'peachjam/_gazette_localities.html' %}
{% endif %}
{% endblock %}
{% if doc_count %}
<h4 class="sans-serif text-muted mt-3 mb-0">
{% blocktrans trimmed count counter=doc_count %}
{{ counter }} gazette
{% plural %}
{{ counter }} gazettes
{% endblocktrans %}
</h4>
{% block years-list %}
<div class="col-md-10 mt-5 mb-5">
<div class="row">
{% for year in years %}
<div class="col-md-4 col-sm-6 col-12 mb-5 mr-3">
<div class="card">
<div class="card-body">
<h2 class="text-center fw-bold">
{% block gazette-year-link %}
{% if locality %}
<a href="{% url 'gazettes_by_year' locality.code year.year %}">{{ year.year }}</a>
{% else %}
<a href="{% url 'gazettes_by_year' year.year %}">{{ year.year }}</a>
{% endif %}
{% endblock %}
</h2>
<div class="text-center mb-3">
{% blocktrans trimmed count num_gazettes=year.count %}
{{ num_gazettes }} gazette
{% plural %}
{{ num_gazettes }} gazettes
{% endblocktrans %}
</div>
{% block monthly-chart %}
{% if locality %}
{% url 'gazettes_by_year' locality.code year.year as url %}
{% else %}
{% url 'gazettes_by_year' year.year as url %}
{% endif %}
{% include 'peachjam/_monthly_column_chart.html' %}
{% endblock %}
</div>
{% block localities %}
{% if not locality %}
{% include 'peachjam/_gazette_localities.html' %}
{% endif %}
{% endblock %}
{% if doc_count %}
<h4 class="text-muted my-3">
{% blocktrans trimmed count counter=doc_count %}
{{ counter }} gazette
{% plural %}
{{ counter }} gazettes
{% endblocktrans %}
</h4>
{% block years-list %}
<div class="row mt-5">
{% for year in years %}
<div class="col-md-4 col-sm-6 col-12 mb-5 mr-3">
<div class="card">
<div class="card-body">
<h2 class="text-center fw-bold">
{% block gazette-year-link %}
{% if locality %}
<a href="{% url 'gazettes_by_year' locality.code year.year %}">{{ year.year }}</a>
{% else %}
<a href="{% url 'gazettes_by_year' year.year %}">{{ year.year }}</a>
{% endif %}
{% endblock %}
</h2>
<div class="text-center mb-3">
{% blocktrans trimmed count num_gazettes=year.count %}
{{ num_gazettes }} gazette
{% plural %}
{{ num_gazettes }} gazettes
{% endblocktrans %}
</div>
{% block monthly-chart %}
{% if locality %}
{% url 'gazettes_by_year' locality.code year.year as url %}
{% else %}
{% url 'gazettes_by_year' year.year as url %}
{% endif %}
{% include 'peachjam/_monthly_column_chart.html' %}
{% endblock %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}
{% endif %}
</div>
{% endfor %}
</div>
{% endblock %}
{% endif %}
</div>
</section>
{% endblock %}
27 changes: 13 additions & 14 deletions peachjam/templates/peachjam/gazette_year.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,19 @@ <h2 class="mt-3" id="{{ forloop.counter }}">{{ month }} {{ year }}</h2>
</td>
</tr>
{% for gazette in items %}
<tr>
<td>
<a href="{{ gazette.get_absolute_url }}">{{ gazette.title }}</a>
</td>
<td>
<span class="d-none d-lg-block">{{ gazette.sub_publication|default:'' }}</span>
</td>
<td>
<span class="d-none d-lg-block">{{ gazette.number }}</span>
</td>
<td>
<span class="d-none d-lg-block">{{ gazette.date|date:"Y-m-d" }}</span>
</td>
</tr>
{% block gazette-item %}
<tr>
<td>
<a href="{{ gazette.get_absolute_url }}">{{ gazette.title }}</a>
</td>
<td>
<span class="d-none d-lg-block">{{ gazette.frbr_uri_number }}</span>
</td>
<td>
<span class="d-none d-lg-block">{{ gazette.date|date:"Y-m-d" }}</span>
</td>
</tr>
{% endblock %}
{% endfor %}
{% endif %}
{% endfor %}
Expand Down
Loading