{% if current_user.is_authenticated %}
                                {% set unread_count = get_unread_notifications_count(current_user.id) %}
                                {% if unread_count > 0 %}
                                    {{ unread_count }}
                                {% endif %}
                            {% endif %}
                        
                        {% if current_user.is_authenticated %}
                        
                            
                                
                            
                        {% endif %}
                    
                    
                    {% if current_user.is_authenticated %}
                    
                    {% else %}
                    
                    {% endif %}
                通知中心
{% if unread_count > 0 %} 全部标为已读 {% endif %}
                                {% set recent_notifications = get_recent_notifications(current_user.id, 5) %}
                                {% if recent_notifications %}
                                    {% for notification in recent_notifications %}
                                    
                                        
                                            
                                    
                                    {% endfor %}
                                {% else %}
                                    
                                        
                                {% endif %}
                            
                            
                            
                                查看所有通知
                            
                        {{ notification.title }}
{{ notification.content|striptags|truncate(50) }}
{{ notification.created_at }}暂无通知
                {% block content %}
                
                {% endblock %}