where do these .less files be loaded from? - javascript

on this website : https://www.ornikar.com/
Some .less files are used to change some presets of bootstrap. when inspecting the navbar for example the color of the navbar is white and processed from a .less file (that's what the browser's css inspector shows)
My big surprise is that, the less files are nowhere to be found from the page's includes or from the imports of some other css files. neither is the less js script included in the main page.
Could someone explain to me how this is possible ?

If you're using Chrome that's a feature to help people who use less/sass.
To make Chrome show only .css you need to delete .css.map files
Update:
Less files are also fetched
Update °2 (발렌텐) :
If there are no map files, the trick is the base64 json
at the end of the main stylesheet that includes the mapping directly..

I could after few days understand where do these files be loaded from.
When you map a css to a set of less files, you have two solutions :
with a .map file
this method is generic and the .map file is referenced from within the css file (at the end). The advantage is that you can remove the .map file easily forcing the browser's css inspector to display the references as is in the css file.
the .map file is directly concatenated within the css file
The references to the less files are directly inserted at the end of the css file. The use of a .map file is then no longer needed.
More details following these links
devtools : https://developer.chrome.com/devtools
less : http://en.wikipedia.org/wiki/Less_(stylesheet_language)

It seems your less files are under the following folder path according to DevTools:
"source/Users/vincent/WORK/ornikar-front/solidstorm/src/less/onk"

Related

What is the role of all.js and other JS file in font awesome package?

I have downloaded the font awesome package version 5.7.2 but without using the js files (inside js folder), I haven't confronted any problem and fonts working well.
Here there is a help about js files but only wrote this:
SVG with JavaScript
But I don't understand what's the meaning.
So what is the role of this js files and are necessary to add in our project?
All.js must be referenced if you want to render svg icons instead of webfont icons, since the svg icons are rendered using javascript. If you go with webfont icons, simply reference All.css and skip the js files.
If you need information to base your decision on, you can read up on the subject here: Icon Fonts vs SVGs

How to Add external Javascript and CSS for CakePhp

I am new to CakePhp. I want to get the help of the external javascript and css files. I have downloaded those files. And included those files in webroot directory (js and css sub directories). So If I want to use those in a view.ctp how can I call them. Can you explain me simply ?
Simply use the HTML helper like so :
print $this->Html->css("name_of_css_file");
print $this->Html->script("name_of_javascript_file");
So long as you not doing anything crazy and are using the default ".css" and ".js" extensions - you can leave out the extensions from the above code.
Cake is still PHP. You must add link do css in head of html file (.ctp view file).
There are two ways, write link tag with rel and src attributes or using HtmlHelper

using squishit and rendering external minifiedjs at the end of body element

I have master page and child page in my aplication. At runtime i determine the js & css to be included in master page pre-init method and render the js & css using squish it (bundlecss.AsCached & bundlecss.Render) method. In master page Head control the file is included using Bundle.Css().RenderNamed method.
Now my requirement is to include the external js file at the end of body element to enable faster rendering of web page. When i called Bundle.Css().RenderNamed at the end of the body element, the js file is not included in the page.
Is it not possible to specify the location where the minified js should be included in page html when using squish framework ?
Thanks in advance.
Brahmaiah
You probably don't want to do things this way. The cached/named bundles are for scenarios where you can't (or don't want to) create physical files. The way you're doing it here just creates more complexity. Bundle.JavaScript().Add("~/file.js").Render("~/blah") will still cache the bundle, but it uses the file on disk (only created once).
Are you really calling Bundle.Css().RenderNamed("javascript bundle name")? If so you need to change the call to Bundle.JavaScript().RenderNamed. If this is just a typo it would help to see more code / markup.

Copy a Javascript datepicker

I would like to copy a Javascript datepicker (calender) from one app to another. But I could not do that. If i save the original app page(the site from where I would like to copy) the datepicker is not working (peculiar). Even I copy pasete the html and css code also but I am not getting the javascript datepicker. What can be the solution?
Try looking at the page source. Download necessory .js files, .css files into your folder / directory. Also copy relevant JavaScript, CSS and HTML from the page. Then compile another html file in that directory using downloaded files and copied scrips. This should work.

VS2010 WebApp .js+.css able to be embedded fully within HTML code?

So I'm looking to take HTML code for a slideshow and insert it into an HTML box for an app.
However, obviously the .js and .css dependencies need to go with it, or else it won't function properly.
Is there a way/program that allows me in VS to take those classes and insert them within the HTML file so that they are all read at once, and the slideshow works? Ideas?
Thanks,
D.
Use external files to allow the browser to cache them. Put the reference to the external files in your master page.

Categories

Resources