my eye

Spaify page aside

Committed 2d5909

--- a/web.ts/index.ts
+++ b/web.ts/index.ts

 
         const dom = new DOMParser().parseFromString(xhr.responseText, "text/html")
         console.log(xhr.responseText)
-        const newElement = dom.querySelector("body > article")
-        const currentElement = _("article#content")['el']
-        currentElement.height = 0
-        appendAfter(currentElement, newElement)
-        currentElement.remove()
+
+        const newArticle = dom.querySelector("body > article")
+        const currentArticle = _("article#content")['el']
+        currentArticle.height = 0
+        appendAfter(currentArticle, newArticle)
+        currentArticle.remove()
+
+        const newAside = dom.querySelector("body > div")
+        const currentAside = _("aside div.page-related")['el']
+        currentAside.height = 0
+        appendAfter(currentAside, newAside)
+        currentAside.remove()
 
         document.body.scrollTop = document.documentElement.scrollTop = scroll
 
         upgradeTimestamps()
         // TODO bindWebActions()
 
-        const h1 = newElement.querySelector("h1")
+        const h1 = newArticle.querySelector("h1")
         let title = ""  // owner
         if (h1)
             title = h1.textContent + "\u2009\u2014\u2009" + title

--- a/web/framework/__init__.py
+++ b/web/framework/__init__.py

             if title:
                 body += f"<header><h1>{title}</h1></header>"
             body += f"{tx.response.body}</article>"
+            body += "<div class=page-related>"
+            if "aside" in tx.response.body:
+                body += tx.response.body.aside
+            body += "</div>"
             tx.response.body = body
         elif tx.response.headers.content_type == "text/html" and not naked:
             if not isinstance(tx.response.body, str):