wtleeiv / soc

Stream of Consciousness - a flexible html writer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SOC - Stream of Consciousness

a flexible html writer

How to Install

  • best used with lww
  • clone this repo and lww repo into a location within ASDF source registry (eg. ~/.roswell/local-projects/)
    • if you have no idea what the ASDF source registry is, check this out
  • now that both projects are found by quicklisp you are ready to start writing web apps in lisp!!

How to Use

Example body_html.lisp

(soc:soc
  (:body
   (:div :class container
         (:header
          (:h1 "Todo Lisp")

          (:label :class "hide-completed"
                  (:input :type "checkbox" "Hide completed tasks"))

          (:form :class "new-task"
                 (:input :type text :name text :placeholder "Type to add a task")))

         (:ul
          ("{{#each tasks}}")
          ("{{> task}}")
          ("{{/each}}")))))

Produces body.html

<body>
	<div class="container">
		<header>
			<h1>Todo Lisp
			</h1>
			<label class="hide-completed">
				<input type="checkbox">Hide completed tasks
			</label>
			<form class="new-task">
				<input type="text" name="text" placeholder="Type to add a task">
			</form>
		</header>
		<ul>
			{{#each tasks}}
			{{> task}}
			{{/each}}
		</ul>
	</div>
</body>

About

Stream of Consciousness - a flexible html writer

License:MIT License


Languages

Language:Common Lisp 100.0%