forked from meltano/meltano
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: shorten install quick start, move rest to guide (meltano#6800)
* add tabs plugin to docs with css etc. * remove ws * redo linking * relink everything * Update docs/src/_getting-started/installation.md Co-authored-by: Will Da Silva <will@willdasilva.xyz> Co-authored-by: Will Da Silva <will@willdasilva.xyz>
- Loading branch information
1 parent
e02c96f
commit f0a396a
Showing
13 changed files
with
416 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ gem 'jekyll-redirect-from', "~>0.16" | |
|
||
group :jekyll_plugins do | ||
gem 'jekyll-algolia' | ||
gem "jekyll-tabs" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
.tab { | ||
display: flex; | ||
flex-wrap: wrap; | ||
margin-left: -20px; | ||
padding: 0; | ||
list-style: none; | ||
position: relative; | ||
list-style-type: none; | ||
} | ||
|
||
ul.tab { | ||
list-style-type: none; | ||
|
||
} | ||
|
||
.tab > * { | ||
flex: none; | ||
padding-left: 20px; | ||
position: relative; | ||
} | ||
|
||
.tab > * > a { | ||
display: block; | ||
text-align: center; | ||
padding: 9px 20px; | ||
color: #999; | ||
border-bottom: 2px solid transparent; | ||
border-bottom-color: transparent; | ||
font-size: 12px; | ||
text-transform: uppercase; | ||
transition: color .1s ease-in-out; | ||
line-height: 20px; | ||
} | ||
|
||
.tab > .active > a { | ||
color:#222; | ||
border-color: #1e87f0; | ||
} | ||
|
||
.tab li a { | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
|
||
.tab-content{ | ||
padding: 0; | ||
} | ||
|
||
.tab-content li { | ||
display: none; | ||
} | ||
.tab-content li.active { | ||
display: initial; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const removeActiveClasses = function (ulElement) { | ||
const lis = ulElement.querySelectorAll('li'); | ||
Array.prototype.forEach.call(lis, function(li) { | ||
li.classList.remove('active'); | ||
}); | ||
} | ||
|
||
const getChildPosition = function (element) { | ||
var parent = element.parentNode; | ||
var i = 0; | ||
for (var i = 0; i < parent.children.length; i++) { | ||
if (parent.children[i] === element) { | ||
return i; | ||
} | ||
} | ||
|
||
throw new Error('No parent found'); | ||
} | ||
|
||
window.addEventListener('load', function () { | ||
const tabLinks = document.querySelectorAll('ul.tab li a'); | ||
|
||
Array.prototype.forEach.call(tabLinks, function(link) { | ||
link.addEventListener('click', function (event) { | ||
event.preventDefault(); | ||
|
||
liTab = link.parentNode; | ||
ulTab = liTab.parentNode; | ||
position = getChildPosition(liTab); | ||
if (liTab.className.includes('active')) { | ||
return; | ||
} | ||
|
||
removeActiveClasses(ulTab); | ||
tabContentId = ulTab.getAttribute('data-tab'); | ||
tabContentElement = document.getElementById(tabContentId); | ||
removeActiveClasses(tabContentElement); | ||
|
||
tabContentElement.querySelectorAll('li')[position].classList.add('active'); | ||
liTab.classList.add('active'); | ||
}, false); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.