blob: ac320060bd917e89048ab7f62fb3602c60f1060e [file] [log] [blame]
Shawn Pearce374f1842015-02-10 15:36:54 -08001// Copyright 2015 Google Inc. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
Sven Selbergd99004c2022-01-31 10:24:08 +010014{namespace com.google.gitiles.templates.Doc}
Shawn Pearce374f1842015-02-10 15:36:54 -080015
Jesse Costello-Good6f62c5d2021-02-02 12:05:06 -080016import * as common from 'com/google/gitiles/templates/Common.soy';
17
Shawn Pearce374f1842015-02-10 15:36:54 -080018/**
Patrick Hiesel564ab4b2018-06-06 13:13:49 +020019 * Default Doc Footer
Patrick Hiesel564ab4b2018-06-06 13:13:49 +020020 */
Tim Zhou3cc35482023-10-23 23:22:51 +000021{template customDocFooter modifiable="true" legacydeltemplatenamespace="gitiles.customDocFooter" usevarianttype="string"}
Jakub Vranac3962332019-03-04 11:21:52 +010022 {@param? sourceUrl: ?} /** url for source view of the page. */
23 {@param? logUrl: ?} /** url for log history of page. */
24 {@param? blameUrl: ?} /** url for blame of page source. */
Patrick Hiesel564ab4b2018-06-06 13:13:49 +020025<!-- default customDocFooter -->
26<footer class="Site-footer">
27 <div class="Footer">
Tim Zhou3cc35482023-10-23 23:22:51 +000028 {call common.footerPoweredBy /}
Patrick Hiesel564ab4b2018-06-06 13:13:49 +020029 <div class="Footer-links">
30 {if $sourceUrl}<a class="Footer-link" href="{$sourceUrl}">{msg desc="text for the source link"}source{/msg}</a>{/if}
31 {if $logUrl}<a class="Footer-link" href="{$logUrl}">{msg desc="text for the log link"}log{/msg}</a>{/if}
32 {if $blameUrl}<a class="Footer-link" href="{$blameUrl}">{msg desc="text for the blame link"}blame{/msg}</a>{/if}
33 </div>
34 </div>
35</footer>
Tim Zhou3cc35482023-10-23 23:22:51 +000036{/template}
Patrick Hiesel564ab4b2018-06-06 13:13:49 +020037
38/**
Shawn Pearce374f1842015-02-10 15:36:54 -080039 * Documentation page rendered from markdown.
Shawn Pearce374f1842015-02-10 15:36:54 -080040 */
Jesse Costello-Good6f62c5d2021-02-02 12:05:06 -080041{template markdownDoc}
Jakub Vranac3962332019-03-04 11:21:52 +010042 {@param? siteTitle: ?} /** h1 title from navbar.md. */
43 {@param pageTitle: ?} /** h1 title from specific page. */
44 {@param? logoUrl: ?} /** url of image logo. */
45 {@param? homeUrl: ?} /** url to jump to top of site. */
46 {@param? analyticsId: ?} /** Google Analytics Property ID. */
47 {@param? navbarHtml: ?} /** navar.md converted to SafeHtml. */
48 {@param? customVariant: ?} /** variant name for custom styling. */
Jakub Vrana21e70b72019-05-20 16:33:54 +020049 {@inject staticUrls: ?}
Andrew Bonventreb33426e2015-09-09 18:28:28 -040050<!DOCTYPE html>
51<html lang="en">
Shawn Pearce374f1842015-02-10 15:36:54 -080052<head>
Andrew Bonventreb33426e2015-09-09 18:28:28 -040053 <meta charset="utf-8">
Adrià Vilanova Martínez9b8a1eb2021-12-27 02:36:06 +010054 <meta name="viewport" content="width=device-width, initial-scale=1">
Shawn Pearce99cdbce2015-02-10 12:05:45 -080055 <title>
56 {if $siteTitle}{$siteTitle} -{sp}{/if}
57 {$pageTitle}
58 </title>
Jakub Vrana21e70b72019-05-20 16:33:54 +020059 <link rel="stylesheet" type="text/css" href="{$staticUrls.BASE_CSS_URL}" />
60 <link rel="stylesheet" type="text/css" href="{$staticUrls.DOC_CSS_URL}" />
61 <link rel="stylesheet" type="text/css" href="{$staticUrls.PRETTIFY_CSS_URL}" />
Tim Zhou3cc35482023-10-23 23:22:51 +000062 {call common.customHeadTagPart variant="'' + ($customVariant ?? '')" /}
Shawn Pearce374f1842015-02-10 15:36:54 -080063</head>
Andrew Bonventreb33426e2015-09-09 18:28:28 -040064<body class="Site">
Andrew Bonventre88a48282015-09-16 14:53:33 -040065 <header class="Site-header {if $navbarHtml}Site-header--withNavbar{/if}">
Andrew Bonventreb33426e2015-09-09 18:28:28 -040066 <div class="Header">
67 <div class="Header-title">
Andrew Bonventre88a48282015-09-16 14:53:33 -040068 {if $homeUrl}<a class="Header-anchor" href="{$homeUrl}">{/if}
69 {if $logoUrl}<img class="Header-anchorLogo" src="{$logoUrl}" alt="project logo" />{/if}
70 {if $siteTitle}<span class="Header-anchorTitle">{$siteTitle}</span>{/if}
Andrew Bonventreb33426e2015-09-09 18:28:28 -040071 {if $homeUrl}</a>{/if}
Shawn Pearce99cdbce2015-02-10 12:05:45 -080072 </div>
73 </div>
Andrew Bonventreb33426e2015-09-09 18:28:28 -040074 {if $navbarHtml}
Andrew Bonventre88a48282015-09-16 14:53:33 -040075 <nav class="Header-nav" role="navigation">
76 {$navbarHtml}
Shawn Pearce2e63c4e2017-09-01 14:03:58 -070077 </nav>
Andrew Bonventreb33426e2015-09-09 18:28:28 -040078 {/if}
79 </header>
80 <div class="Site-content Site-Content--markdown">
81 <div class="Container">
82 <div class="doc">
Jesse Costello-Good6f62c5d2021-02-02 12:05:06 -080083 {call common.streamingPlaceholder /}
Andrew Bonventreb33426e2015-09-09 18:28:28 -040084 </div>
Shawn Pearce374f1842015-02-10 15:36:54 -080085 </div>
Shawn Pearce374f1842015-02-10 15:36:54 -080086 </div>
Tim Zhou3cc35482023-10-23 23:22:51 +000087 {call customDocFooter variant="'' + ($customVariant ?? '')" /}
Shawn Pearcebc381a42015-06-22 12:17:43 -070088 {if $analyticsId}
89 /* From https://developers.google.com/analytics/devguides/collection/analyticsjs/ */
90 <script>
Jakub Vranaa3ec6542020-12-14 11:06:05 +010091 window.ga=window.ga||function(){lb}(ga.q=ga.q||[]).push(arguments){rb};ga.l=+new Date;
Shawn Pearcebc381a42015-06-22 12:17:43 -070092
93 ga('create', '{$analyticsId}', 'auto');
94 ga('send', 'pageview', {lb}title: '{$pageTitle}'{rb});
95 </script>
Jakub Vranaa3ec6542020-12-14 11:06:05 +010096 <script async src="https://www.google-analytics.com/analytics.js"></script>
Shawn Pearcebc381a42015-06-22 12:17:43 -070097 {/if}
Shawn Pearce374f1842015-02-10 15:36:54 -080098</body>
99</html>
100{/template}