Browse Source

A bit of frontend changes.

master
Silas Vedder 2 years ago
parent
commit
4888987971
  1. 4
      chapter.lisp
  2. 15
      clog.lisp

4
chapter.lisp

@ -27,7 +27,9 @@
(create-div (create-web-content (create-web-main canvas))))
(defmethod display-chapter-or-book (canvas (chapter chapter))
(chapter-to-clog chapter (book/chapter-window canvas)))
(let ((div (book/chapter-window canvas)))
(chapter-to-clog chapter div)
div))
(defmethod load-chapter (canvas (book string) (chapter string))
(let* ((bk (s:find-book d:*bible* book))

15
clog.lisp

@ -3,6 +3,7 @@
(in-package #:cl-bible.clog)
(defvar *body*)
(defvar *text* nil)
(defun lift-search-window (body search)
(let ((result (mapcar #'car (l:lift-search search))))
@ -32,10 +33,12 @@
(v:verse-to-string verse)))
(lambda (obj)
(declare (ignore obj))
(ch:load-chapter canvas
(when *text* (destroy *text*))
(setf *text* (ch:load-chapter canvas
(v:bname verse)
(v:chapter verse)))))
results)))
(v:chapter verse))))))
results)
content))
(defun reload (window)
(lambda (obj)
@ -85,12 +88,14 @@
(set-on-submit form1
(lambda (obj)
(declare (ignore obj))
(ch:load-position body (value passage))))
(when *text* (destroy *text*))
(setf *text* (ch:load-position body (value passage)))))
(create-form-element form3 :submit :value "Search phrase")
(set-on-submit form3
(lambda (obj)
(declare (ignore obj))
(search-in-bible (value search) d:*bible* body)))))
(when *text* (destroy *text*))
(setf *text* (search-in-bible (value search) d:*bible* body))))))
(defun on-new-window (body)
(setf *body* body)

Loading…
Cancel
Save