Coverage for rendercv/themes/options.py: 99%
195 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-26 00:25 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2025-01-26 00:25 +0000
1"""
2The `rendercv.themes.options` module contains the standard data models for the Typst
3themes' design options. To avoid code duplication, the themes are encouraged to inherit
4from these data models.
5"""
7import re
8from typing import Annotated, Literal, Optional
10import pydantic
11import pydantic_extra_types.color as pydantic_color
13from ..data.models.base import RenderCVBaseModelWithoutExtraKeys
16# Custom field types:
17def validate_typst_dimension(value: str) -> str:
18 if not re.fullmatch(r"\d+\.?\d*(cm|in|pt|mm|ex|em)", value):
19 message = (
20 "The value must be a number followed by a unit (cm, in, pt, mm, ex, em)."
21 " For example, 0.1cm."
22 )
23 raise ValueError(message)
24 return value
27TypstDimension = Annotated[
28 str,
29 pydantic.AfterValidator(validate_typst_dimension),
30]
31FontFamily = Literal[
32 "Libertinus Serif",
33 "New Computer Modern",
34 "DejaVu Sans Mono",
35 "Source Sans 3",
36 "Roboto",
37 "Open Sans",
38 "Ubuntu",
39 "Noto Sans",
40 "Mukta",
41 "XCharter",
42]
43BulletPoint = Literal["•", "◦", "-", "◆", "★", "■", "—", "○"]
44PageSize = Literal[
45 "a0",
46 "a1",
47 "a2",
48 "a3",
49 "a4",
50 "a5",
51 "a6",
52 "a7",
53 "a8",
54 "us-letter",
55 "us-legal",
56 "us-executive",
57 "us-gov-letter",
58 "us-gov-legal",
59 "us-business-card",
60 "presentation-16-9",
61 "presentation-4-3",
62]
63Alignment = Literal["left", "center", "right"]
64TextAlignment = Literal["left", "justified", "justified-with-no-hyphenation"]
65SectionTitleType = Optional[
66 Literal["with-parial-line", "with-full-line", "without-line", "moderncv"]
67]
69page_size_field_info = pydantic.Field(
70 default="us-letter",
71 title="Page Size",
72 description="The page size of the CV.",
73)
74page_top_margin_field_info = pydantic.Field(
75 default="2cm",
76 title="Top Margin",
77 description="The top margin of the page with units (cm, in, pt, mm, ex, em)",
78)
79page_bottom_margin_field_info = pydantic.Field(
80 default="2cm",
81 title="Bottom Margin",
82 description="The bottom margin of the page with units (cm, in, pt, mm, ex, em)",
83)
84page_left_margin_field_info = pydantic.Field(
85 default="2cm",
86 title="Left Margin",
87 description="The left margin of the page with units (cm, in, pt, mm, ex, em)",
88)
89page_right_margin_field_info = pydantic.Field(
90 default="2cm",
91 title="Right Margin",
92 description="The right margin of the page with units (cm, in, pt, mm, ex, em)",
93)
94page_show_page_numbering_field_info = pydantic.Field(
95 default=True,
96 title="Show Page Numbering",
97 description=(
98 'If this option is "true", the page numbering will be shown in the footer.'
99 ),
100)
101page_show_last_updated_date_field_info = pydantic.Field(
102 default=True,
103 title="Show Last Updated Date",
104 description=(
105 'If this option is "true", the last updated date will be shown in the footer.'
106 ),
107)
110class Page(RenderCVBaseModelWithoutExtraKeys):
111 size: PageSize = page_size_field_info
112 top_margin: TypstDimension = page_top_margin_field_info
113 bottom_margin: TypstDimension = page_bottom_margin_field_info
114 left_margin: TypstDimension = page_left_margin_field_info
115 right_margin: TypstDimension = page_right_margin_field_info
116 show_page_numbering: bool = page_show_page_numbering_field_info
117 show_last_updated_date: bool = page_show_last_updated_date_field_info
120color_common_description = (
121 "\nThe color can be specified either with their name"
122 " (https://www.w3.org/TR/SVG11/types.html#ColorKeywords), hexadecimal value, RGB"
123 " value, or HSL value."
124)
125color_common_examples = ["Black", "7fffd4", "rgb(0,79,144)", "hsl(270, 60%, 70%)"]
128colors_text_field_info = pydantic.Field(
129 default="rgb(0,0,0)",
130 title="Color of Text",
131 description="The color of the text." + color_common_description,
132 examples=color_common_examples,
133)
134colors_name_field_info = pydantic.Field(
135 default="rgb(0,79,144)",
136 title="Color of Name",
137 description=("The color of the name in the header." + color_common_description),
138 examples=color_common_examples,
139)
140colors_connections_field_info = pydantic.Field(
141 default="rgb(0,79,144)",
142 title="Color of Connections",
143 description=(
144 "The color of the connections in the header." + color_common_description
145 ),
146 examples=color_common_examples,
147)
148colors_section_titles_field_info = pydantic.Field(
149 default="rgb(0,79,144)",
150 title="Color of Section Titles",
151 description=("The color of the section titles." + color_common_description),
152 examples=color_common_examples,
153)
154colors_links_field_info = pydantic.Field(
155 default="rgb(0,79,144)",
156 title="Color of Links",
157 description="The color of the links." + color_common_description,
158 examples=color_common_examples,
159)
160colors_last_updated_date_and_page_numbering_field_info = pydantic.Field(
161 default="rgb(128,128,128)",
162 title="Color of Last Updated Date and Page Numbering",
163 description=(
164 "The color of the last updated date and page numbering."
165 + color_common_description
166 ),
167 examples=color_common_examples,
168)
171class Colors(RenderCVBaseModelWithoutExtraKeys):
172 text: pydantic_color.Color = colors_text_field_info
173 name: pydantic_color.Color = colors_name_field_info
174 connections: pydantic_color.Color = colors_connections_field_info
175 section_titles: pydantic_color.Color = colors_section_titles_field_info
176 links: pydantic_color.Color = colors_links_field_info
177 last_updated_date_and_page_numbering: pydantic_color.Color = (
178 colors_last_updated_date_and_page_numbering_field_info
179 )
182text_font_family_field_info = pydantic.Field(
183 default="Source Sans 3",
184 title="Font Family",
185 description="The font family.",
186)
187text_font_size_field_info = pydantic.Field(
188 default="10pt",
189 title="Font Size",
190 description="The font size of the text.",
191)
192text_leading_field_info = pydantic.Field(
193 default="0.6em",
194 title="Leading",
195 description="The vertical space between adjacent lines of text.",
196)
197text_alignment_field_info = pydantic.Field(
198 default="justified",
199 title="Alignment of Text",
200 description="The alignment of the text.",
201)
202text_date_and_location_column_alignment_field_info = pydantic.Field(
203 default="right",
204 title="Alignment of Date and Location Column",
205 description="The alignment of the date column in the entries.",
206)
209class Text(RenderCVBaseModelWithoutExtraKeys):
210 font_family: FontFamily = text_font_family_field_info
211 font_size: TypstDimension = text_font_size_field_info
212 leading: TypstDimension = text_leading_field_info
213 alignment: TextAlignment = text_alignment_field_info
214 date_and_location_column_alignment: Alignment = (
215 text_date_and_location_column_alignment_field_info
216 )
219links_underline_field_info = pydantic.Field(
220 default=False,
221 title="Underline Links",
222 description='If this option is "true", links will be underlined.',
223)
224links_use_external_link_icon_field_info = pydantic.Field(
225 default=True,
226 title="Use External Link Icon",
227 description=(
228 'If this option is "true", an external link icon will be shown next to the'
229 " links."
230 ),
231)
234class Links(RenderCVBaseModelWithoutExtraKeys):
235 underline: bool = links_underline_field_info
236 use_external_link_icon: bool = links_use_external_link_icon_field_info
239header_name_font_size_field_info = pydantic.Field(
240 default="30pt",
241 title="Name Font Size",
242 description="The font size of the name in the header.",
243)
244header_name_bold_field_info = pydantic.Field(
245 default=True,
246 title="Bold Name",
247 description='If this option is "true", the name in the header will be bold.',
248)
249header_photo_width_field_info = pydantic.Field(
250 default="3.5cm",
251 title="Width of the Photo",
252 description="The width of the photo in the header.",
253)
254header_vertical_space_name_connections_field_info = pydantic.Field(
255 default="0.7cm",
256 title="Vertical Margin Between the Name and Connections",
257 description=(
258 "The vertical margin between the name of the person and the connections."
259 ),
260)
261header_vertical_space_connections_first_section_field_info = pydantic.Field(
262 default="0.7cm",
263 title="Vertical Margin Between Connections and First Section",
264 description=(
265 "The vertical margin between the connections and the first section title."
266 ),
267)
268header_horizontal_space_connections_field_info = pydantic.Field(
269 default="0.5cm",
270 title="Space Between Connections",
271 description="The space between the connections (like phone, email, and website).",
272)
273header_separator_between_connections_field_info = pydantic.Field(
274 default="",
275 title="Separator Between Connections",
276 description="The separator between the connections in the header.",
277)
278header_use_icons_for_connections_field_info = pydantic.Field(
279 default=True,
280 title="Use Icons for Connections",
281 description=(
282 'If this option is "true", icons will be used for the connections'
283 " (phone number, email, social networks, etc.) in the header."
284 ),
285)
286header_alignment_field_info = pydantic.Field(
287 default="center",
288 title="Alignment of the Header",
289 description="The alignment of the header.",
290)
293class Header(RenderCVBaseModelWithoutExtraKeys):
294 name_font_size: TypstDimension = header_name_font_size_field_info
295 name_bold: bool = header_name_bold_field_info
296 photo_width: TypstDimension = header_photo_width_field_info
297 vertical_space_between_name_and_connections: TypstDimension = (
298 header_vertical_space_name_connections_field_info
299 )
300 vertical_space_between_connections_and_first_section: TypstDimension = (
301 header_vertical_space_connections_first_section_field_info
302 )
303 horizontal_space_between_connections: TypstDimension = (
304 header_horizontal_space_connections_field_info
305 )
306 separator_between_connections: str = header_separator_between_connections_field_info
307 use_icons_for_connections: bool = header_use_icons_for_connections_field_info
308 alignment: Alignment = header_alignment_field_info
311section_titles_font_size_field_info = pydantic.Field(
312 default="1.4em",
313 title="Font Size",
314 description="The font size of the section titles.",
315)
316section_titles_bold_field_info = pydantic.Field(
317 default=True,
318 title="Bold Section Titles",
319 description='If this option is "true", the section titles will be bold.',
320)
321section_titles_type_field_info = pydantic.Field(
322 default="with-parial-line",
323 title="Line Type",
324 description="The type of the section titles.",
325)
326section_titles_line_thickness_field_info = pydantic.Field(
327 default="0.5pt",
328 title="Line Thickness",
329 description="The thickness of the line under the section titles.",
330)
331section_titles_vertical_space_above_field_info = pydantic.Field(
332 default="0.5cm",
333 title="Vertical Space Above Section Titles",
334 description="The vertical space above the section titles.",
335)
336section_titles_vertical_space_below_field_info = pydantic.Field(
337 default="0.3cm",
338 title="Vertical Space Below Section Titles",
339 description="The vertical space below the section titles.",
340)
341section_titles_small_caps_field_info = pydantic.Field(
342 default=False,
343 title="Small Caps",
344 description='If this option is "true", the section titles will be in small caps.',
345)
348class SectionTitles(RenderCVBaseModelWithoutExtraKeys):
349 type: SectionTitleType = section_titles_type_field_info
350 font_size: TypstDimension = section_titles_font_size_field_info
351 bold: bool = section_titles_bold_field_info
352 small_caps: bool = section_titles_small_caps_field_info
353 line_thickness: TypstDimension = section_titles_line_thickness_field_info
354 vertical_space_above: TypstDimension = (
355 section_titles_vertical_space_above_field_info
356 )
357 vertical_space_below: TypstDimension = (
358 section_titles_vertical_space_below_field_info
359 )
362entries_date_and_location_width_field_info = pydantic.Field(
363 default="4.15cm",
364 title="Width of Date and Location",
365 description="The width of the date and location in the entries.",
366)
367entries_left_and_right_margin_field_info = pydantic.Field(
368 default="0.2cm",
369 title="Left and Right Margin",
370 description="The left and right margin of the entries.",
371)
372entries_horizontal_space_between_columns_field_info = pydantic.Field(
373 default="0.1cm",
374 title="Horizontal Space Between Columns",
375 description="The horizontal space between the columns in the entries.",
376)
377entries_vertical_space_between_entries_field_info = pydantic.Field(
378 default="1.2em",
379 title="Vertical Space Between Entries",
380 description="The vertical space between the entries.",
381)
382entries_allow_page_break_in_entries_field_info = pydantic.Field(
383 default=True,
384 title="Allow Page Break in Entries",
385 description=(
386 'If this option is "true", a page break will be allowed in the entries.'
387 ),
388)
389entries_short_second_row_field_info = pydantic.Field(
390 default=False,
391 title="Short Second Row",
392 description=(
393 'If this option is "true", second row will be shortened to leave the bottom'
394 " of the date empty."
395 ),
396)
397entries_show_time_spans_in_field_info = pydantic.Field(
398 default=[],
399 title="Show Time Spans in",
400 description=(
401 "The list of section titles where the time spans will be shown in the entries."
402 ),
403)
406class Entries(RenderCVBaseModelWithoutExtraKeys):
407 date_and_location_width: TypstDimension = entries_date_and_location_width_field_info
408 left_and_right_margin: TypstDimension = entries_left_and_right_margin_field_info
409 horizontal_space_between_columns: TypstDimension = (
410 entries_horizontal_space_between_columns_field_info
411 )
412 vertical_space_between_entries: TypstDimension = (
413 entries_vertical_space_between_entries_field_info
414 )
415 allow_page_break_in_entries: bool = entries_allow_page_break_in_entries_field_info
416 short_second_row: bool = entries_short_second_row_field_info
417 show_time_spans_in: list[str] = entries_show_time_spans_in_field_info
420highlights_bullet_field_info = pydantic.Field(
421 default="•",
422 title="Bullet",
423 description="The bullet used for the highlights and bullet entries.",
424)
425highlights_top_margin_field_info = pydantic.Field(
426 default="0.25cm",
427 title="Top Margin",
428 description="The top margin of the highlights.",
429)
430highlights_left_margin_field_info = pydantic.Field(
431 default="0.4cm",
432 title="Left Margin",
433 description="The left margin of the highlights.",
434)
435highlights_vertical_space_between_highlights_field_info = pydantic.Field(
436 default="0.25cm",
437 title="Vertical Space Between Highlights",
438 description="The vertical space between the highlights.",
439)
440highlights_horizontal_space_between_bullet_and_highlight_field_info = pydantic.Field(
441 default="0.5em",
442 title="Horizontal Space Between Bullet and Highlight",
443 description="The horizontal space between the bullet and the highlight.",
444)
445highlights_summary_left_margin_field_info = pydantic.Field(
446 default="0cm",
447 title="Left Margin of the Summary",
448 description="The left margin of the summary.",
449)
452class Highlights(RenderCVBaseModelWithoutExtraKeys):
453 bullet: BulletPoint = highlights_bullet_field_info
454 top_margin: TypstDimension = highlights_top_margin_field_info
455 left_margin: TypstDimension = highlights_left_margin_field_info
456 vertical_space_between_highlights: TypstDimension = (
457 highlights_vertical_space_between_highlights_field_info
458 )
459 horizontal_space_between_bullet_and_highlight: TypstDimension = (
460 highlights_horizontal_space_between_bullet_and_highlight_field_info
461 )
462 summary_left_margin: TypstDimension = highlights_summary_left_margin_field_info
465entry_base_with_date_main_column_second_row_template_field_info = pydantic.Field(
466 default="SUMMARY\nHIGHLIGHTS",
467 title="Main Column, Second Row",
468 description=(
469 "The content of the second row of the Main Column. The available placeholders"
470 " are all the keys used in the entries (in uppercase)."
471 ),
472)
473entry_base_with_date_date_and_location_column_template_field_info = pydantic.Field(
474 default="LOCATION\nDATE",
475 title="Date and Location Column",
476 description=(
477 "The content of the Date and Location Column. The available placeholders are"
478 " all the keys used in the entries (in uppercase)."
479 ),
480)
483class EntryBaseWithDate(RenderCVBaseModelWithoutExtraKeys):
484 main_column_second_row_template: str = (
485 entry_base_with_date_main_column_second_row_template_field_info
486 )
487 date_and_location_column_template: str = (
488 entry_base_with_date_date_and_location_column_template_field_info
489 )
492publication_entry_main_column_first_row_template_field_info = pydantic.Field(
493 default="**TITLE**",
494 title="Main Column",
495 description=(
496 "The content of the Main Column. The available placeholders are all the keys"
497 " used in the entries (in uppercase)."
498 ),
499)
500publication_entry_main_column_second_row_template_field_info = pydantic.Field(
501 default="AUTHORS\nURL (JOURNAL)",
502 title="Main Column, Second Row",
503 description=(
504 "The content of the second row of the Main Column. The available placeholders"
505 " are all the keys used in the entries (in uppercase)."
506 ),
507)
508publication_entry_main_column_second_row_without_journal_template_field_info = pydantic.Field(
509 default="AUTHORS\nURL",
510 title="Main Column, Second Row Without Journal",
511 description=(
512 "The content of the Main Column in case the journal is not given. The"
513 " available placeholders are all the keys used in the entries (in uppercase)."
514 ),
515)
516publication_entry_main_column_second_row_without_url_template_field_info = pydantic.Field(
517 default="AUTHORS\nJOURNAL",
518 title="Main Column, Second Row Without URL",
519 description=(
520 "The content of the Main Column in case the `doi` or `url is not given. The"
521 " available placeholders are all the keys used in the entries (in uppercase)."
522 ),
523)
524publication_entry_date_and_location_column_template_field_info = pydantic.Field(
525 default="DATE",
526 title="Date and Location Column",
527 description=(
528 "The content of the Date and Location Column. The available placeholders are"
529 " all the keys used in the entries (in uppercase)."
530 ),
531)
534class PublicationEntry(RenderCVBaseModelWithoutExtraKeys):
535 main_column_first_row_template: str = (
536 publication_entry_main_column_first_row_template_field_info
537 )
538 main_column_second_row_template: str = (
539 publication_entry_main_column_second_row_template_field_info
540 )
541 main_column_second_row_without_journal_template: str = (
542 publication_entry_main_column_second_row_without_journal_template_field_info
543 )
544 main_column_second_row_without_url_template: str = (
545 publication_entry_main_column_second_row_without_url_template_field_info
546 )
547 date_and_location_column_template: str = (
548 publication_entry_date_and_location_column_template_field_info
549 )
552education_entry_main_column_first_row_template_field_info = pydantic.Field(
553 default="**INSTITUTION**, AREA",
554 title="Main Column, First Row",
555 description=(
556 "The content of the Main Column. The available placeholders are all the keys"
557 " used in the entries (in uppercase)."
558 ),
559)
560education_entry_degree_column_template_field_info = pydantic.Field(
561 default="**DEGREE**",
562 title="Template of the Degree Column",
563 description=(
564 'If given, a degree column will be added to the education entry. If "null",'
565 " no degree column will be shown. The available placeholders are all the"
566 " keys used in the entries (in uppercase)."
567 ),
568)
569education_entry_degree_column_width_field_info = pydantic.Field(
570 default="1cm",
571 title="Width of the Degree Column",
572 description=(
573 'The width of the degree column if the "degree_column_template" is given.'
574 ),
575)
578class EducationEntryBase(RenderCVBaseModelWithoutExtraKeys):
579 main_column_first_row_template: str = (
580 education_entry_main_column_first_row_template_field_info
581 )
582 degree_column_template: Optional[str] = (
583 education_entry_degree_column_template_field_info
584 )
585 degree_column_width: TypstDimension = education_entry_degree_column_width_field_info
588class EducationEntry(EntryBaseWithDate, EducationEntryBase):
589 pass
592normal_entry_main_column_first_row_template_field_info = pydantic.Field(
593 default="**NAME**",
594 title="Main Column, First Row",
595 description=(
596 "The content of the Main Column. The available placeholders are all the"
597 " keys used in the entries (in uppercase)."
598 ),
599)
602class NormalEntryBase(RenderCVBaseModelWithoutExtraKeys):
603 main_column_first_row_template: str = (
604 normal_entry_main_column_first_row_template_field_info
605 )
608class NormalEntry(EntryBaseWithDate, NormalEntryBase):
609 pass
612experience_entry_main_column_first_row_template_field_info = pydantic.Field(
613 default="**COMPANY**, POSITION",
614 title="Main Column, First Row",
615 description=(
616 "The content of the Main Column. The available placeholders are all the keys"
617 " used in the entries (in uppercase)."
618 ),
619)
622class ExperienceEntryBase(RenderCVBaseModelWithoutExtraKeys):
623 main_column_first_row_template: str = (
624 experience_entry_main_column_first_row_template_field_info
625 )
628class ExperienceEntry(EntryBaseWithDate, ExperienceEntryBase):
629 pass
632one_line_entry_template_field_info = pydantic.Field(
633 default="**LABEL:** DETAILS",
634 title="Template",
635 description=(
636 "The template of the one-line entry. The available placeholders are all the"
637 " keys used in the entries (in uppercase)."
638 ),
639)
642class OneLineEntry(RenderCVBaseModelWithoutExtraKeys):
643 template: str = one_line_entry_template_field_info
646entry_types_one_line_entry_field_info = pydantic.Field(
647 default=OneLineEntry(),
648 title="One-Line Entry",
649 description="Options related to one-line entries.",
650)
651entry_types_education_entry_field_info = pydantic.Field(
652 default=EducationEntry(),
653 title="Education Entry",
654 description="Options related to education entries.",
655)
656entry_types_normal_entry_field_info = pydantic.Field(
657 default=NormalEntry(),
658 title="Normal Entry",
659 description="Options related to normal entries.",
660)
661entry_types_experience_entry_field_info = pydantic.Field(
662 default=ExperienceEntry(),
663 title="Experience Entry",
664 description="Options related to experience entries.",
665)
666entry_types_publication_entry_field_info = pydantic.Field(
667 default=PublicationEntry(),
668 title="Publication Entry",
669 description="Options related to publication entries.",
670)
673class EntryTypes(RenderCVBaseModelWithoutExtraKeys):
674 one_line_entry: OneLineEntry = entry_types_one_line_entry_field_info
675 education_entry: EducationEntry = entry_types_education_entry_field_info
676 normal_entry: NormalEntry = entry_types_normal_entry_field_info
677 experience_entry: ExperienceEntry = entry_types_experience_entry_field_info
678 publication_entry: PublicationEntry = entry_types_publication_entry_field_info
681theme_options_theme_field_info = pydantic.Field(
682 default="tobeoverwritten",
683 title="Theme",
684 description="The theme of the CV. It just changes the default values.",
685)
686theme_options_page_field_info = pydantic.Field(
687 default=Page(),
688 title="Page",
689 description="Options related to the page.",
690)
691theme_options_colors_field_info = pydantic.Field(
692 default=Colors(),
693 title="Colors",
694 description="Color used throughout the CV.",
695)
696theme_options_text_field_info = pydantic.Field(
697 default=Text(),
698 title="Text",
699 description="Options related to text.",
700)
701theme_options_links_field_info = pydantic.Field(
702 default=Links(),
703 title="Links",
704 description="Options related to links.",
705)
706theme_options_header_field_info = pydantic.Field(
707 default=Header(),
708 title="Headers",
709 description="Options related to headers.",
710)
711theme_options_section_titles_field_info = pydantic.Field(
712 default=SectionTitles(),
713 title="Section Titles",
714 description="Options related to section titles.",
715)
716theme_options_entries_field_info = pydantic.Field(
717 default=Entries(),
718 title="Entries",
719 description="Options related to entries.",
720)
721theme_options_highlights_field_info = pydantic.Field(
722 default=Highlights(),
723 title="Highlights",
724 description="Options related to highlights.",
725)
726theme_options_entry_types_field_info = pydantic.Field(
727 default=EntryTypes(),
728 title="Templates",
729 description="Options related to the templates.",
730)
733class ThemeOptions(RenderCVBaseModelWithoutExtraKeys):
734 theme: Literal["tobeoverwritten"] = theme_options_theme_field_info
735 page: Page = theme_options_page_field_info
736 colors: Colors = theme_options_colors_field_info
737 text: Text = theme_options_text_field_info
738 links: Links = theme_options_links_field_info
739 header: Header = theme_options_header_field_info
740 section_titles: SectionTitles = theme_options_section_titles_field_info
741 entries: Entries = theme_options_entries_field_info
742 highlights: Highlights = theme_options_highlights_field_info
743 entry_types: EntryTypes = theme_options_entry_types_field_info