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

Send portions of sidebar to top on narrow screens; fix global search bar on dynamic pages #1537

Merged
merged 2 commits into from
Jun 18, 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
61 changes: 30 additions & 31 deletions django/cantusdb_project/articles/templates/article_detail.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
{% extends "base.html" %}
{% extends "base_page_with_side_cards.html" %}
{% load helper_tags %} {# for recent_articles #}
{% block content %}
<div class="container">
<title>{{ article.title }} | Cantus Database</title>
{% block title %}
<title>{{ article.title }} | Cantus Database</title>
{% endblock %}

{% block uppersidebar %}
<div class="search-bar mb-3">
{% include "global_search_bar.html" %}
</div>
{% endblock %}

{% block maincontent %}
<h3>
{{ article.title }}
</h3>
<div class="row">
<div class="p-3 col-lg-8 bg-white rounded main-content">
<h3>
{{ article.title }}
</h3>
<div class="row">
<div class="col">
<div class="container">
<div class="container text-wrap">
<small>Submitted by <a href="{% url 'user-detail' article.author.id %}">{{ article.author }}</a> on {{ article.date_created|date:"D, m/d/Y - H:i" }}</small>
<div style="padding-top: 1em;">
{{ article.body.html|safe }}
</div>
</div>
<div class="col">
<div class="container">
<div class="container text-wrap">
<small>Submitted by <a href="{% url 'user-detail' article.author.id %}">{{ article.author }}</a> on {{ article.date_created|date:"D, m/d/Y - H:i" }}</small>
<div style="padding-top: 1em;">
{{ article.body.html|safe }}
</div>
</div>
</div>
</div>
<div class="col p-0 sidebar">
<div class="search-bar mb-3">
{% include "global_search_bar.html" %}
</div>
<div class="card mt-3 w-100">
<div class="card-header">
What's New
</div>
<div class="card-body">
{% recent_articles %}
</div>
</div>
</div>
{% endblock %}
{% block lowersidebar %}
<div class="card">
<div class="card-header">
What's New
</div>
<div class="card-body">
{% recent_articles %}
</div>
</div>

</div>
{% endblock %}
70 changes: 33 additions & 37 deletions django/cantusdb_project/articles/templates/article_list.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,39 @@
{% extends "base.html" %}
{% load helper_tags %} {# for recent_articles #}
{% block content %}
<div class="container">
<title>What's New | Cantus Database</title>
{% extends "base_page_with_side_cards.html" %}
{% load helper_tags %} {# for recent_articles #}\
{% block title %}
<title>What's New | Cantus Database</title>
{% endblock %}
{% block uppersidebar %}
<div class="search-bar mb-3">
{% include "global_search_bar.html" %}
</div>
{% endblock %}
{% block maincontent %}
<h3>What's New</h3>
{% for article in articles %}
<div class="row">
<div class="p-3 col-lg-8 bg-white rounded main-content">
<h3>What's New</h3>
{% for article in articles %}
<div class="row">
<div class="col">
<small>{{ article.date_created|date:"D, m/d/Y - H:i" }}</small>
<h4>
<a href="{% url 'article-detail' article.id %}">{{ article.title }}</a>
</h4>
<div class="container">
<small>
{{ article.body.html|safe|truncatechars_html:3000 }}
</small>
</div>
</div>
<div class="col">
<small>{{ article.date_created|date:"D, m/d/Y - H:i" }}</small>
<h4>
<a href="{% url 'article-detail' article.id %}">{{ article.title }}</a>
</h4>
<div class="container">
<small>
{{ article.body.html|safe|truncatechars_html:3000 }}
</small>
</div>
{% endfor %}
{% include "pagination.html" %}
<br>
</div>
<div class="col p-0 sidebar">
<div class="search-bar mb-3">
{% include "global_search_bar.html" %}
</div>

<div class="card mt-3 w-100">
<div class="card-header">
What's New
</div>
<div class="card-body">
{% recent_articles %}
</div>
</div>
</div>
{% endfor %}
{% include "pagination.html" %}
{% endblock %}
{% block lowersidebar %}
<div class="card">
<div class="card-header">
What's New
</div>
<div class="card-body">
{% recent_articles %}
</div>
</div>
</div>
{% endblock %}
Loading
Loading