thuja

social media without the bullshit
git clone git://kqueue.dev/thuja.git
Log | Files | Refs | README | LICENSE

commit 877ac9ccdb1402c4a4f1d49ad38e737267541340
parent 7b7906fbbac5a806b95b16950ac3a5379547e33a
Author: kqueue <kqueue@cocaine.ninja>
Date:   Mon,  2 Jan 2023 15:35:44 -0500

fixed bug

Diffstat:
Mthuja.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/thuja.go b/thuja.go @@ -485,7 +485,7 @@ func gethandler(w http.ResponseWriter, r *http.Request) { } else { image2 = fmt.Sprintf("<img src=\"%s/%s-%d.jpg\">\n", url, board, testicle.Id) } - result := fmt.Sprintf("<!DOCTYPE HTML>\n<html>\n<head>\n<title>%s</title>\n<link rel=\"stylesheet\" href=\"https://alloca.dev/style.css\" type=\"text/css\" title=\"default\"\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<header>\n<article>\n<h1>%s</h1>\n<p>%s</p>\n%s<h3>Comments:</h3>\n<p%s</p>\n<h4>Submit a comment:</h4><form action=\"/comment?board=%s&id=%d\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"text\">Text:</label>\n <input type=\"text\" id=\"text\" name=\"text\"><br><br>\n <input type=\"submit\" value=\"Submit\">\n</article>", testicle.Title, testicle.Title, testicle.Text, image2, comments, board, testicle.Id) + result := fmt.Sprintf("<!DOCTYPE HTML>\n<html>\n<head>\n<title>%s</title>\n<link rel=\"stylesheet\" href=\"https://kqueue.dev/style.css\" type=\"text/css\" title=\"default\"\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<header>\n<article>\n<h1>%s</h1>\n<p>%s</p>\n%s<h3>Comments:</h3>\n<p%s</p>\n<h4>Submit a comment:</h4><form action=\"/comment?board=%s&id=%d\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"text\">Text:</label>\n <input type=\"text\" id=\"text\" name=\"text\"><br><br>\n <input type=\"submit\" value=\"Submit\">\n</article>", testicle.Title, testicle.Title, testicle.Text, image2, comments, board, testicle.Id) fmt.Fprintf(w, result) return } else { @@ -495,12 +495,12 @@ func gethandler(w http.ResponseWriter, r *http.Request) { return } if shit == 0 { - fmt.Fprintf(w, "<!DOCTYPE HTML>\n<html>\n<head>\n<title>posts on %s</title>\n<link rel=\"stylesheet\" href=\"https://alloca.dev/style.css\" type=\"text/css\" title=\"default\"\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<header>\n<article><form action=\"/post?board=%s\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"title\">Title:</label>\n <input type=\"text\" id=\"title\" name=\"title\"><br><br>\n <label for=\"text\">Text:</label>\n <input type=\"text\" id=\"text\" name=\"text\"><br><br>\n<label for=\"image\">Image:</label>\n <input type=\"file\" id=\"image\" name=\"image\" accept = \"image/*\"><br><br>\n <input type=\"submit\" value=\"Submit\"></article>", board, board) + fmt.Fprintf(w, "<!DOCTYPE HTML>\n<html>\n<head>\n<title>posts on %s</title>\n<link rel=\"stylesheet\" href=\"https://kqueue.dev/style.css\" type=\"text/css\" title=\"default\"\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<header>\n<article><form action=\"/post?board=%s\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"title\">Title:</label>\n <input type=\"text\" id=\"title\" name=\"title\"><br><br>\n <label for=\"text\">Text:</label>\n <input type=\"text\" id=\"text\" name=\"text\"><br><br>\n<label for=\"image\">Image:</label>\n <input type=\"file\" id=\"image\" name=\"image\" accept = \"image/*\"><br><br>\n <input type=\"submit\" value=\"Submit\"></article>", board, board) return } postnum := shit var result string - result = fmt.Sprintf("<!DOCTYPE HTML>\n<html>\n<head>\n<title>posts on %s</title>\n<link rel=\"stylesheet\" href=\"https://alloca.dev/style.css\" type=\"text/css\" title=\"default\"\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<header>\n<article><h1>Submit your own post</h1><form action=\"/post?board=%s\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"title\">Title:</label>\n <input type=\"text\" id=\"title\" name=\"title\"><br><br>\n <label for=\"text\">Text:</label>\n <input type=\"text\" id=\"text\" name=\"text\"><br><br>\n<label for=\"image\">Image:</label>\n <input type=\"file\" id=\"image\" name=\"image\" accept = \"image/*\"><br><br>\n <input type=\"submit\" value=\"Submit\">\n<h1>Posts:</h1>\n", board, board) + result = fmt.Sprintf("<!DOCTYPE HTML>\n<html>\n<head>\n<title>posts on %s</title>\n<link rel=\"stylesheet\" href=\"https://kqueue.dev/style.css\" type=\"text/css\" title=\"default\"\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n</head>\n<body>\n<header>\n<article><h1>Submit your own post</h1><form action=\"/post?board=%s\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"title\">Title:</label>\n <input type=\"text\" id=\"title\" name=\"title\"><br><br>\n <label for=\"text\">Text:</label>\n <input type=\"text\" id=\"text\" name=\"text\"><br><br>\n<label for=\"image\">Image:</label>\n <input type=\"file\" id=\"image\" name=\"image\" accept = \"image/*\"><br><br>\n <input type=\"submit\" value=\"Submit\">\n<h1>Posts:</h1>\n", board, board) for postnum != 0 { text, err := databaseget(strconv.Itoa(postnum), board) if err != nil {