blob: 080a34cb14bb4413bc374281346c871525281f9d [file] [log] [blame]
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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}