Fixed comments
This commit is contained in:
parent
044bab0e3f
commit
d3715aa900
|
|
@ -65,14 +65,9 @@
|
|||
weight = 3
|
||||
identifier = "scheduler"
|
||||
|
||||
[[docs]]
|
||||
name = "SimpleDeployment"
|
||||
weight = 4
|
||||
identifier = "simpledeployment"
|
||||
|
||||
[[docs]]
|
||||
name = "Contribution"
|
||||
weight = 5
|
||||
weight = 4
|
||||
identifier = "contribution"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
+++
|
||||
title = "Basic Deployment Of Volcano"
|
||||
|
||||
|
||||
date = 2019-07-18
|
||||
lastmod = 2019-07-18
|
||||
|
||||
draft = false # Is this a draft? true/false
|
||||
toc = true # Show table of contents? true/false
|
||||
type = "docs" # Do not modify.
|
||||
# Add menu entry to sidebar.
|
||||
linktitle = "SimpleDeployment"
|
||||
[menu.docs]
|
||||
parent = "simpledeployment"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
## pre requisites
|
||||
|
||||
* [Install-docker](https://docs.docker.com/install/)
|
||||
|
||||
* Choosing a Kubernetes cluster (Kubernetes 1.12+ with CRD support).
|
||||
To get started with volcano, you need a Kubernetes cluster.
|
||||
If you aren't sure which Kubernetes platform is right for you, see [Picking the Right Solution](https://kubernetes.io/docs/setup/).
|
||||
|
||||
* For Example refer the [minikube setup](https://github.com/volcano-sh/website/tree/master/content/en/docs/getting-started-minikube.md)
|
||||
|
||||
* optional [Install-helm](https://helm.sh/docs/using_helm/)
|
||||
|
||||
### Volcano Deployment
|
||||
|
||||
#### using helm
|
||||
```
|
||||
Add helm repo using following command,
|
||||
|
||||
* helm repo add volcano https://volcano-sh.github.io/charts
|
||||
|
||||
Install Volcano using following command,
|
||||
|
||||
* helm install volcano/volcano --namespace <namespace> --name <specified-name>
|
||||
|
||||
e.g :
|
||||
* helm install volcano/volcano --namespace volcano-trial --name volcano-trial
|
||||
```
|
||||
|
||||
#### Simple way
|
||||
```
|
||||
* mkdir -p $GOPATH/src/volcano-sh/
|
||||
* cd $GOPATH/src/volcano.sh/
|
||||
* git clone --recursive https://github.com/volcano-sh/volcano.git
|
||||
|
||||
* cd $GOPATH/src/volcano.sh/volcano
|
||||
* make images
|
||||
|
||||
* bash ./hack/local-up-volcano.sh
|
||||
```
|
||||
or
|
||||
```
|
||||
Install volcano k8s resources
|
||||
|
||||
* kubectl apply -f https://raw.githubusercontent.com/volcano-sh/volcano/master/installer/volcano-development.yaml
|
||||
|
||||
Install default-queue for volcano scheduler, note that the crd resources should be ready before this.
|
||||
|
||||
* kubectl apply -f https://raw.githubusercontent.com/volcano-sh/volcano/master/installer/helm/chart/volcano/templates/default-queue.yaml
|
||||
```
|
||||
|
|
@ -50,14 +50,15 @@ The goal of the community is to develop a volcano system which is useful for run
|
|||
|
||||
# Getting started
|
||||
|
||||
- Read the [setup](https://github.com/volcano-sh/website/blob/master/content/en/docs/basicdeployment.md) for build/deploy instructions.
|
||||
- Read the [setup](https://github.com/volcano-sh/website/blob/master/content/en/docs/deployment.md) for build/deploy instructions.
|
||||
|
||||
|
||||
# Your First Contribution
|
||||
|
||||
We will help you to contribute in different areas like filing issues, developing features, fixing critical bugs and getting your work reviewed and merged.
|
||||
|
||||
If you have questions about the development process, feel free to jump into our [Slack Channel](https://github.com/volcano-sh/volcano/blob/master/slack-invitation) or join our [mailing list](https://groups.google.com/forum/#!forum/volcano-sh).
|
||||
If you have questions about the development process, feel free to jump into our [Slack Channel](https://volcano-sh.slack.com) or (Signup [here](https://join.slack.com/t/volcano-sh/shared_invite/enQtNTU5NTU3NDU0MTc4LTgzZTQ2MzViNTFmNDg1ZGUyMzcwNjgxZGQ1ZDdhOGE3Mzg1Y2NkZjk1MDJlZTZhZWU5MDg2MWJhMzI3Mjg3ZTk))
|
||||
or join our [mailing list](https://groups.google.com/forum/#!forum/volcano-sh).
|
||||
|
||||
## Find something to work on
|
||||
|
||||
|
|
|
|||
|
|
@ -1,181 +0,0 @@
|
|||
+++
|
||||
title = "Minikube for Volcano"
|
||||
toc = true
|
||||
bref = "This document will outline steps that will get your local installation of Mikikube. Minikube runs a simple, single-node Kubernetes cluster inside a virtual machine (VM)."
|
||||
# Add menu entry to sidebar.
|
||||
linktitle = "Minikube for Volcano Deployment"
|
||||
[menu.docs]
|
||||
parent = "simpledeployment"
|
||||
weight = 2
|
||||
+++
|
||||
By the end of this document, you'll have a local installation of Minikube kubernetes cluster
|
||||
|
||||
### Prerequisites
|
||||
- Laptop, Desktop or a Workstation
|
||||
- >= 12GB RAM
|
||||
- >= 8 CPU Cores
|
||||
- ~100GB or more Disk Capacity
|
||||
- Optional: GPU card
|
||||
- Mac OS X or Linux (Ubuntu/RedHat/CentOS)
|
||||
- sudo or admin access on the local machine
|
||||
- Access to an Internet connection with reasonable bandwidth
|
||||
- A hypervisor such as VirtualBox, Vmware Fusion, KVM etc.
|
||||
|
||||
### Install a Hypervisor
|
||||
If you do not already have a hypervisor or a virtualizer installed, install a new one. Once the hypervisor is installed, you don't need to start or use it directly. Minikube will automatically invoke the hypervisor to start the VM.
|
||||
|
||||
##### Mac OS X
|
||||
Install [Virtual Box](https://www.virtualbox.org/wiki/Downloads) or [VMware Fusion](https://www.vmware.com/products/fusion).
|
||||
|
||||
##### Ubuntu
|
||||
Install [Virtual Box](https://www.virtualbox.org/wiki/Downloads) or [KVM](http://www.linux-kvm.org/).
|
||||
|
||||
The KVM2 driver is intended to replace KVM driver. The KVM2 driver is maintained by the minikube team, and is built, tested and released with minikube.
|
||||
For installing KVM:
|
||||
|
||||
```
|
||||
# Install libvirt and qemu-kvm on your system, e.g.
|
||||
# Debian/Ubuntu (for older Debian/Ubuntu versions, you may have to use libvirt-bin instead of libvirt-clients and libvirt-daemon-system)
|
||||
$ sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm
|
||||
|
||||
# Add yourself to the libvirt group so you don't need to sudo
|
||||
# NOTE: For older Debian/Ubuntu versions change the group to `libvirtd`
|
||||
$ sudo usermod -a -G libvirt $(whoami)
|
||||
|
||||
# Update your current session for the group change to take effect
|
||||
# NOTE: For older Debian/Ubuntu versions change the group to `libvirtd`
|
||||
$ newgrp libvirt
|
||||
```
|
||||
Then install the driver itself:
|
||||
|
||||
```
|
||||
curl -Lo docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \
|
||||
&& chmod +x docker-machine-driver-kvm2 \
|
||||
&& sudo cp docker-machine-driver-kvm2 /usr/local/bin/ \
|
||||
&& rm docker-machine-driver-kvm2
|
||||
```
|
||||
|
||||
##### CentOS
|
||||
Install [Virtual Box](https://www.virtualbox.org/wiki/Downloads) or [KVM](http://www.linux-kvm.org/).
|
||||
|
||||
For installing KVM:
|
||||
```
|
||||
# Install libvirt and qemu-kvm on your system
|
||||
$ sudo yum install libvirt-daemon-kvm qemu-kvm
|
||||
|
||||
# Add yourself to the libvirt group so you don't need to sudo
|
||||
$ sudo usermod -a -G libvirt $(whoami)
|
||||
|
||||
# Update your current session for the group change to take effect
|
||||
$ newgrp libvirt
|
||||
```
|
||||
Then install the driver itself:
|
||||
|
||||
```
|
||||
curl -Lo docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \
|
||||
&& chmod +x docker-machine-driver-kvm2 \
|
||||
&& sudo cp docker-machine-driver-kvm2 /usr/local/bin/ \
|
||||
&& rm docker-machine-driver-kvm2
|
||||
```
|
||||
|
||||
### Install Kubectl
|
||||
|
||||
##### GCloud SDK
|
||||
|
||||
```
|
||||
$ gcloud components install kubectl
|
||||
```
|
||||
|
||||
##### Mac OS X
|
||||
|
||||
```
|
||||
$ brew install kubectl
|
||||
```
|
||||
|
||||
##### Ubuntu
|
||||
|
||||
```
|
||||
$ sudo apt-get update && sudo apt-get install -y apt-transport-https
|
||||
$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
|
||||
$ sudo touch /etc/apt/sources.list.d/kubernetes.list
|
||||
$ echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install -y kubectl
|
||||
```
|
||||
|
||||
##### CentOS
|
||||
|
||||
```
|
||||
$ cat <<EOF > /etc/yum.repos.d/kubernetes.repo
|
||||
[kubernetes]
|
||||
name=Kubernetes
|
||||
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=1
|
||||
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
|
||||
EOF
|
||||
|
||||
$ sudo yum install -y kubectl
|
||||
```
|
||||
|
||||
#### Verify kubectl installed
|
||||
|
||||
Try running
|
||||
```
|
||||
$ kubectl version
|
||||
```
|
||||
This should output something like
|
||||
```
|
||||
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
|
||||
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.7-gke.2", GitCommit:"8d9503f982872112eb283f78cefc6944af640427", GitTreeState:"clean", BuildDate:"2018-09-13T22:19:55Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
|
||||
```
|
||||
|
||||
### Install & Start Minikube
|
||||
Please see [detailed instructions](https://github.com/kubernetes/minikube/releases) for Minikube installation.
|
||||
For quick setup instructions follow along below.
|
||||
|
||||
##### Mac OS X
|
||||
|
||||
```
|
||||
$ brew cask install minikube
|
||||
```
|
||||
|
||||
OR
|
||||
|
||||
```
|
||||
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.28.0/minikube-darwin-amd64
|
||||
$ chmod +x minikube
|
||||
$ sudo mv minikube /usr/local/bin/
|
||||
```
|
||||
|
||||
##### Ubuntu or CentOS
|
||||
|
||||
```
|
||||
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.28.0/minikube-linux-amd64
|
||||
$ chmod +x minikube
|
||||
$ sudo mv minikube /usr/local/bin/
|
||||
```
|
||||
|
||||
##### Start your minikube cluster
|
||||
|
||||
```
|
||||
$ minikube start --cpus 4 --memory 8096 --disk-size=40g
|
||||
```
|
||||
This takes a couple minutes as it will talk to the hypervisor and create a VM with the specified configuration.
|
||||
|
||||
Notes:
|
||||
|
||||
1. These are the minimum recommended settings on the VM created by minikube for Volcano deployment. You are free to adjust them **higher** based on your host machine
|
||||
capabilities and workload requirements.
|
||||
1. Using certain hypervisors might require you to set --vm-driver option [specifying the driver](https://github.com/kubernetes/minikube/blob/master/docs/drivers.md)
|
||||
you want to use.
|
||||
|
||||
In case, you have the default minikube VM already created (following detailed installation instructions), please use the following to update the VM.
|
||||
|
||||
```
|
||||
$ minikube stop
|
||||
$ minikube delete
|
||||
$ minikube start --cpus 4 --memory 8096 --disk-size=40g
|
||||
```
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
.featured{font-size:.8rem;line-height:1.5;color:#0f0f0f;text-align:center}.featured h3{margin-top:10px;margin-bottom:10px;font-weight:400;color:#333;text-align:center}.dark .featured,.dark .featured h3{color:#fff}.featured-icon{display:block;width:100%;height:40%;font-size:3rem;text-align:center}.featured-icon img{margin:0 auto}.featured .col-sm-4 p{text-align:justify}.section-heading p{color:#eb1616}.nav-item a[href="/"],.network-icon a[href="/"]{pointer-events:none;cursor:default}#profile{padding-top:20px}#profile .portrait{width:250px;height:250px;border-radius:0%}#profile .portrait-title h2{display:none}#profile .portrait-title h3{margin-top:0;color:#3f3f3f}#profile .network-icon{margin-top:10px}.author-card .portrait{border-radius:0%}footer{margin:0}.border-bottom{border-bottom:1px solid #ddd}ul.share li i{color:#eb1616}.wg-hero .btn{color:#fff;text-shadow:1px 1px 4px rgba(0,0,0,.5);background-color:transparent}.wg-hero .btn:hover{color:#212529;border-color:#d3d9df}.blog-author-card{margin-top:1rem;padding-top:1rem}.blog-author-card .portrait{width:60px;height:60px;margin:0 auto;border-radius:0%;object-fit:cover}.blog-author-card .card-title{margin-top:0;margin-bottom:15px;font-weight:600;color:rgba(0,0,0,.84)}.blog-author-card .card-subtitle{font-weight:300;font-size:.8rem;color:rgba(0,0,0,.54);margin-bottom:7px}.dark .blog-author-card .card-subtitle{color:rgba(255,255,255,.54)}.article-metadata,.article .article-metadata{margin-bottom:10px}.article-title a{color:#0f0f0f}.docs-article-container{max-width:100%}.blog-list{margin-top:.97rem}.blog-list .card-main{padding:0}.blog-list .card{margin-bottom:1rem}.blog-list .card .card-title{margin:0 0 .5rem}.blog-list .h7{font-size:.8rem}.blog-list .card .card-text{padding:0;margin-bottom:.25rem}.blog-list .read-more a{font-size:16px}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"Target":"css/academic-bundle-pre.min.css","MediaType":"text/css","Data":{}}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
/* Source Themes Academic v4.1.0 | https://sourcethemes.com/academic/ */
|
||||
.featured{font-size:.8rem;line-height:1.5;color:#0f0f0f;text-align:center}.featured h3{margin-top:10px;margin-bottom:10px;font-weight:400;color:#333;text-align:center}.dark .featured,.dark .featured h3{color:#fff}.featured-icon{display:block;width:100%;height:40%;font-size:3rem;text-align:center}.featured-icon img{margin:0 auto}.featured .col-sm-4 p{text-align:justify}.section-heading p{color:#eb1616}.nav-item a[href="/"],.network-icon a[href="/"]{pointer-events:none;cursor:default}#profile{padding-top:20px}#profile .portrait{width:250px;height:250px;border-radius:0%}#profile .portrait-title h2{display:none}#profile .portrait-title h3{margin-top:0;color:#3f3f3f}#profile .network-icon{margin-top:10px}.author-card .portrait{border-radius:0%}footer{margin:0}.border-bottom{border-bottom:1px solid #ddd}ul.share li i{color:#eb1616}.wg-hero .btn{color:#fff;text-shadow:1px 1px 4px rgba(0,0,0,.5);background-color:transparent}.wg-hero .btn:hover{color:#212529;border-color:#d3d9df}.blog-author-card{margin-top:1rem;padding-top:1rem}.blog-author-card .portrait{width:60px;height:60px;margin:0 auto;border-radius:0%;object-fit:cover}.blog-author-card .card-title{margin-top:0;margin-bottom:15px;font-weight:600;color:rgba(0,0,0,.84)}.blog-author-card .card-subtitle{font-weight:300;font-size:.8rem;color:rgba(0,0,0,.54);margin-bottom:7px}.dark .blog-author-card .card-subtitle{color:rgba(255,255,255,.54)}.article-metadata,.article .article-metadata{margin-bottom:10px}.article-title a{color:#0f0f0f}.docs-article-container{max-width:100%}.blog-list{margin-top:.97rem}.blog-list .card-main{padding:0}.blog-list .card{margin-bottom:1rem}.blog-list .card .card-title{margin:0 0 .5rem}.blog-list .h7{font-size:.8rem}.blog-list .card .card-text{padding:0;margin-bottom:.25rem}.blog-list .read-more a{font-size:16px}
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"Target":"css/academic.0a2b184c02d86d8f7b27b22252ca381a.css","MediaType":"text/css","Data":{"Integrity":"md5-CisYTALYbY97J7IiUso4Gg=="}}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
(function($){let $navbar=$('.navbar');let navbar_offset=$navbar.innerHeight();function scrollToAnchor(target){target=(typeof target==='undefined'||typeof target==='object')?window.location.hash:target;target=target.replace(/:/g,'\\:');if($(target).length){$('body').addClass('scrolling');$('html, body').animate({scrollTop:$(target).offset().top-navbar_offset},600,function(){$('body').removeClass('scrolling');});}}
|
||||
function fixScrollspy(){let $body=$('body');let data=$body.data('bs.scrollspy');if(data){data._config.offset=navbar_offset;$body.data('bs.scrollspy',data);$body.scrollspy('refresh');}}
|
||||
window.addEventListener("hashchange",scrollToAnchor);$('#navbar-main li.nav-item a.nav-link').on('click',function(event){let hash=this.hash;if(hash&&$(hash).length&&($("#homepage").length>0)){event.preventDefault();$('html, body').animate({scrollTop:$(hash).offset().top-navbar_offset},800);}});$('#back_to_top').on('click',function(event){event.preventDefault();$('html, body').animate({'scrollTop':0},800,function(){window.location.hash="";});});$(document).on('click','.navbar-collapse.show',function(e){let targetElement=$(e.target).is('a')?$(e.target):$(e.target).parent();if(targetElement.is('a')&&targetElement.attr('class')!='dropdown-toggle'){$(this).collapse('hide');}});let pubFilters={};let searchRegex;let filterValues;let $grid_pubs=$('#container-publications');$grid_pubs.isotope({itemSelector:'.isotope-item',percentPosition:true,masonry:{columnWidth:'.grid-sizer'},filter:function(){let $this=$(this);let searchResults=searchRegex?$this.text().match(searchRegex):true;let filterResults=filterValues?$this.is(filterValues):true;return searchResults&&filterResults;}});let $quickSearch=$('.filter-search').keyup(debounce(function(){searchRegex=new RegExp($quickSearch.val(),'gi');$grid_pubs.isotope();}));function debounce(fn,threshold){let timeout;threshold=threshold||100;return function debounced(){clearTimeout(timeout);let args=arguments;let _this=this;function delayed(){fn.apply(_this,args);}
|
||||
timeout=setTimeout(delayed,threshold);};}
|
||||
function concatValues(obj){let value='';for(let prop in obj){value+=obj[prop];}
|
||||
return value;}
|
||||
$('.pub-filters').on('change',function(){let $this=$(this);let filterGroup=$this[0].getAttribute('data-filter-group');pubFilters[filterGroup]=this.value;filterValues=concatValues(pubFilters);$grid_pubs.isotope();if(filterGroup=="pubtype"){let url=$(this).val();if(url.substr(0,9)=='.pubtype-'){window.location.hash=url.substr(9);}else{window.location.hash='';}}});function filter_publications(){let urlHash=window.location.hash.replace('#','');let filterValue='*';if(urlHash!=''&&!isNaN(urlHash)){filterValue='.pubtype-'+urlHash;}
|
||||
let filterGroup='pubtype';pubFilters[filterGroup]=filterValue;filterValues=concatValues(pubFilters);$grid_pubs.isotope();$('.pubtype-select').val(filterValue);}
|
||||
function initMap(){if($('#map').length){let map_provider=$('#map-provider').val();let lat=$('#map-lat').val();let lng=$('#map-lng').val();let zoom=parseInt($('#map-zoom').val());let address=$('#map-dir').val();let api_key=$('#map-api-key').val();if(map_provider==1){let map=new GMaps({div:'#map',lat:lat,lng:lng,zoom:zoom,zoomControl:true,zoomControlOpt:{style:'SMALL',position:'TOP_LEFT'},panControl:false,streetViewControl:false,mapTypeControl:false,overviewMapControl:false,scrollwheel:true,draggable:true});map.addMarker({lat:lat,lng:lng,click:function(e){let url='https://www.google.com/maps/place/'+encodeURIComponent(address)+'/@'+lat+','+lng+'/';window.open(url,'_blank')},title:address})}else{let map=new L.map('map').setView([lat,lng],zoom);if(map_provider==3&&api_key.length){L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',{attribution:'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',maxZoom:18,id:'mapbox.streets',accessToken:api_key}).addTo(map);}else{L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{maxZoom:19,attribution:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(map);}
|
||||
let marker=L.marker([lat,lng]).addTo(map);let url=lat+','+lng+'#map='+zoom+'/'+lat+'/'+lng+'&layers=N';marker.bindPopup(address+'<p><a href="https://www.openstreetmap.org/directions?engine=osrm_car&route='+url+'">Routing via OpenStreetMap</a></p>');}}}
|
||||
function printLatestRelease(selector,repo){$.getJSON('https://api.github.com/repos/'+repo+'/tags').done(function(json){let release=json[0];$(selector).append(release.name);}).fail(function(jqxhr,textStatus,error){let err=textStatus+", "+error;console.log("Request Failed: "+err);});}
|
||||
function toggleSearchDialog(){if($('body').hasClass('searching')){$('[id=search-query]').blur();$('body').removeClass('searching');}else{$('body').addClass('searching');$('.search-results').css({opacity:0,visibility:'visible'}).animate({opacity:1},200);$('#search-query').focus();}}
|
||||
function toggleDarkMode(){if($('body').hasClass('dark')){$('body').css({opacity:0,visibility:'visible'}).animate({opacity:1},500);$('body').removeClass('dark');$('link[title=hl-light]')[0].disabled=false;$('link[title=hl-dark]')[0].disabled=true;$('.js-dark-toggle i').removeClass('fa-sun');$('.js-dark-toggle i').addClass('fa-moon');localStorage.setItem('dark_mode','0');}else{$('body').css({opacity:0,visibility:'visible'}).animate({opacity:1},500);$('body').addClass('dark');$('link[title=hl-light]')[0].disabled=true;$('link[title=hl-dark]')[0].disabled=false;$('.js-dark-toggle i').removeClass('fa-moon');$('.js-dark-toggle i').addClass('fa-sun');localStorage.setItem('dark_mode','1');}}
|
||||
$(document).ready(function(){let default_mode=0;if($('body').hasClass('dark')){default_mode=1;}
|
||||
let dark_mode=parseInt(localStorage.getItem('dark_mode')||default_mode);if(dark_mode){$('body').addClass('dark');$('link[title=hl-light]')[0].disabled=true;$('link[title=hl-dark]')[0].disabled=false;$('.js-dark-toggle i').removeClass('fa-moon');$('.js-dark-toggle i').addClass('fa-sun');}else{$('body').removeClass('dark');$('link[title=hl-light]')[0].disabled=false;$('link[title=hl-dark]')[0].disabled=true;$('.js-dark-toggle i').removeClass('fa-sun');$('.js-dark-toggle i').addClass('fa-moon');}});$(window).on('load',function(){if(window.location.hash){if(window.location.hash=="#top"){window.location.hash=""}else if(!$('.projects-container').length){scrollToAnchor();}}
|
||||
let $body=$('body');$body.scrollspy({offset:navbar_offset});let resizeTimer;$(window).resize(function(){clearTimeout(resizeTimer);resizeTimer=setTimeout(fixScrollspy,200);});$('.projects-container').each(function(index,container){let $container=$(container);let $section=$container.closest('section');let layout;if($section.find('.isotope').hasClass('js-layout-row')){layout='fitRows';}else{layout='masonry';}
|
||||
$container.imagesLoaded(function(){$container.isotope({itemSelector:'.isotope-item',layoutMode:layout,masonry:{gutter:20},filter:$section.find('.default-project-filter').text()});$section.find('.project-filters a').click(function(){let selector=$(this).attr('data-filter');$container.isotope({filter:selector});$(this).removeClass('active').addClass('active').siblings().removeClass('active all');return false;});if(window.location.hash){scrollToAnchor();}});});if($('.pub-filters-select')){filter_publications();}
|
||||
$('.js-cite-modal').click(function(e){e.preventDefault();let filename=$(this).attr('data-filename');let modal=$('#modal');modal.find('.modal-body code').load(filename,function(response,status,xhr){if(status=='error'){let msg="Error: ";$('#modal-error').html(msg+xhr.status+" "+xhr.statusText);}else{$('.js-download-cite').attr('href',filename);}});modal.modal('show');});$('.js-copy-cite').click(function(e){e.preventDefault();let range=document.createRange();let code_node=document.querySelector('#modal .modal-body');range.selectNode(code_node);window.getSelection().addRange(range);try{document.execCommand('copy');}catch(e){console.log('Error: citation copy failed.');}
|
||||
window.getSelection().removeRange(range);});initMap();$('#TableOfContents > ul > li > ul').unwrap().unwrap();if($('#academic-release').length>0)
|
||||
printLatestRelease('#academic-release',$('#academic-release').data('repo'));$('.js-search').click(function(e){e.preventDefault();toggleSearchDialog();});$(document).on('keydown',function(e){if(e.which==27){if($('body').hasClass('searching')){toggleSearchDialog();}}else if(e.which==191&&e.shiftKey==false&&!$('input,textarea').is(':focus')){e.preventDefault();toggleSearchDialog();}});$('.js-dark-toggle').click(function(e){e.preventDefault();toggleDarkMode();});});})(jQuery);let fuseOptions={shouldSort:true,includeMatches:true,tokenize:true,threshold:0.0,location:0,distance:100,maxPatternLength:32,minMatchCharLength:2,keys:[{name:'title',weight:0.99},{name:'summary',weight:0.6},{name:'authors',weight:0.5},{name:'content',weight:0.2},{name:'tags',weight:0.5},{name:'categories',weight:0.5}]};let summaryLength=60;function getSearchQuery(name){return decodeURIComponent((location.search.split(name+'=')[1]||'').split('&')[0]).replace(/\+/g,' ');}
|
||||
function updateURL(url){if(history.pushState){window.history.pushState({path:url},'',url);}}
|
||||
function initSearch(force,fuse){let query=$("#search-query").val();if(query.length<1){$('#search-hits').empty();}
|
||||
if(!force&&query.length<fuseOptions.minMatchCharLength)
|
||||
return;$('#search-hits').empty();searchAcademic(query,fuse);let newURL=window.location.protocol+"//"+window.location.host+window.location.pathname+'?q='+encodeURIComponent(query)+window.location.hash;updateURL(newURL);}
|
||||
function searchAcademic(query,fuse){let results=fuse.search(query);if(results.length>0){$('#search-hits').append('<h3 class="mt-0">'+results.length+' '+i18n.results+'</h3>');parseResults(query,results);}else{$('#search-hits').append('<div class="search-no-results">'+i18n.no_results+'</div>');}}
|
||||
function parseResults(query,results){$.each(results,function(key,value){let content=value.item.content;let snippet="";let snippetHighlights=[];if(fuseOptions.tokenize){snippetHighlights.push(query);}else{$.each(value.matches,function(matchKey,matchValue){if(matchValue.key=="content"){let start=(matchValue.indices[0][0]-summaryLength>0)?matchValue.indices[0][0]-summaryLength:0;let end=(matchValue.indices[0][1]+summaryLength<content.length)?matchValue.indices[0][1]+summaryLength:content.length;snippet+=content.substring(start,end);snippetHighlights.push(matchValue.value.substring(matchValue.indices[0][0],matchValue.indices[0][1]-matchValue.indices[0][0]+1));}});}
|
||||
if(snippet.length<1){snippet+=content.substring(0,summaryLength*2);}
|
||||
var template=$('#search-hit-fuse-template').html();let content_key=value.item.section;if(content_key in content_type){content_key=content_type[content_key];}
|
||||
let templateData={key:key,title:value.item.title,type:content_key,relpermalink:value.item.relpermalink,snippet:snippet};let output=render(template,templateData);$('#search-hits').append(output);$.each(snippetHighlights,function(hlKey,hlValue){$("#summary-"+key).mark(hlValue);});});}
|
||||
function render(template,data){let key,find,re;for(key in data){find='\\{\\{\\s*'+key+'\\s*\\}\\}';re=new RegExp(find,'g');template=template.replace(re,data[key]);}
|
||||
return template;}
|
||||
if(typeof Fuse==='function'){$.getJSON(search_index_filename,function(search_index){let fuse=new Fuse(search_index,fuseOptions);if(query=getSearchQuery('q')){$("body").addClass('searching');$('.search-results').css({opacity:0,visibility:"visible"}).animate({opacity:1},200);$("#search-query").val(query);$("#search-query").focus();initSearch(true,fuse);}
|
||||
$('#search-query').keyup(function(e){clearTimeout($.data(this,'searchTimer'));if(e.keyCode==13){initSearch(true,fuse);}else{$(this).data('searchTimer',setTimeout(function(){initSearch(false,fuse);},250));}});});}
|
||||
(function(){const links=document.getElementsByTagName('a')
|
||||
const currentUrl=location.href
|
||||
for(const link of links){if(currentUrl.indexOf(link.href)!==-1){link.classList.add('active')}else{if(currentUrl.indexOf("blog")!==-1&&link.href.indexOf("#posts")!==-1){link.classList.add('active')}}}}())
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"Target":"js/academic-bundle-pre.min.js","MediaType":"application/javascript","Data":{}}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
/* Source Themes Academic v4.1.0 | https://sourcethemes.com/academic/ */
|
||||
(function($){let $navbar=$('.navbar');let navbar_offset=$navbar.innerHeight();function scrollToAnchor(target){target=(typeof target==='undefined'||typeof target==='object')?window.location.hash:target;target=target.replace(/:/g,'\\:');if($(target).length){$('body').addClass('scrolling');$('html, body').animate({scrollTop:$(target).offset().top-navbar_offset},600,function(){$('body').removeClass('scrolling');});}}
|
||||
function fixScrollspy(){let $body=$('body');let data=$body.data('bs.scrollspy');if(data){data._config.offset=navbar_offset;$body.data('bs.scrollspy',data);$body.scrollspy('refresh');}}
|
||||
window.addEventListener("hashchange",scrollToAnchor);$('#navbar-main li.nav-item a.nav-link').on('click',function(event){let hash=this.hash;if(hash&&$(hash).length&&($("#homepage").length>0)){event.preventDefault();$('html, body').animate({scrollTop:$(hash).offset().top-navbar_offset},800);}});$('#back_to_top').on('click',function(event){event.preventDefault();$('html, body').animate({'scrollTop':0},800,function(){window.location.hash="";});});$(document).on('click','.navbar-collapse.show',function(e){let targetElement=$(e.target).is('a')?$(e.target):$(e.target).parent();if(targetElement.is('a')&&targetElement.attr('class')!='dropdown-toggle'){$(this).collapse('hide');}});let pubFilters={};let searchRegex;let filterValues;let $grid_pubs=$('#container-publications');$grid_pubs.isotope({itemSelector:'.isotope-item',percentPosition:true,masonry:{columnWidth:'.grid-sizer'},filter:function(){let $this=$(this);let searchResults=searchRegex?$this.text().match(searchRegex):true;let filterResults=filterValues?$this.is(filterValues):true;return searchResults&&filterResults;}});let $quickSearch=$('.filter-search').keyup(debounce(function(){searchRegex=new RegExp($quickSearch.val(),'gi');$grid_pubs.isotope();}));function debounce(fn,threshold){let timeout;threshold=threshold||100;return function debounced(){clearTimeout(timeout);let args=arguments;let _this=this;function delayed(){fn.apply(_this,args);}
|
||||
timeout=setTimeout(delayed,threshold);};}
|
||||
function concatValues(obj){let value='';for(let prop in obj){value+=obj[prop];}
|
||||
return value;}
|
||||
$('.pub-filters').on('change',function(){let $this=$(this);let filterGroup=$this[0].getAttribute('data-filter-group');pubFilters[filterGroup]=this.value;filterValues=concatValues(pubFilters);$grid_pubs.isotope();if(filterGroup=="pubtype"){let url=$(this).val();if(url.substr(0,9)=='.pubtype-'){window.location.hash=url.substr(9);}else{window.location.hash='';}}});function filter_publications(){let urlHash=window.location.hash.replace('#','');let filterValue='*';if(urlHash!=''&&!isNaN(urlHash)){filterValue='.pubtype-'+urlHash;}
|
||||
let filterGroup='pubtype';pubFilters[filterGroup]=filterValue;filterValues=concatValues(pubFilters);$grid_pubs.isotope();$('.pubtype-select').val(filterValue);}
|
||||
function initMap(){if($('#map').length){let map_provider=$('#map-provider').val();let lat=$('#map-lat').val();let lng=$('#map-lng').val();let zoom=parseInt($('#map-zoom').val());let address=$('#map-dir').val();let api_key=$('#map-api-key').val();if(map_provider==1){let map=new GMaps({div:'#map',lat:lat,lng:lng,zoom:zoom,zoomControl:true,zoomControlOpt:{style:'SMALL',position:'TOP_LEFT'},panControl:false,streetViewControl:false,mapTypeControl:false,overviewMapControl:false,scrollwheel:true,draggable:true});map.addMarker({lat:lat,lng:lng,click:function(e){let url='https://www.google.com/maps/place/'+encodeURIComponent(address)+'/@'+lat+','+lng+'/';window.open(url,'_blank')},title:address})}else{let map=new L.map('map').setView([lat,lng],zoom);if(map_provider==3&&api_key.length){L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',{attribution:'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',maxZoom:18,id:'mapbox.streets',accessToken:api_key}).addTo(map);}else{L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{maxZoom:19,attribution:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(map);}
|
||||
let marker=L.marker([lat,lng]).addTo(map);let url=lat+','+lng+'#map='+zoom+'/'+lat+'/'+lng+'&layers=N';marker.bindPopup(address+'<p><a href="https://www.openstreetmap.org/directions?engine=osrm_car&route='+url+'">Routing via OpenStreetMap</a></p>');}}}
|
||||
function printLatestRelease(selector,repo){$.getJSON('https://api.github.com/repos/'+repo+'/tags').done(function(json){let release=json[0];$(selector).append(release.name);}).fail(function(jqxhr,textStatus,error){let err=textStatus+", "+error;console.log("Request Failed: "+err);});}
|
||||
function toggleSearchDialog(){if($('body').hasClass('searching')){$('[id=search-query]').blur();$('body').removeClass('searching');}else{$('body').addClass('searching');$('.search-results').css({opacity:0,visibility:'visible'}).animate({opacity:1},200);$('#search-query').focus();}}
|
||||
function toggleDarkMode(){if($('body').hasClass('dark')){$('body').css({opacity:0,visibility:'visible'}).animate({opacity:1},500);$('body').removeClass('dark');$('link[title=hl-light]')[0].disabled=false;$('link[title=hl-dark]')[0].disabled=true;$('.js-dark-toggle i').removeClass('fa-sun');$('.js-dark-toggle i').addClass('fa-moon');localStorage.setItem('dark_mode','0');}else{$('body').css({opacity:0,visibility:'visible'}).animate({opacity:1},500);$('body').addClass('dark');$('link[title=hl-light]')[0].disabled=true;$('link[title=hl-dark]')[0].disabled=false;$('.js-dark-toggle i').removeClass('fa-moon');$('.js-dark-toggle i').addClass('fa-sun');localStorage.setItem('dark_mode','1');}}
|
||||
$(document).ready(function(){let default_mode=0;if($('body').hasClass('dark')){default_mode=1;}
|
||||
let dark_mode=parseInt(localStorage.getItem('dark_mode')||default_mode);if(dark_mode){$('body').addClass('dark');$('link[title=hl-light]')[0].disabled=true;$('link[title=hl-dark]')[0].disabled=false;$('.js-dark-toggle i').removeClass('fa-moon');$('.js-dark-toggle i').addClass('fa-sun');}else{$('body').removeClass('dark');$('link[title=hl-light]')[0].disabled=false;$('link[title=hl-dark]')[0].disabled=true;$('.js-dark-toggle i').removeClass('fa-sun');$('.js-dark-toggle i').addClass('fa-moon');}});$(window).on('load',function(){if(window.location.hash){if(window.location.hash=="#top"){window.location.hash=""}else if(!$('.projects-container').length){scrollToAnchor();}}
|
||||
let $body=$('body');$body.scrollspy({offset:navbar_offset});let resizeTimer;$(window).resize(function(){clearTimeout(resizeTimer);resizeTimer=setTimeout(fixScrollspy,200);});$('.projects-container').each(function(index,container){let $container=$(container);let $section=$container.closest('section');let layout;if($section.find('.isotope').hasClass('js-layout-row')){layout='fitRows';}else{layout='masonry';}
|
||||
$container.imagesLoaded(function(){$container.isotope({itemSelector:'.isotope-item',layoutMode:layout,masonry:{gutter:20},filter:$section.find('.default-project-filter').text()});$section.find('.project-filters a').click(function(){let selector=$(this).attr('data-filter');$container.isotope({filter:selector});$(this).removeClass('active').addClass('active').siblings().removeClass('active all');return false;});if(window.location.hash){scrollToAnchor();}});});if($('.pub-filters-select')){filter_publications();}
|
||||
$('.js-cite-modal').click(function(e){e.preventDefault();let filename=$(this).attr('data-filename');let modal=$('#modal');modal.find('.modal-body code').load(filename,function(response,status,xhr){if(status=='error'){let msg="Error: ";$('#modal-error').html(msg+xhr.status+" "+xhr.statusText);}else{$('.js-download-cite').attr('href',filename);}});modal.modal('show');});$('.js-copy-cite').click(function(e){e.preventDefault();let range=document.createRange();let code_node=document.querySelector('#modal .modal-body');range.selectNode(code_node);window.getSelection().addRange(range);try{document.execCommand('copy');}catch(e){console.log('Error: citation copy failed.');}
|
||||
window.getSelection().removeRange(range);});initMap();$('#TableOfContents > ul > li > ul').unwrap().unwrap();if($('#academic-release').length>0)
|
||||
printLatestRelease('#academic-release',$('#academic-release').data('repo'));$('.js-search').click(function(e){e.preventDefault();toggleSearchDialog();});$(document).on('keydown',function(e){if(e.which==27){if($('body').hasClass('searching')){toggleSearchDialog();}}else if(e.which==191&&e.shiftKey==false&&!$('input,textarea').is(':focus')){e.preventDefault();toggleSearchDialog();}});$('.js-dark-toggle').click(function(e){e.preventDefault();toggleDarkMode();});});})(jQuery);let fuseOptions={shouldSort:true,includeMatches:true,tokenize:true,threshold:0.0,location:0,distance:100,maxPatternLength:32,minMatchCharLength:2,keys:[{name:'title',weight:0.99},{name:'summary',weight:0.6},{name:'authors',weight:0.5},{name:'content',weight:0.2},{name:'tags',weight:0.5},{name:'categories',weight:0.5}]};let summaryLength=60;function getSearchQuery(name){return decodeURIComponent((location.search.split(name+'=')[1]||'').split('&')[0]).replace(/\+/g,' ');}
|
||||
function updateURL(url){if(history.pushState){window.history.pushState({path:url},'',url);}}
|
||||
function initSearch(force,fuse){let query=$("#search-query").val();if(query.length<1){$('#search-hits').empty();}
|
||||
if(!force&&query.length<fuseOptions.minMatchCharLength)
|
||||
return;$('#search-hits').empty();searchAcademic(query,fuse);let newURL=window.location.protocol+"//"+window.location.host+window.location.pathname+'?q='+encodeURIComponent(query)+window.location.hash;updateURL(newURL);}
|
||||
function searchAcademic(query,fuse){let results=fuse.search(query);if(results.length>0){$('#search-hits').append('<h3 class="mt-0">'+results.length+' '+i18n.results+'</h3>');parseResults(query,results);}else{$('#search-hits').append('<div class="search-no-results">'+i18n.no_results+'</div>');}}
|
||||
function parseResults(query,results){$.each(results,function(key,value){let content=value.item.content;let snippet="";let snippetHighlights=[];if(fuseOptions.tokenize){snippetHighlights.push(query);}else{$.each(value.matches,function(matchKey,matchValue){if(matchValue.key=="content"){let start=(matchValue.indices[0][0]-summaryLength>0)?matchValue.indices[0][0]-summaryLength:0;let end=(matchValue.indices[0][1]+summaryLength<content.length)?matchValue.indices[0][1]+summaryLength:content.length;snippet+=content.substring(start,end);snippetHighlights.push(matchValue.value.substring(matchValue.indices[0][0],matchValue.indices[0][1]-matchValue.indices[0][0]+1));}});}
|
||||
if(snippet.length<1){snippet+=content.substring(0,summaryLength*2);}
|
||||
var template=$('#search-hit-fuse-template').html();let content_key=value.item.section;if(content_key in content_type){content_key=content_type[content_key];}
|
||||
let templateData={key:key,title:value.item.title,type:content_key,relpermalink:value.item.relpermalink,snippet:snippet};let output=render(template,templateData);$('#search-hits').append(output);$.each(snippetHighlights,function(hlKey,hlValue){$("#summary-"+key).mark(hlValue);});});}
|
||||
function render(template,data){let key,find,re;for(key in data){find='\\{\\{\\s*'+key+'\\s*\\}\\}';re=new RegExp(find,'g');template=template.replace(re,data[key]);}
|
||||
return template;}
|
||||
if(typeof Fuse==='function'){$.getJSON(search_index_filename,function(search_index){let fuse=new Fuse(search_index,fuseOptions);if(query=getSearchQuery('q')){$("body").addClass('searching');$('.search-results').css({opacity:0,visibility:"visible"}).animate({opacity:1},200);$("#search-query").val(query);$("#search-query").focus();initSearch(true,fuse);}
|
||||
$('#search-query').keyup(function(e){clearTimeout($.data(this,'searchTimer'));if(e.keyCode==13){initSearch(true,fuse);}else{$(this).data('searchTimer',setTimeout(function(){initSearch(false,fuse);},250));}});});}
|
||||
(function(){const links=document.getElementsByTagName('a')
|
||||
const currentUrl=location.href
|
||||
for(const link of links){if(currentUrl.indexOf(link.href)!==-1){link.classList.add('active')}else{if(currentUrl.indexOf("blog")!==-1&&link.href.indexOf("#posts")!==-1){link.classList.add('active')}}}}())
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"Target":"js/academic.min.0aec9db41bb5e57248a0915bd5505d2e.js","MediaType":"application/javascript","Data":{"Integrity":"md5-CuydtBu15XJIoJFb1VBdLg=="}}
|
||||
Loading…
Reference in New Issue