Skip to content

Instantly share code, notes, and snippets.

@k33
Created March 20, 2011 18:18
Show Gist options
  • Save k33/878519 to your computer and use it in GitHub Desktop.
Save k33/878519 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en" class="no-js">
<!-- the "no-js" class is for Modernizr. -->
<head class="html5reset-kitchensink-commented">
<meta charset="utf-8" />
<!-- This prevents the conditional comments below from holding up the page load
www.phpied.com/conditional-comments-block-downloads/ -->
<!--[if IE]><![endif]-->
<title>Project Name</title>
<meta name="description" content="Here is the description of your project." />
<!-- Google will often use this as its description of your page/site. Make it good. -->
<meta name="author" content="Your Name Here" />
<meta name="copyright" content="Copyright Your Name Here 2010. All Rights Reserved." />
<meta name="DC.title" content="Project Name" />
<meta name="DC.subject" content="What you're about." />
<meta name="DC.creator" content="Who made this site." />
<meta name="google-site-verification" content="" />
<!-- Speaking of Google, don't forget to set your site up: http://google.com/webmasters -->
<link rel="shortcut icon" href="_/img/favicon.png"/>
<!-- This is the traditional favicon.
- size: 16x16 or 32x32
- transparency is OK
- see wikipedia for info on browser support: http://mky.be/favicon/ -->
<link rel="apple-touch-icon" href="_/img/custom_icon.png"/>
<!-- The is the icon for iOS's Web Clip.
- size: 57x57 for older iPhones, 72x72 for iPads, 114x114 for iPhone4's retina display (IMHO, just go ahead and use the biggest one)
- To prevent iOS from applying its styles to the icon name it thusly: apple-touch-icon-precomposed.png
- Transparency is not recommended (iOS will put a black BG behind the icon) -->
<!-- address the mobile presentation
we suggest no default, as each project has its own needs
<meta name="viewport" content="width=device-width, user-scalable=no" />
-->
<!--<link href="main.css" rel="stylesheet" type="text/css" />-->
<style>
html, body, div, ul, ol, li, dl, dt, dd, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, fieldset, input {
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6, address, caption, cite, code, em, th {
font-size: 1em;
font-weight: normal;
font-style: normal;
}
ul, ol {
list-style: none;
}
fieldset, img {
border: none;
}
caption, th {
text-align: left;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
body {
background-color:#fafafa;
}
.clear-both {
clear:both;
}
/*Typography*/
h1, h2, h3 {
color: #333;
font-size:14px;
font-family:Tahoma, Geneva, sans-serif;
}
p {
color: #333;
font-size:12px;
line-height:22px;
font-family:Tahoma, Geneva, sans-serif;
padding-bottom:10px;
}
a {
color:#333;
text-decoration: none;
font-style:italic;
}
li {
font-size:12px;
line-height:22px;
font-family:Tahoma, Geneva, sans-serif;
color:#444;
}
/*Main*/
#wrap {
width:575px;
margin:0 auto;
}
/*Top Section*/
#top {
width:625px;
height:260px;
}
#logo {
padding:25px 25px 0 25px;
}
#nav {
widows:525px;
height:135px;
margin-bottom:45px;
background-color: #333;
border-top:1px solid #666;
border-bottom:1px solid #666;
}
/*Search*/
#search #search-box {
width:320px;
padding:10px;
margin:35px 0 25px 25px;
font-size:16px;
font-style:italic;
color:#444;
}
#search #search-button {
width:150px;
padding:10px;
margin:35px 0 25px 0;
}
#scrollingDiv {
position:absolute;
width:545px;
height:250px;
margin-top:160px;
}
#search-wrap {
}
#search {
position:relative;
width:545px;
height:115px;
margin:0 0 0 -25px;
padding:10px;
background-color:#ccc;
z-index:3;
border-top:1px solid #797979;
border-bottom:1px solid #797979;
background-image: -moz-linear-gradient(
center bottom,
rgb(148,148,148) 5%,
rgb(184,184,184) 53%,
rgb(148,148,148) 100%);
}
/*Overhang Corners*/
#left-corner-top, .left-corner-top {
position:relative;
height:0;
width:0;
left:-50px;
top:75px;
border-style:solid;
border-width:25px;
border-color: transparent #adadad transparent transparent;
color:#fafafa;
z-index:1;
}
#left-corner-bottom, .left-corner-bottom {
clear:both;
position:relative;
height:0;
width:0;
left:-50px;
top:-25px;
border-style:solid;
border-width:25px;
border-color: transparent #adadad transparent transparent;
color:#fafafa;
z-index:1;
}
#right-corner-top {
position:relative;
height:0;
width:0;
right:-515px;
top:25px;
border-style:solid;
border-width:25px;
border-color: transparent transparent transparent #adadad;
color:#fafafa;
z-index:1;
}
#right-corner-bottom {
clear:both;
position:relative;
height:0;
width:0;
right:-515px;
top:-75px;
border-style:solid;
border-width:25px;
border-color: transparent transparent transparent #adadad;
color:#fafafa;
z-index:1;
}
/*Content*/
#content {
width:515px;
height:100%;
padding:0;
background:url(http://static.tumblr.com/jtplstg/Dm5lib6i1/bg.jpg) repeat;
}
/*Left icons*/
.icon-wrap {
float:left;
width:18px;
}
.icon {
}
.icon-photo {
position:relative;
left:-25px;
top:0px;
width:25px;
height:25px;
padding:20px;
z-index:2;
background:url(http://static.tumblr.com/jtplstg/HoHlibas1/icon-photo.png) center no-repeat #666;
}
/*posts*/
#posts {
width:515px;
}
.post p {
padding:10px 25px ;
}
.tags {
float:right;
width:440px;
height:30px;
margin:0 0 15px 0;
padding:15px 20px 20px 30px;
background-color: #C8C8C8 ;
}
.tags li {
padding:5px;
font-size:16px;
font-family: Tahoma, Geneva, sans-serif;
float:left;
}
.chat {
padding:25px;
}
.chat .label {
font-weight:bold;
}
.chat .odd {
}
.chat .even {
background: #CCC;
}
.photo {
}
.caption p {
width:450px;
padding:15px 25px;
}
#top-link { display:none; position:fixed; right:15px; bottom:15px; padding:22px; background:url(http://static.tumblr.com/jtplstg/2h6licxv4/icon-up.png);}
</style>
<!-- Either Modernizr OR the HTML5 Shiv script is required if you want IE compatability, AND you want to use the new,
more-semantic HTML5 elements (header, article, footer, etc)
- we've only included Modernizr; HTML5 Shiv can be found here: http://html5shiv.googlecode.com -->
<!-- MODERNIZR: http://www.modernizr.com/ -->
<script src="_/js/modernizr-1.6.min.js"></script>
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.2.js"%3E%3C/script%3E'))</script>
<script src="_/js/functions.js"></script>
<!-- this is a variation of the official analytics snippet: http://mathiasbynens.be/notes/async-analytics-snippet
replace XXXXXX-XX with your site's ID and uncomment to put this into effect
<script>
var _gaq = [['_setAccount', 'UA-XXXXXX-XX'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = '//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script> -->
<script>
$().ready(function() {
var $scrollingDiv = $("#scrollingDiv");
$(window).scroll(function(){
$scrollingDiv
.stop()
.animate({"marginTop": ($(window).scrollTop() + -35) + "px"}, "slow" );
});
});
/**
* jQuery.ScrollTo - Easy element scrolling using jQuery.
* Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 9/11/2008
* @author Ariel Flesler
* @version 1.4
*
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
*/
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
jQuery.fn.topLink = function(settings) {
settings = jQuery.extend({
min: 1,
fadeSpeed: 200
}, settings);
return this.each(function() {
//listen for scroll
var el = $(this);
el.hide(); //in case the user forgot
$(window).scroll(function() {
if($(window).scrollTop() >= settings.min)
{
el.fadeIn(settings.fadeSpeed);
}
else
{
el.fadeOut(settings.fadeSpeed);
}
});
});
};
//usage w/ smoothscroll
$(document).ready(function() {
//set the link
$('#top-link').topLink({
min: 400,
fadeSpeed: 500
});
//smoothscroll
$('#top-link').click(function(e) {
e.preventDefault();
$.scrollTo(0,300);
});
});
</script>
</head>
<body id="www-domain-com">
<div id="wrap">
<div id="scrollingDiv">
<div id="left-corner-top"></div>
<div id="right-corner-top"></div>
<div id="search">
<form action="/search" method="get">
<input type="text" value="HTML, CSS, JQuery and PHP..." onFocus="if
(this.value==this.defaultValue) this.value='';" name="q" id="search-box">
<input type="submit" value="Search" id="search-button"/>
</form>
</div><!--search-->
<div id="left-corner-bottom"></div>
<div id="right-corner-bottom"></div>
</div>
<div id="content">
<div id="top"><img src="http://static.tumblr.com/jtplstg/5ODlib8os/logo.png" width="470" height="214" id="logo"></div>
<div id="nav">
{block:HasPages}
{block:Pages} {/block:Pages}
{/block:HasPages}
</div>
{block:SearchPage}
{block:SearchResults}
<div id="searchresults">{lang:SearchResultCount results for SearchQuery}</div>
{/block:SearchResults}
{block:NoSearchResults}
<div id="searchresults">{lang:No search results for SearchQuery}</div>
{/block:NoSearchResults}
{/block:SearchPage}
{block:Posts}
{block:HasTags}
<ul class="tags">
{block:Tags}
<li>
<a href="{TagURL}">{Tag}</a>,
</li>
{/block:Tags}
</ul>
{/block:HasTags}
<ol id="posts">
{block:Text}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post text">
{block:Title}
<h3><a href="{Permalink}">{Title}</a></h3>
{/block:Title}
{Body}
</li>
{/block:Text}
{block:Photo}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post photo">
<img src="{PhotoURL-500}" alt="{PhotoAlt}"/>
{block:Caption}
<div class="caption">{Caption}</div>
{/block:Caption}
</li>
{/block:Photo}
{block:Photoset}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post photoset">
{Photoset-500}
{block:Caption}
<div class="caption">{Caption}</div>
{/block:Caption}
</li>
{/block:Photoset}
{block:Quote}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post quote">
"{Quote}"
{block:Source}
<div class="source">{Source}</div>
{/block:Source}
</li>
{/block:Quote}
{block:Link}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post link">
<a href="{URL}" class="link" {Target}>{Name}</a>
{block:Description}
<div class="description">{Description}</div>
{/block:Description}
</li>
{/block:Link}
{block:Chat}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post chat">
{block:Title}
<h3><a href="{Permalink}">{Title}</a></h3>
{/block:Title}
<ul class="chat">
{block:Lines}
<li class="{Alt} user_{UserNumber}">
{block:Label}
<span class="label">{Label}</span>
{/block:Label}
{Line}
</li>
{/block:Lines}
</ul>
</li>
{/block:Chat}
{block:Video}
<div class="icon-wrap">
<div class="icon-photo"></div>
<div class="left-corner-bottom"></div>
</div>
<li class="post video">
{Video-500}
{block:Caption}
<div class="caption">{Caption}</div>
{/block:Caption}
</li>
{/block:Video}
{block:Audio}
<li class="post audio">
{AudioPlayerBlack}
{block:Caption}
<div class="caption">{Caption}</div>
{/block:Caption}
</li>
{/block:Audio}
<div class="clear-both"></div>
</ol>
{/block:Posts}
<div class="clear-both"></div>
</div>
</div>
<a href="#top" id="top-link"></a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment