﷽
اولین کامیت پروژه پایاچت
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ room.name }} - پیشنمایش{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="settings-layout">
|
||||
|
||||
<header class="settings-header">
|
||||
<a href="{% url 'index' %}" class="settings-back">→</a>
|
||||
<div class="settings-header-title">پیشنمایش</div>
|
||||
<form method="post" action="{% url 'join_room' room.id %}" style="margin: 0;">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="settings-header-save">
|
||||
{% if room.room_type == 'channel' %}🔔 عضویت{% else %}✅ پیوستن{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</header>
|
||||
|
||||
<div class="settings-body">
|
||||
|
||||
<div class="profile-card">
|
||||
<div class="profile-avatar">
|
||||
{% if room.avatar %}
|
||||
<img src="{{ room.avatar.url }}" alt="{{ room.name }}">
|
||||
{% else %}
|
||||
{{ room.name|first }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1 class="profile-name">{{ room.name }}</h1>
|
||||
<div class="profile-username">
|
||||
{% if room.room_type == 'channel' %}📢 کانال{% else %}👥 گروه{% endif %}
|
||||
· {{ member_count }} عضو
|
||||
</div>
|
||||
{% if room.description %}
|
||||
<p class="profile-bio">{{ room.description|linebreaksbr }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if preview_messages %}
|
||||
<div class="settings-group">
|
||||
<div class="settings-group-title">پیشنمایش پیامها</div>
|
||||
<div style="display: flex; flex-direction: column; gap: 10px; padding: 16px;">
|
||||
{% for m in preview_messages %}
|
||||
<div class="msg-wrap" style="max-width: 100%;">
|
||||
<a href="{% url 'user_profile' m.author.id %}" class="msg-avatar">
|
||||
{% if m.author.avatar %}
|
||||
<img src="{{ m.author.avatar.url }}" alt="{{ m.author.first_name }}">
|
||||
{% else %}
|
||||
{{ m.author.first_name|first }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<div class="msg" style="max-width: 100%;">
|
||||
<a href="{% url 'user_profile' m.author.id %}" class="msg-author-link">{{ m.author.first_name }}</a>
|
||||
: {{ m.text }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="join-cta">
|
||||
<form method="post" action="{% url 'join_room' room.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="join-btn">
|
||||
{% if room.room_type == 'channel' %}
|
||||
🔔 عضویت در کانال
|
||||
{% else %}
|
||||
✅ پیوستن به گروه
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user