/
article.haml
131 lines (122 loc) · 3.62 KB
/
article.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#main
.article
:if article.version
%a.sha-version{ href: "/#{article.version}/#{article.name}" } Static Version
%h1
%a{href: "/" + article.name}&= article.title
= markdownEncode(article.markdown)
%hr{style:"clear:both"}
#disqus_thread.body
:script
var disqus_url = "http://howtonode.org/#{article.name}";
%script(src="http://disqus.com/forums/howtonodeorg/embed.js" type="text/javascript")
%a.view-thread(href="http://disqus.com/forums/howtonodeorg/?url=ref")
View the discussion thread.
%a.dsq-brlink(href="http://disqus.com")
blog comments powered by
%span.logo-disqus
Disqus
:script
(function() {
var links = document.getElementsByTagName('a');
var query = '?';
for(var i = 0; i < links.length; i++) {
if(links[i].href.indexOf('#disqus_thread') >= 0) {
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
}
}
document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/howtonodeorg/get_num_replies.js' + query + '"></' + 'script>');
})();
#sidebar
.aside.author
%h4 About the Author
%img.headshot{src: gravitar(author.email) }
%dl
%dt Name:
%dd&= author.name
:if author.github
%dl
%dt Github:
%dd= github(author.github)
:if author.bitbucket
%dl
%dt BitBucket:
%dd= bitbucket(author.bitbucket)
:if author.twitter
%dl
%dt Twitter:
%dd= twitter(author.twitter)
:if author.location
%dl
%dt Location:
%dd&= author.location
:if author.homepage
%dl
%dt Links:
%dd
%a{href: author.homepage} Homepage
.aside
%h4
About this Article
%a.twitter-share-button{href:"http://twitter.com/share",data-count:"horizontal",data-via:"creationix"}
Tweet
%script{src:"http://platform.twitter.com/widgets.js"}
:if article.date
%dl{title: article.date}
%dt
Date Released:
%dd
&= formatDate(article.date, "%A, %B %e, %Y")
:if article.lastUpdated
%dl{title: article.lastUpdated}
%dt
Last Updated:
%dd
&= formatDate(article.lastUpdated, "%A, %B %e, %Y")
:if article.node
%dl
%dt
Node Version:
%dd
%a{ href: "http://github.com/joyent/node/tree/" + article.node }
node #{article.node}
:if article.dependencies
%dl
%dt
Dependency Versions:
%dd
%ul
:each dependency in article.dependencies
%li
%a{ href: "http://github.com/creationix/haml-js/tree/8ea2df3a90ff488ed253d5872e0f4a387f393e5d" }
haml-js v0.2.2
:if article.uniqueSnippets
%dl
%dt
Code Samples:
%dd
%ul
:each base, snippet in article.uniqueSnippets
%li
%a{ href: snippet.filename}
&= base
%dl
%dt
Revisions:
%dd
%ul
:each version, stat in article.log
%li{title: stat.message}
%a{ href: "/#{version}/#{article.name}" }
&= new Date(stat.date).toUTCString()
:if article.related && article.related.length > 0
.bubble
%h4
Other Articles by this Author
%ul
:each related in article.related
%li
%a{href: "/" + related.name}&=related.title
:if related.node
%span.versiontag&= related.node
.bubble= markdownEncode(description)