mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-19 03:01:53 +10:00
Added an ability to customize font sizes. This is set at a new section in the settings. The controler for this sets a number of css variables which are used in css rules that override tailwind's text-<size> to use the font size and line spacing contained in the variable. The control itself is a simple logarithmic slider that controls a "scale factor" by which all the text sizes in a resume are scaled by.
32 lines
944 B
JavaScript
32 lines
944 B
JavaScript
import React, { memo, useContext } from 'react';
|
|
import ReactMarkdown from 'react-markdown';
|
|
import PageContext from '../../../contexts/PageContext';
|
|
import { safetyCheck } from '../../../utils';
|
|
|
|
const ReferenceItem = (x) => (
|
|
<div key={x.id} className="flex flex-col">
|
|
<h6 className="font-semibold text-sm">{x.name}</h6>
|
|
<span className="text-xs">{x.position}</span>
|
|
<span className="text-xs">{x.phone}</span>
|
|
<span className="text-xs">{x.email}</span>
|
|
{x.summary && (
|
|
<ReactMarkdown className="markdown mt-2 text-sm" source={x.summary} />
|
|
)}
|
|
</div>
|
|
);
|
|
|
|
const ReferencesB = () => {
|
|
const { data, heading: Heading } = useContext(PageContext);
|
|
|
|
return safetyCheck(data.references) ? (
|
|
<div>
|
|
<Heading>{data.references.heading}</Heading>
|
|
<div className="grid gap-4">
|
|
{data.references.items.map(ReferenceItem)}
|
|
</div>
|
|
</div>
|
|
) : null;
|
|
};
|
|
|
|
export default memo(ReferencesB);
|