squashed bugs, made stuff neater, typical yada yada

-finally fixed favourites page for good
-made favourites and feed pages look Neater™
-maybe broke the search results page idk lmao
merge-requests/6/head
4 raccoons in a trenchcoat. / luna vivian 2023-04-20 00:38:15 +02:00
parent 96458c41a8
commit 4ddf2f784a
5 changed files with 12 additions and 10 deletions

View File

@ -1,4 +1,4 @@
<a href='/watch?v=${.id}'>
<img src='https://i.ytimg.com/vi/${.id}/mqdefault.jpg'><br>${.title}
</a> | ${.runtime} seconds | ${.views} views<br>
Uploaded by <a href='/channel/${.channel_id}'>${.channel}</a><br>
</a> | ${.runtime} seconds<br>
Uploaded by <a href='/channel/${.channel_id}'>${.channel}</a> · ${.views} views<br>

View File

@ -1,15 +1,16 @@
<h1>Your favourites</h1>
{{_info}}
{{_fav}}
<div style='display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));'>
{{start ?fav}}
{{start _fav}}
<div>
<a href='watch?v={{.id}}'>
<img src='https://i.ytimg.com/vi/{{.id}}/mqdefault.jpg'><br>
<b>{{.name}}</b>
</a><br>
</a>
</div>
{{end _fav}}
{{else ?fav}}
Meow? no faves?
{{end ?fav}}
</div>

View File

@ -1,17 +1,18 @@
<h1>Your Feed</h1>
You can unclutter your feed by going to your <a href="/subscribe.shs">subscribed channels</a>.<br><br>
You can unclutter your feed by going to your <a href="/subscribe.shs">list of subscribed channels</a>.<br><br>
<div style='display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));'>
{{start ?feed}}
{{start _feed}}
<div class='video-image-container'>
<a href='watch?v={{.id}}'>
<div class='video-image' style='background-image: url(http://i.ytimg.com/vi/{{.id}}/mqdefault.jpg)'></div>
{{.title}}
</a>
{{.date}}
<b>{{.title}}</b></a><br>
Uploaded <!--by {{.uploader}} -->on <b>{{.date}}</b>
</div>
{{end _feed}}
{{else ?feed}}
Eh. something went wrong. Check if you're logged in and if you <a href="/subscribe.shs">subscribe</a> to anyone :p
{{end ?feed}}
</div>

View File

@ -33,7 +33,7 @@ for i in $(tac storage/faves | grep -P "^$(session_get_username ${cookies[sh_ses
nested_add fav fav_
done
[[ ${fav_[id]} != '' ]] && strings[?sub]=true
[[ ${fav_[id]} != '' ]] && strings[?fav]=true
strings[_fav]="fav"
strings[_info]="info"

View File

@ -29,7 +29,7 @@ if session_verify "${cookies[sh_session]}"; then
while read i; do
feed_[id]="${video_id[$i]}"
feed_[title]="${video_title[$i]}"
feed_[date]="$(date -d "@${video_date[$i]}" "+%H:%M, %d %h %Y")"
feed_[date]="$(date -d "@${video_date[$i]}" "+%d %h %Y, %H:%M")"
feed_[uploader]="${video_uploader[$i]}"
#strings[feed]+="<div class='video-image-container'><a href='watch?v='><div class='video-image' style='background-image: url(http://i.ytimg.com/vi/${video_id[$i]}/mqdefault.jpg)'></div></a></div>"
nested_add feed feed_