-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #460 from learnhubmk/content-panel-improvements
[FE] Content-Panel: Blogs: General Improvements
- Loading branch information
Showing
16 changed files
with
370 additions
and
97 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
components/module-components/SearchAndFilter/search.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
.search { | ||
width: 100%; | ||
} | ||
|
||
.results { | ||
margin-top: 20px; | ||
} | ||
|
||
.resultItem { | ||
padding: 10px; | ||
border-bottom: 1px solid #ccc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
components/module-components/create-blogs/BlogManagementControls.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@import '../../../app/styles/utils/breakpoints.scss'; | ||
|
||
.controls { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
margin-bottom: 20px; | ||
|
||
@include breakpoint(small) { | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
} | ||
|
||
.searchInputWrapper { | ||
text-wrap: nowrap; | ||
display: flex; | ||
align-items: center; | ||
gap: 5px; | ||
width: 100%; | ||
@include breakpoint(small) { | ||
width: 600px; | ||
height: 100%; | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
components/module-components/create-blogs/BlogManagementControls.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React from 'react'; | ||
import Button from '../../reusable-components/button/Button'; | ||
import styles from './BlogManagementControls.module.scss'; | ||
import ReusableDropdown from '../../reusable-components/reusable-dropdown/ReusableDropdown'; | ||
import Search from '../SearchAndFilter/Search'; | ||
|
||
interface TagManagementControlsProps { | ||
onAddClick: () => void; | ||
searchTerm: string; | ||
setSearchTerm: (term: string) => void; | ||
} | ||
|
||
const filterBy = [ | ||
{ | ||
id: 1, | ||
label: 'Прикажи ги сите', | ||
onClick: () => {}, | ||
}, | ||
{ | ||
id: 2, | ||
label: 'Admin', | ||
onClick: () => {}, | ||
}, | ||
{ | ||
id: 3, | ||
label: 'Content Manager', | ||
onClick: () => {}, | ||
}, | ||
{ | ||
id: 4, | ||
label: 'Member', | ||
onClick: () => {}, | ||
}, | ||
]; | ||
|
||
const BlogManagementControls: React.FC<TagManagementControlsProps> = ({ | ||
onAddClick, | ||
searchTerm, | ||
setSearchTerm, | ||
}) => { | ||
return ( | ||
<div className={styles.controls}> | ||
<div className={styles.searchInputWrapper}> | ||
<Search | ||
placeholder="Пребарај статии..." | ||
handleInputChange={setSearchTerm} | ||
searchValue={searchTerm} | ||
/> | ||
<ReusableDropdown | ||
placeholder="Филтрирај" | ||
icon={<i className="bi bi-caret-down-fill" />} | ||
items={filterBy} | ||
/> | ||
</div> | ||
<Button | ||
onClick={onAddClick} | ||
type="button" | ||
buttonText="Нова Статија" | ||
buttonClass={['addButton']} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BlogManagementControls; |
23 changes: 16 additions & 7 deletions
23
components/module-components/create-blogs/createBlogs.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
@import '../../../app/styles/utils/breakpoints.scss'; | ||
|
||
.mainContainer { | ||
margin: 50px 0; | ||
width: 100%; | ||
max-width: 1200px; | ||
padding: 20px; | ||
margin: 0 auto; | ||
|
||
@include breakpoint-down(small) { | ||
padding: 10px; | ||
} | ||
|
||
.inputWrapper { | ||
margin: 50px 0; | ||
display: flex; | ||
width: 100%; | ||
} | ||
} | ||
|
||
.rightContainer { | ||
display: flex; | ||
gap: 20px; | ||
} | ||
.searchInputWrapper { | ||
width: 100%; | ||
@include breakpoint(small) { | ||
width: 300px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
components/reusable-components/reusable-dropdown/ReusableDropdown.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.dropdown { | ||
position: relative; | ||
display: inline-block; | ||
} | ||
|
||
.dropdownButton { | ||
height: 100%; | ||
display: flex; | ||
justify-content: flex-end; | ||
gap: 5px; | ||
font-size: var(--fs-button); | ||
font-weight: 400; | ||
background-color: #ffffff; | ||
color: #333; | ||
padding: 8px 15px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} | ||
|
||
.dropdownButton:hover { | ||
background-color: #f7f7f7; | ||
} | ||
|
||
.dropdownList { | ||
position: absolute; | ||
top: 100%; | ||
left: 0; | ||
background-color: #ffffff; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
list-style: none; | ||
margin: 5px 0 0; | ||
padding: 5px 0; | ||
width: 200px; | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
z-index: 1000; | ||
|
||
@media screen and (max-width: 768px) { | ||
left: -20px; | ||
} | ||
} | ||
|
||
.dropdownItem { | ||
padding: 0; | ||
} | ||
|
||
.dropdownItem:hover { | ||
background-color: #f0f0f0; | ||
} | ||
|
||
.dropdownItemButton { | ||
background: none; | ||
border: none; | ||
padding: 10px 15px; | ||
width: 100%; | ||
text-align: left; | ||
cursor: pointer; | ||
font: inherit; | ||
color: inherit; | ||
} | ||
|
||
.dropdownItemButton:hover { | ||
background-color: #f0f0f0; | ||
} |
Oops, something went wrong.