mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
166 lines
5.2 KiB
Text
166 lines
5.2 KiB
Text
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<% allScripts = [] -%>
|
|
<% allStyles = [] -%>
|
|
<% var ctx = public -%>
|
|
<% var n = current.path.length -%>
|
|
<% for (var i in current.path) { -%>
|
|
<% var path = current.path[i] -%>
|
|
<% if (ctx._data) { -%>
|
|
<% if (ctx._data.scripts || ctx._data._scripts) { -%>
|
|
<% allScripts = allScripts.concat(ctx._data.scripts || ctx._data._scripts) -%>
|
|
<% } -%>
|
|
<% if (ctx._data.styles || ctx._data._styles) { -%>
|
|
<% allStyles = allStyles.concat(ctx._data.styles || ctx._data._styles) -%>
|
|
<% } -%>
|
|
<% if (ctx._data[path] && ctx._data[path].scripts) { -%>
|
|
<% allScripts = allScripts.concat(ctx._data[path].scripts) -%>
|
|
<% } -%>
|
|
<% if (ctx._data[path] && ctx._data[path].styles) { -%>
|
|
<% allStyles = allStyles.concat(ctx._data[path].styles) -%>
|
|
<% } -%>
|
|
<% } -%>
|
|
<% ctx = ctx[path] -%>
|
|
<% } -%>
|
|
|
|
<head>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<% if (typeof title != 'undefined') { -%>
|
|
<title><%= site %>: <%= title %></title>
|
|
<% } else { -%>
|
|
<title><%= site %></title>
|
|
<% } -%>
|
|
|
|
<link rel="icon" type="image/gif" href="/images/favicon.gif">
|
|
|
|
<% for (var i in allStyles) { -%>
|
|
<link rel="stylesheet" href="<%= allStyles[i] %>">
|
|
<% } -%>
|
|
|
|
<link rel="author" type="text/plain" href="/humans.txt">
|
|
<link rel="alternate" type="application/rss+xml" href="/feed.xml" title="<%= site %>">
|
|
|
|
<script type="text/javascript">
|
|
(function(d) {
|
|
var config = {
|
|
kitId: 'tcm1whv',
|
|
scriptTimeout: 3000
|
|
},
|
|
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='//use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
|
|
})(document);
|
|
</script>
|
|
|
|
<script>
|
|
if (typeof console === 'undefined') {
|
|
console = { log: function() {} }
|
|
}
|
|
window.SJS = {
|
|
ready: function(fn) {
|
|
if (document.addEventListener) {
|
|
document.addEventListener('DOMContentLoaded', fn, false)
|
|
} else if (window.attachEvent) {
|
|
window.attachEvent('onload', fn)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<% var bodyClasses = current.path -%>
|
|
<body class="<%= bodyClasses.join(' ') %>">
|
|
|
|
<header class="primary">
|
|
<div class="title">
|
|
<h1><a href="/"><%= site %></a></h1>
|
|
<br>
|
|
<h4>By <a href="/about"><%= author %></a></h4>
|
|
</div>
|
|
|
|
<nav>
|
|
<ul>
|
|
<li><a href="/archive">Archive</a></li>
|
|
<li><a href="/projects">Projects</a></li>
|
|
<li class="email"><a href="mailto:sami@samhuri.net"><i class="fa fa-envelope"></i></a></li>
|
|
<li class="rss"><a href="/feed.xml"><i class="fa fa-rss"></i></a></li>
|
|
<li class="twitter"><a href="https://twitter.com/_sjs"><i class="fa fa-twitter"></i></a></li>
|
|
<li class="github"><a href="https://github.com/samsonjs"><i class="fa fa-github"></i></a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="clearfix"></div>
|
|
</header>
|
|
|
|
<% if (typeof link != 'undefined') { -%>
|
|
<article class="container">
|
|
<header>
|
|
<h2><a href="<%= link %>">→ <%= title %></a></h2>
|
|
<time><%= date %></time>
|
|
<a class="permalink" href="<%= url %>">∞</a>
|
|
</header>
|
|
<%- yield %>
|
|
</article>
|
|
<div class="row clearfix">
|
|
<p class="fin clearfix"><i class="fa fa-code"></i></p>
|
|
</div>
|
|
<% } else if (typeof date != 'undefined') { -%>
|
|
<article class="container">
|
|
<header>
|
|
<h2><a href="<%= url %>"><%= title %></a></h2>
|
|
<time><%= date %></time>
|
|
</header>
|
|
<%- yield %>
|
|
</article>
|
|
<div class="row clearfix">
|
|
<p class="fin"><i class="fa fa-code"></i></p>
|
|
</div>
|
|
<% } else if (typeof title != 'undefined') { -%>
|
|
<article class="container">
|
|
<h2><%= title %></h2>
|
|
<%- yield %>
|
|
</article>
|
|
<div class="row clearfix">
|
|
<p class="fin"><i class="fa fa-code"></i></p>
|
|
</div>
|
|
<% } else { -%>
|
|
<%- yield %>
|
|
<% } -%>
|
|
|
|
<footer class="container">
|
|
© 2006 - <%= new Date().getFullYear() %> <a href="/about"><%= author %></a>
|
|
</footer>
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
var css = document.createElement('link');
|
|
css.href = '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css';
|
|
css.rel = 'stylesheet';
|
|
css.type = 'text/css';
|
|
document.getElementsByTagName('head')[0].appendChild(css);
|
|
})();
|
|
</script>
|
|
|
|
<% for (var i in allScripts) { -%>
|
|
<script defer src="<%= allScripts[i] %>"></script>
|
|
<% } -%>
|
|
|
|
<script>
|
|
var _gaq = _gaq || []
|
|
_gaq.push( ['_setAccount', 'UA-214054-5']
|
|
, ['_trackPageview']
|
|
)
|
|
|
|
;(function() {
|
|
var ga = document.createElement('script')
|
|
ga.type = 'text/javascript'
|
|
ga.async = true
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'
|
|
var s = document.getElementsByTagName('script')[0]
|
|
s.parentNode.insertBefore(ga, s)
|
|
}())
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|