{% extends "base.html" %} {% block body_class %}software-page{% endblock %} {% macro sw_board(cat_name, icon_name, color, items, total, more_url="") %}

{{ cat_icon(icon_name) }} {{ cat_name }} {{ total }} {% if more_url %}更多 →{% endif %}

{% for s in items %}{% include "_sw_card.html" %}{% endfor %}
{% endmacro %} {% macro vuln_shield() %} {% endmacro %} {% macro vuln_block(blk) %}

{{ vuln_shield() }} {{ blk['title'] or '漏洞补丁专区' }} {{ blk['vulns'] | length }} 更多 →

{% for v in blk['vulns'] %} {% set sev = severities.get(v['severity'], severities['medium']) %}
{{ sev[0] }} {{ v['title'] }} {% if v['cve_no'] %}{{ v['cve_no'] }}{% endif %}
{% if v['affected_product'] %}影响:{{ v['affected_product'] }}{% if v['affected_version'] %}({{ v['affected_version'] }}){% endif %} · {% endif %} 补丁 {{ v['file_count'] }} 个 · 发布于 {{ v['created_at'][:10] }}
查看详情
{% else %}

暂无漏洞通告

{% endfor %}
{% endmacro %} {% block content %} {% set S = site_settings() %} {% if layout %} {# ---------- 区块驱动布局 ---------- #} {% for unit in layout %} {% if unit['row'] %}
{% for blk in unit['row'] %} {{ sw_board(blk['title'] or blk['cat']['name'], blk['cat']['icon'], blk['cat']['color'], blk['items'], blk['total'], "/?category=" ~ blk['cat']['id']) }} {% endfor %}
{% else %} {% set blk = unit['one'] %} {% if blk['type'] == "hero" %}

{{ S['hero_title'] }}

{{ S['hero_subtitle'] }}

{% elif blk['type'] == "chips" %}
全部 {% for c in cats %} {{ c['name'] }} {% endfor %}
{% if all_tags %}
标签 {% for t in all_tags %} #{{ t['name'] }} {{ t['n'] }} {% endfor %}
{% endif %} {% elif blk['type'] == "category" %} {{ sw_board(blk['title'] or blk['cat']['name'], blk['cat']['icon'], blk['cat']['color'], blk['items'], blk['total'], "/?category=" ~ blk['cat']['id']) }} {% elif blk['type'] == "vulns" %} {{ vuln_block(blk) }} {% elif blk['type'] == "announce" %}
{{ blk['cfg'].get('text', '') }}
{% elif blk['type'] == "links" %}
{% if blk['title'] %}

{{ blk['title'] }}

{% endif %}
{% elif blk['type'] == "html" %}
{% if blk['title'] %}

{{ blk['title'] }}

{% endif %}
{{ blk['html_content'] | safe }}
{% endif %} {% endif %} {% endfor %} {% else %} {# ---------- 默认布局(未配置区块 / 搜索筛选态) ---------- #}

{{ S['hero_title'] }}

{{ S['hero_subtitle'] }}

全部 {% for c in cats %} {{ c['name'] }} {% endfor %}
{% if all_tags %}
标签 {% for t in all_tags %} #{{ t['name'] }} {{ t['n'] }} {% endfor %}
{% endif %} {% if sections %} {% for sec in sections %} {{ sw_board(sec['cat']['name'], sec['cat']['icon'], sec['cat']['color'], sec['items'], sec['items'] | length) }} {% endfor %} {% elif items %}
{% for s in items %}{% include "_sw_card.html" %}{% endfor %}
{% else %}

{% if q or cur_tag or cur_cat %}没有符合条件的软件,换个关键词试试{% else %}暂无软件,请管理员到后台添加{% endif %}

{% endif %} {% endif %} {% endblock %}