PluginProbe
Elementor Website Builder – more than just a page builder / 3.9.0
Elementor Website Builder – more than just a page builder v3.9.0
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
elementor / app / modules / site-editor / assets / js / module.js

module.js in Elementor Website Builder – more than just a page builder 3.9.0, at app/modules/site-editor/assets/js/module.js

167 lines 7.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import router from '@elementor/router';
2 import SiteEditorPromotion from './pages/promotion';
3 import NotFound from './pages/not-found';
4
5 export default class SiteEditor {
6 constructor() {
7 this.saveTemplateTypesToCache();
8
9 router.addRoute( {
10 path: '/site-editor/promotion',
11 component: SiteEditorPromotion,
12 } );
13
14 router.addRoute( {
15 path: '/site-editor/*',
16 component: NotFound,
17 } );
18 }
19
20 saveTemplateTypesToCache() {
21 const types = this.getTypes();
22 elementorCommon.ajax.addRequestCache( {
23 unique_id: 'app_site_editor_template_types',
24 }, types );
25 }
26
27 getTypes() {
28 return [
29 {
30 type: 'header',
31 icon: 'eicon-header',
32 title: __( 'Header', 'elementor' ),
33 urls: {
34 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/header.svg',
35 },
36 tooltip_data: {
37 title: __( 'What is a Header Template?', 'elementor' ),
38 content: __( 'The header template allows you to easily design and edit custom WordPress headers so you are no longer constrained by your theme’s header design limitations.', 'elementor' ),
39 tip: __( 'You can create multiple headers, and assign each to different areas of your site.', 'elementor' ),
40 docs: 'https://go.elementor.com/app-theme-builder-header/',
41 video_url: 'https://www.youtube.com/embed/HHy5RK6W-6I',
42 },
43 },
44 {
45 type: 'footer',
46 icon: 'eicon-footer',
47 title: __( 'Footer', 'elementor' ),
48 urls: {
49 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/footer.svg',
50 },
51 tooltip_data: {
52 title: __( 'What is a Footer Template?', 'elementor' ),
53 content: __( 'The footer template allows you to easily design and edit custom WordPress footers without the limits of your theme’s footer design constraints', 'elementor' ),
54 tip: __( 'You can create multiple footers, and assign each to different areas of your site.', 'elementor' ),
55 docs: 'https://go.elementor.com/app-theme-builder-footer/',
56 video_url: 'https://www.youtube.com/embed/xa8DoR4tQrY',
57 },
58 },
59 {
60 type: 'single-page',
61 icon: 'eicon-single-page',
62 title: __( 'Single Page', 'elementor' ),
63 urls: {
64 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/single-page.svg',
65 },
66 tooltip_data: {
67 title: __( 'What is a Single Page Template?', 'elementor' ),
68 content: __( 'A single page template allows you to easily create the layout and style of pages, ensuring design consistency across all the pages of your site.', 'elementor' ),
69 tip: __( 'You can create multiple single page templates, and assign each to different areas of your site.', 'elementor' ),
70 docs: 'https://go.elementor.com/app-theme-builder-page/',
71 video_url: 'https://www.youtube.com/embed/_y5eZ60lVoY',
72 },
73 },
74 {
75 type: 'single-post',
76 icon: 'eicon-single-post',
77 title: __( 'Single Post', 'elementor' ),
78 urls: {
79 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/single-post.svg',
80 },
81 tooltip_data: {
82 title: __( 'What is a Single Post Template?', 'elementor' ),
83 content: __( 'A single post template allows you to easily design the layout and style of posts, ensuring a design consistency throughout all your blog posts, for example.', 'elementor' ),
84 tip: __( 'You can create multiple single post templates, and assign each to a different category.', 'elementor' ),
85 docs: 'https://go.elementor.com/app-theme-builder-post/',
86 video_url: 'https://www.youtube.com/embed/8Fk-Edu7DL0',
87 },
88 },
89 {
90 type: 'archive',
91 icon: 'eicon-archive',
92 title: __( 'Archive', 'elementor' ),
93 urls: {
94 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/archive.svg',
95 },
96 tooltip_data: {
97 title: __( 'What is an Archive Template?', 'elementor' ),
98 content: __( 'An archive template allows you to easily design the layout and style of archive pages - those pages that show a list of posts (e.g. a blog’s list of recent posts), which may be filtered by terms such as authors, categories, tags, search results, etc.', 'elementor' ),
99 tip: __( 'If you’d like a different style for a specific category, it’s easy to create a separate archive template whose condition is to only display when users are viewing that category’s list of posts.', 'elementor' ),
100 docs: 'https://go.elementor.com/app-theme-builder-archive/',
101 video_url: 'https://www.youtube.com/embed/wxElpEh9bfA',
102 },
103 },
104 {
105 type: 'search-results',
106 icon: 'eicon-search-results',
107 title: __( 'search results page', 'elementor' ),
108 urls: {
109 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/search-results.svg',
110 },
111 tooltip_data: {
112 title: __( 'What is a Search Results Template?', 'elementor' ),
113 content: __( 'You can easily control the layout and design of the Search Results page with the Search Results template, which is simply a special archive template just for displaying search results.', 'elementor' ),
114 tip: __( 'You can customize the message if there are no results for the search term.', 'elementor' ),
115 docs: 'https://go.elementor.com/app-theme-builder-search-results/',
116 video_url: 'https://www.youtube.com/embed/KKkIU_L5sDo',
117 },
118 },
119 {
120 type: 'product',
121 icon: 'eicon-single-product',
122 title: __( 'Product', 'elementor' ),
123 urls: {
124 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/product.svg',
125 },
126 tooltip_data: {
127 title: __( 'What is a Single Product Template?', 'elementor' ),
128 content: __( 'A single product template allows you to easily design the layout and style of WooCommerce single product pages, and apply that template to various conditions that you assign.', 'elementor' ),
129 tip: __( 'You can create multiple single product templates, and assign each to different types of products, enabling a custom design for each group of similar products.', 'elementor' ),
130 docs: 'https://go.elementor.com/app-theme-builder-product/',
131 video_url: 'https://www.youtube.com/embed/PjhoB1RWkBM',
132 },
133 },
134 {
135 type: 'products',
136 icon: 'eicon-products',
137 title: __( 'Products Archive', 'elementor' ),
138 urls: {
139 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/products.svg',
140 },
141 tooltip_data: {
142 title: __( 'What is a Products Archive Template?', 'elementor' ),
143 content: __( 'A products archive template allows you to easily design the layout and style of your WooCommerce shop page or other product archive pages - those pages that show a list of products, which may be filtered by terms such as categories, tags, etc.', 'elementor' ),
144 tip: __( 'You can create multiple archive product templates, and assign each to different categories of products. This gives you the freedom to customize the appearance for each type of product being shown.', 'elementor' ),
145 docs: 'https://go.elementor.com/app-theme-builder-products-archive/',
146 video_url: 'https://www.youtube.com/embed/cQLeirgkguA',
147 },
148 },
149 {
150 type: 'error-404',
151 icon: 'eicon-error-404',
152 title: __( '404 page', 'elementor' ),
153 urls: {
154 thumbnail: elementorAppConfig.assets_url + '/images/app/site-editor/error-404.svg',
155 },
156 tooltip_data: {
157 title: __( 'What is a 404 Page Template?', 'elementor' ),
158 content: __( 'A 404 page template allows you to easily design the layout and style of the page that is displayed when a visitor arrives at a page that does not exist.', 'elementor' ),
159 tip: __( 'Keep your site\'s visitors happy when they get lost by displaying your recent posts, a search bar, or any information that might help the user find what they were looking for.', 'elementor' ),
160 docs: 'https://go.elementor.com/app-theme-builder-404/',
161 video_url: 'https://www.youtube.com/embed/ACCNp9tBMQg',
162 },
163 },
164 ];
165 }
166 }
167