Permalink
Browse files

start to getting rid of JS

  • Loading branch information...
1 parent 9cc35a0 commit 732a9e5ca04ab1e69eb1886de1d28020623e143a @Carreau Carreau committed Sep 1, 2012
Showing with 32 additions and 9,178 deletions.
  1. +1 −1 Makefile
  2. +5 −5 gist.py
  3. +3 −0 githubapp.py
  4. +0 −3 hlog
  5. +0 −108 static/404.html
  6. +0 −109 static/500.html
  7. +0 −44 static/build/index.js
  8. +0 −93 static/build/node_modules/.bin/hulk
  9. +0 −1 static/build/node_modules/hogan.js/.git_ignore
  10. +0 −3 static/build/node_modules/hogan.js/.gitmodules
  11. +0 −177 static/build/node_modules/hogan.js/LICENSE
  12. +0 −62 static/build/node_modules/hogan.js/Makefile
  13. +0 −93 static/build/node_modules/hogan.js/README.md
  14. +0 −93 static/build/node_modules/hogan.js/bin/hulk
  15. +0 −348 static/build/node_modules/hogan.js/lib/compiler.js
  16. +0 −20 static/build/node_modules/hogan.js/lib/hogan.js
  17. +0 −233 static/build/node_modules/hogan.js/lib/template.js
  18. +0 −20 static/build/node_modules/hogan.js/package.json
  19. +0 −8 static/build/node_modules/hogan.js/test/html/list.html
  20. +0 −13 static/build/node_modules/hogan.js/test/index.html
  21. +0 −848 static/build/node_modules/hogan.js/test/index.js
  22. +0 −90 static/build/node_modules/hogan.js/test/mustache.js
  23. +0 −77 static/build/node_modules/hogan.js/test/spec.js
  24. +0 −31 static/build/node_modules/hogan.js/test/spec/Changes
  25. +0 −65 static/build/node_modules/hogan.js/test/spec/README.md
  26. +0 −27 static/build/node_modules/hogan.js/test/spec/Rakefile
  27. +0 −46 static/build/node_modules/hogan.js/test/spec/TESTING.md
  28. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/comments.json
  29. +0 −103 static/build/node_modules/hogan.js/test/spec/specs/comments.yml
  30. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/delimiters.json
  31. +0 −158 static/build/node_modules/hogan.js/test/spec/specs/delimiters.yml
  32. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/interpolation.json
  33. +0 −230 static/build/node_modules/hogan.js/test/spec/specs/interpolation.yml
  34. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/inverted.json
  35. +0 −193 static/build/node_modules/hogan.js/test/spec/specs/inverted.yml
  36. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/partials.json
  37. +0 −109 static/build/node_modules/hogan.js/test/spec/specs/partials.yml
  38. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/sections.json
  39. +0 −256 static/build/node_modules/hogan.js/test/spec/specs/sections.yml
  40. +0 −1 static/build/node_modules/hogan.js/test/spec/specs/~lambdas.json
  41. +0 −149 static/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml
  42. +0 −8 static/build/node_modules/hogan.js/test/templates/list.mustache
  43. +0 −74 static/build/node_modules/hogan.js/tools/release.js
  44. +0 −32 static/build/node_modules/hogan.js/tools/web_templates.js
  45. +0 −500 static/build/node_modules/hogan.js/web/1.0.0/hogan.js
  46. +0 −14 static/build/node_modules/hogan.js/web/1.0.0/hogan.min.js
  47. +0 −500 static/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js
  48. +0 −14 static/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js
  49. +0 −545 static/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js
  50. +0 −5 static/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js
  51. +0 −576 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js
  52. +0 −576 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js
  53. +0 −572 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js
  54. +0 −5 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js
  55. +0 −5 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js
  56. +0 −5 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js
  57. +0 −5 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js
  58. +0 −619 static/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js
  59. +0 −233 static/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js
  60. +0 −5 static/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js
  61. BIN static/build/node_modules/hogan.js/web/favicon.ico
  62. BIN static/build/node_modules/hogan.js/web/images/logo.png
  63. BIN static/build/node_modules/hogan.js/web/images/noise.png
  64. BIN static/build/node_modules/hogan.js/web/images/small-hogan-icon.png
  65. BIN static/build/node_modules/hogan.js/web/images/stripes.png
  66. +0 −138 static/build/node_modules/hogan.js/web/index.html.mustache
  67. +0 −206 static/build/node_modules/hogan.js/web/stylesheets/layout.css
  68. +0 −236 static/build/node_modules/hogan.js/web/stylesheets/skeleton.css
  69. +0 −21 static/build/node_modules/hogan.js/wrappers/amd.js.mustache
  70. +0 −21 static/build/node_modules/hogan.js/wrappers/common.js.mustache
  71. +0 −17 static/build/node_modules/hogan.js/wrappers/js.mustache
  72. +0 −64 static/build/node_modules/hogan.js/wrappers/mustache.js.mustache
  73. +0 −6 static/build/package.json
  74. +0 −137 static/index.html
  75. +1 −1 static/js/bootstrap.min.js
  76. +0 −108 static/unknown_filetype.html
  77. +5 −2 templates/{pages/404.mustache → 404.html}
  78. +4 −2 templates/{pages/500.mustache → 500.html}
  79. +9 −2 templates/{pages/index.mustache → index.html}
  80. +0 −99 templates/layout.mustache
  81. +4 −2 templates/{pages/unknown_filetype.mustache → unknown_filetype.html}
View
@@ -10,6 +10,7 @@ HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\
#
# BUILD DOCS
#
+.PHONY: build
build:
@echo "\n${HR}"
@@ -21,7 +22,6 @@ build:
@recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
@recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
@echo "Compiling LESS with Recess... ${CHECK} Done"
- @node static/build
@cp img/* static/img/
@cp js/*.js static/js/
@cp js/tests/vendor/jquery.js static/js/
View
10 gist.py
@@ -42,7 +42,7 @@ def static(strng) :
@app.route('/')
def hello():
- return static('index.html')
+ return render_template('index.html')
@app.route('/assets/<path:path>')
@@ -52,12 +52,12 @@ def sitemap(path):
@app.errorhandler(500)
-def page_not_found(error):
- return static('500.html'),500
+def internal_error(error):
+ return render_template('500.html'),500
@app.errorhandler(404)
def page_not_found(error):
- return static('404.html'),404
+ return render_template('404.html'),404
@app.route('/404')
def four_o_foru():
@@ -83,7 +83,7 @@ def create(v=None):
if value.startswith('http://') and value.endswith('.ipynb'):
return redirect('/url/'+value[7:])
- return static('unknown_filetype.html')
+ return render_template('unknown_filetype.html')
#https !
@cachedfirstparam
View
@@ -65,6 +65,9 @@ def dummy1(user,repo,tree,branch):
#return open('static/%s/%s/%s'%(repo,tree,branch)).read()
return browse_tree_blob(user,repo,tree,branch,None)
+@app.errorhandler(500)
+def internal_error(error):
+ return render_template('500.html'),500
#@app.route('/<user>/<repo>/tree/<branch>/<path:subfile>')
def bowse_tree(user,repo,branch,subfile, parent=None):
View
3 hlog
@@ -1,3 +0,0 @@
-Creating secret-sands-6966... done, stack is cedar
-http://secret-sands-6966.herokuapp.com/ | git@heroku.com:secret-sands-6966.git
-Git remote heroku added
View
@@ -1,108 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>404 · nbviewer</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="">
-
- <!-- Le styles -->
- <link href="/static/css/bootstrap.css" rel="stylesheet">
- <link href="/static/css/bootstrap-responsive.css" rel="stylesheet">
- <link href="/static/css/docs.css" rel="stylesheet">
- <link href="/static/js/google-code-prettify/prettify.css" rel="stylesheet">
-
- <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
- <!-- Le fav and touch icons -->
- <link rel="shortcut icon" href="/static/ico/ipynb_icon_16x16.png">
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/ico/apple-touch-icon-144-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/ico/apple-touch-icon-114-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/ico/apple-touch-icon-72-precomposed.png">
- <link rel="apple-touch-icon-precomposed" href="/static/ico/apple-touch-icon-57-precomposed.png">
-
- </head>
-
- <body data-spy="scroll" data-target=".subnav" data-offset="50">
-
-
- <!-- Navbar
- ================================================== -->
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="brand" href="http://ipython.org">IPython</a>
- <div class="nav-collapse collapse">
- <ul class="nav">
- <li class="">
- <a href="/">Overview</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="container">
-
-<!-- Masthead
-================================================== -->
-<header class="jumbotron masthead">
- <div class="inner">
- <h1>404 : Not found ! </h1>
- <p>You are requesting a page that does not exist !</p>
- <p class="marketing-byline">Either in this server, or the remote url. please check again later...</p>
- </div>
-
- </header>
-
-
-<hr class="soften">
-
-
-
- <!-- Footer
- ================================================== -->
- <footer class="footer">
- <p class="pull-right"><a href="#">Back to top</a></p>
- <p>More info on <a href='http://ipython.org'> IPython website </a></p>
- <p>Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
- <p>Some icons from <a href="http://glyphicons.com">Glyphicons Free</a>, build thanks ot <a href="http://twitter.github.com/bootstrap/"> Twitter Bootstrap</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
- <p>This web site does not host notebooks, It only renders notebooks available on other websites.</p>
- </footer>
-
- </div><!-- /container -->
-
-
-
- <!-- Le javascript
- ================================================== -->
- <!-- Placed at the end of the document so the pages load faster -->
- <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
- <script src="/static/js/jquery.js"></script>
- <script src="/static/js/google-code-prettify/prettify.js"></script>
- <script src="/static/js/bootstrap-transition.js"></script>
- <script src="/static/js/bootstrap-alert.js"></script>
- <script src="/static/js/bootstrap-modal.js"></script>
- <script src="/static/js/bootstrap-dropdown.js"></script>
- <script src="/static/js/bootstrap-scrollspy.js"></script>
- <script src="/static/js/bootstrap-tab.js"></script>
- <script src="/static/js/bootstrap-tooltip.js"></script>
- <script src="/static/js/bootstrap-popover.js"></script>
- <script src="/static/js/bootstrap-button.js"></script>
- <script src="/static/js/bootstrap-collapse.js"></script>
- <script src="/static/js/bootstrap-carousel.js"></script>
- <script src="/static/js/bootstrap-typeahead.js"></script>
- <script src="/static/js/application.js"></script>
-
-
- </body>
-</html>
View
@@ -1,109 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <title>500 · nbviewer</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="">
- <meta name="author" content="">
-
- <!-- Le styles -->
- <link href="/static/css/bootstrap.css" rel="stylesheet">
- <link href="/static/css/bootstrap-responsive.css" rel="stylesheet">
- <link href="/static/css/docs.css" rel="stylesheet">
- <link href="/static/js/google-code-prettify/prettify.css" rel="stylesheet">
-
- <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
-
- <!-- Le fav and touch icons -->
- <link rel="shortcut icon" href="/static/ico/ipynb_icon_16x16.png">
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/ico/apple-touch-icon-144-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/ico/apple-touch-icon-114-precomposed.png">
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/ico/apple-touch-icon-72-precomposed.png">
- <link rel="apple-touch-icon-precomposed" href="/static/ico/apple-touch-icon-57-precomposed.png">
-
- </head>
-
- <body data-spy="scroll" data-target=".subnav" data-offset="50">
-
-
- <!-- Navbar
- ================================================== -->
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <button type="button"class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="brand" href="http://ipython.org">IPython</a>
- <div class="nav-collapse collapse">
- <ul class="nav">
- <li class="">
- <a href="/">Overview</a>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="container">
-
-<!-- Masthead
-================================================== -->
-<header class="jumbotron masthead">
- <div class="inner">
- <h1>500 : Server error ! </h1>
- <p>You Broke The internet !</p>
- <p class="marketing-byline">Kidding, you might just have crash the web process it'll just take a few second to restart. </p>
- <p class="marketing-byline"> If this is reproducible, please send us a bug repport ! </p>
- </div>
-
- </header>
-
-
-<hr class="soften">
-
-
-
- <!-- Footer
- ================================================== -->
- <footer class="footer">
- <p class="pull-right"><a href="#">Back to top</a></p>
- <p>More info on <a href='http://ipython.org'> IPython website </a></p>
- <p>Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
- <p>Some icons from <a href="http://glyphicons.com">Glyphicons Free</a>, build thanks ot <a href="http://twitter.github.com/bootstrap/"> Twitter Bootstrap</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
- <p>This web site does not host notebooks, It only renders notebooks available on other websites.</p>
- </footer>
-
- </div><!-- /container -->
-
-
-
- <!-- Le javascript
- ================================================== -->
- <!-- Placed at the end of the document so the pages load faster -->
- <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
- <script src="/static/js/jquery.js"></script>
- <script src="/static/js/google-code-prettify/prettify.js"></script>
- <script src="/static/js/bootstrap-transition.js"></script>
- <script src="/static/js/bootstrap-alert.js"></script>
- <script src="/static/js/bootstrap-modal.js"></script>
- <script src="/static/js/bootstrap-dropdown.js"></script>
- <script src="/static/js/bootstrap-scrollspy.js"></script>
- <script src="/static/js/bootstrap-tab.js"></script>
- <script src="/static/js/bootstrap-tooltip.js"></script>
- <script src="/static/js/bootstrap-popover.js"></script>
- <script src="/static/js/bootstrap-button.js"></script>
- <script src="/static/js/bootstrap-collapse.js"></script>
- <script src="/static/js/bootstrap-carousel.js"></script>
- <script src="/static/js/bootstrap-typeahead.js"></script>
- <script src="/static/js/application.js"></script>
-
-
- </body>
-</html>
View
@@ -1,44 +0,0 @@
-#!/usr/bin/env node
-var hogan = require('hogan.js')
- , fs = require('fs')
- , prod = process.argv[2] == 'production'
- , title = 'nbviewer'
-
-var layout, pages
-
-// compile layout template
-layout = fs.readFileSync(__dirname + '/../../templates/layout.mustache', 'utf-8')
-layout = hogan.compile(layout, { sectionTags: [{o:'_i', c:'i'}] })
-
-// retrieve pages
-pages = fs.readdirSync(__dirname + '/../../templates/pages')
-
-// iterate over pages
-pages.forEach(function (name) {
-
- if (!name.match(/\.mustache$/)) return
-
- var page = fs.readFileSync(__dirname + '/../../templates/pages/' + name, 'utf-8')
- , context = {}
-
- context[name.replace(/\.mustache$/, '')] = 'active'
- context._i = true
- context.production = prod
- context.title = name
- .replace(/\.mustache/, '')
- .replace(/\-.*/, '')
- .replace(/(.)/, function ($1) { return $1.toUpperCase() })
-
- if (context.title == 'Index') {
- context.title = title
- } else {
- context.title += ' · ' + title
- }
-
- page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] })
- page = layout.render(context, {
- body: page
- })
-
- fs.writeFileSync(__dirname + '/../' + name.replace(/mustache$/, 'html'), page, 'utf-8')
-})
Oops, something went wrong.

0 comments on commit 732a9e5

Please sign in to comment.