Update README
This commit is contained in:
parent
229e1af869
commit
2e774dff79
2 changed files with 516 additions and 0 deletions
254
README.md
254
README.md
|
@ -132,6 +132,260 @@ Results in:
|
|||
</div>
|
||||
|
||||
|
||||
### Defining a Questionnaire
|
||||
|
||||
The following code demonstrates how to define a questionnaire using the
|
||||
questionnaire macro.
|
||||
|
||||
(cl-sbt/grid:con ()
|
||||
(cl-sbt/questionnaire:questionnaire "/submit"
|
||||
(:ask "How old are you?"
|
||||
:group "age"
|
||||
:choices (:single "18-24" "25-34" "35-44" "45-54" "55+"))
|
||||
(:ask "Your Gender?"
|
||||
:group "gender"
|
||||
:choices (:single "Male" "Female" "Non-Binary" "Prefer not to say"))
|
||||
(:ask "How many hours per day, on average, do you spend browsing the internet?"
|
||||
:group "internet"
|
||||
:choices (:single "Less than 1 hour" "1-3 hours" "3-5 hours" "5+ hours"))
|
||||
(:ask "Which of the following devices do you regularly use to browse the internet? (Select all that apply)"
|
||||
:group "devices"
|
||||
:choices (:multiple "Desktop" "Laptop" "Tablet" "Smartphone"))
|
||||
(:ask "Which social media platforms do you use regularly? (Select all that apply)"
|
||||
:group "socialmedia"
|
||||
:choices (:multiple "Facebook" "Twitter" "Instagram" "LinkedIn" "TikTok" "Snapchat" "Pinterest" "Youtube"))))
|
||||
|
||||
Results in:
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class=container>
|
||||
<form class=py-5 action=/submit method=get>
|
||||
<fieldset>
|
||||
<legend>How old are you?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=18-24> 18-24</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=25-34> 25-34</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=35-44> 35-44</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=45-54> 45-54</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=55+> 55+</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Your Gender?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Male> Male</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Female> Female</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Non-Binary> Non-Binary</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value="Prefer not to say"> Prefer not to say</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>How many hours per day, on average, do you spend browsing the internet?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="Less than 1 hour"> Less than 1 hour</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="1-3 hours"> 1-3 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="3-5 hours"> 3-5 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="5+ hours"> 5+ hours</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which of the following devices do you regularly use to browse the internet? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Desktop> Desktop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Laptop> Laptop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Tablet> Tablet</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Smartphone> Smartphone</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which social media platforms do you use regularly? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Facebook> Facebook</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Twitter> Twitter</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Instagram> Instagram</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=LinkedIn> LinkedIn</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=TikTok> TikTok</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Snapchat> Snapchat</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Pinterest> Pinterest</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Youtube> Youtube</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<button class="btn btn-primary" type=submit>Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTAINER -->
|
||||
|
||||
Results in:
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class=container>
|
||||
<form class=py-5 action=/submit method=get>
|
||||
<fieldset>
|
||||
<legend>How old are you?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=18-24> 18-24</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=25-34> 25-34</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=35-44> 35-44</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=45-54> 45-54</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=55+> 55+</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Your Gender?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Male> Male</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Female> Female</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Non-Binary> Non-Binary</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value="Prefer not to say"> Prefer not to say</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>How many hours per day, on average, do you spend browsing the internet?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="Less than 1 hour"> Less than 1 hour</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="1-3 hours"> 1-3 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="3-5 hours"> 3-5 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="5+ hours"> 5+ hours</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which of the following devices do you regularly use to browse the internet? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Desktop> Desktop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Laptop> Laptop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Tablet> Tablet</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Smartphone> Smartphone</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which social media platforms do you use regularly? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Facebook> Facebook</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Twitter> Twitter</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Instagram> Instagram</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=LinkedIn> LinkedIn</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=TikTok> TikTok</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Snapchat> Snapchat</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Pinterest> Pinterest</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Youtube> Youtube</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<button class="btn btn-primary" type=submit>Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTAINER -->
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
git clone https://git.sr.ht/~marcuskammer/cl-sbt ~/quicklisp/local-projects/cl-sbt/
|
||||
|
|
262
README.org
262
README.org
|
@ -138,6 +138,268 @@ Results in:
|
|||
: </ul>
|
||||
: </div>
|
||||
|
||||
*** Defining a Questionnaire
|
||||
|
||||
The following code demonstrates how to define a questionnaire using the
|
||||
questionnaire macro.
|
||||
|
||||
#+begin_src lisp :results output :export both :eval no-export
|
||||
(cl-sbt/grid:con ()
|
||||
(cl-sbt/questionnaire:questionnaire "/submit"
|
||||
(:ask "How old are you?"
|
||||
:group "age"
|
||||
:choices (:single "18-24" "25-34" "35-44" "45-54" "55+"))
|
||||
(:ask "Your Gender?"
|
||||
:group "gender"
|
||||
:choices (:single "Male" "Female" "Non-Binary" "Prefer not to say"))
|
||||
(:ask "How many hours per day, on average, do you spend browsing the internet?"
|
||||
:group "internet"
|
||||
:choices (:single "Less than 1 hour" "1-3 hours" "3-5 hours" "5+ hours"))
|
||||
(:ask "Which of the following devices do you regularly use to browse the internet? (Select all that apply)"
|
||||
:group "devices"
|
||||
:choices (:multiple "Desktop" "Laptop" "Tablet" "Smartphone"))
|
||||
(:ask "Which social media platforms do you use regularly? (Select all that apply)"
|
||||
:group "socialmedia"
|
||||
:choices (:multiple "Facebook" "Twitter" "Instagram" "LinkedIn" "TikTok" "Snapchat" "Pinterest" "Youtube"))))
|
||||
|
||||
#+end_src
|
||||
|
||||
Results in:
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
<!-- START CONTAINER -->
|
||||
<div class=container>
|
||||
<form class=py-5 action=/submit method=get>
|
||||
<fieldset>
|
||||
<legend>How old are you?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=18-24> 18-24</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=25-34> 25-34</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=35-44> 35-44</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=45-54> 45-54</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=55+> 55+</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Your Gender?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Male> Male</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Female> Female</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Non-Binary> Non-Binary</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value="Prefer not to say"> Prefer not to say</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>How many hours per day, on average, do you spend browsing the internet?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="Less than 1 hour"> Less than 1 hour</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="1-3 hours"> 1-3 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="3-5 hours"> 3-5 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="5+ hours"> 5+ hours</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which of the following devices do you regularly use to browse the internet? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Desktop> Desktop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Laptop> Laptop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Tablet> Tablet</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Smartphone> Smartphone</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which social media platforms do you use regularly? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Facebook> Facebook</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Twitter> Twitter</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Instagram> Instagram</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=LinkedIn> LinkedIn</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=TikTok> TikTok</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Snapchat> Snapchat</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Pinterest> Pinterest</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Youtube> Youtube</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<button class="btn btn-primary" type=submit>Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTAINER -->
|
||||
#+end_example
|
||||
|
||||
Results in:
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
<!-- START CONTAINER -->
|
||||
<div class=container>
|
||||
<form class=py-5 action=/submit method=get>
|
||||
<fieldset>
|
||||
<legend>How old are you?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=18-24> 18-24</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=25-34> 25-34</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=35-44> 35-44</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=45-54> 45-54</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=age value=55+> 55+</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Your Gender?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Male> Male</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Female> Female</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value=Non-Binary> Non-Binary</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=gender value="Prefer not to say"> Prefer not to say</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>How many hours per day, on average, do you spend browsing the internet?</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="Less than 1 hour"> Less than 1 hour</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="1-3 hours"> 1-3 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="3-5 hours"> 3-5 hours</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=radio name=internet value="5+ hours"> 5+ hours</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which of the following devices do you regularly use to browse the internet? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Desktop> Desktop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Laptop> Laptop</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Tablet> Tablet</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=devices value=Smartphone> Smartphone</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Which social media platforms do you use regularly? (Select all that apply)</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Facebook> Facebook</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Twitter> Twitter</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Instagram> Instagram</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=LinkedIn> LinkedIn</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=TikTok> TikTok</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Snapchat> Snapchat</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Pinterest> Pinterest</label>
|
||||
<li>
|
||||
<label class=form-label>
|
||||
<input type=checkbox name=socialmedia value=Youtube> Youtube</label>
|
||||
</ol>
|
||||
<hr class=my-4>
|
||||
</fieldset>
|
||||
<button class="btn btn-primary" type=submit>Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- END CONTAINER -->
|
||||
#+end_example
|
||||
|
||||
** Installation
|
||||
|
||||
#+begin_src bash
|
||||
|
|
Loading…
Add table
Reference in a new issue