shi/templates/index.html.template

29 lines
1.4 KiB
Plaintext
Executable File

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<link rel="stylesheet" type="text/css" href="main.css"/>
<html>
<head>
<title>
/board/ - a board
</title>
</head>
<body>
<p style="text-align:center;font-size: 30px; margin: 0px;">
/board/ - a board
</p>
<p style="text-align:center;font-size: 14px; margin: 0px;">
a description for the board
</p>
<br>
<p style="text-align:left;font-size: 9px; margin-right: 25%; margin-left: 25%">
readdat () { read -r var; echo "$var" | grep -qE "[a-Z].*" || var=$2; echo "$var" > "$1"; };echo "Post to:"; read -r parent; echo "$parent" | grep -qE "([a-Z]|[1-9]).*" || exit;postdir=$(echo "$parent"-"$RANDOM");mkdir ./"$postdir" && cd ./"$postdir" || exit; echo "Name (blank for anonymous):";readdat "user" "Anonymous";echo "Title (blank for none):";readdat "title" "";echo "Absolute path to image (blank for none):";read -r imagepath; echo "$imagepath" | grep -qE "[a-Z].*" && if test -f "$imagepath"; then cp "$imagepath" .;else echo "could not find $imagepath";fi;echo "Post text (Ctrl-D to finish):"; cat > content; cd ..; tar -cf "$postdir".tar ./"$postdir";rm -rf "$postdir"; echo "posting..."; nc -q2 [the adress shi is at] [the port shi is running on] < "$postdir".tar
</p>
<br>
<div class="posts">
<!--BEGIN POSTS-->
<!--END POSTS-->
</div>
</body>
</html>