From e1c6bb1eb669435d4c108e8ced76ad0e466d095e Mon Sep 17 00:00:00 2001 From: hyzen Date: Tue, 9 Jun 2026 18:30:41 +0530 Subject: [PATCH] Update: comment-box restructure --- docs/blog/what-is-education/index.html | 2 +- layouts/blog/single.html | 35 +++++++++++++------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/blog/what-is-education/index.html b/docs/blog/what-is-education/index.html index d47b764..bb561f5 100644 --- a/docs/blog/what-is-education/index.html +++ b/docs/blog/what-is-education/index.html @@ -19,4 +19,4 @@ All updates

What is Education?


What is Education? #

Education simply means “learning”. It’s a natural process.

Ratio of components in Education: #

50% Knowledge/Understanding, 30% Skills, 20% Experience.

Education vs Academics: #

Education and Academics are not the same thing. Academics is Education based of a curriculum and an institution. Plato discovered the word while describing his school of philosophy.

Academics system has evolved with time and got worst. Let’s see what the system has become nowadays: #

Extra bad: #

Education as a concept/implementation/system is good. -Academics is good only as a concept. It’s implementation and system is always the worst and corrupted.

Activities in Education: #

Read vs Study vs Research: #

  1. Read: Reading is about watching or interpreting something/someone to gain knowledge.

  2. Study: Studying is about interpreting a topic, going deeper and gaining some conscious understanding out of it.

  3. Research: Research is about studying a topic and then contributing to it with changes from your end.

Knowledge vs Entertainment: #

Example:

  1. The first book was to provide Knowledge/Understanding, but later books became a source of Entertainment (fiction).
  2. Videos can be used for both Knowledge/Understanding and Entertainment purposes. For example, for Knowledge/Understanding, there are documentaries, tutorial videos etc. For Entertainment, there are movies, funny videos etc.
Tags:
Categories:

Comments

\ No newline at end of file +Academics is good only as a concept. It’s implementation and system is always the worst and corrupted.

Activities in Education: #

Read vs Study vs Research: #

  1. Read: Reading is about watching or interpreting something/someone to gain knowledge.

  2. Study: Studying is about interpreting a topic, going deeper and gaining some conscious understanding out of it.

  3. Research: Research is about studying a topic and then contributing to it with changes from your end.

Knowledge vs Entertainment: #

Example:

  1. The first book was to provide Knowledge/Understanding, but later books became a source of Entertainment (fiction).
  2. Videos can be used for both Knowledge/Understanding and Entertainment purposes. For example, for Knowledge/Understanding, there are documentaries, tutorial videos etc. For Entertainment, there are movies, funny videos etc.
Tags:
Categories:

Comments

\ No newline at end of file diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 186cb9d..b5554a9 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -14,7 +14,6 @@

Comments

-
@@ -25,8 +24,7 @@ var username = localStorage.getItem('f4_username'); var isAdmin = false; - var statusEl = document.getElementById('comments-status'); - var listEl = document.getElementById('comments-list'); + var listEl = document.getElementById('comments-list'); // ── Helpers ── function escHtml(s) { @@ -192,11 +190,24 @@ return; } - isAdmin = !!data.is_admin; + isAdmin = !!data.is_admin; + username = data.username || null; - // Comment form for logged-in users + // ── Render comments first ── + if (!data.comments.length) { + var empty = document.createElement('p'); + empty.className = 'comments__empty'; + empty.textContent = 'No comments yet. Be the first!'; + listEl.appendChild(empty); + } else { + data.comments.forEach(function (c) { + listEl.appendChild(renderComment(c, 0)); + }); + } + + // ── Then: form (logged in) or login prompt (logged out) ── if (data.logged_in) { - var form = makeForm('Write a comment…', 'Post comment', function (text, done) { + var form = makeForm('Comment as ' + data.username + '…', 'Post comment', function (text, done) { fetch(BACKEND, { method: 'POST', headers: { 'Content-Type': 'application/json' }, @@ -217,18 +228,6 @@ msg.innerHTML = 'Log in or Sign up to comment.'; listEl.appendChild(msg); } - - if (!data.comments.length) { - var empty = document.createElement('p'); - empty.className = 'comments__empty'; - empty.textContent = 'No comments yet. Be the first!'; - listEl.appendChild(empty); - return; - } - - data.comments.forEach(function (c) { - listEl.appendChild(renderComment(c, 0)); - }); }) .catch(function () { listEl.innerHTML = '

Failed to load comments.

';