[experimental] development --> docs

Allow for the incorporation of development branch functions into the documentation using
{{< development style="dev" >}}
{{< /development >}}
This commit is contained in:
gijsio
2020-08-20 10:54:37 +02:00
parent 993955a2ed
commit 253fb9be91
4 changed files with 38 additions and 4 deletions

View File

@@ -36,6 +36,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/1.5.1/vue-resource.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script>
var development = false;
var app = new Vue({
el: '#app',
data: {
@@ -74,10 +75,17 @@
},
watch: {
// whenever question changes, this function will run
// whenever the branch changes, this function will run
branch: function (newb, old) {
if (newb.value != this.branches[0].value) {
window.location = newb + window.location.pathname
development = !development;
console.log("switch")
if (!development){
document.getElementById('development').style='display:none';
}else{
document.getElementById('development').style='display:block';
}
//window.location = newb + window.location.pathname
}
},
},
@@ -91,8 +99,10 @@
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
<!--{{- partial "footer.html" . -}}-->
{{- partial "alexia.html" . -}}
{{- partial "google_analitycs.html" . -}}
</body>
</html>

View File

@@ -0,0 +1,8 @@
<div id='development'>
<v-card class='{{ .Get "style" }}'>
<v-card-text>
{{ .Inner }}
</v-card-text>
</v-card>
</div>

View File

@@ -1,5 +1,6 @@
<v-card class="{{ .Get "style" }}-alert">
<v-card class='{{ .Get "style" }}-alert'>
<v-card-text>
{{ .Inner }}
</v-card-text>
</v-card>

View File

@@ -220,6 +220,21 @@ li.hot {
padding:0!important;
}
/* changes 19-08-2020
Added shortcode for development markings
*/
#development {
display:none;
}
.dev {
background-color: #EF9A9A !important;
}
.v-card__text > h3, h4{
margin-top:0px;
}
.danger-alert {
background-color: #EF9A9A !important;
margin-top: 24px;