[ prog / sol / mona ]

prog


SchemeBBS [part 2]

87 2022-05-13 13:37

Please add thread headlines to the webpage title.

--- a/bbs.scm
+++ b/bbs.scm
@@ -111,9 +111,14 @@
 (define (title board)
   (string-append "/" board "/ - SchemeBBS"))
 
+(define (thread-title board headline)
+  (string-append "/" board "/ - " headline " - SchemeBBS"))
+
 ;;; views
 (define (thread-template board thread posts headline filter-func)
-  (main-template (title board) (thread-view board thread posts headline filter-func) "thread"))
+  (main-template (thread-title board headline)
+                 (thread-view board thread posts headline filter-func)
+                 "thread"))
 
 (define (list-template board threads)
   (main-template (title board) (list-view board threads)))
@@ -125,7 +130,9 @@
   (main-template (title board) (preferences-view board query-string-list)))
 
 (define (retry-thread-template board headline message flash)
-  (main-template (title board) (make-thread-form board headline message flash) "thread"))
+  (main-template (thread-title board headline)
+                 (make-thread-form board headline message flash)
+                 "thread"))
 
 (define (retry-post-template board thread frontpage? message flash)
   (main-template (title board) `(dl ,(make-post-form board thread frontpage? message flash)) "thread"))
112


VIP:

do not edit these