Skip to content
Snippets Groups Projects
Commit fe254316 authored by xaralis's avatar xaralis
Browse files

feat: better responsivness

parent 450c6ec6
No related branches found
No related tags found
No related merge requests found
REACT_APP_STYLEGUIDE_URL=https://styleguide.pir-test.eu/2.0.4 REACT_APP_STYLEGUIDE_URL=https://styleguide.pir-test.eu/2.1.0
REACT_APP_API_BASE_URL=https://cf2021.pir-test.eu/api REACT_APP_API_BASE_URL=https://cf2021.pir-test.eu/api
REACT_APP_MATOMO_ID=135 REACT_APP_MATOMO_ID=135
REACT_APP_SENTRY_DSN=https://aa80453ff4d54b9a9c1b49e79060498a@sentry.pir-test.eu/14 REACT_APP_SENTRY_DSN=https://aa80453ff4d54b9a9c1b49e79060498a@sentry.pir-test.eu/14
...@@ -196,15 +196,18 @@ const Post = ({ ...@@ -196,15 +196,18 @@ const Post = ({
className="w-8 h-8 lg:w-14 lg:h-14 rounded mr-3 object-cover" className="w-8 h-8 lg:w-14 lg:h-14 rounded mr-3 object-cover"
alt={author.name} alt={author.name}
/> />
<div className="flex-1"> {/* overflow-hidden to avoid spammers damaging the UI */}
<div className="flex-1 overflow-hidden">
<div className="mb-1"> <div className="mb-1">
<div className="flex justify-between items-start xl:items-center"> <div className="flex justify-between items-start xl:items-center">
<div className="flex flex-col xl:flex-row xl:items-center"> <div className="flex flex-col xl:flex-row xl:items-center">
<div className="flex flex-col xl:flex-row xl:items-center"> <div className="flex flex-col xl:flex-row xl:items-center">
<span className="font-bold">{author.name}</span> <span className="font-bold">{author.name}</span>
<div className="mt-1 xl:mt-0 xl:ml-2 leading-tight"> <div className="mt-1 xl:mt-0 xl:ml-2 leading-tight">
<span className="text-grey-200 text-sm">{author.group}</span> <span className="text-grey-200 text-xs sm:text-sm">
<span className="text-grey-200 ml-1 text-xs"> {author.group}
</span>
<span className="text-grey-200 ml-1 text-xs sm:text-sm">
@{" "} @{" "}
{format( {format(
datetime, datetime,
...@@ -314,7 +317,7 @@ const Post = ({ ...@@ -314,7 +317,7 @@ const Post = ({
{labels} {labels}
</div> </div>
<div <div
className="text-sm lg:text-base text-black leading-normal content-block" className="text-sm lg:text-base text-black leading-normal content-block overflow-x-scroll"
dangerouslySetInnerHTML={htmlContent} dangerouslySetInnerHTML={htmlContent}
></div> ></div>
</div> </div>
......
...@@ -71,20 +71,20 @@ const AddPostForm = ({ className }) => { ...@@ -71,20 +71,20 @@ const AddPostForm = ({ className }) => {
/> />
<div className="form-field" onChange={(evt) => setType(evt.target.value)}> <div className="form-field" onChange={(evt) => setType(evt.target.value)}>
<div className="form-field__wrapper"> <div className="form-field__wrapper form-field__wrapper--freeform flex-col sm:flex-row">
<div className="radio form-field__control"> <div className="radio form-field__control">
<label> <label>
<input type="radio" name="postType" value="post" defaultChecked /> <input type="radio" name="postType" value="post" defaultChecked />
<span> <span className="text-sm sm:text-base">
Přidávám <strong>běžný příspěvek</strong> Přidávám <strong>běžný příspěvek</strong>
</span> </span>
</label> </label>
</div> </div>
<div className="radio form-field__control"> <div className="radio form-field__control ml-0 mt-4 sm:mt-0 sm:ml-4">
<label> <label>
<input type="radio" name="postType" value="procedure-proposal" /> <input type="radio" name="postType" value="procedure-proposal" />
<span> <span className="text-sm sm:text-base">
Přidávám <strong>návrh postupu</strong> Přidávám <strong>návrh postupu</strong>
</span> </span>
</label> </label>
......
...@@ -25,8 +25,15 @@ const GlobalStats = () => { ...@@ -25,8 +25,15 @@ const GlobalStats = () => {
? items[nextProgramEntryId] ? items[nextProgramEntryId]
: null; : null;
const nextProgramEntryCaption = nextProgramEntry
? `${nextProgramEntry.title} @ ${format(
nextProgramEntry.expectedStartAt,
isToday(nextProgramEntry.expectedStartAt) ? "H:mm" : "dd. MM. H:mm"
)}`
: null;
return ( return (
<div className="bg-grey-50 flex space-x-4 leading-normal px-4 py-2 text-2xs md:text-xs lg:text-sm text-grey-300"> <div className="bg-grey-50 flex space-x-4 leading-normal px-4 py-2 text-2xs md:text-xs lg:text-sm text-grey-300 whitespace-no-wrap">
<div> <div>
<strong>{onlineMembers}</strong>{" "} <strong>{onlineMembers}</strong>{" "}
<span> <span>
...@@ -42,16 +49,14 @@ const GlobalStats = () => { ...@@ -42,16 +49,14 @@ const GlobalStats = () => {
<span>Vel. skupiny členů je</span> <strong>{groupSizeHalf}</strong> <span>Vel. skupiny členů je</span> <strong>{groupSizeHalf}</strong>
</div> </div>
{nextProgramEntry && ( {nextProgramEntry && (
<div className="flex-grow text-right hidden sm:block lg:hidden xl:block"> <div className="flex-grow text-right hidden sm:block lg:hidden xl:block truncate">
Následuje:{" "} Následuje:{" "}
<Link to="/program" className="font-bold"> <Link
{nextProgramEntry.title} @{" "} to="/program"
{format( className="font-bold"
nextProgramEntry.expectedStartAt, title={nextProgramEntryCaption}
isToday(nextProgramEntry.expectedStartAt) >
? "H:mm" {nextProgramEntryCaption}
: "dd. MM. H:mm"
)}
</Link> </Link>
</div> </div>
)} )}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment