-
local_url = current_page.metadata.page
-
url = local_url || current_page.url
-
title = current_page.metadata.page || locals # locals should be first but there’s a bug
-
description = locals || current_page.metadata.page
-
current_model = current_resource.metadata.models
-
isolated_url = !!extensions ? url.sub(//$/, ‘/isolated’) : url.sub(/.html$/, “-#{id}-isolated.html”)
article.glypto-model
.glypto-model-stage - if current_model.iframe iframe id="iframe-#{id}" src="#{url_for(isolated_url)}" frameborder="0" scrolling="no" - else figure = current_model.html = partial 'glyptotheque/model-utils', locals: { html: html, id: id, isolated_url: isolated_url } - unless locals[:iframe] - stylesheets = current_page.metadata.page[:stylesheet] || current_page.metadata.page[:stylesheets] || current_page.data[:stylesheet] || current_page.data[:stylesheets] - javascripts = current_page.metadata.page[:javascript] || current_page.metadata.page[:javascripts] || current_page.data[:javascript] || current_page.data[:javascripts] - current_js = include_javascripts(javascripts) - included_js = yield_content(:javascripts) - current_css = include_stylesheets(stylesheets) - included_css = yield_content(:stylesheets) - if current_css - unless (included_css && included_css.match(current_css)) - content_for :stylesheets, include_stylesheets(stylesheets) - if current_js - unless (included_js && included_js.match(current_js)) - content_for :javascripts, current_js