20 lines
570 B
Bash
Executable file
20 lines
570 B
Bash
Executable file
#!/bin/bash
|
|
source templates/head.sh
|
|
source ${cfg[namespace]}/templates/header.shs
|
|
|
|
declare -A strings
|
|
|
|
strings[favourites]="No favorite videos found,<br>you can do it first! ^w^"
|
|
|
|
IFS=$'\n'
|
|
for i in $(tac storage/faves); do
|
|
IFS=':'
|
|
array=($i)
|
|
if [[ ${array[1]} == '' ]]; then
|
|
break
|
|
fi
|
|
strings[favourites]+="<div><a href='watch?v=${array[1]}'><img src='https://i.ytimg.com/vi/${array[1]}/mqdefault.jpg'><br><b>${array[@]:2:999}</b></a><br>Favourited by ${array[0]}</div>";
|
|
done
|
|
|
|
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/index.t"
|