Update style

This commit is contained in:
Ariful Alam 2022-03-19 22:12:38 +06:00
parent 7a935e9cb5
commit fdffd280b7
2 changed files with 61 additions and 63 deletions

View File

@ -18,11 +18,11 @@ import config from '../../ezprofile.config';
const ListItem = ({ icon, title, value, link, skeleton = false }) => { const ListItem = ({ icon, title, value, link, skeleton = false }) => {
return ( return (
<div class="flex justify-start py-2 px-1 items-center"> <div className="flex justify-start py-2 px-1 items-center">
<span class="w-2 m-2">{icon}</span> <span className="w-2 m-2">{icon}</span>
<div class="flex-grow font-medium px-2">{title}</div> <div className="flex-grow font-medium px-2">{title}</div>
<div <div
class={`${ className={`${
skeleton ? 'flex-grow' : '' skeleton ? 'flex-grow' : ''
} text-sm font-normal text-right mr-2 ml-3 ${link ? 'truncate' : ''}`} } text-sm font-normal text-right mr-2 ml-3 ${link ? 'truncate' : ''}`}
> >

View File

@ -1,35 +1,34 @@
import { GoPrimitiveDot } from 'react-icons/go'; import { GoPrimitiveDot } from 'react-icons/go';
import { skeleton } from '../../helpers/utils'; import { skeleton } from '../../helpers/utils';
import config from '../../ezprofile.config'; import config from '../../ezprofile.config';
import { Fragment } from 'react';
const Experience = ({ loading }) => { const Experience = ({ loading }) => {
const renderSkeleton = () => { const renderSkeleton = () => {
let array = []; let array = [];
for (let index = 0; index < 2; index++) { for (let index = 0; index < 2; index++) {
array.push( array.push(
<li key={index}> <li class="mb-5 ml-4">
<span> <div
{skeleton({ width: 'w-2', height: 'h-2', className: 'mr-2' })} class="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5"
<div className="w-full"> style={{ left: '-4.5px' }}
<div className="block justify-between"> ></div>
<div> <div class="my-0.5 text-xs opacity-80">
{skeleton({ {skeleton({
width: 'w-9/12', width: 'w-5/12',
height: 'h-4', height: 'h-4',
className: 'mb-2',
})} })}
</div> </div>
<div> <h3 class="font-semibold opacity-90">
{skeleton({ {skeleton({
width: 'w-6/12', width: 'w-6/12',
height: 'h-4', height: 'h-4',
className: 'mb-2', className: 'my-1.5',
})} })}
</div> </h3>
</div> <p class="mb-4 font-normal opacity-90">
<div>{skeleton({ width: 'w-6/12', height: 'h-3' })}</div> {skeleton({ width: 'w-6/12', height: 'h-3' })}
</div> </p>
</span>
</li> </li>
); );
} }
@ -43,9 +42,7 @@ const Experience = ({ loading }) => {
config.experiences.length !== 0 && ( config.experiences.length !== 0 && (
<div className="card shadow-lg compact bg-base-100"> <div className="card shadow-lg compact bg-base-100">
<div className="card-body"> <div className="card-body">
<ul className="menu row-span-3 bg-base-100 text-base-content"> <div className="mx-3">
<li>
<div className="pb-0-important mx-3">
<h5 className="card-title"> <h5 className="card-title">
{loading ? ( {loading ? (
skeleton({ width: 'w-32', height: 'h-8' }) skeleton({ width: 'w-32', height: 'h-8' })
@ -54,32 +51,33 @@ const Experience = ({ loading }) => {
)} )}
</h5> </h5>
</div> </div>
</li> <div className="text-base-content text-opacity-60">
{loading <ol class="relative border-l border-base-300 border-opacity-30 my-2 mx-4">
? renderSkeleton() {loading ? (
: config.experiences.map((experience, index) => ( renderSkeleton()
<li key={index}> ) : (
<span> <Fragment>
<div> {config.experiences.map((experience, index) => (
<GoPrimitiveDot className="mr-2 opacity-40" /> <li class="mb-5 ml-4">
</div> <div
<div> class="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5"
<div className="block justify-between"> style={{ left: '-4.5px' }}
<div className="font-medium opacity-70"> ></div>
{experience.company} <div class="my-0.5 text-xs opacity-80">
</div>
<div className="opacity-50">
{experience.from} - {experience.to} {experience.from} - {experience.to}
</div> </div>
</div> <h3 class="font-semibold opacity-90">
<div className="opacity-70">
{experience.position} {experience.position}
</div> </h3>
</div> <p class="mb-4 font-normal opacity-90">
</span> {experience.company}
</p>
</li> </li>
))} ))}
</ul> </Fragment>
)}
</ol>
</div>
</div> </div>
</div> </div>
)} )}