diff --git a/patterns/questionnaire.org b/patterns/questionnaire.org new file mode 100644 index 0000000..ffe5bdb --- /dev/null +++ b/patterns/questionnaire.org @@ -0,0 +1,43 @@ +#+name: social-media-questionnaire + +This org file demonstrate the creation of a questionnaire. + +#+begin_src lisp :results none + + (defpackage feat-questionnaire + (:use :cl) + (:import-from + :cl-sbt + :with-page + :write-html-to-file) + (:import-from + :cl-sbt/grid + :con) + (:import-from + :cl-sbt/questionnaire + :questionnaire)) + + (in-package :feat-questionnaire) + + (write-html-to-file "questionnaire.html" + (spinneret:with-html-string + (with-page (:author "Marcus Kammer" :pagetitle "Questionnaire Example") + (con () + (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 diff --git a/questionnaire.org b/questionnaire.org deleted file mode 100644 index 7688a80..0000000 --- a/questionnaire.org +++ /dev/null @@ -1,258 +0,0 @@ -#+name: social-media-questionnaire -#+begin_src html :tangle questionnaire.html - - - - - - Bootstrap demo - - - -

Questionnaire Example

-

Introduction

-

Hello and thank you for participating in our customer research - questionnaire! Your feedback is incredibly important to us and will help - shape the way we enhance our products and services. - - This questionnaire should take no more than 10-15 minutes of your time. Rest - assured, all information will be kept strictly confidential and will only be - used for research purposes. - - Let's get started!

-
-
- How old are you? -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
  9. - -
  10. -
-
-
- Gender -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
-
-
- How many hours per day, on average, do you spend browsing the internet? -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
-
-
- Which of the following devices do you regularly use to browse the internet? (Select all that apply) -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
-
-
- Which social media platforms do you use regularly? (Select all that apply) -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
  9. - -
  10. -
  11. - -
  12. -
  13. - -
  14. -
  15. - -
  16. -
  17. - -
  18. -
-
-
- On average, how many hours per day do you spend on social media? -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
-
-
- What are your primary reasons for using social media? (Select up to three) -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
  9. - -
  10. -
-
-
- How often do you share or post content on your social media accounts? -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
  9. - -
  10. -
  11. - -
  12. -
-
-
- Have you ever made a purchase based on a social media advertisement? -
    -
  1. - -
  2. -
  3. - -
  4. -
-
-
- How often do you use the internet to research products or services before making a purchase? -
    -
  1. - -
  2. -
  3. - -
  4. -
  5. - -
  6. -
  7. - -
  8. -
  9. - -
  10. -
-
- -
- - - -#+end_src -#+begin_src lisp :results none - - (defpackage feat-questionnaire - (:use :cl) - (:import-from - :cl-sbt - :with-page - :write-html-to-file) - (:import-from - :cl-sbt/questionnaire - :questionnaire)) - - (in-package :feat-questionnaire) - - (write-html-to-file "questionnaire.html" - (spinneret:with-html-string - (with-page (:author "Marcus Kammer" :pagetitle "Questionnaire Example") - (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