diff --git a/web.lisp b/web.lisp index 9230f5f..6b2b201 100644 --- a/web.lisp +++ b/web.lisp @@ -343,86 +343,81 @@ reblocks bug.") (defmethod render ((page page)) "Render PAGE." (with-html - (:doctype) - (:html - (:head - (:title "Truth Table Generator")) - (:body - (with-slots (table error-box help-overlay) page - (render help-overlay) - (:h1 "Truth Table Generator") - (with-html-form (:POST (lambda (&key prop-str implicit-and - multi-char-names format - include-vars subexps latin - pretty - &allow-other-keys) - (handle-generate-request - page :prop-str prop-str - :implicit-and implicit-and - :multi-char-names multi-char-names - :format format - :include-vars include-vars - :subexps subexps - :pretty pretty - :latin latin))) - (:div :id "main-controls-wrapper" - (:input :id "prop-input-field" - :type "text" - :name "prop-str" - :placeholder "Proposition string...") - (:input :id "submit-button" - :type "submit" - :value "Generate") - (:button :id "help-button" - :onclick - "document.querySelector(\".help-overlay\").style.display = \"initial\"" - "Help")) - (:div :id "extra-controls-wrapper" - (:input :type "checkbox" - :name "implicit-and" - :checked t) - (:label :for "implicit-and" "Implicit And") - (:input :type "checkbox" - :name "multi-char-names" - :style "margin-left: 10px;") - (:label :for "multi-char-names" "Multi-character Variables") - (:input :type "checkbox" - :name "include-vars" - :checked t - :style "margin-left: 10px;") - (:label :for "include-vars" "Include Variables") - (:input :type "checkbox" - :name "subexps" - :checked t - :style "margin-left: 10px;") - (:label :for "subexps" "Include Sub-expressions") - (:input :type "checkbox" - :name "pretty" - :checked t - :style "margin-left: 10px;") - (:label :for "pretty" "Pretty Print") - (:input :type "checkbox" - :name "latin" - :checked nil - :style "margin-left: 10px;") - (:label :for "latin" "Latin Truth Values") - (:select :name "format" :style "margin-left: 10px;" - (:option :value "html" "HTML") - (:option :value "latex" "LaTeX") - (:option :value "ascii" "ASCII") - (:option :value "unicode" "Unicode")))) - (render error-box) - (render table) - (:div :id "info-text" - (:span - "This website is free software under the terms of the AGPL" - "license version 3. You can find a copy of the license ") - (:a :href "https://www.gnu.org/licenses/agpl-3.0.html" - "here") - (:span ". You can find the source of this website ") - (:a :href "https://git.zander.im/Zander671/truth-table" - "here") - (:span "."))))))) + (:body + (with-slots (table error-box help-overlay) page + (render help-overlay) + (:h1 "Truth Table Generator") + (with-html-form (:POST (lambda (&key prop-str implicit-and + multi-char-names format + include-vars subexps latin + pretty + &allow-other-keys) + (handle-generate-request + page :prop-str prop-str + :implicit-and implicit-and + :multi-char-names multi-char-names + :format format + :include-vars include-vars + :subexps subexps + :pretty pretty + :latin latin))) + (:div :id "main-controls-wrapper" + (:input :id "prop-input-field" + :type "text" + :name "prop-str" + :placeholder "Proposition string...") + (:input :id "submit-button" + :type "submit" + :value "Generate") + (:button :id "help-button" + :onclick + "document.querySelector(\".help-overlay\").style.display = \"initial\"" + "Help")) + (:div :id "extra-controls-wrapper" + (:input :type "checkbox" + :name "implicit-and" + :checked t) + (:label :for "implicit-and" "Implicit And") + (:input :type "checkbox" + :name "multi-char-names" + :style "margin-left: 10px;") + (:label :for "multi-char-names" "Multi-character Variables") + (:input :type "checkbox" + :name "include-vars" + :checked t + :style "margin-left: 10px;") + (:label :for "include-vars" "Include Variables") + (:input :type "checkbox" + :name "subexps" + :checked t + :style "margin-left: 10px;") + (:label :for "subexps" "Include Sub-expressions") + (:input :type "checkbox" + :name "pretty" + :checked t + :style "margin-left: 10px;") + (:label :for "pretty" "Pretty Print") + (:input :type "checkbox" + :name "latin" + :checked nil + :style "margin-left: 10px;") + (:label :for "latin" "Latin Truth Values") + (:select :name "format" :style "margin-left: 10px;" + (:option :value "html" "HTML") + (:option :value "latex" "LaTeX") + (:option :value "ascii" "ASCII") + (:option :value "unicode" "Unicode")))) + (render error-box) + (render table) + (:div :id "info-text" + (:span "This website is free software under the terms of the AGPL" + "license version 3. You can find a copy of the license ") + (:a :href "https://www.gnu.org/licenses/agpl-3.0.html" + "here") + (:span ". You can find the source of this website ") + (:a :href "https://git.zander.im/Zander671/truth-table" + "here") + (:span ".")))))) (defmethod get-dependencies ((page page)) (append @@ -456,12 +451,14 @@ reblocks bug.") (call-next-method))) (defapp truth-table-app - :prefix *default-prefix*) + :prefix *default-prefix* + :name "Truth Table Generator") (defmethod reblocks/page:init-page ((app truth-table-app) (url-path string) expire-at) "Main entry point for webpage." (declare (ignorable app url-path expire-at)) + (setf (reblocks/page:get-title) "Truth Table Generator") (make-instance 'page)) (defparameter *command-line-spec*