Skip to content

Commit

Permalink
[frontend] feat: Adding css tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
helloitsdave committed May 16, 2024
1 parent 41abdd2 commit ca3f4d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
16 changes: 14 additions & 2 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ body {
background-image: url('../public/hero.jpg');
background-size: cover;
background-position: center;
background-attachment: fixed ;
}

@media (min-width: 600px) {
Expand Down Expand Up @@ -40,6 +41,7 @@ body {
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}

.login-register {
Expand Down Expand Up @@ -207,8 +209,7 @@ textarea {
flex-direction: column;
align-items: center;
justify-content: center;
margin: auto;

margin: 10px;
}

.nav-link {
Expand Down Expand Up @@ -251,6 +252,17 @@ textarea {
cursor: pointer;
}

.notes-grid-welcome {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 20px;
border: 2px solid white;
padding: 30px;
backdrop-filter: blur(10px);
}

.edit-buttons {
display: flex;
justify-content: space-evenly;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const Login: React.FC<LoginProps> = ({ onLogin }) => {
<div className="login-page">
<div className="login-page-form">
<form onSubmit={handleSubmit}>
<h3>Existing users</h3>
{errorText !== "" && <span>{errorText}</span>}
<h3>Existing user login</h3>
{errorText !== "" && <span className='registration-form-error'>{errorText}</span>}
<input
type="text"
placeholder="Username"
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/NoteGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ const NoteGrid: React.FC<NotesListProps> = ({
deleteNote,
}) => {
return (
<div className='notes-list'>
<div className="notes-list">
<div className="notes-grid">
{notes.length === 0 && (
<div className="notes-grid-welcome">
<h2>Welcome to e-notes!</h2>
<p>Click above to add your first note</p>
</div>
)}
{notes.map((note) => (
<Note
key={note.id}
Expand Down

1 comment on commit ca3f4d8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

97.93%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
src
   App.tsx87.50%75%96%30–31, 40–41
   NoteApp.tsx94.44%100%96.99%70–74
src/api
   apiService.ts100%85.71%96.67%88–90
src/components
   Header.tsx100%100%100%
   Login.tsx81.82%100%98.59%32, 32–33
   Note.tsx100%100%100%
   NoteForm.tsx100%100%100%
   NoteFormModal.tsx100%100%100%
   NoteGrid.tsx100%100%100%
   RegistrationForm.tsx84.62%100%96.77%51, 51–55
   RegistrationLink.tsx100%100%100%
   Spinner.tsx100%100%100%

Please sign in to comment.