mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 12:38:05 +00:00
search and list pages
This commit is contained in:
+5
-1
@@ -8,7 +8,11 @@ pluralizeListTitles = false
|
|||||||
|
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
pygmentsCodeFences = true
|
pygmentsCodeFences = true
|
||||||
pygmentsCodeFencesGuessSyntax = true
|
|
||||||
|
PygmentsStyle = "native"
|
||||||
|
|
||||||
|
#pygmentsCodeFencesGuessSyntax = true
|
||||||
|
|
||||||
|
|
||||||
[permalinks]
|
[permalinks]
|
||||||
inside-pages = "/:filename/"
|
inside-pages = "/:filename/"
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ Using the sample below create the `rancher-cluster.yml` file. Replace the IP Add
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
nodes:
|
nodes:
|
||||||
- address: 165.227.114.63
|
- address: 165.227.114.63
|
||||||
user: ubuntu
|
user: ubuntu
|
||||||
role: [controlplane,worker,etcd]
|
role: [controlplane,worker,etcd]
|
||||||
- address: 165.227.116.167
|
- address: 165.227.116.167
|
||||||
user: ubuntu
|
user: ubuntu
|
||||||
role: [controlplane,worker,etcd]
|
role: [controlplane,worker,etcd]
|
||||||
- address: 165.227.127.226
|
- address: 165.227.127.226
|
||||||
user: ubuntu
|
user: ubuntu
|
||||||
role: [controlplane,worker,etcd]
|
role: [controlplane,worker,etcd]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Common RKE nodes: options
|
#### Common RKE nodes: options
|
||||||
|
|||||||
@@ -10,18 +10,18 @@
|
|||||||
|
|
||||||
<div class="row m-t-sm">
|
<div class="row m-t-sm">
|
||||||
|
|
||||||
<aside class="col-sm-3 col-xs-12 p-l-0">
|
<aside class="col-md-3 col-xs-12 p-l-0">
|
||||||
{{ partial "docs-side-nav.html" . }}
|
{{ partial "docs-side-nav.html" . }}
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<article class="{{ if ($.Scratch.Get "showSidebar") }} col-sm-6 {{else}} col-md-9 p-l-lg {{end}} col-xs-12">
|
<article class="{{ if ($.Scratch.Get "showSidebar") }}col-sm-6{{else}}col-md-9 p-l-lg {{end}}col-xs-12">
|
||||||
|
|
||||||
{{ with .Params.Title }}
|
{{ with .Params.Title }}
|
||||||
<h1 class="m-t-0">{{ . }}</h1>
|
<h1 class="m-t-0">{{ . }}</h1>
|
||||||
<hr/>
|
<hr/>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<div class="main-content">
|
<div class="main-content docs-body">
|
||||||
<!-- this is a test -->
|
<!-- this is a test -->
|
||||||
<!-- {{ partial "page-nav.html" . }} -->
|
<!-- {{ partial "page-nav.html" . }} -->
|
||||||
<!-- end test -->
|
<!-- end test -->
|
||||||
|
|||||||
+53
-27
@@ -37,17 +37,6 @@ const bootstrapDocsSearch = function() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
search.addWidget(
|
|
||||||
instantsearch.widgets.searchBox({
|
|
||||||
autofocus: true,
|
|
||||||
loadingIndicator: true,
|
|
||||||
container: '#search-box-mobile',
|
|
||||||
placeholder: 'Search Blog, Events, etc...',
|
|
||||||
magnifier: false,
|
|
||||||
reset: true,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
search.addWidget(
|
search.addWidget(
|
||||||
instantsearch.widgets.infiniteHits({
|
instantsearch.widgets.infiniteHits({
|
||||||
container: '#hits',
|
container: '#hits',
|
||||||
@@ -61,26 +50,61 @@ const bootstrapDocsSearch = function() {
|
|||||||
|
|
||||||
search.start();
|
search.start();
|
||||||
|
|
||||||
$(window).on('keyup', e => {
|
$(document).on('click', '.search-open', (e) => {
|
||||||
if (e.which === 27 && $('.container-search').hasClass('open')) {
|
let wrapperId = $(e.currentTarget).data('launch-id');
|
||||||
$('.container-search').toggleClass('open');
|
let wrapper = $(`#${wrapperId}`);
|
||||||
$('.overlay-search').toggleClass('open');
|
|
||||||
|
let content = wrapper.find('div.content');
|
||||||
|
|
||||||
|
const modal = new tingle.modal({
|
||||||
|
closeMethods: ['overlay', 'button', 'escape'],
|
||||||
|
closeLabel: "Close",
|
||||||
|
|
||||||
|
onOpen: () => {
|
||||||
|
console.log('Search opened');
|
||||||
|
},
|
||||||
|
|
||||||
|
onClose: () => {
|
||||||
|
console.log('Search closed');
|
||||||
|
},
|
||||||
|
|
||||||
|
beforeClose: () => {
|
||||||
|
content.detach()
|
||||||
|
wrapper.append(content);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// set content
|
||||||
|
content.detach();
|
||||||
|
modal.setContent(content[0]);
|
||||||
|
|
||||||
|
// add a button
|
||||||
|
let label = wrapper.find('.footer-button-label').data('footer-label');
|
||||||
|
if ( label ) {
|
||||||
|
modal.addFooterBtn(label, 'tingle-btn tingle-btn--primary', function() {
|
||||||
|
// here goes some logic
|
||||||
|
modal.close();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modal.open();
|
||||||
|
setTimeout(function() {
|
||||||
|
$('#search-box').focus();
|
||||||
|
}, 50);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('header').on('click', '#button-search', () => {
|
//mobile nav toggle
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("body").addClass("js");
|
||||||
|
var $menu = $("#menu"),
|
||||||
|
$menulink = $(".menu-link");
|
||||||
|
|
||||||
let container = $('.container-search');
|
$menulink.click(function() {
|
||||||
let overlay = $('.overlay-search');
|
$menulink.toggleClass("active");
|
||||||
|
$menu.toggleClass("active");
|
||||||
container.toggleClass('open');
|
return false;
|
||||||
overlay.toggleClass('open');
|
});
|
||||||
|
|
||||||
if (container.hasClass('open')) {
|
|
||||||
$('input#search-box').focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
overlay.css({top: 120});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,3 +124,5 @@ $(document).ready(() => {
|
|||||||
bootstrapDocsSearch();
|
bootstrapDocsSearch();
|
||||||
bootstrapIdLinks();
|
bootstrapIdLinks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user