Skip to content

Instantly share code, notes, and snippets.

@amgraham
Created June 6, 2013 01:52
Show Gist options
  • Save amgraham/5718766 to your computer and use it in GitHub Desktop.
Save amgraham/5718766 to your computer and use it in GitHub Desktop.
The base pictures for memes rarely change, but the words typically do. Cache the pictures, and CSS the words.
<?php $top = (@$_GET["top"]) ? $_GET["top"] : ""; $bottom = (@$_GET["bottom"]) ? $_GET["bottom"] : ""; ?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" media="all" href="http://smarterfish.com/assets/css/basic.css"/>
<title>Business Cat Cached</title>
</head>
<body>
<header>
<h1>Business Cat Cached</h1>
<p>heavy image caching, webkit text strokes &amp; CSS punchlines</p>
</header>
<section style="position: relative; background: url('bcat.jpg'); height: 430px; width: 432px; background-repeat: no-repeat; text-align: center;">
<span style="position: absolute; top: 5px; line-height: 35px; -webkit-text-stroke: 2px black; left: 0px; width: 423px; color: white; font-size: 50px;" class=""><?php echo $top; ?></span>
<span style="position: absolute; bottom: 5px; line-height: 35px; -webkit-text-stroke: 2px black; left: 0px; width: 423px; color: white; font-size: 50px;" class=""><?php echo $bottom; ?></span>
</section>
<form method="get" action="./" class="form-inline">
<input type="text" name="top">
<input type="text" name="bottom">
<button type="submit" class="btn">Say!</button>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment