update. 完成分类显示与详情页显示效果

This commit is contained in:
2026-04-01 18:54:42 +08:00
parent 777ca50328
commit 414dc0ee95
23 changed files with 359 additions and 707 deletions
+1 -1
View File
@@ -47,7 +47,7 @@
{% if items %}
{% for item in items %}
<li class="news-item">
<a href="{% url "front:article_detail" pk=item.id %}"
<a href="{% url route|default:"front:article_detail" pk=item.id %}"
style="text-decoration: none;color: black;">
<div class="news-title-wrapper">
+5 -4
View File
@@ -1,9 +1,10 @@
{% load static %}
{% for menu in menus %}
<!-- 新闻中心 -->
<li class="{% if request.resolver_match.kwargs.url == menu.url %}active{% endif %}">
<a href="{% url 'front:menu' main=menu.code %}">{{ menu.title }}</a>
</li>
<!-- 新闻中心 -->
<li class="{% if menu.code in request.path %}active{% endif %}">
<a href="{% url 'front:menu' main=menu.code %}">{{ menu.title }}</a>
</li>
{% endfor %}