Auto detect user OS and default tabs to it
parent
322e138f6b
commit
2b43ff9989
|
@ -10,15 +10,15 @@ aliases:
|
||||||
The vmware driver supports virtualization across all VMware based hypervisors.
|
The vmware driver supports virtualization across all VMware based hypervisors.
|
||||||
|
|
||||||
{{% tabs %}}
|
{{% tabs %}}
|
||||||
{{% tab "macOS" %}}
|
{{% mactab %}}
|
||||||
{{% readfile file="/docs/drivers/includes/vmware_macos_usage.inc" %}}
|
{{% readfile file="/docs/drivers/includes/vmware_macos_usage.inc" %}}
|
||||||
{{% /tab %}}
|
{{% /mactab %}}
|
||||||
{{% tab "Linux" %}}
|
{{% linuxtab %}}
|
||||||
No documentation is available yet.
|
No documentation is available yet.
|
||||||
{{% /tab %}}
|
{{% /linuxtab %}}
|
||||||
{{% tab "Windows" %}}
|
{{% windowstab %}}
|
||||||
No documentation is available yet.
|
No documentation is available yet.
|
||||||
{{% /tab %}}
|
{{% /windowstab %}}
|
||||||
{{% /tabs %}}
|
{{% /tabs %}}
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
|
|
|
@ -136,7 +136,7 @@ eval $(minikube podman-env)
|
||||||
You should now be able to use podman client on the command line on your host machine talking to the podman service inside the minikube VM:
|
You should now be able to use podman client on the command line on your host machine talking to the podman service inside the minikube VM:
|
||||||
|
|
||||||
{{% tabs %}}
|
{{% tabs %}}
|
||||||
{{% tab "Linux" %}}
|
{{% linuxtab %}}
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
podman-remote help
|
podman-remote help
|
||||||
|
@ -146,8 +146,8 @@ podman-remote help
|
||||||
Note: On Linux the remote client is called "podman-remote", while the local program is called "podman".
|
Note: On Linux the remote client is called "podman-remote", while the local program is called "podman".
|
||||||
{{% /pageinfo %}}
|
{{% /pageinfo %}}
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /linuxtab %}}
|
||||||
{{% tab "macOS" %}}
|
{{% mactab %}}
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
podman help
|
podman help
|
||||||
|
@ -157,8 +157,8 @@ podman help
|
||||||
Note: On macOS the remote client is called "podman", since there is no local "podman" program available.
|
Note: On macOS the remote client is called "podman", since there is no local "podman" program available.
|
||||||
{{% /pageinfo %}}
|
{{% /pageinfo %}}
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /mactab %}}
|
||||||
{{% tab "Windows" %}}
|
{{% windowstab %}}
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
podman help
|
podman help
|
||||||
|
@ -168,7 +168,7 @@ podman help
|
||||||
Note: On Windows the remote client is called "podman", since there is no local "podman" program available.
|
Note: On Windows the remote client is called "podman", since there is no local "podman" program available.
|
||||||
{{% /pageinfo %}}
|
{{% /pageinfo %}}
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /windowstab %}}
|
||||||
{{% /tabs %}}
|
{{% /tabs %}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ All you need is Docker (or similarly compatible) container or a Virtual Machine
|
||||||
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">1</strong></span>Installation</h2>
|
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">1</strong></span>Installation</h2>
|
||||||
|
|
||||||
{{% tabs %}}
|
{{% tabs %}}
|
||||||
{{% tab "Linux" %}}
|
{{% linuxtab %}}
|
||||||
|
|
||||||
For Linux users, we provide 3 easy download options:
|
For Linux users, we provide 3 easy download options:
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest
|
||||||
sudo rpm -ivh minikube-latest.x86_64.rpm
|
sudo rpm -ivh minikube-latest.x86_64.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /linuxtab %}}
|
||||||
{{% tab "macOS" %}}
|
{{% mactab %}}
|
||||||
|
|
||||||
If the [Brew Package Manager](https://brew.sh/) installed:
|
If the [Brew Package Manager](https://brew.sh/) installed:
|
||||||
|
|
||||||
|
@ -70,8 +70,8 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin
|
||||||
sudo install minikube-darwin-amd64 /usr/local/bin/minikube
|
sudo install minikube-darwin-amd64 /usr/local/bin/minikube
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /mactab %}}
|
||||||
{{% tab "Windows" %}}
|
{{% windowstab %}}
|
||||||
|
|
||||||
If the [Chocolatey Package Manager](https://chocolatey.org/) is installed, use it to install minikube:
|
If the [Chocolatey Package Manager](https://chocolatey.org/) is installed, use it to install minikube:
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ choco install minikube
|
||||||
|
|
||||||
Otherwise, download and run the [Windows installer](https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe)
|
Otherwise, download and run the [Windows installer](https://storage.googleapis.com/minikube/releases/latest/minikube-installer.exe)
|
||||||
|
|
||||||
{{% /tab %}}
|
{{% /windowstab %}}
|
||||||
{{% /tabs %}}
|
{{% /tabs %}}
|
||||||
|
|
||||||
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">2</strong></span>Start your cluster</h2>
|
<h2 class="step"><span class="fa-stack fa-1x"><i class="fa fa-circle fa-stack-2x"></i><strong class="fa-stack-1x text-primary">2</strong></span>Start your cluster</h2>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="tab-pane Linux" title="Linux" os="Linux">
|
||||||
|
{{ .Inner }}
|
||||||
|
</div>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="tab-pane Mac" title="macOS" os="Mac">
|
||||||
|
{{ .Inner }}
|
||||||
|
</div>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="tab-pane Windows" title="Windows" os="Windows">
|
||||||
|
{{ .Inner }}
|
||||||
|
</div>
|
|
@ -2,17 +2,20 @@
|
||||||
function initTabs() {
|
function initTabs() {
|
||||||
$('.tab-content').find('.tab-pane').each(function(idx, item) {
|
$('.tab-content').find('.tab-pane').each(function(idx, item) {
|
||||||
var navTabs = $(this).closest('.code-tabs').find('.nav-tabs'),
|
var navTabs = $(this).closest('.code-tabs').find('.nav-tabs'),
|
||||||
title = $(this).attr('title');
|
title = $(this).attr('title'),
|
||||||
navTabs.append('<li class="nav-tab"><a href="#" class="nav-tab">'+title+'</a></li>');
|
os = $(this).attr('os');
|
||||||
|
navTabs.append('<li class="nav-tab '+os+'"><a href="#" class="nav-tab">'+title+'</a></li>');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.code-tabs ul.nav-tabs').each(function() {
|
$('.code-tabs ul.nav-tabs').each(function() {
|
||||||
$(this).find("li:first").addClass('active');
|
let tabSelector = getTabSelector(this);
|
||||||
})
|
$(this).find('li'+tabSelector).addClass('active');
|
||||||
|
});
|
||||||
|
|
||||||
$('.code-tabs .tab-content').each(function() {
|
$('.code-tabs .tab-content').each(function() {
|
||||||
$(this).find("div:first").addClass('active');
|
let tabSelector = getTabSelector(this);
|
||||||
});
|
$(this).find('div'+tabSelector).addClass('active');
|
||||||
|
})
|
||||||
|
|
||||||
$('.nav-tabs a').click(function(e){
|
$('.nav-tabs a').click(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -25,3 +28,18 @@ function initTabs() {
|
||||||
tabPane.addClass('active');
|
tabPane.addClass('active');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getTabSelector = currElement => {
|
||||||
|
let osSelector = '.'+getUserOS();
|
||||||
|
let hasMatchingOSTab = $(currElement).find(osSelector).length;
|
||||||
|
return hasMatchingOSTab ? osSelector : ':first';
|
||||||
|
}
|
||||||
|
|
||||||
|
const getUserOS = () => {
|
||||||
|
let os = ['Linux', 'Mac', 'Windows'];
|
||||||
|
let userAgent = navigator.userAgent;
|
||||||
|
for (let currentOS of os) {
|
||||||
|
if (userAgent.indexOf(currentOS) !== -1) return currentOS;
|
||||||
|
}
|
||||||
|
return 'Linux';
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue