| <#ftl nsPrefixes={"D":"http://docbook.org/ns/docbook"} stripText=true> |
| <#-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <#import "util.ftl" as u> |
| <#import "footer.ftlh" as footer> |
| <#import "header.ftlh" as header> |
| <#import "navigation.ftlh" as nav> |
| <#import "google.ftlh" as google> |
| <#import "node-handlers.ftlh" as defaultNodeHandlers> |
| <#import "customizations.ftlh" as customizations> |
| <#assign nodeHandlers = [customizations, defaultNodeHandlers]> |
| <@page> |
| <#assign titleElement = u.getRequiredTitleElement(.node)> |
| <#assign siteTitle = u.getRequiredTitleAsString(.node?root.*)> |
| <@head /> |
| |
| <body itemscope itemtype="https://schema.org/Code"><#lt> |
| <meta itemprop="url" content="${deployUrl}"> |
| <meta itemprop="name" content="${siteTitle}"> |
| |
| <@browserWarning /> |
| <@header.header /> |
| <div class="main-content site-width"> |
| <div class="content-wrapper<#if disableJavaScript> no-toc</#if>"> |
| <@dynamicToc /> |
| <@pageContent /> |
| </div> |
| </div> |
| <@footer.footer /> |
| </body><#lt> |
| </@page> |
| |
| |
| <#macro head> |
| <#local siteTitle = u.getRequiredTitleAsString(.node?root.*)> |
| <#local sectionTitle = seoMetaTitleOverride!u.titleToString(titleElement)> |
| <#local fullTitle = seoMetaFullTitleOverride! |
| (sectionTitle != siteTitle)?then(sectionTitle + " - " + siteTitle, sectionTitle)> |
| <#compress> |
| <head prefix="og: http://ogp.me/ns#"> |
| <meta charset="utf-8"> |
| <title>${fullTitle}</title> |
| |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| <meta name="viewport" content="width=device-width,initial-scale=1"> |
| <meta name="format-detection" content="telephone=no"> |
| |
| <meta property="og:site_name" content="${siteTitle}"> |
| <meta property="og:title" content="${sectionTitle}"> |
| <#if seoMetaDescription??> |
| <meta name="description" content="${seoMetaDescription}"> |
| <meta name="og:description" content="${seoMetaDescription}"> |
| </#if> |
| <meta property="og:locale" content="${.locale}"> |
| |
| <@canonicalUrlMeta /> |
| |
| <link rel="icon" href="favicon.png" type="image/png"><#-- @todo: pull this in dynamically --> |
| <@css /> |
| |
| <#if !offline && onlineTrackerHTML??> |
| ${onlineTrackerHTML?noEsc} |
| </#if> |
| <#if !offline && cookieConsentScriptURL??> |
| <script type="text/javascript" src="${cookieConsentScriptURL}"></script> |
| </#if> |
| </head> |
| </#compress> |
| </#macro> |
| |
| |
| <#macro canonicalUrlMeta> |
| <#if deployUrl?? && getPageType() != 'docgen:search_results'> |
| <#local urlPath = CreateLinkFromID(.node.@id)> |
| <#local canonicalUrl = deployUrl?ensureEndsWith("/") + urlPath?removeBeginning("/")> |
| <meta property="og:url" content="${canonicalUrl}"> |
| <link rel="canonical" href="${canonicalUrl}"> |
| </#if> |
| </#macro> |
| |
| |
| <#macro css> |
| <#if !offline> |
| <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:500,700,400,300|Droid+Sans+Mono"><#lt> |
| </#if> |
| <link rel="stylesheet" type="text/css" href="docgen-resources/docgen.min.css?${transformStartTime?long?c}"><#lt> |
| </#macro> |
| |
| |
| <#macro browserWarning> |
| <!--[if lte IE 9]> |
| <div style="background-color: #C00; color: #fff; padding: 12px 24px;">Please use a modern browser to view this website.</div> |
| <![endif]--><#rt> |
| </#macro> |
| |
| |
| <#macro page> |
| <!doctype html><#lt> |
| <#if offline && copyrightComment?hasContent> |
| <!--<#lt> |
| ${copyrightComment}<#lt> |
| --><#lt> |
| </#if> |
| <!-- Generated by FreeMarker/Docgen from DocBook --><#lt> |
| <html lang="en" class="page-type-${getPageType()?replace(':', '-')?replace('_', '-')}"><#lt> |
| <#nested> |
| </html><#lt> |
| </#macro> |
| |
| |
| <#macro dynamicToc> |
| <div id="table-of-contents-wrapper" class="col-left"> |
| <#-- table of contents generated by js --> |
| <#-- execute immediately to prevent page jerking --> |
| <#if !disableJavaScript> |
| <script><@nav.breadcrumbJs /></script> |
| <script src="toc.js?${transformStartTime?long?c}"></script> |
| <script src="docgen-resources/main.min.js?${transformStartTime?long?c}"></script> |
| </#if> |
| <#list sideTOCLogos!> |
| <div class="side-toc-logos"> |
| <#items as logo> |
| <div class="side-toc-logo"> |
| <a href="${logo.href}" target="_blank"><img src="${logo.src}" alt="${logo.alt}" /></a> |
| </div> |
| </#items> |
| </div> |
| </#list> |
| </div> |
| </#macro> |
| |
| |
| <#macro pageContent> |
| <#local pageType = getPageType()> |
| <div class="col-right"><#t> |
| <div class="page-content"><#t> |
| <#compress> |
| <div class="page-title"><#t> |
| <#if !simpleNavigationMode> |
| <@nav.pagers class="top" /><#t> |
| </#if> |
| <div class="title-wrapper"><#t> |
| <#visit titleElement using nodeHandlers><#t> |
| </div><#t> |
| </div><#t> |
| </#compress> |
| <#-- - Render either ToF (Table of Files) or Page ToC; --> |
| <#-- both are called, but at least one of them will be empty: --> |
| <#if pageType == "docgen:search_results"> |
| <@google.searchResults /> |
| <#elseIf pageType == "index" || pageType == "glossary"> |
| <#visit .node using nodeHandlers> |
| <#elseIf pageType == "docgen:detailed_toc"> |
| <@toc att="docgen_detailed_toc_element" maxDepth=99 /><#t> |
| <#else> |
| <@toc att="docgen_file_element" maxDepth=maxTOFDisplayDepth |
| title=(.node?parent?nodeType == "document")?then('Table of Contents', 'Section Contents') |
| /><#t> |
| <@toc att="docgen_page_toc_element" maxDepth=99 minLength=2 title="Page Contents" /><#t> |
| <#-- - Render the usual content, like <para>-s etc.: --> |
| <#list .node.* as child> |
| <#if child.@docgen_file_element?size == 0 && !["title", "subtitle", "info"]?seqContains(child?nodeName)> |
| <#visit child using nodeHandlers> |
| </#if> |
| </#list> |
| </#if> |
| <@footnotes /> |
| <#if !simpleNavigationMode> |
| <div class="bottom-pagers-wrapper"><#t> |
| <@nav.pagers class="bottom" /><#t> |
| </div><#t> |
| </#if> |
| </div><#t> |
| </div><#t> |
| </#macro> |
| |
| |
| <#macro footnotes> |
| <#-- Render footnotes, if any: --> |
| <#local footnotes = defaultNodeHandlers.footnotes> |
| <#if footnotes?size != 0> |
| <div id="footnotes"> |
| Footnotes: |
| <ol> |
| <#list footnotes as footnote> |
| <li><a name="autoid_footnote_${footnote?counter}"></a>${footnote}</li> |
| </#list> |
| </ol> |
| </div> |
| </#if> |
| </#macro> |
| |
| |
| <#macro toc att maxDepth minLength=1 title=''> |
| <#compress> |
| <#local tocElems = .node["*[@${att}]"]> |
| <#if (tocElems?size >= minLength)> |
| <div class="page-menu"> |
| <#if title != ''> |
| <div class="page-menu-title">${title}</div> |
| </#if> |
| <@toc_inner tocElems=tocElems att=att maxDepth=maxDepth curDepth=1 /><#t> |
| </div> |
| </#if> |
| </#compress> |
| </#macro> |
| |
| |
| <#macro toc_inner tocElems att maxDepth curDepth=1> |
| <#compress> |
| <#if tocElems?size == 0><#return></#if> |
| |
| <ul><#t> |
| <#list tocElems as tocElem> |
| <li><#t> |
| <a class="page-menu-link" href="${CreateLinkFromID(tocElem.@id)}" data-menu-target="${tocElem.@id}"><#t> |
| <#recurse u.getRequiredTitleElement(tocElem) using nodeHandlers><#t> |
| </a><#t> |
| <#if (curDepth < maxDepth)> |
| <@toc_inner tocElem["*[@${att}]"], att, maxDepth, curDepth + 1 /><#t> |
| </#if> |
| </li><#t> |
| </#list> |
| </ul><#t> |
| </#compress> |
| </#macro> |
| |
| |
| <#function getPageType> |
| <#return pageType!.node?nodeName> |
| </#function> |