import { FieldOpts, FieldSettings, ViewType } from "./FieldTypes/Field"; import { } from "./FieldTypes/StaticField"; export enum TemplateFieldType { TEXT = 'text', VISUAL = 'visual', UNSET = 'unset', } export enum TemplateFieldSize { TINY = 'tiny', SMALL = 'small', MEDIUM = 'medium', LARGE = 'large', HUGE = 'huge', } export class TemplateLayouts { public static get allTemplates(): FieldSettings[] { return Object.values(TemplateLayouts).filter(value => typeof value === 'object' && value !== null && 'title' in value) as FieldSettings[]; } public static FourField001: FieldSettings = { tl: [0, 0], br: [416, 700], viewType: ViewType.FREEFORM, opts: { backgroundColor: '#C0B887', cornerRounding: 20, borderColor: '#6B461F', borderWidth: '12', }, subfields: [ { viewType: ViewType.STATIC, tl: [-0.95, -1], br: [0.95, -0.85], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY], description: 'A title field for very short text that contextualizes the content.', opts: { backgroundColor: 'transparent', color: '#F1F0E9', contentXCentering: 'h-center', fontBold: true, }, }, { viewType: ViewType.STATIC, tl: [-0.87, -0.83], br: [0.87, 0.2], types: [TemplateFieldType.TEXT, TemplateFieldType.VISUAL], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], description: 'The main focus of the template; could be an image, long text, etc.', opts: { cornerRounding: 20, borderColor: '#8F5B25', borderWidth: '6', backgroundColor: '#CECAB9', }, }, { viewType: ViewType.STATIC, tl: [-0.8, 0.2], br: [0.8, 0.3], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], description: 'A caption for field #2, very short to short text that contextualizes the content of field #2', opts: { backgroundColor: 'transparent', contentXCentering: 'h-center', color: '#F1F0E9', }, }, { viewType: ViewType.STATIC, tl: [-0.87, 0.37], br: [0.87, 0.96], types: [TemplateFieldType.TEXT, TemplateFieldType.VISUAL], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], description: 'A medium-sized field for medium/long text.', opts: { cornerRounding: 15, borderColor: '#8F5B25', borderWidth: '6', backgroundColor: '#CECAB9', }, }, ], }; public static FourField002: FieldSettings = { viewType: ViewType.FREEFORM, tl: [0,0], br: [425, 778], opts: { backgroundColor: '#242425', }, subfields: [ { viewType: ViewType.STATIC, tl: [-0.83, -0.95], br: [0.83, -0.2], types: [TemplateFieldType.VISUAL, TemplateFieldType.TEXT], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE], description: 'A medium to large-sized field suitable for an image or longer text that should be the main focus.', opts: { borderWidth: '8', borderColor: '#F8E71C', }, }, { viewType: ViewType.STATIC, tl: [-0.65, -0.2], br: [0.65, -0.02], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY], description: 'A tiny field for just a word or two of plain text.', opts: { backgroundColor: 'transparent', color: 'white', contentXCentering: 'h-center', fontTransform: 'uppercase', }, }, { viewType: ViewType.STATIC, tl: [-0.65, 0], br: [0.65, 0.18], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY], description: 'A tiny field for just a word or two of plain text.', opts: { backgroundColor: 'transparent', color: 'white', contentXCentering: 'h-center', fontTransform: 'uppercase', }, }, { viewType: ViewType.STATIC, tl: [-0.83, 0.2], br: [0.83, 0.95], types: [TemplateFieldType.TEXT, TemplateFieldType.VISUAL], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], description: 'A medium to large-sized field suitable for an image or longer text that should be the main focus, or share focus with field 1.', opts: { borderWidth: '8', borderColor: '#F8E71C', color: 'white', backgroundColor: '#242425', }, }, { viewType: ViewType.DEC, tl: [-0.8, -0.075], br: [-0.525, 0.075], opts: { backgroundColor: '#F8E71C', rotation: 45, }, }, { viewType: ViewType.DEC, tl: [-0.3075, -0.0245], br: [-0.2175, 0.0245], opts: { backgroundColor: '#F8E71C', rotation: 45, }, }, { viewType: ViewType.DEC, tl: [-0.045, -0.0245], br: [0.045, 0.0245], opts: { backgroundColor: '#F8E71C', rotation: 45, }, }, { viewType: ViewType.DEC, tl: [0.2175, -0.0245], br: [0.3075, 0.0245], opts: { backgroundColor: '#F8E71C', rotation: 45, }, }, { viewType: ViewType.DEC, tl: [0.525, -0.075], br: [0.8, 0.075], opts: { backgroundColor: '#F8E71C', rotation: 45, }, }, ], }; // public static FourField003: TemplateDocInfos = { // title: 'fourfield3', // width: 477, // height: 662, // opts: { // backgroundColor: '#9E9C95' // }, // fields: [{ // tl: [-.875, -.9], // br: [.875, .7], // types: [TemplateFieldType.VISUAL], // sizes: [TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], // description: '', // opts: { // borderWidth: '15', // borderColor: '#E0E0DA', // } // }, { // tl: [-.95, .8], // br: [-.1, .95], // types: [TemplateFieldType.TEXT], // sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], // description: '', // opts: { // backgroundColor: 'transparent', // color: 'white', // contentXCentering: 'h-right', // } // }, { // tl: [.1, .8], // br: [.95, .95], // types: [TemplateFieldType.TEXT], // sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], // description: '', // opts: { // backgroundColor: 'transparent', // color: 'red', // fontTransform: 'uppercase', // contentXCentering: 'h-left' // } // }, { // tl: [0, -.9], // br: [.85, -.66], // types: [TemplateFieldType.TEXT, TemplateFieldType.VISUAL], // sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], // description: '', // opts: { // backgroundColor: 'transparent', // contentXCentering: 'h-right' // } // }], // decorations: [{ // tl: [-.025, .8], // br: [.025, .95], // opts: { // backgroundColor: '#E0E0DA', // } // }] // }; public static FourField004: FieldSettings = { viewType: ViewType.FREEFORM, tl: [0,0], br: [414,583], opts: { backgroundColor: '#6CCAF0', borderColor: '#1088C3', borderWidth: '10', }, subfields: [ { viewType: ViewType.STATIC, tl: [-0.86, -0.92], br: [-0.075, -0.77], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY], description: 'A tiny field for just a word or two of plain text.', opts: { backgroundColor: '#E2B4F5', borderWidth: '9', borderColor: '#9222F1', contentXCentering: 'h-center', }, }, { viewType: ViewType.STATIC, tl: [0.075, -0.92], br: [0.86, -0.77], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY], description: 'A tiny field for just a word or two of plain text.', opts: { backgroundColor: '#F5B4DD', borderWidth: '9', borderColor: '#E260F3', contentXCentering: 'h-center', }, }, { viewType: ViewType.STATIC, tl: [-0.81, -0.64], br: [0.81, 0.48], types: [TemplateFieldType.VISUAL], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], description: 'A large to huge field for visual content that is the main content of the template.', opts: { borderWidth: '16', borderColor: '#A2BD77', }, }, { viewType: ViewType.STATIC, tl: [-0.86, 0.6], br: [0.86, 0.92], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE], description: 'A medium to large field for text that describes the visual content above', opts: { borderWidth: '9', borderColor: '#F0D601', backgroundColor: '#F3F57D', }, }, { viewType: ViewType.DEC, tl: [-0.852, -0.67], br: [0.852, 0.51], opts: { backgroundColor: 'transparent', borderColor: '#007C0C', borderWidth: '10', }, }, ], }; public static ThreeField001: FieldSettings = { viewType: ViewType.FREEFORM, tl: [0,0], br: [575, 770], opts: { backgroundColor: '#DDD3A9', }, subfields: [ { viewType: ViewType.STATIC, tl: [-0.66, -0.747], br: [0.66, 0.247], types: [TemplateFieldType.VISUAL], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], description: 'A medium to large field for visual content that is the central focus.', opts: { borderColor: 'yellow', borderWidth: '8', rotation: 45, }, }, { viewType: ViewType.STATIC, tl: [-0.7, 0.2], br: [0.7, 0.46], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], description: 'A very small text field for one to a few words. A good caption for the image.', opts: { backgroundColor: 'transparent', contentXCentering: 'h-center', }, }, { viewType: ViewType.STATIC, tl: [-0.95, 0.5], br: [0.95, 0.95], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE], description: 'A medium to large text field for a thorough description of the image. ', opts: { backgroundColor: 'transparent', color: 'white', }, }, { viewType: ViewType.DEC, tl: [0.2, -1.32], br: [1.8, -0.66], opts: { backgroundColor: '#CEB155', rotation: 45, }, }, { viewType: ViewType.DEC, tl: [-1.8, -1.32], br: [-0.2, -0.66], opts: { backgroundColor: '#CEB155', rotation: 135, }, }, { viewType: ViewType.DEC, tl: [0.33, 0.75], br: [1.66, 1.25], opts: { backgroundColor: '#CEB155', rotation: 135, }, }, { viewType: ViewType.DEC, tl: [-1.66, 0.75], br: [-0.33, 1.25], opts: { backgroundColor: '#CEB155', rotation: 45, }, }, ], }; public static ThreeField002: FieldSettings = { viewType: ViewType.FREEFORM, tl: [0,0], br: [477, 662], opts: { backgroundColor: '#9E9C95', }, subfields: [ { viewType: ViewType.STATIC, tl: [-0.875, -0.9], br: [0.875, 0.7], types: [TemplateFieldType.VISUAL], sizes: [TemplateFieldSize.MEDIUM, TemplateFieldSize.LARGE, TemplateFieldSize.HUGE], description: 'A medium to large visual field for the main content of the template', opts: { borderWidth: '15', borderColor: '#E0E0DA', }, }, { viewType: ViewType.STATIC, tl: [0.1, 0.775], br: [0.95, 0.975], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], description: 'A very small text field for one to a few words. The content should represent a general categorization of the image.', opts: { backgroundColor: 'transparent', color: '#AF0D0D', fontTransform: 'uppercase', fontBold: true, contentXCentering: 'h-left', }, }, { viewType: ViewType.STATIC, tl: [-0.95, 0.775], br: [-0.1, 0.975], types: [TemplateFieldType.TEXT], sizes: [TemplateFieldSize.TINY, TemplateFieldSize.SMALL], description: 'A very small text field for one to a few words. The content should contextualize field 2.', opts: { backgroundColor: 'transparent', color: 'black', contentXCentering: 'h-right', }, }, { viewType: ViewType.DEC, tl: [-0.025, 0.8], br: [0.025, 0.95], opts: { backgroundColor: '#E0E0DA', }, }, ], }; }