Skip to content

Codeigniter with Bootstrap & jQuery. A blueprint for new Web-Applications.

License

Notifications You must be signed in to change notification settings

xcy7e/CodeIgniter4Bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔰 CodeIgniter4Bootstrap

Blueprint for new PHP Web-Applications bundled with popular frameworks!
Pre-configured to start coding your actual project right away.

💠 Codeigniter 4

Bootstrap jQuery Font-Awesome Chart.js Datatables jQuery-Easing jQuery-UI
Bundled with many Bootstrap templates!
Properly prepared with all files you need to start coding the concept you got in mind and save you time you might otherwise waste on that initial overhead bringing together the frameworks you love.

Bootstrap Templates

Bootstrap example templates:
Album Pricing Checkout Product Cover Carousel Blog Dashboard Sign-In Sticky-Footer Sticky-Footer-Nav Jumbotron

Free templates:
SB Admin 2 Resume

How to use

1. Choose template

BaseController

public $bootstrapTemplate = 'signin';  // set default bootstrap template

or in any controller

$this->bootstrapTemplate = 'dashboard';  // change template on-the-fly

2. Folder structure

PHP files:

Template chunks

app/Views/templates/_TEMPL_/head.php       // <html><head>
app/Views/templates/_TEMPL_/sidebar.php    // sidebar <nav> (optional)
app/Views/templates/_TEMPL_/nav.php        // header <nav> (optional)
app/Views/templates/_TEMPL_/main.php       // content <main> (optional)
app/Views/templates/_TEMPL_/footer.php     // <footer></html>

CSS- & JS files:

template scripts

public/assets/templates/_TEMPL_/css/style._TEMPL_.css   // template CSS-file
public/assets/templates/_TEMPL_/js/script._TEMPL_.js    // template JS-file

global scripts

public/assets/css/style.css   // global CSS-file
public/assets/js/script.js    // global JS-file

3. Individual Navigation

Some templates have their own navigation. You can override the default navigation or change it for a specific view on-the-fly.

BaseController

public $bootstrapNav = 'top_static';  // change default navigation

or in any controller

$this->bootstrapNav = 'top_static';  // change navigation on-the-fly

this includes the navigation section

app/Views/sections/navigation/nav_top_static.php   // add nav_NAVNAME.php to add your own individual navigation

You can easily add your own individual navigation following this rules.
If you add your own nav you can specify if it uses additional CSS or JS:

BaseController

public $bootstrapNavScripts["NAVNAME"] = ['css','js'];  // your nav uses css and js

.. then this scripts are added automatically in your template: <head>

public/assets/sections/navigation/css/nav_NAVNAME.css
public/assets/sections/navigation/js/nav_NAVNAME.js