|
| 1 | + |
| 2 | +<!doctype html> |
| 3 | +<html> |
| 4 | + <head> |
| 5 | + <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"/> |
| 6 | + <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css"/> |
| 7 | + <link rel="stylesheet" href="http://node-os.com/css/default.css"/> |
| 8 | + |
| 9 | + <script type="application/javascript" src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script> |
| 10 | + <script type="text/javascript" src="/api.min.js"></script> |
| 11 | + <style> |
| 12 | + .more {display:none} |
| 13 | + #articles img{max-width:100%} |
| 14 | + #articles article .title img{height:50px} |
| 15 | + </style> |
| 16 | + </head> |
| 17 | + <body> |
| 18 | + <header class="navbar navbar-default navbar-fixed-top" role="navigation"> |
| 19 | + |
| 20 | + <!-- Brand and toggle get grouped for better mobile display --> |
| 21 | + <div class="navbar-header"> |
| 22 | + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> |
| 23 | + <span class="sr-only">Toggle navigation</span> |
| 24 | + <span class="icon-bar"></span> |
| 25 | + <span class="icon-bar"></span> |
| 26 | + <span class="icon-bar"></span> |
| 27 | + </button> |
| 28 | + <a class="navbar-brand" href="http://node-os.com">NodeOS</a> |
| 29 | + </div> |
| 30 | + |
| 31 | + <!-- Collect the nav links, forms, and other content for toggling --> |
| 32 | + <div class="collapse navbar-collapse navbar-ex1-collapse"> |
| 33 | + <ul class="nav navbar-nav"> |
| 34 | + <li> |
| 35 | + <a href="http://node-os.com/blog">Blog</a> |
| 36 | + </li> |
| 37 | + <li> |
| 38 | + <a href="http://npkg.org">npkg.org</a> |
| 39 | + </li> |
| 40 | + </ul> |
| 41 | + </div> |
| 42 | + <!-- /.navbar-collapse --> |
| 43 | + |
| 44 | + </header> |
| 45 | + |
| 46 | + <!-- START: ISSUES ITEM TEMPLATE --> |
| 47 | + <section ng-app="NodeOsBlog" id="articles" class="section"> |
| 48 | + |
| 49 | + <div class="container error"> |
| 50 | + </div> |
| 51 | + <script type="text/html" class="template error"> |
| 52 | + <article class="row" data-unique="{{unique}}"> |
| 53 | + <div class="col-sm-8 col-sm-offset-2 {{class}}" > |
| 54 | + <header class="alert alert-danger" role="alert"> |
| 55 | + <h3 class="title">{{name}}</h3> |
| 56 | + <a href="#" class="remove">To remove this message, click here</a> |
| 57 | + </header> |
| 58 | + <div class="content">{{{message}}}</div> |
| 59 | + <footer> |
| 60 | + Don't worry, it probably was not your fault... probably...<br/> |
| 61 | + Even if it was, |
| 62 | + <a target="_blank" href="https://github.com/formula1/NodeOS-Blog/issues">just submit an issue :)</a> |
| 63 | + </footer> |
| 64 | + </div> |
| 65 | + </article> |
| 66 | + </script> |
| 67 | + |
| 68 | + <div id="westoredata" class="jumbotron"> |
| 69 | + <h1>We store data on your computer</h1> |
| 70 | + <div> |
| 71 | + <p> |
| 72 | + If you login: We store your access token we retrieve from github on your computer as a cookie. |
| 73 | + <a href="https://github.com/formula1/AuthProvider/blob/master/index.js#L87">See the Code</a> |
| 74 | + </p> |
| 75 | + <p class="more"> |
| 76 | + This is done so that we can access the github api in a verified manner.<br/> |
| 77 | + This is purely optional and we never use your user information.<br/> |
| 78 | + This is done to avoid server operations. |
| 79 | + </p> |
| 80 | + <p> |
| 81 | + By Using the Blog: We store data we get from github on your available local storage. |
| 82 | + <a href="https://github.com/formula1/NodeOS-Blog/blob/master/html/footerjs/cacheOrLoad.js#L38">See the Code</a> |
| 83 | + </p> |
| 84 | + <p class="more" > |
| 85 | + This is done so that you may avoid as many calls to github as possible.<br/> |
| 86 | + Without this, you would have to request github every time you wanted to view a page.<br/> |
| 87 | + This is not optional. |
| 88 | + </p> |
| 89 | + </div> |
| 90 | + <p> |
| 91 | + <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a> |
| 92 | + </p> |
| 93 | + </div> |
| 94 | + |
| 95 | + <div class="container blogsingle" ></div> |
| 96 | +<script type="text/html" class="template blogsingle" > |
| 97 | + <article class="row"> |
| 98 | + <div class="col-sm-8 col-sm-offset-2"> |
| 99 | + <header class="{{state}}"> |
| 100 | + <h3 class="title"> |
| 101 | + <a href="article.html#!{{number}}">{{title}}</a> |
| 102 | + </h3> |
| 103 | + <a href="{{html_url}}">View on Github</a> |
| 104 | + </header> |
| 105 | + <div class="content" >{{{bodyHTML}}}</div> |
| 106 | + </div> |
| 107 | + </article> |
| 108 | +</script> |
| 109 | + |
| 110 | +<div class="container comments" ></div> |
| 111 | +<script type="text/html" class="template comments"> |
| 112 | + <article class="row"> |
| 113 | + <div class="col-sm-8 col-sm-offset-2"> |
| 114 | + <header class="{{state}}"> |
| 115 | + <h3 class="title"> |
| 116 | + <a href="{{user.html_url}}"> |
| 117 | + <img src="{{user.avatar_url}}"/> |
| 118 | + <span>{{user.login}}</span> |
| 119 | + </a> |
| 120 | + </h3> |
| 121 | + <a href="{{html_url}}">View on Github</a> |
| 122 | + </header> |
| 123 | + <div class="content">{{{bodyHTML}}}</div> |
| 124 | + </div> |
| 125 | + </article> |
| 126 | +</script> |
| 127 | + |
| 128 | + </section> |
| 129 | + <!-- END: ISSUES ITEM TEMPLATE --> |
| 130 | + |
| 131 | + <div class="section inverse trampstamp"> |
| 132 | + <div class="row"> |
| 133 | + <div class="col-xs-12"> |
| 134 | + <img src="http://node-os.com/images/nodeos-update.png"> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + |
| 139 | + <footer> |
| 140 | + <div class="container" id="footer"> |
| 141 | + <div class="row"> |
| 142 | + <div class="col-sm-7"> |
| 143 | + <h3 class="footer-title">Share</h3> |
| 144 | + <p>NodeOS is a work in progress.</p> |
| 145 | + <p>If you would like to support us, please share NodeOS via Twitter</p> |
| 146 | + <p class="pvl"> |
| 147 | + <a href="https://twitter.com/TheNodeOS" |
| 148 | + class="twitter-follow-button" |
| 149 | + data-show-count="false" |
| 150 | + data-size="large">Follow @TheNodeOS</a> |
| 151 | + <script type="text/javascript"> |
| 152 | + (function(d,s,id){ |
| 153 | + var js; |
| 154 | + fjs=d.getElementsByTagName(s)[0]; |
| 155 | + p= /^http\:/.test(d.location)?'http':'https'; |
| 156 | + if(!d.getElementById(id)){ |
| 157 | + js=d.createElement(s); |
| 158 | + js.id=id; |
| 159 | + js.src=p+'://platform.twitter.com/widgets.js'; |
| 160 | + fjs.parentNode.insertBefore(js,fjs); |
| 161 | + } |
| 162 | + })(document, 'script', 'twitter-wjs'); |
| 163 | + </script> |
| 164 | + <a href="https://twitter.com/share" |
| 165 | + class="twitter-share-button" |
| 166 | + data-url="http://node-os.com/blog/OS-flavors" |
| 167 | + data-text="NodeOS - The NodeJS Powered Operating System" |
| 168 | + data-via="TheNodeOS" data-size="large">Tweet</a> |
| 169 | + </p> |
| 170 | + </div> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | + </footer> |
| 174 | + |
| 175 | + <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
| 176 | + <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> |
| 177 | + |
| 178 | + <!-- START: BIND DATA TO VIEW --> |
| 179 | + <script type="text/javascript" src="/js/cacheOrLoad.js"></script> |
| 180 | + <script type="text/javascript" src="/js/template.js"></script> |
| 181 | + <script type="text/javascript" src="/js/utility.js"></script> |
| 182 | + <script type="text/javascript" src="/js/error.js"></script> |
| 183 | + <script type="text/javascript" src="/js/user.js"></script> |
| 184 | + |
| 185 | + <script type="text/javascript"> |
| 186 | + var num = (function(){ |
| 187 | + var temp = document.location.href.split("#!")[1]; |
| 188 | + console.log(temp); |
| 189 | + if(/[0-9]+/.test(temp)) return temp; |
| 190 | + temp = document.location.href.split("?"); |
| 191 | + if(temp.length == 1){ |
| 192 | + return add404(); |
| 193 | + } |
| 194 | + temp = require("querystring").parse(temp[1]); |
| 195 | + if(!temp._escaped_fragment_){ |
| 196 | + return add404(); |
| 197 | + } |
| 198 | + return temp._escaped_fragment_; |
| 199 | +})(); |
| 200 | + |
| 201 | +var singleHandler; |
| 202 | + |
| 203 | +jQuery(function($){ |
| 204 | + if(!num) return; |
| 205 | + singleHandler = new Template( |
| 206 | + "script.template.blogsingle", |
| 207 | + "div.container.blogsingle" |
| 208 | + ); |
| 209 | + singleHandler._x = { |
| 210 | + uri: "https://api.github.com/repos/NodeOS/NodeOS/issues/"+num, |
| 211 | + last: void(0) |
| 212 | + }; |
| 213 | + cacheOrUriIterator( |
| 214 | + "issue-"+num, |
| 215 | + { |
| 216 | + timestamp2URI: function(timestamp,next){ |
| 217 | + if(Date.now() - timestamp < 1000*60*60*24) return; |
| 218 | + user.asAuthority(singleHandler._x.uri,next); |
| 219 | + }, |
| 220 | + prep: function(item, next){ |
| 221 | + item.timestamp = Date.now(); |
| 222 | + var l = item.labels.length; |
| 223 | + while(l--){ |
| 224 | + if(item.labels[l].name === "blog"){ |
| 225 | + break; |
| 226 | + } |
| 227 | + } |
| 228 | + if(l < 0){ |
| 229 | + return addError({ |
| 230 | + name:"Trying to load a non-blog?", |
| 231 | + message: "I technically can't stop you since this is clientside."+ |
| 232 | + " Hopefully my code feels clean enough to hack" |
| 233 | + }); |
| 234 | + } |
| 235 | + parseMarkdown(item,next); |
| 236 | + }, |
| 237 | + ready: function(item,next){ |
| 238 | + singleHandler.add(item); |
| 239 | + next(); |
| 240 | + }, |
| 241 | + done: function(date){ |
| 242 | + singleHandler._x.last = date; |
| 243 | + }, |
| 244 | + error: function(error){ |
| 245 | + if(error.status && error.status === 403){ |
| 246 | + add403(); |
| 247 | + }else{ |
| 248 | + addError(error); |
| 249 | + } |
| 250 | + } |
| 251 | + } |
| 252 | + ); |
| 253 | +}); |
| 254 | + |
| 255 | + |
| 256 | +var commentHandler; |
| 257 | + |
| 258 | +jQuery(function($){ |
| 259 | + if(!num) return; |
| 260 | + commentHandler = new Template( |
| 261 | + "script.template.comments", |
| 262 | + "div.container.comments" |
| 263 | + ); |
| 264 | + commentHandler._x = { |
| 265 | + uri: "https://api.github.com/repos/NodeOS/NodeOS/issues/"+num+"/comments", |
| 266 | + last: void(0) |
| 267 | + }; |
| 268 | + cacheOrUriIterator( |
| 269 | + "issue-comments-"+num, |
| 270 | + { |
| 271 | + timestamp2URI: function(timestamp,next){ |
| 272 | + var uri = commentHandler._x.uri; |
| 273 | + if(timestamp) { |
| 274 | + uri += "?since="+(new Date(timestamp+1000)).toISOString(); |
| 275 | + } |
| 276 | + user.asAuthority(uri,next); |
| 277 | + }, |
| 278 | + prep: function(item, next){ |
| 279 | + item.timestamp = (new Date(item.created_at)).getTime(); |
| 280 | + parseMarkdown(item,next); |
| 281 | + }, |
| 282 | + ready: function(item,next){ |
| 283 | + commentHandler.add(item); |
| 284 | + setTimeout(next,1); |
| 285 | + }, |
| 286 | + done: function(date){ |
| 287 | + commentHandler._x.last = date; |
| 288 | + }, |
| 289 | + error: function(error){ |
| 290 | + if(error.status && error.status === 403){ |
| 291 | + add403(); |
| 292 | + }else{ |
| 293 | + addError(error); |
| 294 | + } |
| 295 | + } |
| 296 | + } |
| 297 | + ); |
| 298 | +}); |
| 299 | + |
| 300 | + </script> |
| 301 | + <!-- END: BIND DATA TO VIEW --> |
| 302 | + |
| 303 | + </body> |
| 304 | +</html> |
| 305 | + |
0 commit comments