Files
wx/src/ui/header.sh
Christer Warén fbaa5780d9 Refactoring Code
2025-11-10 12:40:35 +02:00

31 lines
573 B
Bash

wxi-header(){
if [[ $2 == "h1" ]]
then
wxi-repeat "\n" 3
echo "=============================="
wxi-repeat " " $((30/2-${#1}/2))
echo -n "$wxiBold"
echo "$1"
echo -n "$wxiNormal"
echo "=============================="
fi
if [[ $2 == "h2" || -z $2 ]]
then
wxi-start
wxi-repeat " " $((30/2-6/2-${#1}/2))
echo -n "$wxiBold"
echo ">> $1 <<"
echo -n "$wxiNormal"
echo "------------------------------"
echo ""
fi
if [[ $2 == "h3" ]]
then
echo -n "$wxiBold"
echo "$1"
echo -n "$wxiNormal"
fi
}