card_fields rewrite and magic-modules.mse-include (#21)

Overhauls the card_fields file to allow for template designers more freedom in manipulating data.

Adds magic-modules.mse-include, a large scale include file for building templates in a standardized way. Applying this to existing frames will be coming in future updates.
This commit is contained in:
GenevensiS
2024-05-25 00:57:47 +02:00
committed by GitHub
parent 44b059e2f7
commit fd4b8e4c89
1195 changed files with 13325 additions and 3633 deletions

View File

@@ -0,0 +1,50 @@
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-05-20
#### Also add this among the styling field section
#### (styling fields will appear in the order you place them).
#### This will add a boolean to enable custom fonts, and four text
#### options for customizing nameline, typeline, textbox, and pt fonts.
include file: /magic-modules.mse-include/fonts/styling_fields
#### You may also need to redefine the defaults in the style file:
swap_fonts_name_default := [
name: {"Beleren Bold"},
size: {16},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_type_default := [
name: {"Beleren Bold"},
size: {13},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_body_default := [
name: {"MPlantin"},
size: {13},
color: {"black"},
vertical: {0},
italic: {"MPlantin-Italic"}
]
swap_fonts_pt_default := [
name: {"Beleren Bold"},
size: {16},
color: {"black"},
vertical: {0},
italic: {""}
]
#### For DFC or TFC templates, or just templates with multiple text fields, use:
swap_fonts_name2_default := []
swap_fonts_name3_default := []
swap_fonts_type2_default := []
swap_fonts_type3_default := []
swap_fonts_body2_default := []
swap_fonts_body3_default := []
swap_fonts_pt2_default := []
swap_fonts_pt3_default := []

View File

@@ -0,0 +1,21 @@
styling field:
type: boolean
name: apply custom fonts
description: Enable to attempt to use custom fonts given below
initial: no
styling field:
type: text
name: custom name font
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
styling field:
type: text
name: custom type font
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
styling field:
type: text
name: custom body font
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
styling field:
type: text
name: custom pt font
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.