A quick demo of the theme-color
meta tag that can be used to colour the UI of Chrome for Android.
Last active
February 26, 2016 12:17
-
-
Save Ultrabenosaurus/ef309e12cc940a578661 to your computer and use it in GitHub Desktop.
A quick demo of the "theme-color" meta tag that can be used to colour the UI of Chrome for Android.
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
<?php | |
$colour = "#" . ( ( isset( $_GET['colour'] ) ) ? $_GET['colour'] : "000000" ); | |
?> | |
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Chrome for Android Colours</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- CHROME FOR ANDROID UI COLOUR --> | |
<meta name="theme-color" content="<?php echo $colour; ?>"> | |
</head> | |
<body> | |
<!--[if lt IE 7]> | |
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | |
<![endif]--> | |
<h1>Colour Chrome for Android</h1> | |
<ul> | |
<li><a href="?colour=0000ff">blue</a></li> | |
<li><a href="?colour=00ff00">green</a></li> | |
<li><a href="?colour=ff0000">red</a></li> | |
<li><a href="?colour=ff0099">pink</a></li> | |
<li><a href="?colour=ffff00">yellow</a></li> | |
<li><a href="?colour=663300">brown</a></li> | |
<li><a href="?colour=000000">black</a></li> | |
<li><a href="?colour=ffffff">white</a></li> | |
</ul> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque aliquet aliquet ipsum. Proin sem mi, laoreet ut nisl porttitor, feugiat aliquet erat. Pellentesque ut enim eget arcu tristique tincidunt eu convallis ligula. Donec nec porta justo, quis posuere velit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et ultricies quam. Vivamus auctor ut quam a lobortis. Donec molestie augue et convallis pulvinar. Morbi vel augue et dui aliquam sodales ut eget leo. Donec tempus erat vitae hendrerit vulputate.</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment