mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
style warning corrections
This commit is contained in:
parent
f4b0abe422
commit
c2789b85e2
11 changed files with 84 additions and 98 deletions
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
(defun send-message (user msg)
|
||||
(maphash (lambda (key value)
|
||||
(declare (ignore key))
|
||||
(create-span value :content (format nil "~A : ~A<br>" user msg))
|
||||
(setf (scroll-top value) (scroll-height value)))
|
||||
*global-list-box-hash*))
|
||||
|
|
@ -16,18 +17,15 @@
|
|||
(defun on-new-window (body)
|
||||
(load-css (html-document body) "/css/w3.css")
|
||||
(setf (title (html-document body)) "CLOG Chat")
|
||||
|
||||
|
||||
(let* ((backdrop (create-div body :class "w3-container w3-cyan"))
|
||||
|
||||
(form-box (create-div backdrop :class "w3-container w3-white"))
|
||||
|
||||
(start-form (create-form form-box))
|
||||
(caption (create-section start-form :h3 :content "Sign In"))
|
||||
(name-entry (create-form-element start-form :input :label
|
||||
(create-label start-form :content "Chat Handle:")))
|
||||
(ok-button (create-button start-form :content "OK"))
|
||||
(tmp (create-p start-form))
|
||||
|
||||
(chat-box (create-form form-box))
|
||||
(tmp (create-br chat-box))
|
||||
(messages (create-div chat-box))
|
||||
|
|
@ -36,42 +34,37 @@
|
|||
(out-ok (create-button chat-box :content "OK"))
|
||||
(tmp (create-p chat-box))
|
||||
(user-name))
|
||||
|
||||
(declare (ignore caption)(ignore tmp))
|
||||
(setf (hiddenp chat-box) t)
|
||||
|
||||
(setf (background-color backdrop) :blue)
|
||||
(setf (height backdrop) "100vh")
|
||||
(setf (display backdrop) :flex)
|
||||
(setf (justify-content backdrop) :center)
|
||||
(setf (align-items backdrop) :center)
|
||||
|
||||
(setf (background-color form-box) :white)
|
||||
(setf (display backdrop) :flex)
|
||||
(setf (justify-content backdrop) :center)
|
||||
(setf (width form-box) "60vh")
|
||||
|
||||
(setf (height messages) "70vh")
|
||||
(setf (width messages) "100%")
|
||||
(set-border messages :thin :solid :black)
|
||||
(setf (overflow messages) :scroll)
|
||||
|
||||
(set-on-click ok-button
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(setf (hiddenp start-form) t)
|
||||
(setf user-name (value name-entry))
|
||||
(setf (gethash user-name *global-list-box-hash*) messages)
|
||||
(setf (hiddenp chat-box) nil)))
|
||||
|
||||
(set-on-click out-ok
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(send-message user-name (value out-entry))
|
||||
(setf (value out-entry) "")))
|
||||
|
||||
(run body)
|
||||
(remhash user-name *global-list-box-hash*)))
|
||||
|
||||
(defun start-demo ()
|
||||
"Start demo."
|
||||
|
||||
(initialize #'on-new-window)
|
||||
(open-browser))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue