mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
docsys refinements:
- better margins and padding in rendered markdown - category and topic highlighting
This commit is contained in:
parent
7bb13226fa
commit
7228163260
@ -1,46 +1,46 @@
|
||||
<template>
|
||||
<v-navigation-drawer v-model="drawer" :permanent="lockmenu" @transitionend="setDrawer" app class="secondary">
|
||||
<v-navigation-drawer v-model="drawer" :permanent="lockmenu" @transitionend="setDrawer" app class="secondary">
|
||||
|
||||
<div class="menu">
|
||||
<!-- active_category: {{active_category}} active_topic: {{active_topic}}-->
|
||||
<div class="menu">
|
||||
<!-- active_category: {{active_category}} active_topic: {{active_topic}}-->
|
||||
|
||||
<!-- Use active_category and active_topic to select inactive -->
|
||||
<!-- Use active_category and active_topic to select inactive -->
|
||||
|
||||
<v-list dense>
|
||||
<v-list-item
|
||||
v-if="$vuetify.breakpoint.mdAndDown"
|
||||
>
|
||||
<v-list-item-action>
|
||||
<v-switch flat inset dark color="accent" v-model="lockmenu" label="keep open" @change="setLockMenu"></v-switch>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
<v-list nav dense>
|
||||
|
||||
<v-list-group link v-for="(category,c) in categories" :key="c"
|
||||
:value="active_category === category.category">
|
||||
<!-- KEEP OPEN -->
|
||||
<v-list-item v-if="$vuetify.breakpoint.mdAndDown">
|
||||
<v-list-item-action>
|
||||
<v-switch inset dark color="accent" v-model="lockmenu" label="keep open"
|
||||
@change="setLockMenu"></v-switch>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
|
||||
<template v-slot:activator>
|
||||
<v-list-item-content>
|
||||
<!-- <router-link :to="{ name: 'docs-slug', params: {lockmenu:lockmenu}}">-->
|
||||
<router-link :to="{path: category.category+'.html'}">
|
||||
<v-list-item-title>
|
||||
{{category.categoryName}}
|
||||
</v-list-item-title>
|
||||
</router-link>
|
||||
</v-list-item-content>
|
||||
</template>
|
||||
<!-- by category -->
|
||||
<v-list-group v-for="(category,c) in categories" :key="c"
|
||||
:value="active_category === category.category" active-class="isactive">
|
||||
<!-- <nuxt-link :to="{path: category.category}">foo</nuxt-link>-->
|
||||
<!-- <router-link :to="{path: category.category+'.html'}">-->
|
||||
<template v-slot:activator>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title @click="$nuxt.$router.push({path: category.category})">
|
||||
{{category.categoryName}}
|
||||
</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</template>
|
||||
<!-- </router-link>-->
|
||||
<v-list-item v-for="(doc, i) in category.docs" :key="i" link :to="doc.filename">
|
||||
<!-- <router-link :to="{ name: 'docs-slug', params: {lockmenu:lockmenu}}">-->
|
||||
<!-- <router-link :to="{ path: doc.filename}">-->
|
||||
<v-list-item-title @click="$nuxt.$router.push({path: doc.filename})">{{doc.attributes.title}}</v-list-item-title>
|
||||
<!-- </router-link>-->
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item v-for="(doc, i) in category.docs" :key="i" link :to="doc.filename">
|
||||
<!-- <router-link :to="{ name: 'docs-slug', params: {lockmenu:lockmenu}}">-->
|
||||
<router-link :to="{ path: doc.filename + '.html'}">
|
||||
<v-list-item-title>{{doc.attributes.title}}</v-list-item-title>
|
||||
</router-link>
|
||||
</v-list-item>
|
||||
</v-list-group>
|
||||
</v-list>
|
||||
|
||||
</v-list-group>
|
||||
</v-list>
|
||||
|
||||
</div>
|
||||
</v-navigation-drawer>
|
||||
</div>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
@ -52,8 +52,8 @@
|
||||
},
|
||||
data(context) {
|
||||
let lockmenu = this.$store.state.docs.isDrawerPinned;
|
||||
if (lockmenu == null){
|
||||
lockmenu = false
|
||||
if (lockmenu == null) {
|
||||
lockmenu = false
|
||||
}
|
||||
console.log("data says context is: " + context);
|
||||
// console.log("g says" + this.$getters.docs.drawerState);
|
||||
@ -75,9 +75,9 @@
|
||||
this.$store.subscribe((mutation, state) => {
|
||||
console.log("mutation type " + mutation.type);
|
||||
if (mutation.type === 'docs/toggleDrawerState') {
|
||||
this.drawer=this.$store.state.docs.isDrawerOpen;
|
||||
this.drawer = this.$store.state.docs.isDrawerOpen;
|
||||
} else if (mutation.type === 'docs/setMenuLock') {
|
||||
this.lockmenu=this.$store.state.docs.isDrawerPinned;
|
||||
this.lockmenu = this.$store.state.docs.isDrawerPinned;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -89,3 +89,27 @@
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.nuxt-link-exact-active {
|
||||
/*color: #52c41a;*/
|
||||
background-color: #7F828B;
|
||||
color: #52c41a;
|
||||
/*color: #000000;*/
|
||||
}
|
||||
|
||||
/* .v-list-item--active */
|
||||
/* .v-list-item--link */
|
||||
/* a .nuxt-link-exact-active*/
|
||||
/* a .nuxt-link-active */
|
||||
|
||||
.isactive {
|
||||
background-color: #7F828B;
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
.router-link-active {
|
||||
background-color: #FFFFFF;
|
||||
color: #FFFFFF;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -52,6 +52,11 @@
|
||||
content: '';
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 5px;
|
||||
margin: 0px 0px 10px 5px;
|
||||
}
|
||||
|
||||
code:after {
|
||||
content: '';
|
||||
}
|
||||
@ -60,6 +65,7 @@
|
||||
}
|
||||
|
||||
.md-body {
|
||||
padding-left: 10px;
|
||||
justify-content: left;
|
||||
align-items: left;
|
||||
text-align: left;
|
||||
|
@ -117,10 +117,9 @@ export default {
|
||||
active_topic = categories[0].docs[0].filename;
|
||||
}
|
||||
} else {
|
||||
console.log("params.slug was defined:" + context.params.slug);
|
||||
let parts = context.params.slug.split("/",2);
|
||||
active_category=parts[0];
|
||||
console.log("active_cateogory: " + active_category);
|
||||
console.log("==> params.slug[" + context.params.slug + "] active_category[" + active_category + "]");
|
||||
active_topic = parts.length>1 ? parts[1] : null;
|
||||
}
|
||||
|
||||
@ -144,8 +143,7 @@ export default {
|
||||
active_category_name = categories.find(c => c.category === active_category).categoryName;
|
||||
}
|
||||
|
||||
console.log("active_category:" + active_category);
|
||||
console.log("active_topic:" + active_topic);
|
||||
console.log("==> active category[" + active_category + "] topic["+ active_topic +"]");
|
||||
|
||||
// At this point, we have an active category or even a topic.
|
||||
// We're all in on loading markdown, but which one?
|
||||
|
@ -59,6 +59,13 @@ export default {
|
||||
primary: '#51DDBD',
|
||||
secondary: '#2D4ADE',
|
||||
accent: '#FA7D2B',
|
||||
// primary: '#1976D2',
|
||||
// secondary: '#424242',
|
||||
// accent: '#82B1FF',
|
||||
error: '#FF5252',
|
||||
info: '#2196F3',
|
||||
success: '#4CAF50',
|
||||
warning: '#FFC107'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4568
docsys/src/main/node/docsys/package-lock.json
generated
4568
docsys/src/main/node/docsys/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,12 +11,12 @@
|
||||
"generate": "nuxt generate"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxtjs/axios": "^5.9.3",
|
||||
"@nuxtjs/vuetify": "^1.9.0",
|
||||
"front-matter": "^3.0.2",
|
||||
"@nuxtjs/axios": "^5.9.5",
|
||||
"@nuxtjs/vuetify": "^1.11.0",
|
||||
"front-matter": "^3.1.0",
|
||||
"markdown-it-smartarrows": "^1.0.1",
|
||||
"markdown-it-vue": "^1.0.11",
|
||||
"node-fetch": "^2.6.0",
|
||||
"nuxt": "^2.11.0"
|
||||
"nuxt": "^2.12.0"
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,32 @@
|
||||
package io.nosqlbench.virtdata.library.curves4.discrete.long_long;
|
||||
|
||||
import org.testng.annotations.Ignore;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class ZipfTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testZipfMatrix() {
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
for (int j = 0; j < 10; j++) {
|
||||
int elements = (int) Math.pow(10,j);
|
||||
double exponent = (double) i+1;
|
||||
System.out.println("i:" + i + " j:" + j + " elements:" + elements + " exp:" + exponent);
|
||||
long startAt = System.nanoTime();
|
||||
Zipf z = new Zipf(elements, exponent, "compute", "map");
|
||||
for (int k = 0; k < 100; k++) {
|
||||
double frac = ((double)k/100.0d);
|
||||
long unitvalue = (long) (frac * Long.MAX_VALUE);
|
||||
long l = z.applyAsLong(unitvalue);
|
||||
System.out.println("i:" + i + " j:" + j + " K:" + k + " frac:" + frac + " unit:" + unitvalue);
|
||||
}
|
||||
long endAt = System.nanoTime();
|
||||
System.out.println(((double)(endAt-startAt))/1000000000d);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user