{% extends 'base.html' %}

{% block title %}{{ announcement.title }} - 通知公告{% endblock %}

{% block head %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/announcement-detail.css') }}">
{% endblock %}

{% block content %}
<div class="announcement-detail-container">
    <div class="page-header">
        <a href="{{ url_for('announcement.announcement_list') }}" class="back-link">
            <i class="fas fa-arrow-left"></i> 返回公告列表
        </a>
        <h1>{{ announcement.title }}</h1>
    </div>

    <div class="announcement-meta">
        <div class="meta-item">
            <i class="fas fa-user"></i> 发布者: {{ announcement.publisher.username if announcement.publisher else '系统' }}
        </div>
        <div class="meta-item">
            <i class="fas fa-calendar-alt"></i> 发布时间: {{ announcement.created_at.strftime('%Y-%m-%d %H:%M:%S') }}
        </div>
        {% if announcement.is_top %}
        <div class="meta-item pinned">
            <i class="fas fa-thumbtack"></i> 置顶公告
        </div>
        {% endif %}
    </div>

    <div class="announcement-content">
        {{ announcement.content|safe }}
    </div>
</div>
{% endblock %}
