mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Update style of education history
This commit is contained in:
@@ -1,35 +1,33 @@
|
|||||||
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 Education = ({ loading }) => {
|
const Education = ({ 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>
|
<h3 class="font-semibold opacity-90">
|
||||||
<div>
|
{skeleton({
|
||||||
{skeleton({
|
width: 'w-6/12',
|
||||||
width: 'w-6/12',
|
height: 'h-4',
|
||||||
height: 'h-4',
|
className: 'my-1.5',
|
||||||
className: 'mb-2',
|
})}
|
||||||
})}
|
</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>
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -43,41 +41,42 @@ const Education = ({ loading }) => {
|
|||||||
config.education.length !== 0 && (
|
config.education.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>
|
<h5 className="card-title">
|
||||||
<div className="pb-0-important mx-3">
|
{loading ? (
|
||||||
<h5 className="card-title">
|
skeleton({ width: 'w-32', height: 'h-8' })
|
||||||
{loading ? (
|
) : (
|
||||||
skeleton({ width: 'w-32', height: 'h-8' })
|
<span className="opacity-70">Education</span>
|
||||||
) : (
|
)}
|
||||||
<span className="opacity-70">Education</span>
|
</h5>
|
||||||
)}
|
</div>
|
||||||
</h5>
|
<div className="text-base-content text-opacity-60">
|
||||||
</div>
|
<ol class="relative border-l border-base-300 border-opacity-30 my-2 mx-4">
|
||||||
</li>
|
{loading ? (
|
||||||
{loading
|
renderSkeleton()
|
||||||
? renderSkeleton()
|
) : (
|
||||||
: config.education.map((item, index) => (
|
<Fragment>
|
||||||
<li key={index}>
|
{config.education.map((item, index) => (
|
||||||
<span>
|
<li class="mb-5 ml-4">
|
||||||
<div>
|
<div
|
||||||
<GoPrimitiveDot className="mr-2 opacity-40" />
|
class="absolute w-2 h-2 bg-base-300 rounded-full border border-base-300 mt-1.5"
|
||||||
|
style={{ left: '-4.5px' }}
|
||||||
|
></div>
|
||||||
|
<div class="my-0.5 text-xs opacity-80">
|
||||||
|
{item.from} - {item.to}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<h3 class="font-semibold opacity-90">
|
||||||
<div className="block justify-between">
|
{item.degree}
|
||||||
<div className="font-medium opacity-70">
|
</h3>
|
||||||
{item.institution}
|
<p class="mb-4 font-normal opacity-90">
|
||||||
</div>
|
{item.institution}
|
||||||
<div className="opacity-50">
|
</p>
|
||||||
{item.from} - {item.to}
|
</li>
|
||||||
</div>
|
))}
|
||||||
</div>
|
</Fragment>
|
||||||
<div className="opacity-70">{item.degree}</div>
|
)}
|
||||||
</div>
|
</ol>
|
||||||
</span>
|
</div>
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user