I am using Lokesh Dhakar's Lightbox on my page. I renamed the css and js folders to be _css and _js on my server and all works except I also renamed the "img" folder to be "_img", and the image icons (close, loading, prev and next) don't work. Are you not able to have this folder be named something other than "image" or "img"? Thanks.
I did exactly that, changed the name. Just make sure in CSS and JS and you have the correct links to the new folder.
Related
When import folder, vs-code-image i can see tips for what i want to import, in this case it's folder "images" but when i go inside folder
../src/images/
i see nothing, not a single file or image, vs-code-image inside this folder - five images with .svg, and one with .png
tried to use
<img src={require('./images/')}></img>
but still nothing...
I have my images folder under public folder. I use it in jsx like this:
<img src="/images/twitter.png" alt="twitter" />
This works.
But I have a problem in CSS's url.
background-image: url(/images/twitter.png); // compiler can't resolve this file.
The above doesn't work now. How do I make this work? I am not using webpack and don't want to use it for now.
Where is your css file located?
Is it in the same folder since you are writing the route identical to your code?
Answer: Check the route of your img.png relative to your css file. It can be the only problem.
I need to remove the part of image, css and js urls so that I would keep everything that goes after "."
For example,
https://test.com/en/images/footer-inst-icon.svg
I would like to have only "svg" in another column
Here is the link to the file https://docs.google.com/spreadsheets/d/1VJPQzkgZCTaKCgRbstVFDCwycZFfCbSL1ENXPYcioNo/edit#gid=0
Try below formula (see your sheet)-
=ArrayFormula(TRIM(RIGHT(SUBSTITUTE(A2:A,".",REPT(" ",100)),100)))
You can also use REGEXEXTRACT() like
=ArrayFormula(REGEXEXTRACT(A2:A,"\w+$"))
I am New to CakePhp and want to learn more about it because of it's flexibility.But am having a bit of a prob already.
I have this project of mine where iam using font awesome in CakePhp.
When i extracted the zip file of Font-Awesome i found "font-awesome.css " and a Folder name "fonts".
Well i have included the "font-awesome.css " in my default.ctp and copy the css file in "app/webroot/css folder".
Like this
<?php echo $this->Html->css('font-awesome');?>
<body>
<i class="fa fa-calendar fa-3x"> MyAttendence</i>
</body>
but i don't know where to put the "fonts" folder, i have tried placing this folder inside webroot/files/ but still no luck .
Any help is appreciated.
FontAwesome is including font files like ../fonts/fontawesome-webfont.eot?v=4.0.3, so you should try to put them in webroot/fonts (like webroot/fonts/fontawesome-webfont.eot)
im using themes in an app im doing, and need a global css/img/js folder
i have tried using app/webroot as this folder, but cant get any css from a theme to show the images.
I have a setup like :: /app/views/themed/my_theme/webroot/css/file.css
With some css that looks like:
...
body{
background-image: url('../img/file.jpg');
}
...
if i have the image in /app/views/themed/my_theme/webroot/img/file.jpg everything works 100% but when i put the image in /app/webroot/img/file.jpg it will not show. i have tried all sorts of combinations for the
i have also tried using a plugin dir like app/plugins/my_plugin/webroot/img/file.jpg but the various paths ive tried will not show the image either.
any ideas how i can get the image to show? i dont mind if its for webroot/ or in plugins/xyz/, just as long as i can use the same image in many different themes with out having to duplicate the images
when the image is in /webroot/img i can use the full path like url(http://locahost/my_app/img/file.jpg) and it works.
things that dont work
url("img/file.jpg")
url("/img/file.jpg")
url("../img/file.jpg")
url("/../img/file.jpg")
url("../../img/file.jpg")
thanks.
In your CSS file
body{
background-image: url('/img/file.jpg');
}
This will use the root area to find the image in /app/webroot/img/file.jpg
CSS has urls for images relative to the path it is placed in.
CSS files from my_theme are linked like site.com/theme/my_theme/css/style.css in the browser. So if you want to use an image from app/webroot/img in your theme's CSS, use url(../../../img/image.png)
I have not tried that but the cookbook says:
If you want to keep your theme assets
inside app/webroot it is recommended
that you rename app/webroot/themed to
app/webroot/theme.