Some minor changes to the UI

This commit is contained in:
Jacob 2024-02-06 16:17:21 +01:00
parent 8bec6cfb55
commit ca280783fd
4 changed files with 10 additions and 8 deletions

View file

@ -124,7 +124,7 @@ $Database->exec("INSERT INTO pages(username, date, endpoint, file) VALUES('$User
if ($Redirect == "admin") {
header("Location: admin.php?action=users");
} else if ($Redirect == "edit") {
header("Location: edit.php?action=write");
header("Location: edit.php?action=write&e=saved");
} else {
header("Location: /");
}

View file

@ -68,7 +68,6 @@ $html = printHeader($html, 0);
$html .= "\t\t\t<h1>Editing '$defaultEndpoint'</h1>\n";
$html .= "\t\t\t\t<form class=\"pageWriteForm\" action=\"/post-edit.php?redir=edit-page&id=$postID\" method=\"post\">\n";
$html .= "\t\t\t\t\t<label for=\"pageWriteArea\">Body</label><br>\n";
$html .= "\t\t\t\t\t<br><textarea id=\"pageWriteArea\" class=\"pageWriteArea\" name=\"body\" rows=\"32\" cols=\"98\">$defaultText</textarea>\n";
$html .= "\t\t\t\t\t<br><br><label for=\"message\">Message</label>\n";
$html .= "\t\t\t\t\t<input type=\"text\" name=\"message\" placeholder=\"Fix typo in blog post\"><br>\n";

View file

@ -152,7 +152,8 @@ if ($Action == "write") {
}
}
$html .= "\t\t\t\t<p class=\"pageWarning\"><strong>Warning: Switching tab will delete changes made to the Markdown document. Press 'Save' to avoid this.</strong></p>\n";
$html .= "\t\t\t\t<p class=\"pageWarning\"><strong>Switching tab will delete changes made to the Markdown document. Press 'Save' to avoid this.</strong></p>\n";
$html .= "\t\t\t\t<form class=\"newForm\" action=\"/edit.php\"><input type=\"submit\" value=\"New\"></form>\n";
if ($postID == -1) {
$html .= "\t\t\t\t<form class=\"pageWriteForm\" action=\"/create.php?redir=edit\" method=\"post\">\n";
@ -164,7 +165,6 @@ if ($Action == "write") {
}
}
$html .= "\t\t\t\t\t<label for=\"pageWriteArea\">Body</label><br>\n";
$html .= "\t\t\t\t\t<br><textarea id=\"pageWriteArea\" class=\"pageWriteArea\" name=\"body\" rows=\"32\" cols=\"98\">$defaultText</textarea>\n";
$html .= "\t\t\t\t\t<br>\n";
$html .= "\t\t\t\t\t<br><label for=\"endpoint\">Public location</label>\n";
@ -174,8 +174,7 @@ if ($Action == "write") {
} else {
$html .= "\t\t\t\t\t<input type=\"text\" name=\"endpoint\" placeholder=\"/blog/unicorns-and-lollipops\"><br>\n";
}
$html .= "\t\t\t\t\t<br><input type=\"submit\" value=\"Save\"><br><br>\n";
$html .= "\t\t\t\t\t<br><input class=\"saveForm\" type=\"submit\" value=\"Save\">\n";
$html .= "\t\t\t\t</form>\n";
// add history button if we're editing an existing page
@ -194,7 +193,7 @@ if ($Action == "write") {
$html .= "\t\t\t\t<p class=\"pageError\">A file with this endpoint already exists.</p>\n";
} else if ($Error == "saved") { // not actually an error but i don't want to make this too complicated
$Date = date($dateFormat) . " at " . date($timeFormat);
$html .= "\t\t\t\t<p class=\"pageSuccess\">$Date: Page at endpoint '$defaultEndpoint' saved.</p>\n";
$html .= "\t\t\t\t<p class=\"pageSuccess\">$Date: Your changes have been saved.</p>\n";
}
} else if ($Action == "attachments") {
$html .= "\t\t\t\t<form class=\"pageFileUploadForm\" action=\"/upload.php?redir=edit\" method=\"post\" enctype=\"multipart/form-data\">\n";

View file

@ -3,6 +3,10 @@
src: URL('font.ttf') format('truetype');
}
.newForm {
text-align: left;
}
.barTitle {
font-size: 15pt;
font-family: Noto Sans;
@ -243,7 +247,7 @@ input[type=file]::file-selector-button {
}
.warning, .pageWarning, .adminWarning {
color: #ffff00;
color: #404040;
}
#sel {