guide 0.0.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +22 -0
- data/README.rdoc +3 -0
- data/Rakefile +26 -0
- data/app/assets/javascripts/guide/application.js +21723 -0
- data/app/assets/javascripts/guide/scenario.js +12642 -0
- data/app/assets/stylesheets/guide/application.css +141 -0
- data/app/controllers/guide/base_controller.rb +83 -0
- data/app/controllers/guide/nodes_controller.rb +40 -0
- data/app/controllers/guide/scenarios_controller.rb +44 -0
- data/app/helpers/guide/application_helper.rb +4 -0
- data/app/helpers/guide/document_helper.rb +20 -0
- data/app/models/guide/arborist.rb +44 -0
- data/app/models/guide/bouncer.rb +34 -0
- data/app/models/guide/cartographer.rb +49 -0
- data/app/models/guide/content.rb +28 -0
- data/app/models/guide/default_authentication_system.rb +13 -0
- data/app/models/guide/default_authorisation_system.rb +18 -0
- data/app/models/guide/diplomat.rb +60 -0
- data/app/models/guide/document.rb +20 -0
- data/app/models/guide/endpoint_stocktaker.rb +94 -0
- data/app/models/guide/errors.rb +2 -0
- data/app/models/guide/errors/base.rb +6 -0
- data/app/models/guide/errors/interface_violation.rb +2 -0
- data/app/models/guide/errors/invalid_node.rb +2 -0
- data/app/models/guide/errors/invalid_scenario.rb +2 -0
- data/app/models/guide/errors/invalid_visibility_option.rb +2 -0
- data/app/models/guide/errors/permission_denied.rb +2 -0
- data/app/models/guide/fixture.rb +15 -0
- data/app/models/guide/fixtures.rb +3 -0
- data/app/models/guide/form_object.rb +3 -0
- data/app/models/guide/monkey.rb +47 -0
- data/app/models/guide/nobilizer.rb +9 -0
- data/app/models/guide/node.rb +67 -0
- data/app/models/guide/photographer.rb +20 -0
- data/app/models/guide/scout.rb +59 -0
- data/app/models/guide/simulator.rb +26 -0
- data/app/models/guide/structure.rb +75 -0
- data/app/models/guide/view_model.rb +37 -0
- data/app/view_models/guide/layout_view.rb +81 -0
- data/app/view_models/guide/navigation_view.rb +25 -0
- data/app/view_models/guide/node_view.rb +59 -0
- data/app/view_models/guide/scenario_layout_view.rb +49 -0
- data/app/view_models/guide/scenario_view.rb +39 -0
- data/app/views/guide/_content.html.erb +17 -0
- data/app/views/guide/common/_category.html.erb +9 -0
- data/app/views/guide/common/_footer.html.erb +21 -0
- data/app/views/guide/common/_locale_switcher.html.erb +6 -0
- data/app/views/guide/common/_navigation.html.erb +12 -0
- data/app/views/guide/common/_navigation_node.html.erb +39 -0
- data/app/views/guide/common/_page_title.html.erb +8 -0
- data/app/views/guide/common/_search.html.erb +23 -0
- data/app/views/guide/common/_unsupported_browser_message.html.erb +6 -0
- data/app/views/guide/common/_visibility_banner.html.erb +25 -0
- data/app/views/guide/nodes/_document.html.erb +3 -0
- data/app/views/guide/nodes/_scenario.html.erb +14 -0
- data/app/views/guide/nodes/_scenario_list.html.erb +10 -0
- data/app/views/guide/nodes/_structure.html.erb +26 -0
- data/app/views/guide/nodes/_template_location.html.erb +7 -0
- data/app/views/guide/nodes/show.html.erb +7 -0
- data/app/views/guide/scenarios/_scenario.html.erb +25 -0
- data/app/views/guide/scenarios/scenario/_locale_switcher.html.erb +5 -0
- data/app/views/guide/scenarios/scenario/_toolbar.html.erb +39 -0
- data/app/views/guide/scenarios/scenario/_visibility.html.erb +10 -0
- data/app/views/guide/scenarios/show.html.erb +1 -0
- data/app/views/layouts/guide/application.html.erb +76 -0
- data/app/views/layouts/guide/scenario.html.erb +38 -0
- data/app/views/layouts/guide/scenario/default.html.erb +1 -0
- data/app/views/layouts/guide/scenario/default.text.erb +1 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/markdown.rb +15 -0
- data/config/locales/models/guide/monkey.en.yml +6 -0
- data/config/locales/views/guide/nodes/_structure.en.yml +7 -0
- data/config/routes.rb +6 -0
- data/lib/guide.rb +12 -0
- data/lib/guide/authorisation_spec_helper.rb +83 -0
- data/lib/guide/configuration.rb +31 -0
- data/lib/guide/consistency_spec_helper.rb +33 -0
- data/lib/guide/engine.rb +9 -0
- data/lib/guide/version.rb +3 -0
- data/lib/tasks/guide_tasks.rake +4 -0
- metadata +198 -12
- data/.gitignore +0 -26
- data/Gemfile +0 -4
- data/guide.gemspec +0 -12
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="sg-content">
|
2
|
+
<div am-Grid class="h-text-align-center">
|
3
|
+
<div am-Grid-Col="m:4 l:6" am-Grid-Row="m:start l:start">
|
4
|
+
<div class="sg-home__section">
|
5
|
+
<%= link_to '/structures',
|
6
|
+
:class => "t-link -color-dark -decoration-reversed" do %>
|
7
|
+
<h3 class="t-heading -size-m">Structures</h3>
|
8
|
+
<% end %>
|
9
|
+
<div class="sg-home__intro">
|
10
|
+
<p class="t-body -size-l">
|
11
|
+
Here you will find the living documentation for the pieces that make up the application. It uses real templates from the site and recreate the different states that they might be in.
|
12
|
+
</p>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<footer class="sg-layout__footer">
|
2
|
+
<p class="t-body -size-m">
|
3
|
+
This guide uses the latest CSS3 features and is best viewed with modern browsers (for now).
|
4
|
+
</p>
|
5
|
+
|
6
|
+
<% if view.show_locale_switcher? %>
|
7
|
+
<div class="sg-footer__language">
|
8
|
+
<%= render 'guide/common/locale_switcher', :view => view %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<p class="t-body -size-m h-m0">
|
13
|
+
© <%= Time.now.year %> <%= Guide.configuration.company_name %>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<% if view.user_signed_in? && view.url_for_sign_out.present? %>
|
17
|
+
<%= link_to "Sign Out", view.url_for_sign_out, :class => "t-link -decoration-reversed -color-dark -size-s" %>
|
18
|
+
<% elsif view.url_for_sign_in.present? %>
|
19
|
+
<%= link_to "Sign In", view.url_for_sign_in, :class => "t-link -decoration-reversed -color-dark -size-s" %>
|
20
|
+
<% end %>
|
21
|
+
</footer>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<form action="" method="get" data-view="languageSwitcher">
|
2
|
+
<%= select_tag view.locale_param,
|
3
|
+
options_for_select(view.supported_locales, view.current_locale),
|
4
|
+
:class => 'js-guide__language f-select' %>
|
5
|
+
<%= submit_tag "Switch Language", :name => nil, :class => 'is-hidden--js' %>
|
6
|
+
</form>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% content_for :sidebar do %>
|
2
|
+
<%= content_tag "ul",
|
3
|
+
:class => "sg-navigation",
|
4
|
+
:data => {
|
5
|
+
:view => "navigation"
|
6
|
+
} do %>
|
7
|
+
<%= render 'guide/common/navigation_node',
|
8
|
+
:node_path => nil,
|
9
|
+
:top_level_node => true,
|
10
|
+
:view => view %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<% view.child_node_views.each do |child_node_view| %>
|
2
|
+
<% if child_node_view.visible_to_user? %>
|
3
|
+
<%= content_tag :li,
|
4
|
+
:class => top_level_node ? 'sg-navigation__section' : nil do %>
|
5
|
+
<% if child_node_view.leaf_node? %>
|
6
|
+
<%= link_to child_node_view.name,
|
7
|
+
node_path.present? ? "/#{node_path}/#{child_node_view.id}" : "/#{child_node_view.id}",
|
8
|
+
:class => child_node_view.active? ? 'is-active' : nil %>
|
9
|
+
<% else %>
|
10
|
+
<% if top_level_node %>
|
11
|
+
<div class="sg-navigation__section-title">
|
12
|
+
<%= link_to "/#{child_node_view.id}" do %>
|
13
|
+
<h4><%= child_node_view.name %></h4>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
<%= link_to '', '#', :class => [
|
17
|
+
"sg-navigation__section-expander",
|
18
|
+
('is-active' if child_node_view.active?),
|
19
|
+
] %>
|
20
|
+
<% else %>
|
21
|
+
<%= link_to '#', :class => "sg-navigation__header" do %>
|
22
|
+
<h5><%= child_node_view.name %></h5>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<ul class="sg-navigation__sub-group">
|
27
|
+
<%= render 'guide/common/navigation_node',
|
28
|
+
:node_path => if node_path.present?
|
29
|
+
"#{node_path}/#{child_node_view.id}"
|
30
|
+
else
|
31
|
+
"#{child_node_view.id}"
|
32
|
+
end,
|
33
|
+
:top_level_node => false,
|
34
|
+
:view => child_node_view %>
|
35
|
+
</ul>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="sg-header__summary <%= 'is-hidden-tablet-and-below' if view.on_homepage? %>">
|
2
|
+
<% if view.on_homepage? %>
|
3
|
+
<h1 class="t-heading -size-xl -color-light">Welcome to the <%= Guide.configuration.guide_name %></h1>
|
4
|
+
<% else %>
|
5
|
+
<h1 class="t-heading -size-xl -color-light"><%= view.active_node_name %></h1>
|
6
|
+
<h3 class="t-heading -size-m -color-inherit -weight-light h-m0"><%= view.active_node_heritage %></h3>
|
7
|
+
<% end %>
|
8
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="sg-controls__search" data-view="search">
|
2
|
+
<div class="sg-search">
|
3
|
+
<div class="sg-search__input">
|
4
|
+
<%= text_field_tag "search", "",
|
5
|
+
:placeholder => "Jump to…".html_safe,
|
6
|
+
:tabindex => "-1",
|
7
|
+
:data => {
|
8
|
+
:pages =>
|
9
|
+
@layout_view.paths_to_visible_renderable_nodes.map do |node_path, node_title|
|
10
|
+
{
|
11
|
+
:label => node_title,
|
12
|
+
:value => "/#{node_path}"
|
13
|
+
}
|
14
|
+
end
|
15
|
+
} %>
|
16
|
+
</div>
|
17
|
+
<div class="sg-search__toggle">
|
18
|
+
<a class="js-sg-search__toggle">
|
19
|
+
<i class="e-icon -icon-search -size-medium -color-white"><span class="e-icon__alt">Search</span></i>
|
20
|
+
</a>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<div class="layout__unsupported-browser">
|
2
|
+
<p class="t-body -color-light h-m0">
|
3
|
+
Sorry! The <%= Guide.configuration.guide_name %> currently only supports the latest browsers. We suggest that you
|
4
|
+
<%= link_to "try a different browser", "http://browsehappy.com/", :class => "t-link -color-light" %>.
|
5
|
+
</p>
|
6
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<% if view.user_is_privileged? %>
|
2
|
+
<% case view.active_node_visibility %>
|
3
|
+
<% when :restricted %>
|
4
|
+
<div class="sg-header__visibility -status-restricted">
|
5
|
+
<p class="t-body -color-light -size-m h-m0">
|
6
|
+
<i class="e-icon -icon-lock -margin-right"><span class="e-icon__alt">Restricted</span></i>
|
7
|
+
This is only visible to people with 'Restricted' clearance
|
8
|
+
</p>
|
9
|
+
</div>
|
10
|
+
<% when :unpublished %>
|
11
|
+
<div class="sg-header__visibility -status-unpublished">
|
12
|
+
<p class="t-body -color-light -size-m h-m0">
|
13
|
+
<i class="e-icon -icon-lock -margin-right"><span class="e-icon__alt">Unpublished</span></i>
|
14
|
+
This is not visible to the public. It is most likely a work in progress.
|
15
|
+
</p>
|
16
|
+
</div>
|
17
|
+
<% else %>
|
18
|
+
<div class="sg-header__visibility -status-public">
|
19
|
+
<p class="t-body -color-light -size-m h-m0">
|
20
|
+
<i class="e-icon -icon-globe -margin-right"><span class="e-icon__alt">Public</span></i>
|
21
|
+
This is visible to the public.
|
22
|
+
</p>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= content_tag( :div,
|
2
|
+
:class => "sg-scenario__iframe is-loading",
|
3
|
+
:data => {
|
4
|
+
:view => "iframe"
|
5
|
+
}
|
6
|
+
) do %>
|
7
|
+
|
8
|
+
<%= content_tag( :iframe,
|
9
|
+
nil,
|
10
|
+
:width => "100%",
|
11
|
+
:scrolling => "no",
|
12
|
+
:src => "/scenario/#{scenario_id}/#{scenario_format}/for/#{node_path}"
|
13
|
+
) %>
|
14
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<nav class="sg-box h-spacing-below">
|
2
|
+
<h3 class="t-heading -size-m">Scenarios:</h3>
|
3
|
+
<ul class="t-list -style-decimal">
|
4
|
+
<% view.visible_scenarios.each do |scenario_id, scenario| %>
|
5
|
+
<li class="t-body h-m0">
|
6
|
+
<%= link_to scenario.name, "##{scenario_id}", :class => 't-link' %>
|
7
|
+
</li>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
</nav>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= render 'scenario_list', :view => view %>
|
2
|
+
<%= render 'template_location', :view => view %>
|
3
|
+
|
4
|
+
<% view.visible_scenarios.each do |scenario_id, scenario| %>
|
5
|
+
<section class="sg-scenario" id="<%= scenario_id %>" data-view="scenario">
|
6
|
+
<%= render 'guide/scenarios/scenario/toolbar',
|
7
|
+
:view => view,
|
8
|
+
:scenario => scenario,
|
9
|
+
:scenario_id => scenario_id %>
|
10
|
+
|
11
|
+
<% view.formats.each do |scenario_format| %>
|
12
|
+
<% if view.multiple_formats? %>
|
13
|
+
<h3 class="t-heading -size-xs h-spacing-above">
|
14
|
+
<%= t(".format_heading.#{scenario_format}")%>
|
15
|
+
</h3>
|
16
|
+
<% end %>
|
17
|
+
<%= content_tag :div,
|
18
|
+
:class => "js-guide__scenario-container sg-scenario__container" do %>
|
19
|
+
<%= render 'scenario',
|
20
|
+
:scenario_id => scenario_id,
|
21
|
+
:node_path => view.node_path,
|
22
|
+
:scenario_format => scenario_format %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
</section>
|
26
|
+
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= render 'guide/common/navigation', :view => @navigation_view %>
|
2
|
+
|
3
|
+
<% if @node_view.can_be_rendered? %>
|
4
|
+
<%= render "guide/nodes/#{@node_view.node_type}", :view => @node_view %>
|
5
|
+
<% else %>
|
6
|
+
<% raise "I was asked to render '#{@node_view.name}' but that node cannot be rendered because it is only a #{@node_view.node_type}, not something smarter like a component or a document" %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="js- e-guide__component <%= view.wrapper_classes %>">
|
2
|
+
<div class="<%= view.layout_css_classes[:parent] %>">
|
3
|
+
<div class="e-guide__scenario <%= view.layout_css_classes[:scenario] %>">
|
4
|
+
<% if view.uses_cells? %>
|
5
|
+
<%= cell(view.cell, view.view_model).call %>
|
6
|
+
<% else %>
|
7
|
+
<% if view.format.to_sym == :text %>
|
8
|
+
<pre>
|
9
|
+
<% end %>
|
10
|
+
<%= render partial: view.template, formats: [view.format],
|
11
|
+
locals: { Guide.configuration.local_variable_for_view_model => view.view_model } %>
|
12
|
+
<% if view.format.to_sym == :text %>
|
13
|
+
</pre>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<% unless view.format == 'text' %>
|
21
|
+
<div class="js- e-guide__translation-missing is-hidden">
|
22
|
+
<h3>This is awkward. We have no translations for:</h3>
|
23
|
+
<ul></ul>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<header class="sg-scenario__header">
|
2
|
+
<div class="sg-toolbar -status-<%= scenario.options[:visibility] || :public %>">
|
3
|
+
<% if view.user_is_privileged? %>
|
4
|
+
<%= render 'guide/scenarios/scenario/visibility',
|
5
|
+
:visibility => scenario.options[:visibility] %>
|
6
|
+
<% end %>
|
7
|
+
<div class="sg-toolbar__title">
|
8
|
+
<h3 class="t-heading -size-xxs -color-inherit h-m0">
|
9
|
+
<%= link_to scenario.name, "##{scenario_id}",
|
10
|
+
:class => [
|
11
|
+
"t-link -decoration-reversed",
|
12
|
+
(scenario.options[:visibility].nil? ? '-color-inherit' : '-color-light')
|
13
|
+
] %>
|
14
|
+
</h3>
|
15
|
+
</div>
|
16
|
+
<div class="sg-toolbar__controls">
|
17
|
+
<div class="sg-actions">
|
18
|
+
<% if view.show_locale_switcher? %>
|
19
|
+
<div class="sg-actions__control is-hidden-phone">
|
20
|
+
<%= render 'guide/scenarios/scenario/locale_switcher', :view => view %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<div class="sg-actions__control is-hidden-phone">
|
24
|
+
<%= link_to "S", "##{scenario_id}", :class => "js-guide__responsive-phone t-link -color-inherit -decoration-reversed" %>
|
25
|
+
<%= link_to "M", "##{scenario_id}", :class => "js-guide__responsive-tablet t-link -color-inherit -decoration-reversed" %>
|
26
|
+
<%= link_to "L", "##{scenario_id}", :class => "js-guide__responsive-desktop t-link -color-inherit -decoration-reversed" %>
|
27
|
+
</div>
|
28
|
+
<div class="sg-actions__control">
|
29
|
+
<%= link_to "/scenario/#{scenario_id}/#{view.formats.first}/for/#{view.node_path}",
|
30
|
+
:class =>"sg-actions__icon",
|
31
|
+
:target => "_blank",
|
32
|
+
:alt => "Open this scenario in a new tab" do %>
|
33
|
+
<i class="e-icon -icon-link-ext -color-inherit -size-medium"><span class="e-icon__alt">Open in new tab</span></i>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</header>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="sg-toolbar__visibility">
|
2
|
+
<% case visibility %>
|
3
|
+
<% when nil %>
|
4
|
+
<i class="e-icon -icon-globe" title="Public"><span class="e-icon__alt">Public</span></i>
|
5
|
+
<% when :unpublished %>
|
6
|
+
<i class="e-icon -icon-lock" title="Unpublished"><span class="e-icon__alt">Unpublished</span></i>
|
7
|
+
<% when :restricted %>
|
8
|
+
<i class="e-icon -icon-lock" title="Restricted access only"><span class="e-icon__alt">Restricted</span></i>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'scenario', :view => @scenario_view %>
|
@@ -0,0 +1,76 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="no-js" lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<%= @layout_view.injected_html %>
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
|
+
<title>
|
8
|
+
<% if @layout_view.on_homepage? %>
|
9
|
+
Guide
|
10
|
+
<% else %>
|
11
|
+
<%= @layout_view.active_node_title %> ~ Guide
|
12
|
+
<% end %>
|
13
|
+
</title>
|
14
|
+
<meta name="description" content="<% if @layout_view.on_homepage? %>A living, breathing, evolving guide.<% end %>">
|
15
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
16
|
+
|
17
|
+
<%= stylesheet_link_tag("guide/application", :media => "all") %>
|
18
|
+
|
19
|
+
<%# TEMP: Hotlink to Envato Market prod assets %>
|
20
|
+
<%= stylesheet_link_tag("https://dmypbau5frl9g.cloudfront.net/assets/guide/index-20fe501b6fcead142299388034870844.css", :media => "all") %>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<div data-view="layout" class="sg-layout">
|
25
|
+
<aside class="js-layout__sidebar sg-layout__sidebar">
|
26
|
+
<div class="sg-drawer">
|
27
|
+
<div class="sg-drawer__logo">
|
28
|
+
<% if @layout_view.show_image_logo? %>
|
29
|
+
<%= link_to(image_tag(Guide.configuration.asset_path_for_logo,
|
30
|
+
:alt => Guide.configuration.guide_name),
|
31
|
+
root_path,
|
32
|
+
:class => "sg-header__logo") %>
|
33
|
+
<% else %>
|
34
|
+
<h2 class="t-heading -size-m">
|
35
|
+
<%= link_to(Guide.configuration.guide_name,
|
36
|
+
root_path,
|
37
|
+
:class => "t-link -color-light -decoration-none") %>
|
38
|
+
</h2>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
<div class="sg-drawer__nav">
|
42
|
+
<%= yield :sidebar %>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</aside>
|
46
|
+
<main class="js-layout__content sg-layout__main">
|
47
|
+
<header class="sg-header">
|
48
|
+
<%= render 'guide/common/page_title', :view => @layout_view %>
|
49
|
+
|
50
|
+
<div class="sg-header__controls">
|
51
|
+
<div class="sg-controls">
|
52
|
+
<div class="sg-controls__hamburger">
|
53
|
+
<a class="js-layout__nav-toggle">
|
54
|
+
<i class="e-icon -icon-hamburger -size-medium"><span class="e-icon__alt">Nav</span></i>
|
55
|
+
</a>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<%= render 'guide/common/category', :view => @layout_view %>
|
59
|
+
<%= render 'guide/common/search', :view => @layout_view %>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<%= render 'guide/common/visibility_banner', :view => @layout_view %>
|
64
|
+
</header>
|
65
|
+
|
66
|
+
<div class="sg-layout__content">
|
67
|
+
<%= yield %>
|
68
|
+
<%= render 'guide/common/footer', :view => @layout_view %>
|
69
|
+
</div>
|
70
|
+
<div class="js-layout__nav-overlay sg-layout__overlay"></div>
|
71
|
+
</main>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<%= javascript_include_tag "guide/application" %>
|
75
|
+
</body>
|
76
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<!--[if IE 9]> <html class="ie9" lang="en"> <![endif]-->
|
3
|
+
<!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]-->
|
4
|
+
<head>
|
5
|
+
<meta name="robots" content="noindex, nofollow">
|
6
|
+
<meta charset="utf-8">
|
7
|
+
<%= @layout_view.injected_html %>
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
9
|
+
<title>
|
10
|
+
<%= @layout_view.node_title %> ~ <%= @layout_view.scenario_name %> ~ <%= Guide.configuration.guide_name %>
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<%# TEMP: Hotlink to Envato Market prod assets %>
|
14
|
+
<%= javascript_include_tag "guide/scenario" %>
|
15
|
+
<%= stylesheet_link_tag("https://dmypbau5frl9g.cloudfront.net/assets/guide/scenario-0850d15390e6ad5383256d43d3473da2.css", :media => "all") %>
|
16
|
+
|
17
|
+
<% # Application specific stylesheets with which to render the template %>
|
18
|
+
<% if @layout_view.inject_stylesheets? %>
|
19
|
+
<% @layout_view.node_stylesheets.each do |styleheet|%>
|
20
|
+
<%= stylesheet_link_tag(styleheet, :media => "all") %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
</head>
|
24
|
+
|
25
|
+
<body class="e-guide">
|
26
|
+
<%= render :template => @layout_view.node_layout_template,
|
27
|
+
:formats => [@layout_view.format],
|
28
|
+
:locals => {
|
29
|
+
Guide.configuration.local_variable_for_view_model => @layout_view.node_layout_view
|
30
|
+
} %>
|
31
|
+
|
32
|
+
<% if @layout_view.inject_javascripts? %>
|
33
|
+
<% @layout_view.node_javascripts.each do |javascript|%>
|
34
|
+
<%= javascript_include_tag(javascript) %>
|
35
|
+
<% end %>
|
36
|
+
<% end %>
|
37
|
+
</body>
|
38
|
+
</html>
|