Sha256: 7c77e7064ce9394500ce4ec68274f6d591a3b49e7424db2f94afcbe6d14bf553
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
require 'asciidoctor' require 'asciidoctor/extensions' require 'asciidoctor/latex/core_ext/colored_string' # module Asciidoctor::LaTeX class InjectHTML < Asciidoctor::Extensions::Postprocessor def process document, output output.gsub('</head>', $click_insertion) end end $click_insertion = <<EOF <style> .click .title { color: blue; } .click {margin-top: 0.5em; margin-bottom: 0.5em;} .openblock { margin-top: 1em; margin-bottom: 1em; } .openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; } </style> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script> var ready2; ready2 = function() { $(document).ready(function(){ $('.openblock.click').click( function() { $(this).find('.content').slideToggle('200'); } ) $('.openblock.click').find('.content').hide() $('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } ) $('.listingblock.click').find('.content').hide() }); } $(document).ready(ready2); $(document).on('page:load', ready2); </script> </head> EOF end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asciidoctor-latex-1.5.0.17.dev | lib/asciidoctor/latex/inject_html.rb |