can you please instruct me on how to add custom fonts to my rails 5 application? i've added my custom fonts files to fonts folder in app/assets. i went on to use the #fontface and font-url in .scss, but my fonts wont take effect after before and[enter image description here pushing to heroku.
enter image description here
I suggest you go modify your application.html and add the fonts there. I don't know what you are trying to do but adding a simple
<link href="fonts.googleapis.com/css?family=Roboto"; rel="stylesheet">
In your header might be enough.
Related
I'm working on a create-react-app project in VS code and would like to change the default logos (specifically the one that appears in the tab to the left of the website title).
I have an image that I would like to use, but I can't figure out how to add the image to VS code. I tried making a .png file, but wasn't able to add the picture into the file. I tried the same thing with a .ico file. I honestly don't understand the difference between the two. But if someone could help me with steps on how to change that logo (blue atom looking thing) that would be great.
This depends on how you want to put it.
add to html file(probably index.html)
<link rel="icon" href="pathname">
add Node.js file assuming that you are also using express.
var favicon=require("serve-favicon");
app.use(favicon("pathname"));
have a strange one! When working with my Laravel 5 app using font awesome, every icon shows up as it should when I am running locally with debug set to on.
When I turn off APP_DEBUG and set to false, one of my font awesome icons just does not show!? Very odd - any ideas?
Thanks!
There is probably something weird with the href of the fontawesome css link tag. Check your url or just use a cdn such as:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
I searched through many sites, but I failed to get an answer.
Question :
I want to change icon as per given in below image in my browser.
Currently chrome and Mozilla does not support this feature if you want check you can check it in either ie or safari, it will show where you want.
you should add this tag to head
<link rel="shortcut icon" href="<YOUR ICON PATH>">
this is a tool to help you to create icon using converter
http://www.favicongenerator.com/
Those are called "favicons", and you can set one for your website using a special tag in the HEAD of your HTML. You can find many tutorials on this by Googling (now that you know what they're called).
Wikipedia suggests a tag something like this:
<link rel="shortcut icon" href="http://example.com/myicon.ico" />
As an alternative, your website can provide an image named favicon.ico in the root folder.
That icon names "favicon". To create Something like that go to THIS LINK, Upload an image and get the favicon.ico file, then put it next to your template page on your host.
To get more information go HERE.
We’re using add-on domains for our multi-site Magento setup running off one skin file on domain1.com and was wondering how we go about setting up a favicon for each store?
We will have a total of 10 domains by the time we finish setting up this project so obviously want 10 different favicon’s.
I’ve tried this - http://vanesz.awardspace.info/magento_favicon_tweak/
Which works in some respect and show’s the relevant icon on things like google webmaster tools but it doesn’t work as a bookmark icon and as an icon at the top of the page on browsers like chrome.
Any help on this would be great.
Here's a post about that:
http://drupal.org/node/17704
Basically, you do this:
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
and change href to whatever you want.
This may be more of a tech support issue, but I'm wondering if any other developers have come across this:
I'm using Abcpdf in my ASP.NET code to generate a PDF from HTML. It works fine, but one user is generating PDFs that don't have the CSS applied (IE8, Adobe Acrobat latest version - same as everyone else). Since this is the only user complaining, I'm sure it's a local setting, but I can't figure out what would prevent the css from loading - a browser setting? An Acrobat setting?
Does anyone have any suggestions?
Perhaps an issue with different versions of Acrobat reader? I'd look into this.
This doesn't make a lot of sense because AbcPdf uses service side logic to create the PDF based on what methods you are using to create the document (ex. AddImageUrl vs drawing out the document manually, etc.).
For what it's worth the staff at WebSuperGoo (the vendor of AbcPdf) is great with replying to support questions such as this. I've run across a few edge cases with their product that they've always followed up with workarounds or alternatives to address in a timely manner.
make sure you have media="print" for the CSS style sheet! Just spent ages looking at this pulling my hair out and was about to email WebSuperGoo then that thought came to me.
just about to back out all the changes I've made to my code and test again but it looks like with EngineType.Gecko it needs to be media="print" where as with EngineType.MSHtml it can be media="screen".....
very odd but hope that helps someone!
Make sure that the CSS is an absolute URL rather than relative, or add a base tag to the header of the HTML
For example, rather than
<style type="text/css" href="/styles/somecss.css" rel="stylesheet" />
use
<style type="text/css" href="http://myserver.com/styles/somecss.css" rel="stylesheet" />
Also if you site is SSL or authenticated then you will have to either make the area with the stylesheet un-authenticated, or, set the password and username attributes of the PDF object so that ABCPdf can authenticate
You can try the following in version 9
doc.HtmlOptions.PageLoadMethod =
PageLoadMethodType.WebBrowserNavigate;
I am using Version 10 of ABCpdf and I found that the style sheet path should be absolute instead of relative.
I changed the stylesheet path from "C:\MyProject\Resources\Styles.css" to "http:\www.MyDomain.com\Resources\Styles.css" and it worked.
Although, version 6 seems to be working with relative paths. I didnot check it with other versions
As per WebSuperGoo support:
(Query # : 6.17)
HTML does not exist within a file and so it does not have a location.
External stylesheets and images are often referenced via relative URLs. Because the HTML has no location it is impossible to resolve
these relative references.
So you need to provide your stylesheet and image links as absolute references. Or you may be able to use the HTML BASE element to specify
an appropriate base location. Or you can save your HTML to file in an
appropriate location and then use AddImageUrl.
Have you tried;
theDoc.HtmlOptions.DoMarkup = true;
This forces the engine to process the HTML before rendering.