diff options
Diffstat (limited to 'templates/activities')
-rw-r--r-- | templates/activities/_hashtag.html | 11 | ||||
-rw-r--r-- | templates/activities/_menu.html | 13 | ||||
-rw-r--r-- | templates/activities/explore_tag.html | 16 | ||||
-rw-r--r-- | templates/activities/search.html | 8 | ||||
-rw-r--r-- | templates/activities/tag.html | 16 |
5 files changed, 63 insertions, 1 deletions
diff --git a/templates/activities/_hashtag.html b/templates/activities/_hashtag.html new file mode 100644 index 0000000..19233e5 --- /dev/null +++ b/templates/activities/_hashtag.html @@ -0,0 +1,11 @@ +<a class="option" href="{{ hashtag.urls.timeline }}"> + <i class="fa-solid fa-hashtag"></i> + <span class="handle"> + {{ hashtag.display_name }} + </span> + {% if not hide_stats %} + <span> + Post count: {{ hashtag.stats.total }} + </span> + {% endif %} +</a> diff --git a/templates/activities/_menu.html b/templates/activities/_menu.html index 1ebe940..58295a9 100644 --- a/templates/activities/_menu.html +++ b/templates/activities/_menu.html @@ -6,6 +6,9 @@ <a href="{% url "notifications" %}" {% if current_page == "notifications" %}class="selected"{% endif %} title="Notifications"> <i class="fa-solid fa-at"></i> Notifications </a> + <a href="{% url "explore" %}" {% if current_page == "explore" %}class="selected"{% endif %} title="Explore"> + <i class="fa-solid fa-hashtag"></i> Explore + </a> <a href="{% url "local" %}" {% if current_page == "local" %}class="selected"{% endif %} title="Local"> <i class="fa-solid fa-city"></i> Local </a> @@ -19,13 +22,21 @@ <a href="{% url "search" %}" {% if top_section == "search" %}class="selected"{% endif %} title="Search"> <i class="fa-solid fa-search"></i> Search </a> + {% if current_page == "tag" %} + <a href="{% url "tag" hashtag.hashtag %}" class="selected" title="Tag {{ hashtag.display_name }}"> + <i class="fa-solid fa-hashtag"></i> {{ hashtag.display_name }} + </a> + {% endif %} <a href="{% url "settings" %}" {% if top_section == "settings" %}class="selected"{% endif %} title="Settings"> <i class="fa-solid fa-gear"></i> Settings </a> - {% else %} + {% else %} <a href="{% url "local" %}" {% if current_page == "local" %}class="selected"{% endif %} title="Local Posts"> <i class="fa-solid fa-city"></i> Local Posts </a> + <a href="{% url "explore" %}" {% if current_page == "explore" %}class="selected"{% endif %} title="Explore"> + <i class="fa-solid fa-hashtag"></i> Explore + </a> <h3></h3> {% if config.signup_allowed %} <a href="{% url "signup" %}" {% if current_page == "signup" %}class="selected"{% endif %} title="Create Account"> diff --git a/templates/activities/explore_tag.html b/templates/activities/explore_tag.html new file mode 100644 index 0000000..b2fd79d --- /dev/null +++ b/templates/activities/explore_tag.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}#{{ hashtag.display_name }} Timeline{% endblock %} + +{% block content %} +<div class="timeline-name">Explore Trending Tags</div> + +<section class="icon-menu"> + {% for hashtag in page_obj %} + {% include "activities/_hashtag.html" %} + {% empty %} + No tags are trending yet. + {% endfor %} + +</section> +{% endblock %} diff --git a/templates/activities/search.html b/templates/activities/search.html index 3cff2a2..5137740 100644 --- a/templates/activities/search.html +++ b/templates/activities/search.html @@ -18,4 +18,12 @@ {% include "activities/_identity.html" %} {% endfor %} {% endif %} + {% if results.hashtags %} + <h2>Hashtags</h2> + <section class="icon-menu"> + {% for hashtag in results.hashtags %} + {% include "activities/_hashtag.html" with hide_stats=True %} + {% endfor %} + </section> + {% endif %} {% endblock %} diff --git a/templates/activities/tag.html b/templates/activities/tag.html new file mode 100644 index 0000000..a319b6a --- /dev/null +++ b/templates/activities/tag.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}#{{ hashtag.display_name }} Timeline{% endblock %} + +{% block content %} + <div class="timeline-name"><i class="fa-solid fa-hashtag"></i>{{ hashtag.display_name }}</div> + {% for post in page_obj %} + {% include "activities/_post.html" %} + {% empty %} + No posts yet. + {% endfor %} + + {% if page_obj.has_next %} + <div class="load-more"><a class="button" href=".?page={{ page_obj.next_page_number }}">Next Page</a></div> + {% endif %} +{% endblock %} |