Accessing an Assets folder in Public |
(02-19-2020, 08:37 AM)ByteHive Wrote: I tried to acces a assets folder in the public folder to stor emy js and css files is there a best praxis how to do that ?i'm still playing around with CI 4 (on dev basis) ; but the ways i've set up my public directory is to have in the public directory the following directories : css fonts images js The above is pretty explanatory. in fonts dir , i have individual dirs for fontface and also font awesome. my header view at /app/Views/ accesses a style sheet called style.css as follows: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('css/style.css'); ?> " /> i'm sure there are better ways of doing it. I've managed to get bootstrap 4 working by having these lines in style.css @import url("bootstrap.css"); @import url("custom.css"); @import url("font-face.css"); bootstrap.css, custom.css and font-face are all in same directory as style.css |
Messages In This Thread |
Accessing an Assets folder in Public - by ByteHive - 02-19-2020, 08:37 AM
RE: Accessing an Assets folder in Public - by captain-sensible - 02-19-2020, 02:13 PM
RE: Accessing an Assets folder in Public - by ByteHive - 02-19-2020, 02:32 PM
RE: Accessing an Assets folder in Public - by captain-sensible - 02-19-2020, 02:51 PM
RE: Accessing an Assets folder in Public - by InsiteFX - 02-20-2020, 05:43 AM
RE: Accessing an Assets folder in Public - by MGatner - 02-22-2020, 02:10 PM
RE: Accessing an Assets folder in Public - by captain-sensible - 02-22-2020, 02:48 PM
|