Skip to content
Snippets Groups Projects
Commit 3052144e authored by Marc Feger's avatar Marc Feger
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 304 additions and 0 deletions
<div style="page-break-after: always;"></div>
<%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['paragraph',role].compact * ' ' %>"><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<p><%= content %></p>
</div>
<%#encoding:UTF-8%><%= content %>
<%#encoding:UTF-8%><div id="preamble">
<div class="sectionbody">
<%= content %>
</div><%
if (attr? :toc) && (attr? 'toc-placement', 'preamble') %>
<div id="toc" class="<%= attr 'toc-class', 'toc' %>">
<div id="toctitle"><%= attr 'toc-title' %></div>
<%= converter.convert @document, 'outline' %>
</div><%
end %>
</div>
<%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['quoteblock',role].compact * ' ' %>"><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<blockquote>
<%= content %>
</blockquote><%
if (attr? :attribution) or (attr? :citetitle) %>
<div class="attribution"><%
if attr? :citetitle %>
<cite><%= attr :citetitle %></cite><%
end
if attr? :attribution
if attr? :citetitle %><br><%
end %>
<%= "&#8212; #{attr :attribution}" %><%
end %>
</div><%
end %>
</div>
<hr>
<%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['sidebarblock',role].compact * ' ' %>">
<div class="content"><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<%= content %>
</div>
</div>
<%#encoding:UTF-8%><table<%= @id && %( id="#{@id}") %> class="table <%=
['tableblock',"frame-#{attr :frame, 'all'}","grid-#{attr :grid, 'all'}",role].compact * ' ' %>"<%
if (attr? :float) || !(option? :autowidth) %> style="<%=
[("width: #{attr :tablepcwidth}%;" unless option? :autowidth),("float: #{attr :float};" if attr? :float)].compact * ' ' %>"<%
end %>><%
if title? %>
<caption class="title"><%= captioned_title %></caption><%
end
unless (attr :rowcount).zero? %>
<colgroup><%
if option? :autowidth
@columns.size.times do %>
<col><%
end
else
@columns.each do |col| %>
<col style="width: <%= col.attr :colpcwidth %>%;"><%
end
end %>
</colgroup><%
[:head, :foot, :body].select {|tsec| !@rows[tsec].empty? }.each do |tsec| %>
<t<%= tsec %>><%
@rows[tsec].each do |row| %>
<tr><%
row.each do |cell|
# store reference of content in advance to resolve attribute assignments in cells
if tsec == :head
cell_content = cell.text
else
case cell.style
when :verse, :literal
cell_content = cell.text
else
cell_content = cell.content
end
end
cell_css_style = (@document.attr? :cellbgcolor) ? %(background-color: #{@document.attr :cellbgcolor};) : nil %>
<<%= (cell_tag_name = (tsec == :head || cell.style == :header ? 'th' : 'td')) %> class="<%= ['tableblock',"halign-#{cell.attr :halign}","valign-#{cell.attr :valign}"] * ' ' %>"<%= cell.colspan ? %( colspan="#{cell.colspan}") : nil %><%= cell.rowspan ? %( rowspan="#{cell.rowspan}") : nil %><%= cell_css_style ? %( style="#{cell_css_style}") : nil %>><%
if tsec == :head %><%= cell_content %><%
else
case cell.style
when :asciidoc %><div><%= cell_content %></div><%
when :verse %><div class="verse"><%= cell_content %></div><%
when :literal %><div class="literal"><pre><%= cell_content %></pre></div><%
else
cell_content.each do |text| %><p class="tableblock"><%= text %></p><% end
end
end %></<%= cell_tag_name %>><%
end %>
</tr><%
end %>
</t<%= tsec %>><%
end
end %>
</table>
<%#encoding:UTF-8%><%
if @document.attr? :toc
toc_id = @id
toc_role = (attr :role, (@document.attr 'toc-class', 'toc'))
toc_title_id = nil
toc_title = title? ? title : (@document.attr 'toc-title')
toc_levels = (attr? :levels) ? (attr :levels).to_i : (@document.attr :toclevels, 2).to_i
if !toc_id && (@document.embedded? || !(@document.attr? 'toc-placement'))
toc_id = 'toc'
toc_title_id = 'toctitle'
end
%><div<%= toc_id && %( id="#{toc_id}") %> class="<%= toc_role %>"><%
if toc_title %>
<div class="title"<%= toc_title_id && %( id="#{toc_title_id}") %>><%= toc_title %></div><%
end %>
<%= converter.convert_with_options @document, 'outline', :toclevels => toc_levels %><%
end %>
<%#encoding:UTF-8%><%
if (checklist = (option? :checklist) ? 'checklist' : nil)
if option? :interactive
marker_checked = '<input type="checkbox" data-item-complete="1" checked>'
marker_unchecked = '<input type="checkbox" data-item-complete="0">'
else
if @document.attr? :icons, 'font'
marker_checked = '<i class="icon-check"></i>'
marker_unchecked = '<i class="icon-check-empty"></i>'
else
marker_checked = '&#10003;'
marker_unchecked = '&#10063;'
end
end
end %><div<%= @id && %( id="#{@id}") %> class="<%= ['ulist',checklist,@style,role].compact * ' ' %>"><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<ul<%= (style_class = checklist || @style) ? %( class="#{style_class}") : nil %>><%
items.each do |item| %>
<li>
<p><%
if checklist && (item.attr? :checkbox) %><%= %(#{(item.attr? :checked) ? marker_checked : marker_unchecked} #{item.text}) %><%
else %><%= item.text %><%
end %></p><%
if item.blocks? %>
<%= item.content %><%
end %>
</li><%
end %>
</ul>
</div>
<%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['verseblock',role].compact * ' ' %>"><%
if title? %>
<div class="title"><%= title %></div><%
end %>
<pre class="content"><%= content %></pre><%
if (attr? :attribution) or (attr? :citetitle) %>
<div class="attribution"><%
if attr? :citetitle %>
<cite><%= attr :citetitle %></cite><%
end
if attr? :attribution
if attr? :citetitle %><br><%
end %>
<%= "&#8212; #{attr :attribution}" %><%
end %>
</div><%
end %>
</div>
<%#encoding:UTF-8%><div<%= @id && %( id="#{@id}") %> class="<%= ['videoblock',@style,role].compact * ' ' %>"><%
if title? %>
<div class="title"><%= captioned_title %></div><%
end %>
<div class="content"><%
case attr :poster
when 'vimeo'
start_anchor = (attr? :start) ? %(#at=#{attr :start}) : nil
delimiter = '?'
autoplay_param = (option? :autoplay) ? %(#{delimiter}autoplay=1) : nil
delimiter = '&amp;' if autoplay_param
loop_param = (option? :loop) ? %(#{delimiter}loop=1) : nil
src = %(//player.vimeo.com/video/#{attr :target}#{start_anchor}#{autoplay_param}#{loop_param}) %>
<iframe<%= (attr? :width) ? %( width="#{attr :width}") : nil %><%= (attr? :height) ? %( height="#{attr :height}") : nil %> src="<%= src %>" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><%
when 'youtube'
params = ['rel=0']
params << %(start=#{attr :start}) if attr? :start
params << %(end=#{attr :end}) if attr? :end
params << 'autoplay=1' if option? :autoplay
params << 'loop=1' if option? :loop
params << 'controls=0' if option? :nocontrols
src = %(//www.youtube.com/embed/#{attr :target}?#{params * '&amp;'}) %>
<iframe<%= (attr? :width) ? %( width="#{attr :width}") : nil %><%= (attr? :height) ? %( height="#{attr :height}") : nil %> src="<%= src %>" frameborder="0"<%= (option? :nofullscreen) ? nil : ' allowfullscreen' %>></iframe><%
else %>
<video src="<%= media_uri(attr :target) %>"<%= (attr? :width) ? %( width="#{attr :width}") : nil %><%= (attr? :height) ? %( height="#{attr :height}") : nil %><%
if attr? :poster %> poster="<%= media_uri(attr :poster) %>"<% end
if option? :autoplay %> autoplay<% end
unless option? :nocontrols %> controls<% end
if option? :loop %> loop<% end %>>
Your browser does not support the video tag.
</video><%
end %>
</div>
</div>
<style type="text/css" media="screen">
/*
.nodes-image {
margin:-100;
}
*/
@import url("//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css");
.imageblock .content img, .image img {max-width: 900px;max-height: 300px;}
.deck h3, .deck h4 {display: block !important;margin-bottom:8px;margin-top:5px;}
.listingblock {margin:8px;}
.pull-bottom {position:relative;bottom:1em;}
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
.admonitionblock.note.speaker { display:none; }
</style>
<style type="text/css" media="screen">
/* #editor.maximize-editor .CodeMirror-code { font-size:24px; line-height:26px; } */
</style>
<article class="guide" ng-controller="AdLibDataController">
<carousel class="deck container-fluid">
<!--slide class="row-fluid">
<div class="col-sm-3">
<h3><%= doctitle(:sanitize => true) || (attr 'untitled-label') || 'Neo4j GraphGist'%></h3>
<p class="lead">Information</p>
<!dl>
<%
[:description, :keywords, :author, :copyright].each do |key|
if attr? key %><dt><%= key %>"</dt><dd><%= attr key %></dd><% end %>
<% end %>
</dl>
</div>
<div class="col-sm-9">
<figure>
<img style="width:300px" src="<%= attr :image%>"/>
</figure>
</div>
</slide-->
<%= content %>
</carousel>
</article>
<%#encoding:UTF-8%><%
if !notitle && has_header?
%><h1<%= @id && %( id="#{@id}") %>><%= @header.title %></h1><%
end %><%= content %><%
if footnotes? && !(attr? :nofootnotes) %>
<div id="footnotes">
<hr><%
footnotes.each do |fn| %><%= %(
<div class="footnote" id="_footnote_#{fn.index}">
<a href="#_footnoteref_#{fn.index}">#{fn.index}</a>. #{fn.text}
</div>) %><%
end %>
</div><%
end %>
<%#encoding:UTF-8%><%
case @type
when :xref
refid = (attr :refid) || @target
%><%= %(<a href="#{@target}">#{@text || @document.references[:ids].fetch(refid, %[[#{refid}]]).tr_s("\n", ' ')}</a>) %><%
when :ref %><%= %(<a id="#{@target}"></a>) %><%
when :bibref %><%= %(<a id="#{@target}"></a>[#{@target}]) %><%
else %><%= %(<a href="#{@target}"#{role? ? %[ class="#{role}"] : nil}#{(attr? :window) ? %[ target="#{attr :window}"] : nil}>#{@text}</a>) %><%
end %>
<%= @text %><br>
<%#encoding:UTF-8%><b class="button"><%= @text %></b>
<%#encoding:UTF-8%><%
if @document.attr? :icons, 'font' %><i class="conum" data-value="<%= @text %>"></i><b>(<%= @text %>)</b><%
elsif @document.attr? :icons %><img src="<%= icon_uri("callouts/#{@text}") %>" alt="<%= @text %>"><%
else %><b>(<%= @text %>)</b><%
end %>
<%#encoding:UTF-8%><%
idx = attr :index
if @type == :xref
%><%= %(<span class="footnoteref">[<a class="footnote" href="#_footnote_#{idx}" title="View footnote.">#{idx}</a>]</span>) %><%
else
%><%= %(<span class="footnote"#{@id && " id=\"_footnote_#{@id}\""}>[<a id="_footnoteref_#{idx}" class="footnote" href="#_footnote_#{idx}" title="View footnote.">#{idx}</a>]</span>) %><%
end %>
<%#encoding:UTF-8%><span class="<%= [@type,role].compact * ' ' %>"<%= (attr? :float) ? %( style="float: #{attr :float};") : nil %>><%
if @type == 'icon' && (@document.attr? :icons, 'font')
style_class = [%(icon-#{@target})]
style_class << %(icon-#{attr :size}) if attr? :size
style_class << %(icon-rotate-#{attr :rotate}) if attr? :rotate
style_class << %(icon-flip-#{attr :flip}) if attr? :flip
title_attr = (attr? :title) ? %( title="#{attr :title}") : nil
img = %(<i class="#{style_class * ' '}"#{title_attr}></i>)
elsif @type == 'icon' && !(@document.attr? :icons)
img = %([#{attr :alt}])
else
img_src = (@type == 'icon' ? (icon_uri @target) : (image_uri @target))
img_attrs = [:alt, :width, :height, :title].map {|name| (attr? name) ? %( #{name}="#{attr name}") : nil }.join
img = %(<img src="#{img_src}"#{img_attrs}>)
end
if attr? :link %><a class="image" href="<%= attr :link %>"<%= (attr? :window) ? %( target="#{attr :window}") : nil %>><%= img %></a><%
else %><%= img %><%
end %></span>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment