Sha256: ef7c0b24ce85f902e7f13b45ddf08d737d624f91a088beead51e547ff31eadc7

Contents?: true

Size: 1.55 KB

Versions: 29

Compression:

Stored size: 1.55 KB

Contents

<!DOCTYPE html>
<html>
<head>
  <title><%= yield(:title) %></title>

  <script src="//cdn.shopify.com/s/assets/external/app.js?<%= Time.now.strftime('%Y%m%d%H') %>"></script>
  <script type="text/javascript">
    // Initialise the Shopify App.
    ShopifyApp.init({
      "apiKey": "<%= ShopifyApp.configuration.api_key %>",
      "shopOrigin": "<%= "https://#{ @shop_session.url }" if @shop_session %>",
      "debug": <%= Rails.env.development? ? 'true' : 'false' %>
    });
  </script>

  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>

  <%= csrf_meta_tags %>

  <%= yield :extra_head %>
</head>
<body>
  <script type="text/javascript">
    window.DiscoApp = {
      INITIAL_TITLE: "<%= yield(:title) %>",
      INITIAL_ICON: "<%= image_url("disco_app/icon.svg") %>",
      INITIAL_BUTTONS: <%= content_for?(:buttons) ? content_for(:buttons) : '{}' %>,
      INITIAL_BREADCRUMB: <%= content_for?(:breadcrumb) ? content_for(:breadcrumb) : 'undefined' %>
    };
    ShopifyApp.Bar.initialize({
      title: DiscoApp.INITIAL_TITLE,
      icon: DiscoApp.INITIAL_ICON,
      buttons: DiscoApp.INITIAL_BUTTONS,
      breadcrumb: DiscoApp.INITIAL_BREADCRUMB
    });
  </script>

  <%= yield %>

  <% flash.each do |key, message| %>
  <script type="text/javascript">
    ShopifyApp.flash<%= (key == 'error') ? 'Error' : 'Notice' %>('<%= message %>');
  </script>
  <% end %>

  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true, 'data-turbolinks-eval' => false %>

  <%= render 'disco_app/shared/icons' %>
</body>
</html>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release app/views/layouts/embedded_app.html.erb
disco_app-0.11.0 app/views/layouts/embedded_app.html.erb
disco_app-0.11.1 app/views/layouts/embedded_app.html.erb
disco_app-0.12.0 app/views/layouts/embedded_app.html.erb
disco_app-0.12.1 app/views/layouts/embedded_app.html.erb
disco_app-0.12.5 app/views/layouts/embedded_app.html.erb
disco_app-0.12.6 app/views/layouts/embedded_app.html.erb
disco_app-0.12.7 app/views/layouts/embedded_app.html.erb
disco_app-0.13.0 app/views/layouts/embedded_app.html.erb
disco_app-0.13.1 app/views/layouts/embedded_app.html.erb
disco_app-0.13.2 app/views/layouts/embedded_app.html.erb
disco_app-0.13.3 app/views/layouts/embedded_app.html.erb
disco_app-0.13.4 app/views/layouts/embedded_app.html.erb
disco_app-0.13.5 app/views/layouts/embedded_app.html.erb
disco_app-0.13.6 app/views/layouts/embedded_app.html.erb
disco_app-0.13.7 app/views/layouts/embedded_app.html.erb
disco_app-0.13.8 app/views/layouts/embedded_app.html.erb
disco_app-0.14.1 app/views/layouts/embedded_app.html.erb
disco_app-0.14.2 app/views/layouts/embedded_app.html.erb
disco_app-0.15.0 app/views/layouts/embedded_app.html.erb