include hiccup library and small functioning example, don't merge until it looks nice.
This commit is contained in:
parent
04402da472
commit
ec62e36ee3
@ -42,8 +42,8 @@ $ java -cp target/pronouns-standalone.jar clojure.main -m pronouns.web
|
||||
|
||||
Then browse to localhost:5000
|
||||
|
||||
You can also just run quickstart.sh which will do all of these things for you. Do it like this
|
||||
You can also just run quickstart.sh which will do all of these things for you. Do it like this to get an example running on port 666
|
||||
|
||||
```
|
||||
$ ./quickstart.sh
|
||||
$ ./quickstart.sh 666
|
||||
```
|
||||
|
@ -10,6 +10,7 @@
|
||||
[ring/ring-devel "1.2.2"]
|
||||
[ring-basic-authentication "1.0.5"]
|
||||
[environ "0.5.0"]
|
||||
[hiccup "1.0.5"]
|
||||
[com.cemerick/drawbridge "0.0.6"]]
|
||||
:min-lein-version "2.0.0"
|
||||
:plugins [[environ/environ.lein "0.2.1"]]
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
export port=$1
|
||||
lein uberjar
|
||||
java -cp target/pronouns-standalone.jar clojure.main -m pronouns.web
|
||||
open http://localhost:5000/ze/zir
|
||||
open http://localhost:"$port"/ze/zir
|
||||
|
@ -1,16 +1,23 @@
|
||||
(ns pronouns.pages
|
||||
(:require [clojure.string :as s]
|
||||
[pronouns.util :as u]))
|
||||
[pronouns.util :as u]
|
||||
[hiccup.core :refer :all]))
|
||||
|
||||
(defn subject-example
|
||||
[subject]
|
||||
[:span#blah [:b subject] " went to the park."])
|
||||
|
||||
(defn format-pronoun-examples
|
||||
[subject object possessive-determiner possessive-pronoun reflexive]
|
||||
(s/join "\n"
|
||||
[(str subject " went to the park")
|
||||
(html (subject-example subject))
|
||||
(str "I went with " object)
|
||||
(str subject " brought " possessive-determiner " frisbee")
|
||||
(str "at least I think it was " possessive-pronoun)
|
||||
(str subject " threw it to " reflexive)]))
|
||||
|
||||
|
||||
(defn parse-pronouns-with-lookup [pronouns-string pronouns-table]
|
||||
(let [inputs (s/split pronouns-string #"/")
|
||||
n (count inputs)]
|
||||
|
Loading…
Reference in New Issue
Block a user