-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
383 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
crates/rainbeam/templates/timelines/public_timeline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{% extends "base.html" %} {% block title %}{{ config.name }}{% endblock %} {% | ||
block head %} | ||
<meta name="description" content="{{ config.description }}" /> | ||
{% endblock %} {% block nav_left %} | ||
<a class="button active" href="/" title="Timeline"> | ||
{{ icon "house" }} | ||
<span class="desktop">{{ text "general:link.timeline" }}</span> | ||
<span class="mobile">{{ text "general:link.home" }}</span> | ||
</a> | ||
|
||
<a class="button" href="/inbox" title="My inbox"> | ||
{{ icon "inbox" }} | ||
<span class="flex items-center gap-2"> | ||
<span>{{ text "general:link.inbox" }}</span> | ||
{% if unread != 0 %} | ||
<span class="notification tr">{{ unread }}</span> | ||
{% endif %} | ||
</span> | ||
</a> | ||
{% endblock %} {% block nav_right %} | ||
<a class="button" href="/inbox/notifications" title="My notifications"> | ||
{{ icon "bell" }} {% if notifs != 0 %} | ||
<span class="notification tr">{{ notifs }}</span> | ||
{% endif %} | ||
</a> | ||
{% endblock %} {% block content %} | ||
<article> | ||
<main class="flex flex-col gap-2"> | ||
<div class="pillmenu convertible shadow"> | ||
<a href="/" class="active" | ||
><span>{{ text "timelines:link.timeline" }}</span></a | ||
> | ||
<a href="/inbox/posts" | ||
><span>{{ text "timelines:link.posts" }}</span></a | ||
> | ||
<a href="/inbox/global" | ||
><span>{{ text "timelines:link.global" }}</span></a | ||
> | ||
</div> | ||
|
||
<div class="pillmenu convertible shadow"> | ||
<a href="/public" class="active" | ||
><span>{{ text "timelines:link.public" }}</span></a | ||
> | ||
<a href="/"><span>{{ text "timelines:link.following" }}</span></a> | ||
</div> | ||
|
||
<div class="flex justify-between items-center gap-2"> | ||
<h5>Feed</h5> | ||
<div class="flex justify-between"> | ||
<div></div> | ||
<a href="/search?driver=0" class="button secondary bold"> | ||
{{ icon "search" }} {{ text "general:link.search" }} | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<!-- pagination buttons --> | ||
{% if page != 0 %} | ||
<div class="flex justify-center items-center gap-4 w-full"> | ||
<a class="button primary" href="?page=0"> | ||
{{ text "general:text.view_full_feed" }} | ||
</a> | ||
</div> | ||
{% endif %} | ||
|
||
<!-- feed --> | ||
<div class="flex flex-col gap-4" id="feed"> | ||
<include-partial | ||
src="/_app/timelines/public_timeline.html?page={{ page }}" | ||
uses="app:clean_date_codes,app:link_filter,app:hook.alt,app:hook.partial_embeds,app:hook.check_reactions" | ||
instant="true" | ||
outerhtml="true" | ||
></include-partial> | ||
</div> | ||
</main> | ||
</article> | ||
|
||
<script> | ||
setTimeout(() => { | ||
trigger("questions:carp"); | ||
}, 100); | ||
|
||
use("app", (app) => { | ||
app["hook.attach_to_partial"]( | ||
"/_app/timelines/public_timeline.html", | ||
"/public", | ||
document.getElementById("feed"), | ||
document.body, | ||
parseInt("{{ page }}"), | ||
).then(() => { | ||
console.log("partial end"); | ||
document.getElementById("feed").innerHTML += | ||
`<div class="w-full flex flex-col gap-2"> | ||
<hr /> | ||
<p class="w-full flex justify-center fade"> | ||
You've reached the end | ||
</p> | ||
</div>`; | ||
}); | ||
}); | ||
</script> | ||
|
||
{% if let Some(profile) = profile %} {% let other = profile.clone() %} {% if | ||
profile.username == other.username %} | ||
<div id="is_self"></div> | ||
{% endif %} {% let raw_metadata = | ||
crate::routing::pages::clean_metadata_raw(other.metadata) %} {% include | ||
"components/theming.html" %} {% endif %} {% call super() %} {% endblock %} |
Oops, something went wrong.