├── Taskfile.yml
├── modules
└── yoocccaddtocalendar
│ ├── elements
│ ├── assets
│ │ └── css
│ │ │ └── add-to-calendar.css
│ ├── yoocccaddtocalendar
│ │ ├── images
│ │ │ ├── iconSmall.svg
│ │ │ └── icon.svg
│ │ ├── templates
│ │ │ ├── content.php
│ │ │ └── template.php
│ │ ├── element.php
│ │ └── element.json
│ └── yoocccaddtocalendar_item
│ │ ├── element.php
│ │ ├── templates
│ │ ├── content.php
│ │ └── template.php
│ │ └── element.json
│ └── bootstrap.php
├── .env
├── yoocccaddtocalendar.xml
├── composer.json
├── yoocccaddtocalendar.php
├── composer.lock
└── README.md
/Taskfile.yml:
--------------------------------------------------------------------------------
1 | # Add your own tasks here.
2 |
3 | version: '3'
4 |
5 | includes:
6 | utils: vendor/yootheme/starter-utils
7 | build:
8 | taskfile: ./build/Taskfile.yml
9 | flatten: true
10 |
11 | dotenv: ['.env']
12 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/assets/css/add-to-calendar.css:
--------------------------------------------------------------------------------
1 | .atcb-dropdown {
2 | position: fixed !important;
3 | z-index: 99999 !important;
4 | top: auto !important;
5 | left: auto !important;
6 | transform: none !important;
7 | }
8 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar/images/iconSmall.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar/images/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar_item/element.php:
--------------------------------------------------------------------------------
1 | [
5 | 'render' => function ($node) {
6 | // Don't render element if content fields are empty
7 | // return $node->props['name'] != '';
8 | },
9 | ],
10 | ];
11 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar/templates/content.php:
--------------------------------------------------------------------------------
1 | 1) : ?>
2 |
3 |
4 | -
5 |
6 | = $builder->render($child, ['element' => $props]) ?>
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | = $builder->render($children[0], ['element' => $props]) ?>
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar/element.php:
--------------------------------------------------------------------------------
1 | [
8 | 'render' => function ($node, array $params) {
9 | /**
10 | * @var Metadata $metadata
11 | */
12 | $metadata = app(Metadata::class);
13 |
14 | // Style file
15 | $metadata->set('style:cccyooaddtocalendar', ['href' => Path::get('../assets/css/add-to-calendar.css')]);
16 |
17 | // Script file
18 | $metadata->set('script:cccyooaddtocalendar', ['src' => Path::get('../assets/js/add-to-calendar.js'), 'defer' => true, 'async' => true]);
19 |
20 | },
21 | ],
22 |
23 | ];
24 |
25 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/bootstrap.php:
--------------------------------------------------------------------------------
1 | [
13 | // add theme config ...
14 | ],
15 |
16 | 'config' => [
17 | // add styler config ...
18 | ],
19 |
20 | 'events' => [
21 | // add event handlers ...
22 | ],
23 |
24 | 'extend' => [
25 | // extend container services ...
26 |
27 | Builder::class => function (Builder $builder) {
28 | $builder->addTypePath(Path::get('./elements/*/element.json'));
29 | },
30 | ],
31 |
32 | ];
33 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | TITLE='CCC YOOtheme Add to Calendar Button'
2 | NAME='yoocccaddtocalendar'
3 | VERSION='0.0.2'
4 | DESCRIPTION='YOOtheme Pro Element to add an "Add to Calendar Button"'
5 | DATE='{{now | date "2006-01-02"}}'
6 | COPYRIGHT='Copyright (C)'
7 | LICENSE='GNU General Public License'
8 | AUTHOR='COOLCAT creations, Elisa Foltyn'
9 | AUTHOREMAIL='mail@coolcat-creations.com'
10 | AUTHORURL='https://coolcat-creations.com'
11 |
12 | # Update server
13 | UPDATEURI='https://coolcat-campus.com/updates/yoocccaddtocalendar/update.xml'
14 |
15 | # Plugin information for the Update Server
16 | STABILITY='stable'
17 | DOWNLOADURL='https://example.com/downloads'
18 | PHPMINIMUM='7.4'
19 | JOOMLAMINIMUM='(5\.[012]|4\.[01234]|3\.10)\.'
20 | WORDPRESSMINIMUM='6.2'
21 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar/templates/template.php:
--------------------------------------------------------------------------------
1 | $props['options-google'],
5 | 'apple' => $props['options-apple'],
6 | 'outlookcom' => $props['options-outlookcom'],
7 | 'yahoo' => $props['options-yahoo'],
8 | 'microsoft365' => $props['options-microsoft365'],
9 | 'microsoftteams' => $props['options-microsoftteams'],
10 | ];
11 |
12 | $activeOptions = [];
13 |
14 | foreach ($availableOptions as $key => $isActive) {
15 | if ($isActive == 1) {
16 | $activeOptions[] = $key;
17 | }
18 | }
19 |
20 |
21 | // Element
22 | $el = $this->el('div', [
23 | 'class' => [
24 | 'yoocccaddtocalendar-element'
25 | ],
26 | ]);
27 |
28 | ?>
29 |
30 | = $el($props, $attrs); ?>
31 |
32 |
33 | = $builder->render($child, ['element' => $props, 'activeOptions' => $activeOptions]) ?>
34 |
35 |
36 | = $el->end() ?>
37 |
--------------------------------------------------------------------------------
/yoocccaddtocalendar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | CCC YOOtheme Add to Calendar Button
4 | 0.0.2
5 | YOOtheme Pro Element to add an "Add to Calendar Button"
6 | 2025-04-23
7 | Copyright (C)
8 | GNU General Public License
9 | COOLCAT creations, Elisa Foltyn
10 | mail@coolcat-creations.com
11 | https://coolcat-creations.com
12 |
13 | yoocccaddtocalendar.php
14 | modules
15 |
16 |
17 |
18 | https://coolcat-campus.com/updates/yoocccaddtocalendar/update.xml/update.xml
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "yootheme/starter-plugin",
3 | "description": "YOOtheme Pro - Starter Plugin",
4 | "license": "MIT",
5 | "type": "project",
6 | "keywords": [
7 | "joomla",
8 | "wordpress",
9 | "yootheme"
10 | ],
11 | "require": {
12 | "php": "^8.0"
13 | },
14 | "require-dev": {
15 | "yootheme/starter-utils": "^1.0"
16 | },
17 | "scripts": {
18 | "run:task": "YOOtheme\\Starter\\TaskHelper::run",
19 | "create:plugin": "YOOtheme\\Starter\\CreatePluginCommand",
20 | "create:element": "YOOtheme\\Starter\\CreateElementCommand",
21 | "create:module": "YOOtheme\\Starter\\CreateModuleCommand",
22 | "create:joomlaUpdate": "YOOtheme\\Starter\\CreateJoomlaUpdateCommand",
23 | "create:wordpressUpdate": "YOOtheme\\Starter\\CreateWordpressUpdateCommand",
24 | "post-create-project-cmd": "echo Please run composer create:plugin",
25 | "post-update-cmd": "YOOtheme\\Starter\\TaskHelper::postUpdate"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/yoocccaddtocalendar.php:
--------------------------------------------------------------------------------
1 | 'onAfterInitialise'];
23 | }
24 |
25 | /**
26 | * Use 'onAfterInitialise' event.
27 | */
28 | public function onAfterInitialise()
29 | {
30 | // Check if the YOOtheme app class exists
31 | if (!class_exists(Application::class, false)) {
32 | return;
33 | }
34 |
35 | // include autoload
36 | require __DIR__ . '/vendor/autoload.php';
37 |
38 | // Load module from the same directory
39 | $app = Application::getInstance();
40 | $app->load(__DIR__ . '/modules/*/bootstrap.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar_item/templates/content.php:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
16 | name="= $props['name'] ?>"
17 |
18 |
19 | options="'= $props['options'] ?>'"
20 |
21 |
22 | location="= $props['location'] ?>"
23 |
24 |
25 | startDate="= $props['start_date'] ?>"
26 |
27 |
28 | endDate="= $props['end_date'] ?>"
29 |
30 |
31 | startTime="= $props['start_time'] ?>"
32 |
33 |
34 | endTime="= $props['end_time'] ?>"
35 |
36 |
37 |
38 | timeZone="= $props['time_zone'] ?>"
39 |
40 | >
41 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar_item/templates/template.php:
--------------------------------------------------------------------------------
1 | el('div', [
15 | 'class' => [
16 | 'yoocccaddtocalendar-item',
17 | ],
18 | ]);
19 |
20 | ?>
21 |
22 |
23 |
24 |
26 | name="= $name ?>"
27 |
28 |
29 | options='= $options ?>'
30 |
31 |
32 | location="= $location ?>"
33 |
34 |
35 | startdate="= $startDate ?>"
36 |
37 |
38 | enddate="= $endDate ?>"
39 |
40 |
41 | starttime="= $startTime ?>"
42 |
43 |
44 | endtime="= $endTime ?>"
45 |
46 |
47 |
48 | timezone="= $timeZone ?>"
49 |
50 | >
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 | "This file is @generated automatically"
6 | ],
7 | "content-hash": "b954339d110cc4773e95741258d341ad",
8 | "packages": [],
9 | "packages-dev": [
10 | {
11 | "name": "yootheme/starter-utils",
12 | "version": "1.0.12",
13 | "source": {
14 | "type": "git",
15 | "url": "https://github.com/yootheme/starter-utils.git",
16 | "reference": "274d04ee2a203ff839f6419d4d719d0324ec03ed"
17 | },
18 | "dist": {
19 | "type": "zip",
20 | "url": "https://api.github.com/repos/yootheme/starter-utils/zipball/274d04ee2a203ff839f6419d4d719d0324ec03ed",
21 | "reference": "274d04ee2a203ff839f6419d4d719d0324ec03ed",
22 | "shasum": ""
23 | },
24 | "require": {
25 | "php": "^8.0"
26 | },
27 | "require-dev": {
28 | "composer/composer": "^2.7",
29 | "phpstan/phpstan": "^1.11"
30 | },
31 | "type": "library",
32 | "autoload": {
33 | "psr-4": {
34 | "YOOtheme\\Starter\\": "src"
35 | }
36 | },
37 | "notification-url": "https://packagist.org/downloads/",
38 | "license": [
39 | "MIT"
40 | ],
41 | "description": "YOOtheme Pro - Starter Utilities",
42 | "homepage": "https://yootheme.com",
43 | "keywords": [
44 | "joomla",
45 | "wordpress",
46 | "yootheme"
47 | ],
48 | "support": {
49 | "issues": "https://github.com/yootheme/starter-utils/issues",
50 | "source": "https://github.com/yootheme/starter-utils"
51 | },
52 | "time": "2025-01-28T12:06:38+00:00"
53 | }
54 | ],
55 | "aliases": [],
56 | "minimum-stability": "stable",
57 | "stability-flags": [],
58 | "prefer-stable": false,
59 | "prefer-lowest": false,
60 | "platform": {
61 | "php": "^8.0"
62 | },
63 | "platform-dev": [],
64 | "plugin-api-version": "2.6.0"
65 | }
66 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar_item/element.json:
--------------------------------------------------------------------------------
1 | {
2 | "@import": ".\/element.php",
3 | "name": "yoocccaddtocalendar_item",
4 | "title": "Item",
5 | "width": 500,
6 | "templates": {
7 | "render": ".\/templates\/template.php",
8 | "content": ".\/templates\/content.php"
9 | },
10 | "placeholder": {
11 | "props": {
12 | "name": "Name"
13 | }
14 | },
15 | "fields": {
16 | "title": {
17 | "label": "title",
18 | "type": "text",
19 | "source": true
20 | },
21 | "location": {
22 | "label": "Location",
23 | "type": "text",
24 | "source": true
25 | },
26 | "start-date": {
27 | "label": "Start Date",
28 | "type": "text",
29 | "description": "Set the start date. YYYY-MM-DD",
30 | "source": true
31 | },
32 | "end-date": {
33 | "label": "End Date",
34 | "type": "text",
35 | "description": "Set the end date. YYYY-MM-DD",
36 | "source": true
37 | },
38 | "start-time": {
39 | "label": "Start Time",
40 | "type": "text",
41 | "description": "Set the start time.",
42 | "source": true
43 | },
44 | "end-time": {
45 | "label": "End Time",
46 | "type": "text",
47 | "description": "Set the end time.",
48 | "source": true
49 | },
50 | "time-zone": {
51 | "label": "Time Zone",
52 | "type": "text",
53 | "description": "Set the time zone identifier. Europe/Berlin",
54 | "source": true
55 | },
56 | "status": "${builder.statusItem}",
57 | "source": "${builder.source}"
58 | },
59 | "fieldset": {
60 | "default": {
61 | "type": "tabs",
62 | "fields": [
63 | {
64 | "title": "Content",
65 | "fields": [
66 | "title",
67 | "location",
68 | "start-date",
69 | "end-date",
70 | "start-time",
71 | "end-time",
72 | "time-zone"
73 | ]
74 | },
75 | {
76 | "title": "Settings",
77 | "fields": [
78 | {
79 | "label": "Image",
80 | "type": "group",
81 | "fields": [
82 | "image_focal_point"
83 | ]
84 | }
85 | ]
86 | },
87 | "${builder.advancedItem}"
88 | ]
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # Starter Plugin
6 |
7 | The YOOtheme Starter Plugin is a ready-to-use starter kit to help you build your next [YOOtheme Pro](https://yootheme.com) extension. Easily create a module for YOOtheme Pro to extend its functionalities. For example, add setting panels to the customizer, elements to the page builder or load needed asset files into the site. It takes care of all the tedious tasks, like the integration into Joomla or WordPress, and helps with distribution, versioning and updating of your YOOtheme Pro extension, so you can focus on the actual features.
8 |
9 | ## Requirements
10 |
11 | Install [Composer v2.5+](https://getcomposer.org/download/), which is used to install PHP packages.
12 |
13 | Also, use Node and npm to install [Task](https://taskfile.dev/), which is needed to run build tasks.
14 |
15 | ```bash
16 | npm install -g @go-task/cli
17 | ```
18 |
19 | ## Create a new plugin
20 |
21 | To create a new plugin, run Composer's `create-project` command in the plugins folder of WordPress `wp-content/plugins` or Joomla `plugins/system`. Replace `PLUGIN_NAME` with the name of your plugin, for example `myplugin`.
22 |
23 | ```bash
24 | composer create-project yootheme/starter-plugin PLUGIN_NAME
25 | ```
26 |
27 | After Composer has installed the YOOtheme Starter Plugin package, you need to run the `create:plugin` command.
28 |
29 | ```bash
30 | composer create:plugin
31 | ```
32 |
33 | You will be asked for additional plugin information which will be used in the plugin metadata.
34 |
35 | - **Enter plugin title:** The plugin title, for example `My Plugin`
36 | - **Enter plugin description:** The plugin description
37 | - **Enter author name:** The author Name
38 | - **Enter author email:** The author email
39 | - **Enter author url:** The author URL, for example `https://example.com`
40 | - **Enter update server url:** The URL to the update server file, for example `https://example.com/updates`
41 |
42 | This will create a new `myplugin` directory with required plugin files.
43 |
44 | ```
45 | .
46 | ├── build # Plugin blueprint files
47 | │ ├── joomla
48 | │ ├── myplugin.php # Joomla plugin
49 | | ├── myplugin.xml # Joomla plugin metadata
50 | │ ├── wordpress
51 | │ ├── myplugin.php # WordPress plugin
52 | | └── Taskfile.yml # build tasks
53 | ├── .env # Metadata
54 | ├── vendor # Development dependencies
55 | ├── README.md
56 | └── Taskfile.yml # Main Taskfile
57 | ```
58 |
59 | ## Set up the plugin
60 |
61 | To make your new plugin available in WordPress or Joomla, run the corresponding setup task in the plugin root folder. This will copy the necessary plugin files from the `build` folder to the plugin root folder.
62 |
63 | ```bash
64 | task setup-wordpress
65 | task setup-joomla
66 | ```
67 |
68 | Now the plugin can be discovered and installed in WordPress or Joomla.
69 |
70 | ## Create a new module
71 |
72 | To create a new YOOtheme Pro module, which is a package of code that extends the functionality of YOOtheme Pro, run the following command and replace `MODULE_NAME` with the name of your module, for example `my-module`.
73 |
74 | ```bash
75 | composer create:module MODULE_NAME
76 | ```
77 |
78 | You will be asked further questions to configure the module.
79 |
80 | - **Enter module namespace:** Enter a PHP namespace, for example `MyPlugin\MyModule`
81 | - **Add asset files example? [y/N]** Press Enter for _No_.
82 | - **Add settings example? [y/N]** Press Enter for _No_.
83 | - **Add custom LESS example? [y/N]** Press Enter for _No_.
84 | - **Add custom source example? [y/N]** Press Enter for _No_.
85 | - **Add translation files example? [y/N]** Press Enter for _No_.
86 |
87 | Read the [Modules documentation](https://yootheme.com/support/yootheme-pro/joomla/developers-modules) to learn more about the created files and code examples.
88 |
89 | **Note:** Add `wordpress` or `joomla` to the name for system-specific modules, for example `my-module-wordpress` or `my-module-joomla`. The build tasks will only copy the relevant modules into the WordPress and Joomla zip archives.
90 |
91 | ## Create a new element
92 |
93 | To create a new element, run the following command and replace `ELEMENT_NAME` with the name of your element, for example `my-element`. If there are multiple modules, choose a module from the provided list.
94 |
95 | ```bash
96 | composer create:element ELEMENT_NAME
97 | ```
98 |
99 | Optionally, define the module where the element should be created.
100 |
101 | ```bash
102 | composer create:element ELEMENT_NAME MODULE_NAME
103 | ```
104 |
105 | You will be asked further questions to configure the element.
106 |
107 | - **Enter element title:** The element title, for example `My Element`
108 | - **Enter element group:** Press Enter for `Custom`.
109 | - **Create multiple items element? [y/N]** Press Enter for _No_.
110 | - **Include Element transform example? [y/N]** Press Enter for _No_.
111 |
112 | Read the [Elements documentation](https://yootheme.com/support/yootheme-pro/joomla/developers-elements) to learn more about the created files and code examples.
113 |
114 | ## Build distribution files
115 |
116 | To create an installable zip archive of the plugin for WordPress and Joomla, run the following `build` task. The created zip files are located in the `dist` folder.
117 |
118 | ```bash
119 | task build
120 | ```
121 |
122 | Alternatively, create the archives individually.
123 |
124 | ```bash
125 | task build-wordpress
126 | task build-joomla
127 | ```
128 |
129 | ## Publishing and versioning
130 |
131 | To raise the version number of your plugin or change metadata, like the plugin title or description, edit the `.env` file in the root folder.
132 |
133 | ```yaml
134 | TITLE='My Plugin'
135 | NAME='myplugin'
136 | VERSION='0.0.1'
137 | DESCRIPTION='Lorem ipsum'
138 | DATE='{{ now | date "2006-01-02" }}'
139 | COPYRIGHT='Copyright (C)'
140 | LICENSE='GNU General Public License'
141 | AUTHOR='My Company'
142 | AUTHOREMAIL='me@example.com'
143 | AUTHORURL='https://example.com'
144 | ```
145 |
146 | After changing the metadata, re-run the corresponding Joomla or WordPress [setup task](#user-content-set-up-the-plugin) to update the plugin files and run the [build task](#user-content-build-distribution-files) to create new distribution files.
147 |
148 | ## Update Server
149 |
150 | To enable 1-click updates in WordPress and Joomla, run the [build task](#user-content-build-distribution-files) to generate the necessary update server files for WordPress `dist/update.json` and Joomla `dist/update.xml`. These files are configured based on the package information in the `.env` file.
151 |
152 | ```yaml
153 | # Update server
154 | UPDATEURI='https://example.com/updates'
155 |
156 | # Package information
157 | STABILITY='stable'
158 | DOWNLOADURL='https://example.com/downloads'
159 | PHPMINIMUM='7.4'
160 | JOOMLAMINIMUM='(5\.[01]|4\.[01234]|3\.10)\.'
161 | WORDPRESSMINIMUM='6.2'
162 | ```
163 |
164 | Upload these files to the `UPDATEURI` URL. This URL is where your plugin checks for updates and retrieves the associated download file. Ensure the zip archives from the `dist` folder are uploaded to the location specified in `DOWNLOADURL`.
165 |
166 | ## Updating commands and tasks
167 |
168 | The command and task scripts have their own [starter-utils](https://github.com/yootheme/starter-utils) Github repository. To update the package to the latest version, run `composer update` from time to time.
169 |
170 | ## Github
171 |
172 | To make your plugin a Git repository use `git init -b main` and follow the steps under [Adding a local repository to GitHub using Git](https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#adding-a-local-repository-to-github-using-git).
173 |
174 | ## License
175 |
176 | [MIT](https://opensource.org/licenses/MIT)
177 |
--------------------------------------------------------------------------------
/modules/yoocccaddtocalendar/elements/yoocccaddtocalendar/element.json:
--------------------------------------------------------------------------------
1 | {
2 | "@import": ".\/element.php",
3 | "name": "yoocccaddtocalendar",
4 | "title": "Add to calendar",
5 | "group": "COOLCAT creations",
6 | "icon": "${url:images\/icon.svg}",
7 | "iconSmall": "${url:images\/iconSmall.svg}",
8 | "element": true,
9 | "container": true,
10 | "width": 500,
11 | "defaults": {
12 | "show_title": true,
13 | "show_content": true,
14 | "show_image": true,
15 | "show_link": true,
16 | "grid_columns": "3",
17 | "title_element": "h3",
18 | "link_text": "Read more"
19 | },
20 | "templates": {
21 | "render": ".\/templates\/template.php",
22 | "content": ".\/templates\/content.php"
23 | },
24 | "placeholder": {
25 | "children": [
26 | {
27 | "type": "example_item",
28 | "props": []
29 | },
30 | {
31 | "type": "example_item",
32 | "props": []
33 | },
34 | {
35 | "type": "example_item",
36 | "props": []
37 | }
38 | ]
39 | },
40 | "fields": {
41 | "content": {
42 | "label": "Items",
43 | "type": "content-items",
44 | "item": "yoocccaddtocalendar_item",
45 | "media": {
46 | "type": "image",
47 | "item": {
48 | "title": "title",
49 | "image": "src"
50 | }
51 | }
52 | },
53 | "show_title": {
54 | "label": "Display",
55 | "type": "checkbox",
56 | "text": "Show the title"
57 | },
58 | "options-apple": {
59 | "label": "Calendar Options",
60 | "type": "checkbox",
61 | "text": "Apple"
62 | },
63 | "options-google": {
64 | "type": "checkbox",
65 | "text": "Google"
66 | },
67 | "options-ical": {
68 | "type": "checkbox",
69 | "text": "iCal"
70 | },
71 | "options-microsoft365": {
72 | "type": "checkbox",
73 | "text": "Microsoft 365"
74 | },
75 | "options-microsoftteams": {
76 | "type": "checkbox",
77 | "text": "Microsoft Teams"
78 | },
79 | "options-outlookcom": {
80 | "type": "checkbox",
81 | "text": "Outlook.com"
82 | },
83 | "options-yahoo": {
84 | "type": "checkbox",
85 | "text": "Yahoo"
86 | },
87 | "grid_columns": {
88 | "label": "Columns",
89 | "description": "Set the number of grid columns.",
90 | "type": "select",
91 | "options": {
92 | "1 Column": "1",
93 | "2 Columns": "2",
94 | "3 Columns": "3",
95 | "4 Columns": "4",
96 | "5 Columns": "5",
97 | "6 Columns": "6"
98 | }
99 | },
100 | "title_element": {
101 | "label": "HTML Element",
102 | "description": "Choose one of the HTML elements to fit your semantic structure.",
103 | "type": "select",
104 | "options": {
105 | "h1": "h1",
106 | "h2": "h2",
107 | "h3": "h3",
108 | "h4": "h4",
109 | "h5": "h5",
110 | "h6": "h6",
111 | "div": "div"
112 | },
113 | "enable": "show_title"
114 | },
115 | "image_width": {
116 | "attrs": {
117 | "placeholder": "auto"
118 | },
119 | "enable": "show_image"
120 | },
121 | "image_height": {
122 | "attrs": {
123 | "placeholder": "auto"
124 | },
125 | "enable": "show_image"
126 | },
127 | "image_loading": {
128 | "label": "Loading",
129 | "description": "By default, images are loaded lazy. Enable eager loading for images in the initial viewport.",
130 | "type": "checkbox",
131 | "text": "Load image eagerly",
132 | "enable": "show_image"
133 | },
134 | "link_text": {
135 | "label": "Text",
136 | "description": "Enter the text for the link.",
137 | "enable": "show_link"
138 | },
139 | "position": "${builder.position}",
140 | "position_left": "${builder.position_left}",
141 | "position_right": "${builder.position_right}",
142 | "position_top": "${builder.position_top}",
143 | "position_bottom": "${builder.position_bottom}",
144 | "position_z_index": "${builder.position_z_index}",
145 | "margin": "${builder.margin}",
146 | "margin_remove_top": "${builder.margin_remove_top}",
147 | "margin_remove_bottom": "${builder.margin_remove_bottom}",
148 | "maxwidth": "${builder.maxwidth}",
149 | "maxwidth_breakpoint": "${builder.maxwidth_breakpoint}",
150 | "block_align": "${builder.block_align}",
151 | "block_align_breakpoint": "${builder.block_align_breakpoint}",
152 | "block_align_fallback": "${builder.block_align_fallback}",
153 | "text_align": "${builder.text_align_justify}",
154 | "text_align_breakpoint": "${builder.text_align_breakpoint}",
155 | "text_align_fallback": "${builder.text_align_justify_fallback}",
156 | "item_animation": "${builder.animation}",
157 | "_parallax_button": "${builder._parallax_button}",
158 | "visibility": "${builder.visibility}",
159 | "name": "${builder.name}",
160 | "status": "${builder.status}",
161 | "id": "${builder.id}",
162 | "class": "${builder.cls}",
163 | "attributes": "${builder.attrs}",
164 | "css": {
165 | "label": "CSS",
166 | "description": "Enter your own custom CSS. The following selectors will be prefixed automatically for this element: .el-element<\/code>, .el-item<\/code>, .el-title<\/code>, .el-content<\/code>, .el-image<\/code>, .el-link<\/code>",
167 | "type": "editor",
168 | "editor": "code",
169 | "mode": "css",
170 | "attrs": {
171 | "debounce": 500
172 | }
173 | }
174 | },
175 | "fieldset": {
176 | "default": {
177 | "type": "tabs",
178 | "fields": [
179 | {
180 | "title": "Content",
181 | "fields": [
182 | "content",
183 | "options-apple",
184 | "options-google",
185 | "options-ical",
186 | "options-microsoft365",
187 | "options-microsoftteams",
188 | "options-outlookcom",
189 | "options-yahoo",
190 | "show_link"
191 | ]
192 | },
193 | {
194 | "title": "Settings",
195 | "fields": [
196 | {
197 | "label": "Grid",
198 | "type": "group",
199 | "divider": true,
200 | "fields": [
201 | "grid_columns"
202 | ]
203 | },
204 | {
205 | "label": "Title",
206 | "type": "group",
207 | "divider": true,
208 | "fields": [
209 | "title_element"
210 | ]
211 | },
212 | {
213 | "label": "Image",
214 | "type": "group",
215 | "divider": true,
216 | "fields": [
217 | {
218 | "label": "Width\/Height",
219 | "description": "Setting just one value preserves the original proportions. The image will be resized and cropped automatically, and where possible, high resolution images will be auto-generated.",
220 | "type": "grid",
221 | "width": "1-2",
222 | "fields": [
223 | "image_width",
224 | "image_height"
225 | ]
226 | },
227 | "image_loading"
228 | ]
229 | },
230 | {
231 | "label": "Link",
232 | "type": "group",
233 | "divider": true,
234 | "fields": [
235 | "link_text"
236 | ]
237 | },
238 | {
239 | "label": "General",
240 | "type": "group",
241 | "fields": [
242 | "position",
243 | "position_left",
244 | "position_right",
245 | "position_top",
246 | "position_bottom",
247 | "position_z_index",
248 | "margin",
249 | "margin_remove_top",
250 | "margin_remove_bottom",
251 | "maxwidth",
252 | "maxwidth_breakpoint",
253 | "block_align",
254 | "block_align_breakpoint",
255 | "block_align_fallback",
256 | "text_align",
257 | "text_align_breakpoint",
258 | "text_align_fallback",
259 | "item_animation",
260 | "_parallax_button",
261 | "visibility"
262 | ]
263 | }
264 | ]
265 | },
266 | "${builder.advanced}"
267 | ]
268 | }
269 | }
270 | }
271 |
--------------------------------------------------------------------------------