Building a Theme Project
The first question that needs to be answered when using WireBootstrap with a new Bootstrap themes is how best to integrate the two. While every theme is different in some way including how assets are organized or what is included in each, there are some best practices and things to consider that have worked well in the past. These are shared here on this page.

Examples

Existing WireBootstrap theme projects are a great reference for how to go about integrating with a new theme. The WireBootstrap for Gentelella project can be download for free. This project is a TypeScript project but a theme project can also be written in plain JavaScript and include integrations with other frameworks.

Scaffolding

Start development by creating an empty page that will be used as a template for all pages in the theme project. This is usually a page with references to web frameworks such as Bootstrap and the core WireBootstrap library with an empty bodytag.
Below is an excerpt from the WireBootstrap for Gentelella empty-page.html template page.
1
<html>
2
3
<head>
4
<!-- Bootstrap -->
5
<link href="../../gentelella/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
6
7
<!-- Font Awesome -->
8
<link href="../../gentelella/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
9
10
<!-- Gentelella Theme -->
11
<link href="../../gentelella/build/css/custom.min.css" rel="stylesheet">
12
13
<!-- WireBootstrap -->
14
<link href="../../lib/wire/wire.css" rel="stylesheet">
15
</head>
16
17
<body>
18
19
!-- ********************************************************************************** -->
20
YOUR CONTENT HERE
21
!-- ********************************************************************************** -->
22
23
<!-- jQuery/Bootstrap -->
24
<script src="../../gentelella/vendors/jquery/dist/jquery.min.js" type="text/javascript"></script>
25
<script src="../../gentelella/vendors/bootstrap/dist/js/bootstrap.bundle.min.js" type="text/javascript"></script>
26
27
<!-- WireBootstrap -->
28
<script src="../../lib/gentelella/custom-wire.js" type="text/javascript"></script>
29
<script src="../../lib/wire/wire.js"></script>
30
31
</body>
32
33
</html>
Copied!

Cards/Panels

Cards or panels are a staple UI component that provide the boxed borders for most content inside of an application developed using a theme. Its a good idea to also create an empty card template for this purpose.
Below is an excerpt from the WireBootstrap for Gentelella empty-panel.html card template.
1
<!-- Begin Panel -->
2
<div class="x_panel">
3
4
<!-- Title -->
5
<div class="x_title">
6
7
<!-- Title Text -->
8
<h2>Title Text <small>title description</small></h2>
9
10
<div class="clearfix"></div>
11
</div>
12
<!-- End Title -->
13
14
<!-- Begin Content -->
15
<div class="x_content">
16
17
<!-- ********************************************************************************** -->
18
YOUR CONTENT HERE
19
<!-- ********************************************************************************** -->
20
21
</div>
22
<!-- End Content -->
23
24
</div>
25
<!-- End Panel -->
Copied!

Project

Concerns related to the theme project center mainly on the project assets relative to the theme assets. This includes both application code and references to theme files such as CSS and JavaScript libraries.

Theme Assets

Deploying assets is a little easier if the theme is open source and the theme files can be distributed with the WireBootstrap theme project. If not, the project will have to be unzipped into an existing directory containing the theme. WireBootstrap for Gentelella contains the theme assets in the download while a theme such as WireBootstrap for Color Admin needs to be unzipped into a directory containing the purchased/licensed theme.

Code

The application code for theme projects are usually written in TypeScript or plain JavaScript. There may also be server-side components written in PHP, C# or other languages needed but these would most likely be specialty features that exist outside of the theme.
Application code as JavaScript inside HTML pages is simple. Quick examples of features are great for this. However, if the goal of the project is to create a starting point for a production application, it should probably be setup up with a more modern layout with concern separation and class-based module code.
A theme project should also provide a way to serve pages. Consider the light-weigh http-server npm package for this.

Web Frameworks

Themes often offer versions for different frameworks including Angular, React, and Vue. Before creating a dedicated theme project for a specific web framework, visit the WireBootstrap Integrations page to see if there is already a technology integration available for the web framework.

Components

Most Bootstrap theme components are created by third-parties. Components such as DataTables and Select2 are included with most themes and are already available as WireBootstrap components.
However, some of the HTML components in a theme are specific to the theme. It's easy to create re-usable data-aware components from HTML and CSS in the theme in WireBootstrap. Read Building a Component for details.

Questions

If you still have questions or need help with theme integration, email us at [email protected]. We are happy to help.