<commit_before>(ns bulldog.components
  (:require [goog.dom :as gdom]
            [om.dom :as dom]
            [sablono.core :as html :refer-macros [html]]
            [om.next :as om :refer-macros [defui]]))


(defui EditorPage
  Object
  (render [this]
    (html
     [:div
      [:input {:placeholder "What's the title?"}]
      [:input {:placeholder "Give a short introduction"}]
      [:input {:placeholder "Write your article"}]
      [:div
       [:button "Cancel"]
       [:button "Publish"]]])))


(defui ArticlePage
  om/IQuery
  (query [this]
    '[(:content/article nil)])
  Object<commit_msg>add local input state<commit_after>(ns bulldog.components
  (:require [goog.dom :as gdom]
            [om.dom :as dom]
            [sablono.core :as html :refer-macros [html]]
            [om.next :as om :refer-macros [defui]]))


(defn onChange
  "Creates input callpack"
  [value component]
  (fn [event]
    (om/set-state!
     component
     (assoc
      (om/get-state component)
      value
      (.. event -target -value)))))



(defui EditorPage
  Object
  (render [this]
    (let [{:keys [title abstract article] :as local} (om/get-state this)]
      (html
       [:div
        [:input
         {:placeholder "What's the title?"
          :type :text
          :value title
          :onChange (onChange :title this)}]
        [:input
         {:placeholder "Give a short introduction"
          :type :text
          :value abstract
          :onChange (onChange :abstract this)}]
        [:input
         {:placeholder "Write your article"
          :type :text
          :value article
          :onChange (onChange :article this)}]
        [:div
         [:button {:onClick (fn [e] (-> js/document .-location (set! "#/")))} "Cancel" ]
         [:button "Publish"]]]))))

(defui ArticlePage
  om/IQuery
  (query [this]
    '[(:content/article nil)])
  Object
{'fraction_non_alphanumeric': 0.14674493062966915, 'fraction_numerical': 0.0, 'mean_word_length': 2.1833616298811545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6938224', 'n_tokens_mistral': 614, 'n_tokens_neox': 591, 'n_words': 169}