== Select a Theme For the default themes `Uno` of J1 Template, the following _Rouge_ themes are used: * theme_light: based on theme `igorpro` * theme_dark: based on theme `monokai.sublime` The *default* themes used for the J1 Template can be configured with the global *template config* file `~/_data/j1_config.yml`. [source, yaml] ---- # ------------------------------------------------------------------------------ # HIGHLIGHTERs # rouge: theme_light: uno.light theme_dark: uno.dark ---- To preview *all* themes supported by *J1 Template*, make your selection from the button *AVAILABLE THEMES* below. ++++
++++ === Liquid code [source, liquid] ---- Hello {{ 'now' | date: "%Y %h" }} {% comment %} if item.quantity is 4... {% endcomment %} {% for i in (1..item.quantity) %} {{ i }} {% endfor %} ---- === Javascript code [source, javascript] ---- // helper functions // function styleSheetLoaded(styleSheet) { var sheets = document.styleSheets, stylesheet = sheets[(sheets.length - 1)]; // find CSS file 'styleSheetName' in document for(var i in document.styleSheets) { if(sheets[i].href && sheets[i].href.indexOf(styleSheet) > -1) { return true;; } } } ---- === Ruby code [source, ruby] ---- require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' include Asciidoctor <1> Asciidoctor::Extensions.register do class J1BlockMacro < Extensions::BlockMacroProcessor use_dsl named :banner name_positional_attributes 'role' def process parent, target, attrs html = %(
) create_pass_block parent, html, attrs, subs: nil end end block_macro J1BlockMacro end ---- <1> don't miss to load the Asciidoctor ruby