2020-04-06, 13:07:47
How to add other .js libs or personal js files? Which is correct directory for them? Which file should include them?
thx
thx
QUESTION Where to store and include .js files?
|
2020-04-06, 13:07:47
How to add other .js libs or personal js files? Which is correct directory for them? Which file should include them?
thx
Hi johnywhy,
They are all part of the assets folder inside your theme folder (it is called the assets folder for a reason) Javascript libraries and scripts go in the js folder which you can find in the assets folder Same for your css scripts which go also in it's own css folder in the assets folder the img folder holds only images and icons that are called by js and css scripts if your site uses special fonts to beautify your text put them in the folder fonts if your site uses font awesome then put its css in the css folder and put it's webfonts folder on the same level in the assets folder, see below : /your-theme/assets/css img js fonts webfonts
2020-04-17, 08:28:47
Thx, now in which file do i put my javascript file-inclusion?
Is there an index.html? thx
2020-04-17, 23:03:53
Hi johnywhy,
You put it (or better said: you call it) between the <head> and </head> tags in the header.inc.php Replace your-css.css with the css you need in your website Replace your-javascript.js with the javascript you need in your website Example: Code: <head> F.
Won't anything in the theme folder get overwritten if the theme is updated?
What if i want the script accessible to all themes? It seems data folder is the best place, because data is the only folder that won't get overwritten by gs updates, right? |
« Next Oldest | Next Newest »
|