|
15 | 15 | (apply prn args))) |
16 | 16 |
|
17 | 17 | (def comfort-text-and-col |
18 | | - {0 {:name "Unknown" :text-col "text-gray-800 dark:text-gray-200" :bg-col "bg-gray-300 dark:bg-gray-800"} |
19 | | - 1 {:name "Hard" :text-col "text-red-500" :bg-col "bg-red-300"} |
20 | | - 2 {:name "Medium" :text-col "text-yellow-500" :bg-col "bg-yellow-300"} |
21 | | - 3 {:name "Easy" :text-col "text-green-600" :bg-col "bg-green-300"} |
22 | | - 4 {:name "Known" :text-col "text-black dark:text-gray-500" :bg-col "bg-white dark:bg-gray-900"}}) |
| 18 | + {0 {:name "Unknown" |
| 19 | + :text-col "text-gray-800 dark:text-gray-200" |
| 20 | + :bg-col "bg-gray-300 dark:bg-gray-800" |
| 21 | + :help-text "A word with no comfort or translation assigned."} |
| 22 | + 1 {:name "Hard" |
| 23 | + :text-col "text-red-500" |
| 24 | + :bg-col "bg-red-300" |
| 25 | + :help-text "A difficult word you are in the process of learning."} |
| 26 | + 2 {:name "Medium" |
| 27 | + :text-col "text-yellow-500" |
| 28 | + :bg-col "bg-yellow-300" |
| 29 | + :help-text "A word you know fairly well."} |
| 30 | + 3 {:name "Easy" |
| 31 | + :text-col "text-green-600" |
| 32 | + :bg-col "bg-green-300" |
| 33 | + :help-text "A word that you almost always remember."} |
| 34 | + 4 {:name "Known" |
| 35 | + :text-col "text-black dark:text-gray-200" |
| 36 | + :bg-col "bg-white dark:bg-gray-900" |
| 37 | + :help-text "A well known word that you don't need to study."} |
| 38 | + 5 {:name "Ignore" |
| 39 | + :text-col "text-gray-500 dark:text-gray-400" |
| 40 | + :bg-col "bg-gray-50 dark:bg-gray-900" |
| 41 | + :help-text "Ignore this word (ex: proper nouns, untranslateable words etc.)"}}) |
23 | 42 |
|
24 | 43 | (defn get-comfort-level-name [idx] |
25 | 44 | (-> idx comfort-text-and-col :name)) |
26 | 45 |
|
27 | 46 | (defn get-comfort-bg-col [idx] |
28 | 47 | (-> idx comfort-text-and-col :bg-col)) |
29 | 48 |
|
30 | | - |
31 | 49 | (defn split-article |
32 | 50 | "Splits a string by whitespace and punctuation" |
33 | 51 | [string] |
|
113 | 131 | (when ts |
114 | 132 | (-> ts js/Date. (.toLocaleDateString)))) |
115 | 133 |
|
116 | | - |
117 | 134 | ;; class light + dark |
118 | 135 | (defn twld |
119 | 136 | "Takes two strings, and adds dark mode to the end class" |
120 | 137 | [a b] |
121 | | - (let [ |
122 | | - with-dark (->> (str/split b " ") |
| 138 | + (let [with-dark (->> (str/split b " ") |
123 | 139 | (map (fn [s] (str "dark:" s))) |
124 | 140 | (str/join " "))] |
125 | 141 | (str a " " with-dark))) |
|
146 | 162 | (assoc :capture-buffer [])) |
147 | 163 | (-> acc |
148 | 164 | (assoc :out (into [] (concat (acc :out) (acc :capture-buffer) [curr]))) |
149 | | - (assoc :capture-buffer []))) |
150 | | - ))) |
151 | | - {:out [] :capture-buffer [] } word-data)] |
| 165 | + (assoc :capture-buffer [])))))) |
| 166 | + {:out [] :capture-buffer []} word-data)] |
152 | 167 | (res :out))) |
0 commit comments