-
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.
- Loading branch information
Showing
22 changed files
with
957 additions
and
97 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +0,0 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// @description of props | ||
// => buttonUrl : url for 'view details' button. | ||
// => chipText : array of strings | ||
// => logo : image src | ||
// => other props can be string => title, subtitle, location,startDate,duration,stipend,applyBy | ||
|
||
import { FaMapMarkerAlt, FaRegPlayCircle, FaRegCalendarAlt, FaHourglassStart, FaRegMoneyBillAlt } from 'react-icons/fa'; | ||
const Card = ({ title, subtitle, location, startDate, duration, stipend, applyBy, chipText, logo, buttonUrl }) => { | ||
return ( | ||
<div className="-z-10 md:w-[614px] p-[23px] h-auto w-full mt-2 border-[1px] border-gray-200 shadow-[0 1px 2px rgb(0 0 0 / 8%)] rounded-md "> | ||
{logo ? <img src={logo} alt="company logo" className="h-8 w-8 inline float-right" /> : null} | ||
{title ? <h2 className="text-2xl font-semibold">{title}</h2> : null} | ||
{subtitle ? <h4 className="text-md font-semibold text-gray-500 my-2 ">{subtitle}</h4> : null} | ||
{location ? <p className="text-sm my-4"><FaMapMarkerAlt className='inline mx-[2px] mb-[4px] ' />{location}</p> : null} | ||
<div className=" md:space-x-12 flex md:w-full sm:w-[55%] flex-wrap flex-row "> | ||
{startDate ? <div className='md:p-1 p-2'> | ||
<FaRegPlayCircle className='text-gray-400 mx-[4px] inline mb-[4px]' /> | ||
<p className="md:inline hidden text-gray-400 font-semibold text-sm">START DATE</p> | ||
<p className='text-sm md:block inline'>{startDate}</p> | ||
</div> : null} | ||
|
||
{duration ? <div className='md:p-1 p-2'> | ||
<FaRegCalendarAlt className="text-gray-400 inline mx-[4px] mb-[4px]" /> | ||
<p className="md:inline hidden text-gray-400 font-semibold text-sm">DURATION</p> | ||
<p className='text-sm md:block inline'>{duration}</p> | ||
</div> : null} | ||
|
||
{stipend ? <div className='md:p-1 p-2'> | ||
<FaRegMoneyBillAlt className="text-gray-400 inline mx-[4px] mb-[4px] " /> | ||
<p className="md:inline hidden text-gray-400 font-semibold text-sm">STIPEND</p> | ||
<p className='text-sm md:block inline'>{stipend}</p> | ||
|
||
</div> : null} | ||
|
||
{applyBy ? <div className='md:p-1 p-2'> | ||
<FaHourglassStart className="text-gray-400 inline mx-[4px] mb-[4px] " /> | ||
<p className="md:inline hidden text-gray-400 font-semibold text-sm">APPLY BY</p> | ||
<p className='text-sm md:block inline'>{applyBy}</p> | ||
|
||
</div> : null} | ||
</div> | ||
<div className='flex justify-between'> | ||
<div className="my-4 w-[28rem] space-x-4 flex flex-wrap"> | ||
{chipText?.map((chip) => { | ||
return <div className=" text-xs rounded-full px-4 py-[3px] mt-2 bg-gray-100">{chip}</div> | ||
})} | ||
</div> | ||
<div className='sm:text-md text-sm text-blue-600 font-semibold float-right mt-4'> | ||
<a href={buttonUrl} >View Details {'>'}</a> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
export default Card; |
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,35 @@ | ||
import {useState} from 'react'; | ||
import './scrollbar.css'; | ||
const MenuItem=({items,depthLevel,allSubMenu})=>{ | ||
const [open,setOpen] = useState(false); | ||
return( | ||
<li role = 'menu' onMouseEnter={()=>setOpen((prev)=>!prev)} onMouseLeave ={()=>setOpen((prev)=>!prev) } className = {` z-10 bg-white relative ${depthLevel===0? 'hover:border-b-2 border-blue-500':''}hover:bg-blue-100` } > | ||
|
||
{ | ||
items.submenu? | ||
(<> | ||
|
||
<button className = {`p-2`} aria-haspopup = 'menu' aria-expanded = {open?true:false}> | ||
{items.title + " "}{depthLevel>0 && <span>{'>'}</span>} | ||
</button> | ||
<DropDown depthLevel = {depthLevel} subitems = {items.submenu} open={open} setOpen = {setOpen} allSubMenu={allSubMenu}/> | ||
</>) | ||
: (<button className = "p-2" ><a href = {items.link?items.link:"#"}>{items.title}</a></button>)} | ||
</li> | ||
); | ||
} | ||
const DropDown = ({depthLevel,subitems,open})=>{ | ||
depthLevel+=1; | ||
return( | ||
<div> | ||
<ul id = "scrollbar" className = {open?('bg-white z-10 absolute w-[200px] h-[300px] top-[2.62rem] overflow-x-visible drop-shadow-md' + `${depthLevel > 1 ? " left-[100%] top-[0rem] overflow-y-scroll overflow-x-hidden" : ''} ${depthLevel>2 && 'hidden'}`) :( 'hidden')}> | ||
{ | ||
subitems.map((subitem,i)=>{ | ||
return <MenuItem items = {subitem} depthLevel = {depthLevel} key = {i}/> | ||
}) | ||
} | ||
</ul> | ||
</div> | ||
); | ||
} | ||
export default MenuItem; |
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,12 @@ | ||
#scrollbar::-webkit-scrollbar{ | ||
width: 5px; | ||
} | ||
#scrollbar::-webkit-scrollbar-track{ | ||
background-color: #f1f1f1; | ||
} | ||
#scrollbar::-webkit-scrollbar-thumb{ | ||
background-color: #888; | ||
} | ||
#scrollbar::-webkit-scrollbar-thumb:hover{ | ||
background-color: #888; | ||
} |
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,47 @@ | ||
import {useState} from 'react'; | ||
import './DropdownButton/scrollbar.css' | ||
const TextInput2=({options})=>{ | ||
const [search,setSearch] = useState(''); | ||
const [open,setOpen] = useState(false); | ||
|
||
return( | ||
<> | ||
<input | ||
className = "h-8 w-80 p-2 border-2 border-gray-300 rounded-sm shadow appearance-none text-gray-700 leading-tight focus:outline-none focus:shadow-outline focus:border-blue-300 hover:blue-300`" | ||
type = "text" | ||
onChange = {(e)=>{ | ||
e.preventDefault(); | ||
setSearch(e.target.value); | ||
}} | ||
onFocus = {()=>{ | ||
setOpen(true); | ||
}} | ||
onBlur = {()=>{ | ||
setTimeout(()=>setOpen(false),200) | ||
}} | ||
value = {search} | ||
/> | ||
|
||
{open && <div id = "scrollbar" className='h-[8rem] bg-white w-[20rem] drop-shadow-md overflow-y-auto backdrop-filter'> | ||
{ | ||
options.filter((item,i)=>{ | ||
if(search === ""){ | ||
return item; | ||
}else if(item.title.toLowerCase().includes(search.toLowerCase())){ | ||
return item; | ||
} | ||
}).map((item,i)=>{ | ||
return ( | ||
<div> | ||
{ <p className = "hover:bg-blue-100 hover:text-blue-600 h-[2.2rem] w-full " key = {i}><a target = '_blank' href = {'//' + item.link}>{item.title}</a></p>} | ||
</div> | ||
|
||
) | ||
}) | ||
} | ||
</div>} | ||
</> | ||
); | ||
} | ||
|
||
export default TextInput2; |
Oops, something went wrong.