Add "embed" css/js bundles

openid
Marcin Kulik 11 years ago
parent d1dcd08861
commit f22837f4e9

@ -0,0 +1,2 @@
//= require application
//= require player

@ -0,0 +1,4 @@
//= require player
body.iframe
background-color: transparent

@ -18,9 +18,6 @@ $color5: #edc951
right: 0
bottom: 0
body.iframe
background-color: transparent
.player
// float: left;
display: block

@ -1,11 +1,11 @@
<%= player @asciicast %>
<script>
= player @asciicast
javascript:
$(function() {
var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
if (typeof target != "undefined" && window !== window.parent) {
var w = $('.player').css('width');
var h = $('.player').css('height');
target.postMessage(['asciicast:size', { id: <%= @asciicast.id %>, width: w, height: h }], '*');
target.postMessage(['asciicast:size', { id: #{@asciicast.id}, width: w, height: h }], '*');
}
});
</script>

@ -3,9 +3,8 @@ html[lang="en"]
head
meta[charset="utf-8"]
title = page_title
= stylesheet_link_tag "player", :media => "all"
= javascript_include_tag "application"
= javascript_include_tag "player"
= stylesheet_link_tag 'embed', :media => 'all'
= javascript_include_tag 'embed'
script
| window.unpackWorkerPath = '#{javascript_path "unpack_worker"}';
window.mainWorkerPath = '#{javascript_path "main_worker"}';

@ -43,7 +43,7 @@ AsciiIo::Application.configure do
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
config.assets.precompile += %w( player.css player.js unpack_worker.js main_worker.js )
config.assets.precompile += %w( player.css player.js unpack_worker.js main_worker.js embed.css embed.js )
config.action_mailer.delivery_method = :sendmail

Loading…
Cancel
Save