Official 1.17 Release Docs (#18011)
* feat: graduate TaintNodesByCondition to GA (#17073) * Promote StartupProbe to beta (enabled by default). (#17164) * Watch bookmarks to GA (#17026) * feat: graduate ScheduleDaemonSetPods to GA (#17350) * Update Docker installation instructions (#17405) * Use exact version numbers for installing Docker in Ubuntu (#17428) * Move CSIMigration and CSIMigrationGCE to Beta in Kubernetes v1.17 (#17478) * Promote NodeLease feature to GA (#17189) * Update docs for csi topology ga (#17408) * Update RunAsUsername to beta (#17460) * doc:Update RunAsUsername to beta * doc: update samples - kubernetes.io/os is no longer beta * Updating based on review feedback * Promote Node-specific volume limits to GA (#17432) * Promote PodShareProcessNamespace to stable (#17192) * Promote PodShareProcessNamespace to stable * Add for_k8s_version to feature-state label Co-Authored-By: Tim Bannister <tim@scalefactory.com> * Readd version-check to shareProcessNamespace task * Update service load balancer finalizer doc for GA (#17438) * Update Topology Manager docs (#17451) * Added information on how device plugins can take advantage of Topology Manager * Updated the Topology Manager documentation to include additionalinformation and update some out of date sections * Fix broken Topology Manager link (#17746) Part of What's Next Device Plugin section * Update CRD defaulting docs for GA (#17450) * Add documentation for VolumeSnapshot Beta (#17233) * Updating EndpointSlice documentation for beta release in 1.17 (#17411) * (docs/dualstack): v1.17 updates (#17457) * Add placehold doc updates for dualstack in 1.17 Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * Add Downward API and /etc/hosts Pod IP validation Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * remove addressed known issue via k/k pr 85246 Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * Remove known issue and add flag as part of k/k 79993 Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * remove follow up placeholders Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * Update verbiage Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * Make IP addressing consistent throughout the task Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * Update to status.podIPs Signed-off-by: Lachlan Evenson <lachlan.evenson@microsoft.com> * Update content/en/docs/tasks/network/validate-dual-stack.md Use set instead of env Co-Authored-By: Khaled Henidak (Kal) <khnidk@outlook.com> * add topology.kubernetes.io/zone, topology.kubernetes.io/region and node.kubernetes.io/instance-type labels to docs (#17498) Signed-off-by: Andrew Sy Kim <kiman@vmware.com> * Service topology alpha documentation (#17459) * Update list of feature flags for in-tree plugins migrated to CSI (#17533) Signed-off-by: Deep Debroy <ddebroy@docker.com> * Update Node concept for TaintNodesByCondition going GA (#17577) * feat: graduate ResourceQuotaScopeSelectors to GA in 1.17 (#17554) * kubeadm: update the upgrade documentation for 1.17 (#17587) * doc: Simplify Windows deployments with RuntimeClass (#16697) * doc: Simplify Windows deployments with RuntimeClass * Updating on review feedback * doc: Adding windows-build label from enhancement 1301 * update doc for kubelet option --reserved-cpus (#17648) * feat: update TaintNodesByCondition in feature gates table (#17377) * Update docs for v1 resource quota configuration (#17547) * AdmissionConfiguration v1 (#17548) * Update WebhookAdmissionConfiguration examples (#17549) * Update AWS EBS Migration Feature state (#16126) * Add resource version section to api-concepts documentation (#16910) * Add Resource Version semantics section to api concepts * Clarify risks of going back in time, add details about compaction and watch cache sizes * Apply suggestions from liggitt Co-Authored-By: Jordan Liggitt <jordan@liggitt.net> * remove pesudocode, apply feedback * Fix typo * Clarify equality rules * Cleanup kubectl generators docs (#17609) * Write ReplicationController without a space * Drop mentioning unsupported cluster versions * Fix capitalization for “API group” * Tweak wording * Avoid using deprecated generator in example * add Antrea description in dev-1.17 (#17919) * Promote VolumeSubpathEnvExpansion to GA * Reference Documentation for the Kubernetes API for 1.17 (#18019) * Update feature-gates.md (#18033) * Reference Documentation for kubectl Commands for 1.17 (#18017) * Update for v1.17 (#18034) * Update config.toml(release-1.17) for 1.17 (#18031)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
cf925bb688
commit
dff2f7b960
@@ -2016,12 +2016,6 @@ inspect them.</p>
|
||||
<td>If the requested object does not exist the command will return exit code 0. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -2670,7 +2664,7 @@ inspect them.</p>
|
||||
</code></pre>
|
||||
<p>Delete resources by filenames, stdin, resources and names, or by resources and label selector.</p>
|
||||
<p> JSON and YAML formats are accepted. Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector.</p>
|
||||
<p> Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must pass a grace period of 0 and specify the --force flag.</p>
|
||||
<p> Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must pass a grace period of 0 and specify the --force flag. Note: only a subset of resources support graceful deletion. In absence of the support, --grace-period is ignored.</p>
|
||||
<p> IMPORTANT: Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately.</p>
|
||||
<p> Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
@@ -2735,12 +2729,6 @@ inspect them.</p>
|
||||
<td>Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -2891,12 +2879,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion). </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -3031,12 +3013,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files to use to edit the resource </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -3288,12 +3264,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files identifying the resource to update the annotation </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -3565,7 +3535,7 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
</code></pre>
|
||||
<p>Diff configurations specified by filename or stdin between the current online configuration, and the configuration as it would be if applied.</p>
|
||||
<p> Output is always YAML.</p>
|
||||
<p> KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. By default, the "diff" command available in your path will be run with "-u" (unicode) and "-N" (treat new files as empty) options.</p>
|
||||
<p> KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. By default, the "diff" command available in your path will be run with "-u" (unified diff) and "-N" (treat absent files as empty) options.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<p><code>$ diff -f FILENAME</code></p>
|
||||
<h3 id="flags">Flags</h3>
|
||||
@@ -3671,12 +3641,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files to use to edit the resource </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -3815,12 +3779,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files identifying the resource to update the labels </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -4910,12 +4868,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files identifying the resource to get from a server. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -5028,12 +4980,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files identifying the resource to get from a server. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -5227,12 +5173,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Filename, directory, or URL to files identifying the resource to get from a server. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -5332,12 +5272,6 @@ viewing your workloads in a Kubernetes cluster.</p>
|
||||
<td>Groups to bind to the role </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -5848,12 +5782,6 @@ applications.</p>
|
||||
<td>Filename, directory, or URL to files containing the resource to describe </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>include-uninitialized</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>kustomize</td>
|
||||
<td>k</td>
|
||||
<td></td>
|
||||
@@ -5994,6 +5922,11 @@ applications.</p>
|
||||
<pre class="code-block example"><code class="lang-shell">kubectl logs <span class="hljs-attribute">--since</span>=1h nginx
|
||||
</code></pre>
|
||||
<blockquote class="code-block example">
|
||||
<p> Show logs from a kubelet with an expired serving certificate</p>
|
||||
</blockquote>
|
||||
<pre class="code-block example"><code class="lang-shell">kubectl logs <span class="hljs-comment">--insecure-skip-tls-verify-backend nginx</span>
|
||||
</code></pre>
|
||||
<blockquote class="code-block example">
|
||||
<p> Return snapshot logs from first container of a job named hello</p>
|
||||
</blockquote>
|
||||
<pre class="code-block example"><code class="lang-shell">kubectl logs <span class="hljs-keyword">job</span>/hello
|
||||
@@ -6042,6 +5975,12 @@ applications.</p>
|
||||
<td>If watching / following pod logs, allow for any errors that occur to be non-fatal </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>insecure-skip-tls-verify-backend</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>Skip verifying the identity of the kubelet that logs are requested from. In theory, an attacker could provide invalid log content back. You might want to use this if your kubelet serving certificates have expired. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>limit-bytes</td>
|
||||
<td></td>
|
||||
<td>0</td>
|
||||
@@ -6060,6 +5999,12 @@ applications.</p>
|
||||
<td>The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>prefix</td>
|
||||
<td></td>
|
||||
<td>false</td>
|
||||
<td>Prefix each log line with the log source (pod name and container name) </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>previous</td>
|
||||
<td>p</td>
|
||||
<td>false</td>
|
||||
@@ -6288,7 +6233,7 @@ applications.</p>
|
||||
<h1 id="top">top</h1>
|
||||
<p>Display Resource (CPU/Memory/Storage) usage.</p>
|
||||
<p> The top command allows you to see the resource consumption for nodes or pods.</p>
|
||||
<p> This command requires Heapster to be correctly configured and working on the server.</p>
|
||||
<p> This command requires Metrics Server to be correctly configured and working on the server.</p>
|
||||
<h3 id="usage">Usage</h3>
|
||||
<p><code>$ top</code></p>
|
||||
<hr>
|
||||
@@ -6948,6 +6893,11 @@ applications.</p>
|
||||
<pre class="code-block example"><code class="lang-shell"><span class="hljs-attribute">kubectl api-resources -o wide</span>
|
||||
</code></pre>
|
||||
<blockquote class="code-block example">
|
||||
<p> Print the supported API Resources sorted by a column</p>
|
||||
</blockquote>
|
||||
<pre class="code-block example"><code class="lang-shell">kubectl api-<span class="hljs-built_in">resources</span> --<span class="hljs-built_in">sort</span>-by=<span class="hljs-built_in">name</span>
|
||||
</code></pre>
|
||||
<blockquote class="code-block example">
|
||||
<p> Print the supported namespaced resources</p>
|
||||
</blockquote>
|
||||
<pre class="code-block example"><code class="lang-shell"><span class="hljs-attribute">kubectl</span> api-resources --namespaced=<span class="hljs-literal">true</span>
|
||||
@@ -7007,6 +6957,12 @@ applications.</p>
|
||||
<td>Output format. One of: wide|name. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sort-by</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>If non-empty, sort nodes list using specified field. The field can be either 'name' or 'kind'. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>verbs</td>
|
||||
<td></td>
|
||||
<td>[]</td>
|
||||
|
||||
@@ -3914,7 +3914,7 @@ image: nginx:1.10
|
||||
<TR><TD><CODE>readinessProbe</CODE><BR /><I><a href="#probe-v1-core">Probe</a></I></TD><TD>Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</TD></TR>
|
||||
<TR><TD><CODE>resources</CODE><BR /><I><a href="#resourcerequirements-v1-core">ResourceRequirements</a></I></TD><TD>Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/</TD></TR>
|
||||
<TR><TD><CODE>securityContext</CODE><BR /><I><a href="#securitycontext-v1-core">SecurityContext</a></I></TD><TD>Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/</TD></TR>
|
||||
<TR><TD><CODE>startupProbe</CODE><BR /><I><a href="#probe-v1-core">Probe</a></I></TD><TD>StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</TD></TR>
|
||||
<TR><TD><CODE>startupProbe</CODE><BR /><I><a href="#probe-v1-core">Probe</a></I></TD><TD>StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an beta feature enabled by default that can be disabled using the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes</TD></TR>
|
||||
<TR><TD><CODE>stdin</CODE><BR /><I>boolean</I></TD><TD>Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.</TD></TR>
|
||||
<TR><TD><CODE>stdinOnce</CODE><BR /><I>boolean</I></TD><TD>Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false</TD></TR>
|
||||
<TR><TD><CODE>terminationMessagePath</CODE><BR /><I>string</I></TD><TD>Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.</TD></TR>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
Kubernetes colors
|
||||
|
||||
kubernetes blue - rgb(50, 109, 230)
|
||||
dark blue - rgb(51, 113, 227)
|
||||
dark grey - rgb(48, 48, 48)
|
||||
light grey - rgb(161, 160, 158)
|
||||
*/
|
||||
|
||||
/* User agent CSS overrides */
|
||||
#sidebar-wrapper ul, #sidebar-wrapper li {
|
||||
margin-left: 10px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.body-content hr {
|
||||
margin: 2em 0;
|
||||
border-top: 2px solid dimgrey;
|
||||
border-bottom: 2px solid antiquewhite;
|
||||
}
|
||||
|
||||
.body-content table {
|
||||
margin-bottom: 1em;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.body-content table th, .body-content table td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.body-content table th {
|
||||
padding: 15px 20px;
|
||||
border-bottom: 1px solid lightsteelblue;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.body-content table td {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.body-content table tr:last-child {
|
||||
border-bottom: 1px solid lightsteelblue;
|
||||
}
|
||||
|
||||
.body-content table tr:nth-child(odd) > td {
|
||||
background-color: WhiteSmoke;
|
||||
}
|
||||
|
||||
.body-content table tr:nth-child(even) > td {
|
||||
background-color: Gainsboro;
|
||||
}
|
||||
|
||||
.body-content dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.body-content dd {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.body-content p, .body-content li, .body-content dt, .body-content dd {
|
||||
line-height: 1.6;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Brodoc CSS */
|
||||
|
||||
body > #wrapper {
|
||||
display: block;
|
||||
padding-bottom: 500px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 20%;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: whitesmoke;
|
||||
border-right: 2px solid slategrey;
|
||||
overflow-x: hidden;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper a {
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#sidebar-wrapper a.selected {
|
||||
font-style: bold;
|
||||
color: whitesmoke;
|
||||
border: 1px solid rgb(161, 160, 158);
|
||||
background-color: rgb(51, 113, 227);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper .strong-nav {
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sidebar-wrapper .nav-level-1.strong-nav {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper .copyright {
|
||||
padding-left: 10px;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 50px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#page-content-wrapper {
|
||||
margin-left: 20%;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.body-content h1, .body-content h2 {
|
||||
clear: both;
|
||||
border-bottom: 3px solid lightslategrey;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.body-content > h3, .body-content > h4, .body-content > h5, .body-content > h6, .body-content > p, .body-content > aside, .body-content > ul > li, .body-content > ul > li {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.body-content table tr td:not(:first-child) {
|
||||
overflow-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.body-content table tr td a {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.body-content p code {
|
||||
text-overflow: ellipsis;
|
||||
color: #802060;
|
||||
display: inline-block;
|
||||
font-size: smaller;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.body-content blockquote {
|
||||
border-left: 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.body-content pre.code-block {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.body-content blockquote p, .body-content pre {
|
||||
color: black;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.body-content blockquote.code-block {
|
||||
background: Wheat;
|
||||
}
|
||||
|
||||
.body-content pre.code-block code {
|
||||
word-wrap: normal;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.body-content code {
|
||||
color: Brown !important;
|
||||
}
|
||||
|
||||
.code-block {
|
||||
display: none;
|
||||
width: 60%;
|
||||
float: left;
|
||||
clear: right;
|
||||
}
|
||||
|
||||
.code-block.active {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
#code-tabs-wrapper {
|
||||
width: 55%;
|
||||
height: 60px;
|
||||
/* position: fixed; */
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#code-tabs-wrapper .code-tab-list {
|
||||
float: right;
|
||||
margin-top: 0;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
#code-tabs-wrapper .code-tab {
|
||||
color: white;
|
||||
/* display: inline-block; */
|
||||
padding: 0 30px;
|
||||
background: rgb(48, 48, 48);
|
||||
border: 1px solid rgb(161, 160, 158);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#code-tabs-wrapper .tab-selected {
|
||||
background: rgb(51, 113, 227);
|
||||
font-style: bold;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.side-nav a {
|
||||
color: black;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
||||
* Licensed under MIT
|
||||
* @author Ariel Flesler
|
||||
* @version 2.1.2
|
||||
*/
|
||||
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,196 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
/**
|
||||
* TODO: Refactor with intent toward pure functions. Mutation of state can lead to bugs and difficult debugging.
|
||||
*/
|
||||
|
||||
var toc = navData.toc;
|
||||
var flatToc = navData.flatToc.reverse();
|
||||
|
||||
function collectNodes(tocMap) {
|
||||
var tocNodes = {};
|
||||
tocMap.map(function(node, index) {
|
||||
var sectionNode = $('#' + node.section);
|
||||
var tocSubsections = {};
|
||||
tocItem = {section: sectionNode};
|
||||
var subsectionNodes;
|
||||
if (node.subsections) {
|
||||
subsectionNodes = (collectNodes(node.subsections));
|
||||
tocItem.subsections = subsectionNodes;
|
||||
}
|
||||
tocNodes[node.section] = tocItem;
|
||||
});
|
||||
return tocNodes;
|
||||
}
|
||||
var tocItems = collectNodes(toc);
|
||||
|
||||
function collectNodesFlat(tocMap, obj) {
|
||||
var collect = obj || {};
|
||||
tocMap.map(function(node, index) {
|
||||
var sectionNode = $('#' + node.section);
|
||||
tocItem = {section: sectionNode};
|
||||
if (node.subsections) {
|
||||
subsectionNodes = (collectNodesFlat(node.subsections, collect));
|
||||
}
|
||||
collect[node.section] = sectionNode;
|
||||
});
|
||||
return collect;
|
||||
}
|
||||
var tocFlat = collectNodesFlat(toc);
|
||||
|
||||
var prevSectionToken;
|
||||
var prevSubsectionToken;
|
||||
var activeTokensObj = {};
|
||||
|
||||
function scrollActions(scrollPosition) {
|
||||
var activeSection = checkNodePositions(toc, tocFlat, scrollPosition);
|
||||
var activeSubSection,
|
||||
prevL1Nav,
|
||||
currL1Nav,
|
||||
prevL2Nav,
|
||||
currL2Nav;
|
||||
|
||||
// No active section - return existing activeTokensObj (may be empty)
|
||||
if (!activeSection) {
|
||||
return activeTokensObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* This block deals with L1Nav sections
|
||||
*/
|
||||
|
||||
// If no previous token, set previous to current active and show L1Nav
|
||||
if (!prevSectionToken) {
|
||||
prevSectionToken = activeSection.token;
|
||||
currL1Nav = getNavNode(activeSection.token);
|
||||
currL1Nav.show('fast');
|
||||
}
|
||||
// If active is not the same as previous, hide previous L1Nav and show current L1Nav; set previous to current
|
||||
else if (activeSection.token !== prevSectionToken) {
|
||||
prevL1Nav = getNavNode(prevSectionToken);
|
||||
currL1Nav = getNavNode(activeSection.token);
|
||||
prevL1Nav.hide('fast');
|
||||
currL1Nav.show('fast');
|
||||
prevSectionToken = activeSection.token;
|
||||
}
|
||||
|
||||
/**
|
||||
* This block deals with L2Nav subsections
|
||||
*/
|
||||
|
||||
// If there is a subsections array and it has a non-zero length, set active subsection
|
||||
if (activeSection.subsections && activeSection.subsections.length !== 0) {
|
||||
activeSubSection = checkNodePositions(activeSection.subsections, tocFlat, scrollPosition);
|
||||
if (activeSubSection) {
|
||||
if (!prevSubsectionToken) {
|
||||
prevSubsectionToken = activeSubSection.token;
|
||||
currL2Nav = getNavNode(activeSubSection.token);
|
||||
currL2Nav.show('fast');
|
||||
} else if (activeSubSection.token !== prevSubsectionToken) {
|
||||
prevL2Nav = getNavNode(prevSubsectionToken);
|
||||
currL2Nav = getNavNode(activeSubSection.token);
|
||||
prevL2Nav.hide('fast');
|
||||
currL2Nav.show('fast');
|
||||
prevSubsectionToken = activeSubSection.token;
|
||||
}
|
||||
} else {
|
||||
prevL2Nav = getNavNode(prevSubsectionToken);
|
||||
prevL2Nav.hide('fast');
|
||||
prevSubsectionToken = null;
|
||||
}
|
||||
}
|
||||
activeTokensObj.L1 = prevSectionToken;
|
||||
activeTokensObj.L2 = prevSubsectionToken;
|
||||
return activeTokensObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks for active elements by scroll position
|
||||
*/
|
||||
|
||||
var prevElemToken;
|
||||
var activeElemToken;
|
||||
|
||||
function checkActiveElement(items, scrollPosition) {
|
||||
var offset = 50;
|
||||
var offsetScroll = scrollPosition + offset;
|
||||
var visibleNode;
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var token = items[i];
|
||||
var node = getHeadingNode(token);
|
||||
if (offsetScroll >= node.offset().top) {
|
||||
activeElemToken = token;
|
||||
}
|
||||
}
|
||||
if (!prevElemToken) {
|
||||
getNavElemNode(activeElemToken).addClass('selected');
|
||||
prevElemToken = activeElemToken;
|
||||
return;
|
||||
}
|
||||
if (activeElemToken !== prevElemToken) {
|
||||
getNavElemNode(prevElemToken).removeClass('selected');
|
||||
getNavElemNode(activeElemToken).addClass('selected');
|
||||
prevElemToken = activeElemToken;
|
||||
}
|
||||
return activeElemToken;
|
||||
}
|
||||
|
||||
function getHeadingNode(token) {
|
||||
return $('#' + token);
|
||||
}
|
||||
|
||||
function getNavNode(token) {
|
||||
return $('#' + token + '-nav');
|
||||
}
|
||||
|
||||
function getNavElemNode(token) {
|
||||
return $('#sidebar-wrapper > ul a[href="#' + token + '"]');
|
||||
}
|
||||
|
||||
function checkNodePositions(nodes, flatNodeMap, scrollPosition) {
|
||||
var activeNode;
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var item = nodes[i];
|
||||
var node = flatNodeMap[item.section];
|
||||
var nodeTop = node.offset().top - 50;
|
||||
if (scrollPosition >= nodeTop) {
|
||||
activeNode = {token: item.section, node: node};
|
||||
|
||||
if (item.subsections) {
|
||||
activeNode.subsections = item.subsections;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return activeNode;
|
||||
}
|
||||
|
||||
function scrollToNav(token) {
|
||||
setTimeout(function() {
|
||||
var scrollPosition = $(window).scrollTop();
|
||||
var activeSectionTokens = scrollActions(scrollPosition);
|
||||
var activeElemToken = checkActiveElement(flatToc, scrollPosition);
|
||||
var navNode = $('#sidebar-wrapper > ul a[href="#' + token + '"]');
|
||||
$('#sidebar-wrapper').scrollTo(navNode, {duration: 'fast', axis: 'y'});
|
||||
}, 200);
|
||||
}
|
||||
|
||||
$(window).on('hashchange', function(event) {
|
||||
var scrollPosition = $(window).scrollTop();
|
||||
var activeSectionTokens = scrollActions(scrollPosition);
|
||||
var activeElemToken = checkActiveElement(flatToc, scrollPosition);
|
||||
var scrollToken = activeSectionTokens.L2 ? activeSectionTokens.L2 : activeSectionTokens.L1;
|
||||
scrollToNav(scrollToken);
|
||||
var token = location.hash.slice(1);
|
||||
});
|
||||
|
||||
var scrollPosition = $(window).scrollTop();
|
||||
scrollActions(scrollPosition);
|
||||
checkActiveElement(flatToc, scrollPosition);
|
||||
// TODO: prevent scroll on sidebar from propagating to window
|
||||
$(window).on('scroll', function(event) {
|
||||
var scrollPosition = $(window).scrollTop();
|
||||
var activeSectionTokens = scrollActions(scrollPosition);
|
||||
var activeElemToken = checkActiveElement(flatToc, scrollPosition);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user