Skip to content

Commit

Permalink
style empty calendar day
Browse files Browse the repository at this point in the history
  • Loading branch information
nora-kauczor committed Nov 21, 2024
1 parent 610df9e commit 58429f1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
5 changes: 5 additions & 0 deletions frontend/src/components/CalendarDay/CalendarDay.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
gap: 1px;
}

.empty-day{
cursor: not-allowed;
pointer-events: none;
}

#calendar-date {
margin: 0;
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/CalendarDay/CalendarDay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export default function CalendarDay(props: Readonly<Props>) {

return (<div id={"calendar-day-wrapper"} >
{props.vocabIdsOfDate && <button id={"calendar-day"}
disabled={props.vocabIdsOfDate?.vocabIds?.length >
0}
className={props.vocabIdsOfDate?.vocabIds?.length >
0 ? 'dots' : 'no-dots'}
0 ? '' : 'empty-day'}
onClick={() => props.vocabIdsOfDate &&
props.openDayPopUpAndPassItVocabs(
props.vocabIdsOfDate)}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/NavBar/NavBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}

.navbar-button-text {
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export default function NavBar(props: Readonly<Props>) {
const navigate = useNavigate();
const path = window.location.pathname

const handleKeyDown = (event: React.KeyboardEvent<HTMLLIElement>,
path: string) => {
if (event.key === 'Enter' || event.key === ' ') {
navigate(path);
}
};
return (<ul id={"navbar"}>
<li onClick={() => navigate('/backlog')}
className={`navbar-button ${path === '/backlog' && !props.useForm ?
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/components/VocabListItem/VocabListItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@

.list-item-backlog-mode {
margin: 10px;
padding: 25px 20px 20px 20px;
width: 250px;
height: 110px;
min-width: 260px;
font-size: 20px;
padding: 30px 20px 20px 20px;
/*width: 270px;*/
height: 50px;

}

#text-wrapper {
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 0;
padding: 0 15px 0 0;
padding: 0 20px 0 0;
height: 100%;
line-height: 25px;
text-overflow: ellipsis;
Expand All @@ -36,7 +35,7 @@
}

.text-wrapper-backlog-mode{
width: 100%;
width: 200px;
}
.text-wrapper-calendar-mode{
width: 100px;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ body {
font-family: 'Roboto', sans-serif;
color: black;
background-color: #D1E7F5;
line-height: 25px;
}

button {
Expand Down Expand Up @@ -64,7 +65,7 @@ button {

.home-button {
margin-top: 1rem;
padding: 5px
padding: 6px 8px;
}

.pop-up {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/HomePage/HomePage.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}

.homepage-text{
line-height: 20px;
padding-left: 15px;
align-self: center;
}

0 comments on commit 58429f1

Please sign in to comment.