Files
Cedar-Django/closedverse_main/templates/closedverse_main/community_list.html
T
some weird guy 46844a7cfb hmm
User created communities are now sorted by posts. Some small bug fixes, changed lazy error messages.
2023-08-09 12:37:48 -07:00

101 lines
4.5 KiB
HTML

{% extends "closedverse_main/layout.html" %}
{% load closedverse_tags %}{% load closedverse_community %}{% block main-body %}
<div class="community-main">
<div id="community-eyecatch"></div>
</div>
<div class="community-top-sidebar">
<form action="{% url "main:community-search" %}" class="search">
<input maxlength="32" name="query" placeholder="Search all communities" type="text"><input title="Search" type="submit" value="q">
</form>
{% if user.is_warned %}
<div class="notice" style="background-color: #ffc783;border: 1px solid #ffb358;">
<p><b>WARNING</b>: You have been issued a warning by an administrator.
<div>
{% if user.get_warned_reason %}
<p>Reason: "{{ user.get_warned_reason }}"</p>
{% endif %}
</div>
</div>
{% endif %}
{% if announcements and request.user.is_authenticated %}
<div class="Announcements">
{% for announcements in announcements %}
<div class='Announcement-content'>
{% user_icon_container announcements.creator announcements.feeling %}
<a class='user-name' href={% url "main:user-view" announcements.creator.username %} {% if announcements.creator.color %}style=color:{{ announcements.creator.color }}{% endif %}>{{ announcements.creator }}</a><a class='timestamp"'> - {{ announcements.created }}</a>
<p>{{ announcements.body|linebreaksbr|urlize }}</p>
{% if announcements.screenshot %}<image class='Announcement-image' src={{ announcements.screenshot }}></image>{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% if WelcomeMSG and not request.user.is_authenticated %}
<div class="post-list-outline index-memo">
<h2 class="label">Welcome to Cedar!</h2>
{% for WelcomeMSG in WelcomeMSG %}
<h2>{{ WelcomeMSG.Title }}</h2>
<p>{{ WelcomeMSG.message|linebreaksbr|urlize }}</p>
{% if WelcomeMSG.image %}<image src={{ WelcomeMSG.image.url }}></image>{% endif %}
{% endfor %}
</div>
{% endif %}
{% if request.user.c_tokens > 0 %}<a class="big-button" href={% url "main:community-create" %}><span class="symbol-label">Create a community</span></a>{% endif %}
{% if availableads %}
<div class="adx">
<h3>User-Generated Ad</h3>
<p><a href="/help/whatads">What are user-generated ads?</a></p>
<a href="{{ ad.url }}"><img src="{{ ad.imageurl.url }}"></a>
</div>
{% endif %}
</div>
<div class="community-main">
{% if favorites %}
<h3 class="community-title symbol community-favorite-title">Favorite communities</h3>
<div class="card" id="community-favorite">
<ul>
{% for favorite in favorites %}
<li class="test-favorite-community">
<a href="{% url "main:community-view" favorite.id %}" class="icon-container">
<img src="{{ favorite.icon }}" class="icon">
</a>
</li>
{% endfor %}
<li class="read-more">
<a href="{% url "main:community-favorites" %}" class="favorite-community-link symbol"><span class="symbol-label">Show more</span></a>
</li>
</ul>
</div>
{% endif %}
{% if feature %}
{% community_page_element feature "Featured Communities" True %}
{% endif %}
{% if general %}{% community_page_element general "General Communities" %}{% endif %}
{% if game %}{% community_page_element game "Game Communities" %}{% endif %}
{% if special %}{% community_page_element special "Special Communities" %}{% endif %}
{% if user_communities %}{% community_page_element user_communities "Popular User-Created Communities" %}{% endif %}
{% if my_communities %}{% community_page_element my_communities "My Communities" %}{% endif %}
<a href="{% url "main:community-viewall" "gen" %}" class="big-button">Show more</a>
</div>
<div id="community-guide-footer">
<div id="guide-menu">
<a class="arrow-button" href="{% url "main:help-why" %}"><span>Why join?</span></a>
<a class="arrow-button" href="{% url "main:help-rules" %}"><span>{{ brand_name }} Rules</span></a>
{% if request.user.is_authenticated %}
<a class="arrow-button" href="{% url "main:my-data" %}"><span>My Data</span></a>
{% endif %}
<a class="arrow-button" href="{% url "main:help-faq" %}"><span>Frequently Asked Questions (FAQ)</span></a>
<a class="arrow-button" href="{% url "main:what-ads" %}"><span>What are user-generated ads?</span></a>
{% if settings.CLOSEDVERSE_PROD %}
<a class="arrow-button" href="{% url "main:help-contact" %}"><span>Contact information</span></a>
{% endif %}
<a class="arrow-button" href="https://github.com/ariankordi/closedverse"><span>Closedverse Github</span></a>
<a class="arrow-button" href="https://github.com/Mistake35/Cedar-Django"><span>Cedar-Django Github</span></a>
</div>
</div>
{% endblock %}