SPLINT Packages Wiki Downloads {} Blog Log In Sign Up

SPLINT

Packages

Wiki

Downloads

{} Blog

Log In


Sign Up

francis94c/cdn-helper

v0.0.2 4 0 - 0.0 0 {} 0


×

Are you sure you want to delete this package?

Users will no longer be able to intall this package if you do so.

Description

Code Igniter helper for outputting popular JS and CSS library CDN links..

README

Licence MIT Splint Lates Release Commits

cdn-helper

This library makes available, functions that return HTML link/script tags for popular JS and CSS libraries like

Installation

To install, download and install Splint from https://splint.cynobit.com/downloads/splint and then run the below from your Code Igniter project root

splint install francis94c/cdn-helper

Loading

From anywhere you can access the CI instance

$this->load->splint("francis94c/cdn-helper", "%cdn");

Functions

w3css();
//  returns '<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" />'
jquery();
//  returns '<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>'
bootstrap();
//  returns '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity=\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">'
bootstrap(true); // Return JS as well.
/*
returns '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
*/
popper();
//  returns <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
fontsawesome();
// returns <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
react();
// returns <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>

with from CynoBit