-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* favicon tests * Add some dynamic examples * main page format fixed --------- Co-authored-by: Shane Osbourne <[email protected]>
- Loading branch information
1 parent
25ebf3a
commit 9ca082a
Showing
14 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Favicon test JPG</title> | ||
<link rel="shortcut icon" href="dax.jpg"> | ||
</head> | ||
<body> | ||
<p><a href="../../index.html">[Home]</a>/<a href="../index.html">[Favicon]</a></p> | ||
|
||
<h1>JPG Favicon</h1> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Favicon test JS</title> | ||
<link rel="shortcut icon" href="favicon.png"> | ||
</head> | ||
<body> | ||
<p><a href="../../index.html">[Home]</a>/<a href="../index.html">[Favicon]</a></p> | ||
|
||
<h1>PNG Favicon replaced at runtime dax > skeleton dax</h1> | ||
|
||
<p> | ||
<button type="button" onclick="setDefault()">Set default now</button> | ||
<br> | ||
<small>Sets the <code>href</code> value of <code>link[rel='shortcut icon']</code> to | ||
<code>./favicon.png</code></small> | ||
</p> | ||
<p> | ||
<button type="button" onclick="setOverride()">Set override now</button> | ||
<br> | ||
<small>Sets the <code>href</code> value of <code>link[rel='shortcut icon']</code> to <code>./new_favicon.png</code></small> | ||
</p> | ||
<p> | ||
<a href="?initial=override">Set override on page load </a> | ||
<br> | ||
<small>Reloads the page, and sets the override immediately</small> | ||
</p> | ||
<p> | ||
<a href="?initial=delayed-override">Set override on page load, after 1s</a> | ||
<br> | ||
<small>Reloads the page, and sets the override after <code>1000ms (1s)</code></small> | ||
</p> | ||
|
||
<script> | ||
function setDefault() { | ||
document.querySelector("link[rel='shortcut icon']").href = "./favicon.png"; | ||
} | ||
|
||
function setOverride() { | ||
document.querySelector("link[rel='shortcut icon']").href = "./new_favicon.png"; | ||
} | ||
|
||
// set an initial state | ||
const initial = new URL(window.location.href).searchParams.get("initial"); | ||
if (initial) { | ||
switch (initial) { | ||
case "default": | ||
setDefault(); | ||
break; | ||
case "override": | ||
setOverride(); | ||
break; | ||
case "delayed-override": | ||
setTimeout(setOverride, 1000) | ||
break; | ||
default: | ||
console.warn("unsupported initial value") | ||
} | ||
} | ||
</script> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Favicon test PNG</title> | ||
<link rel="shortcut icon" href="dax.png"> | ||
</head> | ||
<body> | ||
<p><a href="../../index.html">[Home]</a>/<a href="../index.html">[Favicon]</a></p> | ||
|
||
<h1>PNG Favicon with custom name</h1> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Favicon test SVG</title> | ||
<link rel="shortcut icon" href="dax.svg"> | ||
</head> | ||
<body> | ||
<p><a href="../../index.html">[Home]</a>/<a href="../index.html">[Favicon]</a></p> | ||
|
||
<h1>SVG Favicon with custom name</h1> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Favicon webapp manifest test", | ||
"short_name": "favicontest", | ||
"start_url": "/index.html", | ||
"icons": [ | ||
{ | ||
"src": "dax.png", | ||
"sizes": "128x128", | ||
"type": "image/png" | ||
} | ||
], | ||
"theme_color": "#ffffff", | ||
"background_color": "#ffffff" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Favicon test json manifest</title> | ||
<link rel="shortcut icon" href="dax.png"> | ||
<link rel="manifest" href="Manifest.json"> | ||
</head> | ||
<body> | ||
<p><a href="../../index.html">[Home]</a>/<a href="../index.html">[Favicon]</a></p> | ||
|
||
<h1>PNG Favicon in a JSON manifest</h1> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Privacy Test Pages - Home</title> | ||
</head> | ||
<body> | ||
<p><a href="../../index.html">[Home]</a></p> | ||
|
||
<h1>Favicon Tests</h1> | ||
<h2>Collection of test pages that load a favicon in a variety of formats and using different syntaxes and techniques</h2> | ||
<p>A successful test shows a Dax favicon instead of the default grey icon</p> | ||
|
||
<ul> | ||
<li><a href="./favicon_png/index.html">PNG favicon</a></li> | ||
<li><a href="./favicon_svg/index.html">SVG favicon</a></li> | ||
<li><a href="./favicon_jpg/index.html">JPG favicon</a></li> | ||
<li><a href="./favicon_webapp_manifest/index.html">Favicon in a json manifest</a></li> | ||
<li><a href="./favicon_js/index.html">Favicon replaced at runtime</a></li> | ||
<ul> | ||
<li><a href="./favicon_js/index.html?initial=override">Favicon automatically replaced after page load</a></li> | ||
<li><a href="./favicon_js/index.html?initial=delayed-override">Favicon automatically replaced after 1s</a></li> | ||
</ul> | ||
</ul> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters