mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 10:11:31 +10:00
feat(artboard): implement 8 new templates
This commit is contained in:
@ -3,9 +3,11 @@ export * from "./namespaces/cefr";
|
||||
export * from "./namespaces/csv";
|
||||
export * from "./namespaces/date";
|
||||
export * from "./namespaces/fonts";
|
||||
export * from "./namespaces/number";
|
||||
export * from "./namespaces/object";
|
||||
export * from "./namespaces/page";
|
||||
export * from "./namespaces/promise";
|
||||
export * from "./namespaces/string";
|
||||
export * from "./namespaces/style";
|
||||
export * from "./namespaces/template";
|
||||
export * from "./namespaces/types";
|
||||
|
||||
7
libs/utils/src/namespaces/number.ts
Normal file
7
libs/utils/src/namespaces/number.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export const linearTransform = (
|
||||
value: number,
|
||||
inMin: number,
|
||||
inMax: number,
|
||||
outMin: number,
|
||||
outMax: number,
|
||||
) => ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
|
||||
@ -1,5 +1,3 @@
|
||||
import { Template } from "./types";
|
||||
|
||||
export const pageSizeMap = {
|
||||
a4: {
|
||||
width: 210,
|
||||
@ -10,12 +8,3 @@ 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",
|
||||
},
|
||||
];
|
||||
|
||||
46
libs/utils/src/namespaces/template.ts
Normal file
46
libs/utils/src/namespaces/template.ts
Normal file
@ -0,0 +1,46 @@
|
||||
export type TemplateKey =
|
||||
| "onyx"
|
||||
| "kakuna"
|
||||
| "rhyhorn"
|
||||
| "azurill"
|
||||
| "ditto"
|
||||
| "chikorita"
|
||||
| "bronzor"
|
||||
| "pikachu";
|
||||
|
||||
export type Template = { id: TemplateKey; name: string };
|
||||
|
||||
export const templatesList: Template[] = [
|
||||
{
|
||||
id: "onyx",
|
||||
name: "Onyx",
|
||||
},
|
||||
{
|
||||
id: "kakuna",
|
||||
name: "Kakuna",
|
||||
},
|
||||
{
|
||||
id: "rhyhorn",
|
||||
name: "Rhyhorn",
|
||||
},
|
||||
{
|
||||
id: "azurill",
|
||||
name: "Azurill",
|
||||
},
|
||||
{
|
||||
id: "ditto",
|
||||
name: "Ditto",
|
||||
},
|
||||
{
|
||||
id: "chikorita",
|
||||
name: "Chikorita",
|
||||
},
|
||||
{
|
||||
id: "bronzor",
|
||||
name: "Bronzor",
|
||||
},
|
||||
{
|
||||
id: "pikachu",
|
||||
name: "Pikachu",
|
||||
},
|
||||
];
|
||||
@ -1,7 +1,5 @@
|
||||
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