...
Due to the ongoing development of the Frontend-frameworks we are using for our Frontebd , it is recommended to update the sourcefiles to increase speed, resolve bugs and increase overall responsiveness of the website.
In most cases it is sufficient to upgrade the main file of jQuery, DataTables and Bootstrap.
The downloadlinks Downloadlinks for the current version are:
...
Datatables: https://datatables.net/download /index
Info | |||||
---|---|---|---|---|---|
| |||||
|
jQuery: https://code.jquery.com/jquery/
The implementation is done in the Header views/bootstrap/header.blade.php (for CSS) and Footer(JS) File.
Example CSS implementation:
<link views/bootstrap/footer.blade.php (JS) Files. There are several ways to implement these Frameworks, such as via cdn, by downloading the corresponding files or composer.
Info |
---|
For every Framework there are several files available.
|
1 CDN implementation
For fast development, prototyping and testing it is recommended to use CDN (Content Delivery Network) links. The needed links can be found on the mentioned websites.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
Pros | Cons |
---|---|
|
|
|
|
|
|
|
|
2 Local implementation
For the deployment version a local implementation is recommended.
The files can be downloaded from the mentioned websites or get them with wget and the CDN links
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
wget https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css |
The files that need to be replaced are inside the public/components/assets-admin/plugins/[Pluginname] Folder.
Info | ||
---|---|---|
| ||
if you copy the files in these folders don't forget to do #> chmod +x ./[Filename] #> chown apache:apache ./[Filename] |
Implementation is the same as with CDN variant.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<link href="{{asset('components/assets-admin/plugins/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet" /> |
...
Example JS implementation:
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<script src="{{asset('components/assets-admin/plugins/ |
...
bootstrap/js/bootstrap.min.js')}}"></script> |
There are several ways to implement these Frameworks, such as composer, via cdn or by downloading the corresponding files.
For fast development, prototyping and testing it is recommended to use CDN (Content Delivery Network) links
Step-by-step guide
...
Related articles
Filter by label (Content by label) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
hidden | true |
---|
...
Pros | Cons |
---|---|
|
|
| |
|
Formating the downloaded file in Sublime3 - recommended to prevent bugs/bad behaviour
To work with the files, they almost always need to be reformatted, because they are only machine readable and due to for me unknown properties the lines are sometimes too long and get not completely interpreted.
For Sublime 3 exists a Plug-in to automatically beautify HTML, JS and CSS code. With the help of this Plug-in the code becomes human-readable and gets interpreted without errors
Link to sublime Plug-in page: https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify
The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the menu. Once open, paste the appropriate Python code into the consol.
Code Block | ||||
---|---|---|---|---|
| ||||
'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76';
pf = 'Package Control.sublime-package'; ipp =
sublime.installed_packages_path(); urllib.request.install_opener(
urllib.request.build_opener( urllib.request.ProxyHandler()) ); by =
urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ',
'%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error
validating download (got %s instead of %s), please try manual install' %
(dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) |
This code creates the Installed Packages folder (if necessary), and then downloads the Package Control.sublime-package into it. The download will be done over HTTP instead of HTTPS due to Python standard library limitations, however the file will be validated using SHA-256.
Now right-click into sublime in the opened file and click on HTML/CSS/JS Prettify -> Prettify Code
3 Installation through composer
TO-DO: Check Composer implementation seems also possible and would be easier to maintain and does automatic updates, but was not used by me, because copying the files to the corresponding folders was sufficient for me.