     (editing-options)]]
   )
 
+(defn story-link [story & [title]]
+  [:a {:href (urlfor/story (:username story) (:id story))}
+   (or (:title story) title)])
+
+(defn user-link [username]
+  [:a {:href (urlfor/user-index username)}
+   username])
 
 

(ns storemi.views.component
  (:require 
    [hiccup.page :refer [html5 include-css]]
    [storemi.models.db :refer [json-string]]
    [storemi.settings :as settings]
    [storemi.urlfor :as urlfor]))

(defn hidden-field [val & {:keys [name id class]}]
  (let [props {:type "hidden" 
               :name name 
               :value (or val "")
               :id id
               :class class}]


(defn story-editor [story & [script]]
  [:div {:id "create"}
   [:input {:id "disable-upload"
            :type :hidden
            :value (when settings/disable-upload "1")}]
   [:p "script"]
