mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
Merge branch 'main' into 127-profile-link
# Conflicts: # static/css/styles.css
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
<a class="text-orange" href="{% url "version-list" %}">Versions</a> > 1.78
|
||||
<a class="text-orange" href="{% url "version-list" %}">Versions</a> > {{ version.name }}
|
||||
</div>
|
||||
|
||||
<div class="flex mt-4">
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="md:w-3/4 px-3 md:px-0 mx-3 md:mx-0">
|
||||
<div class="mb-6">
|
||||
<span class="inline uppercase text-green bg-green/10 rounded text-lg w-auto px-3 py-1">Current Version</span>
|
||||
<span class="inline uppercase {% if current_version %}text-green bg-green/10{% else %}text-orange bg-charcoal{% endif %} rounded text-lg w-auto px-3 py-1">{% if current_version %}Current Version{% else %}Past Version{% endif %}</span>
|
||||
</div>
|
||||
|
||||
<div class="border-b border-slate py-6">
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
<!-- Past Versions -->
|
||||
<div class="rounded bg-charcoal p-3 md:p-11 mx-3 space-y-8">
|
||||
<div class="mb-6">
|
||||
<span class="inline uppercase text-green bg-green/10 rounded text-lg w-auto px-3 py-1">Past Versions</span>
|
||||
<span class="inline uppercase text-orange bg-black rounded text-lg w-auto px-3 py-1">Past Versions</span>
|
||||
</div>
|
||||
|
||||
{% for v in version_list %}
|
||||
{% include "versions/_past_version_list_item.html" %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
<!-- End Past Versions -->
|
||||
|
||||
|
||||
@@ -25,3 +25,10 @@ class VersionDetail(DetailView):
|
||||
model = Version
|
||||
queryset = Version.objects.active()
|
||||
template_name = "versions/detail.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data()
|
||||
current_version = Version.objects.most_recent()
|
||||
obj = self.get_object()
|
||||
context["current_version"] = bool(current_version == obj)
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user