Skip to content

Instantly share code, notes, and snippets.

@amcgregor
Created December 3, 2009 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amcgregor/247957 to your computer and use it in GitHub Desktop.
Save amcgregor/247957 to your computer and use it in GitHub Desktop.
WebCore Wiki HTML template.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>${name}</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(function(){
$('#edit').click(function(){
$('.content').empty().append('<form method="post"><textarea name="content"></textarea><input type="submit" name="button" /></form>');
$('textarea').load(window.location + '?raw=True');
return false;
});
});
// ]]>
</script>
<style type="text/css" media="screen">
html { padding: 0; margin: 0; }
body { font-size: 200%; padding: 20px; margin: 0; }
button { font-size: inherit; }
#edit { float: right; margin: 10px; }
textarea { width: 100%; height: 200px; font-size: inherit; }
.content :first-child { margin-top: 0; }
</style>
</head>
<body>
<button id="edit">Edit this article.</button>
<div class="content">${content | n}</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment