Refactoring Code
This commit is contained in:
30
src/ui/header.sh
Normal file
30
src/ui/header.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user