@lexho111/plainblog 0.6.6 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Blog.js CHANGED
@@ -403,8 +403,10 @@ export default class Blog {
403
403
  <h1>Blog</h1>
404
404
  <!-- Message container -->
405
405
  <div id="statusMessage"></div>
406
-
407
- <input type="password" class="form_element" name="password" placeholder="Password" required />
406
+ <label for="username">Username</label>
407
+ <input type="username" class="form_element" name="username" placeholder="username" required />
408
+ <label for="password">Password</label>
409
+ <input type="password" class="form_element" name="password" placeholder="password" required />
408
410
  <button class="btn" type="submit">Login</button>
409
411
  </form>
410
412
 
package/Formatter.js CHANGED
@@ -26,7 +26,7 @@ export function formatHTML(data) {
26
26
  const button = "";
27
27
  let form1 = "";
28
28
  if (data.loggedin) {
29
- form1 = `<form action="/" method="POST">
29
+ form1 = `<form id="createNew" action="/" method="POST">
30
30
  <h3>Add a New Article</h3>
31
31
  <input type="text" id="title" class="form_element new_title wide" name="title" placeholder="Article Title" required>
32
32
  <textarea id="content" class="form_element new_content wide" name="content" placeholder="Article Content" required></textarea>
@@ -34,7 +34,7 @@ export function formatHTML(data) {
34
34
  </form>
35
35
  <hr>`;
36
36
  }
37
- const form = ""; //form1;
37
+ const form = form1;
38
38
  return `${header(data.title)}
39
39
  <body>
40
40
  <nav>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexho111/plainblog",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "description": "A tool for creating and serving a minimalist, single-page blog.",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/fetchData.js CHANGED
@@ -191,19 +191,7 @@ function fillWithContent(title, content, date, id, targetContainer) {
191
191
  const loggedin = document.querySelector('a[href="/logout"]') !== null;
192
192
  if (loggedin) {
193
193
  const buttons = document.createElement("div");
194
- const editButton = document.createElement("div");
195
- const deleteButton = document.createElement("div");
196
- const somethingButton = document.createElement("div");
197
194
  buttons.setAttribute("class", "buttons");
198
- editButton.setAttribute("class", "btn edit");
199
- deleteButton.setAttribute("class", "btn delete");
200
- somethingButton.setAttribute("class", "btn light");
201
- editButton.textContent = "edit";
202
- deleteButton.textContent = "delete";
203
- somethingButton.textContent = "something else";
204
- buttons.appendChild(editButton);
205
- buttons.appendChild(deleteButton);
206
- buttons.appendChild(somethingButton);
207
195
 
208
196
  const actions = [
209
197
  { label: "edit", type: "edit", class: "btn edit" },
package/src/styles.css CHANGED
@@ -62,11 +62,16 @@ button {
62
62
  }
63
63
 
64
64
  .new_content {
65
- height: 500px;
65
+ height: 400px;
66
66
  resize: none;
67
67
  padding: 10px;
68
68
  }
69
69
 
70
+ #createNew {
71
+ width: 100%;
72
+ max-width: 93%;
73
+ }
74
+
70
75
  #search {
71
76
  float: right;
72
77
  margin: 5px;