extends ./module/layout.jade
block title
	title #{post.article.title}
	meta(charset='utf-8')
	meta(name="viewport" content="width=device-width, initial-scale=1, user-scalable=no")
	link(rel='stylesheet',type='text/css',href='/resource/css/base.css')
	link(rel='stylesheet',type='text/css',href='/resource/css/article.css')
	script(type='text/javascript',src='/resource/js/jquery-2.1.3.min.js')
block content
	div.content
		a.gohome.h-font(href='/') #{config.blogName}
		div.title_box
			h1.title.h-font #{post.article.title}
			h3.date.h-font #{post.article.year}-#{post.article.month}-#{post.article.day}
		div.article-entry !{post.article.html}
		div.page
			a.prev(href='#{post.article.prevArticle.link}') 上一篇 #{post.article.prevArticle.title}
			a.next(href='#{post.article.nextArticle.link}') 下一篇 #{post.article.nextArticle.title}
		- if (config.comments && config.duoshuo_shortname)
			div.comments
				div.ds-thread(data-thread-key='#{post.article.date}' data-title='#{post.article.title}' data-url='#{config.blogUrl}#{post.article.link}')
				script(type='text/javascript').
					var duoshuoQuery = {short_name:'#{config.duoshuo_shortname}'};
					(function() {
						var ds = document.createElement('script');
						ds.type = 'text/javascript';ds.async = true;
						ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
						ds.charset = 'UTF-8';
						(document.getElementsByTagName('head')[0] 
						|| document.getElementsByTagName('body')[0]).appendChild(ds);
					})();