alb3rtobr-test 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bookbinder.gemspec +43 -0
- data/install_bin/bookbinder +5 -0
- data/lib/bookbinder/cli.rb +105 -0
- data/lib/bookbinder/code_example_reader.rb +95 -0
- data/lib/bookbinder/colorizer.rb +16 -0
- data/lib/bookbinder/commands/bind.rb +120 -0
- data/lib/bookbinder/commands/collection.rb +181 -0
- data/lib/bookbinder/commands/components/bind/directory_preparer.rb +33 -0
- data/lib/bookbinder/commands/components/bind/layout_preparer.rb +27 -0
- data/lib/bookbinder/commands/components/command_options.rb +45 -0
- data/lib/bookbinder/commands/components/imprint/directory_preparer.rb +24 -0
- data/lib/bookbinder/commands/generate.rb +92 -0
- data/lib/bookbinder/commands/imprint.rb +55 -0
- data/lib/bookbinder/commands/punch.rb +33 -0
- data/lib/bookbinder/commands/update_local_doc_repos.rb +42 -0
- data/lib/bookbinder/commands/watch.rb +100 -0
- data/lib/bookbinder/config/checkers/archive_menu_checker.rb +29 -0
- data/lib/bookbinder/config/checkers/ditamap_presence_checker.rb +27 -0
- data/lib/bookbinder/config/checkers/duplicate_section_name_checker.rb +33 -0
- data/lib/bookbinder/config/checkers/products_checker.rb +34 -0
- data/lib/bookbinder/config/checkers/repository_name_presence_checker.rb +34 -0
- data/lib/bookbinder/config/checkers/required_keys_checker.rb +18 -0
- data/lib/bookbinder/config/checkers/section_presence_checker.rb +15 -0
- data/lib/bookbinder/config/configuration.rb +119 -0
- data/lib/bookbinder/config/configuration_decorator.rb +54 -0
- data/lib/bookbinder/config/dita_config_generator.rb +61 -0
- data/lib/bookbinder/config/fetcher.rb +64 -0
- data/lib/bookbinder/config/imprint/configuration.rb +24 -0
- data/lib/bookbinder/config/product_config.rb +34 -0
- data/lib/bookbinder/config/section_config.rb +85 -0
- data/lib/bookbinder/config/validator.rb +33 -0
- data/lib/bookbinder/config/yaml_loader.rb +34 -0
- data/lib/bookbinder/css_link_checker.rb +67 -0
- data/lib/bookbinder/directory_helpers.rb +15 -0
- data/lib/bookbinder/dita_command_creator.rb +95 -0
- data/lib/bookbinder/dita_html_for_middleman_formatter.rb +45 -0
- data/lib/bookbinder/errors/programmer_mistake.rb +5 -0
- data/lib/bookbinder/html_document_manipulator.rb +21 -0
- data/lib/bookbinder/ingest/cloner_factory.rb +26 -0
- data/lib/bookbinder/ingest/destination_directory.rb +21 -0
- data/lib/bookbinder/ingest/git_accessor.rb +102 -0
- data/lib/bookbinder/ingest/git_cloner.rb +36 -0
- data/lib/bookbinder/ingest/local_filesystem_cloner.rb +66 -0
- data/lib/bookbinder/ingest/missing_working_copy.rb +27 -0
- data/lib/bookbinder/ingest/repo_identifier.rb +45 -0
- data/lib/bookbinder/ingest/section_repository.rb +49 -0
- data/lib/bookbinder/ingest/update_failure.rb +15 -0
- data/lib/bookbinder/ingest/update_success.rb +12 -0
- data/lib/bookbinder/ingest/working_copy.rb +36 -0
- data/lib/bookbinder/local_filesystem_accessor.rb +122 -0
- data/lib/bookbinder/middleman_runner.rb +50 -0
- data/lib/bookbinder/postprocessing/link_checker.rb +125 -0
- data/lib/bookbinder/postprocessing/redirection.rb +38 -0
- data/lib/bookbinder/preprocessing/dita_html_preprocessor.rb +91 -0
- data/lib/bookbinder/preprocessing/dita_pdf_preprocessor.rb +48 -0
- data/lib/bookbinder/preprocessing/link_to_site_gen_dir.rb +39 -0
- data/lib/bookbinder/preprocessing/preprocessor.rb +26 -0
- data/lib/bookbinder/server_director.rb +30 -0
- data/lib/bookbinder/sheller.rb +52 -0
- data/lib/bookbinder/streams/colorized_stream.rb +25 -0
- data/lib/bookbinder/streams/filter_stream.rb +22 -0
- data/lib/bookbinder/subnav/navigation_entries_from_html_toc.rb +59 -0
- data/lib/bookbinder/subnav/navigation_entries_from_markdown_root.rb +116 -0
- data/lib/bookbinder/subnav/pdf_config_creator.rb +50 -0
- data/lib/bookbinder/subnav/subnav_generator.rb +28 -0
- data/lib/bookbinder/subnav/subnav_generator_factory.rb +29 -0
- data/lib/bookbinder/subnav/template_creator.rb +71 -0
- data/lib/bookbinder/terminal.rb +19 -0
- data/lib/bookbinder/values/output_locations.rb +91 -0
- data/lib/bookbinder/values/product_info.rb +11 -0
- data/lib/bookbinder/values/section.rb +58 -0
- data/lib/bookbinder/values/subnav_template.rb +4 -0
- data/lib/bookbinder/values/user_message.rb +15 -0
- data/master_middleman/archive_drop_down_menu.rb +50 -0
- data/master_middleman/bookbinder_helpers.rb +282 -0
- data/master_middleman/compass_runner.rb +0 -0
- data/master_middleman/config.rb +45 -0
- data/master_middleman/proof.rb +90 -0
- data/master_middleman/quicklinks_renderer.rb +80 -0
- data/master_middleman/source/javascripts/all.js +2 -0
- data/master_middleman/source/javascripts/book.js +1 -0
- data/master_middleman/source/javascripts/bookbinder.js +130 -0
- data/master_middleman/source/layouts/_additional-scripts.erb +0 -0
- data/master_middleman/source/layouts/_book-footer.erb +0 -0
- data/master_middleman/source/layouts/_book-search.erb +0 -0
- data/master_middleman/source/layouts/_book-title.erb +3 -0
- data/master_middleman/source/layouts/_header.erb +34 -0
- data/master_middleman/source/layouts/_local-header.erb +0 -0
- data/master_middleman/source/layouts/_page-footer.erb +1 -0
- data/master_middleman/source/layouts/_title.erb +5 -0
- data/master_middleman/source/layouts/layout.erb +70 -0
- data/master_middleman/source/stylesheets/all.css.scss +3 -0
- data/master_middleman/source/stylesheets/base.scss +324 -0
- data/master_middleman/source/stylesheets/book-styles.scss +0 -0
- data/master_middleman/source/stylesheets/layout-styles.scss +0 -0
- data/master_middleman/source/stylesheets/partials/_book-base-values.scss +0 -0
- data/master_middleman/source/stylesheets/partials/_book-vars.scss +0 -0
- data/master_middleman/source/stylesheets/partials/_default.scss +302 -0
- data/master_middleman/source/stylesheets/partials/_footer.scss +64 -0
- data/master_middleman/source/stylesheets/partials/_header.scss +419 -0
- data/master_middleman/source/stylesheets/partials/_layout-vars.scss +0 -0
- data/master_middleman/source/stylesheets/partials/_mixins.scss +53 -0
- data/master_middleman/source/stylesheets/partials/_reset.scss +233 -0
- data/master_middleman/source/stylesheets/partials/_search.scss +78 -0
- data/master_middleman/source/stylesheets/partials/_sidenav.scss +191 -0
- data/master_middleman/source/stylesheets/partials/_syntax-highlight.scss +64 -0
- data/master_middleman/source/stylesheets/partials/_vars.scss +64 -0
- data/master_middleman/source/stylesheets/print-book-styles.scss +0 -0
- data/master_middleman/source/stylesheets/print-layout-styles.scss +0 -0
- data/master_middleman/source/stylesheets/print.css.scss +57 -0
- data/master_middleman/source/subnavs/_default.erb +0 -0
- data/master_middleman/source/subnavs/_nav-links.erb +10 -0
- data/master_middleman/source/subnavs/_subnav_template.erb +8 -0
- data/master_middleman/subdirectory_aware_assets.rb +36 -0
- data/template_app/Gemfile +10 -0
- data/template_app/Gemfile.lock +46 -0
- data/template_app/config.ru +9 -0
- data/template_app/lib/rack_static_if_exists.rb +19 -0
- data/template_app/lib/search/handler.rb +73 -0
- data/template_app/lib/search/hit.rb +21 -0
- data/template_app/lib/search/query.rb +74 -0
- data/template_app/lib/search/renderer.rb +30 -0
- data/template_app/lib/server.rb +52 -0
- data/template_app/mail_sender.rb +61 -0
- data/template_app/rack_app.rb +110 -0
- data/template_app/search-results.html.erb +81 -0
- data/template_app/search.yml +23 -0
- metadata +562 -0
File without changes
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'bookbinder_helpers'
|
2
|
+
require 'proof'
|
3
|
+
require 'middleman-syntax'
|
4
|
+
require 'middleman-livereload'
|
5
|
+
require 'middleman-sprockets'
|
6
|
+
require 'subdirectory_aware_assets'
|
7
|
+
require 'middleman-compass'
|
8
|
+
require 'font-awesome-sass'
|
9
|
+
|
10
|
+
config = YAML.load_file('bookbinder_config.yml')
|
11
|
+
config.each do |k, v|
|
12
|
+
set k, v
|
13
|
+
end
|
14
|
+
|
15
|
+
set :markdown_engine, :redcarpet
|
16
|
+
set :markdown, :layout_engine => :erb,
|
17
|
+
:tables => true,
|
18
|
+
:autolink => true,
|
19
|
+
:smartypants => true,
|
20
|
+
:fenced_code_blocks => true,
|
21
|
+
:with_toc_data => true,
|
22
|
+
:no_intra_emphasis => true
|
23
|
+
|
24
|
+
set :css_dir, 'stylesheets'
|
25
|
+
|
26
|
+
set :js_dir, 'javascripts'
|
27
|
+
|
28
|
+
set :images_dir, 'images'
|
29
|
+
|
30
|
+
set :relative_links, false
|
31
|
+
|
32
|
+
page '/owners.json', :layout => false
|
33
|
+
|
34
|
+
activate :bookbinder
|
35
|
+
|
36
|
+
activate :proof
|
37
|
+
|
38
|
+
activate :syntax
|
39
|
+
|
40
|
+
activate :livereload
|
41
|
+
|
42
|
+
activate :sprockets
|
43
|
+
import_path FontAwesome::Sass.fonts_path
|
44
|
+
|
45
|
+
activate :subdirectory_aware_assets
|
@@ -0,0 +1,90 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
|
3
|
+
module Bookbinder
|
4
|
+
class Proof < ::Middleman::Extension
|
5
|
+
def initialize(*args)
|
6
|
+
super
|
7
|
+
@blacklist = [
|
8
|
+
%r{\Alayouts/},
|
9
|
+
%r{\Asubnavs/}
|
10
|
+
]
|
11
|
+
end
|
12
|
+
|
13
|
+
def before_build(builder)
|
14
|
+
return unless proofing?
|
15
|
+
builder.instance_variable_set(:@parallel, false)
|
16
|
+
@partials = Hash.new { |h, k| h[k] = [] }
|
17
|
+
@pages = Hash.new { |h, k| h[k] = [] }
|
18
|
+
end
|
19
|
+
|
20
|
+
def after_build(builder)
|
21
|
+
return unless proofing?
|
22
|
+
@partials.values.each(&:uniq!)
|
23
|
+
@pages.values.each(&:uniq!)
|
24
|
+
|
25
|
+
@pages.each do |page_path, partials|
|
26
|
+
full_path = File.join(app.config.build_dir, page_path)
|
27
|
+
page = File.open(full_path) {|file| Nokogiri::HTML file}
|
28
|
+
|
29
|
+
page.css('.partial-notice').each do |node|
|
30
|
+
if node.text =~ /\ABEGIN PARTIAL (.+)\. Partial appears in these topics:\z/
|
31
|
+
partial_name = $1
|
32
|
+
all_files_using_partial = @partials[partial_name]
|
33
|
+
|
34
|
+
list = page.create_element('ul')
|
35
|
+
all_files_using_partial.each do |file_name|
|
36
|
+
li = list.add_child(page.create_element('li'))
|
37
|
+
link = li.add_child(page.create_element('a', file_name, href: "/#{file_name}"))
|
38
|
+
end
|
39
|
+
|
40
|
+
node.add_child(list)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
File.open(full_path, 'w') { |file| file.puts page.to_html }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
expose_to_template :proofing?
|
49
|
+
expose_to_template :track_partial
|
50
|
+
|
51
|
+
helpers do
|
52
|
+
def partial(template, *args)
|
53
|
+
contents = [super]
|
54
|
+
|
55
|
+
if proofing?
|
56
|
+
dir, name = File.split(template)
|
57
|
+
partial_template = File.join(dir, "_#{name}")
|
58
|
+
template_obj = locate_partial(partial_template, false) || locate_partial(partial_template, true)
|
59
|
+
template_path = template_obj.relative_path.to_s
|
60
|
+
|
61
|
+
if track_partial(template_path, current_resource.path)
|
62
|
+
contents.unshift %Q{<div class="partial-notice">BEGIN PARTIAL #{template_path}. Partial appears in these topics:</div>}
|
63
|
+
contents.push %Q{<div class="partial-notice">END PARTIAL #{template_path}</div>}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
contents.join('')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def track_partial(template, page)
|
72
|
+
result = !blacklisted?(template)
|
73
|
+
if result
|
74
|
+
@partials[template] << page
|
75
|
+
@pages[page] << template
|
76
|
+
end
|
77
|
+
result
|
78
|
+
end
|
79
|
+
|
80
|
+
def proofing?
|
81
|
+
!!app.config[:proof]
|
82
|
+
end
|
83
|
+
|
84
|
+
def blacklisted?(template)
|
85
|
+
@blacklist.any? { |matcher| matcher.match template }
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
::Middleman::Extensions.register(:proof, Bookbinder::Proof)
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'redcarpet'
|
3
|
+
|
4
|
+
class QuicklinksRenderer < Redcarpet::Render::Base
|
5
|
+
class BadHeadingLevelError < StandardError; end
|
6
|
+
|
7
|
+
attr_reader :vars
|
8
|
+
|
9
|
+
def initialize(template_variables)
|
10
|
+
super()
|
11
|
+
@vars = template_variables
|
12
|
+
end
|
13
|
+
|
14
|
+
def doc_header
|
15
|
+
@items = []
|
16
|
+
@items[1] = document.css('ul').first
|
17
|
+
nil
|
18
|
+
end
|
19
|
+
|
20
|
+
def doc_footer
|
21
|
+
document.css('.quick-links').to_html if any_headers?
|
22
|
+
end
|
23
|
+
|
24
|
+
def header(text, header_level)
|
25
|
+
return unless [2, 3].include?(header_level)
|
26
|
+
return unless anchor_for(text)
|
27
|
+
|
28
|
+
li = Nokogiri::XML::Node.new('li', document)
|
29
|
+
li.add_child anchor_for(text)
|
30
|
+
last_list_of_level(header_level-1).add_child(li)
|
31
|
+
@items[header_level] = li
|
32
|
+
nil
|
33
|
+
rescue BadHeadingLevelError => e
|
34
|
+
raise BadHeadingLevelError.new "The header \"#{text}\", which is at level #{e.message}, has no higher-level headers occurring before it."
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def any_headers?
|
40
|
+
@items[2]
|
41
|
+
end
|
42
|
+
|
43
|
+
def anchor_for(text)
|
44
|
+
text = ERB.new(text).result(binding)
|
45
|
+
doc = Nokogiri::HTML(text)
|
46
|
+
target_anchor = doc.css('a').first
|
47
|
+
return unless target_anchor && target_anchor['id']
|
48
|
+
return if (target_anchor['class'] || '').match(/\bno-quick-link\b/)
|
49
|
+
|
50
|
+
anchor = Nokogiri::XML::Node.new('a', document)
|
51
|
+
anchor['href'] = "##{target_anchor['id']}"
|
52
|
+
anchor.content = doc.text.strip
|
53
|
+
anchor
|
54
|
+
end
|
55
|
+
|
56
|
+
def last_list_of_level(n)
|
57
|
+
item = @items[n]
|
58
|
+
raise BadHeadingLevelError.new("#{n+1}") unless item
|
59
|
+
return item if item.name == 'ul'
|
60
|
+
|
61
|
+
item.add_child('<ul>') unless item.css('ul').any?
|
62
|
+
@items[n] = item.css('ul').first
|
63
|
+
end
|
64
|
+
|
65
|
+
def document
|
66
|
+
builder.doc
|
67
|
+
end
|
68
|
+
|
69
|
+
def builder
|
70
|
+
@builder ||= Nokogiri::HTML::Builder.new(&base_quicklinks_doc)
|
71
|
+
end
|
72
|
+
|
73
|
+
def base_quicklinks_doc
|
74
|
+
Proc.new do |html|
|
75
|
+
html.div(class: 'quick-links') {
|
76
|
+
html.ul
|
77
|
+
}
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
// Declare your book-specific javascript overrides in this file.
|
@@ -0,0 +1,130 @@
|
|
1
|
+
(function() {
|
2
|
+
var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
3
|
+
|
4
|
+
function toggleClass(el, className) {
|
5
|
+
var check = new RegExp("\\b" + className + "\\b");
|
6
|
+
if (check.test(el.className)) {
|
7
|
+
el.className = el.className.replace(check, '');
|
8
|
+
} else {
|
9
|
+
el.className += ' ' + className;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
function openSubmenu(e) {
|
14
|
+
if (e.target.tagName !== 'A') {
|
15
|
+
var el = e.currentTarget;
|
16
|
+
toggleClass(el, 'expanded');
|
17
|
+
e.stopPropagation();
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
function registerOnClick(el, handler) {
|
22
|
+
if (el.addEventListener) {
|
23
|
+
el.addEventListener('click', handler);
|
24
|
+
} else {
|
25
|
+
el.onclick = handler;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
function toggleMainMenu(e) {
|
30
|
+
var el = e.currentTarget;
|
31
|
+
toggleClass(el.parentNode, 'menu-active');
|
32
|
+
}
|
33
|
+
|
34
|
+
function toggleSubMenu(e) {
|
35
|
+
var el = e.currentTarget;
|
36
|
+
toggleClass(el.parentNode, 'active');
|
37
|
+
}
|
38
|
+
|
39
|
+
function displayDate(millis) {
|
40
|
+
millis = parseInt(millis, 10);
|
41
|
+
var date = new Date(millis);
|
42
|
+
|
43
|
+
return [MONTHS[date.getMonth()], ' ', date.getDate(), ', ', date.getFullYear()].join('');
|
44
|
+
}
|
45
|
+
|
46
|
+
function maybeOpenNewWindow(e) {
|
47
|
+
var el = e.currentTarget;
|
48
|
+
var href = el.href;
|
49
|
+
|
50
|
+
if (Bookbinder.needsNewWindow(e, href, window.location.host)) {
|
51
|
+
e.preventDefault();
|
52
|
+
e.stopPropagation();
|
53
|
+
window.open(href);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
window.Bookbinder = {
|
58
|
+
startSidenav: function(rootEl, currentPath) {
|
59
|
+
if (!rootEl) { return; }
|
60
|
+
|
61
|
+
var submenus = rootEl.querySelectorAll('.has_submenu');
|
62
|
+
|
63
|
+
for (var i = 0; i < submenus.length; i++) {
|
64
|
+
registerOnClick(submenus[i], openSubmenu);
|
65
|
+
}
|
66
|
+
|
67
|
+
if (currentPath) {
|
68
|
+
var currentLink = rootEl.querySelector('a[href="' + currentPath + '"]');
|
69
|
+
if (currentLink) {
|
70
|
+
currentLink.className += ' active';
|
71
|
+
|
72
|
+
var hasSubmenu = /\bhas_submenu\b/;
|
73
|
+
var subnavLocation = currentLink.parentNode;
|
74
|
+
|
75
|
+
while(subnavLocation.parentNode !== rootEl) {
|
76
|
+
subnavLocation = subnavLocation.parentNode;
|
77
|
+
if (hasSubmenu.test(subnavLocation.className)) {
|
78
|
+
subnavLocation.className += ' expanded';
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
rootEl.scrollTop = currentLink.offsetTop - rootEl.offsetTop;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
},
|
86
|
+
mobileMainMenu: function(root) {
|
87
|
+
var mainMenus = root.querySelectorAll('[data-behavior=MenuMobile]');
|
88
|
+
|
89
|
+
for (var i = 0; i < mainMenus.length; i++) {
|
90
|
+
registerOnClick(mainMenus[i], toggleMainMenu);
|
91
|
+
}
|
92
|
+
},
|
93
|
+
mobileSubMenu: function(root) {
|
94
|
+
var subMenus = root.querySelectorAll('[data-behavior=SubMenuMobile]');
|
95
|
+
|
96
|
+
for (var i = 0; i < subMenus.length; i++) {
|
97
|
+
registerOnClick(subMenus[i], toggleSubMenu);
|
98
|
+
}
|
99
|
+
},
|
100
|
+
modifiedDates: function(root) {
|
101
|
+
var datesElements = root.querySelectorAll('[data-behavior=DisplayModifiedDate]');
|
102
|
+
|
103
|
+
for (var i = 0; i < datesElements.length; i++) {
|
104
|
+
datesElements[i].innerText = displayDate(datesElements[i].getAttribute('data-modified-date'));
|
105
|
+
}
|
106
|
+
},
|
107
|
+
externalLinks: function(root) {
|
108
|
+
var links = root.querySelectorAll('a[href]');
|
109
|
+
|
110
|
+
for (var i = 0; i < links.length; i++) {
|
111
|
+
registerOnClick(links[i], maybeOpenNewWindow);
|
112
|
+
}
|
113
|
+
},
|
114
|
+
needsNewWindow: function(e, destinationUrl, currentDomain) {
|
115
|
+
if (e.button !== 0 || e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) {
|
116
|
+
return false;
|
117
|
+
}
|
118
|
+
|
119
|
+
var destinationDomain = destinationUrl.replace(/^https?:\/\//, '').split('/')[0];
|
120
|
+
return destinationDomain !== currentDomain;
|
121
|
+
},
|
122
|
+
boot: function() {
|
123
|
+
Bookbinder.startSidenav(document.querySelector('#sub-nav'), document.location.pathname);
|
124
|
+
Bookbinder.mobileMainMenu(document);
|
125
|
+
Bookbinder.mobileSubMenu(document);
|
126
|
+
Bookbinder.modifiedDates(document);
|
127
|
+
Bookbinder.externalLinks(document);
|
128
|
+
}
|
129
|
+
};
|
130
|
+
})();
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% if current_page.data.title %> <%# this is a proxy for if !homepage %>
|
2
|
+
<header class="header header-layout">
|
3
|
+
<h1 class="logo">
|
4
|
+
<a href="/"><%= vars.book_title || 'Default Book Title' %></a>
|
5
|
+
</h1>
|
6
|
+
<%= yield_for_archive_drop_down_menu %>
|
7
|
+
<div class="header-links js-bar-links">
|
8
|
+
<div class="btn-menu" data-behavior="MenuMobile"></div>
|
9
|
+
<%= vars.product_link %>
|
10
|
+
<div class="header-item">
|
11
|
+
<%= vars.support_link %>
|
12
|
+
</div>
|
13
|
+
<%= partial 'layouts/book-search' %>
|
14
|
+
</div>
|
15
|
+
</header>
|
16
|
+
<% else %>
|
17
|
+
<header class="header-home">
|
18
|
+
<div class="home-links js-bar-links">
|
19
|
+
<div class="btn-menu" data-behavior="MenuMobile"></div>
|
20
|
+
<%= vars.product_link %>
|
21
|
+
<div class="header-item">
|
22
|
+
<%= vars.support_call_to_action %>
|
23
|
+
</div>
|
24
|
+
<%= partial 'layouts/book-search' %>
|
25
|
+
</div>
|
26
|
+
<h1 class="title-flashy">
|
27
|
+
<%= partial 'layouts/book-title' %>
|
28
|
+
</h1>
|
29
|
+
|
30
|
+
<h2 class="title-intro">
|
31
|
+
<%= vars.hero_text %>
|
32
|
+
</h2>
|
33
|
+
</header>
|
34
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_repo_link %>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<!-- Always force latest IE rendering engine or request Chrome Frame -->
|
6
|
+
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
7
|
+
|
8
|
+
<%= vars.html_head_meta %>
|
9
|
+
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300italic,400italic,400,600' rel='stylesheet' type='text/css'>
|
10
|
+
<!-- Use title if it's in the page YAML frontmatter -->
|
11
|
+
<title>
|
12
|
+
<% if current_page.data.title %>
|
13
|
+
<%= current_page.data.title %> |
|
14
|
+
<% end %>
|
15
|
+
<%= vars.book_title_short %>
|
16
|
+
</title>
|
17
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
18
|
+
<%= stylesheet_link_tag 'all', :media => 'screen, print' %>
|
19
|
+
<%= stylesheet_link_tag 'print', :media => 'print' %>
|
20
|
+
<link href='/images/favicon.ico' rel='shortcut icon'>
|
21
|
+
|
22
|
+
<%= javascript_include_tag "all" %>
|
23
|
+
<%= partial 'layouts/additional-scripts' %>
|
24
|
+
</head>
|
25
|
+
|
26
|
+
<body class="<%= body_classes %><%= yield_for_subnav.empty? ? '' : ' has-subnav' %>">
|
27
|
+
|
28
|
+
<div class="viewport">
|
29
|
+
<div class='wrap'>
|
30
|
+
<script type="text/javascript">
|
31
|
+
document.domain = "<%= vars.domain_name %>";
|
32
|
+
</script>
|
33
|
+
|
34
|
+
<%= partial 'layouts/header' %>
|
35
|
+
|
36
|
+
<div class="container">
|
37
|
+
|
38
|
+
<!--googleoff: index-->
|
39
|
+
<%= yield_for_subnav %>
|
40
|
+
<!--googleon: index-->
|
41
|
+
|
42
|
+
<main class="content content-layout" id="js-content" role="main">
|
43
|
+
<a id="top"></a>
|
44
|
+
<%= partial 'layouts/local-header' %>
|
45
|
+
<%= partial 'layouts/title' %>
|
46
|
+
<% if quick_links %>
|
47
|
+
<div id="js-quick-links" <%= 'class="list-style-none"' if current_page.data.list_style_none %>>
|
48
|
+
<%= quick_links %>
|
49
|
+
</div>
|
50
|
+
<% end %>
|
51
|
+
<div class="to-top" id="js-to-top">
|
52
|
+
<a href="#top" title="back to top"></a>
|
53
|
+
</div>
|
54
|
+
<%= yield %>
|
55
|
+
<%= partial 'layouts/page-footer' %>
|
56
|
+
</main>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
<div id="scrim"></div>
|
62
|
+
|
63
|
+
<div class="container">
|
64
|
+
<footer class="site-footer-links">
|
65
|
+
<%= partial 'layouts/book-footer' %>
|
66
|
+
</footer>
|
67
|
+
</div><!--end of container-->
|
68
|
+
|
69
|
+
</body>
|
70
|
+
</html>
|