mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
139 lines
3.7 KiB
Text
139 lines
3.7 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>
|
|
|
|
<% if (typeof title != 'undefined') { -%>
|
|
<title><%= title %> - <%= site %></title>
|
|
<% } else { -%>
|
|
<title><%= site %></title>
|
|
<% } -%>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link rel="icon" type="image/gif" href="/images/s.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>
|
|
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>
|
|
|
|
<body>
|
|
|
|
<header class="primary">
|
|
<div class="title">
|
|
<h1><a href="/"><%= site %></a></h1>
|
|
<br>
|
|
<h4>By <%= author %></h4>
|
|
</div>
|
|
|
|
<nav>
|
|
<ul>
|
|
<li><a href="/archive">Archive</a></li>
|
|
<li><a href="/projects">Projects</a></li>
|
|
<li><a href="/feed.xml">RSS</a></li>
|
|
<li><a href="https://twitter.com/_sjs">Twitter</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>
|
|
</header>
|
|
<%- yield %>
|
|
<p><a class="permalink" href="<%= url %>">∞</a></p>
|
|
</article>
|
|
<% } else if (typeof date != 'undefined') { -%>
|
|
<article class="container">
|
|
<header>
|
|
<h2><a href="<%= url %>"><%= title %></a></h2>
|
|
<time><%= date %></time>
|
|
</header>
|
|
<%- yield %>
|
|
</article>
|
|
<% } else if (typeof title != 'undefined') { -%>
|
|
<div class="container">
|
|
<h2><%= title %></h2>
|
|
<%- yield %>
|
|
<div class="clearfix">
|
|
</div>
|
|
<% } else { -%>
|
|
<div class="container">
|
|
<%- yield %>
|
|
<div class="clearfix">
|
|
</div>
|
|
<% } -%>
|
|
|
|
<footer class="container">
|
|
© 2006 - <%= new Date().getFullYear() %> <a href="mailto:<%= email %>"><%= author %></a>
|
|
</footer>
|
|
|
|
<% for (var i in allScripts) { -%>
|
|
<script 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>
|