Fix website title

This commit is contained in:
Alexander Rosenberg 2024-09-16 15:10:31 -07:00
parent a78e132b72
commit 87b47f9c94
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

159
web.lisp
View File

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