Mobile Website Template and PWA
Back to Structure DocsThis area is scrollable and includes multiple chapters, scroll to see all chapters.
Each component explained in detail.
If you read the Structure documentation up until this point you will know that you can easily integrate components just by
copy pasting them inside your page-content.
All components, unless specifically mentioned must be placed inside the page-content. Whenever a component requires a part of it
to be placed outside the page-content, we will add a warning so you will know this requires a bit of attention. Not placing them in the correct place
can lead to components not working properly.
To use components as easy as possible, each component is written in a separate page, and added in it's own card.
We strongly
recommend you take copy and paste each component from the .html file you want into your pages, and read this documentation for your desired component to understand how to
customize it even more.
We will explain each component and how to use it, but you will see them even better while using the samples provided.
There are some components we didn't add here, for example, the typography page. These are elements that are simply copy and paste and really don't need any extra explanations. However, if you do not understand something, regardless how small it is, please don't hesitate to contact us. We are always here to assist!
Unless you are using a special card design from the one in the pack, most elements are inserted into cards.
These cards are made to create the nice, rounded and shadow effect, and also to create the margins around the elements inside the card.
1 2 3 4 5 6 | < div class = "card card-style" > < div class = "content UTILITY_SPACING" > < h1 >Hello.</ h1 > < p >I am a card.</ p > < div > </ div > |
Built using the Bootstrap Collapse System - Read more on Bootstrap Collapse Documentation
We will explain each accordion we have in our component-accordions.html page in part, but please check the page as well and use the component by copy pasting it from there and using this documentation as a guideline.
01
02
03
04
05
06
07
08
09
10
11
12
|
< div class = "accordion" id = "accordion-1" > < div > < button class = "btn accordion-btn no-effect" data-bs-toggle = "collapse" data-bs-target = "#collapse1" > < i class = "fa fa-heart color-red2-dark mr-2" ></ i > Accordion Title 1 < i class = "fa fa-plus font-10 accordion-icon" ></ i > </ button > < div id = "collapse1" class = "collapse" data-parent = "#accordion-1" > <!-- add your content here --> </ div > </ div > </ div > |
01
02
03
04
05
06
07
08
09
10
11
12
|
< div class = "accordion" id = "accordion-1" > < div class = "card card-style shadow-0 bg-highlight" > < button class = "btn accordion-btn" data-bs-toggle = "collapse" data-bs-target = "#collapse1" > < i class = "fa fa-heart color-red2-dark mr-2" ></ i > Accordion Title 1 < i class = "fa fa-plus font-10 accordion-icon" ></ i > </ button > < div id = "collapse1" class = "collapse bg-theme" data-parent = "#accordion-1" > <!-- add your content here --> </ div > </ div > </ div > |
This card works on the same principle as the classic card, but, the button is now a Background Card, as explained in the cards chapter to follow.
Custom built for beautiful effects and interactivity.
The Action Sheet box must be placed outside the page-content
The action sheets function on the Menu principle described in the Menu Structure in the Structure Documentation ( click )
These are in essence simple bottom, top or modal placed menus that get triggered by any button on the screen.
You can place any content you want inside action sheets, give them effects, and place them at the top, bottom or make them modal. Please check the Menu Structure to
understand how to use these. After you understand how to trigger them, just copy and paste or build any component inside them, treating them as a individual entity.
The default Bootstrap Buttons will work perfectly, this is just an enhanced style of the Bootstrap System
The buttons seen in Bootstrap's Documentation are great, but we wanted to give them a more mobile personallity and extend their design to make them look even better. With this being said, you can use any button from Bootstrap, or use the ones found in component-buttons.html
1 | < a href = "#" class = "btn UTILITY_CLASSES_HERE" >Button</ a > |
Our button class is identical to that of Bootstrap, but, with a few utility classes added, we can extend the beauty of these buttons to limitless power. Add any of the following utility / secondary classes to the buttons you want. You can use multiple utility classes combined.
Control Sizes1 | < a href = "#" class = "btn btn-m rounded-sm shadow-xl bg-highlight color-white font-900 text-uppercase" >Button</ a > |
1 | < a href = "#" class = "btn btn-3d btn-m bg-red-dark border-red-light" >Button</ a > |
Icons are pretty much based in the same concept as buttons, the only difference is that icons don't support centering by using an icon class. You can center icons by adding them inside a paragraph
and giving that paragraph the class "text-center".
Beside this, the icons are built in the same way. Let's take an example:
1 | < a href = "#" class = "icon icon-xs rounded-xl bg-facebook" >< i class = "fab fa-facebook" ></ i ></ a > |
Add the class icon, followed by a sizing class, then the background you want. Inside the icon, just place a font-awesome icon
Control SizesThe most flexible Cards in the World.
Our card/caption system has been called by our customers as simply the best solution for creating incredibly powerful cards, while at the same time giving you incredible flexibility.
The classic Bootstrap code for cards still applies if you wish to use their designs.
What we did, is take their code, and slightly enhance it to make it even better than it already is, by
adding options for custom backgrounds, images, lazy loading, rounded borders, shadows, and much, much more.
Using cards, you can create any style of caption you want, in less than 5 minutes. These are incredibly powerful, and we'll explain each part.
There are 2 types of cards. The classic "Expanding Card", that expands depending on the content inside, and the "Height Control" card where you can use extra flexibility in their content.
The expanding card, is the main card style we use for our entire card system. This can support simple styles. Let's explain.
1 2 3 4 5 6 | < div class = "card card-style UTILITY_STYLING" > < div class = "content UTILITY_SPACING" > < h1 >Hello.</ h1 > < p >I am a card.</ p > < div > </ div > |
These are the cards which we used to create the awesome sliders, events pages and more. These have a few extra parameters, but offer incredible flexibility in creating immersive and beautiful elements.
1 2 3 4 | < div class = "card UTILITY_STYLING" style = "height:100px" > <!--- Card types go here--> < div class = "card-overlay bg-VALUE opacity-VALUE" > </ div > |
This is the basic structure of a card with height control. Let's explain how it works.
Line 1 also has the option of style="height:100px". This value can be expressed in pixels, for example, style="height:300px" or if you want the card to be the full size of the screen, use style="height:100vh"
Line 2 is where the card types will be added, will be explained below.
Line 3 is the overlay of your card, meaning the background color that will be over the image, but under the text.
In the "Expanding Card", this color was added in the first line, but here, the first line is the background image, and we use the color to place over the image. Replace bg-VALUE with the color you want from
Available Color List and the opacity-VALUE with an opacity you want from the
Available Opacity List to make the background image more or less visible.
Line 4 closes the card itself.
01 02 03 04 05 06 07 08 09 10 11 | < div class = "card-center" > I will appear in the center of the Caption </ div > < div class = "card-top mt-3 ms-3" > I will appear in the top part, pushed from the left and top by 15 pixels </ div > < div class = "card-bottom mb-3 ms-3" > I will appear in the bottom part, pushed from the left and bottom by 15 pixels </ div > |
The card types are added inside the Height Control Cards, in line 2. When using cards with a fixed height, you can use these cards to place content
inside that card, whever you want. You can use as many elements you want, and move them around using the Spacing Utilities.
To see perfect examples of how these cards can be used, please check the component-cards-captions.html, where you will have live examples of multiple variations and also the
component-cards-infinite.html to see an example where the background image is used is an infinite repeating image.
To preload an image in a card, in the starting div of the card, you will have to add this structure
1 | < div class = "card preload-img" data-src = "image.png" data-card-height = "VALUE" > |
In this scenario, you can still use utility styles in your card, but you can no longer use the classes for bg-NUMBER for images. Everything else in the above code stays the same as described before.
Here is a list that allows you to better understand which card is best suited for your needs.
Basic Use ( simple page elements )
Full Screen Elements
Background Image/Infinite
Background Color (gradient/simple)
Content Position - top/center/bottom
Cover Sliders & Walkthroughs
If you want to have full control over your background image, color, opacity, and the position of your text inside the card, then the fixed height card will work perfectly for you.
If you want to use simple text, or elements added inside a card, without caring about their placement, and just want them to flow with the page, then the Expanding classic card is perfect for you.
Slide anything. -> More about our carousel on https://splidejs.com/
For the carousel we're using a pure Vanilla JavaScript slider called Splide. This is one of the most powerful, flexible and most performant sliders out there that has no dependancy requirements. Please do not update the splide script without first getting in touch with us. We've made it in such fashion that the slider is more powerful and less memory hungy, therefore increasing performance even on lower end devices.
Developer Notes: For the full API of the slider, please visit this page -> https://splidejs.com/category/users-guide/
Please open your components-carousles.html or component-sliders.html (names can varry) and check the provided examples. We always shwocase all possible options in that page. However, let's explain the basic structure of a carousel, so we can detail a few elements.
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 | < div class = "splide SLIDER-TYPE ARROW-OPTIONS DOTS-OPTIONS" id = "UNIQUE-SLIDER-ID-1" > < div class = "splide__track" > < div class = "splide__list" > < div class = "splide__slide" > <!-- Place the content or cards or images you want here this is a slide --> </ div > < div class = "splide__slide" > <!-- Place the content or cards or images you want here this is a slide --> </ div > < div class = "splide__slide" > <!-- Place the content or cards or images you want here this is a slide --> </ div > </ div > </ div > </ div > |
Powered by ApexCharts - the best chart plugin system.
ApexCharts offers the absolute best chart system in the world. You can see the JavaScript required to generate these in the custom.js file by searching (CTRL+F Windows or CMD +F Mac) for charts.
The codes there can be adapted for your use, and a full documentation on how to create your own charts and create simply insanely powereful solutions can be found on
ApexCharts - https://apexcharts.com/ - Official Documentation
Built using the Bootstrap Collapse System - Read more on Bootstrap Collapse Documentation
Collapsible elements are designed to house lists of links. These are super useful when you have a lot of listed information available for a single subject. In our example, inside component-collapse.html, we simply created a list group, and added the logic of Bootstrap 5 collapse. You can do the same by following the next logic
1 2 | <a data-bs-toggle= "collapse" href= "#collapse-1" ><!-- Collapse Trigger is Here --></a> <div class = "collapse" id= "collapse-1" ><!-- I will appear when you tap the trigger--></div> |
Any element can be made collapsible, as long as you have the data-bs-toggle="collapse" on the trigger, and the class collapse on what will be shown when pressing the trigger
and make sure your href="UNIQUE_NAME" on the trigger is identical to the id="UNIQUE_NAME" on the element that will be shown when pressing the trigger.
For more advanced uses, please check the Bootstrap Collapse Documentation
Built using the Bootstrap Columns System - Read more on Bootstrap Columns Documentation
Our entire column system is based entirely on the Bootstrap system. Remember, our products are Mobile Templates, so we highly recommend that you don't
exceed 4 columns, since Mobile screens start from about 340px, and having more than 4 columns can lead to text being broken.
This system is also applied for Gallery thumbnails, profile galleries. You can view demos of the columns inside the component-columns.html
Read more on Bootstrap Columns Documentation
Upload and decode images using Web API's .
The file upload API allows you to upload images and decript their value, when they were taken, modified, size and file name. This is only a front-end element that can be found inside
custom.js by searching (CTRL+F windows / CMD+F mac) for "upload-file" to find the JS behind it. You can use your own code logic to programatically adapt the JS for your needs.
By default, this component is found in component-file-upload.html, and you can use only the file-data div to use only the upload file input or use the upload-file-data
under this as well to get the list information about what the image contains once the user uploads it.
You can learn more about the File Web API here - https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications
Built using the Bootstrap Input System - Read more on Bootstrap Input Documentation.
Beside the classic inputs offered by Bootstrap, we created a few styles to complement the existing design found in our product. These are easy to use and you can simply copy paste them from the input-components.html. However, there are a few things to note.
1 2 3 4 5 6 7 8 | < div class = "form-custom form-label form-icon OPTION-1 OPTION-2 mb-3" > < i class = "bi bi-person-circle font-14" ></ i > < input type = "text" class = "form-control rounded-xs" id = "c1" placeholder = "John Doe" pattern = "[A-Za-z ]{1,32}" required /> < label for = "c1" class = "color-theme OPTION-3" >Your Name</ label > < div class = "valid-feedback" >Excellent! <!-- text for field valid--> </ div > < div class = "invalid-feedback" >Name is Missing or Invalid</ div > < span >(required)</ span > </ div > |
Simply open component-inputs.html and copy and paste them in the form you want. The same applies to the checkboxes and radio buttons included.
You can replace:
OPTION-1 add form-icon to use the first icon or, remove form-icon and the first icon inside the field
OPTION-2 add form-border if you only want to use the input with a single line under it, not boxed.
OPTION-3 add form-label-always-active if you want to always show the floating label. You can also use utility classes here.
We use regular expressions (RegEX) to validate the fields. With this being said, in case you require a more extensive plugin for validation, you can include any jQuery plugin you want by following the How do I add my own JavaScript code developer note. The validation is done using HTML5 Patterns and the Bootstrap 5 Validation (link to official documentation)
Preloading and styling your img
The image tag supports LazyLoad preloading to make it show after the other more important parts of the page are loaded. This is used to improve page speed and is recommended to be used wherever possible.
1 | < img class = "img-fluid preload-img" src = "images/empty.png" data-src = "location/image.png" alt = "image" > |
Built using the Bootstrap List Groups System - Read more on Bootstrap List Groups Documentation.
List groups from Bootstrap can be used as shown in the documentation example link above. However, to keep the design of our product more in theme with its style, you can use the examples below. These use the same class architecture as bootstrap, but offer more design features, and are also compatible with switches.
A link list is a list of items that include a single line of text or a secondary description line with an icon to the left and right side. These are super simple to use and support the utility classes for colors and also support badges and switches.
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<div class = "list-group list-custom-SIZE_VALUE" > <a href= "#" > <i class = "fa font-14 fa-cog color-brown1-dark" ></i> <span>Ultra Mobile</span> <strong>Only use this line for large</strong> <i class = "fa fa-angle-right" ></i> </a> <a href= "#" > <i class = "fa font-14 fa-bars rounded-xl shadow-xl bg-blue2-dark" ></i> <span>Azures Mobile</span> <strong>Only use this line for large</strong> <span class = "badge bg-red2-dark font-10" >$ 25 </span> <i class = "fa fa-angle-right" ></i> </a> <a href= "#" > <i class = "fa font-14 fa-check rounded-sm shadow-m bg-green1-dark" ></i> <span>Sticky Mobile</span> <strong>Only use this line for large</strong> <span class = "badge bg-green1-dark" >FRESH</span> <i class = "fa fa-angle-right" ></i> </a> <a data-trigger- switch = "switch-1" class = "border-0" href= "#" > <i class = "fa font-14 fa-star shadow-s bg-yellow1-dark" ></i> <span>Kolor Mobile</span> <strong>Only use this line for large</strong> <div class = "custom-control scale-switch ios-switch" > <input type= "checkbox" class = "ios-input" id= "switch-1" > <label class = "custom-control-label" for = "switch-1" ></label> </div> <i class = "fa fa-angle-right" ></i> </a> </div> |
The above code will generate a list group, let's dive in the code and explain it line by line.
Line 1 defines this as being a list group and also, defines its size. You can replace the SIZE_VALUE with small or large. If you select the
size as being large, then, you can use lines 5, 11,18,25. Otherwise, delete these lines. These are the second line of text in the case of large lists, like
we use in our demo in the component list.
Lines 2 to 7 generate a list, with a colored icon. - the icon is part of the font-awesome group, and uses the color-VALUE
found in the Utility Colors chapter. The last icon in this case is a simple arrow to the right side. This icon must be kept in all styles.
Lines 8 to 14 and 15 to 21 The same principle as the first group applies here, with the exception of the icon, which now has utility classes for rounded borders
and the badge. The badge is a smple span class with a background color and a font size. This can be used to showcase a price, the fact that it's new, hot or other useful tiny messages
Lines 22 to 31 Works on the same principle as the previous ones, with an exception that we have inserted a switch in it. You can learn
all about switches in the Switches chapter. The switch will be triggerable by the list as well by using the "data-trigger="unique-number" that will corespond to the switch input id.
Alerts using the Bootstrap Alerts System - Read more on Bootstrap Alerts Documentation.
Notification boxes using the Bootstrap Toast System - Read more on Bootstrap Toasts Documentation
Using the default alerts of Boostrap means you can use any of the examples shown in the component-notifications.html, which include a span for an icon that can have any font awesome icon included in the pack. Also, you can view more examples of alerts on https://getbootstrap.com/docs/5.0/components/alerts/
The notification that dropdown from the top must be placed outside the page-content
Each notification that comes from the top of the page is placed outside the page content of the component-notifications.html page. These are designed to mimic the design of their mobile counterparts. Let's explain the general code of each these.
This will just explain the general logic of the notification system. Please check after the page-content class is closed in component-notifications.html to view more examples. Each notification includes simple elements inside you can easily modify using the Utility Classes to suit your needs.
1 2 3 4 5 6 7 | <div id= "notification-1" data-bs-dismiss= "notification-1" data-bs-delay= "3000" data-bs-autohide= "true" class = "notification NOTIFICATION_TYPE bg-dark1-dark" > <!-- check the component-notifications.html page, after the page-content closes to see more--> </div> |
Line 1- defines the ID of the notification. This will be used in case you want to trigger the notification from a button on the page. You can
trigger it by adding data-toast="notification-1" .Be sure this is always a unique number. This is also used to dismiss the notification from a button, or in our case, if the user taps it.
Line 2- is the data-bs-dissmiss attribute which shares the same unique ID as line 1. This is used if you want to dismiss the notitifcation by tapping it.
Line 3- is the delay. this is how long the notification will be visible on screen before Line 4, if set to true, will hide it back.
Line 5- is the class used for the notification and the background color you wish to use.
Show a loader before your page loads.
The preloader is automatically added to each page using the AJAX transition system and hidden when the page load is completed.
1 | <div id= "preloader" ><div class = "spinner-border color-highlight" role= "status" ></div></div> |
Possible Cause 1 - If your page shows an infinite preloader loop, you should inspect the console in your browser. This means the JavaScript is not running
correctly and the functions that hide the preloader are not firing.
Possible Cause 2 - Preloaders can also not appear if you test in incompatible browsers that don't support CSS3. For example, internet explorer, but in this case
we recomemnd using the item for it's intented purpose, as browsers that don't support CSS3 will cause sever problems with any modern code.
Custom built for maximum flexibility
As Bootstrap doesn't offer an actual tab system, we built a very simple and efficient one, where we used code as simple to use as possible. Let's explain.
.01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 | < div class = "content" id = "tab-group-UNIQUE-1" > < div class = "tab-controls tabs-small tabs-rounded" data-highlight = "bg-highlight" > < a href = "#" data-active data-bs-toggle = "collapse" data-bs-target = "#tab-UNIQUE-NUMBER-1" >Tab 1</ a > < a href = "#" data-bs-toggle = "collapse" data-bs-target = "#tab-UNIQUE-NUMBER-2" >Tab 2</ a > < a href = "#" data-bs-toggle = "collapse" data-bs-target = "#tab-UNIQUE-NUMBER-3" >Tab 3</ a > </ div > < div class = "clearfix mb-3" ></ div > < div data-bs-parent = "#tab-group-UNIQUE-1" class = "collapse show" id = "tab-UNIQUE-NUMBER-1" > <!-- Tab Content 1--> </ div > < div data-bs-parent = "#tab-group-UNIQUE-1" class = "collapse" id = "tab-UNIQUE-NUMBER-2" > <!-- Tab Content 2 --> </ div > < div data-bs-parent = "#tab-group-UNIQUE-1" class = "collapse" id = "tab-UNIQUE-NUMBER-3" > <!-- Tab Content 3 --> </ div > </ div > |
Thank you for being a awesome customer
If you read the documentation thus far, you're probably a master of our components and can copy paste them to create the perfect interface for you. However, if you get stuck, please know, we are always here to help!
A few tips that we must give. In the component documentation, we have included referrences to the Bootstrap documentation whenever extra features are available. Don't be afraid to experiment with them and
read more about these features on Bootstrap's site. You can furhter enhance the already existing components we have. This will also be good if you are a devloper and know or want to know
JS behavior and how to increase the programatic power of our item.
Don't forget! Always write your Custom Javascript as mentioned in the Developer Notes Section to be sure you avoid issues with code and always place your code in the correct place. Our item will cause
you no stress if these small things are followed.
If there is anything you don't find here, or you require clarifications for any element we have here, please open a support ticket on our forums. We will gladly help you out.
Our support times are blazing fast and we are patient with any question you may have. No question is small and no question is stupid. If you feel you don't understand something, please let us know!
It's an immense pleasure for us to know our customers know and master our products and can place their imagination in our product to make it their own!
So, please, if there is anything we may help you with from our product features, or pages, let us know!
We're always available for you on https://www.enableds.com ( the support page )