mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 10:11:31 +10:00
feat(templates): replace library with microfrontend app for templates
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { Template } from "./types";
|
||||
|
||||
export const pageSizeMap = {
|
||||
a4: {
|
||||
width: 210,
|
||||
@ -8,3 +10,12 @@ export const pageSizeMap = {
|
||||
height: 279,
|
||||
},
|
||||
};
|
||||
|
||||
export const templatesList: Template[] = [
|
||||
{
|
||||
id: "rhyhorn",
|
||||
name: "Rhyhorn",
|
||||
image:
|
||||
"https://res.cloudinary.com/amruth-pillai/image/upload/v1699370067/reactive-resume/templates/482-2480x3508_vuf5ev.jpg",
|
||||
},
|
||||
];
|
||||
|
||||
@ -15,6 +15,11 @@ export const isUrl = (string: string) => {
|
||||
return urlRegex.test(string);
|
||||
};
|
||||
|
||||
export const isEmptyString = (string: string) => {
|
||||
if (string === "<p></p>") return true;
|
||||
return string.trim().length === 0;
|
||||
};
|
||||
|
||||
export const extractUrl = (string: string) => {
|
||||
const urlRegex = /https?:\/\/[^ \n]+/i;
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
export type Json = Record<string, unknown>;
|
||||
|
||||
export type Template = { id: string; name: string; image: string };
|
||||
|
||||
export type LayoutLocator = { page: number; column: number; section: number };
|
||||
|
||||
export type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T;
|
||||
|
||||
Reference in New Issue
Block a user