blob: 9ffbfbdabad3a5e98b9db1cb3f92310fe13127fc [file] [log] [blame]
/*
* Copyright 2018-present Facebook, Inc.
*
* Licensed 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.
*/
{namespace navigation}
/**
* @param currentnavid The navigation id of the loaded page
* @param page The filename of the target page
* @param folder href folder target
* @param text Navigation text
*/
{template .link}
{let $targetnavid}
{$folder}_{$page}
{/let}
{let $classname}
{if $targetnavid == $currentnavid}
navActiveItem
{/if}
{/let}
<li{if isNonnull($classname)} class="{$classname}"{/if}>
<a href="{ROOT}{$folder}/{$page}.html">{$text}</a>
</li>
{/template}
/**
* @param currentnavid The navigation id of the loaded page
* @param platform
* @param rules
*/
{template .platformBuildRuleLink}
<li><strong>{$platform}</strong></li>
{foreach $rule in $rules}
{let $ruletext}
{$rule}()
{/let}
{call .link}
{param currentnavid: $currentnavid /}
{param folder: 'rule' /}
{param page: $rule /}
{param text: $ruletext /}
{/call}
{/foreach}
{/template}