* templates extension change for Reasons™

merge-requests/6/head
Dominique Liberda 2023-01-18 01:08:05 +01:00
parent 0f5dfdc63f
commit 793229856a
23 changed files with 14 additions and 14 deletions

View File

@ -47,4 +47,4 @@ if [[ "${res[id]}" == '' ]]; then
fi
source "${cfg[namespace]}/templates/header.shs"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/channel.t"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/channel.html"

View File

@ -28,4 +28,4 @@ if [[ ! ${strings[fav]} ]]; then
fi
source "${cfg[namespace]}/templates/header.shs"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/fav.t"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/fav.html"

View File

@ -29,4 +29,4 @@ else
fi
source "${cfg[namespace]}/templates/header.shs"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/feed.t"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/feed.html"

View File

@ -20,4 +20,4 @@ for i in $(tac storage/faves); do
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"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/index.html"

View File

@ -22,4 +22,4 @@ else
strings[reason]=""
fi
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/login.t"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/login.html"

View File

@ -10,4 +10,4 @@ if [[ ${cfg[template]} == 'default' ]]; then
echo "Logged out successully. Redirecting.."
fi
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/logout.t"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/logout.html"

View File

@ -27,4 +27,4 @@ if [[ ! ${strings[playlist]} ]]; then
fi
source "${cfg[namespace]}/templates/header.shs"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/playlist.t"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/playlist.html"

View File

@ -18,4 +18,4 @@ else
strings[reason]=""
fi
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/register.t"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/register.html"

View File

@ -49,4 +49,4 @@ fi
#fi
source "${cfg[namespace]}/templates/header.shs"
render meow "${cfg[namespace]}/templates/themes/${cfg[template]}/search.t"
render meow "${cfg[namespace]}/templates/themes/${cfg[template]}/search.html"

View File

@ -32,4 +32,4 @@ if [[ ! ${strings[subscribe]} ]]; then
fi
source "${cfg[namespace]}/templates/header.shs"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/subscribe.t"
render_unsafe strings "${cfg[namespace]}/templates/themes/${cfg[template]}/subscribe.html"

View File

@ -64,7 +64,7 @@ if [[ "${get_data[v]}" ]]; then
cd ..
source templates/head.sh
source "${cfg[namespace]}/templates/header.shs"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/watch_error.t"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/watch_error.html"
return
fi
fi
@ -117,13 +117,13 @@ if [[ "${get_data[v]}" ]]; then
declare -A player
player[url]=$(xxd -p <<< "$url" | sed -E 's/.{2}/%&/g' | tr -d '\n')
player_render="$(render player "${cfg[namespace]}/templates/components/player_flash.t")"
player_render="$(render player "${cfg[namespace]}/templates/components/player_flash.html")"
else
declare -A player
player[@formats]="$formats"
player[@subs]="$subs"
player_render="$(render player "${cfg[namespace]}/templates/components/player.t")"
player_render="$(render player "${cfg[namespace]}/templates/components/player.html")"
fi
strings[upload_date]=$(date -d "$(echo $video | jq -r '.upload_date' | sed -E 's/..../&-/;s/....-../&-/')" "+%d %B %Y")
@ -228,7 +228,7 @@ if [[ "${get_data[v]}" ]]; then
source "${cfg[namespace]}/templates/header.shs"
echo "$player_render"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/watch.t"
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/watch.html"
else
source templates/head.sh
echo "pls add ?v param i'm still WiP"