Favicon in IE 10 and 9 - angularjs

<html lang="en">
<head>
<!-- favicon.ico -->
<link ng-if="A" href="images/favicon_a.ico" rel="icon" />
<link ng-if="B" href="images/favicon_b.ico" rel="icon" />
<link ng-if="B" href="images/animated_favicon_b.gif" rel="icon" type="image/gif" />
...
</head>
I want to display one icon, depending on what I have. In Chrome and Firefox everything is perfect, but in IE (even 11) I have problems:
ng-if doesn't work and I take only one icon every time
In IE 9 I cannot display the icon at all.
I tried everything with no results.
Any ideas?

Related

How to combine webpack-license-plugin with create-react-app?

For my React-website, I need to document all the packages I am using.
For this, I want to use webpack-license-plugin (https://www.npmjs.com/package/webpack-license-plugin)
However, I recently switched to using "create-react-app" which means there is no config-file I can directly modify.
I tried to follow this answer (create react app Configuration file after build app) which tells me to create a config-file, use the plugin there and load it in my index.html-file.
I would have expected when running the build somehow the inside config-file by me specified output-file would appear inside the build-folder, BUT there is nothing.
I did not find any other guidance, other than this question (Customize webpack plugins using create-react-app). However, I would like to avoid making use of new tools, if possible.
Generally, I just wonder about the simplest way how to achieve what I set out to do. Thanks for any help!
Here is the content of the extra config-file I added to my public folder (beside the index.html):
const LicensePlugin = require("webpack-license-plugin")
module.exports = {
plugins: [
// there might be other plugins here
new LicensePlugin({ outputFilename: "thirdPartyNotice.json" })
]
}
And here is the content of my index.html:
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>Document</title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Cardo&display=swap" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="%PUBLIC_URL%/config.js" type="text/javascript"></script>
<div id="root"></div>
</body>
</html>```

Google isn't displaying mobile SERP favicon

Since one month I always tried to fix my mobile SERP favicon and google recrawled my site many times in the meantime. Even though it's still not working. The GSC isn't showing it either, same with Lighthouse...
What have I done wrong?
Here is my favicon code:
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="https://eselsbruecken-generator.de/data/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://eselsbruecken-generator.de/data/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://eselsbruecken-generator.de/data/favicon-16x16.png">
<link rel="manifest" href="https://eselsbruecken-generator.de/data/site.webmanifest">
<link rel="mask-icon" href="https://eselsbruecken-generator.de/data/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="https://eselsbruecken-generator.de/data/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/data/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<!-- favicon end -->
I am grateful for anything helpful...
Have a nice day!

Any idea why my Github Pages site isn't showing? ReactJS

here's the link to my GH page
https://filipdimko11.github.io/crypto-tracker/
When running it locally, the project renders everything. After hosting it on GH pages, though, the website doesn't render anything (no errors in the console either).
I tried making an empty commit, saw it as another solution on StackOverflow, but that didn't fix it. Using ReactJS, thanks.
The problem is because in your index.html file you are referencing your assets like /static/js/main.2227a53b.js which makes sense when you are running locally.
But when you deploy to github pages, the directory structure is different. To make it work properly you'd need the routes to be prefixed with crypto-tracker/ For example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto&display=swap"
rel="stylesheet"
/>
<meta name="description" content="Your best crypto tracker!" />
<link rel="manifest" href="/manifest.json" />
<title>Crypto Tracker</title>
<script defer="defer" src="crypto-tracker/static/js/main.2227a53b.js"></script>
<link href="crypto-tracker/static/css/main.f53fb378.css" rel="stylesheet" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Depending on what build tool you are using, this is probably configurable.

Favicon not showing up when running my React project

Favicon not showing up when running my React project. However, when I click index.html, the icon appears. When I call npm start, when localhost opens I see my pages without icons. I tried every way and even though I made many changes, I could not reach the result. I will be glad if you help.
The file structure of my project is as follows.
file structure
and index.html file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<title>Trying Project</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
Clear the cache in your browser, this should fix the issue.
Your icons should be in public folder. For importing correctly you have to start all your paths with "%PUBLIC_URL%/myIcon.ico" and this "%PUBLIC_URL%" will be resolved into public folder (where your index.html is placed by default).
(inside index.html on public folder)
exemple: <link rel="icon" href="%PUBLIC_URL%/logo.png" />
Just add version parameter for the favicon path to force your browser to refresh the pic
<link rel="icon" href="favicon.ico?v=2" />
Then you can delete it, the icon will remain.

LightBox2 2.7.1 pop-out not working

I've downloaded the script for the latest version of lightbox2. I've added both .js files as well as the .css file to my head tag. I've used the new attributes in my code for the images, and I've made sure all the files are in the folder that they're supposed to be in. Still, I cannot get the functionality of when you click the thumbnail, the larger image pops out.
Please help. Here is my head:
<head>
<meta charset="UTF-8" />
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/lightbox.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Gloria+Hallelujah|Amatic+SC' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" HREF="index.css" />
<link href="css/lighbox.css" rel="stylesheet" />
<title>
Welcome! | DaveAyotte.com
</title>
</head>
And here is the section where I'm showing the pictures:
<div class="photobox">
<img src="img/img1thumb.jpg" />
<img src="img/img2thumb.jpg" />
<img src="img/img3thumb.jpg" />
<img src="img/img4thumb.jpg" />
<img src="img/img5thumb.jpg" />
</div>
edit: I actually just noticed that instead of creating a popout as it's supposed to, it's opening the picture outside of the main div of my website (used to hold everything in a uniform size), creating a scroll-bar that needs to be scrolled down a long way to view the clicked image.
Please check the lightbox.css file to see if its linked properly or not and add type attribute as well in the link tag of lightbox.css
You need to add rel attribute under anchor tag like this
<a href="color lef.jpg" data-type="album" rel="lightbox" >
<img src="color lef.jpg" width="100" height="100" />
</a>
<link href="css/lighbox.css" rel="stylesheet" />
should be
<link href="css/lightbox.css" rel="stylesheet" />
There is a spelling error in 'light'. Your original code is missing the 't'.

Resources