- def pretty_path_toc_item(toc_item) - Epuber::Helper.destination_path_for_toc_item(toc_item, file_resolver, file_resolver.destination_path) - end - def pretty_path(file_request) - file = file_resolver.file_from_request(file_request) - path = file.destination_path - pattern = file_request.source_pattern - fragment_index = pattern.index('#') - path += pattern[fragment_index..-1] unless fragment_index.nil? - path - end mixin body_header(current) #header_bg #header ul li(class: 'selected' if current == 'home' || current.nil?): a(href: '/')= book.title li(class: 'selected' if current == 'toc'): a(href: '/toc/') Toc li(class: 'selected' if current == 'files'): a(href: '/files/') Files mixin body_footer #footer p Epuber v#{Epuber::VERSION} | © #{Time.now.year} Roman Kříž mixin page(title: nil, header_id: nil) html head - if title.nil? title #{book.title} | Epuber - else title #{title} | #{book.title} | Epuber - end link(rel: "stylesheet", type: "text/css", href: "/server/raw/basic.styl") body +body_header(header_id) #main - default_block.call +body_footer