update. 完善基础信息配置以及页面链接处理

This commit is contained in:
2026-04-02 00:49:21 +08:00
parent b8d53a4c2e
commit 66dd4916d1
17 changed files with 218 additions and 275 deletions
+106 -97
View File
@@ -1,26 +1,22 @@
{% load static %}
{% load footer_tags %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}XXXXXXX官网</title>
<title>{% block title %}{% endblock %}{{ site_info.title }}</title>
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
</head>
<body>
<!-- 顶部 -->
<header class="top-header">
<span></span>
<div class="header-container flex">
<img src="{% static 'images/logo.png' %}" class="logo" alt="">
<div>
<h1>XXXXXXX官网</h1>
<p>CHANGBAI MOUNTAIN FIRE AND RESCUE BRIGADE</p>
<h1>{{ site_info.title }}</h1>
<p>{{ site_info.e_title }}</p>
<p>CHANGBAI MOUNTAIN FIRE AND RESCUE BRIGADE</p>
</div>
</div>
<div></div>
@@ -45,29 +41,13 @@
<li class="{% if request.resolver_match.url_name == 'news' %}active{% endif %}">
<a href="{% url 'front:news' %}">新闻中心</a>
</li>
{% show_main_menu %}
{% for menu in menus %}
<!-- 新闻中心 -->
{##}
{# <!-- 信息公开 -->#}
{# <li class="{% if request.resolver_match.url_name == 'info' %}active{% endif %}">#}
{# <a href="{% url 'front:info' %}">信息公开</a>#}
{# </li>#}
{# <!-- 党建引领 -->#}
{# <li class="{% if request.resolver_match.url_name == 'party' %}active{% endif %}">#}
{# <a href="{% url 'front:party' %}">党建引领</a>#}
{# </li>#}
{# <!-- 办事服务 -->#}
{# <li class="{% if request.resolver_match.url_name == 'service' %}active{% endif %}">#}
{# <a href="{% url 'front:service' %}">办事服务</a>#}
{# </li>#}
{# <!-- 互动交流 -->#}
{# <li class="{% if request.resolver_match.url_name == 'interaction' %}active{% endif %}">#}
{# <a href="{% url 'front:interaction' %}">互动交流</a>#}
{# </li>#}
{# <!-- 消防科普 -->#}
{# <li class="{% if request.resolver_match.url_name == 'science' %}active{% endif %}">#}
{# <a href="{% url 'front:science' %}">消防科普</a>#}
{# </li>#}
<li class="{% if menu.code in request.path %}active{% endif %}">
<a href="{% url 'front:section' main=menu.code %}">{{ menu.title }}</a>
</li>
{% endfor %}
</ul>
</div>
<span></span>
@@ -86,75 +66,104 @@
</main>
<!-- 底部页脚:只需要写这一行,全站生效! -->
{% show_footer %}
<!-- 底部 -->
{#<footer class="footer">#}
{# <div class=" d-none d-md-block">#}
{# <div class="row"#}
{# style="align-items: center;justify-content: space-evenly;padding: 15px 0;background-color: #F5F5F5;width: 100%!important;margin-left: 0 !important;gap: 10px;">#}
{# <div style="display: flex;align-items: center;">#}
{# <img src="{% static "icons/link.svg" %}" alt="" style="width: 13px; height: 13px; object-fit: contain;">#}
{# <a href="#"#}
{# style="margin-left: 6px; text-decoration: none; color: #13227a; font-size: 14px; white-space: nowrap;">#}
{# 友情链接#}
{# </a>#}
{# </div>#}
{# <div style="width: 280px;">#}
{# <select class="form-control" id="exampleFormControlSelect1"#}
{# x-placement="市政府网站"#}
{# >#}
{# <option>市政府网站</option>#}
{# <option>1</option>#}
{# <option>2</option>#}
{# <option>3</option>#}
{# <option>4</option>#}
{# <option>5</option>#}
{# </select>#}
{# </div>#}
{# <div style="display: block;width: 280px;">#}
{# <select class="form-control" id="exampleFormControlSelect1"#}
{# x-placement="国内消防站点"#}
{# >#}
{# <option>国内消防站点</option>#}
{# <option>1</option>#}
{# <option>2</option>#}
{# <option>3</option>#}
{# <option>4</option>#}
{# <option>5</option>#}
{# </select>#}
{# </div>#}
{# </div>#}
{# </div>#}
{# <div class="footer-info">#}
{# <div class="row">#}
{# <div class="col-lg-3 col-md-6 text-center">#}
{# <img src="{% static 'images/red.png' %}">#}
{# <img class="footerImg" src="{% static 'images/jiucuo.png' %}">#}
{# </div>#}
{# <div class="col-lg-6 d-none d-xl-block">#}
{# <p class="margin-top-20 font-size-14 line-height-2 footerColor">#}
{# 地址:某某市某某东路锦海·某某区大厦B栋14楼 邮编:xxxxxx#}
{# </p>#}
{# <p class="font-size-14 line-height-2 footerColor">#}
{# 服务热线:0791-00000000 传真:0791-00000000#}
{# </p>#}
{# </div>#}
{# <div class="col-lg-3 col-md-6 text-center">#}
{# <img src="/media/upload/images/2026/03/25/wechat.png" alt="">#}
{# <img class="footerImg" src="/media/upload/images/2026/03/25/weibo.png" alt="">#}
{# </div>#}
{# </div>#}
{# <div class="copyright text-center line-height-2 padding-bottom-20 padding-top-20">#}
{# <p class="margin-top-20 font-size-14 line-height-2 footerColor">#}
{# 版权所有:长白山消防救援支队 备案证号:<a href="http://beian.miit.gov.cn/"#}
{# target="_blank">辽ICP备xxxxxxxx号</a>#}
{# </p>#}
{# </div>#}
{# </div>#}
{#</footer>#}
<footer class="footer">
<!-- 友情链接区域 -->
<div class=" d-none d-md-block">
<div class="row"
style="align-items: center;justify-content: space-evenly;padding: 15px 0;background-color: #F5F5F5;width: 100%!important;margin-left: 0 !important;gap: 10px;">
<div style="display: flex;align-items: center;">
<img src="{% static "icons/link.svg" %}" alt=""
style="width: 13px; height: 13px; object-fit: contain;">
<a href="#"
style="margin-left: 6px; text-decoration: none; color: #13227a; font-size: 14px; white-space: nowrap;">
友情链接
</a>
</div>
{% for category in categories %}
<!-- 市政府网站下拉框 -->
<div style="width: 280px;">
<select class="form-control"
onchange="if(this.value) window.open(this.value)">
<option>{{ category.name }}</option>
{% for link in category.links.all %}
{% if link.is_active %}
<!-- 这里可以动态循环 FooterLink 关联的友情链接对象 -->
<option value="{{ link.url }}">{{ link.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
{% empty %}
<!-- 如果后台没配置分类,显示默认占位 -->
<div style="width: 280px;">
<select class="form-control">
<option>暂无链接</option>
</select>
</div>
{% endfor %}
</div>
</div>
<!-- 页脚主体信息区域 -->
<div class="footer-info">
<div class="row">
<!-- 左侧:Logo 图标 -->
<div class="col-lg-3 col-md-6 text-center">
<img src="{% static 'images/red.png' %}" alt="政府标识">
<img class="footerImg" src="{% static 'images/jiucuo.png' %}" alt="找错">
</div>
<!-- 中间:文字信息 -->
<div class="col-lg-6 d-none d-xl-block">
<!-- 地址与邮编 -->
<p class="margin-top-20 font-size-14 line-height-2 footerColor">
地址:{{ base_info.address }} 邮编:{{ base_info.postal }}
</p>
<!-- 电话与传真 -->
<p class="font-size-14 line-height-2 footerColor">
服务热线:{{ base_info.telephone }} 传真:{{ base_info.fax }}
</p>
</div>
<!-- 右侧:公众号/微博二维码 -->
<div class="col-lg-3 col-md-6 text-center">
<!-- 微信二维码 -->
{% if base_info.official_account %}
<img src="{{ base_info.official_account.url }}" alt="微信公众号"
style="width: 50px; height: 50px; margin-right: 10px;">
{% else %}
<span>暂无二维码</span>
{% endif %}
<!-- 微博二维码 -->
{% if base_info.weibo %}
<img class="footerImg" src="{{ base_info.weibo.url }}" alt="政务微博"
style="width: 50px; height: 50px;">
{% else %}
<span>暂无微博</span>
{% endif %}
</div>
</div>
<!-- 版权备案信息 -->
<div class="copyright text-center line-height-2 padding-bottom-20 padding-top-20">
<p class="margin-top-20 font-size-14 line-height-2 footerColor">
版权所有:{{ base_info.unit }} 备案证号:
<a href="http://beian.miit.gov.cn/" target="_blank">
{{ base_info.filing }}
</a>
</p>
</div>
</div>
</footer>
<script src="{% static 'js/jquery-3.6.0.min.js' %}"></script>
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
<!-- 页面底部脚本 -->
{% block extra_js %}{% endblock %}
</body>
</html>