diff --git a/pandora/app/views.py b/pandora/app/views.py
index c2e0b90ca..6779fe3c9 100644
--- a/pandora/app/views.py
+++ b/pandora/app/views.py
@@ -22,6 +22,11 @@ def index(request):
return render_to_response('index.html', context)
+def embed(request):
+ context = RequestContext(request, {'settings': settings})
+ return render_to_response('embed.html', context)
+
+
def timeline(request):
context = RequestContext(request, {'settings': settings})
return render_to_response('timeline.html', context)
diff --git a/pandora/templates/embed.html b/pandora/templates/embed.html
new file mode 100644
index 000000000..d31089409
--- /dev/null
+++ b/pandora/templates/embed.html
@@ -0,0 +1,23 @@
+
+
+
+ {{settings.SITENAME}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pandora/urls.py b/pandora/urls.py
index 252ba4600..9500abef8 100644
--- a/pandora/urls.py
+++ b/pandora/urls.py
@@ -38,7 +38,9 @@ if settings.DEBUG:
(r'^tests/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.TESTS_ROOT}),
)
+
urlpatterns += patterns('',
+ (r'^.*?embed$', 'app.views.embed'),
(r'^[A-Z0-9].*$', 'app.views.index'),
(r'^$', 'app.views.index'),
)
diff --git a/static/js/pandora.embed.js b/static/js/pandora.embed.js
new file mode 100755
index 000000000..844d41988
--- /dev/null
+++ b/static/js/pandora.embed.js
@@ -0,0 +1,20 @@
+/***
+ Pandora embed
+***/
+
+var pandora = new Ox.App({
+ apiURL: '/api/',
+ config: '/site.json',
+ init: 'hello',
+}).launch(function(data) {
+ var d = $('').html('Pan.do/ra embed')
+ .css({'position': 'absolute',
+ 'padding-top': $(window).height()/4,
+ 'padding-left':$(window).width()/4});
+ $(document.body).append(d);
+ var d = $('
').html('here be unicorns')
+ .css({'position': 'absolute',
+ 'padding-top': $(window).height()/2,
+ 'padding-left':$(window).width()/2});
+ $(document.body).append(d);
+});