Added chat.
This commit is contained in:
parent
6c6c7354c8
commit
33b26ee59d
24
templates/_header.html
Normal file
24
templates/_header.html
Normal file
@ -0,0 +1,24 @@
|
||||
<nav>
|
||||
<div class="nav-container">
|
||||
<a href="/" class="logo">Rant</a>
|
||||
<div class="nav-links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/chat">Chat</a>
|
||||
<a href="/search">Search</a>
|
||||
{% if current_user %}
|
||||
<span>
|
||||
<a href="/profile/{{ current_user.id }}">Profile</a>
|
||||
<a href="/notifications">Notifications {% if notif_count > 0 %}<span style="color: var(--error);">({{ notif_count }})</span>{% endif %}</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="/logout" class="btn btn-secondary">Logout</a>
|
||||
</span>
|
||||
{% else %}
|
||||
<span>
|
||||
<button class="btn btn-secondary" onclick="showModal('login')">Login</button>
|
||||
<button class="btn" onclick="showModal('register')">Sign Up</button>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
1557
templates/chat.html
Normal file
1557
templates/chat.html
Normal file
File diff suppressed because it is too large
Load Diff
20
templates/index.html
Normal file
20
templates/index.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from 'components/rant_card.html' import render_rant_card %}
|
||||
|
||||
{% block navigation %}
|
||||
{% include '_header.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="sort-options">
|
||||
<a href="/?sort=recent" class="sort-btn {% if current_sort == 'recent' %}active{% endif %}">Recent</a>
|
||||
<a href="/?sort=top" class="sort-btn {% if current_sort == 'top' %}active{% endif %}">Top</a>
|
||||
<a href="/?sort=algo" class="sort-btn {% if current_sort == 'algo' %}active{% endif %}">Algorithm</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% for rant in rants %}
|
||||
{{ render_rant_card(rant) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user