<commit_before>(ns amindblowingworld.view_index
  (:require
    [hiccup
      [page :refer [html5]]
      [page :refer [include-js include-css]]]))

;(def map-legend []
;  ()
;)

(defn index-page []
  (html5
    [:head
      [:title "AMindBlowingWorld"]
      (include-js "/js/jquery-1.9.0.js")
      (include-js "/js/external.js")
      (include-js "/js/app.js")
      (include-css "/css/app.css")]
    [:body {:onload "initApp();"}
      [:h1 "AMindBlowingWorld"]
      [:div#authDiv "auth here"]
      [:div#appDiv
        [:div#world.column
          [:h3 "World Map"]
          [:img#worldMap {:src "/map.png"}]]
        [:div#menu.column
          [:h3 "Menu"]
          [:textarea {:cols "30" :rows "30"}]]
        [:div#news.column
          [:h3 "News"]
          [:select#newsList {:size 30}
            [:option {:value "v0" :selected "true"} "World created"]]]
        [:br {:style "clear: right;"}]]
    ]))<commit_msg>demages list + map legend<commit_after>(ns amindblowingworld.view_index
  (:require
    [hiccup
      [page :refer [html5]]
      [page :refer [include-js include-css]]]))

(def landscape-colors [["Settlement" 255 0 0]
                       ["Ocean" 0 0 225]
                       ["Iceland" 255 255 255]
                       ["Tundra" 141 227 0]
                       ["Alpine" 141 227 0]
                       ["Glacier" 255 255 255]
                       ["Grassland" 80 173 88]
                       ["Rock Desert" 105 120 59]
                       ["Sand Desert" 205 227 141]
                       ["Forest" 59 120 64]
                       ["Savanna" 171 161 27]
                       ["Jungle" 5 227 34]])
                       
(defn landscape-color-to-table-row [landscape-name red green blue]
  [:tr [:td {:style (format "background-color: rgb(%d,%d,%d);" red green blue)} "&nbsp;&nbsp;&nbsp;&nbsp;"]
       [:td landscape-name]])

(defn landscape-colors-legend []
  (map #(apply landscape-color-to-table-row %) landscape-colors))


(defn damage-reasons [damages isChecked]
  (map (fn [damage] [:div [:input {:type :radio :name :damage :value damage :checked isChecked} damage] [:br]]) damages))

(defn index-page []
  (html5
    [:head
      [:title "AMindBlowingWorld"]
      (include-js "/js/jquery-1.9.0.js")
      (include-js "/js/external.js")
      (include-js "/js/app.js")
      (include-css "/css/app.css")]
    [:body {:onload "initApp();"}
      [:h1 "AMindBlowingWorld"]
      [:div#appDiv
        [:div#world.column
          [:h3 "World Map"]
          [:img#worldMap {:src "/map.png"}]]
        [:div#menu.column
          [:h3 "Landscape Colours"]
          [:table (landscape-colors-legend)]
          [:h3 "Make damage!"]
          [:form#damageReasons (damage-reasons ["Vulcano"] true) (damage-reasons ["Vulcano" "Earthquake" "Hunger" "Tsunami" "Tornado" "Meteor" "Russian invasion" "Crazy Putin"] false)]]
        [:div#news.column
          [:h3 "News"]
          [:select#newsList {:size 30}
            [:option {:value "v0" :selected "true"} "World created"]]]
        [:br {:style "clear: right;"}]]
    ]))
{'fraction_non_alphanumeric': 0.17648963730569947, 'fraction_numerical': 0.03756476683937824, 'mean_word_length': 2.046351084812623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '913688', 'n_tokens_mistral': 1177, 'n_tokens_neox': 1006, 'n_words': 247}