2
0
mirror of https://github.com/embarklabs/embark.git synced 2025-01-11 22:34:24 +00:00

chore: remove version switcher from docs layout

This commit is contained in:
Pascal Precht 2020-02-11 15:01:22 +01:00 committed by Pascal Precht
parent e29a93bde5
commit d6d6a16169
2 changed files with 1 additions and 15 deletions
site/themes/embark
layout
source/js

@ -22,13 +22,8 @@
</div>
<div class="c-guide__body">
<nav role="navigation">
<select id="version-select">
{% for version in Object.keys(site.data.versions) %}
<option value="{{ version }}">{{ site.data.versions[version].label }}</option>
{% endfor %}
</select>
{% for section in Object.keys(site.data.sidebar['docs']) %}
<div class="o-distance-{% if !loop.first %}xl{%else%}l{% endif %}">
<div class="{% if !loop.first %}o-distance-xl{% endif %}">
<h3 class="c-category-title">{{__('sidebar.docs.' + section)}}</h3>
<ul class="o-list-bare">
{% for guide in Object.keys(site.data.sidebar['docs'][section]) %}

@ -13,7 +13,6 @@ document.addEventListener('DOMContentLoaded', function () {
const guidesTrigger = document.querySelector('#guides-trigger');
const navigationClose = document.querySelector('.c-navigation__close');
const guidesClose = document.querySelector('#guides-close');
const versionSelector = document.querySelector('#version-select');
navigationTrigger.addEventListener('click', function () {
navigation.classList.toggle('is-active');
@ -32,14 +31,6 @@ document.addEventListener('DOMContentLoaded', function () {
});
}
if (versionSelector) {
versionSelector.addEventListener('change', function (e) {
if (EMBARK_DOC_VERSIONS[e.target.value]) {
window.location.href = EMBARK_DOC_VERSIONS[e.target.value];
}
});
}
const clipboard = new ClipboardJS(".c-button--squared");
clipboard.on('success', function (e) {
e.clearSelection();