From b899542494a4844de1e7f8bae09c83e011ebbda3 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Sun, 28 Jan 2024 12:28:10 +0100 Subject: fix(frontend): fix word wrapping --- src/frontend/tubo/components/comments.cljs | 2 +- src/frontend/tubo/components/items.cljs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/frontend/tubo/components/comments.cljs b/src/frontend/tubo/components/comments.cljs index 8e5e2ec..4f3a93a 100644 --- a/src/frontend/tubo/components/comments.cljs +++ b/src/frontend/tubo/components/comments.cljs @@ -31,7 +31,7 @@ (when uploader-verified? [:i.fa-solid.fa-circle-check.ml-2])] [:div.my-2 - [:p.break-words {:dangerouslySetInnerHTML {:__html text}}]] + [:p {:dangerouslySetInnerHTML {:__html text} :class "[overflow-wrap:anywhere]"}]] [:div..flex.items-center.my-2 [:div.mr-4 [:p (util/format-date-ago upload-date)]] diff --git a/src/frontend/tubo/components/items.cljs b/src/frontend/tubo/components/items.cljs index 39179e6..c207a04 100644 --- a/src/frontend/tubo/components/items.cljs +++ b/src/frontend/tubo/components/items.cljs @@ -30,14 +30,16 @@ (when name [:div.flex.items-center.my-2 [:a {:href item-route :title name} - [:h1.line-clamp-2.my-1.break-words {:style {:wordBreak "break-word"}} name]] + [:h1.line-clamp-2.my-1 {:class "[overflow-wrap:anywhere]"} name]] (when (and verified? (not uploader-url)) [:i.fa-solid.fa-circle-check.pl-2])]) [:div.flex.justify-between [:div.flex.items-center.my-2 (if uploader-url [:a {:href (rfe/href :tubo.routes/channel nil {:url uploader-url}) :title uploader-name} - [:h1.line-clamp-1.text-neutral-800.dark:text-gray-300.font-bold.pr-2.break-all uploader-name]] + [:h1.line-clamp-1.text-neutral-800.dark:text-gray-300.font-bold.pr-2.break-all + {:class "[overflow-wrap:anywhere]"} + uploader-name]] [:h1.line-clamp-1.text-neutral-800.dark:text-gray-300.font-bold.pr-2 uploader-name]) (when (and uploader-url verified?) [:i.fa-solid.fa-circle-check])] -- cgit v1.2.3