Sha256: 9d5a128fc3aa0eb32fd481f2f6fd5c5dc7de9b1dcadf27374850e307d3f3e421
Contents?: true
Size: 1.07 KB
Versions: 9
Compression:
Stored size: 1.07 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; } .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
9 entries across 9 versions & 1 rubygems