diff --git a/src/com/spicy/home.clj b/src/com/spicy/home.clj index 6400458..c45e939 100644 --- a/src/com/spicy/home.clj +++ b/src/com/spicy/home.clj @@ -1,18 +1,9 @@ (ns com.spicy.home (:require - [clj-http.client :as http] [com.biffweb :as biff] [com.spicy.middleware :as mid] [com.spicy.settings :as settings] - [com.spicy.ui :as ui] - [rum.core :as rum] - [xtdb.api :as xt])) - - -(def email-disabled-notice - [:.text-sm.mt-3.bg-blue-100.p-2 - "Until you add API keys for Postmark and reCAPTCHA, we'll print your sign-up " - "link to the console. See config.edn."]) + [com.spicy.ui :as ui])) (defn home-page @@ -40,8 +31,7 @@ "Sign up"]] [:.mt-2.text-sm "Already have an account? " [:a.text-black.hover:text-brand-pink.font-bold {:href "/signin"} "Sign in"] "."] [:.h-3] - biff/recaptcha-disclosure - email-disabled-notice)])) + biff/recaptcha-disclosure)])) (defn link-sent @@ -117,8 +107,7 @@ "There was an error.")]]) [:.mt-2.text-sm "Don't have an account yet? " [:a.text-black.hover:text-brand-pink.font-bold {:href "/"} "Sign up"] "."] [:.h-3] - biff/recaptcha-disclosure - email-disabled-notice)])) + biff/recaptcha-disclosure)])) (defn enter-code-page diff --git a/src/com/spicy/movements/core.clj b/src/com/spicy/movements/core.clj index e5bb75d..963689d 100644 --- a/src/com/spicy/movements/core.clj +++ b/src/com/spicy/movements/core.clj @@ -54,16 +54,16 @@ [:h1.text-5xl.w-fit.self-center.mb-4.md:mb-0 "Movements"] [:a {:class (str "btn bg-brand-teal w-full sm:w-fit self-center") :href (str "/app/movements/new")} "Add Movement"]] - [:div.flex.flex-col.sm:flex-row.justify-end.gap-4 - [:select.btn.text-base.w-full.md:w-96.h-12.teal-focus.hover:cursor-pointer {:name "type" - :onchange "window.open('?type=' + this.value,'_self')"} + [:div.flex.flex-col.sm:flex-row.justify-end.gap-4.w-full.max-w-3xl + [:select.btn.text-base.w-full.h-12.flex-1.teal-focus.hover:cursor-pointer {:name "type" + :onchange "window.open('?type=' + this.value,'_self')"} [:option.text-base {:value :strength :selected (or (= (:type params) "strength") (empty? (:type params)))} "Strength"] [:option.text-base {:value :gymnastic :selected (= (:type params) "gymnastic")} "Gymnastic"] [:option.text-base {:value :monostructural :selected (= (:type params) "monostructural")} "Cardio"]] - [:input.pink-input.teal-focus.w-full.h-full.md:w-96 + [:input.pink-input.teal-focus.w-full.h-full.flex-1 {:name "search" :type "search" :id "search" diff --git a/src/com/spicy/results/core.clj b/src/com/spicy/results/core.clj index 1547809..6342481 100644 --- a/src/com/spicy/results/core.clj +++ b/src/com/spicy/results/core.clj @@ -93,11 +93,10 @@ [:input.pink-input.teal-focus.mt-4.mx-auto {:type "date" :name "date" - :x-init (when-not (:result/date result) - "$el.valueAsDate = new Date();") - :value (when (:result/date result) + :value (if (:result/date result) (biff/format-date - (:result/date result) "YYYY-MM-dd"))}] + (:result/date result) "YYYY-MM-dd") + (jt/format "YYYY-MM-dd" (jt/zoned-date-time (jt/zone-id "America/Boise"))))}] [:textarea#notes {:name "notes" :placeholder "notes" diff --git a/src/com/spicy/results/score.clj b/src/com/spicy/results/score.clj index 89ecb0b..63d2cfa 100644 --- a/src/com/spicy/results/score.clj +++ b/src/com/spicy/results/score.clj @@ -38,8 +38,6 @@ {:time ["minutes" "seconds"] :rounds-reps ["rounds" "reps"] :reps ["reps"] - :time-with-cap ["reps"] - :pass-fail ["reps"] :emom ["reps"] :load ["reps"] :calories ["reps"] diff --git a/src/com/spicy/results/ui.clj b/src/com/spicy/results/ui.clj index acc094e..c78da51 100644 --- a/src/com/spicy/results/ui.clj +++ b/src/com/spicy/results/ui.clj @@ -3,7 +3,8 @@ [clojure.string :as string] [com.biffweb :as biff] [com.spicy.movements.core :refer [sets-n-reps]] - [com.spicy.workouts.ui :refer [display-summed-score]])) + [com.spicy.workouts.ui :refer [display-summed-score]] + [java-time.api :as jt])) (defn normalized-result @@ -127,7 +128,7 @@ [:input.w-full.pink-input.teal-focus {:type "number" :name (str "reps-" identifier) :id (str "id-" identifier) - :placeholder "Reps" + :placeholder (string/capitalize (name (:workout/scheme workout))) :value score :min 0 :required true}])) @@ -170,11 +171,10 @@ [:input.pink-input.teal-focus {:type "date" :name "date" - :x-init (when-not (:result/date result) - "$el.valueAsDate = new Date();") - :value (when (:result/date result) + :value (if (:result/date result) (biff/format-date - (:result/date result) "YYYY-MM-dd"))}] + (:result/date result) "YYYY-MM-dd") + (jt/format "YYYY-MM-dd" (jt/zoned-date-time (jt/zone-id "America/Boise"))))}] [:div.flex.gap-2.items-center [:div.flex-1.flex.gap-2.items-center [:input#rx {:type "radio" diff --git a/src/com/spicy/ui.clj b/src/com/spicy/ui.clj index 7ca43c8..15acfd9 100644 --- a/src/com/spicy/ui.clj +++ b/src/com/spicy/ui.clj @@ -162,10 +162,8 @@ [scheme] (case scheme :time "For Time" - :time-with-cap "For Time" :rounds-reps "Rounds + Reps" :reps "Total Reps" - :pass-fail "Pass/Fail" :load "Total Load" :calories "Total Cals" :meters "Total Meters" diff --git a/src/com/spicy/workouts/ui.clj b/src/com/spicy/workouts/ui.clj index a80d3ce..0e37633 100644 --- a/src/com/spicy/workouts/ui.clj +++ b/src/com/spicy/workouts/ui.clj @@ -131,10 +131,6 @@ [:option {:value "" :label "--Select a Workout Scheme--"}] [:option {:value "time" :label "time"}] - [:option {:value "time-with-cap" - :label "time-with-cap"}] - [:option {:value "pass-fail" - :label "pass-fail"}] [:option {:value "rounds-reps" :label "rounds-reps"}] [:option {:value "reps"