forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-4317, FLIP-3] [docs] Restructure docs
- Add redirect layout - Remove Maven artifact name warning - Add info box if stable, but not latest - Add font-awesome 4.6.3 - Add sidenav layout This closes apache#2387.
- Loading branch information
Showing
225 changed files
with
4,748 additions
and
1,839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
<!-- | ||
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. | ||
--> | ||
|
||
{% comment %} | ||
============================================================================== | ||
Extract the active nav IDs. | ||
============================================================================== | ||
{% endcomment %} | ||
|
||
{% assign active_nav_ids = site.array %} | ||
{% assign parent_id = page.nav-parent_id %} | ||
|
||
{% for i in (1..10) %} | ||
{% if parent_id %} | ||
{% assign active_nav_ids = active_nav_ids | push: parent_id %} | ||
{% assign current = (site.pages | where: "nav-id" , parent_id | sort: "nav-pos") %} | ||
{% if current.size > 0 %} | ||
{% assign parent_id = current[0].nav-parent_id %} | ||
{% else %} | ||
{% break %} | ||
{% endif %} | ||
{% else %} | ||
{% break %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% comment %} | ||
============================================================================== | ||
Build the nested list from nav-id and nav-parent_id relations. | ||
============================================================================== | ||
This builds a nested list from all pages. The fields used to determine the | ||
structure are: | ||
|
||
- 'nav-id' => ID of this page. Other pages can use this ID as their | ||
parent ID. | ||
- 'nav-parent_id' => ID of the parent. This page will be listed under | ||
the page with id 'nav-parent_id'. | ||
|
||
Level 0 is made up of all pages, which have nav-parent_id set to 'root'. | ||
|
||
The 'title' of the page is used as the default link text. You can | ||
override this via 'nav-title'. The relative position per navigational | ||
level is determined by 'nav-pos'. | ||
{% endcomment %} | ||
|
||
{% assign elementsPosStack = site.array %} | ||
{% assign posStack = site.array %} | ||
|
||
{% assign elements = site.array %} | ||
{% assign children = (site.pages | where: "nav-parent_id" , "root" | sort: "nav-pos") %} | ||
{% if children.size > 0 %} | ||
{% assign elements = elements | push: children %} | ||
{% endif %} | ||
|
||
{% assign elementsPos = 0 %} | ||
{% assign pos = 0 %} | ||
|
||
<div class="sidenav-logo"> | ||
<p><a href="{{ site.baseurl }}"><img class="bottom" alt="Apache Flink" src="{{ site.baseurl }}/page/img/navbar-brand-logo.jpg"></a> v{{ site.version }}</p> | ||
</div> | ||
<ul id="sidenav"> | ||
{% for i in (1..10000) %} | ||
{% if pos >= elements[elementsPos].size %} | ||
{% if elementsPos == 0 %} | ||
{% break %} | ||
{% else %} | ||
{% assign elementsPos = elementsPosStack | last %} | ||
{% assign pos = posStack | last %} | ||
</li></ul></div> | ||
{% assign elementsPosStack = elementsPosStack | pop %} | ||
{% assign posStack = posStack | pop %} | ||
{% endif %} | ||
{% else %} | ||
{% assign this = elements[elementsPos][pos] %} | ||
|
||
{% if this.url == page.url %} | ||
{% assign active = true %} | ||
{% elsif this.nav-id and active_nav_ids contains this.nav-id %} | ||
{% assign active = true %} | ||
{% else %} | ||
{% assign active = false %} | ||
{% endif %} | ||
|
||
{% capture title %}{% if this.nav-title %}{{ this.nav-title }}{% else %}{{ this.title }}{% endif %}{% endcapture %} | ||
{% capture target %}"{{ site.baseurl }}{{ this.url }}"{% if active %} class="active"{% endif %}{% endcapture %} | ||
{% capture overview_target %}"{{ site.baseurl }}{{ this.url }}"{% if this.url == page.url %} class="active"{% endif %}{% endcapture %} | ||
|
||
{% assign pos = pos | plus: 1 %} | ||
{% if this.nav-id %} | ||
{% assign children = (site.pages | where: "nav-parent_id" , this.nav-id | sort: "nav-pos") %} | ||
{% if children.size > 0 %} | ||
{% capture collapse_target %}"#collapse-{{ i }}" data-toggle="collapse"{% if active %} class="active"{% endif %}{% endcapture %} | ||
{% capture expand %}{% unless active %} <i class="fa fa-caret-down pull-right" aria-hidden="true" style="padding-top: 4px"></i>{% endunless %}{% endcapture %} | ||
<li><a href={{ collapse_target }}>{{ title }}{{ expand }}</a><div class="collapse{% if active %} in{% endif %}" id="collapse-{{ i }}"><ul> | ||
{% if this.nav-show_overview %}<li><a href={{ overview_target }}>Overview</a></li>{% endif %} | ||
{% assign elements = elements | push: children %} | ||
{% assign elementsPosStack = elementsPosStack | push: elementsPos %} | ||
{% assign posStack = posStack | push: pos %} | ||
|
||
{% assign elementsPos = elements.size | minus: 1 %} | ||
{% assign pos = 0 %} | ||
{% else %} | ||
<li><a href={{ target }}>{{ title }}</a></li> | ||
{% endif %} | ||
{% else %} | ||
<li><a href={{ target }}>{{ title }}</a></li> | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
<li class="divider"></li> | ||
<li><a href="http://flink.apache.org"><i class="fa fa-external-link" aria-hidden="true"></i> Project Page</a></li> | ||
</ul> | ||
|
||
<div class="sidenav-search-box"> | ||
<form class="navbar-form" role="search" action="{{site.baseurl}}/search-results.html"> | ||
<div class="form-group"> | ||
<input type="text" class="form-control" size="16px" name="q" placeholder="Search Docs"> | ||
</div> | ||
<button type="submit" class="btn btn-default">Go</button> | ||
</form> | ||
</div> | ||
|
||
<div class="sidenav-versions"> | ||
<div class="dropdown"> | ||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Pick Docs Version | ||
<span class="caret"></span></button> | ||
<ul class="dropdown-menu"> | ||
{% for d in site.previous_docs %} | ||
<li><a href="{{ d[1] }}">v{{ d[0] }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> |
Oops, something went wrong.